niHSDIO_InitGenerationSession

NI Digital Waveform Generator/Analyzer

niHSDIO_InitGenerationSession

Specific Function

C Function Prototype

ViStatus niHSDIO_InitGenerationSession (ViRsrc resourceName, ViBoolean idQuery, ViBoolean resetInstrument, ViConstString optionString, ViSession* vi);

Purpose

Call this function to create a new generation session. You can perform static and dynamic generation 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 a device name assigned by Measurement & Automation Explorer.
idQuery ViBoolean Specifies whether the driver performs an ID query upon the device. When this parameter is set to VI_TRUE, NI-HSDIO ensures compatibility between the device and 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 generation operation.

Return Value