Heart beat signal

James Mcquade

Member
Join Date
Oct 2007
Location
Nashville, Tennessee area
Posts
3,663
Hi all,

i have a situation at work in which i am needing to send a message from a logix 5000 to a slc 5/05. i have an example of this at work. my concern is how do i confirm everything is working. how would one set up a heartbeat signal between these two systems? we did this at my previous plant, but i did not write the code.

thanks in advance,
james
 
I've done this with two MicroLogix 1400 processors, I'll try and track down the program and post it for you. Might be able to reconfigure it to work across the two processor types.
 
My preference has always been for the sending PLC to increment a number ever scan. The receiving PLC reads this number as part of the data transfer and checks that it is changing. If the number stops changing, there is a comms failure or the sending PLC is no longer in run mode. If this happens, clear all of the data since it is stale.
 
Found it, as I said, this is for two ML1400 processors over serial, but you could change it to be Ethernet/IP if you want. It may be easier to do in the Logix processor, not sure. I bench tested this extensively and it worked for us every time.
 
My preference has always been for the sending PLC to increment a number ever scan. The receiving PLC reads this number as part of the data transfer and checks that it is changing. If the number stops changing, there is a comms failure or the sending PLC is no longer in run mode. If this happens, clear all of the data since it is stale.

I like this method. We usually use a self-resetting timer and use the ACC value. The receiving PLC just makes sure the value is changing.
 
#1 for the timer, have done it both ways so both know if two way traffic, including incrementing a word each way then checking the last status i.e. in each PLC store current count, increment, check current count if not different etc. etc.
 
My preference has always been for the sending PLC to increment a number ever scan. The receiving PLC reads this number as part of the data transfer and checks that it is changing. If the number stops changing, there is a comms failure or the sending PLC is no longer in run mode. If this happens, clear all of the data since it is stale.

This has the advantage of working with two ways of checking heartbeats. IF the other system is looking for a pulsing bit, they can just look at the LSB of the counter being sent.

I don't think it's the case in Rockwell (though I'm sure I'll be corrected), but some processors communication instructions (namely Siemens GET and PUT) will work regardless of the PLC being in run mode or not. The rolling counter addresses this shortcoming.
 
My preferred, and very simple arrangement, for a "heart-beat" monitor between PLCs is to use two bits in each PLC that will automatically toggle at the comms rate. The bits can be in integers that are messaged between the two PLCs

In PLC1 : XIC PLC2_Heartbeat_In OTE PLC1_Heartbeat_Out

In PLC2 : XIO PLC1_Heartbeat_In OTE PLC2_Heartbeat_Out


The single inversion in PLC2 means that this will keep toggling as long as good communications is taking place.

Just an alarm timer in each PLC, reset on the rising edge (ONS) of the XXX_Heartbeat_In (or Out) is all that is needed to flag up a comms problem.
 
When you think about this application it becomes more and more annoying that the PLC manufacturers don't have an inbuilt health status between networked PLC's in the config options.

All it needs is a tab that allows you to put the IP/ID of the other PLC and a check box to say "give me health status of this PLC" the tag a variable against it, would be so simple to include as a default but I have never seen it.

How crazy is it that in this day and age you have to roll your own code to check something is on the network and communicating ?
 
We had a bit in each plc, plc A tried setting the bits to 1, PLC B tried setting them to 0, if the bit didnt change within a specified time then we had a communication fault. of course we were using produced and consumed tho. iirc theres a message sent bit or something that checks if it got to where it needs to go. its been a bit.
 
....
I don't think it's the case in Rockwell (though I'm sure I'll be corrected), but some processors communication instructions (namely Siemens GET and PUT) will work regardless of the PLC being in run mode or not. The rolling counter addresses this shortcoming.

Definitely not for messaging, the PLCs need to be in RUN or Remote RUN.

In Logix5000 controllers you can exchange data using Produced/Consumed tags, and these WILL continue to be exchanged if the processor is in a PROG mode. The produced/consumed tags effectively join in the I/O exchange ...
 
We had a bit in each plc, plc A tried setting the bits to 1, PLC B tried setting them to 0, if the bit didnt change within a specified time then we had a communication fault. of course we were using produced and consumed tho. iirc theres a message sent bit or something that checks if it got to where it needs to go. its been a bit.

On produced/consumed data, you can encapsulate your data into UDTs, the first member of which can be "Connection_Status" of data-type CONNECTION_STATUS.

Connection_Status consists of 2 bits, monitor these in any Consumer connection, and they tell you all you need to know about the producer's health.

"RunMode" (On = True)
"ConnectionFaulted" (On = True)

It's all in the Help ....
 
I had each slave PLC move the clock time value for seconds into a register in the read data. If the master saw the same value in that register after three data reads it would trip an alarm.
 
Definitely not for messaging, the PLCs need to be in RUN or Remote RUN.

In Logix5000 controllers you can exchange data using Produced/Consumed tags, and these WILL continue to be exchanged if the processor is in a PROG mode. The produced/consumed tags effectively join in the I/O exchange ...

This is interesting, I wouldn't have thought this to be the case on Produced/Consumed. I was thinking of instructions that you program to read from another PLC's memory where the PLC being read doesn't have to have a function being called by the user program to allow it, but it's good to know. :)

Cheers for the clarification.
 

Similar Topics

Hi Guys, I have two Allen-Bradley systems here 1) 1769-L30ERMS 2)1768-L43S These both are safety plcs and its working at the moment. There are...
Replies
1
Views
1,480
I need to program a heart beat between a compact logix and a SLC 5/05 on one line and between 2 compact logix on another line. On the compact to...
Replies
1
Views
6,639
To All, Please help, I am new to Rockwell automation and normally use Siemens, I am trying to finish up a program and now need to use a "Heart...
Replies
9
Views
18,078
I am i need of some sample logic for a comms good / heatbeat between a compact logix plc and a contrologix plc. I also have a yaskawa drive...
Replies
25
Views
16,394
We have a new upgrade going on. We've replaced our existing resolvers with KUBLER encoders connected to CompactLogix 1769 HSC cards. We are not...
Replies
1
Views
2,929
Back
Top Bottom