Frc programming with labview
Download
1 / 28

FRC Programming with LabVIEW - PowerPoint PPT Presentation


  • 292 Views
  • Updated On :

FRC Programming with LabVIEW. Jeff Beltramo NHTI-Concord’s Community College FRC Team 1922. Overview. Introduction to LabVIEW FRC Edition of LabVIEW FRC Framework Tricks of the Trade Resources. What is LabVIEW. Graphical Programming Language Data Flow Programming Go with the Flow!

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

PowerPoint Slideshow about 'FRC Programming with LabVIEW' - edith


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
Frc programming with labview l.jpg

FRC Programming with LabVIEW

Jeff Beltramo

NHTI-Concord’s Community College

FRC Team 1922


Overview l.jpg
Overview

  • Introduction to LabVIEW

  • FRC Edition of LabVIEW

  • FRC Framework

  • Tricks of the Trade

  • Resources


What is labview l.jpg
What is LabVIEW

  • Graphical Programming Language

  • Data Flow Programming

    • Go with the Flow!

  • High Level


Labview programs are called vi s l.jpg
LabVIEW programs are called vi’s

  • Each vi is made up of two windows

  • Front Panel

    • User Interface

    • Indicator(output)

    • Controls (Input)

  • Block Diagram

    • “code”

    • Data travels in wires from controls thru functions to indicators

    • Order of execution controlled by data flow


Labview nodes l.jpg
LabVIEW Nodes

  • While Loop

  • For Loop

  • Boolean logic

  • Arrays

  • Math functions

  • Timing

  • File I/O

  • PID Control

  • Signal Processing

  • FRC WPILib


Labview data types l.jpg
LabVIEW Data Types

  • Floating Point

  • Integers

  • Boolean

  • String

  • Arrays


Labview tasks l.jpg
LabVIEW Tasks

  • Loops can operate in parallel

  • Each loop performing a different task at different rates

  • Data flow programming still applies!


Data flow programming quiz l.jpg
Data Flow Programming Quiz

  • Which node executes first?

  • Add

  • Subtract

  • Random Number

  • Divide

  • Sine


Debugging techniques l.jpg
Debugging Techniques

  • Finding Errors

    • Broken arrow indicates coding mistakes

  • Execution Highlighting

    • Data flow is animated and wire values are shown

  • Probe

    • Shows data value as it flows thru a wire


Context help window l.jpg
Context Help Window

  • Help menu>>Show Context Help

    • Hover cursor over object to see help

  • Click thru for Detailed Help


Frc edition of labview l.jpg
FRC Edition of LabVIEW

  • CompactRIO with custom FPGA image

  • FIRST specific vi palettes

  • Custom Getting Started Window

  • Wizards to create robot and dashboard code

  • FRC specific examples


2012 compactrio l.jpg
2012 CompactRIO

  • Available to veteran teams in the Fall of 2011, a bare chassis will cost ~$300, while the chassis with three modules (Analog, Digital, and Solenoid) will cost ~$550. 


Frc programming palettes l.jpg
FRC Programming Palettes

  • WPI Robotics Library

    • Sub-palettes for robot drive, sensors, actuators, I/O, Driver Station, Camera…

  • Vision – tools for managing and manipulating images

  • MS Kinect SDK?






Frc specific tutorials l.jpg
FRC Specific Tutorials

Tutorials

Examples





Frc framework l.jpg
FRC Framework

  • Project Explorer

    • Like a table of contents of the project

    • Group like files

    • Build specifications

    • Deploy VI’s


Frc framework23 l.jpg
FRC Framework

  • Begin VI – Called once at beginning, to open I/O, initialize sensors and any globals, load settings from a file, etc.

  • Autonomous Independent VI – Autonomous code placed here. Called once at startup and terminates on its own.

  • TeleOp – Responds to Joystick input and other critical functions. Called every 20 ms.


Frc framework24 l.jpg
FRC Framework

  • Periodic Task VI – Non-critical functions placed here. Can have multiple loops. Called at startup and runs continuously.

  • Finish VI - Closes all I/O references and save collected data. Called once at end of program.

  • Robot Global Data VI – Repository of defined global variables.


Labview tips and tricks l.jpg
LabVIEW Tips and Tricks

  • LabVIEW is Polymorphic

  • Race conditions

  • Shift when copying or moving

  • Ctrl drag mouse to make space

  • Edit»Create SubVI

  • Right-click terminal»Create

  • Edit»Make Current Values Default


Labview shortcuts and tools l.jpg
LabVIEW Shortcuts and Tools

  • Ctrl-R: Run the VI

  • Ctrl-E: Swap between front panel and block diagram

  • Ctrl-H: Turn on context help

  • Ctrl-B: Remove broken wires

  • Ctrl-u: Clean up wires

  • Ctrl-Z: Undo

  • View»Navigation Window or Ctrl-Shift-N

  • Tools»CompactRIO Imaging Tool…

  • Tools»Setup Axis Camera

  • Tools»Options


Resources l.jpg
Resources

  • www.ni.com/first

  • www.frcmastery.com/

  • www.chiefdelphi.com

    • Technical>Programming>NI LabVIEW

  • forums.usfirst.org

  • team358.org

  • thinktank.wpi.edu/Portal


Wrap it up l.jpg
Wrap it Up!

Questions?

jbeltramo@ccsnh.edu