- Posts: 1
- Thank you received: 0
gearchange
- rakic8
- Topic Author
- Offline
- New Member
-
Please Log in or Create an account to join the conversation.
- pl7i92
- Offline
- Platinum Member
-
- Posts: 1871
- Thank you received: 358
but you can also use a simple logic to do it
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
-
- Posts: 19311
- Thank you received: 4655
Install it with "sudo halcompile --install gearchange.comp"
That should also generate documentation.
Please Log in or Create an account to join the conversation.
- anfänger
- Offline
- Platinum Member
-
- Posts: 648
- Thank you received: 267
@andypugh do you have an hal example?
I want to use it for my lathe which has 24 gears (3x4 manually switched and and two by an electic controlled hydraulic clutch) To make this more fun I added a VFD and now need a way to scale the output.
thanks Patrick
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
-
- Posts: 19311
- Thank you received: 4655
For your setup I think that you would need some HAL logic to convert the 3 inputs into a gear number. Or you could modify the component to suit your system.
As it stands the component expects either an integer number for the selected gear, or a single input bit to be set for each gear. Your system has 8 inputs but they are used in combinations. You could potentially wire pairs of switches to each lever to give binary patterns to be sent to a weighted-sum component, but I think that modifying the component above to have three sets of input bits would be better.
It might actually be easier to use the VFD speed and measured spindle speed to auto-detect the selected gear. (Better still would be to use a speed sensor or encoder on the motor). This is what I do with my milling machine which has 8 gears.
Please Log in or Create an account to join the conversation.
- anfänger
- Offline
- Platinum Member
-
- Posts: 648
- Thank you received: 267
I found thread of yours:
forum.linuxcnc.org/47-hal-examples/27071...indle-gear-detection
but I didn't understand it completely yet
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
-
- Posts: 19311
- Thank you received: 4655
This might not be necessary with a modbus-controlled VFD. The one on my mill is controlled by analogue voltage so I don't have the actual motor speed, just the commanded.
Please Log in or Create an account to join the conversation.
- anfänger
- Offline
- Platinum Member
-
- Posts: 648
- Thank you received: 267
Couldn't I calculate from the voltage and the rpm of the motors it speed.
can't simply set the gear with an hal input
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
-
- Posts: 19311
- Thank you received: 4655
anfänger wrote: yea same here. just analog out. But I think it can talk modbus. but why would this be better compared to an analog control?
With Modbus the VFD reports back the current speed. With analogue control your motor speed is only the programmed speed once the ramp up and ramp-down have finished.
can't simply set the gear with an hal input
Is that a question or a statement? You certainly could enter the currently-selected gear in a VCP box and connect that to the gearchange comp in HAL, but that seems inelegant.
My lathe has only two gears, I think that I am glad about that
Please Log in or Create an account to join the conversation.
- anfänger
- Offline
- Platinum Member
-
- Posts: 648
- Thank you received: 267
I am slowly getting an idea how I can build something to automatically change the manual gears
Please Log in or Create an account to join the conversation.