Digital Inputs and Outputs
IOBOARD Week 2 Lab B Page 2 of 4
Name: _________________ Grade: __________
Title: IOBOARD I/O Board Pushbuttons and LEDs
1. OBJECTIVES
Create an ARM project to control LEDs from the corresponding pushbutton inputs on the I/O Board.
1. DESCRIPTION
The eight pushbutton inputs on the I/O board will independently operate the corresponding eight LEDs on the I/O board.
III. PROCEDURE
1. Create a folder with the following path C:\DeVry\ECT274\Week2\W2LB.
2. Follow the steps in the Week 2 Lab A Tutorial to set up the VI for the I/O Board (steps 1-10 of the tutorial). Save the project as “FiLastNameLab2-B.lvproj” and the VI as “FiLastNameLab2-B.vi” to the folder created in step 1.
3. Switch to the block diagram. This lab will have no controls or indicators on the front panel.
4. Add a While loop. Right-click on the Loop Condition input, then select Create Constant.
5. Add the IOBOARD VI inside the While loop. From the block diagram, right-click in block diagram, then select “Select a VI...” and select the ReadWriteIOBoard (SubVI).vi located in the C:\DeVry\IOBOARD folder. Expand the icon as shown in Figure 1.
6. Right-click on the Board Component input of the I/O BOARD icon and then Create Constant.
7. Using the selector, change the constant to Pushbuttons.
8. Right-click on the Operation input of the I/O BOARD icon, then Create Constant.
9. Using the selector, change Write To Board to Read From Board.
10. Right-click on the Data to Board input of the I/O Board icon, then Create Constant. Leave the constant to 0. The pushbuttons can now be read from the I/O board. Data To Board, 0, is ignored. Data are expected from the board. Your VI should look similar to the figure 2 below.
Figure 2
11. The data that were read will now be sent to the LEDs on the I/O board.
12. Add another I/O BOARD Library VI to the While loop. Place it to the right of the first IOBOARD Library VI icon.
13. Using the second library icon, right-click on the Board Component input of the IOBOARD Board icon and then Create Constant.
14. If the constant is not LEDs, Use the selector to change it to LEDs.
15. Right-click on the Operation input of the second IOBOARD icon and then Create Constant. The constant should be Write to Board.
16. Wire the output Data From Board of the first icon to the input Data To Board of the second icon. This will allow data to pass from the pushbuttons to the LEDs.
17. Add a half second wait to the While loop. The Wait (ms) function is located on the Time, Dialog… subpalette of the Programming palette. Create a constant of 500 for an input of 500 ms or one half second.
18. The final VI is shown in Figure 3 below.
Figure 3
19. Save the project.
20. Connect power to the ARM board. Run the VI. When a pushbutton on the I/O board is pressed, the corresponding LED should go on. Verify board operations.
21. Stop the program by pressing the Reset button on the ARM board.
22. Exit LabVIEW.
23. From the project folder, zip the files with the following name and extensions into a folder, and name it FiLastNameLab2-B.zip.
.aliases
.lvlps
.lvproj
.vi
24. Upload the zipped files to the appropriate Dropbox.
Modified by John Golzy 7/17/2013