02-20-2012 09:52 AM
I am trying to open 2 more Jaguar controllers (from PWM 3 and PWM4) aside the ones in the default code (PWM 2 and PWM 1) but when i load the code on the cRIO, only the jaguars connected to PWM 3 and PWM 4 have their lights turn solid. When i remove the code corresponding to the pWM3 and pwm4, i get the pwm 1 and pwm 2 working. Seems it is not possible to have the 4 pwm's running at the same time. any help please.
Here is a snippet of the code in the teleop
02-20-2012 10:04 AM
You had the right idea including a screen shot, however you included too little of the VI to be able to tell what might be wrong. Please include the part of the VI where you actually open all of the motors. Perhaps just attach your VIs.
02-20-2012 10:14 AM
Thanks for the quick answer.
So here are the vi's concerned. I open the jaguars in the begin vi, i control them in teleop and close them in finish.
Thanks.
02-20-2012 01:19 PM
Looking at your Teleop VI, there are problems with the while loop within it:
1. It shouldn't be in Teleop, since Teleop already gets called over and over by the main loop.
2. When you do use a while loop, you should always include timing in it. Your while loop is running full speed which will use 100% of the CPU.
02-20-2012 02:12 PM
So where do you suggest i put this portion of code which is actually in the whilw loop since i need those 4 motors to keep running atthe same time in teleop mode, two for the robot drive and two for the my shooter! Thanks
02-20-2012 02:21 PM
That code can stay in Teleop, you just need to remove the while loop.
02-20-2012 03:11 PM
worked fine. Thank you!