Comms Good / Heart Beat Logic

Tim Ganz

Member
Join Date
Dec 2010
Location
Dallas, Texas
Posts
689
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 runnignfrom a compact logix plc and the built in comms fault is disabled because the drive faults on startup due to the fact that our allen bradley 6000 switch takes longer than that to start up and start talking.

We are giving a speed command to the drive over ethernet and I was thinking maybe I could use the speed feedback coming into the plc to somehow do a heartbeat between the plc and drive like if the drive is running and the speed has not changed in so many seconds then alarm?

I have never done anything like this so I am at a loss on how to code it correctly. Does anyone have a example they could maybe post?
 
Are you using produced consumed tags? If so add a counter to them.

PLC 1 value of 2
PLC 2 adds 1 to the value of 2 and sends it back to plc1
PLC 1 adds 1 to the value of 3 and sends it back to plc1
etc.
if the value doesn't change than you have lost comms. You can also us a GSV to check and see it the device is still online. There a few examples on this site. Look for Ethernet GSV
 
The boss here does not like us to use produce consume but he wants to use message instruction.

Using the add method how fast should I add and send back? What is a good general number for commms checks like this?

Also I would think that adding on each end that number would get pretty big pretty fast so how would you handle that?
 
Let's address these issues separately.

If the drive is an I/O module connection, that's easy: use the GSV method shown in the manual that dmargineau linked to.

If you are using MSG instructions between the logic controllers, the fact that the MSG instruction's /DN bit goes true will tell you that the remote controller has accepted the message and is therefore operational.

Describe what sort of data is communicated between the ControlLogix and the CompactLogix.
 
I don't agree with that but he is the boss. I would ask him why. I would start with a I would like to understand why you don't want us to use Produce consume. I am not trying to challenge you I just want to understand and learn something.

He may have a good reason and I would like to know as well maybe he knows something we don't.

The comms check will be process dependent. Is it a temperature loop that only updates every 30 minutes or a high speed web handling system that runs at 3000 fpm.

just look at the tag value and see if it changes. you don't care if the last one was 32767 and the next one is 0 the number is different. DO you need cyclic information exchange or does matter
 
He said it is beacuse each produce consume uses 1 connection and many times multiple produce consume sets can use too many connections that don't release and cause other comms issues. I don't have a complete understanding of that but that was his answer.

The data between the 2 controllers will be line speed to a winder. Compact logix is in the winder with the yaskawa drive

Can I use speed feedback to do a heatrtbeat of the dirve to compactlogix or is there a better method?
 
The GSV to the Module Object is the method you should use to monitor the connection between the CompactLogix and the AC Drive.

In my opinion, the reserved communications resources used by Produced/Consumed Tags are more predictable and stable than using MSG instructions.

How are you communicating between the CompactLogix and the ControlLogix now ?
 
If you send an array that solves the connection problem.

Anything that changes would work. Which plc is issuing the speed command? You want to make sure that the speed regulation has a small amount of change just in case you have the line speed at 1000 fpm and the drive runs at 1000 fpm. I would add a small amount to the value every so often just to see a change. That is amount would be depending on the PLI of the product and if it could handle that variation in the tension.
 
I like the incrementing value and let it go as fast as it can unless you are concerned about overhead timeslice, so have a timer in there you can set to limit the frequency.

I'd use a DINT each way, one CPU sees them equal and increments HisPulse, the other sees them unequal, stores the difference, and makes them HerPulse=HisPulse. If the difference is not equal to one, then you missed at least one pulse...might not be important...might come in handy...

When you zero out the timer and all is well you can see by the rate of change how good your comms are as a baseline, then slow it down to suit the application. You can put messages in both controllers, or either, but the guys are right about Produced/Consumed being superior...you can then just give it an RPI and be sure of it.
 
I like the incrementing value and let it go as fast as it can unless you are concerned about overhead timeslice, so have a timer in there you can set to limit the frequency.

I'd use a DINT each way, one CPU sees them equal and increments HisPulse, the other sees them unequal, stores the difference, and makes them HerPulse=HisPulse. If the difference is not equal to one, then you missed at least one pulse...might not be important...might come in handy...

When you zero out the timer and all is well you can see by the rate of change how good your comms are as a baseline, then slow it down to suit the application. You can put messages in both controllers, or either, but the guys are right about Produced/Consumed being superior...you can then just give it an RPI and be sure of it.

Similar method, I always use a HeartBeat pulse, usually 5 seconds ON, 5 seconds OFF and messaged to other PLC.
Other PLC has two timers , one for HeartBeat pulse ON and other for HeartBeat OFF. If either timer times out with 10 second preset, assume other PLC is offline or in program mode.
 
The way I've done a heart beat in the past is setup a periodic task set for 1000mS and in the routine have a XIC and OTE with the same tag name (heartbeat_pulse) to give me my 1 sec pulse and then just send that in a produce/consume UDT I already have for other data I want to send, then in the consuming controller have 2 rungs one with XIO one with XIC (heartbeat_pulse) and one timer per rung and setup a watchdog of 5000mS in the timers and use the .DN bits to flag up a comms drop out.
 
I always create a counter in the PLC that I wish to read. That counter increases every scan and once it hits a high value (9999) it resets itself. In the local PLC I compare the current read value to a previous scan read value. If they are the same for a period of time (3 sec of example) I issue a comm alarm.

This method works cross-platform, I picked it up when I was doing GE Fanuc stuff, and carried though the PLC5/SLC/Logix just because it is simple and a habit.

I use MSG instructions more often then Produced/Consumed mainly because MSG instructions can be changed "online" where as Produced/Consumed require a PLC download (However, I have not used this in a while, if a new firmware changed this I'd be interested). I also always message an array of words, plenty of spare and no need to add more MSG instructions to grab different data.
 
Paully's5.0 I always make plenty of extras in a produced consumed setup. Arrays of DINT to handle my BOOL. array of reals as well.
 

Similar Topics

I am working on setting up a Prosoft Datalogger model PLX51-DLplus-232. This unit will be collecting data from a SLC 5/05 on the DB9 port set to...
Replies
3
Views
103
Hello, can someone share/explain How to check comms between PC and PLC via TeamViewer? TIA
Replies
14
Views
389
Has anyone setup communications with Red Lion 3.0 MODBUS to Baker Hughes Centrilift GCS VFD? Thanks
Replies
0
Views
89
Hi , Looking for some help. We have a 343-1 PN Lean Card & 315-2DP connected to an external system collecting data. After a recent shutdown...
Replies
0
Views
65
I have been trying to add a button to an HMI Panelview version 5.1 for a couple days. Each time I download I get no data in my buttons, only...
Replies
0
Views
206
Back
Top Bottom