zoronoa - 2024-03-13


I'm trying to monitor a specific PGN which I have it sending a pulse every 500mS

Problem: Using the Watchdog for the ECU does not really help me as I have multiple instances with separate PGNs, if a PGN goes ghost, the ECU watchdog won't be flagged as the others will be running.

I found the J1939.ReceiveWatchdog & J1939.ReceiveParameterGroup function blocks and they seem like a good solution for my problem, I just can't get them to work

from my understanding you just build the J1939.ReceiveParameterGroup once and then connect it's output to the J1939.ReceiveWatchdog, here's my CODE for the setup

HEARTBEAT_TIMER(IN:= TRUE, PT:= T#1000MS); //turn-on delay because of initialization race
Glob_Var.DisplayReceive.xExecute:= TRUE;
Glob_Var.DisplayReceive.itfECU:= Valve_X;
Glob_Var.DisplayReceive.dwPGN:= 65511;
Glob_Var.DisplayWatchdog.xEnable:= TRUE;
Glob_Var.DisplayWatchdog.itfParameterGroup:= Glob_Var.DisplayReceive.itfParameterGroup;
Glob_Var.DisplayWatchdog.tTimeout:= T#1500MS;

Glob_Var.DisplayReceive is of type J1939.ReceiveParameterGroup
Glob_Var.DisplayWatchdog is of type J1939.ReceiveWatchdog
The above code is done once and not cyclically

I'm monitoring Glob_Var.DisplayWatchdog.xError cyclically