Heartbeat attempt

Rmiller

Member
Join Date
Dec 2002
Location
Vancouver, Washington
Posts
25
Heartbeat attempt Post #1

I am trying to setup a simple way, with as little ladder logic as possible, to determine when there is a radio communication failure at any one of our 50 remote pump stations. After playing around on the bench I came up with the following ladder logic.

As I am not a professional programmer I was wanting to run this by someone to see if there is any flaws that I am overlooking or if someone has done this before and has a better way.

In the slave X0-X37, Y0-Y37 and V2000-V2007 are all moved to V1400-V1413 so the master reads 12 consecutive word and in the following example they are loaded into the master starting at V2400.

This example would have to be repeated for each station for a total of 50 times.



Master plc AD260

B2402.15
--|/|--------------------------|T0|

T0
--||---------------------------(C0 turns on comm fail alarm)

SP4 special relay
On for .5 sec off for .5 sec
--||---------------------------(RST B2402.15)


This next rung is in the Slave plc AD06

SP1 (special relay always on)
---||--------------------------(Y17 Becomes B2402.15 in the master)

 
I normally setup master to invert heartbeat on every message
(messages are transfered periodically for example every second).

Read_Hearbeat Write_Heartbeat
----|/|----------------------------( )



Remote nodes just pass the heartbit back to master.

Read_Hearbeat Write_Heartbeat
----| |----------------------------( )



You should check for timeout both on High and Low of the
heartbeat.



Read_Hearbeat Stuck_Low
----|/|----------------------------(T1)

Read_Hearbeat Stuck_High
----| |----------------------------(T2)

T1 Comm_Timeout
----| |----------------------+-----( )
|
T2 |
----| |----------------------+
|
Comm_Timeout Alarm_Reset |
----| |---------|/|----------+




You might also check if transfered data is valid.
But that's another story...
 
You need to add [/ladder] AFTER your ladder code. Like this:

[ladder]
Master plc AD260

B2402.15
--|/|--------------------------|T0|

T0
--||---------------------------(C0 turns on comm fail alarm)

SP4 special relay
On for .5 sec off for .5 sec
--||---------------------------(RST B2402.15)


This next rung is in the Slave plc AD06

SP1 (special relay always on)
---||--------------------------(Y17 Becomes B2402.15 in the master)

[/ladder]

There are many ways to accomplish this task. What you have looks like it would work fine... (y)

You can probably experiment with the preset of T0. I think you'd want a setting just high enough to prevent false triggering of C0.

Note that, if turned on, C0 will reset once comms return (when bit 15 of V2402 turns back on). You might WANT this action, but if not, you might consider adding a latch to that bit... :confused:

| RESET
| COMM.
| T0 ERROR
|----] [---+---]/[----------( C0 )
| |
| C0 |
|----] [---+



beerchug

-Eric
 
Heartbeat

Panic mode
I'm not sure what you mean but the radio communication takes about 8 sec. to poll 27 sites as it stands now. I will probably just stay with the simple setup for now unless something happens to force an improvement.

Eric
Thanks for the help with posting ladder logic as I struggled with this a bit. For the T0 timeout I was thinking about 5 to 10 minutes as this would be more than adequate for most sites.

As far as latching, the HMI software (National Instruments lookout) will latch and record the alarm.

Thanks for the advice it really helps.
 
Hi Rmiller,

I never used radio communication but that is just the media,
wireless is just media like fiber, copper cable or whatever
connection type you choose. Principles are still the same.
You setup message and fire it off periodically (period being
8mS or 8sec or 8 years, it is not important, we are talking
about concept). If you read my post, you will notice that
one second was just an example. It's because some people get
carried away with "optimizing" network connection by
triggering messages on almost every other scan before
they make project work. Typically that only kills the network,
it is better to start with common sense values and then
squeeze it more if needed(!).

And it makes no difference if you are talking to 2, 7 or 27 nodes.
You always have at least two nodes that talk to each other and
that's what I was mentioning. If you get all 27 nodes to respond
withing 8 seconds, that's pretty fast and I would like to know
what radio modems you use. What type of error checking is in place?

You should check for heartbeat to see if connection is still
alive and that's what you already do. One thing to note is
that heartbeat can stay at either heigh or low at the moment
connection is lost (try it out...). So you DO have to check
for both high and low states to identify connection timeout.
In your program timer would never timeout if the bit B2402.15 is
high and stays high - and generally that is wrong (not exactly
type of comm alarm I would want to rely on).

I hope this helps more than last post :cool:
 
Last edited:
I don't know how critical your process it Rmiller, but you may want to investigate doing what Panic suggested. Handshaking between the master and slaves is a much better approach because you can identify a comm. failure at BOTH ends... :nodi:

You can just put the timeout check in both PLCs. This way the slaves can know when the master is no longer polling them. What action to take when this happens is up to you.

beerchug

-Eric
 

Similar Topics

Hi everyone, I have a task at work that I'm hoping someone will be able to help me find a solution for. Here is the background info: I have a...
Replies
10
Views
416
Hi everyone I've created an FC that includes the blocks TCON, TDISCON, TSEND and TRCV. This block has to be as generic as possible across...
Replies
15
Views
1,512
In studio 5000 is there an easy way to do a Heartbeat between two Control Logix PLCs? Say you have Produced and Consumed from both is there even a...
Replies
8
Views
1,219
Hi all, I have an application where there is a Control Logix PLC connecting to a B&R remote I/O station over Modbus TCP via a prosoft MNETC...
Replies
5
Views
1,909
Good Morning! I need to monitor ethernet comms, between 2 Compact Logix PLC's. I have done this before with a simple pair of timers, toggling a...
Replies
7
Views
1,602
Back
Top Bottom