niDCPower_FetchMultiple
- Updated2025-10-06
- 2 minute(s) read
Returns an array of voltage measurements, an array of current measurements, and an array of compliance measurements that were previously taken and are stored in the NI-DCPower buffer. This function should not be used when the NIDCPOWER_ATTR_MEASURE_WHEN attribute is set to NIDCPOWER_VAL_ON_DEMAND. You must first call niDCPower_InitiateWithChannels before calling this function.
Syntax
ViStatus _VI_FUNC niDCPower_FetchMultiple(ViSession vi, ViConstString channelName, ViReal64 timeout, ViInt32 count, ViReal64 voltageMeasurements[], ViReal64 currentMeasurements[], ViBoolean inCompliance[], ViInt32 *actualCount)
Remarks
When setting the timeout interval with timeout, ensure you take into account any triggers so that the timeout interval is long enough for your application.
This function is not supported on all devices. Refer to Supported Functions by Device for more information about supported devices.
Parameters
| Name | Direction | Type | Description |
|---|---|---|---|
| vi | [in] | ViSession | Identifies a particular instrument session. vi is obtained from the niDCPower_InitializeWithIndependentChannels function. |
| channelName | [in] | ViConstString | Specifies the channel(s) to use. Specify the channel(s) using the form PXI1Slot3/0,PXI1Slot3/2-3,PXI1Slot4/2-3 or PXI1Slot3/0,PXI1Slot3/2:3,PXI1Slot4/2:3, where PXI1Slot3 and PXI1Slot4 are instrument resource names and 0, 2, and 3 are channels. If you pass "" for this control, all channels in the session are used. |
| timeout | [in] | ViReal64 | Specifies the maximum time allowed for this function to complete, in seconds. If the function does not complete within this time interval, NI-DCPower returns an error. |
| count | [in] | ViInt32 | Specifies the number of measurements to fetch. |
| voltageMeasurements | [out] | ViReal64[] | Returns an array of voltage measurements. Ensure that sufficient space has been allocated for the returned array. |
| currentMeasurements | [out] | ViReal64[] | Returns an array of current measurements. Ensure that sufficient space has been allocated for the returned array. |
| inCompliance | [out] | ViBoolean[] | Returns an array of Boolean values indicating whether the output was in compliance at the time the measurement was taken. Ensure that sufficient space has been allocated for the returned array. |
| actualCount | [out] | ViInt32 * | Indicates the number of measured values actually retrieved from the specified channel. |
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 |