DOCA0302EN-04

Modbus Table Format and Data Types

Table Formats

Register tables have the following columns:

Address

Register

No.

RW

X

Unit

Type

Range

Default value

Svd

Function code

Description

Designation

Description

Address

16-bit register address in hexadecimal. The address is the data used in the Modbus frame.

Register

16-bit register number in decimal. Register = Address + 1

No.

Number of 16-bit registers that need to be read/written to access the complete information.

RW

Whether the register is read only (R) or read-write (RW).

X

Scale factor:

  • Scale X1 means that the value of the register is the right one with the unit indicated.

  • A scale of 10 means that the register contains the value multiplied by 10. The actual value is therefore the value of the register divided by 10.

  • A scale of 0.1 means that the register contains the value multiplied by 0.1. The actual value is therefore the value of the register multiplied by 10.

Unit

Information unit of measurement:

  • : no unit corresponding to the value expressed.

  • h: hours.

  • D: the unit depends on the connected device.

Type

Coding data type (see Data types table).

Range

Range of permitted values for the variable, usually a subset of what the format allows. For BITMAP type data, the content of this domain is "".

Default value

Default value for the variable.

Svd

Saving the value in the event of a power failure:

  • Y: the value of the register is saved in the event of a power failure.

  • N: the value is lost in the event of a power failure.

NOTE: On start-up or reset, the available values are retrieved.

Function code

Code of functions that can be used in the register.

Description

Information about the register and the restrictions that apply.

Data Types

The following data types appear in the tables of Modbus registers:

Name

Description

Range

UINT

16-bit unsigned integer (1 word)

0 to 65535

INT

16-bit signed integer (1 word)

-32768 to +32767

UINT32

32-bit unsigned integer (2 words)

0 to 4 294 967 295

INT32

32-bit signed integer (2 words)

-2 147 483 648 to +2 147 483 647

Float32

32-bit value (2 words)

-3.4028E+38 to +3.4028E+38

ASCII

8-bit alphanumeric character

Table of ASCII Characters

BITMAP

16-bit field (1 word)

DATE

See Date table

NOTE:

Float32 type data: Single precision float with sign bit, 8 bits exponent, 23 bits mantissa (positive and negative normalized real)

For ASCII type data, the order of transmission of characters in words (16-bit registers) is as follows:

  • Character n as least significant

  • Character n + 1 as most significant

All registers (16-bit or 2 bytes) are transmitted with Big Endian coding:

  • The most significant byte is transmitted first

  • The least significant byte is transmitted second

32-bit variables saved on two 16-bit words (for example, consumption meters) are in Big Endian format:

  • The most significant word is transmitted first, then the least significant.

64-bit variables saved on four 16-bit words (for example, dates) are in Big Endian format:

  • The most significant word is transmitted first, and so on.

DATETIME

DATETIME is a data type used to code date and time defined by the IEC 60870-5 standard.

Register

Type

Bit

Range

Description

1

INT16U

0–6

0x00–0x7F

Year:

0x00 (00) to 0x7F (127) correspond to years 2000 to 2127

For example, 0x17 (23) corresponds to year 2023.

7–15

Reserved

2

INT16U

0–4

0x01–0x1F

Day

5–7

Reserved

8–11

0x00–0x0C

Month

12–15

Reserved

3

INT16U

0–5

0x00–0x3B

Minutes

6–7

Reserved

8–12

0x00–0x17

Hours

13–15

Reserved

4

INT16U

0–15

0x0000–0xEA5F

Milliseconds

Direct Bit Addressing

Addressing is permitted for BITMAP type zones with functions 1, 2, 5 and 15.

The address of the first bit is constructed as follows: (register address x 16) + bit number.

This addressing mode is specific to Schneider Electric.

Example: For functions 1, 2, 5 and 15, bit 3 of register 0x0078 should be addressed; the bit address is therefore 0x0783.

NOTE: The register whose bit needs to be addressed should have an address ≤ 0x0FFF.

Example of Modbus Frames

Request

Definition

Number of Bytes

Value

Comment

Server number

1 byte

0x05

I/O Smart Link Modbus address

Function code

1 byte

0x03

Reads n output or internal words

Address

2 bytes

0x36E2

Address of a consumption meter whose address is 14050 in decimal notation.

Number of words

2 bytes

0x002C

Reads 44 16-bit registers.

CRC

2 bytes

xxxx

Value of CRC16.

Response

Definition

Number of Bytes

Value

Comment

Server number

1 byte

0x05

I/O Smart Link Modbus address

Function code

1 byte

0x03

Reads n output or internal words

Number of Bytes

2 bytes

0x0058

Number of bytes read

Value of words read

88 bytes

Reads 44 16-bit registers

CRC

2 bytes

xxxx

Value of CRC16.

Modbus Address

The list of Modbus addresses, defined by the Modbus protocol, starts at 0.

The address of register number n is n-1.

The detailed tables in subsequent chapters of this guide provide both register numbers (in decimal format) and corresponding addresses (in hexadecimal format). Example of address: address of register number 3000 is 0x0BB7 (2999).

QR Code is a registered trademark of DENSO WAVE INCORPORATED in Japan and other countries.

Was this helpful?