<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to ModbusFB - Modbus TCP Slave non standard port</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/e8deaefc16/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/e8deaefc16/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/e8deaefc16/</id><updated>2022-04-19T15:25:46.651000Z</updated><subtitle>Recent posts to ModbusFB - Modbus TCP Slave non standard port</subtitle><entry><title>ModbusFB - Modbus TCP Slave non standard port</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/e8deaefc16/?limit=25#c565" rel="alternate"/><published>2022-04-19T15:25:46.651000Z</published><updated>2022-04-19T15:25:46.651000Z</updated><author><name>u-meyer</name><uri>https://forge.codesys.com/u/u-meyer/</uri></author><id>https://forge.codesys.comf9733ff0c12ca24a1cf7401956829c77fa08d1fa</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;sure ;-)&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>ModbusFB - Modbus TCP Slave non standard port</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/e8deaefc16/?limit=25#6053" rel="alternate"/><published>2022-04-19T15:08:03.400000Z</published><updated>2022-04-19T15:08:03.400000Z</updated><author><name>kbus</name><uri>https://forge.codesys.com/u/kbus/</uri></author><id>https://forge.codesys.coma742dcd0d2c8a10db463994ed867cd8abbf94760</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Quick correction to the workaround code above if anyone needs it.&lt;br/&gt;
The line between the implicit on and off should set the internal private variable.&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="err"&gt;{implicit on}&lt;/span&gt;
&lt;span class="err"&gt;server._uiPort:=28502;&lt;/span&gt;
&lt;span class="err"&gt;{implicit off}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;/div&gt;</summary></entry><entry><title>ModbusFB - Modbus TCP Slave non standard port</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/e8deaefc16/?limit=25#6f3d" rel="alternate"/><published>2022-04-19T13:29:42.416000Z</published><updated>2022-04-19T13:29:42.416000Z</updated><author><name>kbus</name><uri>https://forge.codesys.com/u/kbus/</uri></author><id>https://forge.codesys.com18fd600bb5462c008847c5a81fc4282a7f26e544</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Thank you very much Ullrich. I appreciate the quick turn around. You guys are awesome.&lt;/p&gt;
&lt;p&gt;Ken&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>ModbusFB - Modbus TCP Slave non standard port</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/e8deaefc16/?limit=25#43d2" rel="alternate"/><published>2022-04-19T12:57:37.207000Z</published><updated>2022-04-19T12:57:37.207000Z</updated><author><name>u-meyer</name><uri>https://forge.codesys.com/u/u-meyer/</uri></author><id>https://forge.codesys.com7ef2999f5fd63e0b2728560abd9e6119b485de8e</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello kbus,&lt;br/&gt;
sorry for the inconvinience, this slipped through all the testing :(&lt;br/&gt;
There is an easy workaround:&lt;/p&gt;
&lt;p&gt;// Configure the MODBUS TCP server&lt;br/&gt;
server(fcsSupported:=fcsSupported, dataModel:=exampleDataModel.tableDefs, xEnable:=FALSE, wsInterfaceName:="Ethernet 2", uiPort:=28502); // uiPort:=28502 doesnt work&lt;br/&gt;
// Start the server, set internal variable uiPort prior xEnable := TRUE&lt;br/&gt;
{implicit on}&lt;br/&gt;
server.uiPort:=28502;&lt;br/&gt;
{implicit off}&lt;br/&gt;
server(xEnable:=TRUE);&lt;/p&gt;
&lt;p&gt;and all works as expected.&lt;br/&gt;
The whole problem was: assignement of uiPort at rising edge of xEnable did not happen...&lt;br/&gt;
This bug is listed at MODBUS-108 at our end, fixed already and to be released with MODBUS 4.2.0.0 latest.&lt;/p&gt;
&lt;p&gt;regards Ullrich&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>ModbusFB - Modbus TCP Slave non standard port</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/e8deaefc16/?limit=25#fd65" rel="alternate"/><published>2022-04-14T00:14:59.084000Z</published><updated>2022-04-14T00:14:59.084000Z</updated><author><name>kbus</name><uri>https://forge.codesys.com/u/kbus/</uri></author><id>https://forge.codesys.comd221901a92c27c6468b3d567c362ef3aab3e6c59</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Found something more that indicates this might be a bug actually. when expanding the object in the watch window I see that the public uiPort variable is set, but the private internal uiPort is still 502. Is this a bug maybe?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>ModbusFB - Modbus TCP Slave non standard port</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/e8deaefc16/?limit=25#74dd" rel="alternate"/><published>2022-04-13T23:13:18.962000Z</published><updated>2022-04-13T23:13:18.962000Z</updated><author><name>kbus</name><uri>https://forge.codesys.com/u/kbus/</uri></author><id>https://forge.codesys.come0b9f4ef2a98e8414fa72917d780bea68f4df385</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello, &lt;br/&gt;
Using the example project ModbusFB I'm able to run the project as a modbus slave and connect and read just fine if I use port 502. However, if I use an alternate port, it still uses port 502 and I'm unsure why.&lt;/p&gt;
&lt;p&gt;If I exclude the uiPort option it uses 502. If I add the uiPort option as below, it shows it is set as 28502, but I cannot connect to that port and can still connect to port 502. Any idea of what's going on?&lt;/p&gt;
&lt;p&gt;serverTCP(fcsSupported:=fcsSupported, dataModel:=tableDefs, wsInterfaceName:="", uiPort := 28502);&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>