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

Join our "Ask Me About" community webinar on May 20th at 9 AM CET and 5 PM CET to explore cybersecurity and monitoring for Data Center and edge IT. Learn about market trends, cutting-edge technologies, and best practices from industry experts.
Register and secure your Critical IT infrastructure

M172 ModbusTCP read 32 bit real variable

HVAC and Pumping Forum

Support Forum for HVAC and pumping machines, Modicon M17x and EcoStruxure Machine Expert HVAC software for chillers, AHU, CRAC units for datacenters or process chillers applications - from design, implementation to troubleshooting and more, by Schneider Electric.

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
  • HVAC and Pumping Forum
  • M172 ModbusTCP read 32 bit real variable
Options
  • Subscribe to RSS Feed
  • 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
FedericoM
Commander FedericoM Commander
66
Bastian_Schmitz
Admiral Bastian_Schmitz Admiral
47
LeTomas
Lt. Commander LeTomas Lt. Commander
14
View All

Invite a Colleague

Found this content useful? Share it with a Colleague!

Invite a Colleague Invite
Solved Go to Solution
Back to HVAC and Pumping Forum
Solved
DVarnerMinn
Ensign DVarnerMinn
Ensign

Posted: ‎2023-02-10 03:05 PM

0 Likes
12
5545
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • 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: ‎2023-02-10 03:05 PM

M172 ModbusTCP read 32 bit real variable

I'm using ESME HVAC 1.4 and am trying to read a Mettler Toledo scale that has a 32bit real weight in two consecutive registers.

 

I'm not seeing a way to configure the Modbus Ethernet settings to read a REAL.

 

Is there a way to do this or to convert two WORDS to a REAL? In other environments I would normally create a union overlapping two words and a real variable registers or there would be a built in function.

 

Thanks in advance for any help on this. 

 

Labels
  • Labels:
  • HVAC
  • Tags:
  • english
Reply

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

  • All forum topics
  • Previous Topic
  • Next Topic

Accepted Solutions
Ismet_S
Ensign Ismet_S Ensign
Ensign

Posted: ‎2023-02-12 07:02 PM

0 Likes
1
5503
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • 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: ‎2023-02-12 07:02 PM

May be this could be an option..

See attached file

See Answer In Context

Attachments
Reply

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

Bastian_Schmitz
Admiral Bastian_Schmitz Admiral
Admiral

Posted: ‎2023-02-12 10:59 PM

0 Likes
3
5495
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • 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: ‎2023-02-12 10:59 PM

Or you use dedicated FB which is included but a little bit hidden in ESME HVAC. You can find the dedicated function block in the TVDAs. I did also attach this block.

 

The tip from Ismet is really usefull if you want to use this typ of modbus slave in the past and if you want to read a lot of values with different register addresses. In that case the configuration will be easier in the future. WIth the modbus custom object you could easiely creat your own macros.

See Answer In Context

Attachments
FB_WORD2IEEE754.zip
Reply

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

Replies 12
otrotabi
Lt. Commander otrotabi
Lt. Commander

Posted: ‎2023-02-11 11:35 AM

0 Likes
0
5523
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • 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: ‎2023-02-11 11:35 AM

My cent of help. I may be completely mistaken, I´ve never done this before:

 

I guess the real weight is something like:

 

realweight := uint1 + constant * uint2 . Is this what you mean by overlapping ? Is the format known ?

 

If you know this formula, conversion to a real value seems rather straightforward:

 

realweigth := TO_REAL(UINT1) + TO_REAL(UINT2) * CONSTANT, where constant should be a real value.

 

If for example your first word has integers while you second word has decimals, this would look like;

 

realweigth := TO_REAL(UINT1) + TO_REAL(UINT2) / 100.0;

 

Again, I´ve never done this so I might be completely oob here. Hope this helps.

 

Reply

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

DVarnerMinn
Ensign DVarnerMinn
Ensign

Posted: ‎2023-02-12 05:04 PM

0 Likes
0
5509
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • 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: ‎2023-02-12 05:04 PM

In some PLCs you could do the following as long as the scale maps the data in a real format used by the PLC.

 

%mw100 := word1;

%mw101 := word2;

real Weight := %mw100;

 

This would be similar to a C Union.

 

I either need to read a real register from the scale which I haven't figured out how to do in Machine Expert HVAC yet, map registers like a Union, or convert it.

 

My initial attempts to solve this have me stumped.

 

 

Reply

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

Ismet_S
Ensign Ismet_S Ensign
Ensign

Posted: ‎2023-02-12 07:02 PM

0 Likes
1
5504
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • 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: ‎2023-02-12 07:02 PM

May be this could be an option..

See attached file

Attachments
Reply

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

Bastian_Schmitz
Admiral Bastian_Schmitz Admiral
Admiral

Posted: ‎2023-02-12 10:59 PM

0 Likes
3
5496
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • 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: ‎2023-02-12 10:59 PM

Or you use dedicated FB which is included but a little bit hidden in ESME HVAC. You can find the dedicated function block in the TVDAs. I did also attach this block.

 

The tip from Ismet is really usefull if you want to use this typ of modbus slave in the past and if you want to read a lot of values with different register addresses. In that case the configuration will be easier in the future. WIth the modbus custom object you could easiely creat your own macros.

Attachments
FB_WORD2IEEE754.zip
Reply

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

DVarnerMinn
Ensign DVarnerMinn
Ensign

Posted: ‎2023-02-20 12:09 PM

In response to Bastian_Schmitz
0 Likes
0
5429
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • 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: ‎2023-02-20 12:09 PM

It looks like in simulation, this should work.

 

It is hard for me to find information in the TVDAs

 

Thanks!

Reply

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

DVarnerMinn
Ensign DVarnerMinn
Ensign

Posted: ‎2023-02-20 12:11 PM

In response to Ismet_S
0 Likes
0
5428
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • 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: ‎2023-02-20 12:11 PM

I had forgotten about this.

 

I saw it once but didn't use it.

 

I will have to give this a try when I have access to some hardware.

 

Thanks!

 

Reply

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

Hanif777
Crewman Hanif777
Crewman

Posted: ‎2023-04-10 02:26 AM

In response to Bastian_Schmitz
0 Likes
1
5177
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • 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: ‎2023-04-10 02:26 AM

What's the name of the FB in the ESME HVAC? is it the same as the one attached?

Reply

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

DVarnerMinn
Ensign DVarnerMinn
Ensign

Posted: ‎2023-04-11 09:49 AM

In response to Hanif777
0 Likes
0
5151
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • 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: ‎2023-04-11 09:49 AM

Yes it is.

 

Screenshot 2023-04-11 114749.png

 

Reply

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

Hanif777
Crewman Hanif777
Crewman

Posted: ‎2023-04-13 03:36 AM . Last Modified: ‎2023-04-13 03:37 AM

0 Likes
1
5129
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • 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: ‎2023-04-13 03:36 AM . Last Modified: ‎2023-04-13 03:37 AM

I managed to get the proper result using the FB method (reading a Powermeter Voltage)

 

awdawd.png

 

but it seems when using the Modbus Editor method I always got the word mixed up -> 

dwadaw.png

 

I've tried the "Modbus 32bit words order" setting, and there seems to be no difference, any suggestion?

Reply

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

DVarnerMinn
Ensign DVarnerMinn
Ensign

Posted: ‎2023-04-13 06:22 AM

In response to Hanif777
0 Likes
0
5122
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • 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: ‎2023-04-13 06:22 AM

I haven't tried the modbus custom editor yet.

 

What options are there for word and byte swapping? Maybe try them all??

 

You should be able to see the differences when displaying the result in hex format. If you don't something is wrong.

 

What version are you using and have you downloaded properly? I have found that if it still doesn't work to cycle the PLC power.

 

Reply

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

Hanif777
Crewman Hanif777
Crewman

Posted: ‎2023-04-13 10:10 AM . Last Modified: ‎2023-04-13 10:14 AM

0 Likes
0
5114
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • 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: ‎2023-04-13 10:10 AM . Last Modified: ‎2023-04-13 10:14 AM

I think I figured it out:

 

Somehow that particular setting  (and only that setting, I've tried others) didn't get applied when changed unless you restart the whole application

 

I've tried it multiple time just to confirm*
- removed the existing modbus device from the RS-485-2 (w/ unswapped word order) and re-added it after changing it in the editor

   -> wrong order

- Added a completely new modbus device in the catalog w/ the proper setting using the editor (swapped REAL & DWORD) 

   -> correct order

- Same with the first, but for the working modbus device

   -> still correct order

- Restarted the app and downloaded all to the PLC (with the unswapped order in the new modbus device)

   -> finally incorrect order

 

*All without hard-unplugging the PLC, just the reboot request from the software when downloading all

 

So yeah that's an interesting quirk with the software, but I'm glad to get to bottom of it ðŸ™‚

Reply

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

Bastian_Schmitz
Admiral Bastian_Schmitz Admiral
Admiral

Posted: ‎2023-04-17 11:37 AM

1 Like
0
5074
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • 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: ‎2023-04-17 11:37 AM

If you change something in configuration part of the software you need to make a download all, or you need to download the connec.par file separat via commisioning right mouse click on cfg file to update the communicaiton.

Reply

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