Incrementing heartbeat

gripster

Member
Join Date
Dec 2010
Location
Londinium
Posts
40
So, I get sent a heartbeat, an int that goes from 0-9 every second and then restarts, I need to detect if it stops after 3 secs. Any simple way without a bunch of comparators and timers? Using Siemens S7 5.5 in LAD
 
Move the heartbeat int into a register, and start a timer. After the timer expires compare the heartbeat int to the saved register value. If it is the same you have a communication error.
If the value is different then start the process again.

Regards,
 
So, I get sent a heartbeat, an int that goes from 0-9 every second and then restarts, I need to detect if it stops after 3 secs. Any simple way without a bunch of comparators and timers? Using Siemens S7 5.5 in LAD

You can use the heartbeat to pulse a counter. You should be able to compare the counter acc (Rockwell) and the pulse integer every scan cycle. Use a compare instruction, if there are not equal to start a timer for the allotted time.
 
You can get away with a comparison block and a timer (in AB)...

if the new counter value equals the previous counter value set a On delay timer of 3 seconds.
Move new counter value to previous counter value.

if the On Delay timer is set, an error occurred.
 
In any platform with a real time clock I've always just read the seconds register as a heartbeat. Move the seconds value to the contiguous data block in the slave containing my values read by the master. In the master compare the new value to the old value. If they are the same set an alarm or start the alarm delay timer. If they are different move the ew value to the old value, reset the alarm timer. Repeat.
 
Move the heartbeat int into a register, and start a timer. After the timer expires compare the heartbeat int to the saved register value. If it is the same you have a communication error.
If the value is different then start the process again.

Regards,
I do it similar, except I only enable the timer when the two values are equal. If the timer times out then you have a failure.
 
Gentlemen

Please allow me to plead my ignorance on this subject.

What is the purpose of the "heart beat"

To make sure the heart is beating on the other side of the communication link. Think of it as the 4mA in the analog current loop. If the heartbeat stops it's possibly two things, a communication fault for some reason like a cable cut, or the plc on the other side is in stop mode and the data being received isn't actually being updated.

Some PLC's nowadays will tell you if a node is present on a network with diagnostic functions or function returns, but very seldomly do you actually know if the CPU on the other side is running.

A good example of this is the PUT/GET instructions in the Siemens PLCs where you can PUT or GET a value from a PLC even if it is in stop mode.
 

Similar Topics

I'm sure this is an easy one for the experienced guys, how can I use an incrementing dint value to trigger a counter to count? It seems like it...
Replies
4
Views
3,175
Hello World, I am having difficulty incrementing a serial number that needs to start at 0, and go through Z. (After 9, comes A). The serial...
Replies
11
Views
1,850
Hi guys, Im about to add a new flowmeter which pulse every 0.1 cubic meter to my Micrologix 1400. I would like to increment of 0.1 everytime i...
Replies
13
Views
1,991
Good Morning, I have a sort of easy problem that is driving me nuts. I have an application where I'd like to take a set point, lets say it...
Replies
4
Views
2,279
Hey everyone, I am hoping that i can get an answer on this matter... I have a micrologix 1100 hooked up to a signal conditioner (Omrga DMD-466-DC)...
Replies
4
Views
1,580
Back
Top Bottom