Opening an Instrument Session The Agilent 816x VXIplug&play Instrument Driver
Agilent 8163A/B, 8164A/B & 8166A/B Mainframes, Fifth Edition 227
Opening an Instrument Session
To control an instrument from a program, you must open a communication 
path between the computer/controller and the instrument. This path is 
known as an instrument session, and is opened with the function
ViStatus hp816x_init( ViRsrc InstrDesc, ViBoolean id_query, ViBoolean reset, 
ViPSession instrumentHandle );
Instruments are assigned a handle when the instrument session is 
opened. The handle, which is a pointer to the instrument, is the first 
parameter passed in all subsequent calls to driver functions.
The parameters of the function hp816x
_init include: 
•
ViRsrc InstrDesc: the address of the instrument
•
ViBoolean id_query: a Boolean flag which indicates if in-system verifica-
tion should be performed.
Passing 
VI_TRUE (1) will perform an in-system verification; passing 
VI_FALSE (0) will not.
If you set 
id_query to false, you can use the generic functions of the in-
strument driver with other instruments.
•
ViBoolean reset: a Boolean flag which indicates if the instrument should 
be reset when it is opened.
Passing 
VI_TRUE (1) will perform a reset when the session is opened; 
passing 
VI_FALSE (0) will not perform a reset,
•
ViPSession instrumentHandle: a pointer to an instrument session.
InstrumentHandle is the handle which addresses the instrument, and is 
the first parameter passed in all driver functions.
Successful completion of this function returns 
VI_SUCCESS