FIRST Tech Challenge Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Encoders

I am trying to use an encoder on an articulated maniuplator. My program works great when running straight throug Labview. But when I try to run my teleop program on the FCS, it bypasses my encoder and runs the rest of the program and then stops. I am basically trying to get my articulated arm to rotate to a certain point and stop so my driver only needs to push a button. The arm should stop at a desired position with one push of the button. It would be nice to be able to use the encoder for autonomous mode also. Thank you.

0 Kudos
Message 1 of 5
(6,815 Views)

Can you run the Teleop code at all on the FCS?  Do the joystick(s) work in Teleop?

I am concerned about about: "runs the rest of the program and then stops".  Can we confirm that Teleop works correctly and then build from there?

Ryan C.
Applications Engineer
National Instruments
Message 2 of 5
(5,675 Views)

The teleop program runs. I can continue to drive the robot in teleop. But it is like the portion of the program with the encoder (the arm should go up with one push of the button and stop in a certain position) is being bypassed. The arm doesn't even move. When I run the code through Labview it works fine. When I connect to the FCS it bypasses the encoder, but the robot continues to drive. Thank you so much for your response!

0 Kudos
Message 3 of 5
(5,675 Views)

The teleop program runs. I can continue to drive the robot in teleop. But it is like the portion of the program with the encoder (the arm should go up with one push of the button and stop in a certain position) is being bypassed. The arm doesn't even move. When I run the code through Labview it works fine. When I connect to the FCS it bypasses the encoder, but the robot continues to drive. Thank you so much for your response!

0 Kudos
Message 4 of 5
(5,675 Views)

Hi jlp500green,

The problem is either that the code is not getting run, or that the code is running but not behaving as expected. It would be a good first step to determine which is the case.

To clarify, this is a problem in which your teleop program fails to move a motor, not a servo? Is the code to move the motor in a separate loop driven by an NXT flag? If you put a Play Tone VI after the Move Motors VI, do you get to the Play Tone when running on the FCS?

If the code is being run but not behaving as expected, you could debug it by displaying the encoder value on the NXT screen. It may be the case that you have a Stop Motors VI somewhere in your code which is stopping the motor before it reaches its target encoder value. Otherwise we need to determine why the code isn't being run.

If you want to put up your code here or private message it to me I'd be happy to look at it and see if anything is glaring out at me.

0 Kudos
Message 5 of 5
(5,675 Views)