niDCPower_QueryOutputState

NI-DCPower Function Reference

niDCPower_QueryOutputState

ViStatus niDCPower_QueryOutputState (ViSession vi, ViConstString channelName, ViInt32 outputState, ViBoolean *inState);

Purpose

Queries the specified output channel to determine if the output channel is currently in the state specified by outputState.

Parameters

Input
Name Type Description
vi ViSession Identifies a particular instrument session. vi is obtained from the niDCPower_init or niDCPower_InitWithOptions function.
channelName ViConstString Specifies the output channel to query. The output state may only be queried for one channel at a time.
outputState ViInt32 Specifies the outputState of the output channel that is being queried.

Defined Values:
NIDCPOWER_VAL_OUTPUT_CONSTANT_VOLTAGEThe device maintains a constant voltage by adjusting the current.
NIDCPOWER_VAL_OUTPUT_CONSTANT_CURRENTThe device maintains a constant current by adjusting the voltage.

Default Value: NIDCPOWER_VAL_OUTPUT_CONSTANT_VOLTAGE
Output
Name Type Description
inState ViBoolean* Returns whether the device output channel is in the specified state.

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.