I was just wondering before I start doing some autonomous programming, does anyone know how many ticks one rotation of a 200 rpm V5 motor is. I am aware that the V5 motors have their own built-in “encoders”, but I would still like to know this as I am more familiar with the shaft encoders. If nobody knows, what would be an accurate way of testing it? Thanks in advance!
From the motor product page:
1800 ticks/rev with 36:1 gears
900 ticks/rev with 18:1 gears
300 ticks/rev with 6:1 gears
Are you in VCS? Look at sensing, and motors within that. You should see Motor.rotation and there are three rotationUnits available:
deg A rotation unit that is measured in degrees.
rev A rotation unit that is measured in revolutions.
raw A rotation unit that is measured in raw data form.
You can extract multiple values at multiple points and know for sure what the comparison it spits out is for any motor.
So is the raw data form of encoder output basically ticks?
It should be, though I don’t have it to do a test run and confirm. In robot-config.h, whether hidden and done by dragging and dropping the motor picture or done by hand in VEX C++ Pro, you set what gear ratio the motor has (see gearSetting). That tells the program how to change from raw to deg or rev, just multiplying the ticks appropriately.
The quick way to confirm everything for yourself, regardless of what any documentation says, is to start the robot somewhere, get both (or all three if you want to check deg, too) initial values and store them (or zero it), get the same final values after driving some significant distance and stopping, and output those values for you to see. But I doubt the product page @physics_smith quoted ticks/rev from is incorrect.
I’m wondering if it is possible to set values for the encoders.
For example, let’s say I wanted to reset the tick values on the encoders.
Do you suppose Vex C++ will let us set it to 0?
Edit
Nevermind, I found it here within a few minutes
http://help.vexcodingstudio.com/#pro/namespacevex/classvex_1_1motor/setRotation