niDCPower_Measure

NI-DCPower Function Reference

niDCPower_Measure

ViStatus niDCPower_Measure (ViSession vi, ViConstString channelName, ViInt32 measurementType, ViReal64 *measurement)

Purpose

Returns the measured value of either the voltage or current on the specified output channel. Each call to this function blocks other function calls until the hardware returns the measurement. The measurement speed of the device and the NIDCPOWER_ATTR_SAMPLES_TO_AVERAGE attribute dictate the length of time that a measurement takes. To measure multiple output channels, use the niDCPower_MeasureMultiple function.

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 measure. Only one channel can be measured at a time with this function. Use the niDCPower_MeasureMultiple function to measure multiple channels.
measurementType ViInt32 Specifies whether a voltage or current value should be measured.

Defined Values:
NIDCPOWER_VAL_MEASURE_VOLTAGEThe device measures voltage.
NIDCPOWER_VAL_MEASURE_CURRENTThe device measures current.

Default Value: NIDCPOWER_VAL_MEASURE_VOLTAGE
Output
Name Type Description
measurement ViReal64* Returns the value of the measurement, either in volts for voltage or amps for current.

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.