Help
  • Explore Community
  • Get Started
  • Ask the Community
  • How-To & Best Practices
  • Contact Support
Notifications
Login / Register
Community
Community
Notifications
close
  • Forums
  • Knowledge Center
  • Events & Webinars
  • Ideas
  • Blogs
Help
Help
  • Explore Community
  • Get Started
  • Ask the Community
  • How-To & Best Practices
  • Contact Support
Login / Register
Sustainability
Sustainability

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!

Not able to write to Modbus TCP/IP register

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.

cancel
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Home
  • Schneider Electric Community
  • Industrial Automation
  • Modicon PAC Forum
  • Not able to write to Modbus TCP/IP register
Options
  • Mark Topic as New
  • Mark Topic as Read
  • Float this Topic for Current User
  • Bookmark
  • Subscribe
  • Mute
  • Printer Friendly Page
Invite a Co-worker
Send a co-worker an invite to the portal.Just enter their email address and we'll connect them to register. After joining, they will belong to the same company.
You have entered an invalid email address. Please re-enter the email address.
This co-worker has already been invited to the Exchange portal. Please invite another co-worker.
Please enter email address
Send Invite Cancel
Invitation Sent
Your invitation was sent.Thanks for sharing Exchange with your co-worker.
Send New Invite Close
Top Experts
User Count
ciupol
Lieutenant ciupol
9
MatthewM
Lt. Commander MatthewM
8
RoozeeR
Lt. Commander RoozeeR Lt. Commander
7
Trinxs1
Lt. Commander Trinxs1 Lt. Commander
6
View All

Invite a Colleague

Found this content useful? Share it with a Colleague!

Invite a Colleague Invite
Solved Go to Solution
Back to Modicon PAC Forum
Solved
zimppe
zimppe
Cadet

Posted: ‎2025-06-05 04:22 AM

0 Likes
6
221
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2025-06-05 04:22 AM

Not able to write to Modbus TCP/IP register

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?  

Labels
  • Labels:
  • 02. Modicon M580 ePAC
  • Tags:
  • english
Reply
Contact Support

Link copied. Please paste this link to share this article on your social media post.

  • All forum topics
  • Previous Topic
  • Next Topic

Accepted Solutions
ciupol
Lieutenant ciupol
Lieutenant

Posted: ‎2025-06-09 07:16 AM

0 Likes
0
134
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

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.

See Answer In Context

Reply
Contact Support

Link copied. Please paste this link to share this article on your social media post.

Replies 6
ciupol
Lieutenant ciupol
Lieutenant

Posted: ‎2025-06-05 05:06 AM

0 Likes
1
217
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

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.

Reply
Contact Support

Link copied. Please paste this link to share this article on your social media post.

zimppe
zimppe
Cadet

Posted: ‎2025-06-09 12:44 AM

In response to ciupol
0 Likes
0
161
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

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.  

Reply
Contact Support

Link copied. Please paste this link to share this article on your social media post.

ciupol
Lieutenant ciupol
Lieutenant

Posted: ‎2025-06-09 07:16 AM

0 Likes
0
135
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

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.

Reply
Contact Support

Link copied. Please paste this link to share this article on your social media post.

Hennie_Smith
Lieutenant JG Hennie_Smith Lieutenant JG
Lieutenant JG

Posted: ‎2025-06-09 09:16 PM

0 Likes
0
142
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

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

Reply
Contact Support

Link copied. Please paste this link to share this article on your social media post.

zimppe
zimppe
Cadet

Posted: ‎2025-06-11 03:15 AM

0 Likes
0
76
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

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! 

Reply
Contact Support

Link copied. Please paste this link to share this article on your social media post.

dnordenberg1
Lieutenant dnordenberg1
Lieutenant

Posted: ‎2025-06-13 02:07 AM

0 Likes
0
56
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

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

Reply
Contact Support

Link copied. Please paste this link to share this article on your social media post.

Preview Exit Preview

never-displayed

You must be signed in to add attachments

never-displayed

 
To The Top!

Forums

  • APC UPS Data Center Backup Solutions
  • EcoStruxure IT
  • EcoStruxure Geo SCADA Expert
  • Metering & Power Quality
  • Schneider Electric Wiser

Knowledge Center

Events & webinars

Ideas

Blogs

Get Started

  • Ask the Community
  • Community Guidelines
  • Community User Guide
  • How-To & Best Practice
  • Experts Leaderboard
  • Contact Support
Brand-Logo
Subscribing is a smart move!
You can subscribe to this board after you log in or create your free account.
Forum-Icon

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.

Register today for FREE

Register Now

Already have an account? Login

Terms & Conditions Privacy Notice Change your Cookie Settings © 2025 Schneider Electric

This is a heading

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