Encoder Ticks for V5

  1. 2 months ago

    7517H

    Oct 8 Malvern,PA 7517H

    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!

  2. CyberHawks7983

    Oct 8 Event Partner, V5 Beta Tester Bakersfield, CA 7983 (A,J,K,M,R,U,W,Z)

    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

  3. callen

    Oct 8 Braintree, MA, USA
    Edited 2 months ago by callen

    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.

  4. 7517H

    Oct 8 Malvern,PA 7517H

    @callen 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?

  5. callen

    Oct 9 Braintree, MA, USA

    @7517H 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 @CyberHawks7983 quoted ticks/rev from is incorrect.

  6. tomohaha3

    Oct 10 Sacramento, CA 94260A
    Edited 2 months ago by tomohaha3

    @callen It should be, though I don't have it to do a test run and confirm

    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

 

or Sign Up to reply!