niHSDIO_InitAcquisitionSession
- Updated2023-02-21
- 2 minute(s) read
ViStatus = niHSDIO_InitAcquisitionSession ( ViRsrc resourceName, ViBoolean IDQuery, ViBoolean resetDevice, ViConstString optionString, ViSession *vi);
Purpose
Call this function to create a new acquisition session. You can perform static and dynamic acquisition operations with this session.
Creating a new session does not automatically tristate your front panel terminals or channels that might have been left driving voltages from previous sessions (refer to the niHSDIO_close function for more information about leaving lines driving after closing a session).
Pass VI_TRUE into the resetInstrument parameter to place your device in a known start-up state when creating a new session. This action is equivalent to calling the niHSDIO_reset function, and it tristates the front panel terminals and channels.
Related topics:
Parameters
| Input | ||||
| Name | Type | Description | ||
| Resource Name | ViRsrc | Specifies the device name, for example, "Dev1" where "Dev1" is a device name assigned by Measurement & Automation Explorer. | ||
| ID Query | ViBoolean | Specifies whether the driver performs an ID query on the device. When this
parameter is set to VI_TRUE, NI-HSDIO ensures compatibility
between the device and the driver. Defined Values VI_TRUE (1)—Perform ID query. VI_FALSE (0)—Skip ID query. |
||
| Reset Instrument | ViBoolean | Specifies whether the driver resets the device during initialization of the session. Refer
to niHSDIO_reset for more
information about what happens during a device reset. Defined Values VI_FALSE (0)—Do not reset device. VI_TRUE (1)—Reset device.
|
||
| Option String | ViConstString | Currently unused. Set this string to "". | ||
| Output | ||||
| Name | Type | Description | ||
| vi | ViSession | Returns a ViSession handle. Use this handle to identify the device in all subsequent instrument driver function calls related to your acquisition operation. | ||
Return Value
| Name | Type | Description | ||||||||
| Status | ViStatus | Reports the status of this operation. To obtain a text description of the status code, call the niHSDIO_error_message function. To obtain additional information concerning the error condition, use the niHSDIO_GetError and niHSDIO_ClearError functions. The general meaning of the status code is as follows:
|
