View Full Version : PWM how does it work?

08-14-2005, 03:05 PM
I hooked up my computer to a oscilloscope today and found that the PWM does not work unless you keep the button pressed for increasing or decreasing the spindle speed. Is that how it's suppose to work? When using the step/dir for spindles control it works properly. So using the PWM if I'm not holding the button down their is not signal going out hence no modulation is occurring. How in the world do I program that into my g-code?

08-15-2005, 11:54 PM

08-16-2005, 08:52 AM
How in the world do I program that into my g-code?

Paul, Maybe I am missing something here, but what happens when e.g. S1000 M3 is issued? What is the button you refer to?

08-16-2005, 08:55 AM
The short cut on the keyboard for increasing or decreasing the spindle speed.

08-16-2005, 11:16 AM
i am guessing but if you have not reached a maximum something ( voltage current speed )
there is no need to pulse anything, speed could be adjusted by voltage and the current monitored ( and or converted to a power factor) there is all kinds of things that can happen here.

08-16-2005, 11:29 AM
so, I suspect that you're using Mach2? If so, then I seriously doubt that it's monitoring current and voltage. Your PWM is basically an oscillator and it's duty cycle will vary based on how fast you want to go.....at max speed...duty cycle is nearly 100 % at slower speed you'll be able to see the variation you're looking for. Given that, I have no idea how Mach2 handles all of this.

08-16-2005, 11:33 AM
I would think that once you depress the spindle button that would send a continual stream of PWM pulses, and increasing or decreasing the "spindle speed" would increase or decrease the pulse width spacing, therfore changing the duty cycle?

08-16-2005, 11:38 AM
You are correct!

08-16-2005, 11:39 AM
Well that ain't happening.

08-16-2005, 12:25 PM
Try emailing art. fenerty@artofcnc.ca