Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: Fogl on September 21, 2012, 01:46:23 PM

Title: Mach3 + G540 + VFD(s) + spindle
Post by: Fogl on September 21, 2012, 01:46:23 PM
Ok, I'm trying to get my VFD to be hooked up on the G540, all driven by Mach3. So far I had no success doing so.

This is my setup:
1) I used "default" G540 XML configuration file which can be downloaded for G540. I was ensured bu many G540 users and Geckodrive support, that it should be ok.
2) I have G540 hooked up on VFD, (3 cables: +10V, 0-10V signal, COM)
3) I have VFD jumpered so it should go always forward (just for now) so I do not need relays for now.
4) I have spindle configured to be driven by PWM 50Hz, min 5%
5) I set up pulley with ratio 1:1 and max RPM 24000.
6) Spindle motor tuning: here is a first hicup. I have no idea, how to map steps, velocity and acceleration on spindle. It makes perfect sense for stepperes, not so for spindles.
7) When I try to punch speed into spindle and do CWF5, I see nothing. RPM says 0. Mach3 from some reason does not want to start spindle.
8) Funny is, when I check "average spindle speed" in spindle settings and then punch CWF5, RPM jumps to 24000 and then quickly ramps down to 0.  ???

When I measure +10V on Gecko, it really says +10V, when I measure 0-10V signal, it always shows 0.48V, which is pretty much 5% duty cycle.
So what am I doing wrong? What am I missing?

Thanks a lot for help.
Title: Re: Mach3 + G540 + VFD(s) + spindle
Post by: Hood on September 21, 2012, 03:23:19 PM
You need to tell Mach what spindle speed you want. Either from MDI or code or you could type it direct into the spindle speed DRO.
From MDI or code it would be S followed by the speed you want, eg S500 would be 500RPM.
Hood
Title: Re: Mach3 + G540 + VFD(s) + spindle
Post by: Fogl on September 21, 2012, 05:25:52 PM
Thanks Hood for your suggestion. Unfortunately, I'm already doing this (Step 7 - punch speed in and then CWF5).
Any other ideas?
Title: Re: Mach3 + G540 + VFD(s) + spindle
Post by: Hood on September 21, 2012, 05:28:48 PM
Yes but are yyou tring to type it into the correct DRO, you will soon know, if you tye it and press enter and it goes back to 0 then you are not, if it stays at what you typed then its the correct one.
Easiest is to just go to MDI and type M3S500 then press the enter Key
Hood
Title: Re: Mach3 + G540 + VFD(s) + spindle
Post by: Fogl on September 21, 2012, 05:44:20 PM
Ok, I moved one step ahead. I'm now able to get into the point there is 0-10V coming of the G540.

Issue was <you got to be kidding me>:
If you try to toggle spindle in the Mach3 without opening project, it will NOT start.
If you load up whatever project (you can even close it right away), from this point on you can toggle spindle till you exit application and start again.
Seriously!? If this is a feature, PLEASE, document it somewhere (best place would be tutorial), because I'm sure I was not first and I'm not going to be last. Otherwise, is this know bug?

Now I have to figure out, why my trial VFD (Huangyang) accepts input from HMI instead of Vin, even if it is configured the other way around (PD001 and PD002 changed from 0 to to 1).
Title: Re: Mach3 + G540 + VFD(s) + spindle
Post by: Hood on September 21, 2012, 05:46:41 PM
Dont have a clue what you are on about with the project bit. If you are meaning open G Code then no you dont have to. I can switch spindle on/off any time.
Hood
Title: Re: Mach3 + G540 + VFD(s) + spindle
Post by: Fogl on September 21, 2012, 05:48:17 PM
Hood, yes, I mean G-code.
I will start up Mach3, I will toggle spindle. Nothing.
I will load up g-code, I can toggle spindle and I get output on the drive.
Title: Re: Mach3 + G540 + VFD(s) + spindle
Post by: Hood on September 21, 2012, 05:49:51 PM
Dont know why that would be. Attach your xml and I will see if I can replicate the issue here.
Hood
Title: Re: Mach3 + G540 + VFD(s) + spindle
Post by: Fogl on September 21, 2012, 05:53:08 PM
Mach3 R3.043.022
Title: Re: Mach3 + G540 + VFD(s) + spindle
Post by: Hood on September 21, 2012, 06:02:31 PM
Seems to be fine for me but I have 062 version loaded and dont have a ESS to test with.
Will load 022 and see if it makes a difference but cant think why it would.
Hood
Title: Re: Mach3 + G540 + VFD(s) + spindle
Post by: Fogl on September 21, 2012, 06:05:45 PM
I was trying to find things in changelog, but there is a lot of builds missing.

...

April 8/2010
Release 3.042.039
-- Added the license name to the top of the screen
-- Added the ability to read a license file with extra data after the .dat
-- Driver update for debounce
-- Spindle reverse fixed if in "pulley reverse"


April 10/2010
-- Redid the driver version number to be 550
-- Made the license name show in Sim mode


//Many updates added and debugged to get to this stage...
May 2/2011
3.043.036
-- Run Script added and lots of work to get it to shut down when an Estop Stop or like event happens
-- Lots opf VB tools added for managing scripts (Check VB doc for added calls)
-- Bug fix for Spindle speed getting set by an external device (P POrt)
-- Threading Driver update for the P POrt
-- #Expand added to VB for source control

...
Title: Re: Mach3 + G540 + VFD(s) + spindle
Post by: Hood on September 21, 2012, 06:11:12 PM
Ok just loaded 022 and start Mach (Used SS rather than ESS as its what I have here at home on the desk) Press spindle button on screen and it starts flashing and message says PWM bumped to min, just as expected. Not sure where your problem could be but doesnt seem like its directly related to Mach unless its an ESS issue. Do you have the spindle set correctly in ESS config
Hood
Title: Re: Mach3 + G540 + VFD(s) + spindle
Post by: Hood on September 21, 2012, 06:13:31 PM
Sorry just realised its not you withthe ESS, regardless it seems to work fine for me as I just tried with the driver loaded.
Hood
Title: Re: Mach3 + G540 + VFD(s) + spindle
Post by: Fogl on September 21, 2012, 06:25:14 PM
Well, I just installed current dev build (66) and problem went away. So I guess I'm OK from this perspective.
Btw, did you completely uninstall 62 before you installed 22? Just curious.

Anyway, now the other questions. Because it looks like you really understand, what are you talking about, can you please explain to me, how to properly tune spindle?
I already mentioned that in my first post. I need to set up at least ramps properly, but I have no clue, how to map steps, velocity and acceleration on the tunning tab on my setup.
My spindle has 24000rpm, ramp 3 secs up, 3 sec down.

Thanks!
Title: Re: Mach3 + G540 + VFD(s) + spindle
Post by: Hood on September 21, 2012, 06:29:37 PM
You can set a delay from Config menu the Ports and Pins then finally Spindle Setup.
As for what you need to actually set steps etc to afraid I dont know as I have never used the G540 but should be in their manual I would think.
Hood
Title: Re: Mach3 + G540 + VFD(s) + spindle
Post by: Fogl on September 21, 2012, 06:51:10 PM
I do not think my question is relevant to G540. I'm trying to figure out:

1) What "Steps per" means, if you have enabled PWM control of the spindle (not step/dir).
2) Same for "Velocity in in-mm per minute". I want to set velocity in RPM.
3) Same for "Acceleration in-mm/sec/sec". I want to set acceleration in RPM/sec.

I use base frequency 50 (I assume Hz).
I want to set ramps for acceleration and deceleration, max RPM etc.

Edit: Ok, I understand, that velocity does not matter. I will just get 0-10V anyway. But ramps are important.
Title: Re: Mach3 + G540 + VFD(s) + spindle
Post by: Fogl on September 22, 2012, 12:52:49 AM
So, I have finally everything running with one of my better VFDs (PowerFlex 70). Huanyang will go collect some dust. Once I figured out wiring, everything was relatively easy.
PowerFlex has also digital inputs with relays configurable as start/stop/fwd/reverse etc ... so I could hook up G540 digital output directly to PowerFlex without additional circuitry.

What I learned:
1) Original G540 XML file (provided by Gecko) for Mach3 is wrong. Pin dedicated to spindle has to have step bit 1, not 0. Once I figured that out, it all worked in build 22 and in build 66. So Hood was right. I saw different results, because I had these 2 builds in different folders with different XML files. One was fixed, other was not.
2) Motor tuning for "Spindle axis" does not do anything for PWM driven spindle. I just looked that up in manual. Maximum speed (in RPM) is derived from your pulley selection, ramping up/down is done in VFD.
3) It is wort to use shielded cables. I do not any interference between from spindle PWM, VFD or steppers anywhere.

Hood, thanks for help.
Title: Re: Mach3 + G540 + VFD(s) + spindle
Post by: Hood on September 22, 2012, 04:42:12 AM
Good you got it going oh and to answer your question that I missed, I just install over the top of whatever version of Mach I have currently installed.
Hood
Title: Re: Mach3 + G540 + VFD(s) + spindle
Post by: stred on April 25, 2013, 07:40:34 PM
vorrei segnalare l'ottimo software free per PowerFlex
www.aig.altervista.org