Hello Guest it is May 16, 2021, 06:31:56 PM

Author Topic: Connecting a VFD to Mach4 through Modbus (RS485)  (Read 827 times)

0 Members and 1 Guest are viewing this topic.

Connecting a VFD to Mach4 through Modbus (RS485)
« on: April 08, 2019, 04:36:28 PM »
Here is a link to a 26 page tutorial that describes in full detail the steps necessary to connect a Modbus compliant VFD to the Mach4 Modbus (RS485).
It supports M3, M4, M5, and S commands in addition to the Mach4 buttons on the control screen.
I am using a Huanyang GT series 3KW VFD which is compliant with the Modbus protocol and Mach4. Other Huanyang VFDs are not, so be careful.
Other Modbus compliant VFDs are supported with a few simple edits.

http://caldwellfam.net/bill/2019/04/connecting-a-vfd-to-mach4-through-the-modbus-rs485/



Enjoy :)



Offline reuelt

*
  •  487 487
    • View Profile
Re: Connecting a VFD to Mach4 through Modbus (RS485)
« Reply #1 on: April 11, 2019, 02:18:36 AM »
Thanks for sharing.

you said,
"I chose Huanyang GT series 2.2KW for my Spindle since it does support the   Modbus   protocol   and   interfaces   with   Mach4’s   Modbus   correctly"
Very good to know.
Does your model support the use of a "BRAKING RESISTOR" to stop the spindle in less than 1 sec?
I am interested to upgrade.
"the gift of God is eternal life through Jesus Christ our Lord"

Offline ger21

*
  • *
  •  6,293 6,293
    • View Profile
    • The CNC Woodworker
Re: Connecting a VFD to Mach4 through Modbus (RS485)
« Reply #2 on: April 11, 2019, 07:14:30 AM »
Quote
Does your model support the use of a "BRAKING RESISTOR" to stop the spindle in less than 1 sec?

Depending on RPM and tool size, a braking resistor will probably not be able to stop a spindle in 1 second. Maybe at low rpm, but not from 24,000rpm with a big, heavy tool in the spindle.
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html

Offline reuelt

*
  •  487 487
    • View Profile
Re: Connecting a VFD to Mach4 through Modbus (RS485)
« Reply #3 on: April 11, 2019, 08:30:37 AM »
Quote
Does your model support the use of a "BRAKING RESISTOR" to stop the spindle in less than 1 sec?

Depending on RPM and tool size, a braking resistor will probably not be able to stop a spindle in 1 second. Maybe at low rpm, but not from 24,000rpm with a big, heavy tool in the spindle.
From youtube:
Regenerative DC Braking on a 2.2kw 3hp Hitachi WJ200 VFD with a 35ohm 400watt wire wound resistor. .5 second starts and .75 second stops.
Isn't 0.75 seconds is less than 1 second?
"the gift of God is eternal life through Jesus Christ our Lord"
Re: Connecting a VFD to Mach4 through Modbus (RS485)
« Reply #4 on: April 11, 2019, 09:02:13 AM »


According to the manual it does. I have my accelerate/ decelerate times set to .5 seconds now with no external braking resistor and with a 1/2” 2 flute end mill it starts and stops in that time. The manual indicates in this size inverter (2:2KW) the braking is already done internally but it’s a little unclear in the wording. Here is the text of the GT manual.

4.4.2.2 Braking unit and braking resistor
• GT series inverters below15kW (380V) are equipped with internal braking unit.In order to dissipate the regenerative energy generated by dynamic braking, the braking resistor should be installed at (+) and PR terminals
Re: Connecting a VFD to Mach4 through Modbus (RS485)
« Reply #5 on: April 11, 2019, 09:09:16 AM »
BTW my spindle accelerate and decelerate measurements were done at 12000 RPM which is the sweet spot for most of my work, and they are only done by my eye. No formal measurement was done

Offline reuelt

*
  •  487 487
    • View Profile
Re: Connecting a VFD to Mach4 through Modbus (RS485)
« Reply #6 on: April 11, 2019, 07:35:34 PM »
Thank you.
Your VFD has impressive data even without connecting a huge external "Braking Resister" YET.
"the gift of God is eternal life through Jesus Christ our Lord"
Re: Connecting a VFD to Mach4 through Modbus (RS485)
« Reply #7 on: April 12, 2019, 01:01:15 AM »
Hi,
try doing it with high rotational inertia three phase motor, a fan say. If you try to decelerate too fast the VFD will
fault 'over voltage', and it will coast to a stop rather than trying to stop in the programmed time and wreck itself trying
to do so.

Craig
My wife left with my best friend...
     and I miss him!
Re: Connecting a VFD to Mach4 through Modbus (RS485)
« Reply #8 on: April 13, 2019, 01:30:43 AM »
Hi,
I cant find any specification from any manufacturer about the rotational inertia of the rotor of a 2.2kW asynchronous
spindle.

Rotational inertia is a specified parameter in servos and so I will use the servo data for a 2kW AC servo from Delta.
Its specified rotational inertia is:

0.00149 kg.m2  (more correctly called 'the first moment of inertia', usually given the symbol 'I')

Lets assume that if you had a direct coupled tool holder and smallish endmill that the rotational inertia would be approx:

0.002 kg.m2.

The kinetic energy of the rotor/toolholder/ tool combination  at 3000 rpm is:
E(joules)=0.5 x I (kg.m2). w2 (rad/sec) (note w is  the rotational speed in radians/second)
E=0.5 x 0.002 x (2 xPI x3000/60)2
E=98.7 joules

If the spindle were required to decelerate very quickly this kinetic energy would be fed back into the drive. In absence
of any braking resistance that energy would be added to the DC link capacitors. The voltage rise that would cause is:

E(Joules)= 0.5 X C (Farads, the capacitance of the link capacitors) x Vrise2

Rearranging and evaluating:

Vrise= (2 X 98.7/ 10000uF )1/2
Vrise=140.5V
Note for the purposes of this calculation I have assumed 10,000uF DC link capacitors, as is common in single phase
servo drives and VFDs.

Thus your DC links capacitors (on a 230V single phase driver) are normally charged to 320VDC, and because of the sudden
deceleration of the rotating component cause a voltage rise of 140.5V to a total of 460VDC. Note that the vast majority of
DC link capacitors, all aluminum electrolytic types, are rated to 450V. Thus your DC link capacitors are on the verge of blowing
up. This is exactly why braking resistors are required, to dissipate the kinetic energy WITHOUT the DC link capacitors
going over voltage.

My servo drive has a  braking resistor threshold of 340VDC and a safety threshold of 380VDC. Thus if the voltage increased to
340VDC the braking resistor MOSFET is switched on and the braking resistor is now directly across the DC link. If the
voltage further increases, ie the braking resistor does not 'hold the voltage  down' to 380VDC the servo drive faults
'over voltage' and switches off allowing the servo to coast to a stop.

If the deceleration is a matter of safety, ie the operator of the machine hit the Estop, we want the spindle to slow as quickly
as possible. If however you program a 'crash' stop the servo drive and braking resistor combination may not handle it and
shut down, allowing the servo to coast. This would be very bad design. In trying to decelerate we have caused the drive
to fault and therefore achieve a much lower deceleration than might have been possible had we allowed for the limited ability
of the driver/ resistor to absorb the energy.

Craig
« Last Edit: April 13, 2019, 01:37:51 AM by joeaverage »
My wife left with my best friend...
     and I miss him!
Re: Connecting a VFD to Mach4 through Modbus (RS485)
« Reply #9 on: April 15, 2019, 09:16:04 AM »
I agree with what Craig is saying, my spindle is larger (4.4Kw) and has an ATC so there is more inertia (with extra parts and tool holder). But my Delta VFD is able to stop it with a 1/2" bit loaded it will stop it in about 4 seconds but the voltage jumps to 360 to 370. I put on a breaking resistor and changed the time to 5 sec for accel and decel, and the voltage stays at 280 to 281 when in decel. I have put some large heavy bits in it and it still stays at the 280V mark.