2-speed spindle configuration - help

More
5 years 6 months ago #205345 by endian

If it is added to the servo thread it runs every 1mS.


i probably something missing but for 3 days I am looking for how should I correctly identify if is G96 or G97 shifted for next executing the program. But without any success. Do you know any right way where I can find this "information" or any temp for next using, which mode is actual for custom component please that what we talked about above?

Please Log in or Create an account to join the conversation.

More
5 years 6 months ago #205349 by andypugh
I don't know if you can tell.

Why do you need to know?

Please Log in or Create an account to join the conversation.

More
5 years 6 months ago - 5 years 6 months ago #205441 by endian
Just information if program will run in G96 or G97 for right gearchange at my lathe before I will turn on spindle

need to identify if is CSS or if is Constant RPMs. but in pin section of HAL configuration I can find any variable for it.
Last edit: 5 years 6 months ago by endian.

Please Log in or Create an account to join the conversation.

More
5 years 6 months ago #205451 by andypugh
I don't think that knowing CSS or not helps with gear choice, as you can't really tell if the G-code will be turning an OD or boring a hole.

Can your gearbox change gears "on the fly"? On my lathe I have electromagnetic clutches, and I allow a gear-shift during a G0 move.

Please Log in or Create an account to join the conversation.

More
5 years 6 months ago #205509 by endian
Let we start from beginning for better explanation.

I have converted lathe to cnc by mach3 and I have a lot of system fails and crashes from nothing. Then I discovered world of lcnc which looks to me better for every side.

I have lathe with gearbox with 2 speeds. 1st has gear ratio 1/6 and 2nd has gear ratio 1/1. Gearbox has not any clutch just manual lever in front panel with 3 stable position/0-500/Neutral/500-3000/... which you have to shift before spindle will turn on.

It is powered by vfd(0-10V) signal by 5.5kw asynchronous motor. It has not too much torque in low speeds below 300 rpms and if it will go in G96 mode in roughing cycle with high depth of cut I am afraid of it will stopped and I will crash the machine.

Old system does not give me any chance to change the gear during program running and therefore I had to shift right speed before program stared.

I found some rules of controlling, It was controlled by next rules:
1. program run in G96 mode runs only in gear ratio 1/1
2. program run in G97 S0-500 mode runs only in gear ratio 1/6
3. program run in G97 S500-3000 mode runs only in gear ratio 1/1

Command tells system : "G96 S120 /*buddy, there we have CSS, shift gear 1/1*/"

But in lcnc is possible other better way then was my old, I do not know if I am at right way and my solution is possible in lcnc.

Please Log in or Create an account to join the conversation.

More
5 years 6 months ago #205514 by andypugh
Firstly, I have a system much like yours. I have a manual override on the gearbox control switch, so I can lock it in high or low.
You don't need that. Can you trust the operator to know when to ignore the request to change gear?

G-code can read back the mode: linuxcnc.org/docs/2.8/html/gcode/overvie...ub:system-parameters
As can Python: linuxcnc.org/docs/2.8/html/config/python...xcnc_stat_attributes (see the "gcodes" attribute)

If you want the mode as a HAL pin, then you can probably use Gstat to create it, see the first example here:
linuxcnc.org/docs/2.8/html/gui/GStat.html
And the "css-mode"callback.

I am not 100% sure that the GStat HAL pin and the change in S would be synchronised.

What might work better would be to remap the S command to call a Python script. This could look at the speed command and the css mode and set things accordingly.
linuxcnc.org/docs/2.8/html/remap/remap.h...ng_codes_s_m0_m1_m60
(Remapping is a big and complex subject, however)

What should also work is a modified version of hal_manualtoolchange that is triggered by the spindle turning on, and which looks at the G-codes status before deciding which message to display.

So, in summary I can think of at least 5 ways to do what you ask, and I am not sure which would work best for you.

At this point I would suggest separating the messaging from the motor speed calculation. Leave the HAL component as it is, just calculating motor speed based on lever position.

Please Log in or Create an account to join the conversation.

Time to create page: 0.164 seconds
Powered by Kunena Forum