Standard MODBUS Data Types

J

Thread Starter

Jimmie Curry

We manufacture field measurement equipment and would like to emplement slave communications.

Many of my internal registers are IEEE float, signed and unsigned 32 bit ints, and null terminated strings of variable length. Additionally, some files contain more than 10,000 records.

How are these differences handled and still standard?

Thanks
JimC
 
To keep with the Modbus standard, 32 bit data should be sent in order of high byte first to low byte last. Also, since Modbus is primarily 16 bit, be sure to force the user to read at least a pair of registers for each 32 bit data, or give an address error response. The above can be applied to any data longer than 16 bits.

For your files, you may wish to implement a device-specific command. Unfortunately most masters will not be able to implement the device-specific commands.

For strings, I suggest a fixed array size of character pairs, and terminate and/or pad with zeros/nulls.
 
Thread starter Similar threads Forum Replies Date
A Modbus 4
B Modbus 3
D Modbus 0
B Modbus 3
S Modbus 4
Top