3.Modbus RTU Protocol

3.1Introduction to Modbus

Model 6150F inclinometers use the industry standard Modbus Remote Terminal Unit (RTU) protocol to communicate with the chosen readout method. As the name suggests, Modbus was designed to work on what is known as a bus network, meaning that every device receives every message that passes across the network. Model 6150F inclinometers use the RS-485 electrical interface because of its prevalence, simplicity, and success as a robust, industrial physical layer.

More information about Modbus can be found at the following website:

http://www.modbus.org/specs.php

3.2Modbus RTU Overview

The Modbus RTU protocol uses packets (messages made up of multiple sections) to communicate and transfer data between devices on the network. The general format of these packets is as follows:

1.Modbus Address (one byte) – The address of the specific device on the bus. (Labeled on the sensors as #1, #2, #3, etc.)

2.Function Code (one byte) – The action to be carried out by the slave device.

3.Data (multi-byte) – The payload of the function code being sent.

4.Cyclic Redundancy Check or CRC (two bytes): A 16-bit data integrity check calculated over the other byes in the packet.

3.3Modbus Tables

The most recent sensor readings are stored in memory registers, read using a Modbus command. Angle and temperature readings are available in processed or precursor formats. Register addresses and formats are described in Table 2.

Table 3 shows device control addresses. Any nonzero value written to the trigger address initiates a measurement cycle, updating the angle and temperature measurement registers. Any anomalies detected during the most recent measurement cycle produce a non-zero error code. Refer to Appendix C for an explanation of these codes.

The flash password prevents unintended writes to the nonvolatile memory in Table 4 and the preprogrammed device information in Table 5. Contact geokon for instructions.

Register Address

Byte

Word

Parameter           

Units    

Type

Access

0x100

0

LSW

A-Axis

degrees

float

RO

1

0x101   

2

MSW

3

0x102

4

LSW

B-Axis

degrees

float

5

0x103

6

MSW

7

0x106

12

LSW

Temperature

°C

float

13

0x107

14

MSW

15

0x108

16

LSW

Uncorrected

A-Axis

degrees

float

17

0x109

18

MSW

19

0x10A

20

LSW

Uncorrected

B-Axis

degrees

float

21

0x10B

22

MSW

23

0x10E

28

LSW

Thermistor ADC

N/A

uint16

29

0x117

46

 

Error Code

N/A

uint16

47

table 2: Register Addresses and Formats

Register Address

Byte

Word

Parameter           

Units    

Type

Access

0x118

48

 

Trigger

N/A

uint16

RW

49

0x119

50

LSW

Password

N/A

uint32

51

0x11A

52

MSW

53

0x11B

54

 

Measure Cycle

N/A

uint16

55

table 3: Device Control Addresses

Register Address

Byte

Word

Parameter           

Units    

Type

Access

0x200

0

 

Drop Address

N/A

uint16

RO

1

0x201

2

 

Sensor Type

N/A

string

3

0x202

4

5

0x203

6

7

0x204

8

9

0x205

10

11

0x206

12

13

0x207

14

15

0x208

16

17

0x209

18

LSW

Serial Number

N/A

uint32

19

0x20A

20

MSW

21

0x20B

22

 

Software Version

N/A

uint16

23

0x20C

24

 

Hardware Version

N/A

uint16

25

table 4: Non-Volatile Memory

Register Address

Byte

Word

Parameter           

Units    

Type  

Access 

0x20D

26

LSW

A Offset

degrees

float

RO

27

0x20E

28

MSW

29

0x20F

30

LSW

B Offset

degrees

float

31

0x210

32

MSW

33

0x213

38

LSW

A Gauge Factor

degrees

float

39

0x214

40

MSW

41

0x215

42

LSW

B Gauge Factor

degrees

float

43

0x216

44

MSW

45

 

table 5: Preprogrammed Device Information