View unanswered posts | View active topics It is currently Fri Sep 25, 2020 12:34 am

Reply to topic  [ 2 posts ] 
Absolute Values for Quadrature Encoder Counts 
Author Message

Joined: Wed Mar 06, 2013 1:22 pm
Posts: 3
Post Absolute Values for Quadrature Encoder Counts
I don't know if I am recalling this correctly; but isn't there a way to retreive the counts from the quadrature encoders as absolute values so that both positive and negative counts are shown as positive? I know that when we use the actual robots we can invert the cable connections at the microcontroller so that all forward movements increase the count (count up) and all backward movements decrease the count (count down), falling into negative numbers if they fall below zero. However, this cannot be done physically in RVW because there are no cable connections.

I've searched the Forum and have not been able to come up with a solution.

Thanks in advance for the help.

Mon May 06, 2013 12:04 pm
Site Admin
Site Admin

Joined: Thu May 24, 2012 12:15 pm
Posts: 722
Post Re: Absolute Values for Quadrature Encoder Counts
You should be able to by using the abs() command:


You can find more information on the absolute command (as well as other Math commands used in ROBOTC) on the ROBOTC wiki, found here:

Check out our Blog! And our Facebook page!
Need help? Take a look at our updated help documentation and the ROBOTC Forums.

Tue May 21, 2013 9:59 am
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.