Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Technical Discussion (http://www.chiefdelphi.com/forums/forumdisplay.php?f=22)
-   -   Run Virtual cRIO (http://www.chiefdelphi.com/forums/showthread.php?t=85334)

masoug 18-04-2010 15:41

Run Virtual cRIO
 
Hi,
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

-Masoug

carrizzle451 18-04-2010 16:01

Re: Run Virtual cRIO
 
Not easily, since I don't think VMWare supports real-time OS's.

Radical Pi 18-04-2010 16:07

Re: Run Virtual cRIO
 
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)

masoug 18-04-2010 16:15

Re: Run Virtual cRIO
 
Well i guess then we are stuck with the cRIO...

Anyway THANKS for the responses!

-Masoug

apalrd 18-04-2010 23:31

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)

JamJam263 18-04-2010 23:44

Re: Run Virtual cRIO
 
Well if your using C++ you could always use the wpi test harness. http://firstforge.wpi.edu/sf/project...b_test_harness


All times are GMT -5. The time now is 13:00.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi