NO GEARS, NO GLORY!
  • Home
  • About Us
    • About Us
    • About FIRST
    • Calendar
  • Seasons
    • Robots
    • 2018 - Power Up >
      • State Championship
      • Event Information
      • Duodeviginti
      • 2018 Build Season Pictures
      • 2018 Kettering Photos
      • 2018 Milford Photos
    • 2017 - Steamworks >
      • Event Information
      • Septendecim
      • 2017 - Kettering Photos
      • 2017 Troy Photos
    • 2016 - Stronghold >
      • Event Information
      • Sedecim
      • 2016 Build Photos
      • 2016 Kettering Photos
      • 2016 Marysville Photos
    • 2015 - Recycle Rush >
      • Event Information
      • Quindecim
      • 2015 Build Season Photos
      • 2015 Kettering Photos
      • 2015 Troy Photos
      • 2015 FIM Championship Photos
    • 2014 - Aerial Assist >
      • Quattuordecim
      • 2014 Build Season Photos
      • 2014 Kettering Photos
      • 2014 Waterford Photos
  • Shirts
  • Sponsors
    • 2018 Sponsors
    • 2017 Sponsors
    • 2016 Sponsors
    • 2015 Sponsors
    • 2014 Sponsors
  • Donate
  • Suppliers
  • Resources
    • Team Resources
    • Electrical Resources
    • Programming Resources
    • Team Logos
  • Social Media
  • Contact
  • KHS

FRC Programming Resources

LabVIEW Programming Resources.

Team 358 (2009-2014) LabVIEW Examples!
Team 358 (2015-2019) LabVIEW Examples!

Begin.vi
Open all your motors, controllers an devices here, and create refnum names to uniquely identify each of them. This is called only once at the very start. 
The Framework is setup here in Begin.vi to automatically call the Autonomous Independent.vi at the start of Autonomous Mode and to automatically kill it when Autonomous Mode ends. 
Teleop.vi
Typical driver controls. This is called 50 times per second as the Driver Station control packets arrive. Do NOT write code in here that waits or takes more than a few milliseconds to execute. If this vi takes too long to execute, then your driver controls will respond sluggishly, sporadically, or not at all. That means no While loops, no wait timers, no Watchdog Feed & Delay. 
Normal driver operating code will usually be split between Teleop.vi and Periodic Tasks.vi.  This gets the flow-through actions, such as driving via the joysticks, that don't require delays to give a mechanical mechanism time to complete operation. 
Periodic Tasks.vi gets the complex time-consuming actions that need much time to complete, like a catapult that needs to be released and cocked again as part of a single joystick button press. Anything that makes you want to add a time delay or have to wait for a sensor to tell you it's ready can more easily be done in Periodic Tasks.vi than anywhere else. 
Periodic Tasks.vi
This is called only once, but it is expected that tasks in here will execute within a never ending While loop or a Flat Sequence structure. Typically, you'll have several completely separate loops running in here to do mutually independent stuff. This can be used for timed sequences, for instance, if you have a mechanism that operates in several discrete steps. Like a motor cocking a catapult with a lact that holds it down, then is released with pneumatics and after launch the process is looped.  You can have a completely separate loop just paying attention to one of your joystick buttons and jumping to do what you want whenever that button is pressed. 
Finish.vi
This simply closes all the devices you opened in Begin.vi to clean up when the program exits. 
Oddly enough due to the way we shutdown, i.e., we un-power the robot, this Finish.vi will never be executed. It's presence here is to teach good form that will be important in most normal applications of LabVIEW that students will encounter when using it at college and work. 

Below are some common LabVIEW operations that we have came across and used!  This list is still under heavy construction so check back frequently!

Encoder motor example- Read outs and other variables. 
Begin.vi
Picture

​Finish.vi
Picture
Periodic Tasks.vi
Picture
Front Panel
Picture

Using Encoder as a Limit Switch
Periodic Tasks.vi- Main Loop
Picture
This task allows the motors to stop at a certain encoder readout, similar to that of a limit switch, only less physical properties. Keep in mind that this will only allow motor movement in the opposite direction once a limit is reached: any further movement is from the motors lack of torque or the weight of the object being held. The button for reset is completely optional. Basic wiring and knowledge is required. Creation of global variables is also a required task. The boxes encasing the examples are completely 
Encoder- Setting the Limits
Picture
This is the call for the encoder that tells when the limits are being passed. The '5.178' is the divisor found by moving the motor 180 degrees, then dividing the current output by 180. The '120' and '-120' are the current limits, based on what has already been found with the divisor.

Powered by Create your own unique website with customizable templates.
  • Home
  • About Us
    • About Us
    • About FIRST
    • Calendar
  • Seasons
    • Robots
    • 2018 - Power Up >
      • State Championship
      • Event Information
      • Duodeviginti
      • 2018 Build Season Pictures
      • 2018 Kettering Photos
      • 2018 Milford Photos
    • 2017 - Steamworks >
      • Event Information
      • Septendecim
      • 2017 - Kettering Photos
      • 2017 Troy Photos
    • 2016 - Stronghold >
      • Event Information
      • Sedecim
      • 2016 Build Photos
      • 2016 Kettering Photos
      • 2016 Marysville Photos
    • 2015 - Recycle Rush >
      • Event Information
      • Quindecim
      • 2015 Build Season Photos
      • 2015 Kettering Photos
      • 2015 Troy Photos
      • 2015 FIM Championship Photos
    • 2014 - Aerial Assist >
      • Quattuordecim
      • 2014 Build Season Photos
      • 2014 Kettering Photos
      • 2014 Waterford Photos
  • Shirts
  • Sponsors
    • 2018 Sponsors
    • 2017 Sponsors
    • 2016 Sponsors
    • 2015 Sponsors
    • 2014 Sponsors
  • Donate
  • Suppliers
  • Resources
    • Team Resources
    • Electrical Resources
    • Programming Resources
    • Team Logos
  • Social Media
  • Contact
  • KHS