3
Programming
Using the *WAI Command
This command is most useful when only the instrument is on the bus,
and you want the instrument to send the data when it is ready. In this example,
the instrument is instructed to take 50 measurements and return the average for
these 50 measurements. The *WAI command that follows the :INIT command
instructs the instrument to hold off execution of any further commands until the
50 measurements are complete.
When the instrument has completed the 50 measurements and averages, it
executes the DATA? command, which requests the results.
196
:AVERAGE:COUNT 50
:AVERAGE:STATE ON
:INIT
*WAI
DATA?
Keysight 53147A/148A/149A Operating and Programming Guide
Base the result on 50 measurements
Enable averaging.
Start 50 measurements.
Wait until 50 measurements are complete
before parsing another command. At this
point, commands can be issued to other
instruments. The instrument stores
subsequent commands but ignores them
until the measurement is complete.
Asks for the results of the 50 measurements.
This command is not executed until all 50
measurements are complete and the
average is computed.