IviDCPwr_ConfigureOutputRange

CVI/LabWindows IVI Class Driver

IviDCPwr_ConfigureOutputRange

IviDCPwrBase Capability Group

C Function Prototype

ViStatus IviDCPwr_ConfigureOutputRange (ViSession vi, ViConstString channelName, ViInt32 rangeType, ViReal64 range);

Purpose

This function configures the output range of a power supply on a channel. You specify whether you want to configure the voltage or current range, and the value to which to set the range.

Setting a voltage range can invalidate a previously configured current range. Setting a current range can invalidate a previously configured voltage range.

Parameters

Name 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 in 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.
rangeType ViInt32 Pass the type of range you want to configure.

Defined Values:

IVIDCPWR_VAL_RANGE_VOLTAGE—The range parameter specifies a voltage range.

IVIDCPWR_VAL_RANGE_CURRENT—The range parameter specifies a current range.

range ViReal64 Pass the range in which you want the power supply to operate. The instrument driver coerces this value to the closest value the instrument supports that is greater than or equal to the value you specify.

Return Values