
1-16 Programming Guide
Preparing for Use ESG Family Signal Generators
Transferring Data
Incoming Data Error Detection and Handling (BASIC/WS only)
The serial interface card can generate several errors that are caused when certain
conditions are encountered while receiving data from the peripheral device. The UART
detects a given error condition. The card then generates a pending error to BASIC. Errors
can be generated by any of the following conditions:
• Parity error. The parity bit on an incoming character does not match the parity expected
by the receiver. This condition is most commonly caused by line noise.
• Framing error. Start and stop bits do not match the timing expectations of the receiver.
This can occur when line noise causes the receiver to miss the start bit or obscures the
stop bits.
• Overrun error. Incoming data buffer overrun caused a loss of one or more data
characters. This is usually caused when data is received by the interface, but no
ENTER statement has been activated to input the information.
• Break received. A BREAK was sent to the interface by the peripheral device. The
desktop computer program must be able to properly interpret the meaning of a break
and take appropriate action.
All UART status errors are generated by incoming data, never by outbound data. When a
UART error occurs, the corresponding bit of Status Register 10 is set, and a pending error
(ERROR 167: Interface status error) is sent to BASIC. BASIC processes the error according
to the following rules:
• If an ENTER is in progress, the error is handled immediately as part of the ENTER
process. An active ON ERROR causes the error trap to be executed. If no ON ERROR is
active, the error is fatal and causes the program to terminate.
• If an OUTPUT is in progress, or if there is no current activity between the computer
and interface, the error is flagged, but nothing is done by BASIC until an ENTER
statement is encountered. When the computer begins execution of the ENTER
statement, if an ON ERROR is active, the error trap is executed. If there is no active ON
ERROR for that select code, the fatal ERROR 167 causes the BASIC program to
terminate.
• If a STATUS statement is executed to Status Register 10 before an ENTER statement
is encountered for that select code, the pending BASIC error is cleared, and the program
continues as if no error had been generated.
Note that the above UART status errors cannot be detected using BASIC/UX.
Comentarios a estos manuales