stancecoke said:
geofft said:
Yes, that now works (in German legal manner...

). There is some fairly severe oscillation or 'pulsing' of the drive though. Is the throttle being scaled by pas cadence - maybe that limiting needs smoothing out?
No, the throttle value is used for the target current in the same way as in throttle-mode. Perhaps you should increase the value of "PAS timeout" to avoid hickups.
To avoid oszillation, you can reduce the values of Gain P (and Gain I), but be aware that the response to the throttle signal will get slower.
Gain I has proved to be the key parameter for me - reducing this to 0.1 has removed all the oscillation issues in all modes. Throttle response seems perfectly ok at this setting and everything now works very well, motor smooth and quiet - well done!
It's just a shame for me that there is no unrestricted throttle/pas mode. This for me (and many others I suspect) is a major drawback and would mean that I would probably not be able to use this code...
So how about an unrestricted throttle pas mode (and/or add a throttle option to torque simulation..?) That would be very nice....
Updated settings.ini below.