<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Codesys "Write Values" &amp; "Write Recipe" Fails On Modbus Mapped Variables</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/37e9cb268f/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/37e9cb268f/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/37e9cb268f/</id><updated>2022-07-22T19:24:17.831000Z</updated><subtitle>Recent posts to Codesys "Write Values" &amp; "Write Recipe" Fails On Modbus Mapped Variables</subtitle><entry><title>Codesys "Write Values" &amp; "Write Recipe" Fails On Modbus Mapped Variables</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/37e9cb268f/?limit=25#fc7d" rel="alternate"/><published>2022-07-22T19:24:17.831000Z</published><updated>2022-07-22T19:24:17.831000Z</updated><author><name>rckalex</name><uri>https://forge.codesys.com/u/rckalex/</uri></author><id>https://forge.codesys.com0232e625d5c41b3860c7df2a9b8253c5a52612f0</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Device Tested: Codesys Control Win V3 x64 (3.5.18.0)&lt;br/&gt;
Codesys Version: 3.5 SP18 64bit&lt;br/&gt;
Configuration:&lt;br/&gt;
Codesys is acting as a Modbus Slave (ModbusTCP Slave Device).&lt;br/&gt;
General Configured Parameters:&lt;br/&gt;
Holding Registers: 10 (%QW) Writeable&lt;br/&gt;
Input Registers: 10 (%QW)&lt;br/&gt;
Coils: 0&lt;br/&gt;
Discrete Inputs: 0&lt;br/&gt;
Data Model: 0/0/0/0&lt;br/&gt;
In a global variables list I declared the following:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="err"&gt;UI_Word_1   AT %QW0 : WORD;&lt;/span&gt;
&lt;span class="err"&gt;UI_Word_2   AT %QW1 : WORD;&lt;/span&gt;
&lt;span class="err"&gt;UI_Word_3   AT %QW2 : WORD;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Behavior:&lt;br/&gt;
Unable to use the "Write Values" function in the Debug menu to set the value of variable mapped to the Modbus TCP Slave from Codesys. I am able to successfully write to the variable from within the logic. I am able to successfully force the value. After releasing the force, the forced value is retained.&lt;/p&gt;
&lt;p&gt;Unable to use the "Write Recipe" function to update mapped variables.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>