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

Note

Set powerlineFrequency to the frequency of the AC power line.

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.

Parameters

NameDirectionTypeDescription
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:

Name

Value

Description

NIDCPOWER_VAL_50_HERTZ

50.0

Specifies a power line frequency of 50 Hz.

NIDCPOWER_VAL_60_HERTZ

60.0

Specifies a power line frequency of 60 Hz.

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