niDCPower_PerformLCROpenCompensation
- Updated2025-10-06
- 2 minute(s) read
Generates open compensation data for LCR measurements based on a default set of test frequencies and, optionally, additional frequencies you can specify.
Syntax
ViStatus _VI_FUNC niDCPower_PerformLCROpenCompensation(ViSession vi, ViConstString channelName, ViInt32 numFrequencies, const ViReal64 additionalFrequencies[])
Remarks
You must physically configure an open LCR circuit to use this function to generate valid open compensation data.
When you call this function:
The open 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 open compensation data you generate with this function to your LCR measurements, set NIDCPOWER_ATTR_LCR_OPEN_COMPENSATION_ENABLED to VI_TRUE.
Corrections for frequencies other than the default frequencies or any additional frequencies you specify are interpolated.
This function is not supported on all devices. Refer to Supported Functions by Device for more information about supported devices.
Default Open Compensation Frequencies
By default, NI-DCPower uses the following frequencies for LCR open compensation:
10 logarithmic steps at 1 kHz frequency decade
10 logarithmic steps at 10 kHz frequency decade
100 logarithmic steps at 100 kHz frequency decade
100 logarithmic steps at 1 MHz frequency decade
The actual frequencies used depend on the bandwidth of your instrument.
Parameters
| Name | Direction | Type | Description |
|---|---|---|---|
| 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. |
| numFrequencies | [in] | ViInt32 | Specifies the number of elements in additionalFrequencies. |
| additionalFrequencies | [in] | const ViReal64[] | Defines a further set of frequencies, in addition to the default frequencies, to perform the compensation for. You can specify <=200 additional frequencies. |
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 |