FIRST Robotics Competition Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

CRIO Emulator

I was curious if any one knew of any existing CRIO emulators. So that I could test code with out a crio.

0 Kudos
Message 1 of 4
(6,000 Views)

This might not exactly answer your question, but there's no need for a cRIO emulator since LabVIEW code will run equally well on your computer.  The problem is that you won't have the IO that the cRIO provides, nor the libraries that NI provides specifically for FIRST on the cRIO.  To test your code on a computer what you would need to do is write VIs that simulate the IO.  How much code are you trying to run?  Simulating the entire robot would be difficult, but if you're just trying to see if some calculations output the right value (for example) then it's trivial.

You'll notice that in the project explorer there are two targets listed: your cRIO target, and "My Computer."  When you run a VI that's listed under "My Computer" it runs on your computer.  You can add your code to "My Computer" in addition to having it under the cRIO target so that you can test your VIs locally.  Also, you'll notice in the lower left corner of LabVIEW windows (next to the scrollbar), LabVIEW tells you where it's going to run that VI, and you can change it temporarily by clicking on that target information.

You can go a step further by enabling or disabling code depending on which target your code is running on; I think you can find examples in the help for conditional disable structures.

0 Kudos
Message 2 of 4
(3,037 Views)

Well just for calculations I already have done something similar to what you described and I am using C++. I was mainly wondering if there is an existing emulator since I was thinking having a 3D simulator based of CAD drawings and take out puts from the emulator and have the 3D models respond from those outputs and send inputs based off a physics engine and collisions, sensors, and what ever else is needed as inputs to the emulator which would allowing for complete code testing and driving practice with a close parallel to reality allowing different designs to be tested quickly as well as code for certain bots of the robot before it is made. Plus it would be a little nicer than just hooking motors and solenoids other devices all over table to the CRIO. Other wise I am might have to write a CRIO emulator my self.

0 Kudos
Message 3 of 4
(3,037 Views)

I guess not.

0 Kudos
Message 4 of 4
(3,037 Views)