Chapter 5
S Mode Functions
© National Instruments Corp.
5-59
GPIB-232CT User Manual
If the TIMO bit is 0 or the
timeio
time limit is set to 0 with
tmo
, timeouts for this function are disabled. You should
disable timeouts only when you are certain the selected event
will occur; otherwise, the GPIB-232CT waits indefinitely for
the event to occur.
If you call
wait
without an argument, the GPIB-232CT
records the EARG error.
See Also:
stat
and
tmo
.
Examples:
1.
PRINT #1,"wait \x5000"
'Wait for TIMO or SRQI.
INPUT#1,STATUS%,GPIBERR%,SPERR%,COUNT%
'Get status info.
IF (STATUS% AND &H4000) <> 0 THEN GOTO 1000
'If TIMO bit is set we
'timed out before getting
'SRQI. Go to an error
'routine at line 1000.
IF(STATUS% AND &H1000) <> 0 THEN GOTO 200
'If SRQI bit set, go to
'routine to conduct a
'serial poll.
2.
PRINT #1,"wait 4"
'Wait indefinitely to
'become LACS.
INPUT#1,STATUS%,GPIBERR%,SPERR%,COUNT%
'Get status info.
PRINT #1,"rd 10"
'Now that GPIB-232CT is
'addressed to listen, read
'10 bytes from the GPIB.
RESP$=INPUT$(10,#1) 'Input 10 bytes from
'serial port buffer.
INPUT #1,CNT%
'Input number of valid
'bytes in CNT$.