Hello Guest it is March 28, 2024, 05:30:14 AM

Author Topic: How to turn on/off a PWM output with Smoothstepper?  (Read 4486 times)

0 Members and 1 Guest are viewing this topic.

How to turn on/off a PWM output with Smoothstepper?
« on: November 18, 2009, 02:08:39 PM »
Right now I have the spindle set up as a PWM output.

So I do something like this:

S100 M3
G01 X1.0
M5

to turn on the PWM output then turn it off.

Problem is Mach3 and smoothstepper has a delay between the spindle on and the movement.

Instead, I heard I could do:

E1P1
G01 X1.0
E1P0

to turn output1 on/off without the delay.

However, now I lost the PWM capability.

Is there no way to do:
S100 E1P1
G01 X1.0
E1P0

so I can set the duty cycle and turn a PWM output on without the spindle delay?

Why is there a spindle delay anyway?  I would think the code should be streamed together.  Functionality should be coded with a dwell after the spindle on if that is the desired behavior.  Thanks.

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: How to turn on/off a PWM output with Smoothstepper?
« Reply #1 on: November 18, 2009, 02:50:57 PM »
Do you have the spindle delay set to 0 on General Config page?
Hood
Re: How to turn on/off a PWM output with Smoothstepper?
« Reply #2 on: November 18, 2009, 02:56:54 PM »
Yes I do have all delays set to 0.

The delay is short def less than a second but enough to burn a spot with a laser.

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: How to turn on/off a PWM output with Smoothstepper?
« Reply #3 on: November 18, 2009, 03:01:12 PM »
Ah ok, no mention was made of a laser ;)
Afraid that slight dwell is just a part of Mach, Rev 4 may be better.

Hood