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

Syntax

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

Parameters

NameDirectionTypeDescription
vi[in]ViSession

Identifies a particular instrument session. vi is obtained from the niDCPower_InitializeWithIndependentChannels function.

channelName[in]ViConstString

Specifies the channel to query. The output state may only be queried for one channel at a time.

Specify the channel using the form PXI1Slot3/0, where is the instrument resource name and 0 is the channel.

outputState[in]ViInt32

Specifies the output state of the channel that is being queried.

Defined Values:

Name

Value

Description

NIDCPOWER_VAL_OUTPUT_CONSTANT_VOLTAGE

0 (0x0)

The device maintains a constant voltage by adjusting the current.

NIDCPOWER_VAL_OUTPUT_CONSTANT_CURRENT

1 (0x1)

The device maintains a constant current by adjusting the voltage.

NIDCPOWER_VAL_OUTPUT_OVER_VOLTAGE

2 (0x2)

Not supported.

NIDCPOWER_VAL_OUTPUT_OVER_CURRENT

3 (0x3)

Not supported.

NIDCPOWER_VAL_OUTPUT_UNREGULATED

4 (0x4)

Not supported.

NIDCPOWER_VAL_OUTPUT_INHIBITED

1163 (0x48b)

The channel is in the inhibited state.

inState[out]ViBoolean *

Returns whether the specified channel is in the specified output state.

Returns

Reports the status of this operation. To obtain a text description of the status code, call niDCPower_error_message. To obtain additional information concerning the error condition, call niDCPower_GetError. The general meaning of the status code is as follows:

Value

Meaning

0

Success

Positive Values

Warnings

Negative Values

Errors