
Section 3: LPTLib command reference
S530/S540 KTE Linear Parametric Test Library (LPTLib) User's Manual
3-64
S530-900-01 Rev. E / September 2017
savgX
This command makes an averaging measurement for every point in a sweep.
Usage
int savgi(int
instr_id
, double *
result
, unsigned int
count
, double
delay
);
int savgv(int
instr_id
, double *
result
, unsigned int
count
, double
delay
);
instr_id
The instrument identification code of the measuring instrument;
CMTR
n
,
VMTR
n
,
IMTR
n
result
The floating point array where the results are stored
count
The number of measurements made at each point before the average is computed
delay
The time delay in seconds between each measurement within a given ramp step
Details
This command creates an entry in the measurement scan table. During any of the sweeping
commands, a measurement scan is done for every force point in the sweep. During each scan, a
measurement is made for every entry in the scan table. The measurements are made in the same
order in which the entries were made in the scan table.
The
savg
X
command sets up the new scan table entry to make an averaging measurement. The
measurement results are stored in the array specified by the
result
parameter. Each time a
measurement scan is made, a new measurement result is stored at the next location in the
result
array. If the scan table is not cleared, performing multiple sweeps will continue adding new
measurement results to the end of the array. Care must be taken that the
result
array is large
enough to hold all measurements made before the scan table is cleared. The scan table is cleared by
an explicit call to the
clrscn
command, or implicitly when the
devint
command is called.
When making each averaged measurement, the number of actual measurements specified by the
count
parameter is made on the instrument at the number of seconds apart specified by the
delay
parameter, and then the average is calculated. This average is the value that will be stored in the
results array.
Example
double res1[26];
.
.
conpin(3, 2, GND, 0);
conpin(SMU1, 4, 0);
savgi(SMU1, res1, 8, 1.0E-3); /* Measure average */
/* current 8 times per */
/* sample; return results to */
/* res1 array. */
sweepv(SMU1, 0.0, -50.0, 25, 2.0E-2); /* Generate */
/* a voltage from 0 V */
/* to -50 V over 25 steps.*/