Page 1 of 1

ReadEncoders function problem

Posted: Fri Oct 05, 2018 6:40 am
by paolo.munarini
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.


Code: Select all

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

Re: ReadEncoders function problem

Posted: Mon Oct 08, 2018 10:28 am
by Basicmicro Support
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.