Chapter 5
S Mode Functions
© National Instruments Corp.
5-51
GPIB-232CT User Manual
status reporting. After reading the status information returned
for the
stat
call, you call
wrt
. The GPIB-232CT then
returns the status information that corresponds to the
wrt
message.
Refer to the following examples for ways in which to make
use of the status information.
When you wish to begin continuous status reporting, send the
stat c s
,
stat c n
, or
stat c n s
programming
message. Status information will be immediately returned
indicating the current status conditions. When you call
stat
with both
s
and
n
the numeric status is always returned first.
If you call
stat
without an argument, continuous status
reporting is disabled.
Notice that when you send several programming messages to
the GPIB-232CT, it buffers them and processes each one
without any delay in between. However, if you enable
continuous status reporting and check the status of each
programming message before sending the next, the
GPIB-232CT waits for each subsequent programming
message to arrive at the serial port before processing it. This
slows down the overall performance of your program. If
speed is a primary concern, disable continuous status
reporting.
Examples:
1.
10
PRINT #1,"stat n"
'Get GPIB-232CT status.
20
REM GPIB-232CT responds with:
30 REM
340<CR><LF>0<CR><LF>0<CR><LF>0<CR><LF>
40
REM Now read status into variables.
50 INPUT#1,STATUS%,GPIBERR%,SPERR%,COUNT%
60
REM Go to error routine at 500 if error.
70
IF STATUS% < 0 THEN GOTO 500
80
REM Go to SRQ service routine if SRQ is
90 REM
asserted.
100 IF (STATUS% AND &H1000) THEN GOTO 400
..
400
REM
410 REM Place code here to service SRQ.