PH7&RX7 Modbus Protocol (Mod New Version)
PH7&RX7 Modbus Protocol (Mod New Version)
1 Communication Settings
Default of PH7/RV7is 2
Data bits: 8
Stop bits: 1
Parity: None
Command format:
Sensor ID + FC + starting address (high byte, low byte) + total number of registers to
Where,
CRC stands for Cyclic Redundancy Check; it is a 2-byte code for error checking.
Command format:
Sensor ID + FC +starting address (high byte, low byte)+ data (high byte,
default.
default.
device.
Getting data 1
Getting data 2
………………………..
………………………..
PC -> Sensor: the PC sends 0x02 0x03 0x00 0x00 0x00 0x04 0x44 0x3A to the sensor
Where,
0x00 0x04 – Total number of registers to read (high byte, low byte) in which 4registers
will be read.
Sensor -> PC , the PC gets 0x02 0x03 0x08 0Xa3 0Xd3 0x40 0Xe0 0Xbd 0xDA 0x41 0x79
Where,
0x08– Total number of bytes of data to follow, 8 bytes of data from 4 holding registers
0Xa3 0Xd3 0x40 0Xe0 0Xbd 0xDA 0x41 0x79 – 8 bytes of data
CRC code
measurements.
The data “0Xa3 0Xd3 0x40 0Xe0 0Xbd 0xDA 0x41 0x79”is gotten from sensor ,
There are two groups of data,the“0Xa3 0Xd3 0x40 0Xe0“ for PH value and
the 0Xbd 0xDA 0x41 0x79“ for temperature ,exchange the high byte and low byte of
41 9 BD DA (in HEX)=15.6089
4.4 Calibrating steps and details of command
(2) Place the sensor into the 1st standard solution after cleaning it , then get the MV
value .
(3) Writing the target value 1 ( concentration of the standard solution1 )into the
(4) Place the sensor into the 2nd standard solution after cleaning it , then get the
MV value .
(5) Writing the target value2 ( concentration of the standard solution2 )into the
PC -> Sensor, the PC sends0x02 0x06 0x00 0x30 0x00 0x0C 0x89 0XF3 to the sensor
Where,
0x00 0x30 – Starting address (high byte, low byte) in which is the 0x30 for storing
calibration mode. 11 (in decimal) -one point calibration ; 12 (in decimal) -two points
0x00 0x0C – Data (high byte, low byte) in which 0x0C be converted to 12 in decimal ,
Sensor -> PC, the PC gets 0x06 0x06 0x00 0x30 0x00 0x0C 0x88 0X77 sent from the
PC -> Sensor: the PC sends 0x02 0x03 0x00 0x3C 0x00 0x02 0X04 0X34to the sensor
Where,
0x00 0x3C – Starting address (high byte, low byte), in which 0x3C is the holding register
0x00 0x02 – Total number of registers to read (high byte, low byte) in which 2 registers
will be read.
Sensor -> PC , the PC gets 0x02 0x03 0x04 0xXX 0xXX 0xXX 0xXX+ CRC codes sent from
the sensor
Where,
0x04 – Total number of bytes of data to follow, 4 bytes of data from 2 holding registers
CRC code
Getting the measure data by sending the above command repeatedly,then do next step
to the sensor
Where,
0X00 0X32 – Starting address (high byte, low byte) in which 0x36 is the holding
register for storing the 1st target value (concentration of standard solution 1)
0X85 0X1F 0X40 0XDB– Data (high byte, low byte) to be written, it is 6.86 in IEEE754
Sensor -> PC, the PC gets 0X02 0X06 0X00 0X32 0X85 0X1F 0X40 0XDB 0XF7 0X47
PC -> Sensor: the PC sends 0x02 0x03 0x00 0x3e x00 0x02 0XA5 0XF4 to the sensor
Where,
0x00 0x3E– Starting address (high byte, low byte), in which 0x3E is the holding register
0x00 0x02 – Total number of registers to read (high byte, low byte) in which 2 registers
will be read.
Sensor -> PC , the PC gets 0x02 0x03 0x04 0xXX 0xXX 0xXX 0xXX+ CRC codes sent from
the sensor
Where,
0x04 – Total number of bytes of data to follow, 4 bytes of data from 2 holding registers
CRC code
Getting the measure data by sending the above command repeatedly ,then do next
PC -> Sensor: the PC sends 0X02 0X06 0X00 0X34 0X00 0X00 0X40 0X80 0X26 0X76to
the sensor
Where,
0x 00 0x34 – Starting address (high byte, low byte) in which 0x38 is the holding
register for storing the 2nd target value (concentration of standard solution 2)
0X00 0X00 0X40 0X80– Data (high byte, low byte) to be written, it is 4.00 in IEEE754
Sensor -> PC, the PC gets 0X02 0X06 0X00 0X34 0X00 0X00 0X40 0X80 0X26 0X76
After enter the two target values, sensor will be calculated the offset and slope for new
Where,
0x00 0x4A – Starting address (high byte, low byte), in which 0x4A and 0x4B are the
holding registers for storing the offset value ; 0x4C and 0x4d are the holding registers
0x00 0x04 – Total number of registers to read (high byte, low byte) in which 4 registers
will be read.
Sensor -> PC , the PC gets 0x02 0x03 0x08 0x00 0x00 0xC1 0x70 0x00 0x00 0x42 0xDC
Where,
0x08 – Total number of bytes of data to follow, 8 bytes of data from 4 holding registers
0x00 0x00 0xC1 0x70 0x00 0x00 0x42 0xDC – 8 bytes of data , in which 0x00 0x00 0xC1
0x70 can be converted to float format in IEEE 754 , it is -15, the value is offset of new
calibration; 0x00 0x00 0x42 0xDC can also be converted to float format in IEEE 754 , it