56
10.2 TCP/IP Communication
1. Establish a TCP connection
Device IP address and port number settings can refer to 6.5
private Socket _mySocket;
_mySocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream,
ProtocolType.Tcp); _mySocket.Connect(IPAddress.Parse("192.168.0.100"), 4096);
2.Send trigger command
The trigger command defaults to TON
Sending trigger commands only requires
_mySocket.Send(Encoding.ASCII.GetBytes("TON"));
Support custom trigger command, see 6.9
In addition to instruction triggering, other triggering methods are also supported, see 2.4