CAN message received?

Discuss issues and ideas you have to configuring displays with PowerVision
drphil69
Posts: 139
Joined: Wed Mar 02, 2011 5:59 pm

CAN message received?

Post by drphil69 » Fri Mar 25, 2011 1:22 pm

Hello,

Is there any way to tell when a CAN message has been received? Other systems call it an "update pin" and I think in CANOpen there is something called a "heartbeat." I have a control system with several controllers and absolutely must know that all the other devices are online, otherwise I flash a warning on the display and shut down operations. I figure there is an easy way to do this, as the only way I came up with (in theory, not practice) is to continuously change a variable from the sending device, and look for that variable to change on the PV750. If it doesn't change every x seconds, CAN communications is lost. Seems like a tough work around though!

Thanks!
Phil
ksaenz
Enovation Controls Development
Enovation Controls Development
Posts: 263
Joined: Thu Aug 19, 2010 7:53 am

Re: CAN message received?

Post by ksaenz » Mon Mar 28, 2011 8:35 am

CAN variables initialize invalid and they also turn invalid 10 seconds after the last time they were received.
You can use a lamp gauge to show text or and image when a variable's value is invalid, just check the box "Shown when inactive".
drphil69
Posts: 139
Joined: Wed Mar 02, 2011 5:59 pm

Re: CAN message received?

Post by drphil69 » Mon Mar 28, 2011 11:01 am

Thanks ksaenz -

While that does help a little, is there any other way? With the machinery I operate, a whole lot of damage can be done in 10 seconds!! (Including explosions, death, dismemberment....).

Thanks,
Phil
ksaenz
Enovation Controls Development
Enovation Controls Development
Posts: 263
Joined: Thu Aug 19, 2010 7:53 am

Re: CAN message received?

Post by ksaenz » Mon Mar 28, 2011 3:17 pm

In that case I think a heartbeat would be a better option.
Create a state machine to show a warning after a timer of x milliseconds.
Add an "on change" event to your heartbeat variable. If you can't implement a hearbeat variable on your sending device you can pick an unused byte (always 0xFF).
The "on change" event should reset the timer. If you are using an unused byte, also change the value to something other than 0xFF, that way when it is received again it will trigger the "on change" event.
If the variable is not received before the timer expires you should see the warning.
drphil69
Posts: 139
Joined: Wed Mar 02, 2011 5:59 pm

Re: CAN message received?

Post by drphil69 » Tue Mar 29, 2011 4:43 pm

hi kseanz,

Thanks! That is perfect, nice and simple.