3. Instruction Set Program Example 2: (The command is sent and received through the Ethernet port built in DVP-SE.) This example uses DVP-SE series as the client, M2 to activate and TCP connection mode to send and receive data. The value in S2 is K2. The relative parameters are stated below. 1. Set M1196 to ON. When using the TCP connection mode, it is suggested to set M1196 to ON to avoid disconnecting if a communication timeout occurs. 2. When M2 is ON, DVP-SE is waiting for the TCP connection to be established. When M100 is ON, it means the receiving is complete successfully and the data length and contents are stored in D200 and data in D100 has been sent, the data length is 100 bytes.
3. If M1198 is ON, it means communication errors occur and an error code will be stored in D1176. 3-575 TCP Socket Connection Remote IP 192.168.1.31 Remote port 10000 Local port 1024 Send Data Address D100 Send Data Length 100 Receive Data Address D200 Communication timeout (ms) 30000