NI DIGITAL PATTERN DRIVER Init And Close Functions - ni/grpc-device GitHub Wiki

Init And Close Functions

niDigital_init

Creates and returns a new session to the specified digital pattern instrument to use in all subsequent function calls. To place the instrument in a known startup state when creating a new session, set the reset parameter to VI_TRUE, which is equivalent to calling the niDigital_reset function immediately after initializing the session.

C Function Prototype: ViStatus niDigital_init (ViRsrc resourceName, ViBoolean IDQuery, ViBoolean resetDevice, ViSession* newVi)

Parameter Description
resourceName The specified resource name shown in Measurement & Automation Explorer (MAX) for a digital pattern instrument, for example, PXI1Slot3, where PXI1Slot3 is an instrument resource name. resourceName can also be a logical IVI name. This parameter accepts a comma-delimited list of strings in the form PXI1Slot2,PXI1Slot3, where PXI1Slot2 is one instrument resource name and PXI1Slot3 is another. When including more than one digital pattern instrument in the comma-delimited list of strings, list the instruments in the same order they appear in the pin map.
IDQuery A Boolean that verifies that the digital pattern instrument you initialize is supported by NI-Digital. NI-Digital automatically performs this query, so setting this parameter is not necessary.
resetDevice A Boolean that specifies whether to reset a digital pattern instrument to a known state when the session is initialized. Setting the resetDevice value to VI_TRUE is equivalent to calling the niDigital_reset function immediately after initializing the session.
Output
newVi The returned instrument session.

Note   You only can specify multiple instruments of the same model. For example, you can list two PXIe-6570s but not a PXIe-6570 and PXIe-6571. The instruments must be in the same chassis.

Return value: Reports the status of the operation.

niDigital_InitWithOptions

Creates and returns a new session to the specified digital pattern instrument to use in all subsequent function calls. To place the instrument in a known startup state when creating a new session, set the reset parameter to VI_TRUE, which is equivalent to calling the niDigital_reset function immediately after initializing the session.

C Function Prototype: ViStatus niDigital_InitWithOptions (ViRsrc resourceName, ViBoolean IDQuery, ViBoolean resetDevice, ViConstString optionString, ViSession* newVi)

Parameter Description
resourceName The specified resource name shown in Measurement & Automation Explorer (MAX) for a digital pattern instrument, for example, PXI1Slot3, where PXI1Slot3 is an instrument resource name. resourceName can also be a logical IVI name. This parameter accepts a comma-delimited list of strings in the form PXI1Slot2,PXI1Slot3, where PXI1Slot2 is one instrument resource name and PXI1Slot3 is another. When including more than one digital pattern instrument in the comma-delimited list of strings, list the instruments in the same order they appear in the pin map.
IDQuery A Boolean that verifies that the digital pattern instrument you initialize is supported by NI-Digital. NI-Digital automatically performs this query, so setting this parameter is not necessary.
resetDevice A Boolean that specifies whether to reset a digital pattern instrument to a known state when the session is initialized. Setting the resetDevice value to VI_TRUE is equivalent to calling the niDigital_reset function immediately after initializing the session.
optionString The initial values of certain properties for the NI-Digital Pattern Driver session. The string can be empty. You can use the DriverSetup flag to simulate a digital pattern instrument. When simulating a digital pattern instrument, you must specify the model you want to simulate. For example, Simulate = 1, DriverSetup = Model:6570.
Output
newVi The returned instrument session.

Note   You only can specify multiple instruments of the same model. For example, you can list two PXIe-6570s but not a PXIe-6570 and PXIe-6571. The instruments must be in the same chassis.

Return value: Reports the status of the operation.

niDigital_close

Closes the specified instrument session to a digital pattern instrument, aborts pattern execution, and unloads pattern memory. The channels on a digital pattern instrument remain in their current state.

C Function Prototype: ViStatus niDigital_close (ViSession vi)

Parameter Description
vi The specified instrument session the niDigital_init or niDigital_InitWithOptions function returns.

Return value: Reports the status of the operation.

⚠️ **GitHub.com Fallback** ⚠️