<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to IoDrvModbusTCP - Programmatically change Unit ID</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/f0919ff568/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/f0919ff568/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/f0919ff568/</id><updated>2022-09-26T16:41:35.659000Z</updated><subtitle>Recent posts to IoDrvModbusTCP - Programmatically change Unit ID</subtitle><entry><title>IoDrvModbusTCP - Programmatically change Unit ID</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/f0919ff568/?limit=25#8400" rel="alternate"/><published>2022-09-26T16:41:35.659000Z</published><updated>2022-09-26T16:41:35.659000Z</updated><author><name>Scoobler</name><uri>https://forge.codesys.com/u/scoobler/</uri></author><id>https://forge.codesys.com080a451e2a67a092cd53877e1d99334e78c837c6</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi i-campbell, I tried adding the 'slave COM port' under the TCP Slave - however there was no SlaveAddress - the only thing was an output showing the usiUnitID - however there didn't appear to be a way to set this in the code.&lt;br/&gt;
&lt;img src="./attachment/slave.png" width="100%"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>IoDrvModbusTCP - Programmatically change Unit ID</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/f0919ff568/?limit=25#cb23" rel="alternate"/><published>2022-09-24T08:52:51.957000Z</published><updated>2022-09-24T08:52:51.957000Z</updated><author><name>i-campbell</name><uri>https://forge.codesys.com/u/i-campbell/</uri></author><id>https://forge.codesys.com5d7f09ead25de27914fb915c4ad22ebaad123b18</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;The solution I suugested was for tcp. Take a look at the red circled 3 in the link.&lt;br/&gt;
If it has more than one unit ID, the TCP slave is acting as a gateway, and you add the unit IDs as serial com devices beneath the tcp slave. A bit counterintuitive for sure.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>IoDrvModbusTCP - Programmatically change Unit ID</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/f0919ff568/?limit=25#651f" rel="alternate"/><published>2022-09-23T14:03:29.977000Z</published><updated>2022-09-23T14:03:29.977000Z</updated><author><name>Scoobler</name><uri>https://forge.codesys.com/u/scoobler/</uri></author><id>https://forge.codesys.come05326f294be988542ed78998a7b817499774f68</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Thanks for the suggestion, unfortunately it is Modbus TCP, the SlaveAddress is for Modbus RTU and isn't present on the communication settings for Modbus TCP.&lt;/p&gt;
&lt;p&gt;&lt;img src="./attachment/ModbusTCP.png" width="50%"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>IoDrvModbusTCP - Programmatically change Unit ID</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/f0919ff568/?limit=25#6602" rel="alternate"/><published>2022-09-23T13:35:21.322000Z</published><updated>2022-09-23T13:35:21.322000Z</updated><author><name>i-campbell</name><uri>https://forge.codesys.com/u/i-campbell/</uri></author><id>https://forge.codesys.com3506b8f590496b6a254dd92484ec712438dfb9bb</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;so if you have your device tree lain out like the red circle with the three in it here: &lt;a href="https://content.helpme-codesys.com/en/CODESYS%20Modbus/_mod_general.html" rel="nofollow"&gt;https://content.helpme-codesys.com/en/CODESYS%20Modbus/_mod_general.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Then you could access it like:&lt;br/&gt;
change it with RTU_Slave1.SlaveAddress:=2;&lt;/p&gt;
&lt;p&gt;Not sure if you need to set RTU_Slave1.Enable to false first or not to be allowed to change it.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>IoDrvModbusTCP - Programmatically change Unit ID</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/f0919ff568/?limit=25#f3fc" rel="alternate"/><published>2022-09-23T13:14:11.473000Z</published><updated>2022-09-23T13:14:11.473000Z</updated><author><name>Scoobler</name><uri>https://forge.codesys.com/u/scoobler/</uri></author><id>https://forge.codesys.com2f349efd15410840832ab2cfa4f6a542ec9e328b</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I have a project with a package controller fitted to a machine - it has a feature where the overall package parameters are available via Unit ID 100 - this is static. The machine specific details are then available via a different Unit ID.&lt;br/&gt;
When several machines are plugged into each other, these IDs will increment - so the package controller (an IPC) will respond for the entire package via Unit ID 100, but if I want to check details for machine 1, it will be Unit ID 1, for machine 2 it would be Unit ID 2 etc.&lt;/p&gt;
&lt;p&gt;The PLC I am putting together will allow control over the package, there is also a HMI - I want the user to be able to change the ID number so they can view individual machines as well - without having to add lots of individual IoDrvModbusTCP devices with the Unit ID set on each one.&lt;/p&gt;
&lt;p&gt;I have looked at the library but can't see a way to change the Unit ID programmatically - so thought I would check and see if I am missing something and there is another way possibly?&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>