IEEE-488 Reference
3-40
*WAI — wait-to-continue
Prevent the execution of commands until all previous commands
are completed.
There are two types of device commands; Sequential commands and Overlapped commands. A
Sequential command is a command whose operations are allowed to finish before the next com-
mand is executed. An Overlapped command is a command that allows the execution of subse-
quent commands while device operations of the Overlapped command are still in progress. The
*WAI command is used to hold off the execution of subsequent commands until the device oper-
ations of all previous Overlapped commands are finished. The *WAI command is not needed
for Sequential commands.
There are three Overlapped commands in the Model 2002; :INITiate, :INITiate:CONTinuous
ON and *TRG.
NOTE
See *OPC, *OPC? and *TRG for more information.
The :INITiate commands take the Model 2002 out of the idle state. The device operations of
:INITiate are not considered complete until the Model 2002 goes back into idle. By sending the
*WAI command after the :INITiate command, all subsequent commands will not execute until
the Model 2002 goes back into idle.
The *TRG command issues a bus trigger which could be used to provide the arm, scan and mea-
sure events for the Trigger Model. By sending the *WAI command after the *TRG command,
subsequent commands will not be executed until the pointer for the Trigger Model has finished
moving in response to *TRG and has settled at its next state.
PRINT #1, "output 16; :syst:pres" ' Select defaults
PRINT #1, "output 16; :init:cont off; :abort" ' Place 2002 in idle
PRINT #1, "output 16; :arm:coun 1" ' Program for 30 measurements and
then stop (idle)
PRINT #1, "output 16; :arm:lay2:coun 1"
PRINT #1, "output 16; :trig:coun 30; sour tim"
PRINT #1, "output 16; :init; *wai" ' Start measurements and send
*wai
PRINT #1, "output 16; :data?" ' Query a reading
PRINT #1, "enter 16" ' Get reading after 2002 goes
into idle
LINE INPUT #2, a$ ' Read the reading
PRINT a$ ' Display the reading
3.10.15
Description
Program fragment