LabView for Lego Mindstorms (LVLM) - FIRST in … · LabView for Lego Mindstorms (LVLM) FTC...
Transcript of LabView for Lego Mindstorms (LVLM) - FIRST in … · LabView for Lego Mindstorms (LVLM) FTC...
LabView for Lego Mindstorms(LVLM)
FTC 2014-2015 Kick-Off9/6/2014
Mike Turner FTC #[email protected] Gross FTC #4218
Outline
• The LabVIEW Environment
• General Programming
• LabVIEW “Targets”
• Getting Started
• Extra
LabVIEW Environment - Common
Context Help Window
NXT Toolkit Palette
BlockDiagram
Constants(Inputs)
Front Panel
General Programming
• Data Types
– Numeric
– Boolean
– String
– Ring
• Dataflow
• Loops
• Case Structure
NXT Target
• VIs are compiled, downloaded, and executed by the NXT brick
• Only Front Panel debugging is possible
PC Target• LabVIEW code executes on development machine• Allows for full use of LabVIEW debugging tools• NXT “Direct Commands” can invoke methods in the NXT firmware• Higher level functions are called transparently using NXT Shell
“If You Forget Everything Else”
• When in doubt, Right-click.
• Constants = Inputs (on Block Diagram)
• Controls = Inputs (on Front Panel)
• Indicators = Outputs (on Front Panel)
• Palettes (Right-click on Block Diagram, Front Panel)
• Context Help (“?”, CTRL + H, Help >> Show Context Help)
• NXT Terminal (Tools >> NXT Tools >> NXT Terminal)
• CTRL + E (Switch Views)
• CTRL + B (Cleanup Broken Wires)
• CTRL + U (Auto Redraw the Block Diagram)
A fast Tank-Drive from Remote Control Editor
• Remote Control Editor is a powerful tool to get started with!
Help• Right-click• Context Help (“?”, CTRL + H, Help >> Show Context Help)
• LabVIEW Help (Help >> Search the LabVIEW Help… >> Search: “NXT”)
• PDF Manuals (C:\Program Files\National Instruments\LabVIEW 2009\manuals)
– NXT_Getting_Started– NXT_Advanced_Programming_Guide– FTC_Getting_Started
• LabVIEW for LEGO MINSTORMS NXT (by Michael Gasperi)
• www.ni.com/academic/mindstorms/• https://sites.google.com/site/tuftsceeok12projects/labview-for-lego-support• http://www.tetrixrobotics.com/GettingStartedGuide/intro.htm• http://digital.ni.com/express.nsf/bycode/ftcsoftware• http://www.ni.com/academic/students/learn-labview/
– It has many videos, along with a more “in-depth” read hidden in the “Detailed Explanation” pull-down bar in the center of the page.
– 18 hours of content• http://www.ni.com/pdf/gettingstarted/introduction_to_labview_tutorial.pdf
– A “hands-on” tutorial– 3 hours
Debugging: What is going on?
• Use Probes
– Right click>>tool palette>>probe
– Right click on wire >> insert probe
• Use “Highlight Execution”
File > New… > Virtual Instruments(.vi)
• Templates can help you get started on some advanced ideas very quickly.• Study and learn from them!• Use them if you can…