Download VM6068 - VTI Instruments

Transcript
VXI Technology, Inc.
VXIPLUG&PLAY DRIVER EXAMPLE
/*
*
APPLICATION FUNCTION
*
-------------------*/
/****************************************************************************/
/****************************************************************************
Function:
vtvm6068_diagnostic
Formal Parameters
ViSession instrHndl
- A unique handle to the instrument.
ViPInt16
result
- Returns the result of diagnostic. The value of one
means diagnostic passed.
A value of zero means the diagnostic failed.
Return Values:
Returns VI_SUCCESS if successful.
else returns error value of the error encountered.
Description
For this diagnostic to be successful, the loop-back
connector must connect transmit channel 1 to receive
channel 3. This application function shows how to
group individual driver functions to transmit data on
one channel and receive the same data on another
channel using loop-back connector.
Please have a look at the source code of this function
to help you use the driver functions in your
application. If data transmitted on channel 1 is
received via the loop-back connector on channel 3 then
it means the diagnostic passed, otherwise the
diagnostic failed.
*****************************************************************************/
ViStatus _VI_FUNC vtvm6068_diagnostic(ViSession instrHndl, ViPInt16 result)
{
/*
* Variable used to store the return status of the function
*/
ViStatus status = VI_NULL;
ViInt16 txData[100], rxData[200],
ViInt32
64
rxError[200];
numBytesRxed = 0,
index = 0;
VM6068 Programming