National Instruments GPIB-MAC User Manual page 96

Table of Contents

Advertisement

November 1985
wait - Wait for Selected Event
wait: General Use function
Syntax: wait mask<CR>
Purpose: You use
delay any further GPIB-MAC activity until one of them
occurs.
Remarks: The argument
the events to wait for. The numeric string represents a
bit mask containing a subset of the same bit assignments
as the status word described in the stat function. Each
bit is set or cleared to wait or not to wait, respectively,
for the corresponding event to occur. The numeric string
may be expressed as decimal, octal, or hexadecimal.
After receiving the wait programming message, the
GPIB-MAC monitors GPIB activity. When any event
corresponding to the bits set in mask occurs, the GPIB-
MAC returns status information indicating its current
status. If continuous status reporting has been enabled,
status will be reported in the format requested. If
continuous status has not been enabled, status will be
returned in numeric format.
You could use wait, for example, if you wish to wait
until a device requests service before you perform a
serial poll. In this case you send the wait programming
message with mask=4096, then wait for status
information to be returned. You then check that status to
see if the SRQI bit is set in the returned status indicators.
To prevent the GPIB-MAC from waiting indefinitely for
SRQ to be asserted, set the SRQI and TIM0 bits by
setting the mask equal to 4096 + 16384. This will
cause the wait to terminate either on SRQI or TIMO,
whichever occurs first.
85
SECTION FOUR - FUNCTIONS
wait
to monitor selected GPIB events and to
mask
is a numeric string which specifies

Advertisement

Table of Contents
loading

Table of Contents