Can EMC2 control machine with independent spindles
The machine has X linear axis and A angular, on the X axis there's a portal with
1. Spindle mounted on the Z1 axis for dirty cycle.
2. Spindle mounted on Y and Z2 linear axis and B angular axis for final cycle.
Is there any way to control such machine with EMC2.
Please Log in or Create an account to join the conversation.
I have a combination mill/lathe with two motors running from the same VFD. I use an EMC2-controlled relay to switch between the two motors.
Using the HAL component "gearchange" you can easily set up different pwm-to-spindle speed calibrations for the two options.
You would then use either an M-code or a G-code digital output to swap spindles. I think that the custom M-code approach would probably work best in this case.
You just need to create two files called (for example) M101 and M102 assuming that the changeover relay is controlled via pin 1 of the parport.
M101 should look a bit like:
#!bin/bash
halcmd setp parport.0.pin-01-out 1
And M102 could be
#!bin/bash
halcmd setp parport.0.pin-01-out 0
You could add other halcmd and generic bash lines to check that the spindle was stopped before switching spindles, for example.
Then you would use M101 and M102 in the G-code program to swap spindles.
Please Log in or Create an account to join the conversation.
And we need to control two spindles a time. So the first one goes 100 mm ahead of the second and makes dirty cut. This machine makes long timbers for house building. And looks like a very long lathe with two mill spindles as a cutters.
Thanks for the quick answer!
Please Log in or Create an account to join the conversation.
If you always want to use both spindles at the same time, at the same speed, or at a fixed ratio, then it is fairly easy, just link the motion.spindle-speed-out pin in HAL to two PWM generators with different input scales (or fix the scales in the VFD setups).
You could also link the PWM scales to Pyvcp input boxes or dials in the GUI.
If the G-code needs to control the second spindle speed directly, then I think you would need to control it with M67 analog output rather than S so that a typical line of G code to set one spindle to 1000rpm and the other to 3000 would be
S1000 M67 E0 Q3000
Please Log in or Create an account to join the conversation.
And how should the Gcode looks like?
Please Log in or Create an account to join the conversation.
As well as the X, Y and Z axes, G-code allows you to use A, B and C (normally rotary) and U, V and W axes too.
So, if your machine has two spindles that share X and Y but have independent Z control, one would be Z and the other W in the G-code
Please Log in or Create an account to join the conversation.
So I have one spindle on XA YZ
And another one on XA BCW.
What about feed rates and rapid moves, how they will be calculated?
Should I make special hal configuration for them?
Please Log in or Create an account to join the conversation.
Are you sure you don't mean XA BUW?They share two axis, one rotary (lathe's main axis) and one linear X, others are not shared
So I have one spindle on XA YZ
And another one on XA BCW.
Not that it matters, EMC2 doesn't actually mind you using ABC words for linear axes if you want to.
A picture would help
Good question. I have a feeling that I read sometime that the UVW axis speeds are not part of the velocity calculations, but I think this just means that the net linear velocity will not be reduced to respect their speed limits.What about feed rates and rapid moves, how they will be calculated?
There is a development branch of EMC2 which is intended to rationalise the way EMC2 treats complex machines like this, and that might address this issue, if there is actually a problem.
I think you would _have_ to use inverse time mode rather than linear speed mode to get sensible feed rates.
In inverse time mode G1 U30 V20 A10 X12 F2 would mean "move all axes to the requested position in 0.5 seconds"
Yes, this is definitely going to be a special configuration, but you could create an XYZA machine with stepconf or pncconf as a basis, then edit the INI and HAL by hand (copy and paste) to create the extra axes.Should I make special hal configuration for them?
Please Log in or Create an account to join the conversation.
If you want to use two spindles at the same time, then things are a little bit harder. Not because of a limitation of EMC2, but because of a limitation of G-code. G-code has only one "S" word, to control the speed of only one spindle.
If you always want to use both spindles at the same time, at the same speed, or at a fixed ratio, then it is fairly easy, just link the motion.spindle-speed-out pin in HAL to two PWM generators with different input scales (or fix the scales in the VFD setups).
You could also link the PWM scales to Pyvcp input boxes or dials in the GUI.
If the G-code needs to control the second spindle speed directly, then I think you would need to control it with M67 analog output rather than S so that a typical line of G code to set one spindle to 1000rpm and the other to 3000 would beS1000 M67 E0 Q3000
Hi
Is it possible to synchronize the two rotary axes in the same way as for tapping on a milling machine?
Tomasz
P.S.
Sorry for my bad english.
Please Log in or Create an account to join the conversation.
Is it possible to synchronize the two rotary axes in the same way as for tapping on a milling machine?
There are ways, but the details would depend on exactly what you are trying to do.
I sometimes slave a rotary axis to the spindle for gear hobbing, for example.
Please Log in or Create an account to join the conversation.