Skip to content

NI DMM Configuration Functions

ni-siray edited this page Apr 29, 2021 · 9 revisions

Configuration Functions

niDMM_ConfigureMeasurementDigits

ViStatus = niDMM_ConfigureMeasurementDigits(ViSession Instrument_Handle, ViInt32 Measurement_Function, ViReal64 Range, ViReal64 Resolution_Digits)

Purpose

Configures the common attributes of the measurement. These attributes include NIDMM_ATTR_FUNCTION, NIDMM_ATTR_RANGE, and NIDMM_ATTR_RESOLUTION_DIGITS.

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.
Measurement_Function ViInt32 Specifies the Measurement_Function used to acquire the measurement. The driver sets NIDMM_ATTR_FUNCTION to this value.
Range ViReal64 Specifies the range for the function specified in the Measurement_Function parameter. When frequency is specified in the Measurement_Function parameter, you must supply the minimum frequency expected in the Range parameter. For example, you must type in 100 Hz if you are measuring 101 Hz or higher. For all other functions, you must supply a range that exceeds the value that you are measuring. For example, you must type in 10 V if you are measuring 9 V. Range values are coerced up to the closest input range. Refer to the Devices Overview for a list of valid ranges. The driver sets NIDMM_ATTR_RANGE to this value. The default is 0.02 V.

Note The NI 4050, NI 4060, and NI 4065 only support Auto Range when the trigger and sample trigger are set to IMMEDIATE

NIDMM_VAL_AUTO_RANGE_ON -1.0 NI-DMM performs an Auto Range before acquiring the measurement.
NIDMM_VAL_AUTO_RANGE_OFF -2.0 NI-DMM sets the Range to the current NIDMM_ATTR_AUTO_RANGE_VALUE and uses this range for all subsequent measurements until the measurement configuration is changed.
NIDMM_VAL_AUTO_RANGE_ONCE -3.0 NI-DMM performs an Auto Range before acquiring the measurement. The NIDMM_ATTR_AUTO_RANGE_VALUE is stored and used for all subsequent measurements until the measurement configuration is changed.
Input
Name Type Description
Resolution_Digits ViReal64 Specifies the resolution of the measurement in digits. The driver sets the Devices Overview for a list of valid ranges. The driver sets NIDMM_ATTR_RESOLUTION_DIGITS. The default is 5½.

Note NI-DMM ignores this parameter for capacitance and inductance measurements on the NI 4072. To achieve better resolution for such measurements, use the NIDMM_ATTR_LC_NUMBER_MEAS_TO_AVERAGE attribute

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_ConfigureMeasurementAbsolute

ViStatus = niDMM_ConfigureMeasurementAbsolute(ViSession Instrument_Handle, ViInt32 Measurement_Function, ViReal64 Range, ViReal64 Resolution_Absolute)

Purpose

Configures the common attributes of the measurement. These attributes include NIDMM_ATTR_FUNCTION, NIDMM_ATTR_RANGE, and NIDMM_ATTR_RESOLUTION_ABSOLUTE.

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.
Measurement_Function ViInt32 Specifies the Measurement_Function used to acquire the measurement. The driver sets NIDMM_ATTR_FUNCTION to this value.
Range ViReal64 Specifies the Range for the function specified in the Measurement_Function parameter. When frequency is specified in the Measurement_Function parameter, you must supply the minimum frequency expected in the Range parameter. For example, you must type in 100 Hz if you are measuring 101 Hz or higher. For all other functions, you must supply a Range that exceeds the value that you are measuring. For example, you must type in 10 V if you are measuring 9 V. Range values are coerced up to the closest input Range. Refer to the Devices Overview for a list of valid ranges. The driver sets NIDMM_ATTR_RANGE to this value. The default is 0.02 V.

Note The NI 4050, NI 4060, and NI 4065 only support Auto Range when the trigger and sample trigger are set to IMMEDIATE

NIDMM_VAL_AUTO_RANGE_ON -1.0 NI-DMM performs an Auto Range before acquiring the measurement.
NIDMM_VAL_AUTO_RANGE_OFF -2.0 NI-DMM sets the Range to the current NIDMM_ATTR_AUTO_RANGE_VALUE and uses this range
for all subsequent measurements until the measurement configuration is changed.
NIDMM_VAL_AUTO_RANGE_ONCE -3.0 NI-DMM performs an Auto Range before acquiring the measurement. The NIDMM_ATTR_AUTO_RANGE_VALUE is stored and used for all subsequent measurements until the measurement configuration is changed.
Input
Name Type Description
Resolution_Absolute ViReal64 Specifies the absolute resolution for the measurement. NI-DMM sets NIDMM_ATTR_RESOLUTION_ABSOLUTE. The default is 0.001 V.

Note NI-DMM ignores this parameter for capacitance and inductance measurements on the NI 4072. To achieve better resolution for such measurements, use the NIDMM_ATTR_LC_NUMBER_MEAS_TO_AVERAGE attribute

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_ConfigureMultiPoint

ViStatus = niDMM_ConfigureMultiPoint(ViSession Instrument_Handle, ViInt32 Trigger_Count, ViInt32 Sample_Count, ViInt32 Sample_Trigger, ViReal64 Sample_Interval)

Purpose

Configures the attributes for multipoint measurements. These attributes include NIDMM_ATTR_TRIGGER_COUNT, NIDMM_ATTR_SAMPLE_COUNT, NIDMM_ATTR_SAMPLE_TRIGGER, and NIDMM_ATTR_SAMPLE_INTERVAL.

For continuous acquisitions, set NIDMM_ATTR_TRIGGER_COUNT or NIDMM_ATTR_SAMPLE_COUNT to zero. For more information, refer to Multiple Point Acquisitions, Triggering, and Using Switches.

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.
Trigger_Count ViInt32 Sets the number of triggers you want the DMM to receive before returning to the Idle state. The driver sets NIDMM_ATTR_TRIGGER_COUNT to this value. The default value is 1.
Sample_Count ViInt32 Sets the number of measurements the DMM makes in each measurement sequence initiated by a trigger. The driver sets NIDMM_ATTR_SAMPLE_COUNT to this value. The default value is 1.
Sample_Trigger ViInt32 Specifies the Sample_Trigger source you want to use. The driver sets NIDMM_ATTR_SAMPLE_TRIGGER to this value. The default is Immediate.

Note To determine which values are supported by each device, refer to the LabWindows/CVI Trigger Routing section

Input
Name Type Description
Sample_Interval ViReal64

Sets the amount of time in seconds the DMM waits between measurement cycles. The driver sets NIDMM_ATTR_SAMPLE_INTERVAL to this value. Specify a sample interval to add settling time between measurement cycles or to decrease the measurement rate. Sample_Interval only applies when the Sample_Trigger is set to INTERVAL. On the NI 4060, the Sample_Interval value is used as the settling time. When sample interval is set to 0, the DMM does not settle between measurement cycles. The NI 4065 and NI 4070/4071/4072 use the value specified in Sample_Interval as additional delay. The default value (-1) ensures that the DMM settles for a recommended time. This is the same as using an Immediate trigger.

Note This attribute is not used on the NI 4080/4081/4082 and the NI 4050

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_ConfigureWaveformAcquisition

ViStatus = niDMM_ConfigureWaveformAcquisition(ViSession Instrument_Handle, ViInt32 Measurement_Function, ViReal64 Range, ViReal64 Rate, ViInt32 Waveform_Points)

Purpose

Configures the DMM for waveform acquisitions. This feature is supported on the NI 4080/4081/4082 and the NI 4070/4071/4072.

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.
Measurement_Function ViInt32 Specifies the Measurement_Function used in a waveform acquisition. The driver sets NIDMM_ATTR_FUNCTION to this value.
NIDMM_VAL_WAVEFORM_VOLTAGE (default) 1003 Voltage Waveform
NIDMM_VAL_WAVEFORM_CURRENT 1004 Current Waveform
Input
Name Type Description
Range ViReal64

Specifies the expected maximum amplitude of the input signal and sets the Range for the Measurement_Function. NI-DMM sets NIDMM_ATTR_RANGE to this value. Range values are coerced up to the closest input Range. The default is 10.0. For valid ranges refer to the topics in Devices. Auto-ranging is not supported during waveform acquisitions.

Rate ViReal64

Specifies the Rate of the acquisition in samples per second. NI-DMM sets NIDMM_ATTR_WAVEFORM_RATE to this value. The valid Range is 10.0–1,800,000 S/s. Rate values are coerced to the closest integer divisor of 1,800,000. The default value is 1,800,000.

Waveform_Points ViInt32

Specifies the number of points to acquire before the waveform acquisition completes. NI-DMM sets NIDMM_ATTR_WAVEFORM_POINTS to this value. To calculate the maximum and minimum number of waveform points that you can acquire in one acquisition, refer to the Waveform Acquisition Measurement Cycle.The default value is 500.

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_4022Control

ViStatus = niDMM_4022Control(ViString resourceName, ViInt32 configuration)

Purpose

Configures the NI 4022 Guard and Current Amplifier module. Supported Devices: NI PXI-4022

Parameters

Input
Name Type Description
resourceName 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. Refer Valid Syntax below.
configuration ViInt32 Configurations (below) specifies the operating mode of the Guard and Current Amplifier module. The driver by default sets the module to operate as a guard output.

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.

Configurations

Operating Mode Behavior
NIDMM_4022_CONFIG_GUARD Enables the internal amplifier to be a unity gain buffer for performing 6-wire guarded measurements.
NIDMM_4022_CONFIG_CURRENT_100_NANOAMP Enables the low current amplifier and applies a gain of 1E8 V/A.
NIDMM_4022_CONFIG_CURRENT_10_MICROAMP Enables the low current amplifier and applies a gain of 1E6 V/A.
NIDMM_4022_CONFIG_CURRENT_1_MILLIAMP Enables the low current amplifier and applies a gain of 1E4 V/A.
NIDMM_4022_CONFIG_DISCONNECT_AGND When one of the current amplification ranges is selected, the +INPUT of the amplifier is tied to analog ground. This is the default case. This default configuration can be overridden by selecting this option to disconnect the +INPUT, and allow the user to provide an external reference. Calling one of the current amplification ranges after calling this VI will reconnect the +INPUT to analog ground.

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

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