Connect() public method

Attempts to connect to the PLC. This method will be automatically called if a data send attempt is made prior to connecting, partly because of your convenience and partly for making the library handle disconnections better.

It is a good practice to initally call this method first to check if the password is correct.

Thrown if the password is wrong.
public Connect ( ) : void
return void
Beispiel #1
0
 public void ConnectWrongPassTest()
 {
     PLC target = new PLC(ip, "3012893128"); // TODO: Initialize to an appropriate value
     target.Connect();
 }
Beispiel #2
0
 public Control(IPEndPoint ip, string pass)
 {
     m_ip = ip;
     plc = new PLC(ip, pass);
     plc.Connect();
 }
Beispiel #3
0
 public void ConnectTest()
 {
     PLC target = new PLC(ip, password); // TODO: Initialize to an appropriate value
     target.Connect();
 }