Baumer Description | 3
OM20/ OM30 RS485 with Modbus RTU | V1 Operating Manual 13
3.5 Modbus RTU
Modbus RTU is a standardized protocol that is based on a serial master/slave communication
via RS485 in this case.
The functionality of the sensor can be accessed by reading or writing entries in the tables Dis-
crete Inputs, Input Registers, and holding registers. The following Modbus function codes (FC)
are supported:
n
Read Discrete Inputs (FC 02)
n
Read Input Registers (FC 04)
n
Read Holding Registers (FC 03)
n
Write Single Holding Register (FC 06)
n
Write Multiple Holding Registers (FC 16)
Below you will find an overview of the available registers. The 2 described tables are indepen-
dent of each other, so that the same address can represent different functions in different ta-
bles. The number of registers to be read or written with a Modbus command must correspond to
the length specified for the respective sensor functionality. A partial reading or writing of param-
eters is not possible.
INFO
1 Modbus register corresponds to 2 bytes. If the data type of a sensor parameter is wider than a
2 byte Modbus register, the parameter is divided among several Modbus registers. The less sig-
nificant bits are located at the smaller address and the more significant bits at the larger ad-
dress (Little Endian).
As a general rule, all registers can be written and read. If a register is read that is only intended
for write access, 0xFFFF is returned.
Holding register: function ID 03/06/16
Address
Number of
registers Command Description
101 1 Precision Select signal filtering
102 1 Custom Median Filter
Length
Configurable filter length – median filter
103 1 Custom Average Filter
Length
Configurable filter length – average filter
180 2 Zero Position Set zero position numerically
185 1 Zero Position Teach Teach zero position
200 2 Distance Near Set measuring range limit (near)
202 2 Distance Far Set measuring range limit (far)
220 1 Meas Range To Max Maximize measurement range
300 2 Switch Point 1 Far threshold of the switching output
302 2 Switch Point 2 Near threshold of the switching output
304 2 Switch Mode Select switching mode
306 2 Hysteresis Width Hysteresis
308 1 Polarity Polarity of the switching output