1 / 10

Mechanics of Wind River Workshop

Mechanics of Wind River Workshop . January 10, 2009 Farmingdale State College SPBLI - FIRST. Mark McLeod Advisor Hauppauge Team 358 Northrop Grumman Corp. Mark.McLeod@ngc.com. Agenda. Setup the Environment Starting a Project Default Frameworks Downloading

karena
Download Presentation

Mechanics of Wind River Workshop

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Mechanics of Wind River Workshop January 10, 2009 Farmingdale State College SPBLI - FIRST Mark McLeod Advisor Hauppauge Team 358 Northrop Grumman Corp. Mark.McLeod@ngc.com

  2. Agenda • Setup the Environment • Starting a Project • Default Frameworks • Downloading • Control System Session Download & Test

  3. Setup the Environment • Setup the environment • C Programming Guide for FRC (C:\WindRiver\docs\extensions\FRC) • New Connection • Create a Project • Easier to start with these and get all the right options preset for you • SimpleRobotTemplate • IterativeRobotTemplate

  4. Starting a Project • New • Example • VxWorks Downloadable Kernal Module Sample Project • FRC Default Program (Original factory image) • FRC Default Program (Current with imaging tool) • Other FRC-specific examples • Other generic Wind River examples

  5. Default Frameworks • Simple Robot • Iterative Robot (not released yet) Code subdivided by modes (Init & Periodic) : • Disabled • Autonomous • Teleop

  6. Basic C Program void Autonomous(void) { SetWatchdogEnabled(false); Drive(0.5, 0.0); Wait(2000); Drive(0.0, 0.0); } void OperatorControl(void) { SetWatchdogEnabled(true); while (IsOperatorControl()) { WatchdogFeed(); ArcadeDrive(JOYSTICK_PORT); } } START_ROBOT_CLASS(SimpleCRobot); #include "WPILib.h" #include "SimpleCRobot.h" #include "CRobotDrive.h" static const UINT32 LEFT_MOTOR_PORT = 1; static const UINT32 RIGHT_MOTOR_PORT = 2; static const UINT32 JOYSTICK_PORT = 1; void Initialize(void) { CreateRobotDrive(LEFT_MOTOR_PORT, RIGHT_MOTOR_PORT); SetWatchdogExpiration(100); }

  7. Downloading vs. Debug • Download as a stand-alone application • Must reboot cRIO after Downloading for new code to take effect • Debug for temporary testing. It won’t last through rebooting • Sometimes rebooting is required to cleanup leftover extraneous code • Alternatively cleanup by deleting your cRIO .out task from Remote Systems window

  8. Notes • Set the cRIO as a Wind River environment • Development is still underway, so expect the process and behavior to change somewhat • Installing only Wind River still requires some LabVIEW components to work • Printf - Right click the cRIO in the remote systems tab on the left, and in target tools, click on target console to view your printf statements.

  9. Where to Find Further Information • C Programming Guide for FRC C:\WindRiver\docs\extensions\FRC • WPI Robotics Library Documentation http://users.wpi.edu/~bamiller/WPIRoboticsLibrary/ • Download WPILib Documentation: http://first.wpi.edu/Images/CMS/First/CProgrammingReference.chm Note: after download, right click on file for Properties & unblock to use • WPI Training Videos: http://first.wpi.edu/FRC/contro876.html • http://first.wpi.edu/Images/CMS/First/Tips_and_Tricks.pdf

  10. Presentation slides at: Team358.org • Questions/Help please email Mark.McLeod@ngc.com

More Related