|Motors acting without input
|Page 1 of 1|
|Author:||technowiz101 [ Fri Mar 16, 2012 5:52 pm ]|
|Post subject:||Motors acting without input|
Hello. Our team has been attempting to develop a program that will allow us to precisely move a motor to a certain angle. We have written the following code. The goal of the program is to have a teleop program where we can hit the up button on the d-pad(Position # 0) and the motor will move from its current position(which will always be relatively the same) to another predetermined position.
The issue we have encountered is that after we have compiled the program and try to run it the motor moves without input or commands. After we hit the Teleop Ready radio button the ArmLift motor applies full power to the motor without the program telling it to do so. This is normal for all of our programs (which is a completly different issue). Normally once we click the Teleop Running radio button the robot behaves normally. However, with these three lines of code for the encoder included the motor continues to run at power despite Teleop Running being enabled.
Other programs written work perfectly so we do not believe this to be a hardware issue. We have narrowed down the problem to be the lines of code directing the motor based on encoder position. If these lines are removed the program operates normally.
The program appears to be executing the code related to the encoders out of order and without obeying any logic. We would greatly appreciate any help you could offer as we have a competition tomorrow.
Thank you in advance,
|Page 1 of 1||All times are UTC - 5 hours [ DST ]|
|Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group