RS485 Modbus
The NexSens NX-Series sensors can communicate with an external data logger using the standard RS-485 Modbus-RTU protocol. Each sensor responds to Modbus function codes 0x03 (Read registers) and 0x10 (Write registers). Register addressing starts from 0, and data for each register contains two bytes. To connect multiple sensors on a single network, each sensor must have a unique Modbus address. By default, each sensor has the following communication settings:
- Default address: 1 (0x01)
- Baud Rate: 9600
- Parity: None
- Data bit: 8
- Stop bit: 1
- Universal address: 255 (0xFF)
NexSens NX5111 Turbidity Sensor | |||||
Register Address (Hex) | # of Registers | Name | Access | Data | Comments |
12288 (0x3000) | 1 | Get/Set Modbus Device ID | Read/Write | 16-bit integer little endean | Use Get command with universal address 255 (0xFF); Range 1-247 |
1792 (0x0700) | 2 | Get Software and Hardware Revision | Read Only | ASCII | Register 1 = Hardware Register 2 = Software |
9472 (0x2500) | 1 | Start Measurement | Read Only | 16-bit integer little endean | By default, measurements will output every second. |
11776 (0x2E00) | 1 | Stop Measurement | Read Only | 16-bit integer little endean | — |
9728 (0x2600) | 5 | Get Temperature and Turbidity Values | Read Only | Floating point (Little endian) | Register 1-2: Temprature Register 3-4: Turbidity Register 5: Error flag |
4352 (0x1100) | 4 | Get/Set User Calibration Coefficients | Read/Write | Floating point (Little endian) | Register 1-2: K Value Register 3-4: B Value |
12544 (0x3000) | 0 | Activate Wiper | Write Only | Integer | The wiper will make four rotations in each direction. |
12800 (0x3100) | 1 | Get/Set Wiper Interval | Read/Write | Integer |