I am looking into getting the last received timeout for a specific PGN. I am interfacing with a few actuators that use the same address ECU address 0, but different reporting PGN to separate the actuators. In addition the PGN does not have a heartbeat bit or byte of anykind. This is not ideal but outside our ability to change.
In Codesys we build out an Actuator remote ECU and all actuators report back to the ECU, just under different PGNs. The issue is using the ECU watchdog will only check for a single message received. Since we have several actuators all but a single actuator could be disconnected and the watchdog won't trigger.
So what I am trying to do is get the last received time for a particular PGN. Few things I have tried:
ReceiveParameterGroup is for "building" the needed data structure. You should pipe itfParameterGroup into ReceiveWatchdog: https://help.codesys.com/webapp/8LVZD-HU9xCDZg4RnKWx5CheJCc%2FReceiveWatchdog;product=IoDrvJ1939;version=184.108.40.206
Ah, I was some what close! I saw ReceiveWatchdog and thought it was only at the ECU leve. Gotta try this!
Wanted to add that worked perfectly. An interesting thing is the ReceiveWatchdog has an xEnabled param while the ReceiveParameterGroup need a rising edge signal. I think as a general rule the rising edge frequency needs to be faster than the timeout on the ReceiveWatchdog.
Well, you need to build the ParameterGroup only once, so you can just call it the first cycle with xExecute = FALSE and from the second one with xExecute = TRUE, and connect ReceiveWatchdog.xEnable to ReceiveParameterGroup.xDone (if you want to be sure, interpose a latch between them).
Hello, Does anyone know the reason ReceiveParameterGroup Error flag get set if a Proprietary-A Peer-to-Peer PGN (0xEF00) is passed to it? It works fine with Proprietary-B PGNs ( 0xFFC2). Thank You
Log in to post a comment.