Example Programs
- Updated2025-12-19
- 10 minute(s) read
NI installs example code with NI-DMM that demonstrates the functionality of the PXIe-4081 and can serve as interactive tools, programming models, and building blocks for your own applications.
NI Example Finder
The NI Example Finder is a utility that organizes examples into categories and allows you to browse and search installed examples. For example, search for "DMM" to locate all NI digital multimeter examples. You can see descriptions and compatible hardware models for each example or see all the examples compatible with one particular hardware model.
To locate examples using the NI Example Finder within LabVIEW or LabWindows/CVI, select Help»Find Examples and navigate to Hardware Input and Output»Modular Instruments»NI-DMM (Digital Multimeters).
Installed Example Locations
Find the examples installed with PXIe-4081.The installation location for NI-DMM example programs differs by programming language and development environment. Refer to the following table for information about example program installation locations.
| Software Application | Installed Example Locations |
|---|---|
| LabVIEW | Use the NI Example Finder to locate examples. |
| LabWindows/CVI | Program Files\IVI Foundation\IVI\Drivers\niDMM\Examples\CVI |
| ANSI C or Microsoft Visual C++ | Users\Public\Documents\National Instruments\NI-DMM\examples. |
Common Example Programs
The following NI-DMM example programs demonstrate common DMM functions and operations.
Single Measurement Example Programs
These examples demonstrate how to take a specific type of measurement using the DMM. The default values for range and resolution are customized to the type of measurement. The following function calls are included in each example: niDMM Initialize, niDMM Config Measurement, niDMM Read, niDMM Close. Certain examples include additional function calls. For example, DC measurements sets the Powerline Frequency. AC measurements sets the AC Bandwidth.
Multi Point Measurement Example Programs
These examples demonstrate how to use the niDMM Configure Multi Point. Only Immediate triggers are used.
Triggered Acquisition Example Programs
These examples demonstrate the use of triggers during measurement acquisitions.
Advanced Feature Example Programs
These examples demonstrate some advanced features of the PXIe-4081.
Waveform Acquisition Example Programs
These examples demonstrate the NI-DMM waveform acquisitions functions that enable you to use the PXIe-4081 as a high-voltage isolated digitizer.
Performance Example Programs
These examples demonstrate the DC Reading Rates Specifications for the PXIe-4081.
The measured value and reading rate are displayed in two indicators. The value for noise-free digits is based on the last 100 measurements and displayed in an indicator.
Use this example to find the speed-noise tradeoff that works best for your application. On the 10 V range with a shorted input, a 3.33 ms aperture time yields approximately 6½ digits of resolution at around 290 readings/s. Increasing the aperture time to 10 ms results in approximately 7 digits of resolution at around 100 readings/s.
By changing the aperture time to 100 ms, the resolution is 7.3 digits. This approaches the specified performance capability of the DMM before adding in other sources of noise (specified front-end noise on the most sensitive range, environmental noise, or noise from the device under test).
Try making resistance measurements with a 1 MΩ resistor and a 10 ms aperture time, but connect the resistor with the standard unshielded test leads included with the PXIe-4081. Powerline frequency noise in the environment most likely will interfere with this high impedance test setup. Because 10 ms is not a multiple of a line cycle (50 or 60 Hz), the DMM does not reject this environmental noise. This is evidenced by the value in the Noise-Free Resolution indicator. Changing the aperture time to 16.66 ms (20 ms for 50 Hz line frequency outside the US) significantly improves the effective noise-free resolution. A 100 ms aperture time yields even better results.