Heartbeats in ladder programs

sparkie

Lifetime Supporting Member
Join Date
Nov 2014
Location
KS
Posts
1,148
I noticed on most of the online PLC's in our plant there is a heartbeat, which is basically a MSG instruction that is sent at a timed interval and then returned by another PLC.

My question is what is the purpose of this on SLC/MLX family of controllers?

Do modern CLX controllers need this logic as well?
 
For the SLC/MicroLogix you use the MSG instruction to exchange data. So this is why the MSG instruction is also used for a Heartbeat to monitor for communications loss.

For the ControlLogix/CompactLogix you can use the MSG instruction or Produce/Consume to exchange data. So you have a choice as to which method you can use for a Heartbeat.

If using Produce/Consume then you can add a tag of data type Connection Status to the beginning of a User Defined Type (UDT) that will be exchanged with the other controller. This data type provides two BOOL tags, "RunMode" and "ConnectionFaulted". You can then use this status data in both controllers to monitor if the connection is healthy.

Regards,
George
 
Thanks for the information so far. So basically I'm thinking something like this for SLC/MLX:

PLC 1 sends a MSG to PLC 2 every 3 seconds that sets a bit A.
PLC 2 has a timer for 10 seconds. Bit A sets the timer enable logic to false.
If the timer reaches its accumulated value than there is a lost packet. Counter A increments.
If counter A reaches its increment value, a com error bit is set.
Once a MSG instruction is received again the timer energizes again and the counter is reset along with the com error bit.

As far as the produce/consume model what AB document is it in? I have not been able to find really good documentation on it, but for full disclosure I have not read the full CLX instruction set manual yet, only parts as I needed them.
 
Here is a thread from not too long ago with various examples...

"Heart Beat"

In the second linked Technote "43029" the attached example "HEARTBEAT_1.RSS" contains a similar Counter method to your own proposal.

If you cannot access any TechConnect articles in the above then let us know.

For the Produce/Consume model here is the Programming Manual...

Logix 5000 Produced and Consumed Tags

Regards,
George
 

Similar Topics

my ccw softwer stops working when i add and try to open a ladder program.
Replies
0
Views
89
Hello, I am going over some old code from days gone by. I would like the expert to confirm my findings to see if I got it correct. 1. B64:22/3...
Replies
7
Views
505
Hello, I´m having a problem trying to program in Ladder. An output should be trigged by two possible contacts. Take a look on the printscreen...
Replies
5
Views
204
I got my PanelView Plus 7 working with a Micrologix 1500. How would I connect my laptop to the PanelView to view the ladder logic while operating...
Replies
6
Views
212
please help me . I have to make this ladder diagram and I can’t figure it out :(
Replies
12
Views
440
Back
Top Bottom