View Full Version : CANOpen Config Heartbeat Issue

08-16-2016, 10:45 AM
I'm trying to track down a random communication issue between our CR0401 controller and CR0451 display. I just now getting into the CANOpen portion of this project, and am concerned that this was not set up properly by the original creator.

401 Controller Config


ID:= 200,
DATA=> ,

HeartBeatTon(IN:= HeartBeatRx.RESULT <> 1, PT:= t#3000ms, Q=> xCommError, ET=> );

451 Display Config


ID:= 200,
DATA:= EmptyHeatbeatArray ,

HeartBeatErrorTon(IN:= HeartBeatTx.RESULT <> 1, PT:= t#3000ms, Q=> xCommError, ET=> );

Essentially what I see happening is that there is timer configured that after 3000ms of a failed heartbeat will flag the xCommError variable. Once this happens, the display\controller is inoperable. In most instances a restart of the display\controller will clear this, but I have had instances where it will not and the only workaround up to this point has been to reload the projects.

I've been reading through other posts and keep coming across discussions regarding checking\unchecking the Reset Node option along with heartbeat settings and heartbeat consumer. Is this the path I should go down, or am I looking in the wrong place all together?

Erik Gerrits
08-19-2016, 12:06 PM
You have a lot of different things going on here.

The transmit and receive blocks are not CANopen heartbeats, this is just something someone setup.

The items in the PLC configuration is CANopen side of things.

Looks like a confusing setup.

08-19-2016, 12:39 PM
Thanks Erik

Confusing is an understatement. Would I be better of removing the CANOpen config and switching this back to a Layer 2 template? I'd like to get these configs cleaned up, and it appears that when these were initially created the developer was unsure of the route to go and has a lot of unnecessary things in the project.

Or do have a better recommendation to monitor the communication between the display and controller?

Best regards

Erik Gerrits
08-19-2016, 01:07 PM
You will still need the CANopen for the CR2032 IO module. Currently its not setup with Heartbeat, which is wrong. If you loose comms with this and the outputs are ON, they will continue to be ON. Make it a heartbeat consumer, and producer 500 ms.

You could make the CR0401 into a slave, there is an EDS file.

08-19-2016, 01:48 PM
The CR2032 module is not being used - I am guessing that it was setup during the initial project creation for testing purposes and was then left in there once completed.

Erik Gerrits
08-19-2016, 01:55 PM
Set it all to Layer 2, keep it simple then.

You can monitor the messages by looking at the RESULT from your receive blocks. If you RESULT<> 1 for 3 seconds or something like that you know you have an issue.