Machsupport Forum

Mach Discussion => Mach4 General Discussion => Topic started by: CNCNewbie24 on April 15, 2023, 12:40:54 PM

Title: Spindle Works in Mach 3 but no go in Mach 4
Post by: CNCNewbie24 on April 15, 2023, 12:40:54 PM
Hey all,

Just finished building my CNC recently, started 10 years ago smh…but it’s done. Have the following:

PMDX-126
PMDX-107
ESS Ethernet SmoothStepper
Sunfar E550 VFD
4.5kW Spindle 18k 300hz

I got the spindle working in Mach 3 finally, turns off/on, RPM match, turns on/off with program no issues so far. Tried to port over to Mach 4 and cannot for the life of me figure out what the problem is. I can hear the relay turn in and the fan on the vfd start but spindle doesnt spin. I have 1-14 for PWM and 1-16 for FWD. I’ll post my pin/config shots from Mach 3 when I get home for review. Just wanted to get this on the board with some experienced eyes on it as soon as possible bc I’m at wits end.

Thank you!
-Ram
Title: Re: Spindle Works in Mach 3 but no go in Mach 4
Post by: thosj on April 16, 2023, 10:02:19 AM
So........if it works in Mach3, I guess that points to the VFD programming being correct. Which in turn points to it must be something in the Mach4/ESS config. You have read through this,

https://warp9td.com/index.php/gettingstarted/setting-up-the-smoothstepper-and-mach4

right? Andy does have an amazing set of documentation over there.
Title: Re: Spindle Works in Mach 3 but no go in Mach 4
Post by: CNCNewbie24 on April 16, 2023, 10:22:48 AM
Yup, unless I overlooked something. I’m using the latest Mach 4 build and ESS plugin recommended as well. I’ll post my config in just a bit, have to move the files over from the cnc computer in the garage.
Title: Re: Spindle Works in Mach 3 but no go in Mach 4
Post by: CNCNewbie24 on April 16, 2023, 03:29:12 PM
See attached Mach 3 config and Mach 4 config
Title: Re: Spindle Works in Mach 3 but no go in Mach 4
Post by: CNCNewbie24 on April 16, 2023, 03:30:55 PM
*One thing to note is Spindle Relay for Mach 4 is set to Active High not low like it is in the picture.
Title: Re: Spindle Works in Mach 3 but no go in Mach 4
Post by: thosj on April 16, 2023, 06:03:35 PM
OK, I don't have a PMDX 107, but a PMDX 104. I have a PMDX 126. I couldn't use the 107, my spindle would stutter and slow or stop randomly and Steve never could figure it out, so I bought a 104 and it's been humming merrily along for years. But, that shouldn't matter.

I have a Hitachi VFD, but I think we've eliminated VFD settings seeing as it works with Mach 3.

I have two differences in my setup.

First page, I have PWM frequency at 300 not 25. This per Andy on the phone long ago.

Last page, Output signals I have Spindle FWD checked and setup for that pin, NOT Spindle On. And I CAN run my spindle forward and reverse from gcode or mdi, or the onscreen buttons!!

Those are the only differences I see other than I don't have the laser stuff setup.

And.........probably don't run Mach4 5000 or up, and probably only use ESS 285 with 4809 (likely, per Andy, to be safe)

See what you can figure out from that tidbit!!

Tom
Title: Re: Spindle Works in Mach 3 but no go in Mach 4
Post by: CNCNewbie24 on April 17, 2023, 03:28:20 PM
 Just tried, no go. Can hear the click from the VFD but no spin on spindle. Using the latest recommended Mach 4 build and ESS recommended by Andy per the Warp9 page. I’m at a loss
Title: Re: Spindle Works in Mach 3 but no go in Mach 4
Post by: CNCNewbie24 on April 17, 2023, 03:31:12 PM
Programmed my VFD as follows:


F0.00-1 > Set to external analog
F0.02-1001 >1-Is for external control, 0-Is for two line control mode 1 from (X1,X2 input pins), 0- Rev prevention, 1-Power on auto start
F0.04-300 > My motor is 300 Hz
F0.05-10 > I set Acceleration to 10 ... just a guess on my part
F0.06-10 > I set Deceleration to 10 ... just a guess on my part
F0.12-300 > My Motor Hz is 300
F0.13-220 > My Motor Voltage is 220V
F1.04-300 > My Motor Hz is 300 Hz

F1.08-11 > Set at 11 so X1 input pin of E500 VFD is set up for foward motor operation.
Title: Re: Spindle Works in Mach 3 but no go in Mach 4
Post by: thosj on April 17, 2023, 03:43:36 PM
I'm stumped, hopefully someone else will show up with some ideas. Maybe try the Warp9 forum, Andy is GOOD. He'll get you going!!

But again, if the VFD works in Mach3, don't we think the VFD programming is not the culprit?
Title: Re: Spindle Works in Mach 3 but no go in Mach 4
Post by: CNCNewbie24 on April 17, 2023, 03:50:07 PM
Right!? Totally agree, that’s why I’m losing it lol, cause I know it all works. It’s just getting it to work in Mach 4. Btw, setting Hz to 300 in Mach 3 actually makes the Spindle run way better. So there is a plus.
Title: Re: Spindle Works in Mach 3 but no go in Mach 4
Post by: CNCNewbie24 on April 17, 2023, 03:56:54 PM
So I’ve even tried using Avids Mach 4, just tried it and left the spindle at default 6000 and it worked! BUT…it’s set for 18000 and no go. Tried S318000 it sets but won’t run set it back to 6000 and it runs, I can increase the percentage up to 16500 (275%) and it stays running, try to kick it to 18000 and it shuts off. How does this make any sense 🤦🏽‍♂️
Title: Re: Spindle Works in Mach 3 but no go in Mach 4
Post by: thosj on April 17, 2023, 06:51:03 PM
Check the "pulley" setting, I forget what it's called in Mach4, it's different than Mach3 but has the same effect. It's mentioned in Andy's setup documentation on their site.

Get hold of Andy over on Warp9 and he can even Teamviewer in and check your setup IF he can find time!! He's a pretty busy guy.
Title: Re: Spindle Works in Mach 3 but no go in Mach 4
Post by: Steve Stallings on April 17, 2023, 06:59:31 PM
Have you set up your spindle pulley info in Mach4? Mach4 figures out the %PWM by looking at the S word as a % of the maximum spindle speed.

Are you using the relay on the PMDX-126 to command Run or Forward to the VFD or are you using the Run or Forward directly from the PMDX-107? The PMDX-107 derives the run status by looking at the PWM. If the PWM ever becomes absolutely 100% (never pulses) the PMDX-107 will turn off. We often recommend that users set up the maximum pulley speed to just over the maximum S word that you plan to use. For example if you have a 24000 RPM spindle, set the maximum pulley speed to 24005 so that the PWM never saturates to 100%.
Title: Re: Spindle Works in Mach 3 but no go in Mach 4
Post by: CNCNewbie24 on April 17, 2023, 07:14:38 PM
Hey Steve! Actually sent an email to you and support a couple of weeks ago but never heard back. Appreciate the assistance, I configured it based on the ESS recommendations, set my maxRPM and Max Spindle RPM to 18000, minRPM to 0. How would I know if I’m using the Fwd from the 126 vs the 107? It’s wired to my 107 from the VFD, then just configured using pins 1-14/1-16 for Fwd and PWM. I’ll try setting maxRPM to 18005.
Title: Re: Spindle Works in Mach 3 but no go in Mach 4
Post by: Steve Stallings on April 17, 2023, 07:33:12 PM
If the VFD is only wired to the PMDX-107, then the 100% PWM problem could exist if the SmoothStepper allows a full 100%. Even 99.99% avoids the problem.
Title: Re: Spindle Works in Mach 3 but no go in Mach 4
Post by: CNCNewbie24 on April 18, 2023, 01:04:32 AM
Well got it working then shut it all down and stepped away. Kept PC on, came back later to run some tramming/squaring using Mach 3, no issues. Figured i'd start the swap to 4 now that the spindle issue was resolved. NOPE, same thing, except now it wont even kick using the settings from before, i feel like i'm going crazy. Set the spindle speed (pulley) to min 0/18005 max, set to 300Hz(tried 1000/even 25 for giggles) no dice. Messed with it for another 1.5 hrs to see if I could replicate getting it to work like earlier but no go. Just shutdown the computer and i'll try again tomorrow. Once configured, are the settings saved? Shouldnt my spindle rpm setting show under the spindle once i click the enable button?