Page
Page F-2
F-2
LASAIR
LASAIR II
II Operator’s
Operator’s Manual
Manual
Appendix F: Multidrop Protocol (MiniLaz Emulation)
Appendix F: Multidrop Protocol (MiniLaz Emulation)
Multi-Drop Command Coding Overview
Multi-Drop Command Coding Overview
Commands in the PMS protocol are formatted in the following manner. For
Commands in the PMS protocol are formatted in the following manner. For
users wishing to write their own drivers, basic communication routines are
users wishing to write their own drivers, basic communication routines are
available from Particle Measuring Systems.
available from Particle Measuring Systems.
Formatting Command Codes
Formatting Command Codes
To properly format a command code:
To properly format a command code:
1
1
Add the address of the instrument to the beginning o
Add the address of the instrument to the beginning of the command string. The
f the command string. The
address is an unsigned 16 bit integer between 0 and 99.
address is an unsigned 16 bit integer between 0 and 99.
2
2
Add a 16 bit checksum of the data and address to the end of the packet. The
Add a 16 bit checksum of the data and address to the end of the packet. The
checksum is an unsigned sum of every address and data byte.
checksum is an unsigned sum of every address and data byte.
At this point the packet should look like this:
At this point the packet should look like this:
ADDR_HIGH_BY
ADDR_HIGH_BYTE | ADDR_LOW_
TE | ADDR_LOW_BYTE | DATA_1 |
BYTE | DATA_1 | DATA_2 | ... |
DATA_2 | ... |
DATA_N |
DATA_N | CHECKSUM_HIGH
CHECKSUM_HIGH_BYTE |
_BYTE | CHECKSUM_LOW
CHECKSUM_LOW_BYTE
_BYTE
3
3
ASCII characters not in the range of 0x20 to 0x7E
ASCII characters not in the range of 0x20 to 0x7E must be converted to a 2-byte
must be converted to a 2-byte
sequence using the following table:
sequence using the following table:
4
4
Pre-append an ASCII <STX> character (0x02) to
Pre-append an ASCII <STX> character (0x02) to the data stream, and post-
the data stream, and post-
append an ASCII <ETX> character (0x03)
append an ASCII <ETX> character (0x03) to the data stream.
to the data stream.
5
5
Data is ready to transmit.
Data is ready to transmit.
Multi-Drop Commands
Multi-Drop Commands
CCAL
CCAL
Response:
Response:
"RCAL yyyy/mm/dd"
"RCAL yyyy/mm/dd"
Returns the
Returns the last calibration
last calibration date.
date. (A LASAIR
(A LASAIR II should
II should be calibrated
be calibrated at
at
least once a year).
least once a year).
CCONT n
CCONT n
Response: “
Response: “
RCONT m
RCONT m
””
O
OR
RIIG
GIIN
NA
AL
L B
BY
YT
TE
E
T
TR
RA
AN
NS
SM
MIIT
TT
TE
ED
D B
BY
YT
TE
ES
S
byte < 0x20
byte < 0x20
0x7B, byte+0x20
0x7B, byte+0x20
0x
0x7B
7B <=
<= by
byte
te < 0
< 0x8
x80
0
0x
0x7C
7C, b
, byt
yte-
e-0x
0x5B
5B
0x80 <= byte < 0xC0
0x80 <= byte < 0xC0
0x7D, byte-0x60
0x7D, byte-0x60
0xC0 <= byte
0xC0 <= byte
0x7E, byte-0xA0
0x7E, byte-0xA0