<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Codeys Modbus TCP Client reading from M241</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/a1cc1fe231/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/a1cc1fe231/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/a1cc1fe231/</id><updated>2020-02-27T14:04:37.705000Z</updated><subtitle>Recent posts to Codeys Modbus TCP Client reading from M241</subtitle><entry><title>Codeys Modbus TCP Client reading from M241</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/a1cc1fe231/?limit=25#bf39" rel="alternate"/><published>2020-02-27T14:04:37.705000Z</published><updated>2020-02-27T14:04:37.705000Z</updated><author><name>jzhvymetal</name><uri>https://forge.codesys.com/u/jzhvymetal/</uri></author><id>https://forge.codesys.com7fd6d85d9ae25b5f0a8ec7062852ff79cbc46ea5</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;kallileo hat geschrieben:&lt;/strong&gt;&lt;br/&gt;
The thing is that Modbus TCP and RTU Servers are enabled by default on M241 so I'm sure that there is no problem with the Modbus Server.&lt;br/&gt;
I have absolutely no problem accessing Modbus registers using other clients like HMIs or Windows Modbus TCP clients.&lt;br/&gt;
There only problem is that I can't access them using the Modbus Client of Codesys runtime on Windows or actual hardware.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;@Kallileo  not sure if you got the M241 modbus working but it could have been the Node ID you where using. With M241 it response differently depending on Node ID.  See pic below&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: M2x1 MODBUS TCP SLAVE.png" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=4373"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Codeys Modbus TCP Client reading from M241</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/a1cc1fe231/?limit=25#5d94" rel="alternate"/><published>2020-02-27T14:04:37.431000Z</published><updated>2020-02-27T14:04:37.431000Z</updated><author><name>TURCKONE</name><uri>https://forge.codesys.com/u/turckone/</uri></author><id>https://forge.codesys.com7426b4546af1ef503d035b07618756d6ed9a8413</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello experts ,&lt;/p&gt;
&lt;p&gt;in codesys v3 my target is control win &lt;/p&gt;
&lt;p&gt;i want a bit for my modbus TCP cpmunication failure .&lt;/p&gt;
&lt;p&gt;is there any bit for this purpose ?&lt;/p&gt;
&lt;p&gt;and yes i am trying with Modbus_TCP_Slave.xerror .&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Codeys Modbus TCP Client reading from M241</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/a1cc1fe231/?limit=25#0d81" rel="alternate"/><published>2020-02-27T14:04:36.576000Z</published><updated>2020-02-27T14:04:36.576000Z</updated><author><name>kallileo</name><uri>https://forge.codesys.com/u/kallileo/</uri></author><id>https://forge.codesys.com28cb8a909f4e845929b3d0fc5f6d822b28aa6895</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;"Always update variables:" to "Activate 2 (always in bus cycle task)" &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;IT WORKED.&lt;br/&gt;
It seems that if you don't assign Codesys variables to Modbus channels you need to have this option set to "Activate 2 (always in bus cycle task)" or else you see nothing in Codesys.&lt;/p&gt;
&lt;p&gt;Thank you for your help guys.&lt;/p&gt;
&lt;p&gt;It's also mentioned in the link below.&lt;br/&gt;
&lt;a class="" href="https://faq.codesys.com/pages/viewpage.action?pageId=3538995" rel="nofollow"&gt;https://faq.codesys.com/pages/viewpage. ... Id=3538995&lt;/a&gt; m &lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Codeys Modbus TCP Client reading from M241</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/a1cc1fe231/?limit=25#1669" rel="alternate"/><published>2020-02-27T14:04:36.301000Z</published><updated>2020-02-27T14:04:36.301000Z</updated><author><name>dFx</name><uri>https://forge.codesys.com/u/dfx/</uri></author><id>https://forge.codesys.com5eea110f6244afb8d0903462c77624f5371590b4</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;please make sure that QmodSlave doesn't uses port 502 with netstat -a -b command.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Codeys Modbus TCP Client reading from M241</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/a1cc1fe231/?limit=25#a5b6" rel="alternate"/><published>2020-02-27T14:04:36.008000Z</published><updated>2020-02-27T14:04:36.008000Z</updated><author><name>kallileo</name><uri>https://forge.codesys.com/u/kallileo/</uri></author><id>https://forge.codesys.com17701040ecf8a64e72652effde3702ca7277744a</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;OK. I replaced the M241 PLC with pyModSlave which is now running on my laptop and is used as Modbus Server my clients connect to.&lt;br/&gt;
Again I have no problem reading Modbus registers from QModMaster installed on the same PC as the Codesys Win control PLC.&lt;/p&gt;
&lt;p&gt;I have set the option "Always update variables:" to "Activate 2 (always in bus cycle task)" but it still doesn't work in Codesys.&lt;br/&gt;
It's really driving me crazy. &lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Codeys Modbus TCP Client reading from M241</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/a1cc1fe231/?limit=25#8ada" rel="alternate"/><published>2020-02-27T14:04:35.738000Z</published><updated>2020-02-27T14:04:35.738000Z</updated><author><name>e.kislov</name><uri>https://forge.codesys.com/u/e-kislov/</uri></author><id>https://forge.codesys.comf338c58e444bd04c685e6015ea3f22e520ab50b8</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;You need set Always update variables: Activate 2 (always in bus cycle task).&lt;br/&gt;
On your screenshot this setting hide under window QModMaster.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Codeys Modbus TCP Client reading from M241</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/a1cc1fe231/?limit=25#1e8d" rel="alternate"/><published>2020-02-27T14:04:34.883000Z</published><updated>2020-02-27T14:04:34.883000Z</updated><author><name>dFx</name><uri>https://forge.codesys.com/u/dfx/</uri></author><id>https://forge.codesys.com1940afa969c448a186e2c2497535fc17cf5fd495</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;By issuing a ping, I mean, from your runtime. Cause this would validate the lP stack settings.&lt;/p&gt;
&lt;p&gt;Does M241 supports multiple connections from different hosts on port 502 ?&lt;br/&gt;
Could you post your ModbusTCPSlave parameters ?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Codeys Modbus TCP Client reading from M241</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/a1cc1fe231/?limit=25#9efe" rel="alternate"/><published>2020-02-27T14:04:34.610000Z</published><updated>2020-02-27T14:04:34.610000Z</updated><author><name>kallileo</name><uri>https://forge.codesys.com/u/kallileo/</uri></author><id>https://forge.codesys.com53719b24ac90a6253334e31f5bdf04cfd43fbdb2</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I can ping the M241 PLC (slave).&lt;/p&gt;
&lt;p&gt;The communication seems to be ok.&lt;br/&gt;
Also as it shown in the screenshot qModMaster is reading the data in the holding register %MW10 without any problem but Codesys Win control reads nothing.&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: CodesysModbusMaster.png" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=4234"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Codeys Modbus TCP Client reading from M241</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/a1cc1fe231/?limit=25#228a" rel="alternate"/><published>2020-02-27T14:04:34.309000Z</published><updated>2020-02-27T14:04:34.309000Z</updated><author><name>dFx</name><uri>https://forge.codesys.com/u/dfx/</uri></author><id>https://forge.codesys.combfac94dff16cce4b34d9056678f063f625f18d78</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;kallileo hat geschrieben:&lt;/strong&gt;&lt;br/&gt;
The thing is that Modbus TCP and RTU Servers are enabled by default on M241 so I'm sure that there is no problem with the Modbus Server.&lt;br/&gt;
I have absolutely no problem accessing Modbus registers using other clients like HMIs or Windows Modbus TCP clients.&lt;br/&gt;
There only problem is that I can't access them using the Modbus Client of Codesys runtime on Windows or actual hardware.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;So I bet you have double checked your access type (3x,4x), and addressing (Modbus base address is 0, but often you may see a +1 offset because of Jbus addressing).&lt;/p&gt;
&lt;p&gt;Can you issue a ping from your win PLC to your M241 ?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Codeys Modbus TCP Client reading from M241</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/a1cc1fe231/?limit=25#6b6f" rel="alternate"/><published>2020-02-27T14:04:34.006000Z</published><updated>2020-02-27T14:04:34.006000Z</updated><author><name>kallileo</name><uri>https://forge.codesys.com/u/kallileo/</uri></author><id>https://forge.codesys.com80e85c1ba1ddd99d8b6d67a800f1a8d0dcf36ddd</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;The thing is that Modbus TCP and RTU Servers are enabled by default on M241 so I'm sure that there is no problem with the Modbus Server.&lt;br/&gt;
I have absolutely no problem accessing Modbus registers using other clients like HMIs or Windows Modbus TCP clients.&lt;br/&gt;
There only problem is that I can't access them using the Modbus Client of Codesys runtime on Windows or actual hardware.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>