Use the DMM terminals on the NI myDAQ to acquire a voltage signal from a AAA battery
Simply connect the DMM positive input terminal to the positive side of the battery and the negative DMM input terminal to the negative side of the battery using the banana cables.
Figure 1: Wiring Diagram
The user interface we created has a both graph and numeric indicator. The numeric indicator will display the instantaneous value and the graph will display a voltage history.
Figure 2: LabVIEW Front Panel
In LabVIEW we need to create a front panel to display the voltage values in a numerical and graphical indicator. We will acquire the data using the DAQ Assistant and then pass the data to the indicators.
Figure 3: Coding Block Diagram
The LabVIEW diagram looks very similar to the coding block diagram, except the battery is not included.
Figure 4: LabVIEW 2009 Block Diagram
(The attached LabVIEW code snippet can be dragged-and-dropped to a LabVIEW block diagram, use attached PNG file. After locating the PNG file, just drag the file icon onto a blank block diagram, as if you were dragging the file onto your desktop.)
Inside the while loop on the left is the DAQ Assistant used to input the voltage data from the DMM terminals. The voltage values are indicated on the front panel with both a numeric indicator and the waveform chart indicator.
In this VI the DAQ Assistant is configured for on-demand input on the analog channel. The following steps walk through the configuration of the DAQ Assistant from scratch:
Figure 5: DAQ Assistant Voltage Configuration
*Note that sample time is set by the Wait VI and is set to sample 10 times per second (every 100ms) in this VI
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.