Author Topic: Setting up spindle PWM  (Read 4929 times)

MitchB

  • Posts: 6
    • View Profile
Setting up spindle PWM
« on: November 02, 2015, 12:41:00 PM »
I have not been able to get my spindle PWM working.  I am using XP Pro and Mach 4.2.0.2763 and PMDX-411 v0.31.147.

I have selected Pin 16 in the PMDX spindle config.  When I look at the real time signals, pin 16 is black which means "signal is not yet supported".  Maybe that doesn't matter.  Probably a more significant issue is that I don't know how Mach should be configured to interface to the PMDX-411.  Pin 16 is not one of the options available on the Mach configuration screen.

Bob at PMDX

  • Administrator
  • Posts: 368
    • View Profile
    • PMDX
Re: Setting up spindle PWM
« Reply #1 on: November 02, 2015, 01:53:05 PM »
The black on the real time display just means that the real time display does not (yet) support displaying that signal.  We can generate it, just not display its real time state.  Our next plug-in release will show the PWM signal (and step/dir signals) on the real time display.

Go to the Mach4 "Configure" menu and select "Mach...".  Then click on the "Spindle" tab.  Set the min and max spindle RPM in the row marked "0" (zero, i.e. the top row).  Set the "Max Spindle Motor RPM" - if you have a direct drive from motor to spindle, this will be the same as the max spindle speed entered above.  If there is a gear or pulley system, then this is the actual motor speed when the spindle is at its max (i.e. accounting for the pulley ratio).  Accel and decel times are not used at the moment.  Then make sure that the "Step/Dir Spindle Axis" down at the bottom is set to "none".

That should be all you need to do.  Let me know if you still have problems (and let us know what breakout board and spindle PWM board you are using).

Bob
Engineering Hell: Everything's right and nothing works.
Bob's Corollary: If everything's right and nothing works, double check your assumptions.

MitchB

  • Posts: 6
    • View Profile
Re: Setting up spindle PWM
« Reply #2 on: November 02, 2015, 03:17:03 PM »
That is how I have it configured with 0 min and 10000 max.  The spindle just spins at one continuous speed.  The parallel port pins are broken out on a Xylotex stepper driver board and the PWM board is a Homann Digispeed in a Sherline motor controller box.  This all worked with Mach 3 and parallel port.

Probably unrelated but sometimes my Charge Pump pin in the Mach configuration is changed from Pin 1 (which it should be) to Pin 17.
« Last Edit: November 02, 2015, 10:25:13 PM by MitchB »

Bob at PMDX

  • Administrator
  • Posts: 368
    • View Profile
    • PMDX
Re: Setting up spindle PWM
« Reply #3 on: November 02, 2015, 05:05:40 PM »
I cannot explain why the charge pump configuration is changing pin numbers.  Our plug-in can change the charge pump mapping, but it only does so with the "PMDX-126 Expanded Inputs" mode is selected, and even then the plug-in will pop up a window warning you that it is about to change something.

Are you seeing the Digispeed board do the "red fast flash" to indicate that it is seeing the PWM signal?

The Digispeed manual that I found says that the PWM input is "active low".  So go into our plug-in configuration and click on the "Spindle Config" tab and make sure that the polarity is set to active low.

If you have a volt meter or DMM, you can measure the voltage on the Digispeed's input terminals (in the manual I found it looks like the "Sig" and "Gnd" terminals on J1).  Issue an "s10000" and "m3" command.  You should read a voltage close to 0V.  Issue an "s5000" command and you should see approx 2.5V.

If you are still having trouble getting this to work, you can send me a Mach4 "package" and I'll look at your configuration and see if I can see anything there.  Go to the Mach4 Help->Support->Package Current Profile".  Then email me the resulting file to bob at this domain.

Bob
Engineering Hell: Everything's right and nothing works.
Bob's Corollary: If everything's right and nothing works, double check your assumptions.

MitchB

  • Posts: 6
    • View Profile
Re: Setting up spindle PWM
« Reply #4 on: November 02, 2015, 06:50:30 PM »
Using an oscilloscope, I see good PWM on pin 14 when I configure to use that pin, but I never see anything on pin 16.  I will send my file to see if you can see anything that might be a problem.

Bob at PMDX

  • Administrator
  • Posts: 368
    • View Profile
    • PMDX
Re: Setting up spindle PWM
« Reply #5 on: November 04, 2015, 03:00:59 AM »
I've taken a quick look at your Mach4 profile and I don't see anything that should prevent the spindle PWM from working on pin 16.  I did see that you have the charge pump set to "on always", which is not a usual setting except when connected to a Geckodrive G540.  But this *should* have no effect on the spindle PWM.

When you looked at the PWM signals with your 'scope and saw it working on pin 14 but not 16, were you looking at I/O the screw terminals on the Xylotex board?  And was the Digispeed wired to pin 16 at the time (and not wired to pin 14)?

If you haven't already, try testing with just the PMDX-411 and the Xylotex board, with the Digispeed not wired to the Xylotex board.  Then see if you get any output on pin 16.  If you get PWM here but not with the Digispeed connected, then the Digispeed may be loading down the PWM output signal.

As two last resorts, unplug the PMDX-411 from the Xylotex board and see if you can look at pin 16 directly on the PMDX-411's DB25 connector (you can ground the scope to a good ground on the PC).  If you see the PWM on pin 16 here but not when connected to the Xylotex, it is possible that the ribbon cable is faulty, or that there may be a faulty trace on the Xylotex board (not likely as you said this worked with Mach3 and a standard parallel port.

Bob
Engineering Hell: Everything's right and nothing works.
Bob's Corollary: If everything's right and nothing works, double check your assumptions.

MitchB

  • Posts: 6
    • View Profile
Re: Setting up spindle PWM
« Reply #6 on: November 04, 2015, 10:03:51 AM »
I disconnected the PMDX-411 so Mach is out of the picture.  I opened the PMDX-411 and probed the pins on the circuit side of the connector.  When configured for Pin 14, I see good PWM.  When configured for Pin 16, I see 0V before enabling a spindle speed and 5V after.  Since it can drive high and low, it suggests that the problem is not a hardware issue with pin 16.  So I downloaded the firmware again, but that didn't affect the results.

Bob at PMDX

  • Administrator
  • Posts: 368
    • View Profile
    • PMDX
Re: Setting up spindle PWM
« Reply #7 on: November 07, 2015, 01:27:41 AM »
To close this thread - there is a bug in the PMDX-411 firmware that prevents the spindle PWM signal from being output no pin 16.  This is fixed in the new plug-in release which has just been posted here:

http://www.pmdx.com/PMDX-SmartBOB-USB-Plug-In

Bob
Engineering Hell: Everything's right and nothing works.
Bob's Corollary: If everything's right and nothing works, double check your assumptions.