<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Modbus write via FB failure</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/a7c7682555/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/a7c7682555/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/a7c7682555/</id><updated>2025-11-06T13:28:41.535000Z</updated><subtitle>Recent posts to Modbus write via FB failure</subtitle><entry><title>Modbus write via FB failure</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/a7c7682555/?limit=25#c5ba" rel="alternate"/><published>2025-11-06T13:28:41.535000Z</published><updated>2025-11-06T13:28:41.535000Z</updated><author><name>aris</name><uri>https://forge.codesys.com/u/aris/</uri></author><id>https://forge.codesys.com45a024fe440cba9c14e5252abd3ae10044cc9dd0</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi all,&lt;br/&gt;
I am using CoDeSys V3.5 and a soft controller Win V3x64. I am trying to read a modbus slave via Function Blocks and not via the channels of the hardware tree for the Slave. I created some requests of type ModbusRequest and I notice that I can read Input Registers and Cpils but I can not write Holding Registers and Coils. I am using the library IoDrvModbusTCP 4.1.0.0. When i just use a single modbus request with FC06 (or FC16), there is no request sent to the slave and although the xExecute takes its true value from a pulse of 2 seconds duration, I take almost every 3 minutes an error "TCP_COMMUNICATION_ERROR - 16#A5 - TCP Port. error. Request was not sent". My code is ok because if i change the function code for reading registers, everything works fine. Did anyone had this issue in the past? Thank you in advance.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>