niDCPower_init

NI-DCPower Function Reference

niDCPower_init

ViStatus niDCPower_init (ViRsrc resourceName, ViBoolean IDQuery, ViBoolean resetDevice, ViSession vi);

Purpose

Creates a new IVI instrument driver session to the device specified in resourceName and returns a session handle you use to identify the device in all subsequent NI-DCPower function calls. This function also sends initialization commands to set the device to the state necessary for the operation of NI-DCPower.

To place the device in a known start-up state when creating a new session, set resetDevice to VI_TRUE. This action is equivalent to using the niDCPower_reset function.

To open a session and leave the device in its existing configuration without passing through a transitional output state, set resetDevice to VI_FALSE, and immediately call the niDCPower_Abort function. To apply a new configuration without disrupting the output channels of the device, configure the device in Delayed Configuration mode as in the previous session changing only the desired settings, and then call niDCPower_Initiate function.

Parameters

Input
Name Type Description
resourceName ViRsrc Specifies the resourceName assigned by Measurement & Automation Explorer (MAX), for example "PXI1Slot3" where "PXI1Slot3" is an instrument's resourceName. resourceName can also be a logical IVI name.
IDQuery ViBoolean Specifies whether the device is queried to determine if the device is a valid instrument for NI-DCPower.

Defined Values:
VI_TRUE (1) Perform ID query.
VI_FALSE (0)Do not perform ID query.

Default Value: VI_TRUE
resetDevice ViBoolean Specifies whether to reset the device during the initialization procedure.

Defined Values:
VI_TRUE (1) Reset the device.
VI_FALSE (0)Do not reset the device.

Default Value: VI_TRUE
Output
Name Type Description
vi ViSession Returns a session handle that you use to identify the session in all subsequent NI-DCPower function calls.

Return Value

Name Type Description
StatusViStatusReports the status of this operation. To obtain a text description of the status code, call the niDCPower_error_message function. To obtain additional information concerning the error condition, call the niDCPower_GetError function.