The DrvICMP driver is used to "ping" other devices to ensure that contact exists over the network.
ICMP is an abbreviation for Internet Control Message Protocol and is used, among other things, to send Ping messages.
Information
This document is used in conjunction with Chapter "IO-Devices" in the Web Port manual.
For more information on the protocol, see e.g https://sv.wikipedia.org/wiki/Internet_Control_Message_Protocol
To use DrvICMP, an IO device is first created and then used to send Ping messages (see chapter IO device). To send Ping messages, tags must be associated with the IO (see chapter Tags). It is the address field in the tag list that specifies the devices to be pinged.
The driver does not have its own settings, instead these are set uniquely for each IO device created.
Installation
DrvICMP is automatically installed when the Web Port Server is installed because it is included in the base installation.
IO Device
To use DrvICMP, an IO device is created according to chapter "IO-devices" of the manual.
Inforamtion
Normally, only one IO device is needed to ping multiple devices. The reason for using several different IO devices may be, for example, that different numbers of ping attempts are desired or that the timeout time may differ between different devices.
In addition to general settings (see "general settings" in IO-devices), the following settings are available for an IO device of type DrvICMP:
| Setting: | Description: |
| Ping count | Number of ping messages sent at each ping. Standard 3. [1..10] |
| Ping timeout | Maximum time to respond to a ping message. Standard 1000 ms. [1..65535] |
| TTL | Time To Live, the maximum number of hops allowed before the packet is removed from the network. Standard 128 jumps. [1..65535] |
| Data package | Any text string sent with the ping message. |
Tags
In order to send ping messages via an IO device, tags must be created and associated with it. For more information on how to create tag lists and tags, see chapter "Tags" of the manual.
Tip!
Create a tag list for each IO device. This is to get a good structure and to easily find tags in the lists.
Tags associated with a DrvICMP IO device can have the following data types:
| Datatype: | Description: |
| DIGITAL | Set to 1 on successful ping and 0 otherwise |
| (U)INT, (U)LONG, REAL | Set to the ping time and 0 on ping failure |
Information
The address field specifies the IP address of the device to be pinged.
If name lookup is available on the network, the device name can also be used.
Tip!
If the tag is to be used as an alarm, it may be desirable for the result to be 1 on a failed ping instead of 0. This can be done by ending the address with =0. It is also possible to condition the response time by using the INT data type and then making a comparison (>,<,>=,<=,=).
Example:
| Datatype: | Address: | Description: |
| DIGITAL | 192.168.1.20=0 | Returning 1 when ping fails |
| INT | 192.168.1.20>200 | Returns 1 when response time is > 200ms |
For more information see chapter "Tag naming convention" of the Web Port manual.