02-13-2015 07:45 PM
Hi,
Any help on this would be great. We have a simple motor (not sure exactly the type) that goes in one direction when connected with one polarity to a battery, and the other direction when connected with the reverse polarity. We are trying to program our Teleop.vi so that when we push one of the buttons on a joystick, the motor goes in one direction, and when we push another button, it goes in the reverse direction.
Right now we have code so that it does go in one direction (the direction corresponding to the "positive" polarity), but when pushing the button to go in the opposite direction, it moves but "stutters". In the positive direction, the lights on the Talon SR are green, but in the opposite direction, they turn orange.
I've attached a copy of the code below. Any help would be fantastic and much appreciated!
02-16-2015 03:54 PM
donnaw,
Are you getting a solid orange light, or a blinking orange light? Page 6 of the Talon SR manual here specifies the meaning of each. A solid orange light indicates that the throttle is within 4% of the deadband, which might be part of the problem.
I would also highly recommend combining those case structures. As it currently stands, both cases could be executed at the same time, which would potentially produce that stuttering effect.