S530/S540 KTE Linear Parametric Test Library (LPTLib) User's Manual Section 3:
S530-900-01 Rev. E / September 2017 3-11
avgX
This command makes a series of measurements and averages the results.
Usage
int avgc(int instr_id, double *result, unsigned int stepno, double steptime);
int avgcg(int instr_id, double *c, double *g, unsigned int stepno, double steptime);
int avgg(int instr_id, double *result, unsigned int stepno, double steptime);
int avgi(int instr_id, double *result, unsigned int stepno, double steptime);
int avgv(int instr_id, double *result, unsigned int stepno, double steptime);
The instrument identification code of the measuring instrument;
n,
n,
n
n
The variable assigned the result of the measurement
The number of steps averaged in the measurement (1 to 32,767)
The interval in seconds between each measurement; the minimum practical time is
approximately 2.5 ms
The variable assigned the capacitance measurement
The variable assigned the conductance measurement
Details
The avgX command is used primarily to get measurements when:
• The device under test (DUT) being tested acts in an unstable manner.
• Electrical interference is higher than can be tolerated if the measX command were to be used.
The programmer specifies the number of samples and the duration between each sample.
After this command executes, all closed relay matrix connections remain closed and the sources
continue to generate voltage or current. This allows additional sequential measurements.
In general, measurement commands that return multiple results are more efficient than performing
multiple measurement commands. For example, calling a single avgcg command is faster than
calling the avgc command followed by the avgg command.
The rangeX command directly affects the operation of the avgX command. The use of the rangeX
command prevents the addressed instrument from automatically changing ranges. This can result in
an overrange condition similar to what would occur when measuring 10 V on a 2 V range. An
overrange condition returns the value as the result of the measurement.
If the rangeX command is not in the test sequence before the avgX call, the measurements
performed automatically select the optimum range.