EasyManua.ls Logo

Baumer OM20 - Set up RS485 Interface with Modbus RTU

Baumer OM20
54 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
7 | Commissioning Baumer
22 Operating Manual OM20/ OM30 RS485 with Modbus RTU | V1
7.2 Set up RS485 interface with Modbus RTU
The sensor supports Modbus RTU via RS485 for retrieving measured values and for parameter-
ization.
Communication via the RS485 interface is a serial master-slave communication, which is why
the serial communication parameters must first be known for all participants:
n
Slave address: 1 (factory setting)
n
Data bits: 8
n
Number of stop bits: 1 bit
n
Parity: even
n
Baud rate (bps): 57600 (factory setting)
Example: Reading out measured values
Instruction:
a) Set the communication parameters (seeabove) on the master.
b) Read the input register.
Function ID: 04
Address 200: All Measurements
Number of registers: 13
Result:
ü You receive the response telegram with the following structure (the measured value is in ad-
dress 202 and 203).
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).
Address Number of registers Data type Description
200 1 uint16_t Measured value signal quality:
n
0 = ok
n
1 = weak signal
n
2 = critical signal
201 1 uint16_t
n
Bit 0: switching output:
0 = Inactive
1 = Active
n
Bit 1: alarm output
0 = Inactive
1 = Active
202 - 203 2 float32_t Distance [mm]
204 - 205 2 float32_t Measurement rate [Hz]
206 1 uint16_t Exposure reserve
207 - 208 2 uint32_t Response delay [µs]
209 - 210 2 uint32_t Time stamp [s]
211 - 212 2 uint32_t Time stamp [µs]

Table of Contents

Related product manuals