View unanswered posts | View active topics It is currently Fri Oct 31, 2014 9:51 am






Reply to topic  [ 4 posts ] 
vex quadrature optical shaft encoders for cortex 
Author Message
Rookie

Joined: Sat Feb 11, 2012 12:01 pm
Posts: 2
Post vex quadrature optical shaft encoders for cortex
(This is for VEX.) When I try to see the value for the quadrature shaft encoders, the values skip from 23 to 3000, sometimes going into the negatives. So I think it might be how I plugged the wires into the cortex since I sort of guessed the placement. I plugged all 4 wires for the 2 shaft encoders into the digital ports then the analog ports but that didn't work. I looked at this: http://www.robotc.net/vex_full/referenc ... rature.pdf
which shows a vex PIC microcontroller V0.5 but I use a vex cortex microcontroller so I'm not exactly sure where to place all the wires.


Sat Feb 11, 2012 12:43 pm
Profile
Rookie

Joined: Sun Nov 20, 2011 12:06 pm
Posts: 14
Post Re: vex quadrature optical shaft encoders for cortex
I assume you are using robotc. If so, here are the steps i use:
1) Plug encoder into 2 consecutive digital ports (say dgtl1, dgtl2).
2) In robotc, robot->motor and sensor setup, under digital sensors, choose dgtl1 and select quadrature encoder. Robotc will automatically show dgtl2 as Quad Encoder 2nd port.
3) Write your test program. (use the examples that come with robotc as a guide)
4) Run the test program. You can see the encoder values in the debug window.
5) Turn the encoder shaft. The encoder value should increase in one direction and decrease in other (even going negative).


Sun Feb 12, 2012 8:37 am
Profile
Site Admin
Site Admin

Joined: Tue May 15, 2007 9:02 am
Posts: 405
Post Re: vex quadrature optical shaft encoders for cortex
If you check out the VEX Cortex Video Trainer: http://www.education.rec.ri.cmu.edu/products/teaching_robotc_cortex/index.html and go to the Movement > Shaft Encoders section, you'll find some pretty good tutorials on using the encoders with the Cortex.

Also, if you check out the Setup > Build section, we have several sets of building instructions that show where to plug in the encoders. The two wires for shaft encoders must always get plugged in on neighboring digital ports (1&2, 2&3, ect).

_________________
Jesse Flot
CMU Robotics Academy
ROBOTC Support


Mon Feb 13, 2012 6:11 pm
Profile
Rookie

Joined: Sat Feb 11, 2012 12:01 pm
Posts: 2
Post Re: vex quadrature optical shaft encoders for cortex
Okay, thank you for replying so quickly, and the instructions helped


Wed Feb 15, 2012 3:47 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


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.