I am trying to make EMC give me a spindle start button, not a spindle forward and a spindle reverse. Using PWMGEN type 1.

I want the "plus button" to increase the speed forward and the "minus button" to decrease the speed forward until it reaches 0 then increase the speed again but this time PWMGEN direction will be asserted so my spindle will go the other way.

More clicks on the "minus button" should increase the speed backwards.

Clicking plus at that point should decrease the PWM speed (backwards) until it reaches 0 when PWMGEN direction is NOT asserted and the spindle will stop and start going forward again.

When the "start spindle" button is pressed nothing should happen until I press either + or - then the spindle will start in whichever direction I clicked.

I have been all over this trying to sort it out. Any pointers please.

Setting the following does give me the signals I want but it starts at full speed

setp pwmgen.0.offset 1