|
Re: Simulated Robot?
As you might expect, there are many levels at which you can simulate.
If you are wanting to run your VI and see if the basic logic is correct, you can do that sort of thing pretty easily at the subVI level. If you want WPILib to work, even just the joysticks, that is not something that is available ... yet. It would be cool though.
To test a subVI, you can go to the bottom left of a window, right click on the target string next to the scrollbar, and choose to execute on the My Computer target instead. This should open a duplicate of the VI that will run locally. For simple subVIs, you can then type in numbers, run, and view the outputs. You can set breakpoints, single step, execution hilight, etc. More complicated VIs may be broken due to missing VIs, which you can disable and insert your own constants or calculated values instead. This will not simulate the entire robot, but will let you run leaf level code.
You can take this a bit further by dragging your code in the project window up to the My Computer target. Again, the WPILib and other components aren't implemented for the PC, so you will have breakage or empty values returned, but it is useful for some things. Don't forget to drag the VIs back to the cRIO target, and be sure not to confuse anyone by leaving them in both places.
Greg McKaskle
|