Chapter 7
G Mode Functions — spign
7-8
www.ni.com
spign
Ignore Serial Port Errors
Type
Serial port function
Syntax
spign [bool]
<CR>
Purpose
You can use
spign
at the beginning of your program if you want to change the effect that
serial port errors have on the storage of a character received with a serial error. This function
tells the GPIB-232/485CT-A to ignore or not to ignore the occurrence of serial port errors. By
default, the GPIB-232/485CT-A ignores serial port errors.
Remarks
If the argument
bool
is 0, the GPIB-232/485CT-A does not ignore serial port errors. In this
case, the GPIB-232/485CT-A does not store characters that contain serial errors. Also, the
error is indicated in the serial error code that is returned by the
stat
function.
The serial port errors include parity, overrun, framing, and overflow errors. Appendix C,
Status and Error Message Information
, includes a list of serial port errors.
If the argument
bool
is 1, the GPIB-232/485CT-A ignores serial port errors. Bytes that arrive
with serial port errors are stored in the buffer and are later sent out of the GPIB port when the
serial device is talk addressed. No serial error code is reported by the
stat
function.
If you call
spign
without an argument, the GPIB-232/485CT-A returns the current setting.
The assignment made by
spign
remains in effect until you call
spign
again, call
onl
, or you
turn off the GPIB-232/485CT-A.
Example 1
WRT $,"spign 0"+CHR$(13)
'Do not ignore
CALL IBWRT(GPIB232%,WRT$)
'serial port errors.
Example 2
WRT $,"spign 1"+CHR$(13)
'Ignore serial port
CALL IBWRT(GPIB232%,WRT$)
'errors.