- Posts: 31
- Thank you received: 9
2-speed spindle configuration - help
- Jaro
- Topic Author
- Offline
- Junior Member
-
I want to ask you for advice (I don't even know if it's possible), but linuxcnc is very good to bend.
I have two spindle speeds on my mil, which I change manually.
1. 400-4000rpm
2. 10-400rpm
the spindle is controlled by VFD 0-10V.
encoder 2048 pulses / rev
open loop
I would like the software to control the drive based on the required speed in two stages.
I tried to generate some configuration via PNCConf, but it doesn't work for me.
if I enter the G0 S300 M3 display and the spindle is switched to low speed, everything works correctly.
if I enter the display G0 S1000 M3 and the spindle is switched to high speed, its speed is 4000rpm
I thought linuxcnc would recognize the required speeds and drive VFD accordingly.
can anyone advise me how this is solvable. I tried to watch the older posts, but I wasn't wiser.
I am adding .ini and .hal (I apologize for the chaos, but I still did not get to clear both files).
linuxcnc 2.7.15
Thanks for help.
Jaro
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
-
- Posts: 19311
- Thank you received: 4655
My lathe has a 2-speed gearbox with electromagentic clutches and I control it with this custom hal component:
(Actually that isn't quite true as I have now modified that component to allow spindle-on gearchanges during G0 moves. But that wouldn't be necessary for a mill)
Note that the .comp is intended for a system with a 3-position high-low-auto switch for the gear ratio and a brake auto-off switch too.
Please Log in or Create an account to join the conversation.
- Jaro
- Topic Author
- Offline
- Junior Member
-
- Posts: 31
- Thank you received: 9
manual switching and I don't even have a sensor there.
there is only "low" and "high" speed position.
the point is that if I work with speeds up to 450rpm, I know that I need to manually switch the lever to the lower position, when I work with speeds above 450rpm to the upper position.
so far I haven't had a spindle speed scanner (actually a speedometer).
today I mounted a spindle encoder.
until now, I have worked by manually rewriting the spindle speed in .ngc.
for example, I wanted to drill at 400rpm, so I had to write about 3200rpm, because when the gear was switched to the "low speed" position, I actually got 400rpm at this speed.
therefore, I was interested in whether it is possible to solve this problem with respect to VFD on the basis of the required speeds.
it is essentially a matter of, for example:
G0 S400 (lever in low speed position) => 9.2V VFD
G0 S3200 (lever in high speed position) => 9.2V VFD
I thought this was exactly the "Range 1 Max RPM" and "Range 2 Max RPM" in Pncconf.
Jaro
Please Log in or Create an account to join the conversation.
- RotarySMP
- Offline
- Platinum Member
-
- Posts: 1630
- Thank you received: 595
Mark
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
-
- Posts: 19311
- Thank you received: 4655
Jaro wrote: manual switching and I don't even have a sensor there.
there is only "low" and "high" speed position.
My mill has 8 gears and no sensors, so I have the system work out for itself which gear it is in.
forum.linuxcnc.org/47-hal-examples/27071...gear-detection#39583
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
-
- Posts: 19311
- Thank you received: 4655
RotarySMP wrote: Hi Andy, how does it deal with speed changes across the switching threshold due to CSS facing cuts?
The changes I made were actually to handle CSS.
The idea is that it waits for a G0 move, de-asserts spindle-at-speed (causing a pause at the next G1) and then tries to match motor speed and gearbox speed on-the-fly (like double de-clutching a car) and then engages the clutch.
In practice, it has exactly the same problem as our 1916 fire engine on a hill, you can't change up because the spindle slows faster than the motor.
Please Log in or Create an account to join the conversation.
- Jaro
- Topic Author
- Offline
- Junior Member
-
- Posts: 31
- Thank you received: 9
today I tried to break up your "gearchange.comp"
by
www.forum.linuxcnc.org/10-advanced-confi...-configuring?start=0
can you advise me on configuration.
I do not use hy_vfd (huanyang vfd).
what to replace:
loadusr -W hy_vfd -d /dev/ttyUSB0
net spindle-at-speed hy_vfd.spindle-at-speed
net machine.on.delayed hy_vfd.enable
net spindle-enable hy_vfd.spindle-on gearchange.0.spindle-on
net spindle-cw hy_vfd.spindle-forward
net spindle-ccw hy_vfd.spindle-reverse
well thank you
Jaro
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
-
- Posts: 19311
- Thank you received: 4655
Please Log in or Create an account to join the conversation.
- Jaro
- Topic Author
- Offline
- Junior Member
-
- Posts: 31
- Thank you received: 9
Please Log in or Create an account to join the conversation.
- J Green
- Offline
- Elite Member
-
- Posts: 164
- Thank you received: 24
If so would you share your newer HAL an INI files ?
Thank's
Please Log in or Create an account to join the conversation.