UDP/IP Socket Interface:
To use UDP/IP transmission, it is necessary to create a small program in the S2T. The program will utilize the SEND and RECV instructions. The general procedure is as follows:
1.Execute UDP socket open: The Specified Port number must be different from the Port number for
2.Execute UDP send and/or UDP receive to exchange data via Ethernet.
3.UDP socket close.
The instruction information on these functions is shown as follows.
UDP Socket Open: SEND instruction is used. ▬[ A SEND B ]▬.
A: H3100 (fixed) | B: Result status |
A+1: UDP open command (H0031) | B+1: Error code |
A+2: Socket number (1 to 12) |
|
A+3: UDP Port number |
|
Sample Program |
|
12544 = H3100
49 = H0031 Socket number =1 Port number = 4000
When R0620 is set to ON, the UDP open operation is executed. When the operation is finished R0620 is reset to OFF automatically.
Page 5