<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to RPi's as both Master + Slave Modbus TCP/IP</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/b327517749/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Runtime/thread/b327517749/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Runtime/thread/b327517749/</id><updated>2020-02-27T15:41:46.856000Z</updated><subtitle>Recent posts to RPi's as both Master + Slave Modbus TCP/IP</subtitle><entry><title>RPi's as both Master + Slave Modbus TCP/IP</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/b327517749/?limit=25#5281" rel="alternate"/><published>2020-02-27T15:41:46.856000Z</published><updated>2020-02-27T15:41:46.856000Z</updated><author><name>Anonymous</name><uri>https://forge.codesys.com/u/*anonymous/</uri></author><id>https://forge.codesys.com9dd4aac9c4200abe3721081ce572344b2ce6fc35</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;em&gt;Originally created by:&lt;/em&gt; Primitive Source&lt;/p&gt;
&lt;p&gt;I have worked this out. You can add a Slave device under the main ethernet adaptor, take variables from my programme and pass these over modbus to be read by another programme.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>RPi's as both Master + Slave Modbus TCP/IP</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/b327517749/?limit=25#6bc1" rel="alternate"/><published>2020-02-27T15:41:44.791000Z</published><updated>2020-02-27T15:41:44.791000Z</updated><author><name>Anonymous</name><uri>https://forge.codesys.com/u/*anonymous/</uri></author><id>https://forge.codesys.com37b7ad6db933dc56ec80846c18ae2ce2a8a0df66</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;em&gt;Originally created by:&lt;/em&gt; Primitive Source&lt;/p&gt;
&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I'm sure this can be done, I just need a point in the right direction.&lt;/p&gt;
&lt;p&gt;I would like to have have 1 Raspberry Pi as my Modbus master, so I open a raspberry pi project in Codesys at ethernet device and a slave channel. I have a couple of Modbus slaves bring back sensor data. I then run some calculation on the sensor data have a new value. I write the value to a Variable.&lt;/p&gt;
&lt;p&gt;Is there a way to set up a second Raspberry Pi as a Modbus slave, add this as a new slave in my project and write the new calculation variable to a modbus register? If so, is there any example code showing me how to do this?&lt;/p&gt;
&lt;p&gt;I can find a lot about setting up the Pi using pyModbus but nothing really describes what I am trying to do. This is the closest I can find to what I am trying t do but not sure if  &lt;/p&gt;
&lt;p&gt;&lt;a class="" href="https://pymodbus.readthedocs.io/en/latest/examples/asynchronous-server.html" rel="nofollow"&gt;https://pymodbus.readthedocs.io/en/late ... erver.html&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;thanks&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>