In Modbus nomenclature, the term data refers to the status of coils and inputs, which can be on or off. In the common object model these equate to two states: active or inactive (true or false). The Modbus protocol does not dictate how to format input and holding registers in terms of which data type and numerical encoding to use. A Modbus device vendor can choose any data type and configure the device with one or more consecutive 16-bit registers.
The Modbus protocol provides four numeric data types for input and holding registers. The driver supports these registers using standard Framework Boolean, Numeric and Enum data types.
Integer represents an unsigned 16-bit numeral using a single register that ranges from 0 to 65,535. In some systems (or devices),
the term “word” refers to this unsigned, 16-bit integer value.This is, perhaps, the most popular data type. It is the driver’s data type for an unsigned, 16-bit integer value, and is the default data type for many newly-created Modbus proxy points.
Float refers to a floating-point computation using a 32-bit single-precision scaling base, sometimes called “real.” Very small
and large numbers are possible. This data type requires two consecutive registers. In addition, the driver supports two byte-order
schemes for float values (3-2-1-0 or 1-0-3-2).Proxy points automatically allocate two consecutive registers for each data item whenever you specify a float or long data type. Keep this in mind when specifying the number of points within any range of Modbus registers.
Long represents a signed, 32-bit integer ranging from -2,147,483,648 to 2,147,483,647. This data type requires two consecutive
registers and the same byte-order scheme as float data.Signed Integer represents a signed, 16-bit integer ranging from -32,768 to 32,767. This integer is sometimes called “short.”You define the Data Type for each NumericPoint or NumericWritable in a proxy point’s proxy extension. You may configure the byte order scheme for
two-register numeric values (float and long) at the device level, or globally at the network level. When dealing with 32-bit
values, such as long or float values, configuration includes identifying the byte-order scheme for the two consecutive registers
as processed in the device.
Some vendors use a device’s holding or input registers to represent a number of Boolean statuses (on and off states) in a single register with each bit indicating (mapping to) a separate status. The Modbus driver provides a special Register Bit proxy point extension to read and write to such registers, accessing each bit independently for each proxy point.
Although not common, a Modbus device may use a number of consecutive holding registers to represent a string of alphanumeric (ASCII encoded) characters. The Modbus driver provides a String proxy point extension to read the character strings used by these string proxy points.
With the exception of the String control point with the Modbus String proxy point extension, the driver represents all data on proxy point inputs and outputs using these data types:
Boolean — BooleanPoint and BooleanWritable represent the two-state data identified as Modbus coils and inputs. Less frequently, Boolean
data are mapped into the bits of a single input or holding register. All Modbus Boolean proxy points provide facets, which
you can individually edit to match the vendor's documented state descriptions, such as on and off, enabled and disabled.Numeric — NumericPoint and NumericWritable represent numeric data in holding registers or input registers, whether a Modbus Float
proxy point's selected Data Type is integer, long, float, or signed integer. All Modbus numeric proxy points provide facets, which you can individually edit
to define minimum and maximum values, precision, and data units.Enum — (Modbus 3.5.26 or higher) EnumPoint and EnumWritable represent data in holding registers or input registers using the integer
(ordinal) value that results from a range of consecutive bits, which are specified by a starting bit and number of bits.The Modbus driver’s NumericWritable proxy points, which write values to holding registers, round (and possibly restrict) input
values before any write. Rounding depends on the proxy point’s selected Data Type:
Integer data types round input values up or down to the nearest whole number, and restrict all values to the range from 0 to 65,535.Long data types round input values up or down to the nearest whole number.
The range (-2,147,483,648 to 2,147,483,647) matches
the driver’s value range.Signed Integer data types round input values up or down to the nearest whole number and restrict all values to the range from -32,768 to
32,767.Float data types do not round. Input values remain as they are.