<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to CANopen Manager; Change the HeartbeatRatio</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/39fe7425b3/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/39fe7425b3/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/39fe7425b3/</id><updated>2020-02-27T14:14:35.126000Z</updated><subtitle>Recent posts to CANopen Manager; Change the HeartbeatRatio</subtitle><entry><title>CANopen Manager; Change the HeartbeatRatio</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/39fe7425b3/?limit=25#0d45" rel="alternate"/><published>2020-02-27T14:14:35.126000Z</published><updated>2020-02-27T14:14:35.126000Z</updated><author><name>chab</name><uri>https://forge.codesys.com/u/chab/</uri></author><id>https://forge.codesys.comafb4d402ff030f9e2914d8aff81dd20a9409baf9</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I found the problem.&lt;br/&gt;
The CL2 function ResetBusAlarm has the side effect that some CAN messages are lost. &lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;eError&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;_3SCOS&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;CL2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ResetBusAlarm&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;hDriver&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;hDriver&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;I restricted the calls to ResetBusAlarm.&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="k"&gt;IF&lt;/span&gt; &lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;all&lt;/span&gt; &lt;span class="nv"&gt;slaves&lt;/span&gt;, &lt;span class="nv"&gt;that&lt;/span&gt; &lt;span class="nv"&gt;the&lt;/span&gt; &lt;span class="nv"&gt;master&lt;/span&gt; &lt;span class="nv"&gt;manages&lt;/span&gt;, &lt;span class="nv"&gt;are&lt;/span&gt; &lt;span class="nv"&gt;not&lt;/span&gt; &lt;span class="nv"&gt;operational&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt; &lt;span class="k"&gt;THEN&lt;/span&gt;
    &lt;span class="nv"&gt;eError&lt;/span&gt; :&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;_3SCOS&lt;/span&gt;.&lt;span class="nv"&gt;CL2&lt;/span&gt;.&lt;span class="nv"&gt;ResetBusAlarm&lt;/span&gt; &lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;hDriver&lt;/span&gt; :&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;hDriver&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
&lt;span class="nv"&gt;END_IF&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Thank you,&lt;br/&gt;
Edwin.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>CANopen Manager; Change the HeartbeatRatio</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/39fe7425b3/?limit=25#ada8" rel="alternate"/><published>2020-02-27T14:14:34.748000Z</published><updated>2020-02-27T14:14:34.748000Z</updated><author><name>eschwellinger</name><uri>https://forge.codesys.com/u/eschwellinger/</uri></author><id>https://forge.codesys.com3bb591c76fe747795700440f27a4478960d4e1c3</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi Edwin,&lt;/p&gt;
&lt;p&gt;I would recommend to solve the problem -&amp;gt;&lt;br/&gt;
not to workaround this issue with some kind of settings, you need to solve the root cause of the problem.&lt;/p&gt;
&lt;p&gt;Is it possible to test your interface /CAN implementation by the hopefully well know 'CAN Echo' project?&lt;br/&gt;
You need to figure out how stable your CL2 works according loosing can messages even on high bus load situations.&lt;/p&gt;
&lt;p&gt;Even more there is a very good feature in &lt;strong&gt;3.5SP5&lt;/strong&gt; you could activate &lt;strong&gt;CANOPEN_DEBUG&lt;/strong&gt; in the Application compile options&lt;br/&gt;
which then give more debug messages in the plc log, a really great improvemt to find CAN problems.&lt;/p&gt;
&lt;p&gt;BR&lt;br/&gt;
E.Schwellinger&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: DebugLogger.jpg" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=847"/&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: CANOPEN_DEBUGSP5.jpg" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=846"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>CANopen Manager; Change the HeartbeatRatio</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/39fe7425b3/?limit=25#3fc8" rel="alternate"/><published>2020-02-27T14:14:34.349000Z</published><updated>2020-02-27T14:14:34.349000Z</updated><author><name>chab</name><uri>https://forge.codesys.com/u/chab/</uri></author><id>https://forge.codesys.comab4a9bad4a1eb635022772a274f6ef1be062b549</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi all,&lt;/p&gt;
&lt;p&gt;The CANopen manager / master has the ability to monitor CANopen slaves: "heartbeat consumer".&lt;br/&gt;
The "heartbeat consumer time" equals "HeartbeatRatio" times (x) the "heartbeat producer time".&lt;/p&gt;
&lt;p&gt;In the file "CANopen_Manager_*.devdesc.xml", the "HeartbeatRatio" is set to 150 &lt;span&gt;[%]&lt;/span&gt;.&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nv"&gt;Parameter&lt;/span&gt; &lt;span class="nv"&gt;ParameterId&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;275&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="nv"&gt;type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;std:WORD&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nv"&gt;Attributes&lt;/span&gt; &lt;span class="nv"&gt;download&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;false&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="nv"&gt;offlineaccess&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;readwrite&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="nv"&gt;onlineaccess&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;readwrite&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="o"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nv"&gt;Default&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="mi"&gt;150&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nv"&gt;Default&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nv"&gt;Name&lt;/span&gt; &lt;span class="nv"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;localStrings:HeartbeatRatio&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nv"&gt;Default&lt;/span&gt; &lt;span class="nv"&gt;slave&lt;/span&gt; &lt;span class="nv"&gt;ratio&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="nv"&gt;heartbeat&lt;/span&gt; &lt;span class="nv"&gt;time&lt;/span&gt; &lt;span class="nv"&gt;in&lt;/span&gt; &lt;span class="nv"&gt;percent&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nv"&gt;Name&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="o"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nv"&gt;Parameter&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;My CANopen master misses some heartbeats sometimes.&lt;br/&gt;
(The CAN log shows the heartbeat message was on the bus. But the master did not process it (in time, or at all). And re-initializes the CANopen slave.)&lt;/p&gt;
&lt;p&gt;I would like to use a HeartbeatRatio of 250 &lt;span&gt;[%]&lt;/span&gt;. In my application, the CANopen master is "allowed" to miss one heartbeat. &lt;br/&gt;
(With a HeartbeatRatio of 150 &lt;span&gt;[%]&lt;/span&gt;, the CANopen master is "allowed" to receive the heartbeat later. But the CANopen master has to receive it!)&lt;/p&gt;
&lt;p&gt;After changing the HeartbeatRatio to 250 &lt;span&gt;[%]&lt;/span&gt;, in the "CANopen_Manager_*.devdesc.xml" file,  and making a new application from scratch, &lt;br/&gt;
the observed HeartbeatRatio is 150 &lt;span&gt;[%]&lt;/span&gt; still!&lt;/p&gt;
&lt;p&gt;Does anyone have experience with:&lt;br/&gt;
- CANopen master "missing" some heartbeats sometimes.&lt;br/&gt;
- Changing the HeartbeatRatio of the CANopen master.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br/&gt;
Edwin.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>