I recently got a Smoothieboard clone in the hopes of making a water jet cutter. I planned on using the laser functionality of smoothieware and simply changing the cutting element. However I did not realize that the laser uses a PWM signal to raise and lower the laser power rather than just turning on and off. In the G-CODE the laser power is set using the S parameter from 0 to 1 and is sent to the PWM pin. However I need the signal to activate a relay. The switch function alone will not pick up on the S parameter as it is technically not a command. Is there and easy way to make it look for S or should I try something else? I was thinking that I could set an input pin and jump from the actual PWM for the laser to a new input pin for the switch. Then I could make the switch watch for a high signal coming in and turn on the relay. In my experiences however I am not sure if I have everything set up correctly. I am using a MKS SBASE V1.3 from amazon and I am using this configuration for the laser function.
I also have some G-code to test the program.
This code only cuts out a small circle