Freezing during PID Positional Control (with encoder)

General topics and discussions about the VESC and its development.
ntensor
Posts: 2
Joined: 13 Jun 2018, 23:28
Location: United States

Freezing during PID Positional Control (with encoder)

Postby ntensor » 13 Jun 2018, 23:40

When I set the desired position (even just using the VESC tool), the motor either has too much or too little juice and then it just hangs- I can't send any other commands or get anything back from it. Once I power cycle the vesc, I can reconnect and try again.

I thought the timeout setting in App Settings/General would take care of this, but that only seems to affect current, duty, etc. Is there another timeout to adjust for Positional Control?

I'm trying to balance a robot and need to send positional commands every 10ms or so. Will that work or does it always wait until it has found the position before accepting new commands?

Thanks!

pf26
Posts: 299
Joined: 28 Mar 2016, 14:37
Location: FR Valence

Re: Freezing during PID Positional Control (with encoder)

Postby pf26 » 14 Jun 2018, 09:25

Possibly the motor startup currents interfere with your hardware. You could try to improve your routing (wiring away from power cables), or lower the motor max current, or use separate power sources for VESC and your hardware (if not already the case).
You should be able to transmit position references every 10ms without issue.

ntensor
Posts: 2
Joined: 13 Jun 2018, 23:28
Location: United States

Re: Freezing during PID Positional Control (with encoder)

Postby ntensor » 14 Jun 2018, 19:34

Thank you for the reply. I already have separate power sources, but I will try lowering the max current for possible interference.

I should mention that if the untuned PID is too strong, it will constantly hunt for the position and remain frozen (unable to accept a command or provide values back). It is like the SetPosition loops on the main thread of the firmware, halting any other other activity, and won't stop until it reaches its destination (or is power cycled).


Return to “General”

Who is online

Users browsing this forum: No registered users and 1 guest