Set motor position to 0 degrees does not work if motor is reveresed

we noticed that the block to set motor position to 0 does not work if the motor in question is reversed.

Has anyone else noticed the same>72160693_835118856948429_1173756889175949312_n

1 Like

Is it because your program stops before completion?

1 Like

try adding a wait until motor stop to the end of the program

2 Likes

we have added a wait command after the set motor position and it didn’t help.

We also added an infinite loop at the end so the program never finishes, it also didn’t help.

The set motor position function is broken when the motor is reversed,

You need to change it to “Spin to position” rather than “Set”. By using the set command, you are just setting the encoder to 0, not moving it to zero.

2 Likes

No. set motor position to 0 means that we want to reset the motor to make the current position be position 0. We do not want to move to the old position 0, we want the current position to become position 0.

Sorry, I misunderstood. So you can’t reset the encoder value when a motor is reversed?

That seems to be the case. The example above is just a simple test program. The team ran into this issues in their main driver code – where they are setting upper and lower limits for their robot arm

Oh yeah, very true. Just repeated the issue here. One for @tfriez

Confirmed bug… we’ll fix in the next release in a few weeks.

2 Likes

Was this fixed? I just found that the upper and lower limits for an arm that has a motor in reverse were not working. The position of the motor was set during initialization. The motor movement should be limited based on programmed limits, controller button presses, and the motor position. The code does not work. I will determine what the position is being read as at my next opportunity.

The original bug was fixed, but if you can post code that replicated the issue we’ll definitely look into it.

1 Like

The problem turned out to be setting up action for Fup and Fdown in the controller device settings and also defining actions in code. The controller device settings had priority.