Member Login
member
passwd
remember me on
this computer.

- join now -
- forgot username or password? -

Search

Jump to a Date

Sponsored Communities
Cool stuff
Select a topic of interest:
...and press:
Neat Stuff
Control.com Stuff

Visit our shop for nerds in control lifestyle products.

Fortune
Your lucky number is 3552664958674928. Watch for it everywhere.
RSS Feed
RSS feed Use this link to get an RSS feed of the Control.com article flow, for private, non-commercial use only:
www.control.com/rss/
To get a personalized feed, become a member at no cost.
Select a Page Style
Select one of the following styles:
- BluFu
- Classic
(cookies required)
advertisement
from the Modbus department...
Modbus Register Scaling
Engineering and workplace issues. topic
Posted by KIRAN PATEL on 31 July, 2008 - 12:10 am
I want to bring data from controller through a Modbus link. The flow is 0-101000 SCFM and the register is scaled for 0-102.4%.

The option would report 100 percent as 0x0FA0. 0x0FFF would then correspond to 102.375 percent.

If I convert this 0X0FFF in numeric then it will be a 32716.

How can I scale this Modbus address in 30001 series for 0 - 100 % value with square root considered here?


Posted by Michael Griffin on 1 August, 2008 - 12:41 am
y = mx + b

b = offset (zero in your case)
m = scale factor.
x = original value
y = scaled value

if 100% = 101000, then m = x/y, or 32716 / 101000, or m = 0.323920792. In other words, multiply your original value by 0.323920792, or divide it by 3.087174471. If you don't have floating point math on your device, then you will have to use an integer scale factor (e.g. 3) and 100% will be slightly lower (not 0x0FA0). If you don't have division but have shift right/left, then you can use a right shift of 2 places (which is the same as divide by 4) and accept a lower full scale value.

If this doesn't answer your question, then you need to be clearer as to what your question is.

From Control Engineering magazine...
Related articles from Control Engineering magazine
Above articles copyright 2008 Reed Business Information. Subject to its Terms of Use.
Your use of this site is subject to the terms and conditions set forth under Legal Notices and the Privacy Policy. Please read those terms and conditions carefully. Subject to the rights expressly reserved to others under Legal Notices, the content of this site and the compilation thereof is © 1999-2008 Control Technology Corporation. All rights reserved.

Users of this site are benefiting from open source technologies, including PHP, MySQL and Apache. Be happy.

Internet Explorer 6.0 Fix

Advertisement
Our Advertisers
Help keep our servers running...
Patronize our advertisers!