end of move question

General discussion of using Roboclaw motor controllers
Post Reply
jimt
Posts: 17
Joined: Wed Dec 07, 2016 7:27 am
end of move question

Post by jimt »

I am using the command: SpeedAccelDeccelPositionM1 to issue several moves with the buffer parameter set to "0". Is there a way to monitor for the end of each move?

I understand that it is possible to monitor for the end of all moves submitted using:

Code: Select all

while(buffers[1]!=0x80):
	buffers = roboclaw.ReadBuffers(0x80)
User avatar
Basicmicro Support
Posts: 1594
Joined: Thu Feb 26, 2015 9:45 pm
Re: end of move question

Post by Basicmicro Support »

That is also how you check for the end of each move. The buffer value will decrease until there are no commands left in the buffer(indicated by a 0x80 value). So if you send 3 buffered commadns, the first will begin to execute immediately and the buffer value will be 2. When it finishes the next command will begin and the buffer value will change to 1. When it finishes the last command will begin to execute and the buffer will be set to 0(which indicates no commands are buffered but the last command is still executing). When that command finishes the special buffer value of 0x80 will be set(indicating the buffer is empty and the last buffered command completed).

Post Reply