VTI Instruments Corp.
228
EX1629 Command Set
vtex1629_self_test
F
UNCTION
P
ROTOTYPE
ViStatus vtex1629_self_test (ViSession
instrumentHandle
, ViPInt16
selfTestResult
, ViChar _VI_FAR
testMessage[]
);
F
UNCTION
P
ARAMETERS
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.
D
ATA
I
TEM
R
ESET
V
ALUE
Not applicable to this function.
D
ESCRIPTION
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.
E
XAMPLE
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>
}
Содержание EX1629
Страница 310: ...VTI Instruments Corp 310 EX1629 Command Set...
Страница 342: ...VTI Instruments Corp 342 EX1629 Onboard Memory...