public override bool?Connect(string path, ConnectMode mode)
        {
            switch (mode)
            {
            case ConnectMode.IP:
                Ch.CloseComm();
                Ch.OpenCommEthernetTCP(path, Ch.ACSC_SOCKET_STREAM_PORT);
                return(true);

            case ConnectMode.Com:
                Ch.CloseComm();
                Ch.OpenCommSerial(Convert.ToInt32(path), -1);
                return(null);
            }
            return(null);
        }
Example #2
0
 public void Dispose( )
 {
     Ch.CloseComm();
 }