<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to CoDeSys CANOpen node status (nStatus)</title><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/b4d2af0001/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/b4d2af0001/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/CODESYS-V2/thread/b4d2af0001/</id><updated>2020-02-27T22:02:48.790000Z</updated><subtitle>Recent posts to CoDeSys CANOpen node status (nStatus)</subtitle><entry><title>CoDeSys CANOpen node status (nStatus)</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/b4d2af0001/?limit=25#f3bd" rel="alternate"/><published>2020-02-27T22:02:48.790000Z</published><updated>2020-02-27T22:02:48.790000Z</updated><author><name>rahulnshinde</name><uri>https://forge.codesys.com/u/rahulnshinde/</uri></author><id>https://forge.codesys.come5d6a49616e6dbdaef1d79caa3c0366b854c60c3</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thankyou for the reply Steve.&lt;/p&gt;
&lt;p&gt;I am not aware of the typical monitoring times of heartbeat.&lt;/p&gt;
&lt;p&gt;My intention/requirement is&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;To monitor as accurately as possible, the communication interruption with the device or to say telegram failure. &lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The CAN master shall be notified immediately if there is a loss of slave on the bus, and certainly a confirmation, that the failed slave is back online after reset of the communication fault.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It would be kind of you if you can direct me to some kind of documentation, if possible, regarding the above.&lt;/p&gt;
&lt;p&gt;Thanks in advance.&lt;/p&gt;
&lt;p&gt;Cheers.&lt;/p&gt;
&lt;p&gt;Rahul.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>CoDeSys CANOpen node status (nStatus)</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/b4d2af0001/?limit=25#0e7b" rel="alternate"/><published>2020-02-27T22:02:47.252000Z</published><updated>2020-02-27T22:02:47.252000Z</updated><author><name>spfeif</name><uri>https://forge.codesys.com/u/spfeif/</uri></author><id>https://forge.codesys.comefe5d20ee70b134beeead4d28b6529b27b56df08</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I haven't seen a Heartbeat message TX at 25ms. Why do you need it so fast?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>CoDeSys CANOpen node status (nStatus)</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/b4d2af0001/?limit=25#e36e" rel="alternate"/><published>2020-02-27T22:02:42.997000Z</published><updated>2020-02-27T22:02:42.997000Z</updated><author><name>hasse</name><uri>https://forge.codesys.com/u/hasse/</uri></author><id>https://forge.codesys.com5131d07d24eb6194432cfacea2fbd19378993934</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Been experiencing the same problem as you all describe.&lt;/p&gt;
&lt;p&gt;We found two things.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;On our PLC the CAN driver buffer where to small. We could miss messages if the load where to high.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;That the configured Hbeat time in CoDeSys is to "narrow". &lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;If im not remebering wrong CoDeSys multiplies the time by 1.5.&lt;/p&gt;
&lt;p&gt;We found that by extending the time by 3 the problems went away for good. &lt;/p&gt;
&lt;p&gt;FOR i:= 0 TO MAX_NODEINDEX BY 1 DO&lt;/p&gt;
&lt;p&gt;(&lt;em&gt;Calculate the original Heartbeat time that is entered in PLC Configuration &lt;/em&gt;)&lt;/p&gt;
&lt;p&gt;dwOriginalHeartbeatTime := REAL_TO_DWORD(DWORD_TO_REAL(pCanOpenNode&lt;span&gt;[i]&lt;/span&gt;.dwHeartbeatTime) / 1.5);&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="c"&gt;(*Set the new Timeout factor*)&lt;/span&gt;

&lt;span class="n"&gt;pCanOpenNode&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;].&lt;/span&gt;&lt;span class="n"&gt;dwHeartbeatTime&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;dwOriginalHeartbeatTime&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;HEARTBEAT_SCALE_FACTOR&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;END_FOR&lt;/p&gt;
&lt;p&gt;Hope that this fix helps you out&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>CoDeSys CANOpen node status (nStatus)</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/b4d2af0001/?limit=25#b1ae" rel="alternate"/><published>2020-02-27T22:02:41.355000Z</published><updated>2020-02-27T22:02:41.355000Z</updated><author><name>rahulnshinde</name><uri>https://forge.codesys.com/u/rahulnshinde/</uri></author><id>https://forge.codesys.com35df065442cc08210b78eed83bbc9a823ca179e5</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am facing the same problem too.&lt;/p&gt;
&lt;p&gt;I have activated heartbeat monitoring for the slaves. &lt;/p&gt;
&lt;p&gt;I expect for the slaves;&lt;/p&gt;
&lt;p&gt;pcanopennode&lt;span&gt;[xx]&lt;/span&gt;.nstatus = 5; since all the conditions are ideal. &lt;/p&gt;
&lt;p&gt;Yet the value of above variable toggles between 99 and 5. &lt;/p&gt;
&lt;p&gt;I have no idea why. The heartbeat monitoring time is about 25 ms, and PLC scan time is 1ms.&lt;/p&gt;
&lt;p&gt;Can you guys indicate if there could be something wrong with the configuration ?&lt;/p&gt;
&lt;p&gt;or is it that I am experiencing similar behavior like you guys?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>CoDeSys CANOpen node status (nStatus)</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/b4d2af0001/?limit=25#0bb7" rel="alternate"/><published>2020-02-27T22:02:37.157000Z</published><updated>2020-02-27T22:02:37.157000Z</updated><author><name>spfeif</name><uri>https://forge.codesys.com/u/spfeif/</uri></author><id>https://forge.codesys.com2082cbd7effc4c14ee509fee6daf751401e26ba2</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Tony send me an email and I can share that with you. The file will not upload because of file size restrictions.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>CoDeSys CANOpen node status (nStatus)</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/b4d2af0001/?limit=25#f61f" rel="alternate"/><published>2020-02-27T22:02:35.631000Z</published><updated>2020-02-27T22:02:35.631000Z</updated><author><name>TonyWony</name><uri>https://forge.codesys.com/u/tonywony/</uri></author><id>https://forge.codesys.com1d5d97cc33b8547cd58c2230e41c5b2664daad9c</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I used this method in my program, it works fine, but where can I find documentation describing the members of the canOpenNode variable?&lt;/p&gt;
&lt;p&gt;I would like to know what the meaning is of the values of the nstatus member...&lt;/p&gt;
&lt;p&gt;thx&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>CoDeSys CANOpen node status (nStatus)</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/b4d2af0001/?limit=25#3eef" rel="alternate"/><published>2020-02-27T22:02:31.408000Z</published><updated>2020-02-27T22:02:31.408000Z</updated><author><name>spfeif</name><uri>https://forge.codesys.com/u/spfeif/</uri></author><id>https://forge.codesys.comd4a3cca401c5287add70ea776c5d1a0f2a6d0437</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Yes my work around is adding a timer to the error so that the error must be present for x amount of time. That is a crappy patch. There is already a timer on the heartbeat or node guard and now I am adding more time to it. Actually though I never want to increase my PLC cycle time. First off I wouldn't know how to reliably, except make some big for loops. I want my PLC to control as fast as possible. This is a bug with the 3S CAN stack. hopefully they fix it.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>CoDeSys CANOpen node status (nStatus)</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/b4d2af0001/?limit=25#a936" rel="alternate"/><published>2020-02-27T22:02:29.855000Z</published><updated>2020-02-27T22:02:29.855000Z</updated><author><name>goldenas</name><uri>https://forge.codesys.com/u/goldenas/</uri></author><id>https://forge.codesys.com13e6640c6b8ff1f5635df7c74602da94b8fb846a</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Try to increase the cycle time of the PLC to 50ms and check if it is happening less often. We have the same occurence. We noticed that in some cases increasing the cycle time is filtering out this event. In some other cases we filtering out the faulty nStatus between two consequent cycles using a shift register.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>CoDeSys CANOpen node status (nStatus)</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/b4d2af0001/?limit=25#24db" rel="alternate"/><published>2020-02-27T22:02:28.228000Z</published><updated>2020-02-27T22:02:28.228000Z</updated><author><name>tbarham</name><uri>https://forge.codesys.com/u/tbarham/</uri></author><id>https://forge.codesys.com3dfa108132adbf539ddf63c45c2d9f3facf5d79b</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Same here.  I eventually lost patience with the unreliable 'nStatus' property and coded a less-than-ideal work-around.  If anyone comes up with a robust solution, please let us know!&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>CoDeSys CANOpen node status (nStatus)</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/b4d2af0001/?limit=25#39f1" rel="alternate"/><published>2020-02-27T22:02:23.959000Z</published><updated>2020-02-27T22:02:23.959000Z</updated><author><name>hasse</name><uri>https://forge.codesys.com/u/hasse/</uri></author><id>https://forge.codesys.com6d1dbaad49fc49be7bc698b76fc56c7825bd8045</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I've also seen this!!! I also monitor the states of the slaves using the pCANOpenNode array, and i also have a CAN dongle so i see the heartbeats on the bus but the runtime seems to miss them!!!&lt;/p&gt;
&lt;p&gt;I've also tried to "fool" the runtime by doubling the frequency of the heartbeats but i still reports the wrong states of the slaves!!!&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>