X2364 MANUAL
20
118044-001 REV E
Since modulo 256 decimal is modulo 100 hex, we can
divide 321 hex by 100 hex. The remainder is 21 hex.
Therefore 21 hex will be sent in bytes 16 and 17 in ASCII
representation as 32 hex and 31 hex. Note that the actual
implementation of the checksum by the data interface is
very simple and requires no actual division. The data
bytes are simply added up in an eight bit counter whose
carry overflow is ignored. The result stored in the counter
will be the checksum remainder (if entering the checksum
directly from the computer keyboard, enter the numbers 2
and 1):
Byte 16:
32 hex = 0011 0010 binary
Byte 17:
31 hex = 0011 0001 binary
The last byte is the carriage return (press the “Enter” key
on the computer keyboard), represented is ASCII as:
Byte 18:
0D hex = 0000 1101 binary.
To summarize, the entire 18 ASCII character packet will
be sent as follows, where the start character, SOH = Ctrl-
A = 01 hex is the first byte sent and the carriage return =
0D hex is the last byte sent:
Byte Number:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
Enter at the keyboard:
Ctrl-A S 6 C C 3 F F 0 0 0 0 0 0 1 2 1 Enter
Sent in ASCII coded hexadecimal:
01 53 38 43 43 33 46 46 30
30 30 30 30 30 31 32 31 0D
(Note that the spaces between bytes are shown for clarity
only and are not actually sent).
The actual data is sent in serial binary format. Each 8-bit
byte is framed with 1 start and 1 stop bit. No parity bits
are being sent or received. Therefore this data packet is
180 bits long.
The data interface will receive this command and place it
in a temporary memory area. Before executing the
command, several checks are made. If an illegal
condition is detected the command will not be executed
and an error message will be sent back to the computer.
The conditions that are checked are described in Section
8.4 (Errors) of this document.
If no errors are detected, the data interface will execute
the command, and then send a 2 byte Acknowledge
Packet back to the computer.
The format of the Acknowledge Packet is:
A <CR> where <CR> indicates the carriage return.
In ASCII coded hexadecimal: 41 0D
8.2.2 Query Command
The 5 byte command to request power supply status is the
Query (“Q”) command. The Query command is valid in
both Local and Remote modes.
The protocol for the Query command will be as follows:
The power supply will receive a Q command requesting
information. If the command is properly received with no
errors detected, the power supply will return with the
Response Packet back to the computer. If errors are
detected in the command, the power supply will return an
appropriate error message.
The format of the command is:
SOH Q Check 1 Check 2 <CR>
Entered at the keyboard:
Ctrl- A Q 51 Enter
Sent in ASCII coded hexadecimal:
01 51 35 31 0D
where the checksum, which does not include the SOH
character, will always be hex 51, transmitted in two
ASCII bytes representing 5 and 1.
8.2.3 Response Packet (R)
The 16 byte Response packet will be returned to the
computer in response to a valid Query command. It will
contain status information in the following order:
BYTE# DESCRIPTION
1
Response identifier character “R”
2-4 Voltage
Monitored
(0-60kV corresponds to 0-3FF hex)
5-7 Current
Monitored
(0-5mA corresponds to 0-3FF hex)
8-10
Not used by the system (0-3FF hex)
11-13 Digital
Monitors
(9 bits encoded in three ASCII bytes)
14-15
Modulo 256 checksum of bytes 2-13
TABLE 8.4 – Response Packet Byte Contents