FIRSTFare 2010LabVIEW Overview<br />Dennis C. Erickson ~ Senior Mentor for Teams 1510 and 2898<br />Daniel Bramblett ~ Tea...
Introduction<br />Working with National Instrument’s<br />Hardware and Software<br />Specifically:<br />Software ~ LabVIEW...
Introduction<br />LabVIEW<br />VI = Virtual Instrument<br />EW = Engineering Workstation<br />VI = Virtual Instrument or i...
Why LabVIEW?<br /><ul><li>Graphical Interface (Not Text Based)
Dataflow (All inputs must be updated before VI – Virtual Instrument – executes)
Self Documenting (You know what the code does)</li></ul>4<br />
Why LabVIEW?<br /><ul><li>Portable Code (VIs are easily reused)
Advanced set of diagnostic tools; probes, execution highlighting, error reporting, ability to surround the code with a “vi...
Why LabVIEW?<br /><ul><li>Perfectly tailored for NI hardware
Automatically handles multiple cores  and threads
Easily compiles to RT (Real-time) Operating Systems and FPGA (Field Programmable Gate Arrays) used in the cRIO processor</...
Why Do More Than Necessary to Win the Contest?<br />While it is entirely possible to win a contest with a robot that is “b...
The FRC Topology<br />8<br />
The SoftwareUsed to Make Stuff Move<br />This section offers a brief short course on the language LabVIEW<br />9<br />
To start a new project<br />Launch LabVIEW to create a new project<br />10<br />
To start a new project<br />Name your project .<br />You might for example use your team name and year in the name:<br />i...
To start a new project<br />Adding a VI to your project:<br />If its new, then right-click to “VI” and select and name it....
LabVIEW Functions - Front Panel<br />Some example controls and indicators for the Front Panel<br />13<br />Numerical Contr...
LabVIEW Functions - Front Panel<br />Some example controls and indicators for the Front Panel<br />14<br />Booleans<br />
LabVIEW Functions - Front Panel<br />Some example controls and indicators for the Front Panel<br />15<br />Strings and Pat...
LabVIEW Functions - Front Panel<br />Some example controls and indicators for the Front Panel<br />16<br />Arrays, Cluster...
LabVIEW Functions - Front Panel<br />Some example controls and indicators for the Front Panel<br />17<br />List Boxes, Tab...
LabVIEW Functions - Front Panel<br />Some example controls and indicators for the Front Panel<br />18<br />2D, 3D Digital ...
LabVIEW Functions - Front Panel<br />Some example controls and indicators for the Front Panel<br />19<br />Rings and Enums...
LabVIEW Functions - Diagram<br />Some example controls and indicators for the Diagram<br />20<br />Structures<br />
LabVIEW Functions - Diagram<br />Some example controls and indicators for the Diagram<br />21<br />Arrays<br />
LabVIEW Functions - Diagram<br />Some example controls and indicators for the Diagram<br />22<br />Structures, Classes and...
LabVIEW Functions - Diagram<br />Some example controls and indicators for the Diagram<br />23<br />Numerics, Booleans and ...
LabVIEW Functions - Diagram<br />Some example controls and indicators for the Diagram<br />24<br />Timing, Dialog Boxes, W...
An Example of Virtual Testing<br />Testing the Joystick Power Function VI<br />25<br />Task: <br />Test the VI with 1000 s...
The HardwareUsed to Move Stuff<br />This discussion touches on the following principle areas:<br /><ul><li>The cRIO hardwa...
The Sensors, Motors and Actuators that can be used
The DS Drive Station (Link from the User to the robot’s brain)</li></ul>26<br />
cRIO Hardware<br />cRIO – Compact Real-time Input/Output<br />A PAC (Programmable Automation Controller) which is an indus...
Upcoming SlideShare
Loading in …5
×

First fare 2010 lab-view overview

872 views

Published on

Published in: Technology, Business
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
872
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
28
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

First fare 2010 lab-view overview

  1. 1. FIRSTFare 2010LabVIEW Overview<br />Dennis C. Erickson ~ Senior Mentor for Teams 1510 and 2898<br />Daniel Bramblett ~ Team 1510<br />Amy Wiegand ~ Team 2915<br />1<br />
  2. 2. Introduction<br />Working with National Instrument’s<br />Hardware and Software<br />Specifically:<br />Software ~ LabVIEW<br />Hardware ~ cRIO<br />2<br />
  3. 3. Introduction<br />LabVIEW<br />VI = Virtual Instrument<br />EW = Engineering Workstation<br />VI = Virtual Instrument or in other languages “Routine”, SubVI = Subroutine<br />3<br />
  4. 4. Why LabVIEW?<br /><ul><li>Graphical Interface (Not Text Based)
  5. 5. Dataflow (All inputs must be updated before VI – Virtual Instrument – executes)
  6. 6. Self Documenting (You know what the code does)</li></ul>4<br />
  7. 7. Why LabVIEW?<br /><ul><li>Portable Code (VIs are easily reused)
  8. 8. Advanced set of diagnostic tools; probes, execution highlighting, error reporting, ability to surround the code with a “virtual world simulation environment” for testing.</li></ul>5<br />
  9. 9. Why LabVIEW?<br /><ul><li>Perfectly tailored for NI hardware
  10. 10. Automatically handles multiple cores and threads
  11. 11. Easily compiles to RT (Real-time) Operating Systems and FPGA (Field Programmable Gate Arrays) used in the cRIO processor</li></ul>6<br />
  12. 12. Why Do More Than Necessary to Win the Contest?<br />While it is entirely possible to win a contest with a robot that is “bare bones” the better goal is to learn how to do things along the way that may or may not be used.<br />7<br />
  13. 13. The FRC Topology<br />8<br />
  14. 14. The SoftwareUsed to Make Stuff Move<br />This section offers a brief short course on the language LabVIEW<br />9<br />
  15. 15. To start a new project<br />Launch LabVIEW to create a new project<br />10<br />
  16. 16. To start a new project<br />Name your project .<br />You might for example use your team name and year in the name:<br />i.e., “Team 1510 for 2010 Robot Project”<br />Be sure that you enter your team IP in the following format:<br />10.15.10.02<br />11<br />
  17. 17. To start a new project<br />Adding a VI to your project:<br />If its new, then right-click to “VI” and select and name it.<br />If adding an existing one select the menu item “Add”.<br />12<br />
  18. 18. LabVIEW Functions - Front Panel<br />Some example controls and indicators for the Front Panel<br />13<br />Numerical Controls and Indicators<br />
  19. 19. LabVIEW Functions - Front Panel<br />Some example controls and indicators for the Front Panel<br />14<br />Booleans<br />
  20. 20. LabVIEW Functions - Front Panel<br />Some example controls and indicators for the Front Panel<br />15<br />Strings and Paths<br />
  21. 21. LabVIEW Functions - Front Panel<br />Some example controls and indicators for the Front Panel<br />16<br />Arrays, Clusters, Matrices and Dialog Boxes<br />
  22. 22. LabVIEW Functions - Front Panel<br />Some example controls and indicators for the Front Panel<br />17<br />List Boxes, Tables and Trees<br />
  23. 23. LabVIEW Functions - Front Panel<br />Some example controls and indicators for the Front Panel<br />18<br />2D, 3D Digital Charts and Graphs and Special Plots<br />
  24. 24. LabVIEW Functions - Front Panel<br />Some example controls and indicators for the Front Panel<br />19<br />Rings and Enums<br />
  25. 25. LabVIEW Functions - Diagram<br />Some example controls and indicators for the Diagram<br />20<br />Structures<br />
  26. 26. LabVIEW Functions - Diagram<br />Some example controls and indicators for the Diagram<br />21<br />Arrays<br />
  27. 27. LabVIEW Functions - Diagram<br />Some example controls and indicators for the Diagram<br />22<br />Structures, Classes and Variants<br />
  28. 28. LabVIEW Functions - Diagram<br />Some example controls and indicators for the Diagram<br />23<br />Numerics, Booleans and Files<br />
  29. 29. LabVIEW Functions - Diagram<br />Some example controls and indicators for the Diagram<br />24<br />Timing, Dialog Boxes, Waveforms, etc, etc<br />Hundreds of other functions<br />
  30. 30. An Example of Virtual Testing<br />Testing the Joystick Power Function VI<br />25<br />Task: <br />Test the VI with 1000 simulated Joystick positions from 0 to +1 to 0 to -1 (White Line) and create 9 plots with the following function:<br />Plotn = (motor speed)m<br />Where:<br />Plotn = a series of plots<br />(9 total)<br />Motor speed = voltage input to the motor (from 1 to -1)<br />m = power function (use to alter the forward sensitivity of the Joystick)<br />
  31. 31. The HardwareUsed to Move Stuff<br />This discussion touches on the following principle areas:<br /><ul><li>The cRIO hardware (The Brain)
  32. 32. The Sensors, Motors and Actuators that can be used
  33. 33. The DS Drive Station (Link from the User to the robot’s brain)</li></ul>26<br />
  34. 34. cRIO Hardware<br />cRIO – Compact Real-time Input/Output<br />A PAC (Programmable Automation Controller) which is an industrial controller that is used in advanced systems incorporating software capabilities such as control, communication, data logging, and signal processing requiring rugged hardware performing logic, motion, process control, and vision. For FIRST applications, ideal for robot building.<br />27<br />A fully populated cRIO example<br />
  35. 35. cRIO Hardware<br />Real-time operating system<br />28<br />cRIO connected to a Laptop<br />FPGA – Field Programmable Gate Array<br />located under the cRIO chassis<br />
  36. 36. How to Set up a Virtual Test Environment<br />The following Example code shows how to create an environment to test and calibrate VI modules. In this case we are testing the Camera Servo motors<br />29<br />Next run the test in a While loop. Note the Loop Sweep constant which defines the loop cycle (20ms). Here the loop is stopped using the Stop Test? command <br />First Initialize the test (note the “Data Dependency” wire)<br />Finally End the test by closing all references, etc. Again note the Data Dependency and use of a Frame structure as the SubVI has no wired input to use<br />
  37. 37. State Diagrams<br />The following slides start with a State Chart to show what the State Diagram will do. The next slides show the State Diagram created.<br />30<br />
  38. 38. State Diagrams<br />31<br />State diagrams are extremely useful in creating small or large applications. Since LabVIEW is a DataFlow language, this approach adds to the robustness of the application<br />The Application starts by selecting the Initialize Test State (case). Note that we check for errors and if the Stop Test? Button is pressed. Note that the Enum (far left constant control) has 3 possible states; Initialize Test, Run Test and End Test<br />
  39. 39. State Diagrams<br />32<br />These slides show a typical State Diagram that tests camera servos. Note the inputs from the joystick and a smoothing control to test filtering.<br />Next if no errors, run the While loop until an error happens or the Stop Test? Button is pressed the go to the next State<br />
  40. 40. State Diagrams<br />One of the interesting features of the State Diagram is confining the application code to one screen, thus self documenting code<br />33<br />Finally, there has been an error or the Stop Test? Button has been pressed so end the test by closing references, etc. Note that now the Boolean constant is now TRUE which stops the loop<br />
  41. 41. Questions?<br />Dennis C. Erickson - dcerickson1@comcast.net<br />

×