NI DCPOWER Measurement Functions - ni/grpc-device GitHub Wiki
- niDCPower_ConfigureApertureTime
- niDCPower_ConfigureAutoZero
- niDCPower_ConfigurePowerLineFrequency
- niDCPower_ConfigureSense
- niDCPower_Measure
- niDCPower_MeasureMultiple
- niDCPower_FetchMultiple
- niDCPower_QueryInCompliance
- niDCPower_QueryOutputState
ViStatus niDCPower_ConfigureApertureTime(ViSession vi, ViConstString channelName, ViReal64 apertureTime, ViInt32 units);
Configures the aperture time on the specified channel(s).
Note This function is not supported on all devices. Refer to Supported Functions by Device for more information about supported devices The supported values depend on the units. Refer to the Aperture Time topic for your device in the NI DC Power Supplies and SMUs Help for more information. In general, devices support discrete apertureTime values, and if you configure apertureTime to some unsupported value, NI-DCPower coerces it up to the next supported value.
Refer to the Measurement Configuration and Timing or DC Noise Rejection topic for your device in the NI DC Power Supplies and SMUs Help for more information about how to configure your measurements.
Related Topics:
Aperture Time
Input | ||
---|---|---|
Name | Type | Description |
vi | ViSession | Identifies a particular instrument session. vi is obtained from the niDCPower_InitializeWithIndependentChannels function. |
channelName | 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. |
apertureTime | ViReal64 | Specifies the aperture time. Refer to the Aperture Time topic for your device in the NI DC Power Supplies and SMUs Help for more information. |
units | ViInt32 | Specifies the units for apertureTime. Defined Values: |
NIDCPOWER_VAL_SECONDS (1028) | Specifies seconds. |
---|---|
NIDCPOWER_VAL_POWER_LINE_CYCLES (1029) | Specifies Power Line Cycles. |
Name | Type | Description |
---|---|---|
Status | ViStatus | Reports 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. |
ViStatus niDCPower_ConfigureAutoZero(ViSession vi, ViConstString channelName, ViInt32 autoZero);
Configures auto zero for the device.
Note This function is not supported on all devices. Refer to Supported Functions by Device for more information about supported devices Refer to the NI PXI-4132 Auto Zero and NI PXI-4132 Measurement Configuration and Timing topics in the NI DC Power Supplies and SMUs Help for more information about how to configure your measurements.
Related Topics:
Auto Zero
Input | ||
---|---|---|
Name | Type | Description |
vi | ViSession | Identifies a particular instrument session. vi is obtained from the niDCPower_InitializeWithIndependentChannels function. |
channelName | 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. |
autoZero | ViInt32 | Specifies the auto-zero setting. Refer to the Measurement Configuration and Timing topic and the Auto Zero topic for your device for more information about how to configure your measurements. Defined Values: |
NIDCPOWER_VAL_OFF (0) | Disables auto-zero. |
---|---|
NIDCPOWER_VAL_ONCE (1024) | Makes zero conversions following the first measurement after initiating the channel(s). Channels use these zero conversions for the preceding measurement and future measurements until they are reinitiated. |
NIDCPOWER_VAL_ON (1) | Makes zero conversions for every measurement. |
Name | Type | Description |
---|---|---|
Status | ViStatus | Reports 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. |
ViStatus niDCPower_ConfigurePowerLineFrequency(ViSession vi, ViReal64 powerLineFrequency);
Specifies the power line frequency for all channels in the session. NI-DCPower uses this value to select a timebase for setting the niDCPower_ConfigureApertureTime function in power line cycles (PLCs).
Note This function is not supported on all devices. Refer to Supported Functions by Device for more information about supported devices Refer to the Measurement Configuration and Timing topic for your device in the NI DC Power Supplies and SMUs Help for more information about how to configure your measurements.
Related Topics:
Measurement Noise Rejection
Input | ||
---|---|---|
Name | Type | Description |
vi | ViSession | Identifies a particular instrument session. vi is obtained from the niDCPower_InitializeWithIndependentChannels function. |
powerLineFrequency | ViReal64 | Specifies the power line frequency in hertz for specified channel(s). NI-DCPower uses this value to select a timebase for the NIDCPOWER_ATTR_APERTURE_TIME attribute. Refer to the Measurement Configuration and Timing topic for your device for more information about how to configure your measurements. |
Note Set this parameter to the frequency of the AC power line
Defined Values:
NIDCPOWER_VAL_50_HERTZ (50.0) | Specifies 50 Hz. |
---|---|
NIDCPOWER_VAL_60_HERTZ (60.0) | Specifies 60 Hz. |
Name | Type | Description |
---|---|---|
Status | ViStatus | Reports 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. |
ViStatus niDCPower_ConfigureSense(ViSession vi, ViConstString channelName, ViInt32 sense);
Specifies whether to use local or remote sensing of the output voltage on the specified channel(s). Refer to the Devices topic specific to your device in the NI DC Power Supplies and SMUs Help for more information about sensing voltage on supported channels.
Related Topics:
Local and Remote Sense
Input | ||
---|---|---|
Name | Type | Description |
vi | ViSession | Identifies a particular instrument session. vi is obtained from the niDCPower_InitializeWithIndependentChannels function. |
channelName | 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. |
sense | ViInt32 | Specifies local or remote sensing on the specified channel(s). Defined Values: |
NIDCPOWER_VAL_LOCAL (1008) | Local sensing |
---|---|
NIDCPOWER_VAL_REMOTE (1009) | Remote sensing |
Name | Type | Description |
---|---|---|
Status | ViStatus | Reports 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. |
ViStatus niDCPower_Measure(ViSession vi, ViConstString channelName, ViInt32 measurementType, ViReal64 *measurement)
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. To measure multiple output channels, use the niDCPower_MeasureMultiple function.
Input | ||
---|---|---|
Name | Type | Description |
vi | ViSession | Identifies a particular instrument session. vi is obtained from the niDCPower_InitializeWithIndependentChannels function. |
channelName | ViConstString |
Specifies the output channel to measure. Only one measurement at a time may be made with the niDCPower_Measure function. Use the niDCPower_MeasureMultiple function to measure multiple channels or measurement types. Specify the channel using the form PXI1Slot3/0, where PXI1Slot3 is the instrument resource name and 0 is the channel. |
measurementType | ViInt32 | Specifies whether a voltage or current value is measured. Defined Values: |
NIDCPOWER_VAL_MEASURE_VOLTAGE (1) | The instrument measures voltage. |
---|---|
NIDCPOWER_VAL_MEASURE_CURRENT (0) | The instrument measures current. |
Output | ||
---|---|---|
Name | Type | Description |
measurement | ViReal64* | Returns the value of the measurement, either in volts for voltage or amps for current. |
Name | Type | Description |
---|---|---|
Status | ViStatus | Reports 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. |
ViStatus niDCPower_MeasureMultiple(ViSession vi, ViConstString channelName, ViReal64 voltageMeasurements, ViReal64 currentMeasurements);
Returns arrays of the measured voltage and current values on the specified output channel(s). Each call to this function blocks other function 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 output channel(s).
Input | ||
---|---|---|
Name | Type | Description |
vi | ViSession | Identifies a particular instrument session. vi is obtained from the niDCPower_InitializeWithIndependentChannels function. |
channelName | 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. |
Output | ||
Name | Type | Description |
voltageMeasurements | ViReal64 | Returns an array of voltage measurements. The measurements in the array are returned in the same order as the channels specified in channelName. Ensure that sufficient space has been allocated for the returned array. |
currentMeasurements | ViReal64 | Returns an array of current measurements. The measurements in the array are returned in the same order as the channels specified in channelName. Ensure that sufficient space has been allocated for the returned array. |
Name | Type | Description |
---|---|---|
Status | ViStatus | Reports 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. |
ViStatus niDCPower_FetchMultiple(ViSession vi, ViConstString channelName, ViReal64 timeout, ViInt32 count, ViReal64 voltageMeasurements, ViReal64 currentMeasurements, ViBoolean inCompliance, ViInt32* actualCount);
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_WHENattribute is set to NIDCPOWER_VAL_ON_DEMAND. You must first call niDCPower_InitiateWithChannels before calling this function.
Note This function is not supported on all devices. Refer to Supported Functions by Device for more information about supported devices Refer to the Acquiring Measurements topics in the NI DC Power Supplies and SMUs Help for more information about configuring this function.
Input | ||
---|---|---|
Name | Type | Description |
vi | ViSession | Identifies a particular instrument session. vi is obtained from the niDCPower_InitializeWithIndependentChannels function. |
channelName | 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 | 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. Note When setting the timeout interval, ensure you take into account any triggers so that the timeout interval is long enough for your application |
count | ViInt32 | Specifies the number of measurements to fetch. |
Output | ||
Name | Type | Description |
voltageMeasurements | ViReal64 | Returns an array of voltage measurements. Ensure that sufficient space has been allocated for the returned array. |
currentMeasurements | ViReal64 | Returns an array of current measurements. Ensure that sufficient space has been allocated for the returned array. |
inCompliance | 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 | ViInt32* | Indicates the number of measured values actually retrieved from the specified channel. |
Name | Type | Description |
---|---|---|
Status | ViStatus | Reports 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. |
ViStatus niDCPower_QueryInCompliance(ViSession vi, ViConstString channelName, ViBoolean *inCompliance);
Queries the specified output channel to determine if it is operating at the compliance limit.
The compliance limit is the current limit when the output function is set to NIDCPOWER_VAL_DC_VOLTAGE. If the output is operating at the compliance limit, the output reaches the current limit before the desired voltage level. Refer to the niDCPower_ConfigureOutputFunction function and the niDCPower_ConfigureCurrentLimit function for more information about output function and current limit, respectively.
The compliance limit is the voltage limit when the output function is set to NIDCPOWER_VAL_DC_CURRENT. If the output is operating at the compliance limit, the output reaches the voltage limit before the desired current level. Refer to the niDCPower_ConfigureOutputFunction function and the niDCPower_ConfigureVoltageLimit function for more information about output function and voltage limit, respectively.
Related Topics:
Compliance
Input | ||
---|---|---|
Name | Type | Description |
vi | ViSession | Identifies a particular instrument session. vi is obtained from the niDCPower_InitializeWithIndependentChannels function. |
channelName | ViConstString |
Specifies the output channel to query. Compliance status can only be queried for one channel at a time. Specify the channel using the form PXI1Slot3/0, where PXI1Slot3 is the instrument resource name and 0 is the channel. |
Output | ||
Name | Type | Description |
inCompliance | ViBoolean* | Returns whether the specified output channel is in compliance. |
Name | Type | Description |
---|---|---|
Status | ViStatus | Reports 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. |
ViStatus niDCPower_QueryOutputState(ViSession vi, ViConstString channelName, ViInt32 outputState, ViBoolean *inState);
Queries the specified output channel to determine if the output channel is currently in the state specified by outputState.
Related Topics:
Compliance
Input | ||
---|---|---|
Name | Type | Description |
vi | ViSession | Identifies a particular instrument session. vi is obtained from the niDCPower_InitializeWithIndependentChannels function. |
channelName | ViConstString |
Specifies the output channel to query. The output state may only be queried for one channel at a time. Specify the channel using the form PXI1Slot3/0, where is the instrument resource name and 0 is the channel. |
outputState | ViInt32 | Specifies the output state of the output channel that is being queried. Defined Values: |
NIDCPOWER_VAL_OUTPUT_CONSTANT_VOLTAGE (0) | The device maintains a constant voltage by adjusting the current. |
---|---|
NIDCPOWER_VAL_OUTPUT_CONSTANT_CURRENT (1) | The device maintains a constant current by adjusting the voltage. |
|Output||| |Name|Type|Description| |inState|ViBoolean*|Returns whether the specified output channel is in the specified output state.|
Name | Type | Description |
---|---|---|
Status | ViStatus | Reports 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. |