
6 F 3 B 0 3 6 2
2.TCP sockets
This is a sample program that issues the requests used with TCP sockets. It assumes that the parameter set up and operating mode control requests (run mode/socket interface transmission enable) have already completed.
a.TCP open request (passive)
This program issues a TCP open request (passive) for socket number 8 on the Ethernet Port.
This ladder program is executed by turning on the A contact on the R0630.
Parameters: 12544: 3100H, 00053: 0035H |
|
341995909: 14627185H |
|
Remote port IP address: 133.113.98.20 |
|
Remote port object socket TCP port number: | 4000 |
Local port specified socket TCP port number: | 4000 |
Open request timeout time: 1800 seconds |
|
/* TCP passive open request: executed when R0630 is set on. */ | ||||
|
|
| ||
R0630 |
|
| ||
MOV RW000][00053 MOV | ||||
/* Module designation, CMD number setup */ |
| |||
|
| |||
+[00008 | MOV RW002][00002 MOV | |||
/* Socket identifier, open type setup | */ |
| ||
|
| |||
+[0341995909 DMOV RW005∙RW004][04000 MOV | ||||
/* Remote port IP address and port number setup */ |
| |||
|
| |||
+[04000 | MOV RW007][18000 MOV | |||
/* Local port number, timeout time setup | */ |
| ||
|
| |||
+[RW000 | SEND RW010][RST | |||
| /* Turn R0630 off after request setup and completion. */ | |||
|
|
| ||
|
|
|
|
|
⎯ 116 ⎯