118153-001 Rev. B
21
uX_Manual.doc REV -
Here is another example, this time for command 22 (Request Status) which has
no arguments.
The original message with a placeholder for checksum is:
<STX>22,<CSUM><ETX>
First, you add up all the characters starting with the ‘2’ in the command
number to the comma before the checksum with their ASCII values (in
hexadecimal):
0x32 + 0x32 + 0x2C = 0x90
Next, you then take the two’s complement of that number by negating it,
by subtracting it from 0x100 (decimal 256), and only retain the lowest 7
bits by bitwise AND the results with 0x7F.
NOTE: This combines the steps of getting the twos complement,
truncating the result to 8 bits and clearing the 8
th
bit.
(0x100 – 0x90) & 0x7F = 0x70
Finally, bitwise OR the result with 0x40:
0x70 | 0x40 = 0x70
The checksum byte is 0x70 (Decimal 112, ASCII: p)
Содержание 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 ...