Alarm on (modbus TCP) device status

Hi all,

does anyone have advice on what the best way would be to generate an alarm when a device is disconnected? Specifically in this case I'm monitoring Modbus TCP devices.

I tried generating an alarm when the status (from the device system tag) is different from "Connected", but I notice even when I unplug the ethernet cable it switches constantly between "Connected" and "Disconnected".
image

This results in a endless stream of alarms as long as the device is disconnected:

Seems like it would be a very common thing to do but I can't seem to find a conclusive answer on the forums or in the documentation.

I would use an expression tag that checks the quality of one of the subscribed tags. Alarm on bad quality after a short delay.

It's common to also use such a tag, if configured to be true on good quality, to be the control for a driven tag group, to which all other tags in that device are assigned. (With the driven group's "slow" pace set to zero--disabled.) This will greatly reduce log spam.

1 Like

Thanks for the insights Phil, I'll probably implement it this way.

I was hoping there would be a more "standard" way to handle this, it would seem like something that would benefit practically every project. I'd find it odd that we have to identify a subscribed tag to be used as a connection check for every type of device.

It seems to me that either this system tag, or the diagnostics tags on the Ignition OPC UA server were meant for this. I must be doing something wrong here.

These are the device status system tag and 3 device diagnostic tags from the OPC server, all for the same Modbus TCP device, the cable is unplugged at all times during this clip:
VirtualBoxVM_2POQ73EJ1O

Any idea what could be going wrong here?

When there is a problem, the driver tries to reconnect, regularly. If it happens only occasionally, Ignition will "ride through" the brief breakage. But gives the wrong result for your case, where the breakage isn't going away.