We Value Your Feedback!
Could you please spare a few minutes to share your thoughts on Cloud Connected vs On-Premise Services. Your feedback can help us shape the future of services.
Learn more about the survey or Click here to Launch the survey
Schneider Electric Services Innovation Team!
Modicon PAC Forum
A forum for topics related to the scope of Modicon PAC offers and ecosystem along the whole lifecycle: Modicon M580 and 340, EcoStruxure Control Expert, EcoStruxure Process Expert (Unity Pro) and more.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2025-06-05 04:22 AM
Hello,
We are having a problem writing to a Modbus TCP/IP device, the registers we are trying to write to are 40018 and 40019.
We are successful in reading from the device using the DTM browser, but writing is more challenging. We have tried both using the DTM browser and WRITE_VAR function block. The WRITE_VAR management table gives the communication error 07 "Problem in sending to the destination".
This could've been a problem with 'Node_ID' but since the DTM browser read works, this means the 'Node_ID' is the standard 255.
The documentation we've been given states that the device expects a WORD. Don't know if this matters?
Also: the DTM write has a "Freshness" that sometimes goes to 0, what exactly does this mean?
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2025-06-09 07:16 AM
I would suggest try READ_VAR block instead DTM and see if that gives any different results. Just like you have two requests in DTM you will have to configure two READ_VAR blocks. You can also create logic to execute only one block at a time.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2025-06-05 05:06 AM
Can you let us know what device you are trying to communicate with. Modbus DTM as well as WRITE_VAR block use modbus function code 16 (write multiple registers). Some modbus devices support only function code 6 (write single register).
The freshness bit drops out when timeout occurs i.e. no response from the modbus device.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2025-06-09 12:44 AM
Aha, that's interesting, thanks for the info. We are trying to read and write to a Siemens S7-1200 PLC, but we do not have access to the PLC, only the address and registers given. But it doesn't seem to be the issue, we have confirmed with the device manufacturer that Modbus function code 16 is accepted.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2025-06-09 07:16 AM
I would suggest try READ_VAR block instead DTM and see if that gives any different results. Just like you have two requests in DTM you will have to configure two READ_VAR blocks. You can also create logic to execute only one block at a time.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2025-06-09 09:16 PM
Hi,
First try with PC and modbus simulator as you can see exactly what the device reply code is. From the code it is easy to determine what the issue is. Most simulators can select single write (code 06) or multiple write (code 16). It will also give indication if the registers exist, most of the time you try to read/write a block of registers, if 1 register in the block does not exist in the end device, it will reply with a fault code.
BR
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2025-06-11 03:15 AM
Alright, the problem laid in the DTM-browser. After removing the DTM - requests, the WRITE_VAR started to work. The DTM will be moved to a READ_VAR block and logic which only activates one READ/WRITE_VAR block at a time will be created. Thanks Ciupol!
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2025-06-13 02:07 AM
I've seen this problem many times before with siemens PLCs, it seems like they accept ony one concurrent TCP session (or modbus request) at a time, don't know if there is a setting to enable more in them.
The DTM browser does not like this, it likes to do stuff asynchronously (more than one request might be active at the same time). The gateway/bridge device checkbox may help but that is just a guess since that indicates that the slave might be a modbus TCP to modbus RTU gateway and modbus RTU is also synchronous, one request at a time.
Kind regards
David
Link copied. Please paste this link to share this article on your social media post.
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.
With achievable small steps, users progress and continually feel satisfaction in task accomplishment.
Usetiful Onboarding Checklist remembers the progress of every user, allowing them to take bite-sized journeys and continue where they left.
of