User manual
PMAC User Manual
270 Writing a Host Communications Program
It is possible to keep all of the PMACs in a rack completely synchronized by sharing clock signals over
extra lines on the serial port. To do this, simply daisy chain a cable between all the PMAC VME J4
connectors in the rack. If this method is used, one PMAC VME must have jumpers E40 through E43
configured so it becomes card 0 (since card 0 outputs the synchronizing clock). All the other PMACs
must have E40 - E43 set for higher card numbers (card 1, 2, etc. which input the synchronizing clock).
If the PMACs are not sharing a common clock signal, all PMAC VMEs in the rack must have jumpers
E40 - E43 configured for card 0. Without the common clock signal, action on the different cards can drift
apart, since each card references time from its own crystal oscillator. However, the tolerances on the
oscillators are so tight that no drift would be noticed until after 10 or 15 minutes of continuous motion.
Data Integrity Checks
Serial Parity Check
PMAC has the capability to do parity checks on serial communications. If jumper E49 is removed,
PMAC will expect an odd parity bit on each character it receives from the host over the serial port, and it
will send an odd parity bit with each character it sends to the host over the serial port.
If PMAC detects a parity error in any character in the command, it sets a flag so that the entire command
line will be rejected with a syntax error after PMAC receives the <CR> character. If I4=0 or 1, PMAC
also immediately sends a <BELL> character to the host to notify it of the error on the character.
With I4=2 or 3, the host should just check for a <BELL> character at the end of the line. However, there
is no direct way to tell whether this was due to a parity error or a real syntax error. Also, if the parity
error occurred on the <CR> character itself, PMAC would not respond at all, since it never saw the end of
the line. In this case, the host must be prepared to time-out gracefully, and either resend the <CR>, or
send a <CTRL-X> to clear out the line.
With I4=0 or 1, the host can either check for the <BELL> character after every character it sends, or wait
until the end of the line. In either case, upon receiving the <BELL> character, the host should send a
<CTRL-X> command to clear out the PMAC communications buffers in both directions. The host
should then check for incoming characters for a period of time equivalent to the transmission time for
three characters, discarding any characters it receives, to ensure any characters already in transmission
have been eliminated. Then it can re-send the line.
If jumper E49 is ON, parity is disabled in both directions. PMAC will not be expecting a parity bit, and if
one is sent it will create a framing error (see below). PMAC will not send parity bits with the characters it
transmits.
Serial Framing Error Check
PMAC has the capability to check for framing errors on the serial port commands sent to it. This check is
always active. If PMAC detects a framing error in any character in the command, it reacts just as it would
for a parity error, including the I4 control of the response.
Serial Duplex Control
PMAC has the capability to confirm serial transmissions to it by immediately echoing back every
character it receives over the serial port. This mode, known as full duplex, can be turned on and off by
sending PMAC the <CTRL-T> command. PMAC powers up in half-duplex mode, not echoing received
characters, so the host must send PMAC a <CTRL-T> command to enable full duplex.
To perform the echoing, PMAC accepts the character, writes it to its input queue in memory, and then
copies it from memory to its transmission port. Therefore, this is a complete check of the command
cycle. If the host receives an echoed character different from the one it sent, it should send a <CTRL-X>
character to clear out the command line, then re-send the command line.