_DREACHED not working when excactly on position

5 years 8 months ago #29533389 by bart.verburg
I encountered a problem:
When in MicroBasic sending a motor to a specific position (setcommand(_MOTPOS, 1, Position[8])
The motor is moving and when near the desired position (getvalue(_DREACHED, 1) = 1) gets true.
However when the motor is exactly on the position when the _MOTPOS command is given, the value of _DREACHED never comes to 1.
So in the MicroBasic the software is waiting until _DREACHED is 1 and this NEVER happens.

I temporary solved this problem by also looking at the position of the motor (Getvalue(_ABCNTR, 1)) and when this is exactly the desired position in the MicroBasic program also recognizes that the position is reached.
TempMotorPosition = Getvalue(_ABCNTR, 1)
if ((TempMotorPosition = Position[8]) OR (getvalue(_DREACHED, 1) = 1)) then

Maybe you can look at the firmware and correct this problem.

Kind regards,
Bart Verburg

Please Log in or Create an account to join the conversation.

5 years 8 months ago - 5 years 8 months ago #29533391 by Gabriel_Isko
Replied by Gabriel_Isko on topic _DREACHED not working when excactly on position
Hello Bart,

We are going to try to replicate the problem you are having. To do that we will need the following items:

- The model number of the motor controller you are using.
- The version of firmware you are using (Should be in the lower right hand corner of Roborun+ while connected to the controller).
- A backup of the controllers configuration (.xml file from the save profile to disk button in the configuration tab of Roborun+).
- A copy of the script you are using (.mbs file saved from the scripting tab of Roborun+).

Either post these items in a .zip archive attachment in a reply to this post, or email them to This email address is being protected from spambots. You need JavaScript enabled to view it..

- Gabe

Please Log in or Create an account to join the conversation.

Time to create page: 0.049 seconds