Modbus Protocol

This device communicates using the Modbus RTU protocol over the RS-485 standard.

Device Address

This device's preconfigured user-definable address is 0x15. Users can change the address using the holding registers.

Modbus Function Codes

The following Modbus function codes are functional with this device.

Command Register
Function
Description
Bytes

0x03

Read holding registers

Returns configuration parameters

2

0x04

Read input registers

Returns measured readings and statistics

2

0x06

Write single register

Writes a single configuration parameter

2

0x10

Write multiple registers

Writes multiple configuration parameters

2 x N

Device Registers

The following registers are available with this device.

Register Type
Register Address
Description
Bytes

Input Register (R)

0x0001

Air Quality Index (Actual)

2

Input Register (R)

0x0002

Air Quality Index (Average)

2

Input Register (R)

0x0003

Air Quality Index (Min)

2

Input Register (R)

0x0004

Air Quality Index (Max)

2

Input Register (R)

0x0005

Air Quality Index (Std. Dev.)

2

Input Register (R)

0x0006

VOC Index (Actual)

2

Input Register (R)

0x0007

VOC Index (Average)

2

Input Register (R)

0x0008

VOC Index (Min)

2

Input Register (R)

0x0009

VOC Index (Max)

2

Input Register (R)

0x000A

VOC Index (Std. Dev.)

2

Input Register (R)

0x000B

NOx Index (Actual)

2

Input Register (R)

0x000C

NOx Index (Average)

2

Input Register (R)

0x000D

NOx Index (Min)

2

Input Register (R)

0x000E

NOx Index (Max)

2

Input Register (R)

0x000F

NOx Index (Std. Dev.)

2

Input Register (R)

0x0010

PM 1.0 (Actual)

2

Input Register (R)

0x0011

PM 1.0 (Average)

2

Input Register (R)

0x0012

PM 1.0 (Min)

2

Input Register (R)

0x0013

PM 1.0 (Max)

2

Input Register (R)

0x0014

PM 1.0 (Std. Dev.)

2

Input Register (R)

0x0015

PM 2.5 (Actual)

2

Input Register (R)

0x0016

PM 2.5 (Average)

2

Input Register (R)

0x0017

PM 2.5 (Min)

2

Input Register (R)

0x0018

PM 2.5 (Max)

2

Input Register (R)

0x0019

PM 2.5 (Std. Dev.)

2

Input Register (R)

0x001A

PM 4.0 (Actual)

2

Input Register (R)

0x001B

PM 4.0 (Average)

2

Input Register (R)

0x001C

PM 4.0 (Min)

2

Input Register (R)

0x001D

PM 4.0 (Max)

2

Input Register (R)

0x001E

PM 4.0 (Std. Dev.)

2

Input Register (R)

0x001F

PM 10 (Actual)

2

Input Register (R)

0x0020

PM 10 (Average)

2

Input Register (R)

0x0021

PM 10 (Min)

2

Input Register (R)

0x0022

PM 10 (Max)

2

Input Register (R)

0x0023

PM 10 (Std. Dev.)

2

Input Register (R)

0x0024

CO2 (Actual)

2

Input Register (R)

0x0025

CO2 (Average)

2

Input Register (R)

0x0026

CO2 (Min)

2

Input Register (R)

0x0027

CO2 (Max)

2

Input Register (R)

0x0028

CO2 (Std. Dev.)

2

Input Register (R)

0x0029

Device Pitch (Actual)

2

Input Register (R)

0x002A

Device Roll (Actual)

2

Input Register (R)

0x002B

Device Temperature

2

Holding Register (R/W)

0x0101

Device Address

2

Holding Register (R/W)

0x0102

Baud Rate

2

Holding Register (R/W)

0x0103

Statistics Period (Secs)

2

Holding Register (R/W)

0x0104

IMU Correction (Pitch)

2

Holding Register (R/W)

0x0105

IMU Correction (Roll)

2

Communication Syntax

Reading sensor data

The host device can read one or more sensor data by calling the starting register address.

Request from the host: Device address [1 Byte] + Function code (0x04) [1 Byte] + Input register start address [2 Bytes MSB first] + Requested register length [2 Bytes MSB first] + CRC [2 Bytes MSB first]

Response from the device: Device address [1 Byte] + Function code (0x04) [1 Byte] + Response register length in Bytes [1 Byte] + Register 1 [2 Bytes MSB first] + Register N [2 Bytes MSB first] + CRC [2 Bytes MSB first]

Reading configuration register

The host device can read one or more configuration registers by calling the starting register address.

Request from the host: Device address [1 Byte] + Function code (0x03) [1 Byte] + Holding register start address [2 Bytes MSB first] + Requested register length [2 Bytes MSB first] + CRC [2 Bytes MSB first]

Response from the device: Device address [1 Byte] + Function code (0x03) [1 Byte] + Response register length in Bytes [1 Byte], Register 1 [2 Bytes MSB first] + Register N [2 Bytes MSB first] + CRC [2 Bytes MSB first]

Writing single configuration register

The host device can write one configuration register.

Command from the host: Device address [1 Byte] + Function code (0x06) [1 Byte] + Holding register address [2 Bytes MSB first] + Value to be set [2 Bytes MSB first] + CRC [2 Bytes MSB first]

Response from the device: Device address [1 Byte] + Function code (0x06) [1 Byte] + Holding register address [1 Byte] + Value set [2 Bytes MSB first] + CRC [2 Bytes MSB first]

Writing multiple configuration registers

The host device can write multiple configuration registers.

Command from the host: Device address [1 Byte] + Function code (0x10) [1 Byte] + Holding register start address [2 Bytes MSB first] + Requested register length [2 Bytes] + Configuration values length in Bytes [1 Byte] + Value to be set 1 [2 Bytes MSB first] + Value to be set N [2 Bytes MSB first] + CRC [2 Bytes MSB first]

Response from the device: Device address [1 Byte] + Function code (0x10) [1 Byte] + Holding register start address [1 Byte], Value set [2 Bytes MSB first], CRC [2 Bytes MSB first]

Last updated