Any procedure to get feedback from DOBOT when task completed


#1

Hi
I am trying to get feedback from DOBOT when a task is completed, insded of using GetPose command, is there any other alternate,
the issues in GetPose command is, the tolerance range is not clear, and need to check continuously for the current Pose, and no confirmation for task is completion from DOBOT. any sample codes appreciated.


#2

When instructions are executed they are assigned an index number. You know when the instruction is completed the index will change. Here is an example of homing the arm, written in RobotBASIC - you probably will use a different language, but the algorithm can easily be duplicated.

Sub Home()
ClearSerBuffer
// forces arm to perform a physical home calibration
SerialOut 0xAA,0xAA,3,31,3,1,0xDD
delay 1000
Serin RET
// wait till arm finishes the home proceedure
// only a 32 bit index is implemented here
index = ascii(substring(RET,9,1))*(256^3)+ascii(substring(RET,8,1))*65536+ascii(substring(RET,7,1))256 + ascii(substring(RET,6,1))
repeat
SerialOut 0xAA,0xAA,2,246,0,-246 // get current index to see if command has finished
repeat // must delay because arm does not send back anything during calibration with accelerometers
CheckSerBuffer n
until n=14
Serin RET
CurIndex =ascii(substring(RET,9,1))
(256^3)+ascii(substring(RET,8,1))*65536+ascii(substring(RET,7,1))*256 + ascii(substring(RET,6,1))
until CurIndex>=index
delay 1000
return