labview workshop n.
Skip this Video
Loading SlideShow in 5 Seconds..
LabVIEW Workshop PowerPoint Presentation
Download Presentation
LabVIEW Workshop

Loading in 2 Seconds...

play fullscreen
1 / 34

LabVIEW Workshop - PowerPoint PPT Presentation

  • Uploaded on

LabVIEW Workshop . September 26, 2009 Hauppauge High School SPBLI - FIRST. Mark McLeod Advisor Hauppauge Team 358 Northrop Grumman Corp. Agenda. How to Begin LabVIEW Basics FRC Palette How to Do Standard Operations

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
Download Presentation

PowerPoint Slideshow about 'LabVIEW Workshop' - erno

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
labview workshop

LabVIEW Workshop

September 26, 2009

Hauppauge High School


Mark McLeod


Hauppauge Team 358

Northrop Grumman Corp.

  • How to Begin
  • LabVIEW Basics
  • FRC Palette
  • 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
How to Begin
  • Start LabVIEW
  • New -> FRC cRIO Robot Project
    • Name your project
    • Set your cRIO IP address (10.xx.yy.02)
    • Choose “Basic Framework” or “Advanced Framework”


  • Open -> Browse (Existing Project)
default frameworks
Default Frameworks
  • Basic Framework
    • Basic Robot
        • Drive loop
        • Camera loop
        • Periodic loop
    • Autonomous
    • Robot Global
  • Advanced Framework
    • Team Code
      • Vision
      • Autonomous or Autonomous
      • Periodic
      • Robot Global
labview basics
LabVIEW Basics
  • Project Explorer
    • My Computer
    • RT CompactRIO Target
  • What’s Important Here
    • RT CompactRIO Target
    • Build Specifications
    • Basic Robot
    • Autonomous

Basic Framework

rt compactrio target
RT CompactRIO Target
  • 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
Build Specifications
  • Right click on a spec. for “Properties”
    • Source Files
      • Startup VIs: Basic Robot
  • “Run as Startup”
    • Must reboot to take affect

Use to download your program to the robot

temporary debug run
Temporary Debug - Run
  • Run - Used to test & debug
    • must be done from
    • Temporarily executes your code - Gone after a reboot
    • Stop or disconnect halts robot
    • Can disable Downloaded code, so test reboot
edit a program
Edit a Program
  • Double click on “Basic Robot”

This is the “Front Panel”

  • 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

Front Panel

Block Diagram

create your own vis
Create Your Own VIs
  • From existing code
    • Highlight code
    • Edit -> CreateSubVI
  • From scratch (File -< New VI)
  • Extras
    • Change Icon
    • Add terminals (from Front Panel)
  • Different Palettes for Front Panel vs Block
  • Right click in Block Diagram window
  • What’s Important
    • Programming (structures & basic operations)
    • WPI Robotics Library (all robot stuff)
    • FIRST Vision (camera)
  • Help -> Show Context Help
    • Detailed Help
functions palette
Functions Palette

Block Diagram Palette

frc palette overview

Robot Drive




Driver Station




FIRST Vision

Image Management

Intensity Measurement

Particle Analysis

Image Enhancement

Image Conversion

Display Interaction

FRC Palette Overview
basic functional structure
Basic Functional Structure
  • Open
  • Operate: Start/Get/Set, etc.
  • Close
mouse over
Mouse Over

Put cursor over vi icon

To see inputs & outputs

Use Context Help

(Help -> Show Context Help)

naming each I/O

In Context Help click on

“Detailed help”

for detailed explanation of each I/O

  • Right-click vi icon in Block Diagram to get menu
  • “Create”
    • Constant (inputs, e.g., use to select PWM)
    • Control (inputs used for debugging)
    • Indicator (outputs used for debugging)
  • “Cluster, Class & Variant Palette”
    • Unbundle by Name (e.g., get at joystick buttons)
standard functions
Standard Functions
  • Compressor
  • Single
  • Solenoid control
  • Double Solenoid control
  • Relay
  • Teleop Tank Drive
  • (2-joystick)
  • Teleop Arcade Drive
  • (1-joystick)
more motors
More Motors
  • Single Motor
  • Servo control
motor control
Motor Control
  • Limit Acceleration
  • (both speeding up & slowing down)
  • Can be annoying to drivers

SPECIAL CONCEPT: Coerce vi- restrict value +/-

  • Limit Switch
  • (one-way)
more control samples
More Control Samples
  • Joystick Curve
  • (simple cubed)
  • Driver Station Custom Inputs
  • Digital Input (e.g., limit switch)
  • Analog Input (e.g., potentiometer)
button control
Button Control
  • Button Direct:
  • Action occurs continuously while button is held
  • 2 Button system:
  • 1st button = ON
  • 2nd button = OFF
toggle button
Toggle Button


  • Button Action once on Push
timed sequence
Timed Sequence
  • Button Timed Operation
  • 2 methods


Sequence Structure

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

LabVIEW Kills Autonomous at the end of autonomous mode

SPECIAL CONCEPT: Matched Device Open/Close

default autonomous
Default Autonomous

Requires the motors & watchdog to be opened elsewhere

SPECIAL CONCEPT: Global Variables

global variables
Global Variables
  • 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:
    • Joysticks
    • Motors
    • Relays
    • Solenoids
    • Digital & Analog inputs
basic framework global variables
Basic FrameworkGlobal 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”
    • From the Project Explorer window drag “Basic Robot” 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”
  • How to create a new Global vi
    • Project Explorer->New…->Global Variable
advanced framework global variables
Advanced Framework Global Variables
  • Add Open’s to
  • Double-click Open & Copy Device Ref
  • Open “RobotData.ctl”
  • Right-click “RobotData” & Open Type Def
  • Paste new Device Ref & drag into RobotData
  • Wire Open to feed new typedef Bundle
further training
Further Training
  • Examples on LabVIEW startup screen
  • NI FIRST forum:
  • Video Tutorials
Presentation slides at: under Workshops

  • Questions/Help email is the best way to reach me