Command 65 (Buffered Drive M1 with signed Speed, Accel, Deccel and Position) always moves to 0

Questions about using encoders with the Roboclaw product line
Post Reply
cjr
Posts: 11
Joined: Fri Mar 01, 2019 3:13 am
Command 65 (Buffered Drive M1 with signed Speed, Accel, Deccel and Position) always moves to 0

Post by cjr »

Hello everybody,

i have a USB Roboclaw Solo 30A v4.1.29
I use it from Linux with a "port" of the arduino library (basically removed AVR things and adopted serial I/O)

Reading status, sending parameters, driving with constant speed, stopping works.

Problem:

I'm trying to move from e.g. position 61865 to position 60000. Using command 65 always moves to position 0 instead. I built a dump into the write_n function:

Code: Select all

cnt=19
index=0 data=0x80 (128)
index=1 data=0x41 (65)
index=2 data=0x00 (0)
index=3 data=0x00 (0)
index=4 data=0x27 (39)
index=5 data=0x10 (16)
index=6 data=0x00 (0)
index=7 data=0x00 (0)
index=8 data=0xC3 (195)
index=9 data=0x50 (80)
index=10 data=0x00 (0)
index=11 data=0x00 (0)
index=12 data=0x27 (39)
index=13 data=0x10 (16)
index=14 data=0x00 (0)
index=15 data=0x00 (0)
index=16 data=0xEA (234)
index=17 data=0x60 (96)
index=18 data=0x00 (0)
This looks OK to me (accel = 0x00002710, speed = 0x0000C350, deccel = accel, position = 0x0000EA60, buffer = 0)

I'm pretty sure that i'm doing something stupid, but i'm out of ideas.

Many thanks in advance

Christof
User avatar
Basicmicro Support
Posts: 1594
Joined: Thu Feb 26, 2015 9:45 pm
Re: Command 65 (Buffered Drive M1 with signed Speed, Accel, Deccel and Position) always moves to 0

Post by Basicmicro Support »

First confirm you can move to different positions using Motion Studio. It uses the same packet serial commands available to you. If it works in Studio then atleast you know it is something you are doing. If it doesnt work in studio you need to look at the postiion control settings(PID, QPPS, whether you are using cascaded velocity control, min max position limit settings etc...).
cjr
Posts: 11
Joined: Fri Mar 01, 2019 3:13 am
Re: Command 65 (Buffered Drive M1 with signed Speed, Accel, Deccel and Position) always moves to 0

Post by cjr »

Looks like some parameter problem. Now that i have set a valid min and max position it works.

Post Reply