118150-001 REV. B
Page 8 of 66
MSComm1.CommPort = portNumber
MSComm1.PortOpen = True
3.4
SERIAL INTERFACE PROTOCOL
Serial communications will use the following data format::
<STX><CMD><,>ARG><,><CS><ETX>
Where:
<STX>
= 1 ASCII 0x02 Start of Text character
<CMD>
= 2 ASCII characters representing the command ID
<,>
= 1 ASCII 0x2C character
<ARG>
= Command Argument
<,>
= 1 ASCII 0x2C character
<CS>
= Checksum
<ETX>
= 1 ASCII 0x03 End of Text character
3.4.1 COMMAND ARGUMENTS
The format of the numbers is a variable length string. To represent the
number 42, the string ‘42’, ‘042’, or ‘0042’ can be used. This being the
case, commands and responses that carry data are variable in length.
3.4.2 CHECKSUMS
The checksum is computed as follows:
Add the <CMD>, <,>,
and <ARG>, and <,> bytes into a 16 bit (or larger)
word. The bytes are added as unsigned integers.
Take the 2’s complement (negate it).
Truncate the result down to the eight least significant bits.
Clear the most significant bit (bit 7) of the resultant byte, (bitwise AND with
0x7F).
Set the next most significant bit (bit 6) of the resultant byte (bitwise OR
with 0x40).
Using this method, the checksum is always a number between 0x40 and 0x7F.
The checksum can never be confused with the <STX> or <ETX> control
characters, since these have non-overlapping ASCII values.
Содержание XRB011
Страница 11: ...SPELLMAN HIGH VOLTAGE Introduction 1 Installation and Operating Manual Page1 6 118149 001 REV F 50W OPTION ...
Страница 69: ...118150 001 REV B Page 33 of 66 Figure 9 Web Page 1 Contact Information ...
Страница 74: ...118150 001 REV B Page 38 of 66 4 3 2 7 Version Information Figure 15 Version Information ...