Spinx1 to 7i85
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23559
- Thank you received: 4858
02 Dec 2015 20:04 #66223
by andypugh
Actually, you probably only need a bit of I gain to make up for nonlinearity. Try tuning the I-gain at a low rpm, then switch to a high rpm. You want the rpm to correct to the right number quickly, but not to over-shoot on large changes.
My lathe spindle is currently mis-tuned, I need to fix it. when the X backs out on a CSS facing cut the rpms don't drop as quickly as the I-term increases, so when the X finally gets to the large diameter the I-term has "wound up" such that the spindle actually stops, then has to accellerate again.
So, tune the I-gain so that that doesn't happen to you
Replied by andypugh on topic Spinx1 to 7i85
Okay, just adjusted the FF0 to give me 60 hz at s1765. That works!! Doing the PID in the terminal is awesome.
What is next? FF1, FF2?
Actually, you probably only need a bit of I gain to make up for nonlinearity. Try tuning the I-gain at a low rpm, then switch to a high rpm. You want the rpm to correct to the right number quickly, but not to over-shoot on large changes.
My lathe spindle is currently mis-tuned, I need to fix it. when the X backs out on a CSS facing cut the rpms don't drop as quickly as the I-term increases, so when the X finally gets to the large diameter the I-term has "wound up" such that the spindle actually stops, then has to accellerate again.
So, tune the I-gain so that that doesn't happen to you
Please Log in or Create an account to join the conversation.
- OT-CNC
- Offline
- Platinum Member
Less
More
- Posts: 623
- Thank you received: 75
02 Dec 2015 22:41 #66238
by OT-CNC
Replied by OT-CNC on topic Spinx1 to 7i85
Slow speed is off. Spindle is pulsating a bit at S1. In the hal configuration I can watch signals spindle-vel-cmd .0166, spindle-vel-pid .0169 and spindle-vel at .14 to .23 with a range of .3 to .5hz or so on the VFD. I set the min rpm internally on the VFD to .01hz. My open loop config gets me closer on the low end. How do I improve the low end rpm?
I think the mid range is good at S1765, the corresponding vel-cmd, vel-pid and spindle-vel numbers are now at 29.41,29.82 and fluctuating around 30. This is with FF0 set at 1.014.
The high range at S3555, 59.25, 60.07, vel fluctuating around 59. VFD at around 118Hz. Seems close enough.
Looking at the same numbers change as I ramp the spindle up/down I don't see the velocity overshoot. This is without I or P. The motor sounds unhappy with P or I introduced even at low numbers like .01. I haven't yet looked at it on the scope.
My current ramp up speed within the vfd is around 4 sec 0 to 3550rpm. The VFD internal PID parameters need more adjusting as well. Do you recommend leaving the ramp up speed as is or increase it and have linuxcnc do the soft start/ramp up? What is common practice?
I think the mid range is good at S1765, the corresponding vel-cmd, vel-pid and spindle-vel numbers are now at 29.41,29.82 and fluctuating around 30. This is with FF0 set at 1.014.
The high range at S3555, 59.25, 60.07, vel fluctuating around 59. VFD at around 118Hz. Seems close enough.
Looking at the same numbers change as I ramp the spindle up/down I don't see the velocity overshoot. This is without I or P. The motor sounds unhappy with P or I introduced even at low numbers like .01. I haven't yet looked at it on the scope.
My current ramp up speed within the vfd is around 4 sec 0 to 3550rpm. The VFD internal PID parameters need more adjusting as well. Do you recommend leaving the ramp up speed as is or increase it and have linuxcnc do the soft start/ramp up? What is common practice?
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23559
- Thank you received: 4858
02 Dec 2015 23:19 #66240
by andypugh
So, try smaller
.0166 command and .14 actual is an error of .13
.13 X 0.01 IGain is .0013 per servo cycle, or 1.3 rps/s so that IGain is going to be ramping at 78rpm/sec.
However, do you really intend to run at 1 rpm? I think that you are likely to end up mis-tuned at practical speeds.
Replied by andypugh on topic Spinx1 to 7i85
The motor sounds unhappy with P or I introduced even at low numbers like .01.
So, try smaller
.0166 command and .14 actual is an error of .13
.13 X 0.01 IGain is .0013 per servo cycle, or 1.3 rps/s so that IGain is going to be ramping at 78rpm/sec.
However, do you really intend to run at 1 rpm? I think that you are likely to end up mis-tuned at practical speeds.
Please Log in or Create an account to join the conversation.
- OT-CNC
- Offline
- Platinum Member
Less
More
- Posts: 623
- Thank you received: 75
16 Aug 2016 15:24 #78872
by OT-CNC
Replied by OT-CNC on topic Spinx1 to 7i85
I finally completed the x axis for this lathe and I'm getting back to configuring Linuxcnc. Sorry to resurrect this old thread, I need some clarification on lathe spindle rotation.
Looking at the axis gui, the CCW and CW spindle rotation buttons correspond to the spindle rotation in what view? Is the CW button rotating the spindle CW when facing the spindle or looking down the spindle from the back of the lathe? Traditional lathe with spindle on the left positive x towards operator.
Looking at the axis gui, the CCW and CW spindle rotation buttons correspond to the spindle rotation in what view? Is the CW button rotating the spindle CW when facing the spindle or looking down the spindle from the back of the lathe? Traditional lathe with spindle on the left positive x towards operator.
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23559
- Thank you received: 4858
16 Aug 2016 16:21 #78883
by andypugh
CW and CCW is a bit of a misnomer. FWD and REV would make more sense.
I haven't really looked hard at the buttons in Axis, but FWD is CW looking along positive Z.
Replied by andypugh on topic Spinx1 to 7i85
Looking at the axis gui, the CCW and CW spindle rotation buttons correspond to the spindle rotation in what view?.
CW and CCW is a bit of a misnomer. FWD and REV would make more sense.
I haven't really looked hard at the buttons in Axis, but FWD is CW looking along positive Z.
Please Log in or Create an account to join the conversation.
- OT-CNC
- Offline
- Platinum Member
Less
More
- Posts: 623
- Thank you received: 75
16 Aug 2016 17:39 #78897
by OT-CNC
Replied by OT-CNC on topic Spinx1 to 7i85
Andy
Thanks. So essentially the spindle rotation on a standard lathe, forward is CCW when directly looking at the spindle/chuck, which is the same as CW when looking in the positive Z direction facing towards the tail stock. M3 is Forwrd(CW) M4 Reverse(CCW).
I made the mistake of setting things up reflecting the axis rotation buttons as in looking at the spindle. This is really rudimentary, it would be nice to have a diagram in the docs to refer back to.
If got this right, I need to reverse my spindle. What is the easiest way to reconfigure this? As is, my encoder count increases in M3 .
Will this convention be correct for c-axis work?
Thanks. So essentially the spindle rotation on a standard lathe, forward is CCW when directly looking at the spindle/chuck, which is the same as CW when looking in the positive Z direction facing towards the tail stock. M3 is Forwrd(CW) M4 Reverse(CCW).
I made the mistake of setting things up reflecting the axis rotation buttons as in looking at the spindle. This is really rudimentary, it would be nice to have a diagram in the docs to refer back to.
If got this right, I need to reverse my spindle. What is the easiest way to reconfigure this? As is, my encoder count increases in M3 .
Will this convention be correct for c-axis work?
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23559
- Thank you received: 4858
16 Aug 2016 22:45 #78912
by andypugh
You would normally expect M3 to turn the spindle the correct direction for conventional turning operations. That would be my starting-point.
Replied by andypugh on topic Spinx1 to 7i85
If got this right, I need to reverse my spindle. What is the easiest way to reconfigure this? As is, my encoder count increases in M3 .
You would normally expect M3 to turn the spindle the correct direction for conventional turning operations. That would be my starting-point.
Please Log in or Create an account to join the conversation.
- OT-CNC
- Offline
- Platinum Member
Less
More
- Posts: 623
- Thank you received: 75
18 Aug 2016 12:52 #78991
by OT-CNC
Replied by OT-CNC on topic Spinx1 to 7i85
I corrected my rotation. I just changed the wiring to the vfd and reversed the encoder in the ini.
I'm trying to run some test programs. The machine hangs at g76. Specifically, line 102 (g76) running the lathe-g76.ngc program.
I know there is something off or missing with the spindle. What should I look at first?
I'm trying to run some test programs. The machine hangs at g76. Specifically, line 102 (g76) running the lathe-g76.ngc program.
I know there is something off or missing with the spindle. What should I look at first?
Please Log in or Create an account to join the conversation.
- Clive S
- Offline
- Platinum Member
Less
More
- Posts: 2241
- Thank you received: 476
18 Aug 2016 13:35 #78992
by Clive S
That was my problem. Thanks to cncbasher for the solution.
Replied by Clive S on topic Spinx1 to 7i85
I might be sticking my neck out a bit here But I had a similar issue and was advised that the encoder might be counting backwards so the G76 hung as it did not know that the spindle was up to speed. Also I think you need the S peram in the Gcode to be near the spindle speed you are using.I The machine hangs at g76. Specifically, line 102 (g76) running the lathe-g76.ngc program.
That was my problem. Thanks to cncbasher for the solution.
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23559
- Thank you received: 4858
18 Aug 2016 13:53 #78994
by andypugh
Is it waiting for index? what is the value of spindle.index-enable at the point where it is hung?
Replied by andypugh on topic Spinx1 to 7i85
The machine hangs at g76. Specifically, line 102 (g76) running the lathe-g76.ngc program.
Is it waiting for index? what is the value of spindle.index-enable at the point where it is hung?
Please Log in or Create an account to join the conversation.
Moderators: PCW, jmelson
Time to create page: 0.090 seconds