Member Login
member
passwd
remember me on this computer.

- join now -

Search

Past & Future Posts
Neat Stuff

Visit our shop for nerds in control lifestyle products.

Cool stuff
Select a topic of interest:
...and press:
Fortune
Of what you see in books, believe 75%. Of newspapers, believe 50%. And of
TV news, believe 25% -- make that 5% if the anchorman wears a blazer.
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
Select a Page Style
Select one of the following styles:
- BluFu
- Classic
(cookies required)
from the Automation List department...
Data interpretation
Applications topic
advertisement
Posted by Peter Preininger on 26 November, 2007 - 11:29 pm
Hello,

I am developing some kind of SCADA application and have a problem with the interpretation of data. Let's assume we have a client which stores a double float, which has a length of 64 bit. The value is presented as 12345678 (each number refers to one byte number).

The client has got a lot of different ways to store and send it to the master (the following byte orders show the sent data words):

1. 12 34 56 78
2. 87 65 43 21
3. 78 56 34 12

Is it also possible that a client sends the following data words:

4. 34 12 78 56
5. 43 21 87 65
6. 21 34 56 87

I assume that 4, 5 and 6 are rather unlikely because this would mean a mix of big endian and little endian notation within one client. Is that correct?
Are any other combinations possible?

Of course this problem also occurs when operating strings.

Thank you for your help.

Posted by Fred Loveless on 27 November, 2007 - 11:48 pm
The byte order is very important in the way a Modbus Master and a Modbus Slave talk to each other. If you are writing a SCADA application that uses a communications package (OPC or DDE Server) to communicate with the Modbus device then that package where a master of a slave needs to be configurable so that it can be adjusted to handle the byte order of the device data.

That said in 12 years I do not recall any devices that do Modbus and mix the byte order. They are usually one way or the other.

Check out Kepware's Modbus Suite. It is highly configurable and works with nearly all of the Modbus enabled devices out there.

http://www.kepware.com/Products/products_OPCServers.html#AnchorM

Fred Loveless
Support Manager
Kepware Technologies

Posted by David on 27 November, 2007 - 11:53 pm
Honeywell's HC900 hybrid controller uses floats (exclusively?), so it offers all four options for the IEEE Floating Point Data Format:

mantissa x 2 ^(exponent -127)
(23 bit signed binary with 8 bit biased binary exponent)
where the order is byte 4 byte 3 byte 2 byte 1
where byte 4 starts with the mantissa's positive/negative sign bit

those 4 formats being:
Floating Point Big Endian Format: 4, 3, 2, 1
FP BB Floating Point Big Endian with byte-swapped: 3, 4, 1, 2
FP L Floating Point Little Endian Format: 1, 2, 3, 4
FP LB Floating Point Little Endian with byte-swapped: 2, 1, 4, 3

Their communication manual, 51-52-25-111, details the formats on pages 18-24 (pdf).
The document resides at
http://hpsweb.honeywell.com/NR/rdonlyres/01B126BB-D667-4C0B-8678-2 1C21DF10520/34880/515225111.pdf

Given the world of open standard Modbus and its huge variety of implementations, it would pay to cover your bases for a Modbus master in a SCADA system.

David

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, PostgreSQL and Apache. Be happy.

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