Winsen ZE07-CH2O Скачать руководство пользователя страница 5

Zhengzhou Winsen Electronics Technology Co., Ltd                     

www.winsentech.com

 

 

 

Tel: 86-371-67169097/67169670      Fax: 86-371-60932988                            Email: 

[email protected]

 

 

Switch to active upload type, commends as follow: 

Table 6

 

Start 

Byte

 

reserved 

Switch 

command 

Active 

upload 

reserved 

reserved 

reserved 

reserved 

checksum 

0xFF 

0x01 

0x78 

0x40 

0x00 

0x00 

0x00 

0x00 

0x47 

    

 

To read the concentration value, commends as follow: 

Table 7

 

Start 

Byte

 

reserved 

command 

reserved 

reserved 

reserved 

reserved 

reserved 

checksum 

0xFF 

0x01 

0x86 

0x00 

0x00 

0x00 

0x00 

0x00 

0x79 

 

To return, commends as follow: 

Table 8

 

 

Start 

Byte

 

command 

Concentration 

High 

byte(ug/m3) 

Concentration 

Low byte 

(ug/m3) 

reserv

ed 

reserv

ed 

Concentration 

High byte 

(ppb) 

Concentration 

High byte 

(ppb) 

Check 

sum 

0xFF 

0x86 

0x00 

0x2A 

0x00 

0x00 

0x00 

0x20 

0x30 

3 Checksum and calculation 

********************************************************************** 

* Function Name: ucharFucCheckSum(uchar *i,ucharln) 

* Functional description: Sum check

Take Not(Byte1+Byte2+…Byte7) +1

 

**********************************************************************/ 

unsigned char FucCheckSum(unsigned char *i,unsigned char ln) 

  unsigned char j,tempq=0; 

  i+=1; 

  for(j=0;j<(ln-2);j++) 

  { 

   

tempq+=*i; 

   

i++; 

  } 

  tempq=(~tempq)+1; 

  return(tempq); 

}  

 

 
 
 

Отзывы: