MODEL 3810A ADDRESSABLE THERMISTOR STRING
| MODBUS RTU PROTOCOL |
3
3.
MODBUS RTU PROTOCOL
3.1
INTRODUCTION TO MODBUS
Model 3810A Addressable In-Place Inclinometers use the industry standard
Modbus Remote Terminal Unit (RTU) protocol to communicate with the chosen
readout method. 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. The Modbus standard does not specify a physical layer (connection
type), but it will work with any interface that can communicate asynchronously
with multiple devices (e.g., RS-485, RS-422, optical, radio, etc.). Model 3810A
strings use RS-485 as the electrical interface because of its prevalence,
simplicity, and success as a robust, industrial physical layer.
3.2
MODBUS RTU OVERVIEW
The Modbus RTU protocol uses packets (multiple sections that together
compose a message) 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.
CRC (two bytes) – cyclic redundancy check; a 16-bit data integrity check
calculated over the other byes in the packet.
3.3
MODBUS TABLES
The most recent sensor reading is stored in a table. The reading is presented in
different formats in different sections of the table. The register location and size
of these variables are described in the table below.
TABLE 2:
RAM Storage
3.4
READING 3810A SENSORS
While Modbus RTU supports roughly 20 different function codes, the simple
functionality of a bused temperature sensor, such as the
GEOKON
3810A,
eliminates the need for all but two of them. Only the Write Holding Register
(0x06) function code and Read Holding Registers (0x03) and are needed to read
the sensors.
First, use the Write Holding Register function to refresh the temperature
measurement. The command initiates multiple analog-to-digital (ADC)
conversions that are averaged to optimize precision and resolution. The updated
measurements will be ready approximately 0.25 seconds after the request. An
example request is shown in the table below.
TABLE 3:
Example Query - Trigger Measurement
Variable
Type (Modbus Message)
HEX
Decimal
Description
ADC
uint16
0x0100
256
Raw 16-bit thermistor reading
IC Temp.
int16
0x0101
257
Low-quality 10-bit temperature reading
Resistance
float32
0x0102
0x0103
258
259
Decimal thermistor reading (Ohms)
Trigger
uint16
0x0118
280
Write nonzero value to initiate measurement
Device Address
Function Code
Data Address
Register Value
CRC
HEX
16
02
06
0118
0001
C9C2
DEC
10
2
6
280
1
51,650