ICMP - Internet Control Message Protocol

See also: Ethernet Configuration Overview

Note: This is a Non-Industrial Ethernet Protocol.

ICMP is used for diagnostic purposes only, to determine if another device exists on the Ethernet network. Using ICMP, the OCS sends Ping Echo Requests to another device and expects the other device to answer with Ping Echo Responses. The OCS measures the round-trip time of each Ping Echo Request / Response exchange and puts the result (in milliseconds) into an OCS register. In addition, when the OCS receives a Ping Echo Request from another device, it answers with a Ping Echo Response.

Note: Although ICMP supports other network diagnostics, the OCS only supports Ping.

ICMP Configuration

If ICMP protocol will be used in the application, then ICMP Configuration must be performed, in addition to the general Ethernet LAN1 Configuration previously described. See also: Ethernet Configuration Overview. To configure ICMP protocol, use Cscape Programming Software to perform the following five steps:

  1. Open the Ethernet LAN1 Configuration dialog by selecting Home > Controller > Hardware Configuration (select a series and device type) >LAN1/Config.

  2. Enable ICMP by checking the ICMP (PingClosed A network diagnostic tool used primarily to test the connectivity between two nodes or devices. To ping a destination node, an Internet Control Message Protocol (ICMP) echo request packet is sent to that node. If a connection is available, the destination node responds with an echo reply. Ping calculates the round-trip time of the data packet's route from its source to the destination and back and determines whether any packets were lost during the trip.) checkbox in the LAN1 Configuration dialog.

  3. Click on the Configure Selected Protocol button next to the ICMP (Ping) checkbox to open the ICMP Configuration dialog. Refer to figure below.

  4. Set up the ICMP Configuration parameters as follows:

    ICMP Configuration Parameters
    PingClosed A network diagnostic tool used primarily to test the connectivity between two nodes or devices. To ping a destination node, an Internet Control Message Protocol (ICMP) echo request packet is sent to that node. If a connection is available, the destination node responds with an echo reply. Ping calculates the round-trip time of the data packet's route from its source to the destination and back and determines whether any packets were lost during the trip. IP Reg

    Enter an OCS Register reference (such as %R200) to indicate which 32-bit OCS register will be read to obtain the IP Address of the network device to send Ping Echo Requests to.

    Ping Time Reg

    Enter an OCS Register reference (such as %R202) to indicate which 32-bit DINTClosed Double Integer - [Data Type DINT] - A 32-bit signed value. Double Integers are used where the value of the data is expected to be in the range of -2,147,483,648 to +2,147,483,647. OCS register will be written with the Ping Echo Request/Response round-trip time (in milliseconds). If no response is received within the Ping Timeout interval, a Ping Time of -1 is reported, indicated a timeout.

    Ping Timeout

    Enter a number between 100 and 100,000 for how often (in milliseconds) the OCS should send Ping Echo Requests. If the response takes longer than this amount of time, it is considered a timeout.

  5. Click OK to accept the new ICMP Configuration.

ICMP Operation

To start Ping Echo Requests, use Ladder Code, User Screens, or Cscape Data Watch to write an IP Address to the OCS register indicated by Ping IP Reg. To check the resulting Ping Echo Response times, read the OCS register indicated by Ping Time Reg. If the round-trip time exceeds the configured Ping Timeout (or if there is no response at all), the reported response time will be -1. To stop Ping Echo Requests, write 0.0.0.0 to the OCS register indicated by Ping IP Reg.

Note: ICMP protocol is active even when the OCS is not in RUN mode. Therefore, when the OCS is not in RUN mode, User Screens and Cscape Data Watch can still be used to control and monitor ICMP Pinging.

Return to the Top: ICMP - Internet Control Message Protocol