User manual
18-30 SCPI Command Reference 2400 Series SourceMeter
®
User’s Manual
Expressions are evaluated according to the following precedence
rules:
1. Enclosed by parentheses
2. Unary operators (+ and -)
3. ^ (exponentiation)
4. * (multiplication) and / (division)
5. + (addition) and - (subtraction)
6. Left to right.
The readings used for the calculation depend on how the SourceMe-
ter is configured. If configured to Source V Measure I, the voltage
reading for the calculation will be the source value, and the current
reading will be the current measurement. Conversely, if configured to
Source I Measure V, the current reading will be the source value,
and the voltage reading will be the voltage measurement.
Measure readings take priority over source readings. Thus, if config-
ured to Source V Measure V, the voltage reading for the calculation
will be the voltage measurement (not the programmed V-Source
value). Conversely, if configured to Source I Measure I, the current
reading for the calculation will be the current measurement.
The result of a calculation using a reading that is not sourced or mea-
sured will be the invalid NAN (not a number) value of +9.91e37. For
example, using a current reading in a calculation for Source V Mea
-
sure V will cause a NAN result.
Example using Source I Measure V configuration:
:calc:math (volt * curr) Calculate power using voltage measurement
and I-Source value.
After a calculation is configured and enabled, the results are dis-
played when source-measure operations are performed. (See
“:STATe <b>,” page 18-32.) Use the :data? command to send the
results to the computer.
Vectored math
By incorporating vectors, you select which readings to use for the
math calculation. After all programmed source-measure operations
are completed, the math calculation(s) are performed using readings
indicated by the specified vectors.
Vector numbers are enclosed in brackets ([]), and start at 0. Thus,
vector 0 is the first reading in the array, vector 1 is the second read
-
ing in the array, and so on. The largest vector number in the expres-
sion defines the vector array size.
For example, assume the SourceMeter is programmed to perform 10
source-measure operations, and the following vectored math calcu
-
lation is used:
(volt[3] - volt[9])