3: LPTLib command reference S530/S540 KTE Linear Parametric Test Library (LPTLib) User's Manual
3-88 S530-900-01 Rev. E / September 2017
sweepX
This command generates a ramp consisting of ascending or descending voltages or currents. The sweep consists
of a sequence of steps, each with a user-specified duration.
Usage
int sweepi(int instr_id, double startval, double endval, long stepno, double
step_delay);
int sweepv(int instr_id, double startval, double endval, long stepno, double
step_delay);
The instrument identification code of the sourcing instrument
The initial voltage or current level output from the sourcing instrument, which is
applied for the first sweep measurement; this value can be positive or negative
The final voltage or current level applied in the last step of the sweep; this value can
be positive or negative
The number of current or voltage changes in the sweep; the actual number of
forced data points is one greater than the number of steps specified
The delay in seconds between each step and the measurements defined by the
active measure list
Details
The sweepX command is always used with the smeasX, sintgX, savgX, or rtfary command.
The sweepX command causes a sourcing instrument to generate a series of ascending or
descending voltages or current changes called steps. During this source time, a measurement scan is
done at each step.
The actual number of forced data points is one more than the number of steps specified. This means
that the number of measurements made is the number of steps specified plus one. This is important
when dimensioning the size of the results array. Failure to make sure the array is big enough will
produce operating system access violation errors.
Measurements are stored in a one-dimensional array in the order they were made.
The trigXg or trigXl commands can be used with the sweepX command, even though they are
al
so used with the smeasX, sintgX, or savgX commands. In this case, data resulting from each of
the steps is stored in an array, as noted above. However, once a trigger point (for example, a level of
current or voltage) is reached, the sourcing device stops incrementing or decrementing and is held at
a steady output level for the remainder of the sweep.
The system maintains a measurement scan table consisting of devices to measure. This table is
maintained by calls to the smeasX, sintgX, savgX, or clrscn command. As multiple calls to these
commands are made, the commands are appended to this table.