beautypg.com

6 handling of large data types – KROHNE ALTOSONIC V Modbus EN User Manual

Page 16

background image

ALTOSONIC V

ModBus Manual 0300 rev07 E

7.30855.35.00

Page 16 of 64

6 HANDLING OF LARGE DATA TYPES

The standard Modbus specification does not explain how data types larger than 16 bits should be

handled. The standard Modbus functions to modify holding registers are used for handling larger data

types.

Function 03 (read multiple holding registers), function 06 (write single holding register), and function 16

(write multiple holding registers) are used to read or modify these data types.

In the UFP-V each register-area contains a data type.


In order to maintain compatibility with older systems, a parameter 5.2 MODBUS_MODICON_COMPAT

controls how the registers are counted.

In modicon compatible mode the data is counted as 16 bit registers.

In not-modicon compatible mode the data is counted on the data type, so a float is one register!

Notice that function 6 in not-modicon compatible mode will also write one type of the accompanying

data type!


The supported data types are:

Boolean

Integer (16 bit)

Long integer (32 bit)

Float (32 bit)

ASCII 8 characters (64 bit)

Double (64 bit)

ASCII 16 characters (128 bit)

The register ranges for each data type:

Number of registers to request for each data type

Function

Address
(default)

Data type

Modicon

compatible

Not Modicon compatible

1,2,5,15

1000..2999

Boolean

1

1

3000..3999

Integer

1

1

5000..5999

Long integer

2

1

6000..6999

Double

4

1

3,4,6,16

7000..7999

Float

2

1

4000..4999

ASCII (8 char)

4

1

3,16, 65, 66

14000..14999

ASCII (16 char)

8

1

Notice that in modicon compatible mode each data type larger than 16 bits should be addressed as 16

bit registers. For instance the first float is located on address 7000/7001 the next float is located on

address 7002/7003.

A double would be accessed by four 16-bit registers, so the first double 6000/6001/6002/6003 and the

next double 6004/6005/6006/6007.

The data in the chapter 8.4 Modbus Mapping Assignments is printed as it should be accessed in not-
modicon compatible
mode and modicon compatible mode.