Page | 74
sequences. It is important to understand that all “bytes” and “byte
-
counts” referred to below
comprise these pairs of ASCII characters when physically transmitted on the bus.
The detailed structure of commands is as detailed below.
The command structure is as follows:
Byte Number
Value
Description
Byte 0
“!”
acknowledge code
Byte 1
<count>
number of bytes to follow, including <cksm> and <count>
Byte 2
<iaddr>
Single byte instrument address
Byte 3&4
<cmd>
two byte command
Bytes 5 to n-1* <data>
optional, depending on the command
Byte n, n+1*
<cksm>
16 bit inverse checksum of all preceding bytes including acknowledge
*n = <count-1>
The response structure is as follows:
Byte Number
Value
Description
Byte 0
“A”
wake-up code
Byte 1
<count>
number of bytes to follow, including <cksm> but excluding <count>
Byte 2 to n-1
<response> optional, depending on the command
Byte n, n+1*
<cksm>
16 bit inverse checksum of all preceding bytes including acknowledge
*n = <count>
11.1.1
Checksum
The checksum is calculated by creating an unsigned 16 bit sum of all preceding data bytes,
discarding any overflow and then subtracting the result from 65535.
11.1.2
Command Overview
(see below for detailed description of data and response strings)
Commands are divided into two categories:
Read commands which read
data from the Tan Delta unit, beginning “R”
<cmd>
Description
<data>
<response>
“Rc”
Read config settings
2 byte address plus 1 byte
<length>
<2> bytes
“Rm”
Read system memory
2 byte address plus 1 byte
<length>
<2> bytes
“Rr”
Read current readings
2 byte address plus 1 byte
<length>
<2> bytes
“Rv”
Read version and serial no
2 byte address plus 1 byte
<length>
<2> bytes
Note that <length> can exceed the data required: additional bytes will be returned but are
redundant.
Write commands which write data to the Tan Delta unit, beginning “W”
<cmd>
Description
<data>
<response>
“Wc”
Write channel settings 2 byte address plus 1 byte <length> plus
<length> data
4 bytes
Содержание OQSExISG2
Страница 1: ...UG OQSxG2 23 0025 OIL QUALITY SENSOR ASSOCIATED ACCESSORIES USER GUIDE...
Страница 2: ......
Страница 5: ...Page 3 Page Intentionally Blank...
Страница 37: ...Page 35 Figure 19 Connection to other Tan Delta and 3rd Party Products Interfaces...
Страница 38: ...Page 36 Figure 20 ExOQSxG2 Ex Sensor Installation Drawing Rev 2 STAMPED...
Страница 42: ...Page 40 8 Display Express...
Страница 97: ...Page 95 P4 CANL RS485A P5 0V P6 CANH RS485B...