CALCulate Commands (Set and Query Calculations)


Set or query an arithmetic operator

8860, 8861


Syntax


(Command)
(Query)


:CALCulate:ACCOunt NO$,N1,A$,N2
:CALCulate:ACCOunt? NO$

(Response)

NO$,N1<NR1>,A$,N2<NR1>
NO$: NO1 to NO16
N1, N2: 1 to 16
A$: PLUS, MINUS, MULT, DIV


Details


Specifies an arithmetic operator for numerical calculation.
Returns the currently specified arithmetic operator.

PLUS  addition (+)
MINUS  subtraction (-)
MULT  multiplication (*)
DIV  division (/)


Example


:CALCulate:ACCOunt NO3,1,PLUS,2
:CALCUlate:ACCOunt? NO3
(Response)  :CALCULATE:ACCOUNT NO3,1,PLUS,2  (when headers are enabled)


Note


-


Usage
Conditions


MEM
CALC when the state of the numerical calculation is set to basic arithmetic.




Queries a calculation result

8860, 8861


Syntax


(Query)


:CALCulate:ANSWer? NO$

(Response)

NO$,A$,B<NR3>
NO$ = NO1 to NO16
A$ = OFF, AVE, RMS, PP, MAX, MAXT, MIN, MINT, PERI, FREQ, RISE, FALL, STD, AREA, XYAREA, LEVEL, PWIDTH, DUTY, PCOUNT, CALC
B = Calculation result (unless A$ = OFF), NONE (when no calculation result can be obtained)


Details


Returns the calculation operator and result of specified numerical calculation NO$.
If A$ is set to OFF, there are no calculation results.

OFF  (No calculation performed)
AVE  (Average value)
RMS  (RMS value)
PP  (Peak value)
MAX  (Maximum value)
MAXT  (Time to maximum value)
MIN  (Minimum value)
MINT  (Time to minimum value)
PERI  (Period)
FREQ  (Frequency)
RISE  (Rise time)
FALL  (Fall time)
STD  (Standard deviation)
AREA  (Area value)
XYAREA  (X-Y area value)
LEVEL  (Time to specified level)
PWIDTH  (Pulse width)
DUTY  (Duty ratio)
PCOUNT  (Pulse count)
CALC  (Basic arithmetic)


Example


:CALCulate:ANSWer? NO1
(Response)  :CALCULATE:ANSWER NO1,MIN,-1.2345E-03  (when headers are enabled)


Note


If calculation results could not be obtained, B = "NONE".


Usage
Conditions


MEM




Select or query area (interval) setting for waveform calculations

8860, 8861


Syntax


(Command)
(Query)


:CALCulate:CALCArea A$
:CALCUlate:CALCArea?

(Response)

A$
A$ = ALL, A_B


Details


Selects whether waveform calculations apply to the whole waveform, or just to a specified portion (area).
Returns a text string indicating whether waveform calculations apply to the whole waveform or a specified portion (area).

ALL  Whole waveform
A_B  Waveform between A/B cursors


Example


:CALCulate:CALCArea ALL
:CALCulate:CALCArea?
(Response)  :CALCULATE:CALCAREA ALL  (when headers are enabled)


Note


-


Usage
Conditions


MEM




Set or query a calculation comparator state

8860, 8861


Syntax


(Command)
(Query)


:CALCulate:COMP NO$,A$
:CALCulate:COMP? NO$

(Response)

NO$,A$
NO$ = NO1 to NO16
A$ = OFF, ON


Details


Enables or disables the calculation comparator (for judgment).
Returns the current on/off state of the calculation comparator as a text string.


Example


:CALCulate:COMP NO1,ON
(Sets the calculation comparator state of NO1 to ON.)

:CALCulate:COMP? NO1
(Response)  :CALCULATE:COMP NO1,ON  (when headers are enabled)


Note


-


Usage
Conditions


MEM




Set or query comparator thresholds for a numerical calculation

8860, 8861


Syntax


(Command)
(Query)


:CALCulate:COMPArea NO$,A,B
:CALCulate:COMPArea? NO$

(Response)

NO$,A<NR3>,B<NR3>
NO$ = NO1 to NO16
A, B = -9.9999E+29 to +9.9999E+29


Details


Sets upper and lower comparator judgment thresholds for numerical calculation NO$.
Returns the current values of the upper and lower thresholds for numerical calculation NO$ as NR3 numerical values.

"A" is the upper threshold and "B" is the lower threshold.


Example


:CALCulate:COMPArea NO1,+1.0000E+00,-1.0000E+00
(Sets the comparison range for numerical calculation NO1 to -1.000E+00 to +1.000E+00.)

:CALCulate:COMPArea? NO1
(Response)  :CALCULATE:COMPAREA NO1,+1.0000E+00,-1.0000E+00  (when headers are enabled)


Note


-


Usage
Conditions


MEM




Query the comparison result of a numerical calculation

8860, 8861


Syntax


(Query)


:CALCulate:COMPJudge? NO$

(Response)

NO$,A$,B$
A$ = OFF, AVE, RMS, PP, MAX, MAXT, MIN, MINT, PREI, FREQ, RISE, FALL, STD, AREA, XYAREA, LEVEL, PWIDTH, DUTY, PCOUNT, CALC
NO$ = ALL, NO1 to NO16
B$ = GO, NG, *


Details


Returns the comparator judgment result of numerical calculation NO$.
When NO$ = "ALL", the returned result is the combined judgment of all calculation results.
If B$ = "*", no judgment is available for the specified numerical calculation.

OFF  (No calculation performed)
AVE  (Average value)
RMS  (RMS value)
PP  (Peak value)
MAX  (Maximum value)
MAXT  (Time to maximum value)
MIN  (Minimum value)
MINT  (Time to minimum value)
PERI  (Period)
FREQ  (Frequency)
RISE  (Rise time)
FALL  (Fall time)
STD  (Standard deviation)
AREA  (Area value)
XYAREA  (X-Y area value)
LEVEl  (Time to specified level)
PWIDTH  (Pulse width)
DUTY  (Duty ratio)
PCOUNT  (Pulse count)
CALC  (Basic arithmetic)


Example


:CALCulate:COMPJudge? NO1
:CALCulate:COMPJudge? ALL
(Response)  :CALCULATE:COMPJUDGE NO1,AVE,GO  (when headers are enabled)


Note


-


Usage
Conditions


MEM




Set or query calculation comparator judgment to stop measurement

8860, 8861


Syntax


(Command)
(Query)


:CALCulate:COMPStop A$
:CALCulate:COMPStop?

(Response)

A$
A$ = GO, NG, G_N


Details


Specifies the numerical calculation judgment criterion that will stop measurement.
Queries the judgment criterion currently specified to stop measurement.


Example


:CALCulate:COMPStop NG
(Measurement storage stops when the result of comparison of a numerical calculation is NG.)

:CALCulate:COMPStop?
(Response)  :CALCULATE:COMPSTOP NG  (when headers are enabled)


Note


-


Usage
Conditions


MEM




Set or query waveform calculation factor (constant) A to P

8860, 8861


Syntax


(Command)
(Query)


:CALCulate:FACTor A$,B
:CALCulate:FACTor? A$

(Response)

A$,B<NR3>
A$ = A to P
B = -9.9999E+29 to +9.9999E+29


Details


Assigns a value to waveform calculation constant A to P.
Returns the value currently assigned to constant A to P.


Example


:CALCulate:FACTor A,1000
:CALCulate:FACTor? A
(Response)  :CALCULATE:FACTOR A,+1.0000E+03  (when headers are enabled)


Note


-


Usage
Conditions


MEM




Set or query a numerical calculation group

8860, 8861


Syntax


(Command)
(Query)


:CALCulate:GROUp A
:CALCulate:GROUp?

(Response)

A<NR1>
A = 1 to 16


Details


Specifies the active numerical calculation group.
Queries the currently active numerical calculation group.


Example


:CALCulate:GROUp 15
:CALCulate:GROUp?
(Response)  :CALCULATE:GROUP 15  (when headers are enabled)


Note


-


Usage
Conditions


MEM




Select or query area (interval) setting for numerical calculations

8860, 8861


Syntax


(Command)
(Query)


:CALCulate:MEASArea A$
:CALCulate:MEASArea?

(Response)

A$
A$ = ALL, A_B


Details


Selects whether numerical calculations apply to the whole waveform, or just to a specified portion (area).
Returns a text string indicating whether numerical calculations apply to the whole waveform or a specified portion (area).

ALL  (Whole waveform)
A_B  (Waveform between A/B cursors)


Example


:CALCulate:MEASArea ALL
:CALCulate:MEASArea?
(Response)  :CALCULATE:MEASAREA ALL  (when headers are enabled)


Note


-


Usage
Conditions


MEM




Set or query auto-saving of calculation results

8860, 8861


Syntax


(Command)
(Query)


:CALCulate:MEASFsave A$
:CALCulate:MEASFsave?

(Response)

A$
A$ = OFF, ON


Details


Selects whether numerical calculation results are saved by the auto-save function.
Returns the current selection of whether numerical calculation results are auto-saved.


Example


:CALCulate:MEASFsave ON
:CALCulate:MEASFsave?
(Response)  :CALCULATE:MEASFSAVE ON  (when headers are enabled)


Note


-


Usage
Conditions


MEM




Set or query print output of calculation results

8860, 8861


Syntax


(Command)
(Query)


:CALCulate:MEASPrint A$
:CALCulate:MEASPrint?

(Response)

A$
A$ = OFF, PRINter, USB


Details


Specifies the output device for printing calculation results.
Returns a text string indicating the currently specified printing device for numerical calculation results.

OFF     (no printing)
PRINter (internal printer)
USB     (external USB printer)


Example


:CALCulate:MEASPrint PRINter
:CALCulate:MEASPrint?
(Response)  :CALCULATE:MEASPRINT PRINTER  (when headers are enabled)


Note


"PRINter" is only available when the internal printer option is installed.


Usage
Conditions


MEM




Specify or query the function and channel(s) for a numerical calculation

8860, 8861


Syntax


(Command)



(Query)


:CALCulate:MEASSet NO$,A$  (A$ = OFF, CALC)
:CALCulate:MEASSet NO$,A$,CH$  (other cases)
:CALCulate:MEASSet NO$,A$,CH1$,CH2$  (A$ = XYAREA)
:CALCulate:MEASSet NO$,A$,CH$,B  (CH$ is logic channel (CHx))
:CALCulate:MEASSet? NO$

(Response)

NO$,A$,CH$
NO$,A$,CH1$,CH2$  (A$ is XYAREA)
NO$,A$,CH$,B  (CH$ is logic channel)

NO$ = NO1 to NO16
A$ = OFF, AVE, RMS, PP, MAX, MAXT, MIN, MINT, PERI, FREQ, RISE, FALL, STD, AREA, XYAREA, LEVEl, PWIDth, DUTY, PCOUnt, CALC
CH$ = CHm_n, CHx, Z1 to Z16
CH1$, CH2$ = CHm_n, Z1 to Z16
B = 1, 2, 3, 4 (logic number)


Details


Defines numerical calculation NO$ by specifying a calculation function (A$) and channel.
Returns the calculation function and channel specified for NO$.

OFF  No calculation performed
AVE  Average value(note)
RMS  RMS value(note)
PP  Peak value(note)
MAX  Maximum value(note)
MAXT  Time to maximum value(note)
MIN  Minimum value(note)
MINT  Time to minimum value(note)
PERI  Period(note)
FREQ  Frequency(note)
RISE  Rise time(note)
FALL  Fall time(note)
STD  Standard deviation(note)
AREA  Area value(note)
XYAREA  X-Y area value(note)
LEVEl  Time to specified level
PWIDTH  Pulse width
DUTY  Duty ratio
PCOUNT  Pulse count
CALC  Basic arithmetic(note)

(note) Not available for logic channels.


Example


:CALCulate:MEASSet NO1,MAX,CH1_1
(Defines calculation NO1 to be the maximum value on channel 1-1.)

:CALCulate:MEASSet NO2,XYAREA,CH1_1,CH1_2
(Defines calculation NO2 to be the value of the area circumscribed by the X-Y waveform composed of channels 1-1 and 1-2.)

:CALCulate:MEASSet NO3,DUTY,CHA,2
(Defines calculation NO3 to be the duty ratio of channel A-2.)

:CALCulate:MEASSet? NO1
(Response)  :CALCULATE:MEASSET NO1,MAX,CH1_1  (when headers are enabled)


Note


-


Usage
Conditions


MEM




Set or query execution of numerical calculations

8860, 8861


Syntax


(Command)
(Query)


:CALCulate:MEASure A$
:CALCulate:MEASure?

(Response)

A$
A$ = OFF, ON, EXEC


Details


Sets the numerical calculation execution state.
Returns a text indicator of the current numerical calculation execution state.
Calculation is performed when A$ = "EXEC".


Example


:CALCulate:MEASure ON
:CALCulate:MEASure EXEC
:CALCulate:MEASure?
(Response)  :CALCULATE:MEASURE ON  (when headers are enabled)


Note


The execution state is "ON" after calculation is executed by "EXEC".


Usage
Conditions


MEM




Set or query filtering for a numerical calculation

8860, 8861


Syntax


(Command)
(Query)


:CALCulate:MFILter NO$,A
:CALCulate:MFILter? NO$

(Response)

NO$,A<NR2>
NO$ = NO1 to NO16
A = 0.0, 0.1, 0.2, 0.5, 1.0, 1.5, 2.0, 2.5, 5.0, 10.0


Details


Sets filtering for numerical calculation NO$.
Queries the current filter setting for numerical calculation NO$.

When "A" = 0, the filter setting is OFF.


Example


:CALCulate:MFILter NO1,0.5
(Sets the filter for numerical calculation NO1 to be 0.5 divisions.)

:CALCulate:MFILter? NO1
(Response)  :CALCULATE:MFILTER NO1,0.5  (when headers are enabled)


Note


Applicable calculation modes are the following:

PERI  (Period)
FREQ  (Frequency)
LEVEl  (Time to specified level)
PWIDTH  (Pulse width)
DUTY  (Duty ratio)
PCOUNT  (Pulse count)


Usage
Conditions


MEM




Set or query the level for a numerical calculation

8860, 8861


Syntax


(Command)
(Query)


:CALCulate:MLEVel NO$,A
:CALCulate:MLEVel? NO$

(Response)

NO$,A<NR3>
NO$ = NO1 to NO16
A = level


Details


Specifies the level (amplitude) for numerical calculation NO$.
Queries the currently specified level for numerical calculation NO$.


Example


:CALCulate:MLEVel NO1,1.2345E-06
:CALCulate:MLEVel? NO1
(Response)  :CALCULATE:MLEVEL NO1,1.2345E-06  (when headers are enabled)


Note


This command is not applicable to logic channels.
Applicable calculation modes are the following:

PERI  (Period)
FREQ  (Frequency)
LEVEl  (Time to specified level)
PWIDTH  (Pulse width>
DUTY  (Duty ratio)
PCOUNT  (Pulse count)


Usage
Conditions


MEM




Set or query the slope for a numerical calculation

8860, 8861


Syntax


(Command)
(Query)


:CALCulate:MSLOpe NO$,A
:CALCulate:MSLOpe? NO$

(Response)

NO$,A$
NO$ = NO1 to NO16
A$ = UP, DOWN


Details


Specifies the slope direction for numerical calculation NO$.
Returns the currently specified slope direction for numerical calculation NO$.


Example


:CALCulate:MSLOpe NO1,UP
:CALCulate:MSLOpe? NO1
(Response)  :CALCULATE:MSLOPE NO1,UP  (when headers are enabled)


Note


Applicable calculation modes are the following:

PERI  (Period)
FREQ  (Frequency)
LEVEl  (Time to specified level)
PWIDTH  (Pulse width>
PCOUNT  (Pulse count)


Usage
Conditions


MEM




Set or query the stat for a numerical calculation

8860, 8861


Syntax


(Command)
(Query)


:CALCulate:MSTAtis NO$,A$
:CALCulate:MSTAtis? NO$

(Response)

NO$,A$
NO$ = NO1 to NO16
A$ = FIRST,AVE,MAX,MIN


Details


Make settings for the numerical calculation statistics.
Query the settings made for the numerical calculation statistics.


Example


:CALCulate:MSTAtis NO3,AVE
(Sets the statistics for calculation No.3 to display as the average.)
:CALCulate:MSTAtis? NO3
(Response)  :CALCULATE:MSTATIS NO3,AVE  (when headers are enabled)


Note


Applicable calculation modes are the following:

FIRST  (first calcuration result)
AVE  (average value)
MAX  (largest value)
MIN  (smallest value>


Usage
Conditions


MEM
When cycle, frequency, rise time, fall time, pulse width, or duty ratio is selected as the type of numerical calculation.




Set or query the rise or fall time percentage for a numerical calculation

8860, 8861


Syntax


(Command)
(Query)


:CALCulate:PERCent NO$,A
:CALCulate:PERCent? NO$

(Response)

NO$,A<NR1>
NO$ = NO1 to NO16
A = 5 to 30


Details


Specifies the rise or fall time percentage for numerical calculation NO$.
Queries the specified rise or fall time percentage for numerical calculation NO$.


Example


:CALCulate:PERCent NO1,10
:CALCulate:PERCent? NO1
(Response)  :CALCULATE:PERCENT NO1,10  (when headers are enabled)


Note


The available calculation modes are as follows.

RISE  (Rise time)
FALL  (Fall time)


Usage
Conditions


MEM




Set or query execution of waveform calculations

8860, 8861


Syntax


(Command)
(Query)


:CALCulate:WVCALc A$
:CALCulate:WVCALc?

(Response)

A$
A$ = OFF, ON, EXEC


Details


Sets the waveform calculation execution state.
Returns a text string indicating the current waveform calculation execution state.
Calculation is performed when A$ = "EXEC".


Example


:CALCulate:WVCALc ON
:CALCulate:WVCALc?
(Response)  :CALCULATE:WVCALC ON  (when headers are enabled)


Note


-


Usage
Conditions


MEM




Set or query the waveform color for a waveform calculation

8860, 8861


Syntax


(Command)
(Query)


:CALCulate:WVCOLor Z$,A$
:CALCulate:WVCOLor? Z$

(Response)

Z$,A$
Z$ = Z1 to Z16
A$ = OFF, C1 to C36


Details


Assigns a color to the waveform for waveform calculation Z$.
Returns a text string indicating the color of waveform calculation Z$.
The waveform is invisible when A$ = OFF.

C1

C2

C3

C4

C5

C6

C7

C8

C9

C10

C11

C12

C13

C14

C15

C16

C17

C18

C19

C20

C21

C22

C23

C24

C25

C26

C27

C28

C29

C30

C31

C32

C33

C34

C35

C36



Example


:CALCulate:WVCOLor Z1,C3
:CALCulate:WVCOLor? Z1
(Response)  :CALCULATE:WVCOLOR Z1,C4  (when headers are enabled)


Note


-


Usage
Conditions


MEM




Set or query auto/manual scaling for a waveform calculation

8860, 8861


Syntax


(Command)
(Query)


:CALCulate:WVSCale Z$,A$
:CALCulate:WVSCale? Z$

(Response)

Z$,A$
Z$ = Z1 to Z16
A$ = AUTO, MANUal


Details


Selects auto or manual scaling for waveform calculation Z$.
Returns a text string indicating the auto/manual scaling setting for waveform calculation Z$.

AUTO
MANUal


Example


:CALCulate:WVSCale Z1,MANUal
:CALCulate:WVSCale? Z1
(Response)  :CALCULATE:WVSCALE MANUAL  (when headers are enabled)


Note


-


Usage
Conditions


MEM




Set or query a waveform calculation formula

8860, 8861


Syntax


(Command)
(Query)


:CALCulate:Z Z$,"A"
:CALCulate:Z? Z$

(Response)

Z$,"A"
Z$ = Z1 to Z16
A$ = (formula)


Details


Assigns a formula to waveform calculation Z$.
Returns the formula of waveform calculation Z$ as text string A$.

(80 chars max.: variables are lower-case, formula is upper case)


Example


:CALCulate:Z Z1,"CH(1,1)*2"
:CALCulate:Z? Z1
(Response)  :CALCULATE:Z Z1,"CH(1,1)*2"  (when headers are enabled)


Note


-


Usage
Conditions


MEM




Set or query a waveform calculation comment

8860, 8861


Syntax


(Command)
(Query)


:CALCulate:ZCOMment Z$,"A"
:CALCulate:ZCOMment? Z$

(Response)

Z$,"A"
Z$ = Z1 to Z16
A$ = Comment text (up to 40 characters)


Details


Assigns a comment to waveform calculation Z$.
Returns the text of the comment assigned to waveform calculation Z$.

Special characters can be entered as follows:
(Special characters other than the following are replaced by spaces.)

^2 ( = 2 )

^3 ( = 3 )

^n ( = n )

~u ( = μ )

~o ( = Ω )

~e ( = ε )

~c ( = ° )

~+ ( = ± )

~, ( = ' )

~; ( = " )


Either single (') or double quotation marks (") can be used in the command argument.


Example


:CALCulate:ZCOMment Z1,"TEST"
:CALCulate:ZCOMment? Z1
(Response)  :CALCULATE:ZCOMMENT Z1,"TEST"  (when headers are enabled)


Note


-


Usage
Conditions


MEM




Set or query graph display of a waveform calculation

8860, 8861


Syntax


(Command)
(Query)


:CALCulate:ZDIsplay A,Z$(,B)
:CALCulate:ZDIsplay? A

(Response)

A<NR1>,Z$,B
A = 1 to 16 (Screen No.)
Z$ = OFF, Z1 to Z16 (Calculation)
B = 1 to 16 (Graph No. [may be omitted])


Details


Assigns waveform calculation Z$ to display on screen number A (and optionally as graph number B), and activates display of waveform calculation graphs.
Returns the calculation and graph assigned to screen A as Z$ and B, respectively.


Example


:CALCulate:ZDIsplay 1,Z1,1
:CALCulate:ZDIsplay? 1
(Response)  :CALCULATE:ZDISPLAY 1,Z1,1  (when headers are enabled)


Note


The range of valid values for B is determined by the split-screen setting.


Usage
Conditions


MEM




Set or query the range and position of a waveform calculation

8860, 8861


Syntax


(Command)
(Query)


:CALCulate:ZRANGe Z$,A,B
:CALCulate:ZRANGe? Z$

(Response)

Z$,A<NR3>,B<NR3>
Z$ = Z1 to Z16
A = (Range)
B = (Position)


Details


Assigns a range and position to waveform calculation Z$.
Returns the range and position of waveform calculation Z$ as NR3 values.


Example


:CALCulate:ZRANGe Z1,+1.0E-03,50
:CALCulate:ZRANGe? Z1
(Response)  :CALCULATE:ZRANGE Z1,+1.0000E-03,+50.000E+00  (when headers are enabled)


Note


-


Usage
Conditions


MEM




Set or query the unit name assigned to a waveform calculation

8860, 8861


Syntax


(Command)
(Query)


:CALCulate:ZUNIt Z$,"A"
:CALCulate:ZUNIt? Z$

(Response)

Z$,"A"
Z$ = Z1 to Z16
A$ = Unit name (up to 7 characters)


Details


Assigns unit "A" to be used for waveform calculation Z$.
Returns the name of the unit (module) assigned to waveform calculation Z$.

Special characters can be entered as follows:
(Special characters other than the following are replaced by spaces.)

^2 ( = 2 )

^3 ( = 3 )

^n ( = n )

~u ( = μ )

~o ( = Ω )

~e ( = ε )

~c ( = ° )

~+ ( = ± )

~, ( = ' )

~; ( = " )


Either single (') or double quotation marks (") can be used in the command argument.


Example


:CALCulate:ZUNIt Z1,"VA"
:CALCulate:ZUNIt? Z1
(Response)  :CALCULATE:ZUNIT Z1,"VA"  (when headers are enabled)


Note


-


Usage
Conditions


MEM




Set or query waveform calculation thresholds

8860, 8861


Syntax


(Command)
(Query)


:CALCulate:ZUPLow Z$,A,B
:CALCulate:ZUPLow? Z$

(Response)

Z$,A<NR3>,B<NR3>
Z$ = Z1 to Z16
A = (upper threshold)
B = (lower threshold)


Details


Assigns upper and lower thresholds for waveform calculation Z$.
Returns the upper and lower thresholds assigned to waveform calculation Z$ as NR3 values.


Example


:CALCulate:ZUPLow Z1, 1E-03,-1E-03
:CALCulate:ZUPLow? Z1
(Response)  :CALCULATE:ZUPLOW Z1,1.0000E-03,-1.0000E-03  (when headers are enabled)


Note


-


Usage
Conditions


MEM