<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to ModbusRTU: SP12 -&gt; SP16</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/f8017f4ba6/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/f8017f4ba6/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/f8017f4ba6/</id><updated>2023-07-19T09:31:09.869000Z</updated><subtitle>Recent posts to ModbusRTU: SP12 -&gt; SP16</subtitle><entry><title>ModbusRTU: SP12 -&gt; SP16</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/f8017f4ba6/?limit=25#89ac/3f93" rel="alternate"/><published>2023-07-19T09:31:09.869000Z</published><updated>2023-07-19T09:31:09.869000Z</updated><author><name>lostcontrol</name><uri>https://forge.codesys.com/u/lostcontrol/</uri></author><id>https://forge.codesys.com7e7d7bd007773bf0773d1a9325c648e80a470ffa</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Nope, the attribute no_assign did not make a difference neither did the no_assign_warning.&lt;/p&gt;
&lt;p&gt;But, that change to reference declaration was the solution!!&lt;br/&gt;
Thanks for taking the time to reply!&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>ModbusRTU: SP12 -&gt; SP16</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/f8017f4ba6/?limit=25#89ac" rel="alternate"/><published>2023-07-19T07:41:34.184000Z</published><updated>2023-07-19T07:41:34.184000Z</updated><author><name>TimvH</name><uri>https://forge.codesys.com/u/timvh/</uri></author><id>https://forge.codesys.com77be7c08d2597554dadefacf4fc805561b17c64c</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I'm not sure, but I guess it has the attribute 'no_assign'. Probably it is better to use a reference:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="err"&gt;VAR_INPUT&lt;/span&gt;
&lt;span class="err"&gt;    slave : REFERENCE TO IoDrvModbus.ModbusSlaveComPort;&lt;/span&gt;
&lt;span class="err"&gt;END_VAR&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;/div&gt;</summary></entry><entry><title>ModbusRTU: SP12 -&gt; SP16</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/f8017f4ba6/?limit=25#feda" rel="alternate"/><published>2023-07-18T18:12:59.893000Z</published><updated>2023-07-18T18:12:59.893000Z</updated><author><name>lostcontrol</name><uri>https://forge.codesys.com/u/lostcontrol/</uri></author><id>https://forge.codesys.com8857a6700e2a09bb8097b382f9c532a2f4371b71</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;br/&gt;
I have had an application running on V3.5 SP12 that have since upgraded to V3.5 SP16 ( hardware supported version )&lt;/p&gt;
&lt;p&gt;I had a function block that had an input parameter:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;slave&lt;/span&gt; &lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;IoDrvModbus&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;ModbusSlaveComPort&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;This implementation worked as I expected.&lt;/p&gt;
&lt;p&gt;When I have upgraded to SP16/19, the same assignment does not compile &amp;amp; gives error C0328 : Assignment not allowed for type ModbusSlaveComPort_Diag&lt;br/&gt;
We are at a loss as to why this worked for SP12, but no longer for SP16. &lt;/p&gt;
&lt;p&gt;Ive managed a workaround for now which is not ideal.&lt;/p&gt;
&lt;p&gt;The reason for using this method vs the in-built scan list is to control the polling of the slaves and order.&lt;/p&gt;
&lt;p&gt;any takers?&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>