Modbus
note
Make sure the sensor is in modbus mode
- Connect sensor to power and control system
- Select correct com port
- Select Speed = 57600 (default setting), Data = 8,N,1 (8 Bit, 0 Parity, 1 Stop Bit)
Modbus Integration
tip
After sending the scan command there is a 90s delay before the sensor will return a valid pH value
note
The modbus address defaults to the last two digits of the sensor's serial number (In the table below the sensor's serial number is 300455, therefore the modbus address is 55)
Objective | Notes | Modbus Function | Command | Example Response | Source | Type | Endianess |
---|---|---|---|---|---|---|---|
Start Fresh water scan | Fresh water value 0x0003 | 5 | 55 05 00 00 00 03[CRCL:CRCH] | 55 05 00 00 00 03[CRCL:CRCH] | |||
Only this coil can be on | 5 | 55 05 00 0A FF 00[CRCL:CRCH] | 55 05 00 0A FF 00[CRCL:CRCH] | Coil | |||
Fresh water value 0x0003 | 6 | 55 06 00 00 00 03[CRCL:CRCH] | 55 06 00 00 00 03[CRCL:CRCH] | Input register | Big | ||
Start Ocean water scan | Ocean water value 0x0004 | 5 | 55 05 00 00 00 04[CRCL:CRCH] | 55 05 00 00 00 04[CRCL:CRCH] | |||
Only this coil can be on | 5 | 55 05 00 0C FF 00[CRCL:CRCH] | 55 05 00 0C FF 00[CRCL:CRCH] | Coil | |||
Ocean water value 0x0004 | 6 | 55 06 00 00 00 04[CRCL:CRCH] | 55 06 00 00 00 04[CRCL:CRCH] | Input register | Big | ||
Start Fresh water single result | Fresh water single value 0x0005 | 5 | 55 05 00 00 00 05[CRCL:CRCH] | 55 05 00 00 00 05[CRCL:CRCH] | |||
Only this coil can be on | 5 | 55 05 00 0B FF 00[CRCL:CRCH] | 55 05 00 0B FF 00[CRCL:CRCH] | Coil | |||
Fresh water single value 0x0005 | 6 | 55 06 00 00 00 05[CRCL:CRCH] | 55 06 00 00 00 05[CRCL:CRCH] | Input register | Big | ||
Start Ocean water single result | Ocean water single value 0x0006 | 5 | 55 05 00 00 00 06[CRCL:CRCH] | 55 05 00 00 00 06[CRCL:CRCH] | |||
Only this coil can be on | 5 | 55 05 00 0D FF 00[CRCL:CRCH] | 55 05 00 0D FF 00[CRCL:CRCH] | Coil | |||
Ocean water single value 0x0006 | 6 | 55 06 00 00 00 06[CRCL:CRCH] | 55 06 00 00 00 06[CRCL:CRCH] | Input register | Big | ||
Stop Fresh water scan | 5 | 55 05 00 00 00 00[CRCL:CRCH] | 55 05 00 00 00 00[CRCL:CRCH] | ||||
5 | 55 05 00 0A 00 00[CRCL:CRCH] | 55 05 00 0A 00 00[CRCL:CRCH] | Coil | ||||
6 | 55 06 00 00 00 00[CRCL:CRCH] | 55 06 00 00 00 00[CRCL:CRCH] | Input register | Big | |||
Stop Ocean water scan | 5 | 55 05 00 00 00 00[CRCL:CRCH] | 55 05 00 00 00 00[CRCL:CRCH] | ||||
5 | 55 05 00 0C 00 00[CRCL:CRCH] | 55 05 00 0C 00 00[CRCL:CRCH] | Coil | ||||
6 | 55 06 00 00 00 00[CRCL:CRCH] | 55 06 00 00 00 00[CRCL:CRCH] | Input register | Big | |||
Stop Fresh water single result | 5 | 55 05 00 00 00 00[CRCL:CRCH] | 55 05 00 00 00 00[CRCL:CRCH] | ||||
5 | 55 05 00 0B 00 00[CRCL:CRCH] | 55 05 00 0B 00 00[CRCL:CRCH] | Coil | ||||
6 | 55 06 00 00 00 00[CRCL:CRCH] | 55 06 00 00 00 00[CRCL:CRCH] | Input register | Big | |||
Stop Ocean water single result | 5 | 55 05 00 00 00 00[CRCL:CRCH] | 55 05 00 00 00 00[CRCL:CRCH] | ||||
5 | 55 05 00 0D 00 00[CRCL:CRCH] | 55 05 00 0D 00 00[CRCL:CRCH] | Coil | ||||
6 | 55 06 00 00 00 00[CRCL:CRCH] | 55 06 00 00 00 00[CRCL:CRCH] | Input register | Big | |||
Multiple Coils (0x0F) | Only one coil can be on | 15 | 55 0F 00 0A 00 04 01 0n[CRCL:CRCH] | 0x0n; 0=Stop, 1=Fresh, 2=Fresh1, 4=Ocean, 8=Ocean1 | Multiple coil | ||
Get Current pH Value | pH value options | 3 | 55 03 00 00 00 02 [CRCL:CRCH] | 55 03 04 41 00 00 00[CRCL:CRCH] | Holding | Floating point 32bit | Big |
Get Current Temperature (in C) | Latest Temperature | 3 | 55 03 00 02 00 02 [CRCL:CRCH] | 55 03 04 41 94 00 00[CRCL:CRCH] | Holding | Floating point 32bit | Big |
Get Salinity | Latest Salinity | 3 | 55 03 00 04 00 02 [CRCL:CRCH] | 55 03 04 41 94 00 00[CRCL:CRCH] | Holding | Floating point 32bit | Big |
Get Conductivity | Latest Conductivity | 3 | 55 03 00 06 00 02 [CRCL:CRCH] | 55 03 04 41 94 00 00[CRCL:CRCH] | Holding | Floating point 32bit | Big |
Get Transducer Health Status | Transducer Health options | 3 | 55 03 00 08 00 01 [CRCL:CRCH] | 55 03 02 00 00[CRCL:CRCH] | Holding | Single digit integer | |
Get Sensor Diagnostics | Sensor Diagnostics options | 3 | 55 03 00 09 00 01 [CRCL:CRCH] | 55 03 02 00 00 [CRCL:CRCH] | Holding | Single digit integer | |
Get Bulk Results | All data from scan (pH, temp, salinity, conductivity) | 3 | 55 03 00 00 00 09 [CRCL:CRCH] | 55 03 02 41 00 00 00 41 94 00 00 41 94 00 00[CRCL:CRCH] | Holding | Floating point 32bit | Big |
Get Sensor Serial Number | Serial number = 000000 | 3 | 55 03 00 0A 00 03 [CRCL:CRCH] | 55 03 06 30 30 30 30 30 30 [CRCL:CRCH] | Holding | 6 digit integer | |
Get Sensor Manufacturer | Manufacturer = ANB Sensors | 3 | 55 03 00 0D 00 08 [CRCL:CRCH] | 55 03 10 41 4E 42 53 65 6E 73 6F 72 73 00 00 00 00 00 00 [CRCL:CRCH] | Holding | 16 Alpha characters | |
Get Sensor Name | Name = DEVICE_NAME | 3 | 55 03 00 15 00 08 [CRCL:CRCH] | 55 03 10 44 65 76 69 63 65 5F 4E 61 6D 65 [CRCL:CRCH] | Holding | 16 Alphanumeric characters | |
Get Sensor Sub Name | Sub Name = DEVICE_SUB_NAME | 3 | 55 03 00 1D 00 08 [CRCL:CRCH] | 55 03 10 44 65 76 69 63 65 5F 53 75 62 5F 4E 61 6D 65 [CRCL:CRCH] | Holding | 16 Alphanumeric characters | |
IF Firmware Version Revision | Version = I35.0 | 3 | 55 03 00 25 00 08 [CRCL:CRCH] | 55 03 10 56 33 35 30 2E 30 41 20 20 20 20 20 20 20 20 20 [CRCL:CRCH] | Holding | 16 Alphanumeric characters | |
DV Firmware Version Revision | Version = D23.7 | 3 | 55 03 00 2D 00 08 [CRCL:CRCH] | 55 03 10 44 56 52 56 32 33 2E 37 0D 00 00 00 00 00 00 0D [CRCL:CRCH] | Holding | 16 Alphanumeric characters | |
Get Interval Time | Minutes between successive array scans | 3 | 55 03 00 36 00 01 [CRCL:CRCH] | 55 03 02 00 00 [CRCL:CRCH] | Holding | 3 digit integer | |
Set Interval Time | Minimum 15 minutes or zero | 6 | 55 06 00 36 00 0F [CRCL:CRCH] | 55 06 00 2E 00 0F [CRCL:CRCH] | Holding | 3 digit integer | |
Set Module Address | Set address to 0xAA (170dec) on next bootup | 5 | 55 05 00 39 00 AA [CRCL:CRCH] | 55 05 00 39 00 AA [CRCL:CRCH] | Holding | ||
Change modbus external address | 6 | 55 06 00 39 00 AA [CRCL:CRCH] | 55 06 00 39 00 AA [CRCL:CRCH] | Input register | Big | ||
Set Baudrate | Change Baudrate | 5 | 55 05 00 3A 00 07 [CRCL:CRCH] | 55 05 00 3A 00 07 [CRCL:CRCH] | Holding | Single digit integer | |
Active at next bootup | 6 | 55 06 00 3A 00 07 [CRCL:CRCH] | 55 06 00 3A 00 07 [CRCL:CRCH] | Input register | Big | ||
Set Interface Mode | Change Interface mode | 5 | 55 05 00 3B 00 0n [CRCL:CRCH] | n; 1=change to terminal, 2=change to modbus | Holding | Single digit integer | |
Changes after reboot | 6 | 55 06 00 3B 00 0n [CRCL:CRCH] | n; 1=change to terminal, 2=change to modbus | Input register | Big | ||
Get Immersion Rule | Effective immediately | 3 | 55 03 00 3C 00 01 [CRCL:CRCH] | 55 03 02 00 01 [CRCL:CRCH] | Holding | Single digit integer | |
Set Immersion Rule | Effective immediately | 5 | 55 05 00 3C 00 02 [CRCL:CRCH] | 55 05 00 3C 00 02 [CRCL:CRCH] | Holding | Single digit integer | |
Effective immediately | 6 | 55 06 00 3C 00 02 [CRCL:CRCH] | 55 06 00 3C 00 02 [CRCL:CRCH] | Input register | Big | ||
Get RTC Time | Current RTC Time | 3 | 55 03 00 3D 00 06 [CRCL:CRCH] | 55 03 0C 00 39 00 26 00 16 00 31 00 05 00 23 [CRCL:CRCH] | Holding | 6 x 16bit bytes | |
Set RTC | Set new RTC time | 16 | 55 10 00 3D 00 06 0C 00 00 00 30 00 17 00 02 00 07 00 28 [CRCL:CRCH] | 55 10 00 5A 00 06 [CRCL:CRCH] | Holding | 6 x 16bit bytes |
tip
On opening anb_utils the sensor will automatically return to terminal interface
or
Type #700 to exit modbus mode via terminal