Addressing Tips (Modbus Convention)

Driver Modicon Modbus

Addressing Tips (Modbus Convention)

Top  Previous  Next

On topic Configuring an I/O Tag, Tag addressing (N4/B4 parameters on numerical configuration) is described based on the most recent Modbus protocol specification (version 1.1b). However, there are devices that still use the old offset addressing convention known as Modbus Convention, which adds offsets to an address. This topic explains how to address Tags if device's register mapping still follows that old convention, originated from initial Modicon specification, not included on the current specification.

The address provided in the Tag is sent together with protocol's request frame, with or without the default offset of 1 (one), required by the Modbus Data Model specified by the protocol, according to the configuration in the Data Model Offset field, on Modbus tab of Driver's configuration window.

In addition to this default offset of 1 (one), defined on the current Modbus standard (version 1.1b), some manufacturers still use the old Modicon standard, known as Modbus Convention, with an offset that can be added to the address, and whose value depends on the Modbus function used, or more specifically, depends on which address space this function accessed originally. Such additional offset must be ignored when defining Tag addresses on this Driver. Later on this Manual there are more examples. The next table lists all offsets used by the Modbus Convention standard.

Modbus Convention standard offsets

Data Type (Standard Data Model)

Modbus Function

Offset

Coils

01: Read Coils (0x)

05: Write Single Coil (0x)

15: Write Multiple Coils (0x)

000000

Discrete Inputs

02: Read Discrete Inputs (1x)

10000

Input Registers

04: Read Input Registers (3x)

30000

Holding Registers

03: Read Holding Registers (4x)

06: Write Single Register (4x)

16: Write Multiple Registers (4x)

40000

File Register (old Extended Memory file)

20: Read General Reference (6x)

21: Write General Reference (6x)

60000

 

If device's register map uses this convention, users must follow this procedure to determine the addresses to attribute to Tags, in the Item field when configuring by Strings or in N4 or B4 parameters for numerical configuration:

1.On Modbus tab, select the Data is addressed from 1 option.

2.Subtract from the address displayed on device's manual the offset shown on the previous table for the Modbus function used. TIP: Remove the fifth digit from right to the left.

 

Notice that, in devices that use this old convention, users can determine which Modbus functions can be used to access each register or bit using the offset used in its address.

Examples

Address with Offset (Device)

Address on I/O Tag (Item or N4/B4)

Modbus Function

01234

1234

01: Read Coils

05: Write Single Coil

15: Write Multiple Coils

11234

1234

02: Read Discrete Inputs

31234

1234

04: Read Input Registers

41234

1234

03: Read Holding Registers

06: Write Single Register

16: Write Multiple Registers

45789

5789

03: Read Holding Registers

06: Write Single Register

16: Write Multiple Registers

65789

5789

20: Read General Reference

21: Write General Reference

 
Has this section of the documentation helped you configure this Driver?
Yes No
Comments (optional):