Generates load compensation data for LCR measurements for the test spots you specify.

Syntax

ViStatus _VI_FUNC niDCPower_PerformLCRLoadCompensation(ViSession vi, ViConstString channelName, ViInt32 numCompensationSpots, const NILCRLoadCompensationSpot compensationSpots[])

Remarks

You must physically configure your LCR circuit with an appropriate reference load to use this function to generate valid load compensation data.

Note

When you call this function:

  • The load compensation data is written to the onboard storage of the instrument. Onboard storage can contain only the most recent set of data.

  • Most NI-DCPower attributes in the session are reset to their default values. Rewrite the values of any attributes you want to maintain.

To apply the load compensation data you generate with this function to your LCR measurements, set NIDCPOWER_ATTR_LCR_LOAD_COMPENSATION_ENABLED to VI_TRUE.

Note

Load compensation data are generated only for those specific frequencies you define with this function; load compensation is not interpolated from the specific frequencies you define and applied to other frequencies.

Note

This function is not supported on all devices. Refer to Supported Functions by Device for more information about supported devices.

referenceValueType Defined Values:

Name

Value

Description

NIDCPOWER_VAL_LCR_LOAD_COMPENSATION_SPOT_REFERENCE_VALUE_TYPE_IMPEDANCE

1076 (0x434)

The actual impedance, comprising real resistance and imaginary reactance, of your DUT. Supply resistance, in ohms, to referenceValueA; supply reactance, in ohms, to referenceValueB.

NIDCPOWER_VAL_LCR_LOAD_COMPENSATION_SPOT_REFERENCE_VALUE_TYPE_IDEAL_CAPACITANCE

1077 (0x435)

The ideal capacitance of your DUT. Supply capacitance, in farads, to referenceValueA.

NIDCPOWER_VAL_LCR_LOAD_COMPENSATION_SPOT_REFERENCE_VALUE_TYPE_IDEAL_INDUCTANCE

1078 (0x436)

The ideal inductance of your DUT. Supply inductance, in henrys, to referenceValueA.

NIDCPOWER_VAL_LCR_LOAD_COMPENSATION_SPOT_REFERENCE_VALUE_TYPE_IDEAL_RESISTANCE

1079 (0x437)

The ideal resistance of your DUT. Supply resistance, in ohms, to referenceValueA.

Parameters

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

numCompensationSpots[in]ViInt32

Specifies the number of elements in compensationSpots.

compensationSpots[in]const NILCRLoadCompensationSpot[]

Defines the frequencies and DUT specifications to use for LCR load compensation.

You can specify <=1000 spot frequencies.

NILCRLoadCompensationSpot:

Name

Type

Description

frequency

ViReal64

The spot frequency

referenceValueType

ViInt32

A known specification value of your DUT to use as the basis for load compensation.

referenceValueA

ViReal64

A value that describes the referenceValueType specification. Use as indicated by the referenceValueType option you choose.

referenceValueB

ViReal64

If applicable, a value that describes the referenceValueType specification. Use as indicated by the referenceValueType option you choose.

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