general practice for setting up a heartbeat

Simple method for heartbeat, no timers needed for generation, cannot get "in sync".


In one PLC ....
XIC heartbeat_in OTE heartbeat_out


In the other ....
XIO heartbeat_in OTE heartbeat_out


... it sets up a "round-robin" that will always be toggling on and off.



Simply monitor any bit in both PLCs for "stuck" high or low for a period.


works like magic...

But I think you still need a timer to detect a loss of comms unless you only want to monitor the bits manually. If you want to automate some action based on loss of comms, then you need a timer.
 
I run a 10 sec timer in PLC#1 and monitor the register for the elapsed time on the timer from PLC#2. Then at 5 seconds, I reset the count to 0 from PLC#2. Just reverse for both ways.
 
Last edited:
I use the process in the image. This is in a MicroLogix 1100. N9:0 defaults to "0" making bit N9:0/0 logic low starting the timer. There is an SLC5/05 writing a "1" to N9:0 every 500mS changing N9:0/0 to logic high disabling the timer and then in rung 1 it unlatches itself re-enabling the timer. If N9:0 does not receive a "1" within 1500mS the timer goes done and the alarm bit is set.

ML1100_HRTBT001.jpg
 
rscott9399 said:
This will be back and forth between an L33 and an ML1400

native messaging

I posted this information some time back...

Heart Beat

One of the first two technotes, if you can access them, should provide you examples of creating a Heartbeat between any two controllers (Logix 500/5000) that support messaging (MSG).

The third technote is specific to creating a Heartbeat between Logix 5000 controllers using the Produce/Consume model.

Regards,
George
 
Yeah, you're gonna need a timer.

In daba's defense, the full quote is "Simple method for heartbeat, no timers needed for generation, cannot get "in sync"."

My emphasis.

As noted, still need a timer or counter to do anything useful with the information.
 
It's "time" we clear this up...

Mispeld said:
...still need a timer or counter to do anything useful with the information.

If I may go one step further in daba's defence, not that he needs it (he's big & ugly enough himself)...
daba said:
...Simply monitor any bit in both PLCs for "stuck" high or low for a period...

This screams to me - use a watchdog timer, in both PLCs if required, for a sufficient period to monitor the bit addresses for a static status. If static and watchdog timer expires, flag a comms loss condition.

The "no timers for generation" statement also screams as you have suggested, Mispeld.

So in short, and by my reading - no timers at front end; yes timers at back end.

G.
 
Hi Steve,

That often rings true, but I "think" in this scenario though it's more a case of some members having simply misread daba's meaning and politely remarking that they think a timer is still needed to flag the comms loss, moreso than trying to discredit his option. That's how it reads to me and that's why I've attempted to clarify the situation for them in daba's defence (that he has outlined such use of a timer). Again, not that he really needs me to do that for him.

G.
 
The number of subsequent posts piling onto Daba's method is proof of the truism that "no good deed goes unpunished".

I wasn't piling on and I sure don't think anyone else was. I didn't agree with his post, you will need some kind of timer or counter to complete the process. Without it, his solution is basically useless.
 
daba did not mean no timers, at all...

Phrog30 said:
...I didn't agree with his post, you will need some kind of timer or counter to complete the process. Without it, his solution is basically useless.

daba said:
Simple method for heartbeat, no timers needed for generation, cannot get "in sync"...

All daba is saying is that this method does not require timers to generate the logic that will toggle over and back between the 2 PLCs. He is not saying that no timers are required at all for the entire Heartbeat option...

daba said:
...Simply monitor any bit in both PLCs for "stuck" high or low for a period...

How do we usually monitor something for a period in a PLC? - A timer.

So this option is not "without" mention of using something to monitor the status of the toggling bits, such as a timer, so as to "complete the process" i.e. flag a comms loss condition. He is saying exactly what you are saying he has not said, by my reading of it.

Can you derive the same meaning as I am from the quoted statements?
If so, would you now agree with his post, if what I am saying is correct?

Besides attempting to decipher daba's concise option, which to be honest reads quite clearly to me, it is a tried and tested method. He did not just dream it up when he read the thread. He has successfully used it many times over, I would be sure. Hence the statement...

daba said:
...works like magic...

That does not mean just in his head and untested the other day as if he had never considered creating Heartbeat logic before he read this thread. It of course also does not mean it is magic. It means it has worked in practice, many times. Again, if my reading of his meaning is correct.

daba's option by my reckoning...

Continuously execute Bit_A TRUE in PLC_1 by Bit_B from PLC_2 that is being continuously executed TRUE by Bit_A from PLC_1 - this results in a "round robin" or "toggle" effect. No timers or counters are required here. The healthy communications will keep them toggling over and back.

Then, in each PLC, monitor the Bits that are being executed TRUE, say with a relatively short delay timer, and if timed out, flag the comms loss condition.

Again, I'll simplify it - daba's option suggests no timers required at the front end; but yes timers or "something" monitoring at the back end.

Far from useless, in my opinion.

G.
 
Here is the code I use....

Picture 1 : Code in one PLC
Picture 2 : Code in the other

Notice the subtle differences in the states of the bits

2018-11-25_172447.jpg 2018-11-25_172403.jpg
 
Last edited:

Similar Topics

Hi guys, Doing a conversion from PLC5 to Controllogix, and so far it's going smoothly. The programs are fairly simple, the errors are minimal...
Replies
2
Views
2,199
What is your perspective? Are you a Maintenance Tech? Systems Integrator? OEM Engineer? What are your thoughts on the topic of source...
Replies
24
Views
1,073
Wizards, It has been a few, but you all have always done me well. I have acquired a 1769-L33ER and want to use it as my collection PLC to...
Replies
5
Views
465
Hi! I recently discovered how to get to configuration mode and disable printing for connecting to PanelBuilder32 and updating my Panelview...
Replies
1
Views
438
Hello Guys, Hope everyone is doing well. I have a general doubt about ladder programming. The outputs are not getting energized when I used the...
Replies
13
Views
1,825
Back
Top Bottom