Author Topic: Unpredictable spindle control, PMDX-107, PMDX-126, ess, mach4 Huangyang  (Read 472 times)


  • Posts: 2
    • View Profile
I have been running a setup consisting of a 1.5 kW spindle and Huangyang converter (HY01D511B) driven by a PMDX-107, PMDX-126, and Mach 4.

When running an aircut I found that the spindle would turn off about half way through the nc routine. After retrying the routine a few times I noticed the spindle would turn off at about the same place in the program (the spindle is running maximum speed and there are no speed control commands following the initial setting).

I have found that when the spindle speed is set by Mach, the control voltage (measured between Aout and Agound) creeps up about 1-2 mV/sec. It seems that once this voltage exceeds the maximum Aout of ~4.96V the spindle turns off, and explains why it was happening at a similar time during the program execution. If the initial spindle speed is set lower, the voltage does not cross the threshold during the course of a machining operation and the spindle does not turn off. Apparently, this condition also results in spindle acceleration throughout the program. The voltage output by the 107 eventually exceeds the max. speed voltage calibrated by the trim pot. Running the manual reference voltage calibration before and after has a predictable outcome (i.e., the trim pot screw is not turning due to vibrations, and the voltage set-point at maximum speed is unchanged).

Has anyone ever seen this before? Any idea what could be causing this? All else seems to be working fine.

« Last Edit: October 29, 2019, 09:24:47 PM by jbs »


  • Posts: 182
    • View Profile
Re: Unpredictable spindle control, PMDX-107, PMDX-126, ess, mach4 Huangyang
« Reply #1 on: October 30, 2019, 11:11:31 PM »
Has your system been running OK for a while and this just started?  Or have you just stared using the 107?

How do you have the 107 wired to the VFD (the AGnd, AOut and ARef terminals on the 107)?  And what are the 107's DIP switch settings?

If you command the spindle to less than full speed from Mach4, does the 107's output voltage still creep up?  That was unclear (to me) from your post, though I infer that it still does gradually increase but just not enough to cross the (close to ) 5V threshold.

If you use the PMDX-107's built-in test mode to run the spindle, does the output voltage still increase?  Test mode is described in the 107 manual in the "VSD Speed Calibration" section.  Note that the 107 will exit test mode after 30 seconds.

If you disconnect the VFD from the 107, does the 107's output voltage still increase?

Set the spindle speed to something less than full speed (50% or 70% is good).  Put your volt meter on the PMDX-126's connector J6, measuring from the "16" terminal to the "PCgnd" terminal.  Does the voltage here slowly increase like the 107's analog voltage?  This is using the meter to average the actual PWM signal from the ESS to the 126/107.  It *should* work, but if your PWM frequency is low you may see the voltage reading bounce around a little.  If you see this voltage increasing then the issue is in the ESS.

Curiosity - why are you using 5V for max speed?  Normally with analog control people use 10V full scale.


  • Posts: 2
    • View Profile
Re: Unpredictable spindle control, PMDX-107, PMDX-126, ess, mach4 Huangyang
« Reply #2 on: November 13, 2019, 02:16:14 PM »
Thanks for the help, you indirectly found the solution to the problem. It turns out there is a spindle control setting in Mach 4 at Configure-ESS-Spindle-PID settings for Kp and its recommended initial (and possibly default) value was 0.00000100. This sets a proportional gain that was creating the issue. This system does not seem to need this correction.

For future reference here is the other information:

AGnd - ACM
Aout - V1
Aref - not connected

Dip switches 4 and 6 are on, others off.

Yes, in effect the spindle speed always creeps up and it increases whether connected to the VFD or not. This output voltage does not increase and is stable when running test mode.

Voltage also increases between 16 and pcgnd.

I did not necessarily choose the 5 volt range but found that the maximum speed setting on this VFD corresponded to ~5V. If I recall correctly, this range was identified early on using the 107 test mode.

« Last Edit: November 13, 2019, 02:32:44 PM by jbs »