EmbeddedRelated.com
Forums

constructing modbus tcp messages for float and 32 bit integers

Started by prasi November 29, 2005
hi all
Can anyone please Explain me how to handle float and 32 bit values in
modbusTCP protocol.
I have searched them net,got something but i didn't  understand.
thanks in advance.

On 28 Nov 2005 23:14:23 -0800, "prasi" <kp.prasanna@gmail.com> wrote:


>Can anyone please Explain me how to handle float and 32 bit values in >modbusTCP protocol.
Put 16 bits in e.g. register 1000 and the rest 16 bits into register 1001. Use two adjacent registers for the 32 bit and/or floating point data. Which 16 bits (and in what byte order) should be put into reg 1000 and what into reg 1001 that you have to figure out yourself. The convention varies from device to device. Some device might even expect non-IEEE floating point formats :-). Paul