Hello Guest it is April 24, 2024, 04:56:36 AM

Author Topic: How does spindle output work?  (Read 2521 times)

0 Members and 1 Guest are viewing this topic.

How does spindle output work?
« on: May 24, 2016, 05:16:42 PM »
I'm setting up the spindle output for something other than a spindle and just need a user variable PWM output to the spindle step pin.  

What triggers Mach3 to begin the PWM pulse train?  

Once the pulse train is started, would I change it using the S word or by entering a value in the spindle speed DRO?

Thanks
Re: How does spindle output work?
« Reply #1 on: May 24, 2016, 06:24:24 PM »
Basically, all I need is a PWM output from Mach3 into a DAC, like a spindle control board.  The PWM output would be scaled from 0 - 100 and as I change the spindle speed, the voltage should change.  0 = 0V and 100 = 10V.  Looks like to do this I would go to Config -> Spindle Pulleys and set up pulley 1 as min Speed = 0, max speed = 100.  Then go to Config -> Ports & Pins -> Motor Outputs and set the port and pin for spindle step.  I'm not using a direction control, so I left the dir pin and port at 0.  The Config -> Ports & Pins -> Spindle Setup and check "Use spindle motor output" and check "PWM Control".  Base Freq. is set to 5 and min PWM% is set to 0.

Now it's possible that the process that starts the PWM pulse train is not happening.  I thought DoSpinCW() and DoSpinCCW() start the PWM output and DoSpinStop() stops it.  When I execute DoSpinCW() from a macro, I read .5V from the spindle board regardless of the spindle speed setting.  The board is a CNC4PC C41.  I have 24V connected to where it says to connect 24V.  5V connected to power in.  The only other connection is the analog output.

Re: How does spindle output work?
« Reply #2 on: May 26, 2016, 06:46:13 AM »
Hi,
 Have you gone into the spindle setup  and setup the parameters?
Regards
Charlie M.

Offline rcaffin

*
  •  1,054 1,054
    • View Profile
Re: How does spindle output work?
« Reply #3 on: May 29, 2016, 06:40:22 AM »
Having defined the pulley values as you indicate (0, 100), then TWO more things are needed.
First, S50 will set the PWM (to 50%), but it won't appear yet.
Then M3 will enable the PWM output, and M5 will disable it.

Cheers
Roger