IviDCPwr_QueryOutputState

CVI/LabWindows IVI Class Driver

IviDCPwr_QueryOutputState

IviDCPwrBase Capability Group

C Function Prototype

ViStatus IviDCPwr_QueryOutputState (ViSession vi, ViConstString channelName, ViInt32 outputState, ViBoolean* instate);

Purpose

This function returns whether the power supply is in a particular output state.

A constant voltage condition occurs when the output voltage is equal to the value of the IVIDCPWR_ATTR_VOLTAGE_LEVEL attribute and the current is less than or equal to the value of the IVIDCPWR_ATTR_CURRENT_LIMIT attribute.

A constant current condition occurs when the output current is equal to the value of the IVIDCPWR_ATTR_CURRENT_LIMIT attribute and the IVIDCPWR_ATTR_CURRENT_LIMIT_BEHAVIOR attribute is set to IVIDCPWR_VAL_CURRENT_REGULATE.

An unregulated condition occurs when the output voltage is less than the value of the IVIDCPWR_ATTR_VOLTAGE_LEVEL attribute and the current is less than the value of the IVIDCPWR_ATTR_CURRENT_LIMIT attribute.

An over voltage condition occurs when the output voltage is equal to or greater than the value of the IVIDCPWR_ATTR_OVP_LIMIT attribute and the IVIDCPWR_ATTR_OVP_ENABLED attribute is set to VI_TRUE.

An over current condition occurs when the output current is equal to or greater than the value of the IVIDCPWR_ATTR_CURRENT_LIMIT attribute and the IVIDCPWR_ATTR_CURRENT_LIMIT_BEHAVIOR attribute is set to IVIDCPWR_VAL_CURRENT_TRIP.

When either an overvoltage condition or an over current condition occurs, the power supply's output protection disables the output. If the power supply is in an overvoltage or over current state, it does not produce power until the output protection is reset. The IviDCPwr_ResetOutputProtection function resets the output protection. After the output protection is reset, the power supply resumes generating a power signal.

Parameters

Inputs Type Description
vi ViSession The instrument handle that you obtain from the IviDCPwr_init or IviDCPwr_InitWithOptions functions. The handle identifies a particular IVI session.
channelName ViConstString Pass the virtual channel name that you assign to the instrument through MAX.

Virtual channel names are aliases for instrument specific channel strings. The instrument specific channel strings can differ from one instrument to another. Virtual channel names allow you to use and swap instruments without having to change the channel names in your source code. You assign a virtual channel name to an instrument specific channel through MAX. This control accepts virtual channel names you have assigned to the specific instrument you are using. It also accepts the instrument specific channel names.

Note  You can specify the channel name as a string variable or as a literal enclosed in double quotes.
outputState ViInt32 Pass the output state for which you want to query.

Defined values

     
Outputs Type Description
inState ViReal64 (passed by reference) This parameter returns VI_TRUE if the power supply is currently in the state you specify with the outputState parameter, and VI_FALSE if it is not.

Return Values