|
Re: Run Virtual cRIO
Here's what I would do:
Go into each top-level WPIlib VI, move the inputs and outputs far to the outside if possible, and wrap a Conditional Disable Structure around them, case on OS (VxWorks vs WIN) and put simulator code in the WIN case. If WIN, you can have a big global variables file for each type of IO (relay, PWM, DIO, Joystick, etc.) and do stuff. For the Comm loop, you could read a joystick and set the appropriate joystick data, as it is set in the existing comm code (except with USB joysticks on your computer instead). You could also throw in a Wait On Occurrence to the DS Occurrence (what gets passed into Start Comm) so the Robot Mode VI dosen't timeout (and a wait in there too so it runs at the normal speed or so)
__________________
Kettering University - Computer Engineering
Kettering Motorsports
Williams International - Commercial Engines - Controls and Accessories
FRC 33 - The Killer Bees - 2009-2012 Student, 2013-2014 Advisor
VEX IQ 3333 - The Bumble Bees - 2014+ Mentor
"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack
|