Acquiring Data

NI Digital Multimeters

Acquiring Data

After you have configured the acquisition, you can acquire data by calling niDMM Read or niDMM Initiate and niDMM Fetch.

Read

niDMM Read initiates an acquisition, reads the acquired data, stops the acquisition, and returns control to your program. niDMM Read does not return control to your program until all of the requested data has been acquired. If you have not configured a trigger, the DMM immediately begins its acquisition and acquires a measurement. Refer to Single Point Acquisitions for information on triggering options.

You can set the maximum length of time (Maximum Time) to allow the measurement operation to complete. If the measurement operation does not complete within this time interval, niDMM Read returns an error.

Initiate and Fetch

Use niDMM Initiate and niDMM Fetch for a more flexible method for acquiring data, offering several advantages over niDMM Read. With niDMM Initiate, you can perform other operations while the DMM acquires data. niDMM Fetch retrieves the acquired data.

After executing niDMM Initiate, the DMM begins acquiring data and sending it to your computer RAM. Meanwhile, control is returned immediately to your program, which frees up the computer processor for other tasks.

After niDMM Initiate, call niDMM Fetch; niDMM Fetch waits until the requested data has been acquired. niDMM Fetch transfers the acquired data from memory to your application. If the data is not acquired within the time specified with the timeout parameter, NI-DMM returns an error. If you want to stop the DMM before it finishes, use niDMM Abort.

Tip  Use niDMM Read Status before calling niDMM Fetch to determine the number of measurements available.
Note  niDMM Read combines niDMM Initiate and niDMM Fetch into one call. niDMM Read is suitable for simple acquisitions. niDMM Initiate/niDMM Fetch is better suited for complex applications that involve scanning and/or triggering.

Multi Point Acquisitions

Call niDMM Read Multi Point or niDMM Initiate and niDMM Fetch Multi Point for multipoint acquisitions. If the measurement operation does not complete within the Maximum Time interval, niDMM Read Multi Point or niDMM Fetch Multi Point returns any acquired data along with a timeout error.

Note  If you are programming in C or Visual Basic and are acquiring multiple data points, you need to declare an array in your program. This array allocates space for the data that is acquired with niDMM Fetch Multi Point or niDMM Read Multi Point. LabVIEW users do not need to declare an array because niDMM Fetch Multi Point and niDMM Read Multi Point handles the array.

Waveform Acquisitions

The NI 4070/4071/4072 has a digitizer that can be used to capture waveforms.

Use niDMM Configure Waveform Acquisition to configure the acquisition and niDMM Read Waveform or niDMM Initiate and niDMM Fetch Waveform to retrieve the waveform data.

Note  If you are programming in C or Visual Basic, you need to declare an array in your program. This array allocates space for the data that is acquired with niDMM Read Waveform or niDMM Fetch Waveform. LabVIEW users do not need to declare an array because niDMM Read Waveform and niDMM Fetch Waveform handles the array.

You can set the maximum length of time (Maximum Time) to allow the measurement operation to complete. If the measurement operation does not complete within this time interval, niDMM Read Waveform or niDMM Fetch Waveform returns any acquired data along with the error.

Combining Single Point Measurements, Multiple Point Measurements, and Waveform Acquisitions in the Same Session

You can combine multiple types of acquisitions in the same session. For example, you can open a session, read a single point, and then acquire a waveform. You can also alternate between single and multiple point measurements, and you can change the configuration and acquire a resistance measurement after taking a voltage measurement.

The Operation Mode property controls whether the DMM takes standard single or multi point measurements, or acquires a waveform.

The driver sets the value of this property when you call niDMM Config Measurement or niDMM Configure Waveform Acquisition. The Operation Mode property is set to IVIDMM MODE when niDMM Config Measurement is called. The driver takes a single point measurement if the Trigger Count and niDMM Sample Count properties are both set to 1. If either of these values has been changed, either by calling niDMM Configure Multi Point or by setting the properties directly, the driver takes a multipoint measurement. The Operation Mode property is set to WAVEFORM MODE when niDMM Configure Waveform Acquisition is called.

If you are programming with properties or attributes, you should set the Operation Mode property to the correct value before setting other properties for that configuration.