Vidmas30 Posted December 6, 2019 Report Share Posted December 6, 2019 Hi all, I use US5-B10-TR22 to read data from Modbus slaves. Technical documentation of slaves gives such information (see attached picture). Could someone tell if in US5 is the same byte order (didn't find that information). As for now everything looks OK, but I'm afraid that there could be a problem when there will be large numbers accumulated. Thank you in advance. Quote Link to comment Share on other sites More sharing options...
MVP 2022 Joe Tauser Posted December 7, 2019 MVP 2022 Report Share Posted December 7, 2019 What you've shown here is the standard Modbus definition for regular 16 bit integers. This is old school Modbus for Unitronics and the US5 will be fine. What it doesn't say is whether the return data is signed or unsigned. In other words, is the maximum value 32,767 or 65,535. Do you have an idea of the magnitude of the data the slaves will return? Joe T. Quote Link to comment Share on other sites More sharing options...
Vidmas30 Posted December 7, 2019 Author Report Share Posted December 7, 2019 Thanks for the quick feedback, Joe! Attached information about magnitude All the infomation I'm reading is INT32. Quote Link to comment Share on other sites More sharing options...
MVP 2022 Joe Tauser Posted December 7, 2019 MVP 2022 Report Share Posted December 7, 2019 You're probably going to have to swap the words on anything you read in 32 bit land. Look at this post on how to do that- http://forum.unitronics.com/topic/6241-read-single-precision-arrays-with-modbus-tcpip/ Joe T. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.