- Posts: 261
- Thank you received: 0
Gearchange configuring
Ok project goes on and it is time to consider spindle and gear changing. This has two gears 1st gear is lowered 1:6 and second gear is 1:1. We can rotate our spindle motor with VFD from 100-3600 RPM. VFD runs motor in closed loop.(But it will be open loop between VFD and LinuxCNC) So 1st gear speed range is 100-600 and second gear range 600-3600 rpm. Will gearchange component work with this combo? Any examples ?
Tero
Please Log in to join the conversation.
If you want to get fancy you might be able to auto-detect the gear:
forum.linuxcnc.org/forum/47-hal-examples...indle-gear-detection
Please Log in to join the conversation.
I have been studying this and I would like to have auto gear selection, ie. if under 600 RPM is needed then low gear is selected and output to engage low gear hydraulic solenoid is activated. If over 600 is needed then high gear is selected. Gear switching is only possible when spindle is still. Would it be simple solution to modify gearchange component a bit? Also we have to check limit switch for correct gear is activated before enable is output.
Is feedback of spindle absolutely necessary? I have only encoder on input shaft(before gearbox). Encoder has A,B,Z pulses. A and B are already used by VFD for closed loop control. Encoder output is push-pull by OL7272 line driver. Can I build feedback with these and Mesa 7i84? Or 7i70?
Tero
Please Log in to join the conversation.
terkaa wrote: Ok,
I have been studying this and I would like to have auto gear selection, ie. if under 600 RPM is needed then low gear is selected and output to engage low gear hydraulic solenoid is activated. If over 600 is needed then high gear is selected. Gear switching is only possible when spindle is still. Would it be simple solution to modify gearchange component a bit?
Which "gearchange component" ? The one included with LinuxCNC isn't really ideal for your situation.
A better solution is the system I have on my lathe (I didn't realise you had an electronically controlled gearbox).
It uses this HAL component (confusingly also called "gearchange"):
You can save the file as gearchange.comp then install it on your system with
It allows for manual over-ride to high or low (in my case with a three-way switch) and also allows for manual or auto brake engagement (again, controlled by a switch on my machine).
This is the HAL.
Attachment not found
Please Log in to join the conversation.
This is what I am looking for thank you. I am a bit confused by line:
net spindle-enable hy_vfd.spindle-on gearchange.0.spindle-on
according to hy_vfd manpage spindle-on is input also gearchange.0.spindle-on is an input??
Should I connect motion.spindle-on => gearchange.0.spindle-on
Tero
Please Log in to join the conversation.
terkaa wrote: This is what I am looking for thank you. I am a bit confused by line:
net spindle-enable hy_vfd.spindle-on gearchange.0.spindle-on
There are three lines connecting up the spindle-enable signal. You can keep adding things to a net, and even spread the net commands through several separate HAL files.
Please Log in to join the conversation.
Tero
Please Log in to join the conversation.
terkaa wrote: But when using manual buttons for some reason CCW rotation always engages low gear.... I have to check why.
That is why I added the manual-high and manual-low inputs. The manual spindle buttons start the spindle at 100 rpm, and go up in increments. Once the spindle is running the component won't change gear.
Or, to put it another way, the component has no way to tell what speed you intend to go to when you first start the spindle with the manual buttons.
Please Log in to join the conversation.
Tero
Please Log in to join the conversation.
terkaa wrote: It does that also after rotating spindle with MDI commands. Reason is that I used motion.spindle-speed-out it outputs negative numbers when rotating ccw. I fixed this by editing gearchange component. to check if speed-command is between negative and positive value.
Ah
else if (manual_low){
high_gear = 0;
low_gear = 1;
brake = 0;
} else if (absf(speed_command) <= max_low){
high_gear = 0;
low_gear = 1;
brake = 0;
Please Log in to join the conversation.
