Download the Step-by-Step Procedure PDF

Connect to Hardware: Step-by-Step Procedure
Use this section with the video to test and validate that your NI data acquisition device, such as an NI myDAQ
or NI ELVIS II, is working properly. Before proceeding, you must open the test panels for the device.
1. Open NI Measurement & Automation Explorer (MAX).
a.Navigate to Start >> Programs >> National Instruments >> Measurement & Automation Explorer.
2. Open test panels.
a.Expand My System.
b.Expand Devices and Interfaces.
c.Right-click your device of interest and select Test Panels.
You can now use test panels to ensure that the analog input, analog output, digital I/O, and counter I/O are all
functioning correctly. In this example, test the NI myDAQ.
Analog Input
By default, the test panels open to analog input. You can choose the channel you want to test (Note that you
can access the audio input channels as well as the digital multimeter here.), the input range of the channel,
the sample mode, and the input terminal configuration. For this test, leave them as default values and just
press Start.
Note: If you do not have any signals connected to an input line, the signal floats and does not hold steady. This
is expected behavior.
To verify that the analog input is reading correctly, input a known voltage. You can use any known signal such
as a AA battery, but, in this case, use the + rail on the device:
1. Connect the +5 V rail to the ai0+ terminal with a wire.
2. Connect the DGND terminal to the ai0– terminal with a wire.
3. In the MAX test panel, navigate to the Analog Input tab.
4. Select DevX/ai0 for the input channel, where X is the device number for your device.
5. Select On Demand for the Mode.
6. Select Differential for the Input Configuration.
7. Enter 10 for Max Input Limit and –10 for Min Input Limit.
8. Press the Start button and observe the voltage.
9. The graph should display between 4.7 and 5.0 VDC.
Note: This voltage is dependent on the power of the USB hub, so it may not read exactly 5 V, but it
holds steady.
ni.com/students/learnlabview
Figure 13. Analog Input Wiring
Analog Output
Testing the analog output requires looping the analog output back to the analog input to verify the voltage.
Start by configuring the physical device.
Note: If you have not verified the analog input, do that now and then return to this section.
1. Connect ao0 to the ai0+ terminal with a wire.
2. Connect AGND to the ai0– terminal with a wire.
3. Navigate to the Analog Output tab in the MAX test panels.
4. Select DevX/ao0 for the input channel, where X is the device number for your device.
5. Select Sinewave Generation for the Mode.
6. Select <Default> for the Transfer Mechanism.
7. Enter 10 for Max Output Limit and –10 for Min Output Limit.
8. Enter 1k or 1000 for rate (Hz).
9. Enter 5 for Sinewave Amplitude.
10.Press the Start button to begin outputting the sine wave.
Now use the analog input to verify the analog output. Configure the analog input according to the analog input
section. After pressing Run, you can see a sine wave on the graph indicator with a 5 V amplitude, 10 Vpk-pk.
Figure 14. Analog Output Wiring
ni.com/students/learnlabview
Digital I/O
To test the digital I/O, connect DIO0 to DIO4, DIO1 to DIO5, DIO2 to DIO6, and DIO3 to DIO7, with a wire for
each pair, which equals four wires total (see Figure 15). After connecting the wires, navigate back to the test
panels in MAX.
1. Navigate to the Digital I/O tab in the MAX test panels.
2. Select DevX/ctr0 for the input channel, where X is the device number for your device.
3. Select Port0 for the Port Name.
4. Select Port0/line0:7 for the Port/Line Direction.
5. Toggle lines 0–3 to be input and lines 4–7 to be output.
6. Press the Start button.
7. Toggle the software switches for lines 0–3 to observe the software LEDs change for lines 4–7.
Figure 15. Digital I/O Wiring
Counter I/O
A counter can both input and output a digital signal deterministically. First, test the input by applying a 5 V to 0
V pulse train; the counter can detect a transition from high to low or low to high.
Note: If you do not have a single-pole double-throw (SPDT) switch, you can simply connect a wire into PFI3
and then connect and disconnect the other end of the wire to the +5 V terminal.
8. Connect a 330 Ω resistor, SPDT switch in series to terminal DIO 3 as seen in Figure 16.
9. Connect one pole of the SPDT switch to the DGND terminal and the other pole to the +5 V terminal.
10. Navigate to the Counter I/O tab in the MAX test panels.
11. Select DevX/ctr0 for the input channel, where X is the device number for your device.
12. Select Edge Counting for the Mode.
13. Select /DevX/PFI3 for the Edge Source.
14. Press the Start button and toggle the SPDT switch to begin counting edges.
Note: If there is any noise on the signal, multiple edges may be counted for each transition of the
SPDT switch.
ni.com/students/learnlabview
Figure 16. Counter Input Wiring
Now test the output of the counter pulse train, which is a series of digital high and low pulses often used to
trigger an event such as a sample clock for data acquisition. To output a pulse train, you must
1. Connect a 330 Ω resistor and an LED in series between terminal DIO 3 and the +5 V terminal as seen in
Figure 17.
2. Navigate to the Counter I/O tab in the MAX test panels.
3. Select DevX/ctr0 for the input channel, where X is the device number for your device.
4. Select Pulse Train Generation for the Mode.
5. /DevX/PFI3 is the only option for the Pulse Terminal.
6. Enter 1 for the Frequency.
a.This outputs a high and low pulse every 1 second or 1 Hz.
7. Press the Start button to observe the LED blink at a rate of 1 Hz.
Figure 17. Counter Output Wiring
©2011 National Instruments. All rights reserved. LabVIEW, National Instruments, NI, and ni.com are trademarks of National Instruments.
Other product and company names listed are trademarks or trade names of their respective companies.
ni.com/students/learnlabview