- Posts: 106
- Thank you received: 0
Electronic spindle gearbox
- microsprintbuilder
- Topic Author
- Offline
- Premium Member
-
Please Log in to join the conversation.
One possibility might be to divide the spindle speed request by 3, then convert that to int, and use as the input to a mux_generic to select an int containing the required bit-pattern for the inputs and relays, then split that into bits with the bitslice comp.
(or, simply use a stack of bit-type muxes all connected to the same input).
The problem with this idea is that some hysteresis would be needed, somehow, or 2500rpm would probably dither between ranges. "deadzone" might be right, working on the float-type spindle speed before it gets interpreted as an int.
On reflection, I would probably write a custom component, as this is sounding like an untidy tangle of HAL.
Please Log in to join the conversation.
- microsprintbuilder
- Topic Author
- Offline
- Premium Member
-
- Posts: 106
- Thank you received: 0
Please Log in to join the conversation.
microsprintbuilder wrote: I've never used the custom component generator. I'll look into that. Got any tips on getting started?
Well, reading the manpage first, I guess:
www.linuxcnc.org/docs/html/hal/comp.html
Or, if you are using 2.6 / Master:
www.linuxcnc.org/docs/devel/html/hal/comp.html
(The name of the program has changed to save confusion, and to prevent people installing the (unhelpful) suggestion from Ubuntu)
Can the gearbox change gear under load, or should the component only change range with the spindle off?
A general purpose component would need to allow for any number of gears with a max and min speed for each, but you can probably hard-code the behaviour.
Should the component wait after changing gear before allowing the motor to turn back on?
Do you have a table of required outputs for each spindle speed range?
Please Log in to join the conversation.
- microsprintbuilder
- Topic Author
- Offline
- Premium Member
-
- Posts: 106
- Thank you received: 0
As far as the spindle goes if you change ranges the the spindle does needs to stop so the relays can change the wiring configuration. With the old control there was a tiny delay before turning on, Maybe two seconds. The drive has three 24 volt inputs to select range and then the rpm's are variable dependent on + or - 5 volt input
Please Log in to join the conversation.
microsprintbuilder wrote: Yes, I read that and as normal with me it will take a wile for me to figure it out.
Untested. Completely untested:
Please Log in to join the conversation.
- microsprintbuilder
- Topic Author
- Offline
- Premium Member
-
- Posts: 106
- Thank you received: 0
Please Log in to join the conversation.
microsprintbuilder wrote: I'm looking at this with a blank stare and have a few questions. I make a file with the above text in ( linuxcnc/src/hal/components ) and call it electronic gearbox. then in hal, I place loadrt electronic gearbox and then I define the relay 1,2 & 3 to my outputs?
Nearly. You would need to compile / install the new component using the "comp" tool.
www.linuxcnc.org/docs/html/hal/comp.html
Or, if you are using the development version, it has changed its name:
www.linuxcnc.org/docs/devel/html/hal/comp.html
Please Log in to join the conversation.
- microsprintbuilder
- Topic Author
- Offline
- Premium Member
-
- Posts: 106
- Thank you received: 0
Please Log in to join the conversation.
And then the hal file can contain "loadrt ebox"
Please Log in to join the conversation.
