Hi
Some times ago i have start to work on something more powerfull for orient, this is really unperfect but work not so bad.
At same time i have write a component for help to configure spindle with relative/absolue drive for reverse direction that also make a more easy orient config.
forum.linuxcnc.org/10-advanced-configura...nent-revised?start=0
The code online is not up to date but if someone ask i can add to github colaborator.
I'm sure many things need review from more advanced coder.
function _ "Provide a way for wait spindle slow done before change direction or before stopping";
author "alkabal";
description """
This component have configurable pin for use speed as Absolue or Relative
Provide a way for use acceleration/deceleration and limit spindle max min rpm
Also include built in lowpass for speed filtering and near for spindle at speed for simpler hal config
Add a velocity feedback lowpass as absolue
Other benefit are for decrease "FW/REV relay" usage that stay in last position after stop
Include retarded enable output for waiting relay toggling before enable drive
Work with Analog/PWM "+-10V drive" or "0/10V drive" and other voltage off course.
Allow to use retarded relay for swapp motor wire or provide the output needed for direction setting for some drive
Now also add a way for preventing spindle to start if probe is conneced
""";