Section 13: LPT library function reference
Model 4200A-SCS Parameter Analyzer Reference Manual
13-104
4200A-901-01 Rev. C / February 2017
Data retrieval options for
pulse_fetch
There are two options to retrieve data:
•
Wait until the test is completed
•
Retrieve blocks of data while the test is running
Because
pulse_exe
c is a non-blocking command, the running user test module (UTM) will continue
after it is called to start the test. This means that the program will not automatically pause to allow the
pulse-measure test to finish.
The programmer must ensure that the test program does not finish or return to Clarius before the
test is complete. Erroneous results and damage to test devices may occur.
If
pulse_fetch
is inadvertently called before the test is completed, the data buffer may not fill with
all the requested readings. Array entries are designated as zero for test data that is not yet available.
Wait until the test is complete before retrieving data
An effective method to pause the program is to monitor the status of the test by using a
while
loop
to check the returned value of
pulse_exec_status
. When the test is completed, the program drops
out of the loop and calls
pulse_fetch
to retrieve all the test data. The following program fragment
shows how to use a
while
loop.
Program fragment 1
// Code to configure the PMU test here
// Start the test (no analysis)
pulse_exec(0);
// while loop and short delay (10 ms)
while (pulse_exec_status(&elapsedt) == 1)
{
Sleep(10);
}
// Retrieve all data
status = pulse_fetch(PMU1, 1, 0, 49, Drain_Vmeas, Drain_Imeas, NULL, NULL);
// Code for data handling here
After all the data is retrieved, it can be analyzed, manipulated and then posted into the Clarius
Analyze sheet. Use the
PostDataDouble
or
PostDataDoubleBuffer
command to post the data.