<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to J1939.ReceiveWatchdog &amp; J1939.ReceiveParameterGroup</title><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/c01554beb5/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/c01554beb5/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/CODESYS-V2/thread/c01554beb5/</id><updated>2024-03-13T14:17:46.866000Z</updated><subtitle>Recent posts to J1939.ReceiveWatchdog &amp; J1939.ReceiveParameterGroup</subtitle><entry><title>J1939.ReceiveWatchdog &amp; J1939.ReceiveParameterGroup</title><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/c01554beb5/?limit=25#2b90" rel="alternate"/><published>2024-03-13T14:17:46.866000Z</published><updated>2024-03-13T14:17:46.866000Z</updated><author><name>zoronoa</name><uri>https://forge.codesys.com/u/zoronoa/</uri></author><id>https://forge.codesys.comddf41d19cccab4a220a7f6b37f05cf27ffa75573</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I'm trying to monitor a specific PGN which I have it sending a pulse every 500mS&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;I found the J1939.ReceiveWatchdog &amp;amp; J1939.ReceiveParameterGroup function blocks and they seem like a good solution for my problem, I just can't get them to work&lt;/p&gt;
&lt;p&gt;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&lt;/p&gt;
&lt;p&gt;HEARTBEAT_TIMER(IN:= TRUE, PT:= T#1000MS); //turn-on delay because of initialization race&lt;br/&gt;
IF HEARTBEAT_TIMER.Q= TRUE THEN&lt;br/&gt;
    Glob_Var.DisplayReceive.xExecute:= TRUE;&lt;br/&gt;
    Glob_Var.DisplayReceive.itfECU:= Valve_X;&lt;br/&gt;
    Glob_Var.DisplayReceive.dwPGN:= 65511;&lt;br/&gt;
    Glob_Var.DisplayWatchdog.xEnable:= TRUE;&lt;br/&gt;
    Glob_Var.DisplayWatchdog.itfParameterGroup:= Glob_Var.DisplayReceive.itfParameterGroup;&lt;br/&gt;
    Glob_Var.DisplayWatchdog.tTimeout:= T#1500MS;&lt;br/&gt;
END_IF&lt;/p&gt;
&lt;p&gt;Notes:&lt;br/&gt;
Glob_Var.DisplayReceive is of type J1939.ReceiveParameterGroup&lt;br/&gt;
Glob_Var.DisplayWatchdog is of type J1939.ReceiveWatchdog&lt;br/&gt;
The above code is done once and not cyclically&lt;/p&gt;
&lt;p&gt;I'm monitoring Glob_Var.DisplayWatchdog.xError cyclically&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>