IEEE-488 Reference
3-69
PRINT #1, "output 16; :calc:data?" ' Query result of CALC1
PRINT #1, "enter 16" ' Get response message from 2002
:FRESh?
:CALCulate[1]:DATA:FRESh? Recalculate CALC 1
This query command is used to return a new (fresh) math result of CALC1. This command will
not request the same result twice. If a new reading is triggered, this command will wait until the
math result is available. When CALC1 is disabled, there is no difference between SENS:-
DATA:FRES? and CALC:DATA:FRES?.
PRINT #1, "output 16; :calc:data:fresh?" ' Query new result of CALC1
PRINT #1, "enter 16" ' Get response from 2002
:IMMediate
:CALCulate[1]:IMMediate Recalculate CALC 1
:IMMediate? Perform calculation and read result (equivalent to :CALCulate[1]:IMMediate;
DATA?)
When you change the math calculation, the next instrument reading reflects the new calculation
(assuming CALC 1 math is enabled). If the instrument is not in a continuous measurement mode
(i.e. waiting for a trigger), the displayed reading will not update to reflect the new calculation
until the next reading conversion occurs.
This action command allows you to reprocess the current input data to reflect a new calculation.
For example, assume the instrument is in a non-continuous measurement mode and requires a
manual trigger to cause the next reading conversion. Changing the calculation will not affect the
currently displayed reading. However, sending the :IMMediate command reprocesses that dis-
played reading to reflect the new calculation. Note that sending the :IMMediate command does
not initiate a reading conversion.
An alternate way to perform the calculation and read the result is by using the query form of the
command (:IMMediate?). When this command is sent, the calculation is performed and the
result is queried.
PRINT #1, "output 16; :syst:pres?" ' Select defaults
PRINT #1, "output 16; :trig:sour bus" ' Place 2002 in one-shot measure mode
SLEEP 3 ' Wait three seconds
PRINT #1, "output 16; :calc:form pol" ' Select polynomial math calculation
PRINT #1, "output 16; :calc:kmat:ma0f 50" ' Set "a0" to 50
PRINT #1, "output 16; :calc:stat on" ' Enable MATH calculation
SLEEP 3 ' Wait three seconds
PRINT #1, "output 16; :cal:imm" ' Perform calculation (adds 50 to
reading)
:CALCulate2
This Calculate subsystem is used to configure and control CALC 2 operations on readings
stored in the buffer.
Program fragment
Description
Program fragment
Query
Description
Program fragment
3.12.2