Represents a PLC device.

Please note that all of the functions except the ones beginning with Begin* and End* are blocking and calling these functions will block until a response is received from the PLC device. If there's a communication problem your application will block (freeze) until a timeout occur.

You can either use blocking methods in a separate thread or use advanced asynchronous methods for a non blocking usage.

예제 #1
0
파일: Control.cs 프로젝트: engina/PLCNetLib
 public Control(IPEndPoint ip, string pass)
 {
     m_ip = ip;
     plc = new PLC(ip, pass);
     plc.Connect();
 }
예제 #2
0
파일: PLCTest.cs 프로젝트: engina/PLCNetLib
 public void ConnectTest()
 {
     PLC target = new PLC(ip, password); // TODO: Initialize to an appropriate value
     target.Connect();
 }
예제 #3
0
파일: PLCTest.cs 프로젝트: engina/PLCNetLib
 public void ConnectWrongPassTest()
 {
     PLC target = new PLC(ip, "3012893128"); // TODO: Initialize to an appropriate value
     target.Connect();
 }
예제 #4
0
파일: PLCTest.cs 프로젝트: engina/PLCNetLib
 public static void MyClassInitialize(TestContext testContext)
 {
     plc = new PLC(ip, password);
 }