TipJar #15 - Simulating and Testing: How to put your FRC code through its paces on YOUR computer.


Updated 2010 FRC Videos Now Online:


This Blog entry is the 11th in a series intended primarily for FIRST Robotics Competition (FRC) teams and their mentors.

In this blog entry, I discuss how to simulate your state machine code. The real benefit here is the opportunity to test your logic on your development PC, without needing a functioning robot.

I discuss:
How to simply modify the previous state machine example for simulation
How to use a global "Simulate" boolean variable to selectively replace all Hardware inputs and outputs with front panel controls and indicators
Using case structures to "case out" WPI library calls
How to watch and debug using execution highlighting, watching the global variables and the front panel
How you must be sure to simulate all sensors, which includes things like turning off simulated limit switches when the system "moves" away from them
How to simulate the manual override mode by writing to the "Command Signal" global just like the TeleOp or Autonomous VIs would

Sample code is listed below.

Please! If you like (or hate) what you saw, please leave a comment by clicking here.

Also, don't forget to check out the rest of the series by clicking on the left side of the page.

Ben Zimmer
-- LV Mastery Team

Trouble viewing these videos? Please click here to install the latest version of flash.

Testimonials

Want to See More?

Already Registered?

Links:
FIRST Robotics Competition Website.

Subscribe:
Follow this link to be notified whenever something new is added to the "Tip Jar".