Cilxs_initwithoptions – AMETEK Ls Series Driver Manual User Manual
Page 192

IVI Driver Manual
Lx / Ls Series
188
ciLxs_InitWithOptions
ViStatus ciLxs_InitWithOptions (ViRsrc resourceName, ViBoolean IDQuery,
ViBoolean resetDevice,
ViConstString optionString,
ViPSession instrumentHandle,
ViInt32 baudRate);
Purpose
This function performs the following initialization actions:
- Creates a new IVI instrument driver and optionally sets the initial
state of the following session attributes:
CILXS_ATTR_RANGE_CHECK
CILXS_ATTR_QUERY_INSTR_STATUS
CILXS_ATTR_CACHE
CILXS_ATTR_SIMULATE
CILXS_ATTR_RECORD_COERCIONS
- Opens a session to the specified device using the interface and address
you specify for the Resource Name parameter.
- If the ID Query parameter is set to VI_TRUE, this function queries the
instrument ID and checks that it is valid for this instrument driver.
- If the Reset parameter is set to VI_TRUE, this function resets the
instrument to a known state.
- Sends initialization commands to set the instrument to the state
necessary for the operation of the instrument driver.
- Returns a ViSession handle that you use to identify the instrument in
all subsequent instrument driver function calls.
Note: This function creates a new session each time you invoke it.
Although you can open more than one IVI session for the same resource, it
is best not to do so. You can use the same session in multiple program
threads. You can use the ciLxs_LockSession and ciLxs_UnlockSession
functions to protect sections of code that require exclusive access to
the resource.
Parameter List
resourceName
Variable Type ViRsrc
Pass the resource name of the device to initialize.
Refer to the following table below for the exact grammar to use for
this parameter. Optional fields are shown in square brackets ([]).
Interface Syntax