Quote:
Originally Posted by askeer
I am worried about my code because I cant test it now.
|
Actually you
can test your code - using simulation. I just tried this using Mark McLeod's example code. Here is what I did:
1. I created a new robot project using the default choice:
Arcade Drive Robot - hardware or simulation
2. I removed all the Robot Drive VIs from Begin, Teleop, and Finish (since I will use one of the robot drive motors to test his code).
3. In the project under My Computer I opened Robot Simulation Readme.html to see the actuators on the simulated robot. Notice the Right Motor is connected to PWM 2 of Digital Module 1.
4. I implemented Mark's code except I used PWM 2 instead of PWM 5.
5. In the lower left corner of Robot Main.vi, I right-clicked and chose .../My Computer as the target.
6. When I ran Robot Main.vi the FRC Simulation Viewer opened. I turned on Follow/Zoom and zoomed in for a close-up view of the robot.
7. With the Driver Station running and Teleop Enabled, when I pressed the joystick buttons I could see the robot wheels spinning - one direction or the other depending on which button I pressed.
On the Tutorials tab of the LabVIEW Getting Started Window there is a tutorial where you can learn more about simulation. While you can't simulate everything, it is useful for testing.