Data types

Modbus supports four "objects";

  • Coils
  • Discrete inputs
  • Input registers
  • Holding registers

In the old Modicon specification, each object was bound to a particular address range. With the newer address standard, the full range is available to each object and the object type is determined by the specific commands to read and write.

Object typeAccessSizeModicon Address SpaceNew Address Space
CoilRead/Write1 bit00001 to 099990 to 65535
Discrete inputRead1 bit10001 to 199990 to 65535
Input registerRead16 bits30001 to 399990 to 65535
Holding registerRead/Write16 bits40001 to 499990 to 65535

Table of Content

Scaling of values

A scale (factor) is used to transform a decimal value into an integer value by multiplying it with that value. This is often required as simple computers are often bad at handling decimal values. As a result, we lose the decimal part when converting a decimal value to an integer value.

For example, if the value 3.1415 is to be managed in such a way, it can be scaled using 10, 100, 1000 or even 10000. Giving us the integer values; 31, 314, 3141 or 31415.

These integer values can then be transmitted to a more intelligent computer, where they are divided by the same factor to produce a decimal value once more.

Remember that the scale factor decides how many decimals are retained once converted back to a decimal value.