iq-motion-control / iq-control-center

Source code for the IQ Control Center app
GNU Lesser General Public License v3.0
13 stars 0 forks source link

Random Direction Change #6

Closed salvagione closed 4 years ago

salvagione commented 5 years ago

Describe the bug Motor randomly changes directions when given a velocity value.

To Reproduce Steps to reproduce the behavior:

  1. Open IQ Control Center
  2. Connect to your motor by selecting the correct COM port/baud rate
  3. Navigate to the TESTING window
  4. Enter 200 in the Velocity value field
  5. Click on the download arrow to send the value to the motor
  6. Observe the motor direction, it will reverse directions randomly

Expected behavior I would expect that the motor would hold the same direction until a new value was sent.

Screenshots N/A

Desktop (please complete the following information):

Additional context N/A

IQ-raf commented 4 years ago

Hi Salvagione!

Thank you for posting this bug and sorry for the late reply, we managed to replicate the bug and we are currently looking for a solution!

IQ-raf commented 4 years ago

Hi again Salvagione.

It turns out that this bug is due to the error in the position target vs actual position getting too large. at 200 rad/s you would need a power supply with at least 10V and no load for the motor to keep up.

Do you remember what power supply you were using when you encountered the bug? If you could try and make the motor spin again at 200rad/s with a higher rated power supply or just make the motor spin at a lower speed and tell us if the bug still persists that would be great!

salvagione commented 4 years ago

Hello Raf,

Looking at my notes I was simulating 2 cells with a lab supply, 7V4 @ 2A. I've set up the motor and supplied it with 10V. The random reversal does appear to have gone away at no load, however the moment the motor has a light load the reversal behavior returns. Actually, I take that back, if you wait long enough the reversal behavior happens even at 10V, as it did while I was typing this.

dskart commented 4 years ago

Hi Salvagione,

It seems that you did find a bug in our stepdir firmware. We know what it is and we are currently fixing it. I will let you know as soon as soon as I can when the patch release of the firmware will be out! I'm sorry if this is causing you any problems.

IQ-raf commented 4 years ago

Hi Again,

Sorry for the late reply but we have released new firmware and this bug has been fixed! I will close the issue now