EasyManua.ls Logo

Tonghui TH2840 Series - Command Function Comparison Table

Tonghui TH2840 Series
224 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
180
0x63, 0xA3, 0xA2, 0x62, 0x66, 0xA6, 0xA7, 0x67, 0xA5, 0x65, 0x64, 0xA4,
0x6C, 0xAC, 0xAD, 0x6D, 0xAF, 0x6F, 0x6E, 0xAE, 0xAA, 0x6A, 0x6B, 0xAB,
0x69, 0xA9, 0xA8, 0x68, 0x78, 0xB8, 0xB9, 0x79, 0xBB, 0x7B, 0x7A, 0xBA,
0xBE, 0x7E, 0x7F, 0xBF, 0x7D, 0xBD, 0xBC, 0x7C, 0xB4, 0x74, 0x75, 0xB5,
0x77, 0xB7, 0xB6, 0x76, 0x72, 0xB2, 0xB3, 0x73, 0xB1, 0x71, 0x70, 0xB0,
0x50, 0x90, 0x91, 0x51, 0x93, 0x53, 0x52, 0x92, 0x96, 0x56, 0x57, 0x97,
0x55, 0x95, 0x94, 0x54, 0x9C, 0x5C, 0x5D, 0x9D, 0x5F, 0x9F, 0x9E, 0x5E,
0x5A, 0x9A, 0x9B, 0x5B, 0x99, 0x59, 0x58, 0x98, 0x88, 0x48, 0x49, 0x89,
0x4B, 0x8B, 0x8A, 0x4A, 0x4E, 0x8E, 0x8F, 0x4F, 0x8D, 0x4D, 0x4C, 0x8C,
0x44, 0x84, 0x85, 0x45, 0x87, 0x47, 0x46, 0x86, 0x82, 0x42, 0x43, 0x83,
0x41, 0x81, 0x80, 0x40
};
b) then calculate
WORD CRC16(BYTE* pchMsg, WORD wDataLen)
{
BYTE chCRCHi = 0xFF; // High CRC byte initialization
BYTE chCRCLo = 0xFF; // Low CRC byte initialization
WORD wIndex; // Index in the CRC loop
while (wDataLen--)
{
// Calculate CRC
wIndex = chCRCLo ^ *pchMsg++ ;
chCRCLo = chCRCHi ^ chCRCHTalbe[wIndex];
chCRCHi = chCRCLTalbe[wIndex] ;
}
return ((chCRCHi << 8) | chCRCLo) ;
}
9.3.3 Command function comparison table
Instrument
bus address
Function
code
Command
address
Number of
data bytes
Data
Number
Data byte
Instruction function meaning
Instrument
address
Read/
write
High + low
High + low
Data
Number
The setting
value
corresponding
to the address
1~31
R
0x0000
Query the instrument IDN
R/W
0x0001
0x0001~
0x0004
1~4
0x01~0x
Function, the parameter values are as
follows:
0
CP
6
X
12
Q
1
CS
7
G
13
dZ
2
LP
8
B
14
rZ

Table of Contents

Related product manuals