We have multiple PLCs connected to RTU and each PLC gives DINT life word to RTU. This life word keeps incrementing at every scan. 

 Function block in RTU has to set a bit to TRUE (or even False is fine !) When life word stops incrementing.

We compared the life word value of current scan and one scan before and set a bit true if both values are same. But customer is asking us to set the bit to true by comparing present value with 5sec old value. 

Can someone help me with the sample code in STRUCTURED TEXT ? 

Standard function blocks like CTU, TON etc are available. 
Quote 0 0
This forum is intended for OpenPLC related questions only, not for generic PLC programming issues. You should use other forums (like MrPLC and plcs.net) for that.
Quote 0 0
updating the watchdog in every scan? why not use periodic interrupt say increment every second, compare every second.. a five failed compares is a five seconds of communication down then do something.
Quote 0 0