Topic: DMD0345 PING - Ping Ethernet Device |
|
The Ping Ethernet Device (PING) instruction uses the Internet Control Message protocol (ICMP) to determine if the device with the specified IP Address is available on the network, and optionally to report the amount of time required to get a response from that device.
The amount of time required to complete the PING operation can optionally be stored in a numeric location. The round trip time begins accumulating when the PING packet is actually sent and ends with either a response from the remote device or a timeout. If the PING operation is successful, the Round Trip Time will be total amount of time (in milliseconds) that elapsed after the PING packet was sent and the response packet was received. If the PING operation failed, the Round Trip Time will be the total mount of time (in milliseconds) that elapsed while waiting for the timeout to occur.
Note: care must be taken to NOT run this instruction at an uncontrolled pace. If this happens the network hardware could perceive it as a Ping Flood (where ICMP packets are sent as fast as possible without waiting for replies). This could lead to a DENIAL-OF-SERVICE for legitimate PING operations.
|
|
Parameters:Note: Use the F9 key or click the 'three dot box' at the right edge of the parameter field to open the Default Element Selection Tool (the Element Picker or the Element Browser) or use the Down-Arrow key (Auto-Complete) on any parameter field to see a complete list of the memory locations that are valid for that parameter of the instruction.
Device selects which of the Ethernet Devices to use, currently this instruction can only use @IntEthernet which is the on-board Ethernet port on the Do-more CPU. If the only entry in the list is no devices available this indicates that there are no Devices that can execute this instruction, most likely cause is the CPU does not have an on-board Ethernet port.
Remote Address is the address of the remote network device to attempt to locate.
Network Timeout specifies the amount of time (in milliseconds) to wait on a response from the network device. This can be any constant value between 1 and 65535, or any numeric location containing a value in that range.
If the optional Round Trip Time is enabled, this specifies a numeric memory location to store the total amount of time (in milliseconds) that elapsed during the Ping operation. This can be any writable numeric location.
The On Success and On Error parameters specify what action to perform when this instruction completes. You do not have to use the same type of selection for both On Success and On Error.
If the Set Bit selection is used for either On Success or On Error, the specified BIT location will be SET OFF when the instruction is first enabled and will remain OFF until the instruction completes. Once complete, the appropriate Success or Error bit location ON. The specified Bit location is enabled with a SET (Latch) operation meaning that it will remain ON even if the input logic for the instruction goes OFF.
If the JMP to Stage selection is used for either On Success or On Error the target Stage must be in the same Program code-block as this instruction, you cannot specify a target Stage that exists in a different Program code-block. When the operation finishes, the target Stage will be enabled the same way as a standalone Jump to Stage (JMP) instruction would do it. The JMP to Stage option will only be available if this instruction is placed in a Program code-block.
On Success selects which of the following actions to perform if the operation is successful:
On Error selects which of
the following actions to perform if the operation is unsuccessful:
If either the On Success or On Error selections are set to JMP to Stage, Automatically create the SG box for any NEW stage number will be enabled which will automatically create any target stage that does not already exist.
|
|
Status Display:
The red triangle in the upper left corner of the status display indicates this is a Fully Asynchronous instruction.
The gray triangle at the right end of the input leg indicates the input is edge-triggered, meaning this instruction will execute each time the input logic transitions from OFF to ON.
|
|
See Also:DNSLOOKUP - Name to IP Address
PING - Ping Ethernet Device
|
|
Related Topics
|
|
Example Using Stages:
Rung Example:
|
|