8-11
IM 765501-01E
Computation
3
2
1
6
5
4
9
8
7
12
11
10
15
14
13
18
17
16
Index
App
The GS610 retains the past 15 measured values (before the computation) in addition to
the current measured value. These measured values can be used in the computation.
M[-1] represents the previous measured value, and M[-15] represents the measured
value 15 measurements in the past.
For example, to perform moving average over five measurements, write the equation
as follows:
M=(M+M[-1]+M[-2]+M[-3]+M[-4])/5
If the past measured value is not retrieved, the computed result is over range. In the
above example, the display is O.L until five source measure cycles are completed.
The available variables are listed below.
Variable
Meaning
M
Current measured value. If a value is substituted in this variable, the result
becomes the measured result after the computation.
S
Current source value. If a value is substituted in this variable, the result is used as
the next source value.
T
Current time stamp. Indicates the elapsed seconds from the first source measure
cycle. The resolution is 1
µ
s. A value cannot be substituted in this variable.
M[-n]
Measured value n times in the past (before computation). The variable n is an
integer between 1 and 15. A value cannot be substituted in this variable.
S[-n]
Source value n times in the past The variable n is an integer between 1 and 15. A
value cannot be substituted in this variable.
T[-n]
Time stamp n times in the past. The variable n is an integer between 1 and 15. A
value cannot be substituted in this variable.
I
Current source value or measured value that is a current. A value cannot be
substituted in this variable.
V
Current source value or measured value that is a voltage. A value cannot be
substituted in this variable.
A, B, C
General-purpose parameters that can be edited from the operation menu. A value
cannot be substituted in this variable.
X, Y, Z
General-purpose variables. When a value is substituted, it is retained until another
value is substituted.
J
A counter that increases for each source measure cycle starting from 0. A value
cannot be substituted in this variable.
The description in the definition file can span multiple lines that are delimited by line feed
codes (CR, LF, or CRLF).
For example,
M=((M*2+3)*(M/4–5)+6)/7
can be written using general-purpose variables X and Y as intermediate variables as
X=M*2+3
Y=M/4–5
M=(X*Y+6)/7
In addition, initial values can be assigned to general-purpose variables X, Y, and Z.
For example, if you write
X0=0
X=X+1
the value of general-purpose variable X changes each source measure cycle as follows:
0, 1, 2, and so on.
You can use an If statement to change the operation according to a given condition.
For example, if you write
IF ((V*I)>9.5) THEN @”:OUTP OFF”
the output can be turned OFF when the product of V and I or the power exceeds 9.5 W.
The character string enclosed in double quotations following the @ character is parsed
as a command mnemonic and executed.
For details, see appendix 1, “MATH Definition Specifications.”
8.5 User-Defined Computation