Agilent Technologies 86120B Marine Instruments User Manual


 
4-13
Programming
Making Measurements
end to save time. However, non-sequential commands can also be a source of
annoying errors. Always use the *OPC query or *WAI command with the non-
sequential commands to ensure that your programs execute properly.
For example, suppose that you wanted to set the elevation correction value
and then send an :INIT:IMM command. The following programming fragment
results in an error
–213 “Init ignored”
. This occurs because the :ELEVation
command causes the recalculation of the data which is like sending the
:INIT:IMM command. When the actual :INIT:IMM is sent, the error occurs
because the command is already in progress.
OUTPUT 720;”:INIT:IMM”
OUTPUT 720;”:SENSe:CORRection:ELEVation 1000”
OUTPUT 720;”:INIT:IMM”
Use an *OPC? query to ensure that the :
ELEVation
command has completed
as shown in the following lines:
OUTPUT 720;”:INIT:IMM”
OUTPUT 720;”:SENSe:CORRection:ELEVation 1000”
OUTPUT 720;”*OPC?”
ENTER 720;Response$
OUTPUT 720;”:INIT:IMM”
Or, the *WAI command could be used:
OUTPUT 720;”:INIT:IMM”
OUTPUT 720;”:SENSe:CORRection:ELEVation 1000”
OUTPUT 720;”*WAI?”
OUTPUT 720;”:INIT:IMM”