From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

FIRST Tech Challenge Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Reset motor encoder block resets to zero through every iteration

I have a program with an infinite loop that prints the current motor position to the screen. However, when I run it, it resets to zero through every iteration.

Does anyone know why this is so?

encoder.JPG

0 Kudos
Message 1 of 2
(4,879 Views)

One of the problems I see is you have no constant set for the power associated with your motor, so it shouldn't move.  This may give you a value of zero and appear that it is resetting.

0 Kudos
Message 2 of 2
(4,054 Views)