ReadEncoders function problem

Questions about using encoders with the Roboclaw product line
paolo.munarini
Posts: 1
Joined: Fri Oct 05, 2018 6:37 am

ReadEncoders function problem

Postby paolo.munarini » Fri Oct 05, 2018 6:40 am

I have a problem with the roboclaw 2x7A. I can read Encoders until i use the SpeedAccelDeccelPositionMX command. After that the ReadEncoders function doesn't return valid values.

I post an example code.

Thanks

Code: Select all

roboclaw.SpeedAccelDeccelPositionM1(address, 10000, 80000, 10000, enc1start, 1);
    delay(200);
    roboclaw.SpeedAccelDeccelPositionM2(address, 10000, 80000, 10000, enc2start, 1);
   
    roboclaw.ReadEncoders(address, enc1, enc2);

User avatar
Basicmicro Support
Posts: 1135
Joined: Thu Feb 26, 2015 9:45 pm

Re: ReadEncoders function problem

Postby Basicmicro Support » Mon Oct 08, 2018 10:28 am

Please provide a complete working example. Just these four lines of code could be affected by everything else in your program.

Also, I recommend reading the return values and printing their information to the monitor window so we have something to work with.


Return to “Velocity and Position Control”

Who is online

Users browsing this forum: No registered users and 2 guests

cron