<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Modbus read/write, PI as slave</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/dcdefd67e9/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Runtime/thread/dcdefd67e9/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Runtime/thread/dcdefd67e9/</id><updated>2020-02-27T15:55:38.372000Z</updated><subtitle>Recent posts to Modbus read/write, PI as slave</subtitle><entry><title>Modbus read/write, PI as slave</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/dcdefd67e9/?limit=25#d405" rel="alternate"/><published>2020-02-27T15:55:38.372000Z</published><updated>2020-02-27T15:55:38.372000Z</updated><author><name>penngolliwog</name><uri>https://forge.codesys.com/u/penngolliwog/</uri></author><id>https://forge.codesys.com0c50fd180fd70df973b96dd61f20e2b4927c5676</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Thanks Strucc for the sample program.&lt;br/&gt;
I had the same problem.&lt;/p&gt;
&lt;p&gt;I have expanded your idea and written a FB to handle synchronism.&lt;/p&gt;
&lt;p&gt;&lt;a class="" href="https://forum.codesys.com//download/file.php?id=4021" rel="nofollow"&gt;FB_ModbusIO.zip &lt;span&gt;&lt;span&gt;[2.33 KiB]&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Modbus read/write, PI as slave</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/dcdefd67e9/?limit=25#b1ab" rel="alternate"/><published>2020-02-27T15:55:36.064000Z</published><updated>2020-02-27T15:55:36.064000Z</updated><author><name>philobedo</name><uri>https://forge.codesys.com/u/philobedo/</uri></author><id>https://forge.codesys.com048d71c8e9dcccf0b4966d6d7e15fe5abe84dc18</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I have the same problem when IP is Modbus slave, the holding register values do not change whether in writing from the Modbus master or from the slave. I use the demo.&lt;br/&gt;
Best regards.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Modbus read/write, PI as slave</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/dcdefd67e9/?limit=25#c0e7" rel="alternate"/><published>2020-02-27T15:55:35.310000Z</published><updated>2020-02-27T15:55:35.310000Z</updated><author><name>Strucc</name><uri>https://forge.codesys.com/u/strucc/</uri></author><id>https://forge.codesys.comcb109b195fd2a8f1da57d226183960e8f97cecf5</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I get it now... &lt;/p&gt;
&lt;p&gt;Yep, it's a typical synchronization issue.&lt;br/&gt;
I created a sample project (running on CodeSys Control WinV3), I hope it helps.&lt;br/&gt;
Monitor the GVL_MASTER, and GVL_SLAVE variable lists. You can overwrite slave data from the Master, by changing wToSlave...&lt;/p&gt;
&lt;p&gt;&lt;a class="" href="https://forum.codesys.com//download/file.php?id=964" rel="nofollow"&gt;ModbusMasterSlaveDemo.project &lt;span&gt;&lt;span&gt;[167.45 KiB]&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Modbus read/write, PI as slave</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/dcdefd67e9/?limit=25#190a" rel="alternate"/><published>2020-02-27T15:55:33.159000Z</published><updated>2020-02-27T15:55:33.159000Z</updated><author><name>urbanlarsson</name><uri>https://forge.codesys.com/u/urbanlarsson/</uri></author><id>https://forge.codesys.comee3831111f3111422756a34ee5ea291927b14efc</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Yes, but i don't really get it how it works  All my tests fail.&lt;/p&gt;
&lt;p&gt;/U&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Modbus read/write, PI as slave</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/dcdefd67e9/?limit=25#40fd" rel="alternate"/><published>2020-02-27T15:55:32.408000Z</published><updated>2020-02-27T15:55:32.408000Z</updated><author><name>Strucc</name><uri>https://forge.codesys.com/u/strucc/</uri></author><id>https://forge.codesys.comf14b1088c7dfa89542fcedfd3f139f117fe351e5</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Did you see the &lt;br/&gt;
Checkbox in the ModBus TCP Slave device, ModbusTCP tab / Data model?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Modbus read/write, PI as slave</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/dcdefd67e9/?limit=25#228e" rel="alternate"/><published>2020-02-27T15:55:31.658000Z</published><updated>2020-02-27T15:55:31.658000Z</updated><author><name>urbanlarsson</name><uri>https://forge.codesys.com/u/urbanlarsson/</uri></author><id>https://forge.codesys.comc67d547e5faac31023b5df5c117b0ac3d6810633</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Yes i'm using the slave as your screendump, and there are only inputs AND output registers, no combo-register (eg 40000 to 49999 in "normal" modbus),&lt;br/&gt;
the runtime can't alter the variables mapped to modbus inputs.&lt;/p&gt;
&lt;p&gt;/U&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Modbus read/write, PI as slave</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/dcdefd67e9/?limit=25#e765" rel="alternate"/><published>2020-02-27T15:55:29.507000Z</published><updated>2020-02-27T15:55:29.507000Z</updated><author><name>Strucc</name><uri>https://forge.codesys.com/u/strucc/</uri></author><id>https://forge.codesys.comd0ff0aa9cc8fc5b95dc81dd6a4d20bd9ffa8bcf1</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;??? What are you using for Modbus communication? Is this something PI specific?&lt;/p&gt;
&lt;p&gt;Did you see this?&lt;/p&gt;
&lt;p&gt;&lt;a class="" href="http://forum.codesys.com/viewtopic.php?f=11&amp;amp;t=6049" rel="nofollow"&gt;http://forum.codesys.com/viewtopic.php?f=11&amp;amp;t=6049&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: Bild" rel="nofollow" src="http://forum.codesys.com/download/file.php?id=962"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Modbus read/write, PI as slave</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/dcdefd67e9/?limit=25#2363" rel="alternate"/><published>2020-02-27T15:55:28.721000Z</published><updated>2020-02-27T15:55:28.721000Z</updated><author><name>urbanlarsson</name><uri>https://forge.codesys.com/u/urbanlarsson/</uri></author><id>https://forge.codesys.com2cd22d46523c1103836dc39f498d97d54f09f9ef</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;You only have input and outregister, no comboregister,&lt;/p&gt;
&lt;p&gt;runtime can read from 40000 and write to 30000, and there is som function called input and output registers overlay, but I don't get it to work as I want and are used to.&lt;/p&gt;
&lt;p&gt;/U&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Modbus read/write, PI as slave</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/dcdefd67e9/?limit=25#dea3" rel="alternate"/><published>2020-02-27T15:55:26.597000Z</published><updated>2020-02-27T15:55:26.597000Z</updated><author><name>Strucc</name><uri>https://forge.codesys.com/u/strucc/</uri></author><id>https://forge.codesys.comc111c5d671cd47234e9ea236b406faa9f21af041</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;It should be possible with holding registers...&lt;br/&gt;
Just "map" it to a variable, that you can read and write. The variable will be updated, if it's updated by the master.&lt;br/&gt;
I didn't try with PI, but I think Modbus TCP and RTU functionality is common for all platforms.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Modbus read/write, PI as slave</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/dcdefd67e9/?limit=25#f92d" rel="alternate"/><published>2020-02-27T15:55:25.861000Z</published><updated>2020-02-27T15:55:25.861000Z</updated><author><name>urbanlarsson</name><uri>https://forge.codesys.com/u/urbanlarsson/</uri></author><id>https://forge.codesys.com637e37c1be05ee7dd838d2af46f38d7c32028516</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;The problem isn't data sync, it's that I'm used to slaves that can both read and write to there own modbus registers, the PI only can read from 40000, it can't write to it.&lt;/p&gt;
&lt;p&gt;So it can't be used both for input and output.&lt;/p&gt;
&lt;p&gt;/U&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>