FAQ: How can I monitor and react on the communication status of my devices with zenon?

FAQ: How can I monitor and react on the communication status of my devices with zenon?

Data quality is very important to the integrity of a HMI or SCADA system. As such, zenon has numerous ways to monitor the communication status of different devices within your automation environment. Here are some options that you can use in your zenon projects.

The INVALID Bit (aka I-bit)
Every zenon variable, regardless of the driver or PLC, implements 64 status bits maintained by zenon, directly out-of-the-box. These status bits represent various states that the variable can be in. For example, when there is a communication problem from zenon to the PLC, IED, or RTU, all affected variables will automatically have the INVALID bit set true. This is easily recognizable because a small red-square will be displayed on any dynamic elements when the linked variable falls into the INVALID state.



Aside from the red-square, you can also react on the INVALID bit in other ways as well. Say for example you wish to create a communication failure alarm when there is a connection problem to the PLC. In this case you could:
  1. Create a new Reaction Matrix (Binary, Numeric, String)
  2. Create a new state in the Reaction Matrix that applies when INVALID = 1 (true)
  3. Set a limit text on the state e.g. Communication Failure.
  4. Activate as alarm with appropriate alarm options
  5. Find a variable of a specific driver & connection, that you would always expect to be online
  6. Link the new Reaction Matrix in the Variable Properties -> Limits -> Reaction Matrix
The result in Service Engine mode is - if the connection or communication with the device fails, zenon will automatically set the INVALID bit for variables affected. Since one of the affected variables has a Reaction Matrix linked, the Reaction Matrix is capable of generating an alarm when the INVALID bit is true.  If the communication returns at some point, that alarm will be automatically cleared, and the red square will disappear from your dynamic elements.
You can also react visually on a zenon screen for the status INVALID, by using the combined element.

zenon SNMP Driver & Ping Tests
zenon offers a driver for SNMP (simple network management protocol) version 1, version 2 and version 3. The most common usage of the SNMP driver is to obtain information from network devices such as Routers, Switches, Firewalls, Servers, and Workstations.

The zenon SNMP driver also has the unique ability to perform an ICMP Ping to a device, on a cyclic basis (e.g. every 5 seconds). ICMP Ping is supported for the majority networked devices and is a universally accepted method to test the network connectivity of a device.

To use a Ping to test for device connectivity from zenon, you can:
  1. Create and configure the SNMP driver in your project
  2. Add device connections for each device you wish to monitor
  3. Close driver configuration with OK
  4. Right click the driver, choose Import variables from Driver
  5. Select the Agent in the drop down list
  6. Click Add Ping State
  7. Click OK


At this stage, zenon will automatically create 3 Ping State variable for your device or agent. Once the variables are created they can be used freely in your project - for example, a communication overview screen, alarm generation, or a diagnostic HMI screen. Here is a short description of each Ping State variable generated by the SNMP driver import:

PINGSTATE_PingState
This is a BOOL variable with a Net Address specific for an Agent/Device configured in the SNMP driver. When the Pings are sent and received successfully by the driver in Service Engine, the PingState variable will display the value of 1. If for any reason the Ping fails, or the device does not reply to the Ping, the value will be 0. 

PINGSTATE_ErrorText
This is a STRING variable, with a Net Address specific for an Agent/Device configured in the SNMP driver. If there is an error in the Ping, the error text will be displayed in this variable.

PINGSTATE_RoundTrip Time
This is a UDINT variable, with a Net Address specific for an Agent/Device configured in the SNMP driver. The value of this variable in Service Engine displays the round trip time, in milliseconds, for the Ping.



zenon System Driver Variables
zenon also offers system information in the form of System Driver variables. The System Driver is by default included in every zenon project, and has the capability of easily bringing a variety of system related information into the zenon Service Engine in the form of variables.

Specifically, on the topic of device communication, the system driver variables can be imported and used in the project to determine the following:
  1. Current Primary Server
  2. Current Standby Server
  3. Names of connected clients
  4. Number of connected clients
  5. ...and many more.
These system driver variables can be used throughout the zenon project on screens, to generate alarms or events, recorded in the historian, etc. and many more.




































At this stage, zenon will automatically create 3 Ping State variable for your device or agent. Once the variables are created they can be used freely in your project- for example, a communication overview screen, alarm generation, or a diagnostic HMI screen. Here is a short description of each Ping State variable generated by the SNMP driver import:

PINGSTATE_PingState
This is a BOOL variable with a Net Address specific for an Agent/Device configured in the SNMP driver. When the Pings are sent and received successfully by the driver in runtime, the PingState variable will display the value of 1. If for any reason the Ping fails, or the device does not reply to the Ping, the value will be 0. 

PINGSTATE_ErrorText
This is a STRING variable, with a Net Address specific for an Agent/Device configured in the SNMP driver. If there is an error in the Ping, the error text will be displayed in this variable.

PINGSTATE_RoundTrip Time
This is a UDINT variable, with a Net Address specific for an Agent/Device configured in the SNMP driver. The value of this variable in runtime displays the round trip time, in milliseconds, for the Ping. 





















zenon System Driver Variables
zenon also offers system information in the form of System Driver variables. The System Driver is by default included in every zenon project, and has the capability of easily bringing a variety of system related information into the zenon runtime in the form of variables.

Specifically, on the topic of device communication, the system driver variables can be imported and used in the project to determine the following:
-          Current Primary Server
-          Current Standby Server
-          Names of connected clients
-          Number of connected clients
-          ... and many more

These system driver variables can be used throughout the zenon project on screens, to generate alarms or events, recorded in the historian, etc.

-          ... and many more

These system driver variables can be used throughout the zenon project on screens, to generate alarms or events, recorded in the historian, etc.