Chapter 6 Applied Instructions 6. When the TCP socket is opened, the remote IP address and the communication ports can be set as follows. 7. If the TCP socket is opened, and no error occurs after the instruction is executed, the PLC is connected to the remote device, and the flag related to the connection’s being started is ON.
If 6-508 I Socke t r 1 2 3 4 5 6 7 8 Numbe tem (high word) Received data address (low word) SR1231 SR1243 SR1255 SR1267 SR1279 SR1291 SR1303 SR1315 Transmitted data counter SR1232 SR1244 SR1256 SR1268 SR1280 SR1292 SR1304 SR1316 Received data counter SR1233 SR1245 SR1257 SR1269 SR1281 SR1293 SR1305 SR1317 Remote IP address Local Remote communication port Description communication port 0.0.0.0 0 0 Illegal 0.0.0.0 Not equal to 0 0 Only applied to the server 1. The connection request from the same local communication port is accepted. 2. The packet sent from any device is received through the local communication port. 3. The data can not be sent.
0.0.0.0 0 Not equal to 0 Illegal Specific IP address 0 0 Illegal Specific IP address Not equal to 0 0 Only applied to the server 1. The connection requests from the local communication port and the specific IP address are received. 2. The packet is received from the specific IP address through the local communication port. 3. The data can not be sent. Specific IP address 0 Not equal to 0 Only applied to the client 1. If the data is sent from the server, the system will specify an unused communication port as the local communication port. 2. The data is sent to the specific IP address through the remote communication port. Specific IP address Not equal to 0 Not equal to 0 1.
The connection requests from the local communication port, the remote communication port, and the specific IP address are received. 2. The data is sent to the specific IP address through the remote communication port. 3. The packet is received from the specific IP address through the local communication port.