Run Virtual cRIO

I hope this is not a “stupid” question,:)but;
what would happen if one tried to run the cRIO image on a virtual machine (e.g. VMWare)? Would it even work?

Just curious.:o


Not easily, since I don’t think VMWare supports real-time OS’s.

Also, the cRIO is 2 processors: a 400MHz PowerPC CPU (what your code runs on), and an FPGA processor to interface with the modules. Your average emulator won’t do that.

If you’re looking for a way to test code without a cRIO, I think a special version of WPILib designed to run on a regular computer would work. The hardest part would probably be implementing the DS to robot comms protocol. A GUI robot control panel that allows you to set all the sensors and read all the outputs would be nice (labview comes to mind)

Well i guess then we are stuck with the cRIO…

Anyway THANKS for the responses!


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)

Well if your using C++ you could always use the wpi test harness.