Send command
Byte0
Byte1
Byte2
Byte3
Byte4
Byte5
Byte6
Byte7
Byte8
Starti
ng
byte
Sensor
No.
comman
d
High level
span
point
Low level
span
point
-
-
-
Check
value
0XFF
0x01
0x88
0x07
0xD0
0x00
0x00
0x00
0xA0
No return value
3.
Calibration and calculation
The checksum = (invert (byte 1 +... + 7)) + 1
Reading gas concentration:
Send command
Byte0
Byte1
Byte2
Byte3
Byte4
Byte5
Byte6
Byte7
Byte8
Starti
ng
byte
Sensor
No.
comman
d
-
-
-
-
-
Check
value
0XFF
0x01
0x86
0x00
0x00
0x00
0x00
0x00
0x79
Except byte 0 , add the other bytes together
0x1 + 0x86 + 0 + 0 + 0 + 0 + 0 = 0x87
Get the value from the first step, and then invert it.
0xff – 0x87 = 0x78
The second value plus one
0x78 + 0x01 = 0x79
Program : C language
9. Notes for maintenance
9.1 The sensor should be calibrated regularly. The cycle time is better to be no more than 6
months.
9.2 Do not use the sensor in the high dusty environment for long time.
9.3 Please use the sensor with correct power supply.
9.4 Forbidden to cut the sensor pin.
Zhengzhou Winsen Electronics Technology Co., Ltd
Add.: NO.299 Jin Suo Road, National Hi-Tech Zone,
Zhengzhou, 450001 China
Tel.: 0086-371-67169097 67169670
Fax: +86- 0371-60932988
E-mail:[email protected]
Website:www.winsen-sensor.com
char getCheckSum(char *packet)
{
char i, checksum;
for( i = 1; i < 8; i++)
{
ch= packet[i];
}
checksum = 0xff – checksum;
ch= 1;
return checksum;
}