CHPA
S
ERIES
D
OC
.01023245
R
EV
.R
THIS
DOCUMENT
IS
THE
PROPERTY
OF
COMMUNICATIONS
&
POWER
INDUSTRIES.
REPRODUCTION
OR
RELEASE
WITHOUT
EXPRESS
PERMISSION
IS
STRICTLY
PROHIBITED
3-11
3.9.6
Check Byte
(Check byte is under CIF CONFIGURATION as CHECKBYTE.)
Two options are available:
Longitudinal Parity
—The check byte is the exclusive OR of all message bytes including the
header and ending bytes and excluding CR or LF if chosen. (LONG on front panel.)
Checksum
—This formula provides a printable ASCII checksum. (SUM on front panel.)
N
Checksum = 32 + MOD
95
[(
Σ
message byte
i
) – (32 * N)]
i=1
where:
•
MOD
95
is the operation modulo 95.
•
N is the total number of bytes in the message including header and ending bytes and
excluding CR or LF if chosen.
•
message byte
i
is the ith message byte where 1
≤
i
≤
N.
Example: Calculate the check byte for the message {A1} using the checksum rule.
Character: { A 1 }
ASCII:
123 65 49 125
i: 1 2 3 4
Check Byte = 32 + MOD
95
[(123+65+49+125) – (32*4)]
= 32 + MOD
95
[234]
= 32 + 44
= 76 which translates to the ASCII character L
Notes:
1.
Parity errors will cause the command to be ignored and no response message to be issued.
2.
If any character is received before or during the transmission of a response message, the
response message will be deleted. This will not interfere with the execution of a command.
3.
The CIF port can be set to accept bad check bytes (it will expect a character in the check
byte’s place). Press the MENU button to select CIF CONFIGURATION; press the
FUNCTION button to select BAD CHCK BYTE. Use the arrow keys to select the desired
choice—YES will allow the CHPA to accept bad check bytes; NO will prevent the CHPA
from accepting bad check bytes.