Model 4200A-SCS Parameter Analyzer Reference Manual
Section 13: LPT library function reference
4200A-901-01 Rev. C / February 2017
13-195
Programming example #2
Performs a single staircase voltage sweep, as shown in the figure below.
Figure 516: Voltage sweep example
CpGp is measured on each step of the sweep.
Test parameters:
•
AC drive frequency = 100 kHz
•
AC drive voltage = 15 mV
RMS
•
Measure model = CpGp
•
Measure range = Auto
•
Sweep mode = single
•
Start voltage = 1 V
•
Stop voltage = 3 V
•
Number of steps = 3
•
Delay = 50 ms
This example also returns a timestamp for each measurement and measures the execution time of
the code.
double result1[4], result2[4], timeStamp1[4], timeStamp2;
enable(TIMER1); /* Start timer at 0 seconds. */
setfreq(CVU1, 100e3); /* Set AC drive frequency to 100 kHz. */
setlevel(CVU1, 15e-3); /* Set AC drive voltage to 15 mV RMS. */
setauto(CVU1); /* Select auto measure range. */
smeasz(CVU1, KI_CVU_TYPE_CPGP, KI_CVU_SPEED_NORMAL, result1, result2);
/* Configure CpGp measurements. */
smeast(CVU1, timeStamp1); /* Return timestamps for all measurements. */
rtfary(forceArray); /* Return array of force voltages. */
sweepv(CVU1, 1, 3, 3, 0.05); /* Configure and perform sweep. */
meast(TIMER1, &timeStamp2); /* Return execution time for above. */
/* block of code. */
devint(); /* Reset CVU. */