Hi I’m current part of a rookie team and I can’t seem to add a motor to our control. I started from the original code and just added everything below. I’m using a victor but I cant seem to make the motor run.http://i174.photobucket.com/albums/w81/Luiz12_2007/MESA%20Shirt/Slide1.png
Your code snippets look good on their own. You mentioned that you added this to the default code. The default code already uses PWM 1 for the robot drive. Using it for your separate motor would cause a conflict. Have you tried it on a different PWM channel?
Another potential problem (to quote Alan Anderson) “Correctly plugging a PWM cable into a Victor is maddeningly difficult to do, and nearly impossible to tell when you’ve failed without trying to control it. It sometimes seems to me that consistently getting it right takes years of experience and practice.”
Have you reworked your DB 137 Cable? Have you gotten a robot to actually drive?
In your code it sort of looks like there is an extra space at the end of “Ball Motor” in the begin vi. This will cause a problem. Every variable has to be exactly the same in all 3 vi including spaces. This problem has got us a few times especially with our new programmers. We have spent several hours sometimes troubleshooting all the hardware when in reality when we changed the variables to a different name the problem went away.
Good eye… I would suspect that to be the problem too.
I echo what arizonafoxx stated, but add another possible scenario. At the beginning of the season, we flashed our laptop with the 2012 version of the software. However, the 3 updates made available after kickoff were NOT applied. These included updates for Labview, Utilities and the Driver Station. The students used this computer to flash the cRIO, build, and deploy the default code. The default code was edited slightly to include a 4 motor drive system and Arcade drive. Result? The robot ran with no problems!
However, when we tried to add a motor just as you claim, then nothing would work! Not even the drive motors. Weird stuff.
But, installing the 3 updates to the computer, re-imaging the cRIO, and re-compiling the code fixed the failure we encountered and all is well now.