niHSDIO_InitAcquisitionSession

NI Digital Waveform Generator/Analyzer

niHSDIO_InitAcquisitionSession

Specific Function

C Function Prototype

ViStatus niHSDIO_InitAcquisitionSession (ViRsrc resourceName, ViBoolean idQuery, ViBoolean resetInstrument, 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 niHSDIO_close 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 niHSDIO_reset, and it tristates the front panel terminals and channels.

Parameters

Name Type Description
resourceName ViRsrc Specifies the device name, for example "Dev1" where "Dev1" is an device name assigned by Measurement & Automation Explorer.
idQuery 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.

Default Value: VI_FALSE
resetInstrument 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.

Default Value: VI_FALSE
Note  Resetting your device resets the entire device. Acquisition or generation operations in progress are aborted and cleared.
optionString ViConstString Currently unused. Set this string to "".
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