Vex IQ Version 2 motors spinning forever

I teach robotics engineering and have 30 Education Kit Vex IQ robots for about 80 students (high school but not enough room for V5 units). In the past week, I have had several motors (5 of them) that seem to be getting stuck on an infinite turn loop. The motor will turn one direction as programmed but when changed to the spin the other way just spins forever.

I have tried the standard types of fixes such as changing cables, the cortex, swapping the motor direction from normal to reverse, changing ports, etc. When I put a different motor in the same place with all of the same components, the second motor works fine.

Does anyone know of a way to reprogram the motor to reset the value to zero as I am inclined to see if that fixes the issue.

Welcome to the forum Kevin!

This is very common.

What I think your doing:

How to fix:

You can either use this block:

imageand change the degrees/ turns value

or something like this

If this didn’t help you then can you please provide a screenshot of your code.

The initial code was just trying to make it move 90 degrees, but I have tried a few other things such as writing the code in Python with a wait 1 msec, then trying to tell the motor to stop after completing the rotation and even play a sound after the initial movement. I have also tried setting the motor position value to 0 at the beginning hoping that it would reset, but no luck. The strange thing is that it only seems to happen in one direction (when the motor is normal/forward or reverse/backward). The other direction with the same code works fine. Given that the issue only came up recently, I am wondering if it is related to VEXos 1.0.9. Here is what I have been trying most recently to get the motor to stop (it is in the Reverse/reverse mode right now). I appreciate the help.

Since your using

image

you do not need

Yea, I knew that but had already tried just the single spin motor command with no luck so I was trying a few variations to see if I could trigger the event. It seems to indicate that the motor never reaches the 90 degree mark so nothing else kicks in. Even with a reset to value of 0 at the beginning of the code was not clearing it. My thought is that the electronics in the motors are not tracking the values when going clockwise, but are when going counterclockwise regardless of which default value is used in the program. The problem did not show up until about 3 weeks ago which lines up with the VEXos bios update so I wonder how likely that is to have caused the issue (probably not but all I can do is try to find and correct the issue). -Thanks

Can you see if this works?

That piece of code works great, but when switched back over to the spin motor for command, the motor keeps spinning. Seems to be something in the motor not reading degree values but not sure how reset it.