Error Code Description: DVP-ES2/EX2/SS2/SA2/SX2/SE&TP Operation Manual - Programming
Error Code Description: DVP-ES2/EX2/SS2/SA2/SX2/SE&TP Operation Manual - Programming
Program Example: (The command is sent and received through the Ethernet port built in DVP-SE.)
This example uses DVP-SE series as the client, M0 to activate and UDP connection mode to send
and receive data. The value in S2 is K1. When the data is received, M100 is set to ON. The relative
parameters are stated below.
TCP Socket Connection
Remote IP 192.168.1.18
Remote port 10000
Local port 1024
Send Data Address D100
Send Data Length 100
Receive Data Address D200
Communication timeout (ms) 5000
1. When M0 is ON, the transmission starts and M1197 is ON. If M1198 is ON, it means
communication errors occur and an error code will be stored in D1176.
2. When the data is received correctly and a response is received from the remote device, M100
will be ON. The data length and the contents will be stored in D200.
3-528
3 . I ns t r uc ti on Se t
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.
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
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-529
DVP- ES2 / EX2 / SS2 / SA2 / SX2 / SE&T P O p e r a t i on Ma n ua l - Pr ogr am m i ng
3-530