Measure(string)
- Updated2025-10-06
- 1 minute(s) read
Returns a DCPowerMeasureResult struct that contains arrays of measured voltage and current.
Syntax
Namespace: NationalInstruments.ModularInstruments.NIDCPower
public DCPowerMeasureResult Measure(string channelString)
Remarks
Each call to this method blocks other method calls until the measurements are returned from the device. The order of the measurements returned in the array corresponds to the order on the specified channel(s). The measurement speed of the device and the SamplesToAverage property dictates the length of time that a measurement takes.
Parameters
| Name | Type | Description |
|---|---|---|
| channelString | string | Specifies the channels to measure. 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 do not provide channel(s), all channels in the session are used. |
Returns
The measurements in the arrays are returned in the same order as the channels specified in the channel string on which the measurement is done.
Exceptions
| Type | Description |
|---|---|
| System.ObjectDisposedException | The Measure method was accessed after the associated NIDCPower object was disposed. |