VTI Instruments Corp.
228 EX1629 Command Set
vtex1629_self_test
FUNCTION PROTOTYPE
ViStatus vtex1629_self_test (ViSession instrumentHandle, ViPInt16 selfTestResult, ViChar _VI_FAR
testMessage[]);
FUNCTION PARAMETERS
instrumentHandle = contains a session handle to the instrument. This handle is obtained by the function and
remains valid until the session is closed.
selfTestResult = pointer to an INT16. Upon return from the function, it will contain a numerical value indicating
the result of the self test.
testMessage[] = string where the driver places the textual representation of the self test result.
DATA ITEM RESET VALUE
Not applicable to this function.
DESCRIPTION
This function causes the instrument to perform a self-test. It waits for the instrument to complete the test and then
queries the instrument for the results of the self-test and returns the results to the user. If the instrument passes the
self-test, this function returns the constant VTEX1629_SELF_TEST_PASSED in the TestResult parameter and
"Self test passed" in the TestMessage parameter.
The TestMessage parameter must be able to store up to 256 characters.
The EX1629 self-test consists of a set of operations that are identical to those performed during self-calibration. No
calibration data is modified by this function. Because it modifies the system configuration, however, an instrument
synch (vtex1629_soft_synch) will be required before continuing with other operations.
There are two different interfaces to execute the self-test procedure. The vtex1629_self_test function is the simplest
– it executes the self-test and returns when the test is complete. When working with a large number of instruments,
however, running the self-test sequentially on all instruments can take quite a while. Instead of using
vtex1629_self_test, the vtex1629_self_test_init, and vtex1629_self_test_get_status functions can be used, allowing
the self-tests on all instruments to be executed in parallel.
EXAMPLE
ViStatus status;
ViSession instrumentHandle;
ViInt16 selfTestResult;
ViChar testMessage[256];
…
status = vtex1629_self_test (instrumentHandle, &selfTestResult, testMessage);
if (status < VI_SUCCESS)
{
<inform the user the API call failed>
}
if ((status >= VI_SUCCESS) && (selfTestResult != VTEX1629_SELF_TEST_PASSED))
{
<inform the user the self test failed>
}
if ((status >= VI_SUCCESS) && (selfTestResult == VTEX1629_SELF_TEST_PASSED))
{
<continue normal processing>
}