LabVIEW Workshop September 26, 2009 Hauppauge High School SPBLI - FIRST Mark McLeod Advisor Hauppauge Team 358 Northrop Grumman Corp.

Slides:



Advertisements
Similar presentations
Teacher/Mentor Institute Using the Cortex Chuck Powell.
Advertisements

Apple Pi Robotics Logic System and Programming Basics 1 1.
US First Robotics Lab View Tutorials Jim Thomas Lawrence Berkeley National Laboratory Team 496 Port Jeff Powerhouse.
Robot Code MVRT 2010 – 2011 Season. Robot code controls the robot Robot Main.vi –Calls all the smaller SubVis Rules of programming the robot –Be careful.
LabVIEW is a graphical programming development environment for data acquisition and control, data analysis, and data presentation. With LabVIEW you can.
Session Objectives: Review basic math for single swerve module
Add and Use a Sensor & Autonomous For FIRST Robotics
Jeff Beltramo NHTI-Concord’s Community College FRC Team 1922.
1. 2 LabVIEW for FRC Doug Norman National Instruments January 6, 2012.
1. 2 FRC 2010 Driver Station Doug Norman & Stephanie Brierty National Instruments January 8, 2010 Thanks to Joe Ross – Team 330.
Programming and Electronics Training
De la Rosa-Pohl ECE 1100 Introduction to Engineering Intro to LabVIEW: Programming for Symon University of Houston Diana de la Rosa-Pohl Len Trombetta.
Introduction to LabVIEW 8.5
FRC LabVIEW Software Overview Joe Hershberger Staff Software Engineer National Instruments.
CS320n –Visual Programming LabVIEW Foundations. Visual ProgrammingLabVIEW Foundations2 What We Will Do Today Hand back and review the midterm Look at.
PC Applications Course LabVIEW: Laboratory Virtual Instrument Engineering Workbench Graphical Programming Easy to use Faster Development Time.
How to Use This Training Deck
Virtual Instrumentation With LabVIEW
Lecture 13LabVIEW and GPIB LabVIEW (National Instruments) –Graphical program language –Widely used in academia (lab) and industry (R&D) General Purpose.
Infinity-project.org Engineering education for today’s classroom The Infinity Project SM LabVIEW for The Infinity Project.
Driver Station MVRT 2009 – 2010 Season. Add information Breadboard Classmate PC USB Hub Joysticks Stop Button.
V1: HMFR, V2: MFNB, 2007 LabView Seminar University of Puerto Rico Mayagüez Campus.
US First Kickoff 2012 Software Programming (And Control System) Daniel Kohn University of Memphis.
Virtual Instrumentation With LabVIEW. Section I LabVIEW terms Components of a LabVIEW application LabVIEW programming tools Creating an application in.
Tips and Tricks to Speed LabVIEW Development Useful Nuggets to Save You Time ni.com/labviewzone.
Design of Bio-Medical Virtual Instrumentation Tutorial 1.
Common Rookie Blunders Kelvin Lin Team 4001 Programmer Yoan Holder Team 4001 Electrician.
LabView Basics The Fighting Pi Controls Group. About LabView LabView is a highly adaptable programming GUI (Graphic User Interface) LabView compiles the.
Virtual Instrumentation With LabVIEW. Course Goals Understand the components of a Virtual Instrument Introduce LabVIEW and common LabVIEW functions Create.
Virtual Instrumentation With LabVIEW. Front Panel Controls = Inputs Indicators = Outputs LabVIEW Programs Are Called Virtual Instruments (VIs) Block Diagram.
LabVIEW an Introduction
Introduction to LabVIEW
Biomedical Measurements & Analysis using LabVIEW
Each VI has 2 Windows Front Panel User Interface (UI) –Controls = Inputs –Indicators = Outputs Block Diagram Graphical Code –Data travels on wires from.
The New FTC Platform (Connecting your legacy hardware)
2009 FRC Control System Software Overview Dave Doerr, Mentor, Team 67 November 15, 2008.
Teacher/Mentor Institute Using easyC Joel Kirkland July 30-31, 2015.
LabVIEW in 3 Hours. What is Test & Measurement? Keypad Functionality Keypad Functionality LCD Testing LCD Testing Sound Quality Sound Quality Acoustic.
FRC Robot Framework Labview Made Easy (er) For FIRST Robotics 1.
Beginner Programming Workshop Simona Doboli Assistant Professor Computer Science Department Hosftra University November.
1. 2 LabVIEW Intro, Basics, Tips, Tricks Doug Norman & Stephanie Brierty National Instruments January 8, 2010.
EasyC Programming Workshop January 30, 2008 Hauppauge High School SPBLI - FIRST Mark McLeod Advisor Hauppauge Team 358 Northrop Grumman Corp.
Creating, Editing, & Debugging a VI A.How to Create VIs B.How to Edit VIs C.How to Debug VIs You Will Learn:
Floyd, Digital Fundamentals, 10 th ed EET 2259 Unit 3 Editing and Debugging VIs  Read Bishop, Chapter 3.  Lab #3 and Homework #3 due next week.  Quiz.
2010 LabVIEW Beginner Workshop October 9, 2010 Hauppauge High School SPBLI – LI FIRST Mark McLeod Hauppauge Team 358 Northrop Grumman Corp.
1. 2 FRC 2010 Robot and Dashboard Projects Doug Norman & Stephanie Brierty National Instruments January 8, 2010.
Mechanics of LabVIEW Workshop January 10, 2009 Farmingdale State College SPBLI - FIRST Mark McLeod Advisor Hauppauge Team 358 Northrop Grumman Corp.
Part II Introduction to Robot Code. How to open a new FRC robot project 1.Open LabVIEW. 2.Click "FRC cRIO Robot Project" in the upper left section "New".
FRC Robot Programming 1.PID Continued 2.Downloading and Deploying Code 3.Program a 2012 Robot from Spec Basic code For FIRST Robotics.
Digital Electronics and Computer Interfacing Tim Mewes 4. LabVIEW - Advanced.
Introduction to LabVIEW 8.5
Lab 1 : Introduction to LabView 1 Southern Methodist University Bryan Rodriguez.
Part III Robot Drive. Robot Main.vi The main body of your code: accesses all of the other programs in your project A big loop! Do not add any more loops.
Virtual Instrumentation With LabVIEW. Front Panel Controls = Inputs Indicators = Outputs Block Diagram Accompanying “program” for front panel Components.
CS320n –Visual Programming More LabVIEW Foundations.
Understanding The 2008 FRC Robot Controller Chris Gregory FRC1089 – Team Mercury
Session 11 Intro to FRC API.
Teacher/Mentor Institute Using easyC David Dominguez June 2, 2015 Update Version.
Digital Electronics and Computer Interfacing Tim Mewes 2. LabVIEW Basics part II.
Introduction to Labview Dawgma Team 1712 Bob Bellini, Paul Gehman.
MEH108 - Intro. To Engineering Applications KOU Electronics and Communications Engineering.
VAFIRST LabVIEW Workshop 11/19/11 Presenters: Marin Kobin & Patrick Foley.
Creating Flexible, Script-Controlled Autonomous Software Example Explanation.
Wednesday NI Vision Sessions
Get your software working before putting it on the robot! Example Explanation.
Introduction to Labview
Introduction to LabVIEW
2010 LabVIEW Intermediate Workshop
Note: before starting launch LabVIEW and the Example Finder, and do a palette search to have everything loaded and ready to go. IMPORTANT: Students will.
Introduction to Programing the Cortex for BEST
Presentation transcript:

LabVIEW Workshop September 26, 2009 Hauppauge High School SPBLI - FIRST Mark McLeod Advisor Hauppauge Team 358 Northrop Grumman Corp.

Agenda How to Begin How to Begin LabVIEW Basics LabVIEW Basics FRC Palette FRC Palette How to Do Standard Operations How to Do Standard Operations Note: These slides approximate the material covered at a hands- on workshop where this work was all done in a live LabVIEW session.

How to Begin Start LabVIEW Start LabVIEW New -> FRC cRIO Robot Project New -> FRC cRIO Robot Project –Name your project –Set your cRIO IP address (10.xx.yy.02) –Choose “Basic Framework” or “Advanced Framework” or Open -> Browse (Existing Project) Open -> Browse (Existing Project)

Default Frameworks Basic Framework Basic Framework –Basic Robot Main.vi –Drive loop –Camera loop –Periodic loop –Autonomous Independent.vi –Robot Global Data.vi Advanced Framework Advanced Framework –Team Code Begin.vi Begin.vi Teleop.vi Teleop.vi Vision Processing.vi Vision Processing.vi Autonomous Iterative.vi or Autonomous Independent.vi Autonomous Iterative.vi or Autonomous Independent.vi Periodic Tasks.vi Periodic Tasks.vi Robot Global Data.vi Robot Global Data.vi

LabVIEW Basics Project Explorer Project Explorer –My Computer –RT CompactRIO Target What’s Important Here What’s Important Here –RT CompactRIO Target –Build Specifications –Basic Robot Main.vi –Autonomous Independent.vi Basic Framework

RT CompactRIO Target Right click –> “Properties” Right click –> “Properties” –General – IP Address 10.xx.yy.02 Only need this if IP address wasn’t set correctly when the project was created

Build Specifications Right click on a spec. for “Properties” Right click on a spec. for “Properties” –Source Files Startup VIs: Basic Robot Main.vi Startup VIs: Basic Robot Main.vi “Run as Startup” “Run as Startup” –Must reboot to take affect Use to download your program to the robot

Temporary Debug - Run Run - Used to test & debug Run - Used to test & debug –must be done from RobotMain.vi –Temporarily executes your code - Gone after a reboot –Stop or disconnect halts robot –Can disable Downloaded code, so test reboot

Edit a Program Double click on “Basic Robot Main.vi” Double click on “Basic Robot Main.vi” This is the “Front Panel” Click on Window -> “Show Block Diagram” Click on Window -> “Show Block Diagram” The Block Diagram is where you do most of your programming

Front Panel/Block Diagram Front Panel Block Diagram

Create Your Own VIs From existing code From existing code –Highlight code –Edit -> CreateSubVI From scratch (File -< New VI) From scratch (File -< New VI) Extras Extras –Change Icon –Add terminals (from Front Panel)

Palettes Different Palettes for Front Panel vs Block Different Palettes for Front Panel vs Block Right click in Block Diagram window Right click in Block Diagram window What’s Important What’s Important –Programming (structures & basic operations) –WPI Robotics Library (all robot stuff) –FIRST Vision (camera) Help -> Show Context Help Help -> Show Context Help –Detailed Help

Functions Palette Block Diagram Palette

FRC Palette Overview WPILib WPILib –Robot Drive –Sensors –Actuators –I/O –Driver Station –Camera –Communications –Utilities FIRST Vision FIRST Vision –Image Management –Intensity Measurement –Particle Analysis –Image Enhancement –Image Conversion –Display Interaction

Basic Functional Structure Open Open Operate: Start/Get/Set, etc. Operate: Start/Get/Set, etc. Close Close

Mouse Over Use Context Help (Help -> Show Context Help) naming each I/O Put cursor over vi icon To see inputs & outputs In Context Help click on “Detailed help” for detailed explanation of each I/O

Wiring Right-click vi icon in Block Diagram to get menu Right-click vi icon in Block Diagram to get menu “Create” “Create” –Constant (inputs, e.g., use to select PWM) –Control (inputs used for debugging) –Indicator (outputs used for debugging) “Cluster, Class & Variant Palette” “Cluster, Class & Variant Palette” –Unbundle by Name (e.g., get at joystick buttons)

Standard Functions Single Solenoid control Compressor Relay Double Solenoid control

Drives Teleop Tank Drive (2-joystick) Teleop Arcade Drive (1-joystick)

More Motors Single Motor Servo control

Motor Control Limit Acceleration (both speeding up & slowing down) Can be annoying to drivers Limit Switch (one-way) SPECIAL CONCEPT: Coerce vi- restrict value +/-

More Control Samples Joystick Curve (simple cubed)

Miscellaneous Driver Station Custom Inputs Analog Input (e.g., potentiometer) Digital Input (e.g., limit switch)

Button Control Button Direct: Action occurs continuously while button is held 2 Button system: 1 st button = ON 2 nd button = OFF

Toggle Button Button Action once on Push SPECIAL CONCEPT: Feedback Node

Timed Sequence Button Timed Operation 2 methods SPECIAL CONCEPT: Sequence Structure

Sensors Encoder Requires extra step converting Digital Input to a Digital Source Gyroscope

Autonomous LabVIEW Kills Autonomous Independent.vi at the end of autonomous mode SPECIAL CONCEPT: Matched Device Open/Close

Default Autonomous Requires the motors & watchdog to be opened elsewhere SPECIAL CONCEPT: Global Variables

Global Variables Use to open devices in one vi and use in other places Use to open devices in one vi and use in other places –Primary example is using your drive motors in both Autonomous & TeleOp Devices anything you Open including: Devices anything you Open including: –Joysticks –Motors –Relays –Solenoids –Digital & Analog inputs

Basic Framework Global Variables Open devices in one place and pass them around to other vi’s using Globals –Start with an “Open” –Double-click “Open” –Copy Device Reference –Paste into “Basic Robot Global.vi” –From the Project Explorer window drag “Basic Robot Global.vi” onto the Block Diagram window next to the “Open” & Select the new Device Reference in the icon you get. (You can also copy/paste an existing icon. –Wire the “Open” Device output to the icon for “Basic Robot Global.vi” How to create a new Global vi How to create a new Global vi –Project Explorer->New…->Global Variable

Advanced Framework Global Variables Add Open’s to Begin.vi Add Open’s to Begin.vi Double-click Open & Copy Device Ref Double-click Open & Copy Device Ref Open “RobotData.ctl” Open “RobotData.ctl” Right-click “RobotData” & Open Type Def Right-click “RobotData” & Open Type Def Paste new Device Ref & drag into RobotData Paste new Device Ref & drag into RobotData Wire Open to feed new typedef Bundle Wire Open to feed new typedef Bundle

Further Training Examples on LabVIEW startup screen Examples on LabVIEW startup screen NI FIRST forum: first NI FIRST forum: first first first Video Tutorials Video Tutorials – – – –

Presentation slides at: Presentation slides at: Team358.org Team358.org under Workshops Questions/Help is the best way to reach me Questions/Help is the best way to reach