Quote:
Originally Posted by jlester
We downloaded the encoder updates and the sample program for Labview and are having problems. Whatever value we put in for the target encoder value, the motors run for about 10 seconds and then shut off.
|
The 10 second timeout is in the LV code that's waiting for the encoders to reach their target position. It's clear that this is not hapenning, so the NXT shuts the Motors off after 10 seconds.
Some possible reasons:
1) The encoders are not wired/plugged in correctly. Verify this by unplugging them altogether, the same will probably happen. Check the following:
2) Check that the Encoder cable is plugged into the motor controller correctly (Yellow wire to the outside edge)
3) The left and right motors/encoders are swapped.
Simplify this by ONLY driving one wheel (eg A) and verifying that the Wires from Motor 1's encoder are going back to Encoder Input 1 on the motor controller.
4) Your motor polarity is reversed.. Check that the Red wire is hooked to the Motor terminal with the + engraved on the rear of the motor. (Simply setting the "Reverse" input on the motor.VI DOES NOT correct this problem).
Once you have the encoders reading (A and B correctly), use the Reverse input (to flip one motor) to make both motors run forward when you give a positive position to the Specify Position VI.
Note: the "Encoder Example" on the CMU site is incorrect. The Constant Speed VI and the Specify Position VI's are independant. You can use one or the other. Setting a constant speed prior to the Specify Position will have no effect. You must use the "Power" input on Specify Position to change the speed at which it obtains that position. Just a head's up.
Phil.