How to avoid values when connection to the PLC is lost

Hi,
I have lot of tags with connection issue we cant fix it in the field.
I want that when the connection is lost the Historical Data and wouldn’t save the zero value.

I think this ties back to how your opc server tags the connection issue. OPC has quite a few different quality codes for devices that lose communication.Not sure if this is changeable in your OPC server, or if you are using the Ignition drivers if that is something that is changeable. I do know that the opc servers that I work with use a code that is called “unknown, hold last value”, or something to that effect, which keeps the last known good value in the tag.

Thanks for replay.
So my new question is how do i hold last value while my Quality is Bad?

Thanks!

Try using a second tag of the same type, but as a memory tag. In the source tag, monitor with a value change event and write to the 2nd tag when quality is good.

Hello, I just wanted to add my opinion (And it may not be relevant for your application)!

I too started out wanting my tags to hold the value if I lost communication, but once I had the system
running in the Real World and other user became involved, we found out this was misleading.

If communication is lost I have a set value “Displayed” and all of my user know that value, so example: a float value of 99.99 means lost communication and any other value is actually a good reading.

Just something to think about.

If it’s for historical data, you could solve the issue when displaying too. There’s a separate table that holds timestamps for when tags go stale. You can use those timestamps to get the last value to display.

1 Like