Skip to content

NI DMM Calibration Functions

ni-siray edited this page Apr 27, 2021 · 10 revisions

Calibration Functions

niDMM_SelfCal

ViStatus = niDMM_SelfCal(ViSession Instrument_Handle)

Purpose

For the NI 4080/4081/4082 and the NI 4070/4071/4072, executes the self-calibration routine to maintain measurement accuracy.

Note This function calls niDMM_reset, and any configurations previous to the call will be lost. All attributes will be set to their default values after the call returns.

Parameters

Input
Name Type Description
Instrument_Handle ViSession Identifies a particular instrument session. You obtain the Instrument_Handle parameter from niDMM_init or niDMM_InitWithOptions. The default is None.

Return Value

Name Type Description
Status ViStatus Reports the Status of this operation. To obtain a text description of the status code, call niDMM_GetErrorMessage. To obtain additional information concerning the error condition, use niDMM_GetError.

niDMM_InitExtCal

ViStatus = niDMM_InitExtCal(ViString Resource_Name, ViChar Calibration_Password[], ViSession *Instrument_Handle)

Purpose

The following operations are performed if the Calibration_Password is valid:

  • Creates a new session for external calibration to the device you specify for the Resource_Name parameter.
  • Resets the device and prepares the EEPROM for new calibration coefficients.
  • Returns a ViSession handle that you use to identify the instrument in all calibration adjustments and post-adjustment verification steps.

Notes The NI 4050 and NI 4060 are not supported.

Refer to the NI 4065 6½ Digit DMM Calibration Procedure, the NI 4070/4072 6½ Digit FlexDMM Calibration Procedure, or the NI 4071 7½–Digit FlexDMM Calibration Procedure before using this function.

This function creates a new session the first time you invoke it for a device. If you call this function on the same resource, an error is returned. You should use niDMM_CloseExtCal to close a session obtained using this function.

After opening a calibration session, the device cannot take valid measurements using this session until the device has been properly adjusted. Once the adjustment phase is complete, you can use this session to verify the new calibration constants. After verification, you have the option of saving the new calibration constants or reverting to the previous calibration constants by specifying the Action parameter in niDMM_CloseExtCal.

If you encounter a fatal error such as a power failure or system crash while performing an external calibration, you can call niDMM_RestoreLastExtCalConstants to return the device to a usable state.

Parameters

Input
Name Type Description
Resource_Name ViString

Contains the Resource_Name of the device to initialize. The Resource_Name is assigned in Measurement & Automation Explorer (MAX). Refer to Related Documentation for the NI Digital Multimeters Getting Started Guide for more information about configuring and testing the DMM in MAX.

Valid Syntax:

- NI-DAQmx name

- DAQ::NI-DAQmx name[::INSTR]

- DAQ::Traditional NI-DAQ device number[::INSTR]

- IVI logical name

Caution All IVI names for the Resource_Name, such as logical names or virtual names, are case-sensitive. If you use logical names, driver session names, or virtual names in your program, you must make sure that the name you use matches the name in the IVI Configuration Store file exactly, without any variations in the case of the characters in the name.

Input
Name Type Description
Calibration_Password ViChar[]

Specifies the password required to enable external calibration functionality.

The maximum password string length is eight characters, excluding the termination character. "NI" is the factory-default password.

Output
Name Type Description
Instrument_Handle ViSession The session handle that you obtain from niDMM_InitExtCal. The handle identifies a particular instrument calibration session.

Return Value

Name Type Description
Status ViStatus Reports the Status of this operation. To obtain a text description of the status code, call niDMM_GetErrorMessage. To obtain additional information concerning the error condition, use niDMM_GetError.

niDMM_CalAdjustLinearization

ViStatus = niDMM_CalAdjustLinearization(ViSession Instrument_Handle, ViInt32 Mode, ViReal64 Range, ViReal64 Input_Resistance, ViReal64 Expected_Value)

Purpose

For the NI 4065 only, compensates for any non-linearities.

Parameters

Input
Name Type Description
Instrument_Handle ViSession The session handle that you obtain from niDMM_InitExtCal. The handle identifies a particular instrument calibration session.
Function ViInt32

Specifies the calibration Function used to acquire the measurement.

For valid modes, refer to the NI 4065 6½ Digit DMM Calibration Procedure.

Range ViReal64

Specifies the Range to calibrate. Range values are coerced up to the closest Range.

For valid ranges, refer to the NI 4065 6½ Digit DMM Calibration Procedure. Auto-ranging is not supported for calibration operations.

Input_Resistance ViReal64 Specifies the Input_Resistance that the device should use. Input_Resistance values are coerced up to the closest Input_Resistance.
Expected_Value ViReal64 Specifies the Expected_Value of the measurement.

Return Value

Name Type Description
Status ViStatus Reports the Status of this operation. To obtain a text description of the status code, call niDMM_GetErrorMessage. To obtain additional information concerning the error condition, use niDMM_GetError.

niDMM_CalAdjustGain

ViStatus = niDMM_CalAdjustGain(ViSession Instrument_Handle, ViInt32 Mode, ViReal64 Range, ViReal64 Input_Resistance, ViReal64 Expected_Value)

Purpose

Calibrates the gain coefficient for the supplied Mode, Range, and Input_Resistance.

Notes The NI 4050 and NI 4060 are not supported.

Refer to the calibration procedure for your device before using this function

Parameters

Input
Name Type Description
Instrument_Handle ViSession The session handle that you obtain from niDMM_InitExtCal. The handle identifies a particular instrument calibration session.
Mode ViInt32

Specifies the calibration Mode used to acquire the measurement.

For valid modes, refer to the calibration procedure for your device.

Range ViReal64

Specifies the Range to calibrate.

For valid ranges, refer to the calibration procedure for your device. Auto-ranging is not supported for calibration operations.

Input_Resistance ViReal64 Specifies the Input_Resistance that the device should use. Input_Resistance values are coerced up to the closest Input_Resistance.
Expected_Value ViReal64 Specifies the Expected_Value of the measurement.

Return Value

Name Type Description
Status ViStatus Reports the Status of this operation. To obtain a text description of the status code, call niDMM_GetErrorMessage. To obtain additional information concerning the error condition, use niDMM_GetError.

niDMM_CalAdjustOffset

ViStatus = niDMM_CalAdjustOffset(ViSession Instrument_Handle, ViInt32 Mode, ViReal64 Range, ViReal64 Input_Resistance)

Purpose

Calibrates the offset and Auto Zero offset for the supplied Mode, Range, and Input_Resistance.

Note The NI 4050 and NI 4060 are not supported.

Refer to the calibration procedure for your device before using this function

Parameters

Input
Name Type Description
Instrument_Handle ViSession The session handle that you obtain from niDMM_InitExtCal. The handle identifies a particular instrument calibration session.
Mode ViInt32

Specifies the calibration Mode used to acquire the measurement.

For valid modes, refer to the calibration procedure for your device.

Range ViReal64

Specifies the Range to calibrate.

For valid ranges, refer to the calibration procedure for your device. Auto-ranging is not supported for calibration operations.

Input_Resistance ViReal64 Specifies the Input_Resistance that the device should use. Input_Resistance values are coerced up to the closest Input_Resistance.

Return Value

Name Type Description
Status ViStatus Reports the Status of this operation. To obtain a text description of the status code, call niDMM_GetErrorMessage. To obtain additional information concerning the error condition, use niDMM_GetError.

niDMM_CalAdjustMisc

ViStatus = niDMM_CalAdjustMisc(ViSession Instrument_Handle, ViInt32 Type)

Purpose

Performs a specialized calibration step depending on the specified Type.

Note The NI 4050 and NI 4060 are not supported.

Refer to the calibration procedure for your device before using this function

Parameters

Input
Name Type Description
Instrument_Handle ViSession The session handle that you obtain from niDMM_InitExtCal. The handle identifies a particular instrument calibration session.
Type ViInt32 Specifies which of the miscellaneous calibration steps to perform.
NIDMM_EXTCAL_MISCCAL_VREF (default) Calibrate the Voltage Reference.
NIDMM_EXTCAL_MISCCAL_RREF Calibrate the Resistance Reference.
NIDMM_EXTCAL_MISCCAL_ZINT Calibrate the Internal Impedance.
NIDMM_EXTCAL_MISCCAL_2WIRELEAKAGE Calibrate the 2-wire Leakage resistance.
NIDMM_EXTCAL_MISCCAL_4WIRELEAKAGE Calibrate the 4-wire Leakage resistance.
NIDMM_EXTCAL_MISCCAL_SECTION Update calibration information and verify calibration completeness.

Return Value

Name Type Description
Status ViStatus Reports the Status of this operation. To obtain a text description of the status code, call niDMM_GetErrorMessage. To obtain additional information concerning the error condition, use niDMM_GetError.

niDMM_CalAdjustLC

ViStatus = niDMM_CalAdjustLC(ViSession Instrument_Handle, ViInt32 Type)

Purpose

For the NI 4082 and NI 4072 only, performs a specialized LC calibration step depending on the specified Type.

Note Refer to the calibration procedure for your device before using this function

Parameters

Input
Name Type Description
Instrument_Handle ViSession The session handle that you obtain from niDMM_InitExtCal. The handle identifies a particular instrument calibration session.
Type ViInt32 Specifies which of the LC calibration steps to perform.
L & C Open (default) Calibrates the open compensation.
L & C Short Calibrates the short compensation.
L & C 25 Ω Calibrates the 25 Ω resistance.
L & C 1 kΩ Calibrates the 1 kΩ resistance.
L & C 5 kΩ Calibrates the 5 kΩ resistance.
L & C 100 kΩ Calibrates the 100 kΩ resistance.

Return Value

Name Type Description
Status ViStatus Reports the Status of this operation. To obtain a text description of the status code, call niDMM_GetErrorMessage. To obtain additional information concerning the error condition, use niDMM_GetError.

niDMM_CalAdjustACFilter

ViStatus = niDMM_CalAdjustACFilter(ViSession Instrument_Handle, ViInt32 Mode, ViReal64 Range, ViReal64 Frequency, ViReal64 Expected_Value)

Purpose

For the NI 4080/4081/4082 and the NI 4070/4071/4072, calibrates the filter coefficients used for AC measurements of the supplied Mode and Range.

Note Refer to the calibration procedure for your device before using this function

Parameters

Input
Name Type Description
Instrument_Handle ViSession The session handle that you obtain from niDMM_InitExtCal. The handle identifies a particular instrument calibration session.
Mode ViInt32

Specifies the calibration Mode used to acquire the measurement.

For valid modes, refer to the calibration procedure for your device.

Range ViReal64

Specifies the Range to calibrate.

For valid ranges, refer to the calibration procedure for your device. Auto-ranging is not supported for calibration operations.

Frequency ViReal64 Specifies the Frequency of the input signal.
Expected_Value ViReal64 Specifies the Expected_Value of the measurement.

Return Value

Name Type Description
Status ViStatus Reports the Status of this operation. To obtain a text description of the status code, call niDMM_GetErrorMessage. To obtain additional information concerning the error condition, use niDMM_GetError.

niDMM_CloseExtCal

ViStatus = niDMM_CloseExtCal(ViSession Instrument_Handle, ViInt32 Action)

Purpose

Performs the specified Action, closes the specified external calibration session obtained from niDMM_InitExtCal, and deallocates resources that it reserved.

Note The NI 4050 and NI 4060 are not supported.

Refer to the calibration procedure for your device before using this function

Parameters

Input
Name Type Description
Instrument_Handle ViSession The session handle that you obtain from niDMM_InitExtCal. The handle identifies a particular instrument calibration session.
Action ViInt32 Specifies whether the driver saves the updated calibration constants.
NIDMM_EXTCAL_ACTION_ABORT (default) Restores the calibration constants to what they were before starting the external calibration procedure.
NIDMM_EXTCAL_ACTION_SAVE Saves the new calibration constants to the device.

Return Value

Name Type Description
Status ViStatus Reports the Status of this operation. To obtain a text description of the status code, call niDMM_GetErrorMessage. To obtain additional information concerning the error condition, use niDMM_GetError.

niDMM_GetCalCount

ViStatus = niDMM_GetCalCount(ViSession Instrument_Handle, ViInt32 Cal_Type, ViInt32 *Count)

Purpose

Returns the calibration Count for the specified type of calibration.

Note The NI 4050, NI 4060, and NI 4080/4081/4082 are not supported

Parameters

Input
Name Type Description
Instrument_Handle ViSession Identifies a particular instrument session. You obtain the Instrument_Handle parameter from niDMM_init or niDMM_InitWithOptions. The default is None.
Cal_Type ViInt32 Specifies the type of calibration performed (external or self-calibration).
NIDMM_VAL_INTERNAL_AREA (default) Note The NI 4065 does not support self-calibration 0 Self-Calibration
NIDMM_VAL_EXTERNAL_AREA 1 External Calibration
Output
Name Type Description
Count ViInt32* The number of times calibration has been performed.

Return Value

Name Type Description
Status ViStatus Reports the Status of this operation. To obtain a text description of the status code, call niDMM_GetErrorMessage. To obtain additional information concerning the error condition, use niDMM_GetError.

niDMM_GetCalDateAndTime

ViStatus = niDMM_GetCalDateAndTime(ViSession Instrument_Handle, ViInt32 Cal_Type, ViInt32 *Month, ViInt32 *Day, ViInt32 *Year, ViInt32 *Hour, ViInt32 *Minute)

Purpose

Returns the date and time of the last calibration performed.

Note The NI 4050 and NI 4060 are not supported

Parameters

Input
Name Type Description
Instrument_Handle ViSession Identifies a particular instrument session. You obtain the Instrument_Handle parameter from niDMM_init or niDMM_InitWithOptions. The default is None.
Cal_Type ViInt32 Specifies the type of calibration performed (external or self-calibration).

| :- | :- | :- | |NIDMM_VAL_INTERNAL_AREA (default) Note The NI 4065 does not support self-calibration|0|Self-Calibration| |NIDMM_VAL_EXTERNAL_AREA|1|External Calibration|

Output
Name Type Description
Month ViInt32* Indicates the Month of the last calibration.
Day ViInt32* Indicates the Day of the last calibration.
Year ViInt32* Indicates the Year of the last calibration.
Hour ViInt32* Indicates the Hour of the last calibration.
Minute ViInt32* Indicates the Minute of the last calibration.

Return Value

Name Type Description
Status ViStatus Reports the Status of this operation. To obtain a text description of the status code, call niDMM_GetErrorMessage. To obtain additional information concerning the error condition, use niDMM_GetError.

niDMM_GetDevTemp

ViStatus = niDMM_GetDevTemp(ViSession Instrument_Handle, ViString Options, ViReal64 *Temperature)

Purpose

Returns the current Temperature of the device.

Note The NI 4050 and NI 4060 are not supported

Parameters

Input
Name Type Description
Instrument_Handle ViSession Identifies a particular instrument session. You obtain the Instrument_Handle parameter from niDMM_init or niDMM_InitWithOptions. The default is None.
Options ViString Reserved.
Output
Name Type Description
Temperature ViReal64* Returns the current Temperature of the device.

Return Value

Name Type Description
Status ViStatus Reports the Status of this operation. To obtain a text description of the status code, call niDMM_GetErrorMessage. To obtain additional information concerning the error condition, use niDMM_GetError.

niDMM_GetLastCalTemp

ViStatus = niDMM_GetLastCalTemp(ViSession Instrument_Handle, ViInt32 Cal_Type, ViReal64 *Temperature)

Purpose

Returns the Temperature during the last calibration procedure.

Note The NI 4050 and NI 4060 are not supported

Parameters

Input
Name Type Description
Instrument_Handle ViSession Identifies a particular instrument session. You obtain the Instrument_Handle parameter from niDMM_init or niDMM_InitWithOptions. The default is None.
Cal_Type ViInt32 Specifies the type of calibration performed (external or self-calibration).

| :- | :- | :- | |NIDMM_VAL_INTERNAL_AREA (default) Note The NI 4065 does not support self-calibration|0|Self-Calibration| |NIDMM_VAL_EXTERNAL_AREA|1|External Calibration|

Output
Name Type Description
Temperature ViReal64* Returns the Temperature during the last calibration.

Return Value

Name Type Description
Status ViStatus Reports the Status of this operation. To obtain a text description of the status code, call niDMM_GetErrorMessage. To obtain additional information concerning the error condition, use niDMM_GetError.

niDMM_GetCalUserDefinedInfoMaxSize

ViStatus = niDMM_GetCalUserDefinedInfoMaxSize(ViSession Instrument_Handle, ViInt32 *Info_Size)

Purpose

Returns the maximum string length that can be stored in the EEPROM. Use niDMM_SetCalUserDefinedInfo to store user-defined information.

Note The NI 4050 and NI 4060 are not supported

Parameters

Input
Name Type Description
Instrument_Handle ViSession Identifies a particular instrument session. You obtain the Instrument_Handle parameter from niDMM_init or niDMM_InitWithOptions. The default is None.
Output
Name Type Description
Info_Size ViInt32* Returns the value of maximum string length that can be stored in the EEPROM using niDMM_SetCalUserDefinedInfo. The Info_Size value is given in characters, but it does not include the termination character.

Return Value

Name Type Description
Status ViStatus Reports the Status of this operation. To obtain a text description of the status code, call niDMM_GetErrorMessage. To obtain additional information concerning the error condition, use niDMM_GetError.

niDMM_GetCalUserDefinedInfo

ViStatus = niDMM_GetCalUserDefinedInfo(ViSession Instrument_Handle, ViInt32 Buffer_Size, ViChar Info[])

Purpose

Returns the user-defined calibration information stored in the EEPROM.

Note The NI 4050 and NI 4060 are not supported

Parameters

Input
Name Type Description
Instrument_Handle ViSession Identifies a particular instrument session. You obtain the Instrument_Handle parameter from niDMM_init or niDMM_InitWithOptions. The default is None.
Buffer_Size ViInt32

Passes the number of bytes in the ViString you specify for the Info parameter.

If zero is passed for this parameter, the Buffer_Size needed to store the information is returned. If the Info parameter, including the terminating NULL byte, contains more bytes than you indicate in this parameter, the function copies Buffer_Size - 1 bytes into the buffer, places an ASCII NULL byte at the end of the buffer, and returns the Buffer_Size you must pass to get the entire value.

For example, if the value is "123456" and the Buffer_Size is 4, the function places "123" into the buffer and returns 7. If you pass a negative number, the function copies the value to the buffer regardless of the number of bytes in the value.

Output
Name Type Description
Info ViChar[] Returns the user-defined calibration information stored in the EEPROM. If this is NULL, the Buffer_Size needed to store the information is returned.

Return Value

Name Type Description
Status ViStatus Reports the Status of this operation. To obtain a text description of the status code, call niDMM_GetErrorMessage. To obtain additional information concerning the error condition, use niDMM_GetError.

niDMM_SetCalUserDefinedInfo

ViStatus = niDMM_SetCalUserDefinedInfo(ViSession Instrument_Handle, ViChar Info[])

Purpose

Stores the user-defined information in the EEPROM. Use niDMM_GetCalUserDefinedInfoMaxSize to learn the maximum string size that is allowed. If the Info string size is larger than the maximum string size, NI-DMM stores as much of the information as possible, truncates the remainder, and returns a warning.

Note The NI 4050 and NI 4060 are not supported

Parameters

Input
Name Type Description
Instrument_Handle ViSession Identifies a particular instrument session. You obtain the Instrument_Handle parameter from niDMM_init or niDMM_InitWithOptions. The default is None.
Info ViChar] Specifies the user-defined information to be stored in the EEPROM such as the operator who performed the calibration operation or system information. Use [niDMM_GetCalUserDefinedInfoMaxSize to learn the maximum string size that is allowed. If the Info string size is larger than the maximum string size, NI-DMM stores as much of the information as possible, truncates the remainder, and return a warning.

Return Value

Name Type Description
Status ViStatus Reports the Status of this operation. To obtain a text description of the status code, call niDMM_GetErrorMessage. To obtain additional information concerning the error condition, use niDMM_GetError.

niDMM_GetExtCalRecommendedInterval

ViStatus = niDMM_GetExtCalRecommendedInterval(ViSession Instrument_Handle, ViInt32 *Months)

Purpose

Returns the recommended interval between external recalibration in Months.

Note The NI 4050 and NI 4060 are not supported

Parameters

Input
Name Type Description
Instrument_Handle ViSession Identifies a particular instrument session. You obtain the Instrument_Handle parameter from niDMM_init or niDMM_InitWithOptions. The default is None.
Output
Name Type Description
Months ViInt32* Returns the recommended number of Months between external calibrations.

Return Value

Name Type Description
Status ViStatus Reports the Status of this operation. To obtain a text description of the status code, call niDMM_GetErrorMessage. To obtain additional information concerning the error condition, use niDMM_GetError.

niDMM_GetSelfCalSupported

ViStatus = niDMM_GetSelfCalSupported(ViSession Instrument_Handle, ViBoolean *Self_Cal_Supported)

Purpose

Returns a Boolean value that expresses whether or not the DMM that you are using can perform self-calibration.

Parameters

Input
Name Type Description
Instrument_Handle ViSession Identifies a particular instrument session. You obtain the Instrument_Handle parameter from niDMM_init or niDMM_InitWithOptions. The default is None.
Output
Name Type Description
Self_Cal_Supported ViBoolean* Returns whether Self Cal is supported for the device specified by the given session.
VI_TRUE 1 The DMM that you are using can perform self-calibration.
VI_FALSE 0 The DMM that you are using cannot perform self-calibration.

Return Value

Name Type Description
Status ViStatus Reports the Status of this operation. To obtain a text description of the status code, call niDMM_GetErrorMessage. To obtain additional information concerning the error condition, use niDMM_GetError.

niDMM_RestoreLastExtCalConstants

ViStatus = niDMM_RestoreLastExtCalConstants(ViSession Instrument_Handle)

Purpose

Reverts the device to the calibration constants from the last complete external calibration. This function recovers the hardware if a fatal system error should occur during an external or self-calibration procedure.

After calling this function, you should call niDMM_SelfCal before taking measurements with the device to adjust the device for any temperature drifts since the last external calibration.

Note The NI 4050, NI 4060, and NI 4080/4081/4082 are not supported

Parameters

Input
Name Type Description
Instrument_Handle ViSession Identifies a particular instrument session. You obtain the Instrument_Handle parameter from niDMM_init or niDMM_InitWithOptions. The default is None.

Return Value

Name Type Description
Status ViStatus Reports the Status of this operation. To obtain a text description of the status code, call niDMM_GetErrorMessage. To obtain additional information concerning the error condition, use niDMM_GetError.

niDMM_SetCalPassword

ViStatus = niDMM_SetCalPassword(ViSession Instrument_Handle, ViChar Old_Password[], ViChar New_Password[])

Purpose

Changes the password required to enable external calibration functionality for the specified instrument. The maximum password string length is eight characters, excluding the termination character. "NI" is the default password.

Notes The NI 4050 and NI 4060 are not supported.

A password is required for external calibration. Be sure to record the password in a secure location

Parameters

Input
Name Type Description
Instrument_Handle ViSession Identifies a particular instrument session. You obtain the Instrument_Handle parameter from niDMM_init or niDMM_InitWithOptions. The default is None.
Old_Password ViChar[] Specifies the current password required to enable external calibration functionality. The maximum password string length is eight characters, excluding the termination character.
New_Password ViChar[] Specifies the New_Password required to enable external calibration functionality. The maximum password string length is eight characters, excluding the termination character.

Return Value

Name Type Description
Status ViStatus Reports the Status of this operation. To obtain a text description of the status code, call niDMM_GetErrorMessage. To obtain additional information concerning the error condition, use niDMM_GetError.

Table of Contents

Internal Development

Creating and Setting Up a gRPC Server

Server Security Support

Creating a gRPC Client

gRPC Client Examples

Session Utilities API Reference

Driver Documentation

gRPC API Differences From C API

Sharing Driver Sessions Between Clients

Getting started with moniker based streaming
C API Docs
NI-DAQmx
NI-DCPOWER
NI-DIGITAL PATTERN DRIVER
NI-DMM
NI-FGEN
NI-FPGA
NI-RFmx Bluetooth
NI-RFmx NR
NI-RFmx WCDMA
NI-RFmx GSM
NI-RFmx CDMA2k
NI-RFmx Instr
NI-RFmx LTE
NI-RFmx SpecAn
NI-RFmx TD-SCDMA
NI-RFmx WLAN
NI-RFSA
NI-RFSG
NI-SCOPE
NI-SWITCH
NI-TCLK
NI-XNET
Clone this wiki locally