<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Modicon m241 Modbus TCP client server</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/d3178d584c/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/d3178d584c/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/d3178d584c/</id><updated>2020-02-27T14:08:30.907000Z</updated><subtitle>Recent posts to Modicon m241 Modbus TCP client server</subtitle><entry><title>Modicon m241 Modbus TCP client server</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/d3178d584c/?limit=25#4dad" rel="alternate"/><published>2020-02-27T14:08:30.907000Z</published><updated>2020-02-27T14:08:30.907000Z</updated><author><name>MassSarr</name><uri>https://forge.codesys.com/u/masssarr/</uri></author><id>https://forge.codesys.comeb1d9c125ff30b35c5dc4fc9993bd28539059f0b</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Thanks jzhvymetal&lt;/p&gt;
&lt;p&gt;I know that I am missing something all the time. Whole time I thought that I need FBs on both sides but everthing I had to do is take my values from %MW.&lt;/p&gt;
&lt;p&gt;Once again thanks to all on your kind help.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Modicon m241 Modbus TCP client server</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/d3178d584c/?limit=25#d89b" rel="alternate"/><published>2020-02-27T14:08:29.921000Z</published><updated>2020-02-27T14:08:29.921000Z</updated><author><name>jzhvymetal</name><uri>https://forge.codesys.com/u/jzhvymetal/</uri></author><id>https://forge.codesys.com2f69b70a36d265fe3f5a21af197ab4dea51527f0</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;MassSarr,&lt;/p&gt;
&lt;p&gt;Your close but maybe I was not clear.  You do not have to do FB's on both PLC's unless you want both to be masters and slaves to each other PLC.  Since you will probably have only one master see the following example below.&lt;/p&gt;
&lt;p&gt;Also what ndzied1 was describing above is not always implement on the SE PLC's.  The Modbus_TCP_Master is only on the dual Ethernet M251 and only available on the device Ethernet port (labeled with non-green border).  Also in newer version of SoMachine this has been replace with an Industrial_Ethernet_Manager.  Which in effect works the same as the CoDeSys master but also does EthernetIP Master.&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: M2x1 MODBUS COMS.png" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=1741"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Modicon m241 Modbus TCP client server</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/d3178d584c/?limit=25#0272" rel="alternate"/><published>2020-02-27T14:08:29.600000Z</published><updated>2020-02-27T14:08:29.600000Z</updated><author><name>ndzied1</name><uri>https://forge.codesys.com/u/ndzied1/</uri></author><id>https://forge.codesys.com606fa8b2803633be94207695f89699d6e862dcda</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Depending on what version of CoDeSys your software is built on you may be able to do Modbus without the Function Blocks (Can you tell I hate using the function blocks for Modbus  )&lt;/p&gt;
&lt;p&gt;Can you add devices to your tree like in the attached image?&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: Modbus.PNG" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=1740"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Modicon m241 Modbus TCP client server</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/d3178d584c/?limit=25#c3c9" rel="alternate"/><published>2020-02-27T14:08:29.293000Z</published><updated>2020-02-27T14:08:29.293000Z</updated><author><name>MassSarr</name><uri>https://forge.codesys.com/u/masssarr/</uri></author><id>https://forge.codesys.com973fc5bfe1ff1d079cff22884891538ff083b21a</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Thanks for advice, I have established communication between two modicon PLCs via Network Variables.&lt;br/&gt;
I found out, between all other rules, that data exchange between several GVLs (senders) of one controller and their associated GNVLs (receivers) should not exceed 1000 bytes of variables what is ok for me now but my goal is Modbus TCP/IP so I will have to figure out what is happening with my application.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Modicon m241 Modbus TCP client server</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/d3178d584c/?limit=25#6ff8" rel="alternate"/><published>2020-02-27T14:08:28.351000Z</published><updated>2020-02-27T14:08:28.351000Z</updated><author><name>ndzied1</name><uri>https://forge.codesys.com/u/ndzied1/</uri></author><id>https://forge.codesys.com591ec0c7c558b6fc3950d54c6b5522d235ee0458</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;If the PLC supports Network Variables, this might be an easier way for you to do this.  &lt;/p&gt;
&lt;p&gt;No function block calls or dealing with Modbus offsets or lack of defined data types.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Modicon m241 Modbus TCP client server</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/d3178d584c/?limit=25#1388" rel="alternate"/><published>2020-02-27T14:08:28.041000Z</published><updated>2020-02-27T14:08:28.041000Z</updated><author><name>MassSarr</name><uri>https://forge.codesys.com/u/masssarr/</uri></author><id>https://forge.codesys.com1ef7e032014e46a438cbd80f0ba4378967570cd3</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have been occupied with some other jobs last few days so I had to put on side this my issue. Yesterday I opened my SoMachine project, downloaded it to PLCs and established communication without touching anything. After some time something corrupted and what ever I do and which ever number I sent from first PLC to second one I always had same result on second PLC. After I have done 'Reset origin' on first PLC which is sending data, after that reading results on second PLC were zero all the time. &lt;br/&gt;
After that I have done something like jzhvymetal proposed and nothing changed, readings are zero, ETH LED state lamp on PLCS is lightning steady green, WRITE_READ_VAR FBs don't display any error. &lt;/p&gt;
&lt;p&gt;If you have any idea about solution I would be grateful.&lt;/p&gt;
&lt;p&gt;Print screen of my two POUs is attached here : &lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: Modbus Comm.png" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=1734"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Modicon m241 Modbus TCP client server</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/d3178d584c/?limit=25#462f" rel="alternate"/><published>2020-02-27T14:08:27.727000Z</published><updated>2020-02-27T14:08:27.727000Z</updated><author><name>jzhvymetal</name><uri>https://forge.codesys.com/u/jzhvymetal/</uri></author><id>https://forge.codesys.comf41b5961bfc3c33f8bbad1fdf486826a080d563a</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;This is easy to do.  SE M241/M251 have a Modbus slave server running by default.  All that is required is to locate you variables on fixed IEC address.  &lt;/p&gt;
&lt;p&gt;Here how to map variables to IEC address&lt;/p&gt;
&lt;p&gt;To be a Modbus master client you have to use READ_VAR, WRITE_VAR, or READWRITE_VAR FB provided by SE. You address TCP using the following:&lt;/p&gt;
&lt;p&gt;‘&amp;lt;communication a.b.c.d="" port="" number=""&amp;gt;{&amp;lt;ip address=""&amp;gt;:&amp;lt;port&amp;gt;}’ &lt;br/&gt;
For example, to send a message at Modbus TCP slave IP address 192.168.1.2 using standard TCP port 502, use this string: ‘3{192.168.1.2}’&amp;lt;/port&amp;gt;&amp;lt;/ip&amp;gt;&amp;lt;/communication&amp;gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: READWRITE_VAR_EXAMPLE.png" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=1723"/&gt;&lt;/p&gt;
&lt;p&gt;&lt;a class="" href="https://forum.codesys.com//download/file.php?id=1721" rel="nofollow"&gt;SoM Modbus Table V3.xls &lt;span&gt;&lt;span&gt;[409 KiB]&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Modicon m241 Modbus TCP client server</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/d3178d584c/?limit=25#36d5" rel="alternate"/><published>2020-02-27T14:08:27.420000Z</published><updated>2020-02-27T14:08:27.420000Z</updated><author><name>MassSarr</name><uri>https://forge.codesys.com/u/masssarr/</uri></author><id>https://forge.codesys.com3d01a204a58054d44bf430c234cb188adbb2fc5d</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi singleton,&lt;/p&gt;
&lt;p&gt;my issue is client/server not master/slave. I have established master/slave configuration between HMI and PLC and now I want to make client/server network between two PLCs.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Modicon m241 Modbus TCP client server</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/d3178d584c/?limit=25#33e5" rel="alternate"/><published>2020-02-27T14:08:26.498000Z</published><updated>2020-02-27T14:08:26.498000Z</updated><author><name>singleton</name><uri>https://forge.codesys.com/u/singleton/</uri></author><id>https://forge.codesys.com9634a7999470a027181dcd9324a9d1efe6c102a8</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;br/&gt;
this is explained in the Online Help of SoMachine. "Programming with SoMachine --&amp;gt; Device Editors --&amp;gt; Modbus Configuration Editor".&lt;br/&gt;
There you can find informations on how to configure the master and the slave.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Modicon m241 Modbus TCP client server</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/d3178d584c/?limit=25#da63" rel="alternate"/><published>2020-02-27T14:08:26.184000Z</published><updated>2020-02-27T14:08:26.184000Z</updated><author><name>MassSarr</name><uri>https://forge.codesys.com/u/masssarr/</uri></author><id>https://forge.codesys.com0feb6a22ef94d402ba5dc4d6e34cef5cc1896588</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi to all of you, &lt;br/&gt;
I tried to establish Modbus TCP network with SoMachine software between two modicon m241 PLCs but without of any success so I would appreciate some help.&lt;br/&gt;
My goal is to configure one PLC as server and the other one as client in order to exchange data.&lt;br/&gt;
I have searched web and this forum for possible help but with no success so I made this post. &lt;br/&gt;
I tried various options and ways to set this configuration so I think it is better not to write anything what I did because bassically I don't know where I stuck and what is right way to make proper configuration.&lt;br/&gt;
Any kind of help will be great.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>