<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to What the right way to update TCP/COM slave device holding registers</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/ad15bf9c51/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/ad15bf9c51/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/ad15bf9c51/</id><updated>2024-07-01T10:13:14.787000Z</updated><subtitle>Recent posts to What the right way to update TCP/COM slave device holding registers</subtitle><entry><title>What the right way to update TCP/COM slave device holding registers</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/ad15bf9c51/?limit=25#7978" rel="alternate"/><published>2024-07-01T10:13:14.787000Z</published><updated>2024-07-01T10:13:14.787000Z</updated><author><name>wbj0t</name><uri>https://forge.codesys.com/u/wbj0t/</uri></author><id>https://forge.codesys.come27fd8f9a61c735fcb43267a95b50f4cf0ea59fe</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi all :)&lt;br/&gt;
I have an plc. This plc has option to be as slave device.&lt;br/&gt;
There are TCP -&amp;gt; Slave Device and COM -&amp;gt; Slave Device. &lt;br/&gt;
There are 4096 ModBus holding registers with mark "internal modify" for the both devices above. So, COM Slave has 4096 registers and TCP Slave has 4096 registers.&lt;br/&gt;
And, finally, I have an ARRAY&lt;span&gt;[0..4095]&lt;/span&gt; OF WORD. This array glued with COM Slave and TCP slave. Yes, I need plc's opportunity to be communication both TCP and COM ways  for the same registers.&lt;/p&gt;
&lt;p&gt;For example, the next task structure:&lt;br/&gt;
* TASK_0:&lt;br/&gt;
    1. pou_READ_Registers&lt;br/&gt;
    2. pou_0&lt;br/&gt;
    3. pou_1&lt;br/&gt;
    4. ...&lt;br/&gt;
    5. pou_N&lt;br/&gt;
    6. pou_WRITE_Registers&lt;br/&gt;
At the first pou I read registers for the other pous, after job we have sort of state of the plc. At the last pou (6) we write modified registers. It is a good scenario: some one wrote registers for the job, after job we save these (modified) registers.&lt;br/&gt;
But, what if registers wrote between 1 and 6 pou by operator, for example, at the 3 pou -&amp;gt; the last pou 'pou_WRITE' will rewrite this request from operator.&lt;br/&gt;
What the right way to work with this logic? Thanks you.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>