12-16 Common Commands
*WAI – Wait-to-Continue Prevent execution of commands until previous
commands are completed
Description
Two types of device commands exist:
• Sequential commands – A command whose operations are allowed to finish before the
next command is executed.
•Overlapped commands – A command that allows the execution of subsequent
commands while device operations of the Overlapped command are still in progress.
Use the *WAI command to suspend the execution of subsequent commands until the device
operations of all previous Overlapped commands are finished. The *WAI command is not
needed for Sequential commands.
The Model 2182 has three overlapped commands:
• :INITiate
• :INITiate:CONTinuous ON
• *TRG
NOTE See *OPC, *OPC?, and *TRG for more information.
The :INITiate commands remove the Model 2182 from the idle state. The device operations
of :INITiate are not considered complete until the Model 2182 returns to idle. By sending the
*WAI command after the :INITiate command, all subsequent commands will not execute until
the Model 2182 goes back into idle.
The *TRG command issues a bus trigger that could be used to provide the arm, scan, and
measure 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.
Program fragment
CALL SEND (7, “:syst:pres”, staus%)
CALL SEND (7, “:init:cont off; :abort”, status%) ‘Place 2182 in idle.
CALL SEND (7, “:trig:coun 1;sour tim, status%)
CALL SEND (7, “:samp:coun 30”, status%) ‘Program for 30
‘measurements then stop
CALL SEND (7, “:init; *wai”, status%) ‘Start measurements and send
‘*WAI
CALL SEND (7, “:data?”, status%) ‘Query a reading.
reading$ = SPACE$(80)
CALL ENTER (reading$, length%, 7, status%) ‘Get a response when 2182
‘goes into idle.
PRINT reading$ ‘Display the reading.