Hello Guest it is April 20, 2024, 05:59:34 AM

Author Topic: Mac4 VFD Spindle Speed Control Issue  (Read 561 times)

0 Members and 1 Guest are viewing this topic.

Mac4 VFD Spindle Speed Control Issue
« on: November 03, 2022, 01:56:54 PM »
Hi All,

I'm new here, new to CNC, Mach4, etc, and I'm hoping someone can help me.

The issue I'm having is that I am unable to get Mach4 to control the RPMs on a Spindle. Mach4 will turn the spindle On/Off right now, but it would be nice to have this working as well.

Hardware:
Mach4 (Version 4.2.0.4300) running under Windows 10
UC100 Motion Controller (Not sure where to find the version?)
Gecko G540 Stepper Drive
Huanyang VFD with generic 2.2kW liquid cooled Spindle.

I am reasonably sure that I have the wiring between the G540 and the VFD correct and have searched here and Google looking for solutions, but no joy so far. I have tried many, many combinations of settings.

I found this thread which appears to address the same issue. I'm unable to see what I'm missing.

https://www.machsupport.com/forum/index.php?topic=36971.0

Any thoughts and/ or suggestions would be greatly appreciated!

(Please explain it like I'm 5 years old.)

Thanks!
Re: Mac4 VFD Spindle Speed Control Issue
« Reply #1 on: November 06, 2022, 06:50:54 PM »
Hi,
I presume, you don't say, that you are trying to control the VFD via an analogue PWM signal?

Have you programmed the VFD to respond to an analogue voltage input? If you have then you should be be to control the VFD by bridging it's 10VDC output
to its AVI input. That should cause it to run at full speed. If you use a variable resistor with the wiper attached to the AVI input you should have continuous
variable control from the minimum programmed speed of the VFD to the max programmed VFD speed.

If you cant control the VFD like this then there is no hope for the G540 to do so.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Mac4 VFD Spindle Speed Control Issue
« Reply #2 on: November 06, 2022, 11:45:48 PM »
Thanks for the reply.

I am trying to get set up so that I can set spindle speed using gcode commands.

I believe that this would be by a pwm signal. And looks like: Mach4/UC100/G540/VFD.

Or possibly with step/dir?

I believe that I have the VFD parameter set to allow external control and have the control wiring between the VFD and the G540 set up correctly. As I understand it, the VFD has an internal 10VDC supply that is sent to the G540; the G540 PWMs that 10V to send back a pulse train that looks like 0-10VDC to the VFD, thereby acting like a trim pot.

At this point, I can manually set the speeds with VFD parameters and can start/ stop the Spindle with an "S" command or the Spindle on/off buttons in Mach4, but I can't command speeds through Mach4.

I think that I'm just not routing the signals/ pin designations correctly in Mach4, but again, total noob.

Thanks again for any input!
Re: Mac4 VFD Spindle Speed Control Issue
« Reply #3 on: November 07, 2022, 12:38:02 AM »
Hi,
I understand what you want to do but before you can have Mach4 and Gcode control the speed you need to program
the VFD to accept a voltage input to control its speed. Don't worry about Mach and all the rest of it ....have you programmed the VFD properly?
Have you tested it with a 0-10V signal? Once you can control the VFD with an analog voltage THEN start worrying about Mach/UC100/G540.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Mac4 VFD Spindle Speed Control Issue
« Reply #4 on: November 07, 2022, 12:05:43 PM »
Thanks.

It's probably clear to you that I misunderstood your original post. Lol

This makes a lot of sense. I am away from the machine for a couple of weeks, but will establish that I can control the VFD with the 0-10V signal, as you suggest, when I get back.

Thanks again!
Re: Mac4 VFD Spindle Speed Control Issue
« Reply #5 on: December 09, 2022, 04:07:11 PM »
Hi,
I understand what you want to do but before you can have Mach4 and Gcode control the speed you need to program
the VFD to accept a voltage input to control its speed. Don't worry about Mach and all the rest of it ....have you programmed the VFD properly?
Have you tested it with a 0-10V signal? Once you can control the VFD with an analog voltage THEN start worrying about Mach/UC100/G540.

Craig


This was a great recommendation. In fact, I did have a VFD parameter set incorrectly and could not control with a pot.

After I got that working, I still had issues due to not understanding some stuff with the interface, but it was just me being dim.

In case it helps anyone in the future, I now have settings as follows and speed control from MDI in Mach4 is working, although the speeds are not right yet. Possible subject of a future thread. Lol

Under the Control Configuration in Mach4

Outputs:
Spindle FWD/ UC100/ Port1 Pin1

Spindle
Min RPM = 0
Max RPM =24000
Step/ Dir = None

In the UC100 Plug in:
Mode PWM (This appears to be an unused setting as referenced in the other thread I linked to in my OP)
Spindle PWM Pin Pin 14 (This is not checked "Neg." in my case)
PWM Freq 50Hz
Index Prescale 1

Thank you very much for your help, joeaverage!
Re: Mac4 VFD Spindle Speed Control Issue
« Reply #6 on: December 09, 2022, 04:44:31 PM »
Hi,
many people, myself included, have fallen into the trap of wiring up multiple components expecting a certain result....only to find
it doesn't work. Very disappointing.

I have gotten better over the years when designing  a circuit or control system about planning how I'm going to test each subsection.
For example I designed and built my own breakout board, well in fact I've built several, but the latest one seems to 'tick all the boxes'
and don't anticipate having to make another. I was adamant that all inputs and outputs have an LED so that I could see the status
of that pin. Note that this is, if you like, between the motion controller (ESS) and the breakout board. It meant that I did not have to dive in with a
multimeter probe to diagnose a fault, the LED tells me what I need to know. More often than not IF you dive in with a multimeter probe you will
probe the wrong circuit, or worse slip and bridge two circuits. If there was not a fault before.....now there is a fault....you just caused it!

At the output of the breakout board are pluggable screw terminations. This allows you to probe without risk of slip[ping and causing yet another fault.

In your case you had to break the problem down, and you did. First you established that there was a fault in the VFD programming and was able to correct
that. Then you tackled the problem of the UC100 settings and the G540 wiring.

Imagine if the UC100 had LEDs on all its outputs. Then you could have seen the PWM signal as a varying intensity LED....would that have made it easier?

Craig
« Last Edit: December 09, 2022, 04:49:12 PM by joeaverage »
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'