After lot's of thinking, asking questions, and some logic, I managed to solve this issue using two simple steps:
- to make the pendant button s-on-off start the spindle with the same speed as the GUI button before the S word is defined, add RS274NGC_STARTUP_CODE = Sx to the [RS274NGC] section of your INI file where x are the same RPMs as specified in GUI for Spindle Starting RPM (6000, for example).
- somehow, the pendant button s-on-off starts the spindle and also increases the RPMs for about 100 RPMs. In our example, the GUI would start the spindle to 6000 RPM while the pendant would start it to 6100 RPM. To avoid this, comment the following two lines in xhc-whb04b-6.hal:
# net pdnt.spindle.increase whb.halui.spindle.increase halui.spindle.0.increase
# net pdnt.spindle.decrease whb.halui.spindle.decrease halui.spindle.0.decrease
After these modifications, pendant s-on-off starts the pendant to the same speed as the GUI and the Spindle+/Spindle- buttons work the same way as in the GUI.
I hope someone will find this useful.