niDCPower_ConfigurePowerLineFrequency
- Updated2025-10-06
- 1 minute(s) read
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).
Syntax
ViStatus _VI_FUNC niDCPower_ConfigurePowerLineFrequency(ViSession vi, ViReal64 powerlineFrequency)
Remarks
Set powerlineFrequency to the frequency of the AC power line.
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.
Parameters
| Name | Direction | Type | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| vi | [in] | ViSession | Identifies a particular instrument session. vi is obtained from the niDCPower_InitializeWithIndependentChannels function. | |||||||||
| powerlineFrequency | [in] | 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. Defined Values:
|
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 |