G95 feed not working with 2nd spindle
15 Jun 2023 10:44 #273600
by Henk
G95 feed not working with 2nd spindle was created by Henk
HI
I have a lathe with a sub spindle. Retrofitted last year, but never used the sub spindle.
I have a problem though. I cannot get any axis to feed in G95 mode with the sub spindle runing.
Code excecuted in MDI as follows:
G96 S120 D1000 M3 $1
G95 F0.2
G1 x0
According to the docs, G95 should also get a $1, but it returns an error when "G95 F0.2 Q1", which states that there is a $1 without a G code to use it, the error even states that there is no G95 to use it.....wierd
I verified that the spindle position feedback is correct, spindle.1.revs, as well as spindle.0.at-speed
When i start the main spindle, the machine feeds as normal.
Henk
I have a lathe with a sub spindle. Retrofitted last year, but never used the sub spindle.
I have a problem though. I cannot get any axis to feed in G95 mode with the sub spindle runing.
Code excecuted in MDI as follows:
G96 S120 D1000 M3 $1
G95 F0.2
G1 x0
According to the docs, G95 should also get a $1, but it returns an error when "G95 F0.2 Q1", which states that there is a $1 without a G code to use it, the error even states that there is no G95 to use it.....wierd
I verified that the spindle position feedback is correct, spindle.1.revs, as well as spindle.0.at-speed
When i start the main spindle, the machine feeds as normal.
Henk
Please Log in or Create an account to join the conversation.
15 Jun 2023 10:57 #273601
by Henk
Replied by Henk on topic G95 feed not working with 2nd spindle
Was running 2.8.3, upgraded to 2.8.4, still the same issue
Henk
Henk
Please Log in or Create an account to join the conversation.
15 Jun 2023 11:30 #273602
by spumco
Replied by spumco on topic G95 feed not working with 2nd spindle
Unless that was a typo in your post, I think you also need a spindle.1.at-speed signal triggered for the sub to start moving.I verified that the spindle position feedback is correct, spindle.1.revs, as well as spindle.0.at-speed
Please Log in or Create an account to join the conversation.
15 Jun 2023 12:31 #273607
by Henk
Replied by Henk on topic G95 feed not working with 2nd spindle
Indeed a typo, sorry for that.
spindle.1.at-speed is working properly
spindle.1.at-speed is working properly
Please Log in or Create an account to join the conversation.
18 Jun 2023 09:49 #273772
by Henk
Replied by Henk on topic G95 feed not working with 2nd spindle
Well, had some time to test this further...
I am of the opinion that my config is correct.
I verified that the same issue on the sim.axis.lathe_multispindle.
execute the following in MDI after homeing
g21 g0 x50
g96 s140 d5000 $1
m3$1
g95 f0.2
g1 x0
Error: Cannot feed with zero spindle speed in feed per rev mode
Trying g95 $1 f0.2 results in error "$ (spindle selection) word with no G41, G41.1, G42, G42.1, G76, G95 or G96 to use it"
I am of the opinion that my config is correct.
I verified that the same issue on the sim.axis.lathe_multispindle.
execute the following in MDI after homeing
g21 g0 x50
g96 s140 d5000 $1
m3$1
g95 f0.2
g1 x0
Error: Cannot feed with zero spindle speed in feed per rev mode
Trying g95 $1 f0.2 results in error "$ (spindle selection) word with no G41, G41.1, G42, G42.1, G76, G95 or G96 to use it"
Please Log in or Create an account to join the conversation.
18 Jun 2023 15:25 - 18 Jun 2023 15:44 #273785
by spumco
Replied by spumco on topic G95 feed not working with 2nd spindle
Interesting. Sounds like maybe you found a bug.
I'll try the axis sim on my VM and see if I can reproduce.
EDIT
I can reproduce.
I don't really know what I'm doing, but I'll look in the motion comp and see if I spot something obvious. I think it's time to report on github and see if a dev or someone savvy can dig in to this.
I'll try the axis sim on my VM and see if I can reproduce.
EDIT
I can reproduce.
- Same code works as expected for spindle 0 but not with spindle 1.
- spindle-at-speed goes high for both spindles
- changing from m3$1 to m4$1 results no error message - but no axis movement (like it's waiting for spindle-at-speed)
I don't really know what I'm doing, but I'll look in the motion comp and see if I spot something obvious. I think it's time to report on github and see if a dev or someone savvy can dig in to this.
Last edit: 18 Jun 2023 15:44 by spumco.
The following user(s) said Thank You: Henk
Please Log in or Create an account to join the conversation.
18 Jun 2023 16:07 #273787
by Henk
Replied by Henk on topic G95 feed not working with 2nd spindle
Thank you for verifying.
I'll see if I can report it on github. Never done that before.
I'll see if I can report it on github. Never done that before.
Please Log in or Create an account to join the conversation.
04 Jul 2023 18:40 #274774
by Henk
Replied by Henk on topic G95 feed not working with 2nd spindle
Hi
I managed to load the issue on github: https:// github.com/LinuxCNC/linuxcnc/issues/2530, and i see andy assigned himself to it, thanks Andy for your valuable contribution BTW...
For now, i found a workaround.
I used a mux4 to channel the vel-fb from each spindle to spindle.0.speed-in depending on which spindle is running by linking spindle.0.on and spindle.1.on to mux4.0.sel0 and sel1 respectively.
spindle.0.speed-in = spindle 0 vel fb when spindle 0 is running and spindle 1 is off
spindle.0.speed-in = spindle 1 vel fb when spindle 1 is running and spindle 0 is off
spindle.0.speed-in = spindle 0 vel fb when both spindles are running
Henk
I managed to load the issue on github: https:// github.com/LinuxCNC/linuxcnc/issues/2530, and i see andy assigned himself to it, thanks Andy for your valuable contribution BTW...
For now, i found a workaround.
I used a mux4 to channel the vel-fb from each spindle to spindle.0.speed-in depending on which spindle is running by linking spindle.0.on and spindle.1.on to mux4.0.sel0 and sel1 respectively.
spindle.0.speed-in = spindle 0 vel fb when spindle 0 is running and spindle 1 is off
spindle.0.speed-in = spindle 1 vel fb when spindle 1 is running and spindle 0 is off
spindle.0.speed-in = spindle 0 vel fb when both spindles are running
Henk
Please Log in or Create an account to join the conversation.
05 Jul 2023 11:39 #274820
by spumco
Replied by spumco on topic G95 feed not working with 2nd spindle
Tangent question related to your 2nd spindle...
Can you synchronize the two spindles (i.e. for parting & hand-off), and if so how are you doing it? I've read a few threads from people with lathe subspindles but none had specifics on this function (that I can remember).
I've only found one YT vid showing LCNC controlling a subspindle - but there was no explanation or details available on the config or setup.
Can you synchronize the two spindles (i.e. for parting & hand-off), and if so how are you doing it? I've read a few threads from people with lathe subspindles but none had specifics on this function (that I can remember).
I've only found one YT vid showing LCNC controlling a subspindle - but there was no explanation or details available on the config or setup.
Please Log in or Create an account to join the conversation.
06 Jul 2023 09:49 #274886
by Henk
Replied by Henk on topic G95 feed not working with 2nd spindle
Well, that is my next step.
The spindle drives are analog 0-10v, and my scaling is close, but not close enough.
2 ideas i want to try...
1. command both spindles using a PID each to control the velocity as close as possible to the commanded speed
2. use a PID that is activated with an Mcode to control the 2nd spindle velocity using the main spindle vel feedback as an input., or maybe just the difference between vel-cmd and vel-fb, and sum the output from this PID with the sub spindle vel-cmd.
What is more complicated though, if you are turning a large part held by both spindles, is to control the torque on each so that they both take their share of the required torque, not sure how to do that.... will probably require torque feedback from the drives....
The spindle drives are analog 0-10v, and my scaling is close, but not close enough.
2 ideas i want to try...
1. command both spindles using a PID each to control the velocity as close as possible to the commanded speed
2. use a PID that is activated with an Mcode to control the 2nd spindle velocity using the main spindle vel feedback as an input., or maybe just the difference between vel-cmd and vel-fb, and sum the output from this PID with the sub spindle vel-cmd.
What is more complicated though, if you are turning a large part held by both spindles, is to control the torque on each so that they both take their share of the required torque, not sure how to do that.... will probably require torque feedback from the drives....
The following user(s) said Thank You: spumco
Please Log in or Create an account to join the conversation.
Time to create page: 0.087 seconds