Use the Com>TCP/IP> Ping function to ping a remote device.
|
In your Ladder application:
Note that in the Ping function, parameter B contains the IP of the Ping target, and parameter J contains the IP of the device that actually answers the Ping. |
|
|
Note ♦ |
In order to ping the controller and enable it to reply, set the socket protocol to TCP.
|
Ping Parameters
|
Parameter Name |
Type |
Purpose |
||||||||||||||||||||||||||||||||||||||
|
Socket |
Constant |
The PLC sends the data through this socket. Select a socket that is initialized to ICMP |
||||||||||||||||||||||||||||||||||||||
|
Remote PLC |
Constant, MI, XI |
The IP of the remote device |
||||||||||||||||||||||||||||||||||||||
|
Timeout (100ms) |
Constant or register |
User-defined. If no answer is received from the remote device within the Timeout period, the function waits for the Idle time to pass before resending the Ping data. |
||||||||||||||||||||||||||||||||||||||
|
Idle time (100ms) |
Constant or register |
If no answer is received from the remote device, the function wait for the Timeout + Idle Time before resending the Ping request. If a reply is received, the function wait for the Idle time, before resending. |
||||||||||||||||||||||||||||||||||||||
|
Internal usage |
DW, XDW |
The function uses this for internal management. Set a Power-up value of 0. |
||||||||||||||||||||||||||||||||||||||
|
Busy Bit |
MB, XB |
Turns ON when the function begins waiting for a reply Turn OFF when the reply arrives, or when timeout is exceeded. |
||||||||||||||||||||||||||||||||||||||
|
Success Bit |
MB, XB |
Turns ON when reply is received without error. Reset by user. |
||||||||||||||||||||||||||||||||||||||
|
Rx to Tx Time |
DW, XDW |
Resolution:
Valid value ONLY when the Success bit rises. |
||||||||||||||||||||||||||||||||||||||
|
Error Code |
Register |
Ping supports the standard ICMPv4 Destination Unreachable Message Subtypes listed in the following table
|
||||||||||||||||||||||||||||||||||||||
|
Remote IP |
|
The IP from the replying device. Note that it might be different than the “input Remote IP” due to network topology. |