Passing "Analog" data via MODBUS

Strictly speaking does MODBUS only allow for the passing of positive integer data? I have an application where a DCS is to communicate with a PLC via MODBUS. Some of the “analog” points are positive integer values ( e.g. 0-100 PSIG ) where the variable changes in increments of 1 PSIG. No problem – a two byte holding register with a “range” of 0-65535 will pass this right? What about power factor which has a range of negative one to positive one ( -1.0 to +1.0 ). Does MODBUS have means of using a 2’s comp scheme or scaling? What about fractional values?

Thanks in advance -
 
F

Frank Prendergast

The beauty about Modbus protocol is that it does not care what form your data is in.

To transfer a signed int and an unsigned int Modbus just transfers one 16 bit register. The receiving application just has to know whether to accept a signed or unsigned value.

To transfer a real or floating point number you just transfer two registers and the receiving application translates the data as the IEEE floating point number.

Get more information on http://www.modbus.org or http://eclipse.modicon.com.
 
Modbus allows for 16bit and 32 bit signed Integers as well as IEEE 32bit floating point. The 16bit signed format is usually used for power factor in energy meters to give it a +/- value and then divided by 100 in the Scada or master to scale it in the +1/-1 range

The floating point can be a little tricky as some devices use motorola byte count and others use Intel byte count. (BigEndian/LittleEndian). A good modus master can account for both types.

See Modbus spec for more details.

There are also many special data formats that are vendor specific.
 
M
A MODBUS register is a 16 bit entity - it is transported by MODBUS as such,
without any data typing assumed (what the 16 bits represent - integer, real
,etc.). It is up to the applications at both ends to agree upon what the 16
bits represent.
Compare with the telegraph that transports letters - it is between the
writer and the reader of the telegram to agree what they mean in terms of
words and sentences.
Meir

 
M
The BigEndian/LittleEndian issue is also true for 16 bit registers - but it is outside the scope of MODBUS.

Meir
 
Top