Skip to main content

Modbus

note

Make sure the sensor is in modbus mode

  1. Connect sensor to power and control system
  2. Select correct com port
  3. 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)

ObjectiveNotesModbus FunctionCommandExample ResponseSourceTypeEndianess
Start Fresh water scanFresh water value 0x0003555 05 00 00 00 03[CRCL:CRCH]55 05 00 00 00 03[CRCL:CRCH]
Only this coil can be on555 05 00 0A FF 00[CRCL:CRCH]55 05 00 0A FF 00[CRCL:CRCH]Coil
Fresh water value 0x0003655 06 00 00 00 03[CRCL:CRCH]55 06 00 00 00 03[CRCL:CRCH]Input registerBig
Start Ocean water scanOcean water value 0x0004555 05 00 00 00 04[CRCL:CRCH]55 05 00 00 00 04[CRCL:CRCH]
Only this coil can be on555 05 00 0C FF 00[CRCL:CRCH]55 05 00 0C FF 00[CRCL:CRCH]Coil
Ocean water value 0x0004655 06 00 00 00 04[CRCL:CRCH]55 06 00 00 00 04[CRCL:CRCH]Input registerBig
Start Fresh water single resultFresh water single value 0x0005555 05 00 00 00 05[CRCL:CRCH]55 05 00 00 00 05[CRCL:CRCH]
Only this coil can be on555 05 00 0B FF 00[CRCL:CRCH]55 05 00 0B FF 00[CRCL:CRCH]Coil
Fresh water single value 0x0005655 06 00 00 00 05[CRCL:CRCH]55 06 00 00 00 05[CRCL:CRCH]Input registerBig
Start Ocean water single resultOcean water single value 0x0006555 05 00 00 00 06[CRCL:CRCH]55 05 00 00 00 06[CRCL:CRCH]
Only this coil can be on555 05 00 0D FF 00[CRCL:CRCH]55 05 00 0D FF 00[CRCL:CRCH]Coil
Ocean water single value 0x0006655 06 00 00 00 06[CRCL:CRCH]55 06 00 00 00 06[CRCL:CRCH]Input registerBig
Stop Fresh water scan555 05 00 00 00 00[CRCL:CRCH]55 05 00 00 00 00[CRCL:CRCH]
555 05 00 0A 00 00[CRCL:CRCH]55 05 00 0A 00 00[CRCL:CRCH]Coil
655 06 00 00 00 00[CRCL:CRCH]55 06 00 00 00 00[CRCL:CRCH]Input registerBig
Stop Ocean water scan555 05 00 00 00 00[CRCL:CRCH]55 05 00 00 00 00[CRCL:CRCH]
555 05 00 0C 00 00[CRCL:CRCH]55 05 00 0C 00 00[CRCL:CRCH]Coil
655 06 00 00 00 00[CRCL:CRCH]55 06 00 00 00 00[CRCL:CRCH]Input registerBig
Stop Fresh water single result555 05 00 00 00 00[CRCL:CRCH]55 05 00 00 00 00[CRCL:CRCH]
555 05 00 0B 00 00[CRCL:CRCH]55 05 00 0B 00 00[CRCL:CRCH]Coil
655 06 00 00 00 00[CRCL:CRCH]55 06 00 00 00 00[CRCL:CRCH]Input registerBig
Stop Ocean water single result555 05 00 00 00 00[CRCL:CRCH]55 05 00 00 00 00[CRCL:CRCH]
555 05 00 0D 00 00[CRCL:CRCH]55 05 00 0D 00 00[CRCL:CRCH]Coil
655 06 00 00 00 00[CRCL:CRCH]55 06 00 00 00 00[CRCL:CRCH]Input registerBig
Multiple Coils (0x0F)Only one coil can be on1555 0F 00 0A 00 04 01 0n[CRCL:CRCH]0x0n; 0=Stop, 1=Fresh, 2=Fresh1, 4=Ocean, 8=Ocean1Multiple coil
Get Current pH ValuepH value options355 03 00 00 00 02 [CRCL:CRCH]55 03 04 41 00 00 00[CRCL:CRCH]HoldingFloating point 32bitBig
Get Current Temperature (in C)Latest Temperature355 03 00 02 00 02 [CRCL:CRCH]55 03 04 41 94 00 00[CRCL:CRCH]HoldingFloating point 32bitBig
Get SalinityLatest Salinity355 03 00 04 00 02 [CRCL:CRCH]55 03 04 41 94 00 00[CRCL:CRCH]HoldingFloating point 32bitBig
Get ConductivityLatest Conductivity355 03 00 06 00 02 [CRCL:CRCH]55 03 04 41 94 00 00[CRCL:CRCH]HoldingFloating point 32bitBig
Get Transducer Health StatusTransducer Health options355 03 00 08 00 01 [CRCL:CRCH]55 03 02 00 00[CRCL:CRCH]HoldingSingle digit integer
Get Sensor DiagnosticsSensor Diagnostics options355 03 00 09 00 01 [CRCL:CRCH]55 03 02 00 00 [CRCL:CRCH]HoldingSingle digit integer
Get Bulk ResultsAll data from scan (pH, temp, salinity, conductivity)355 03 00 00 00 09 [CRCL:CRCH]55 03 02 41 00 00 00 41 94 00 00 41 94 00 00[CRCL:CRCH]HoldingFloating point 32bitBig
Get Sensor Serial NumberSerial number = 000000355 03 00 0A 00 03 [CRCL:CRCH]55 03 06 30 30 30 30 30 30 [CRCL:CRCH]Holding6 digit integer
Get Sensor ManufacturerManufacturer = ANB Sensors355 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]Holding16 Alpha characters
Get Sensor NameName = DEVICE_NAME355 03 00 15 00 08 [CRCL:CRCH]55 03 10 44 65 76 69 63 65 5F 4E 61 6D 65 [CRCL:CRCH]Holding16 Alphanumeric characters
Get Sensor Sub NameSub Name = DEVICE_SUB_NAME355 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]Holding16 Alphanumeric characters
IF Firmware Version RevisionVersion = I35.0355 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]Holding16 Alphanumeric characters
DV Firmware Version RevisionVersion = D23.7355 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]Holding16 Alphanumeric characters
Get Interval TimeMinutes between successive array scans355 03 00 36 00 01 [CRCL:CRCH]55 03 02 00 00 [CRCL:CRCH]Holding3 digit integer
Set Interval TimeMinimum 15 minutes or zero655 06 00 36 00 0F [CRCL:CRCH]55 06 00 2E 00 0F [CRCL:CRCH]Holding3 digit integer
Set Module AddressSet address to 0xAA (170dec) on next bootup555 05 00 39 00 AA [CRCL:CRCH]55 05 00 39 00 AA [CRCL:CRCH]Holding
Change modbus external address655 06 00 39 00 AA [CRCL:CRCH]55 06 00 39 00 AA [CRCL:CRCH]Input registerBig
Set BaudrateChange Baudrate555 05 00 3A 00 07 [CRCL:CRCH]55 05 00 3A 00 07 [CRCL:CRCH]HoldingSingle digit integer
Active at next bootup655 06 00 3A 00 07 [CRCL:CRCH]55 06 00 3A 00 07 [CRCL:CRCH]Input registerBig
Set Interface ModeChange Interface mode555 05 00 3B 00 0n [CRCL:CRCH]n; 1=change to terminal, 2=change to modbusHoldingSingle digit integer
Changes after reboot655 06 00 3B 00 0n [CRCL:CRCH]n; 1=change to terminal, 2=change to modbusInput registerBig
Get Immersion RuleEffective immediately355 03 00 3C 00 01 [CRCL:CRCH]55 03 02 00 01 [CRCL:CRCH]HoldingSingle digit integer
Set Immersion RuleEffective immediately555 05 00 3C 00 02 [CRCL:CRCH]55 05 00 3C 00 02 [CRCL:CRCH]HoldingSingle digit integer
Effective immediately655 06 00 3C 00 02 [CRCL:CRCH]55 06 00 3C 00 02 [CRCL:CRCH]Input registerBig
Get RTC TimeCurrent RTC Time355 03 00 3D 00 06 [CRCL:CRCH]55 03 0C 00 39 00 26 00 16 00 31 00 05 00 23 [CRCL:CRCH]Holding6 x 16bit bytes
Set RTCSet new RTC time1655 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]Holding6 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