118153-001 Rev. B
19
5.0 Command
Format
5.1
Serial Interface Protocol - RS232
Serial communications will use the following protocol:
<STX><CMD><,>ARG><,><CSUM><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
<CSUM>
= Checksum (see section 5.1.2 for details)
<ETX>
= 1 ASCII 0x03 End of Text character
5.1.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.
5.1.2 Checksums
The checksum is computed as follows:
Add the <CMD>, <,>, <ARG>, <,> bytes into a 16 bit (or larger) word.
The bytes are added as unsigned integers.
Take the 2’s compliment (1’s compliment plus 1).
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.
If the MCU detects a checksum error, the received message is ignored – no
acknowledge or data is sent back to the host. A timeout will act as an implied
NACK.
Содержание uX SERIES
Страница 11: ...uX MANUAL 4 118151 001 REV A Figure 2 1 50kV uX DIMENSIONS ...
Страница 12: ...uX MANUAL 5 118151 001 REV A Figure 2 2 65kVuX DIMENSIONS ...
Страница 16: ...uX MANUAL 9 118151 001 REV A Table 3 2 DC Input Filament Connections ...
Страница 17: ...uX MANUAL 10 118151 001 REV A Figure 3 3 Monitors Voltage Current Control Connections ...
Страница 18: ...uX MANUAL 11 118151 001 REV A Figure 3 4 Recommended Interlock HV on Configurations ...