Author Topic: Mach4 with ESS and PMDX126/107 speed control issues.  (Read 3352 times)

joe45

  • Posts: 1
    • View Profile
Mach4 with ESS and PMDX126/107 speed control issues.
« on: February 19, 2016, 03:21:46 AM »
Hi there. I am currently wrapping up my first CNC lathe conversion from the trusty WM280V. I have the everything mounted, and all that is left is to set up the spindle control, the axis motors work perfectly. I have had little luck controlling the spindle speed with M03 & M04 codes, however they can change direction. As it appears, by either having the spindle PWM on either active low or high, I can have the spindle run flat out or dead slow, but with no change using gcode at all. For example I would use M03 S500, depending on the settings it will either be 2300rpm (Max) or 50rpm (Min). I have tried playing with the ports and pins settings on both Mach4 and the ESS with no luck. The test function on the PMDX107 does control the spindle, but the '30%' threshold runs a lot less than it should.

Does anyone have any ideas?

Thanks in advance

Joe

Steve Stallings

  • Administrator
  • Posts: 527
  • www.PMDX.com/Images/Avatar120.jpg
    • View Profile
Re: Mach4 with ESS and PMDX126/107 speed control issues.
« Reply #1 on: February 20, 2016, 01:32:12 PM »
Hello Joe,

Your WM280V lathe uses a DC permanent magnet motor. This type
of motor along with the typical speed controller provided has very
poor linearity in the low speed range. The response that you see to
the test function built into the PMDX-107 reflects that. The best way
to cope with that is to adjust for the expected speed at 100% in
test mode and then use the Linearity.dat table in Mach3 to make
corrections for the lower speed ranges. While Mach3 can collect
this data automatically, I usually recommend measuring the motor
response and entering the data manually. At speeds above about
30% of rated speed you should achieve reasonable success.

Verification of maximum speed and data collection at other speeds
must be done without a Linearity.DAT file present in your Mach3 folder
in order to get unadulterated data.

To confirm proper operation of the PMDX-107 you can measure the
output voltage of the PMDX-107 between the Aout and Agnd terminals.
The voltage there will be a percentage of the voltage applied to the
Aref and Agnd terminals. At full speed the voltage on Aout should
be close to the same a the voltage on Aref. At 50% of full speed
the voltage on Aout should be close to half of the voltage on Aref.
These measurements should be taken using the built in test mode
or from Mach3 WITHOUT a Linearity.DAT table present in Mach3 as
the linearity correction will change them.

There are two other concerns in your configuration that you did not
mention.

First, you must have your Pulleys configured in Mach3 in order for
the S word settings to be meaningful. Mach3 uses this information
to compute the percentages for PWM by determining the ratio of
requested speed to the maximum possible for the pulley in use.

Second, the SmoothStepper has an unusual requirement in that it
needs an acceleration setting even though the spindle is not an axis.

Please see our application notes about using the PMDX-107 with a
SmoothStepper here:

http://www.pmdx.com/Doc/AN002_PWMSpindleSmoothStepper_02.pdf

Steve Stallings
www.PMDX.com
« Last Edit: February 20, 2016, 01:36:34 PM by Steve Stallings »
Steve Stallings
www.PMDX.com

Steve Stallings

  • Administrator
  • Posts: 527
  • www.PMDX.com/Images/Avatar120.jpg
    • View Profile
Re: Mach4 with ESS and PMDX126/107 speed control issues.
« Reply #2 on: February 20, 2016, 02:40:51 PM »
It has been pointed out to me that the original question was about Mach4
not Mach3.

Oops, my bad.

The comments about the DC motor controller and its linearity problems are
still valid, but not my suggested solution.

To my knowledge there is no off the shelf solution in Mach4, nor do I know
how well the SmoothStepper works with PWM in the Mach4 environment.

Steve Stallings
www.PMDX.com
Steve Stallings
www.PMDX.com