Fighting the PID!
07 Mar 2018 00:38 #107062
by JohnnyCNC
Replied by JohnnyCNC on topic Fighting the PID! Success!
Andy and PCW Thank you both for the help with my spindle setup. 3000 rpm was the one that was right from the start with only FF0 =1.
With these settings the spindle speed is pretty good throughout the range. Higher speeds 2000+ are better than that the lower speeds but I trust it enough to make chips with it. Now my spindle-at-speed signal needs a little tweaking after reading some docs the other night I think I understand how to get that working correctly . After that it is on to stopping motion if the spindle faults and getting the E-Stop finished.
P = 0
I = .9
D = 0
FF0 = 1.0
FF1 = 0.0
FF2 = 0.00
Thank guys
John
With these settings the spindle speed is pretty good throughout the range. Higher speeds 2000+ are better than that the lower speeds but I trust it enough to make chips with it. Now my spindle-at-speed signal needs a little tweaking after reading some docs the other night I think I understand how to get that working correctly . After that it is on to stopping motion if the spindle faults and getting the E-Stop finished.
P = 0
I = .9
D = 0
FF0 = 1.0
FF1 = 0.0
FF2 = 0.00
Thank guys
John
Please Log in or Create an account to join the conversation.
12 Mar 2018 01:42 - 12 Mar 2018 01:47 #107234
by JohnnyCNC
Replied by JohnnyCNC on topic Fighting the PID! Now running lincurve.
Although I got the PID basically working the spindle speed wasn't as stable as I would like so I decided to give lincurve try. Now I am happy with the spindle. I thought I would post this here in the event that someone else goes down the same road that I did. Maybe this will help them find the info a little sooner. Below are the lincurve related hal entries.
lincurve documentation
loadrt lincurve personality=16
addf lincurve.0 servo-thread
#Enter the commanded (Desired) speed in the lincurve.0.x-val-NN entries
#Enter the command required to achieve the desired speed in lincurve.0.y-val-NN.
#Where NN is 00 - 15
#To start make the lincurve pair equal. Then test each speed and adjust lincurve.0.y-val as needed.
#Ii found that I had to make a couple of passes through this process to get everything where I wanted it
setp lincurve.0.x-val-00 1000
setp lincurve.0.y-val-00 1105
setp lincurve.0.x-val-01 1250
setp lincurve.0.y-val-01 1310
setp lincurve.0.x-val-02 1500
setp lincurve.0.y-val-02 1505
setp lincurve.0.x-val-03 1750
setp lincurve.0.y-val-03 1720
setp lincurve.0.x-val-04 2000
setp lincurve.0.y-val-04 1950
setp lincurve.0.x-val-05 2250
setp lincurve.0.y-val-05 2150:)
setp lincurve.0.x-val-06 2500
setp lincurve.0.y-val-06 2360
setp lincurve.0.x-val-07 2750
setp lincurve.0.y-val-07 2570
setp lincurve.0.x-val-08 3000
setp lincurve.0.y-val-08 2780
setp lincurve.0.x-val-09 3250
setp lincurve.0.y-val-09 3000
setp lincurve.0.x-val-10 3500
setp lincurve.0.y-val-10 3210
setp lincurve.0.x-val-11 3750
setp lincurve.0.y-val-11 3425
setp lincurve.0.x-val-12 4000
setp lincurve.0.y-val-12 3640
setp lincurve.0.x-val-13 4250
setp lincurve.0.y-val-13 3855
setp lincurve.0.x-val-14 4500
setp lincurve.0.y-val-14 4050
setp lincurve.0.x-val-15 5000
setp lincurve.0.y-val-15 4475
net spindle-vel-cmd-rpm-abs => lincurve.0.in
net spindle-output <= lincurve.0.out
net spindle-output => hm2_5i25.0.7i76.0.0.spinout
John
lincurve documentation
loadrt lincurve personality=16
addf lincurve.0 servo-thread
#Enter the commanded (Desired) speed in the lincurve.0.x-val-NN entries
#Enter the command required to achieve the desired speed in lincurve.0.y-val-NN.
#Where NN is 00 - 15
#To start make the lincurve pair equal. Then test each speed and adjust lincurve.0.y-val as needed.
#Ii found that I had to make a couple of passes through this process to get everything where I wanted it
setp lincurve.0.x-val-00 1000
setp lincurve.0.y-val-00 1105
setp lincurve.0.x-val-01 1250
setp lincurve.0.y-val-01 1310
setp lincurve.0.x-val-02 1500
setp lincurve.0.y-val-02 1505
setp lincurve.0.x-val-03 1750
setp lincurve.0.y-val-03 1720
setp lincurve.0.x-val-04 2000
setp lincurve.0.y-val-04 1950
setp lincurve.0.x-val-05 2250
setp lincurve.0.y-val-05 2150:)
setp lincurve.0.x-val-06 2500
setp lincurve.0.y-val-06 2360
setp lincurve.0.x-val-07 2750
setp lincurve.0.y-val-07 2570
setp lincurve.0.x-val-08 3000
setp lincurve.0.y-val-08 2780
setp lincurve.0.x-val-09 3250
setp lincurve.0.y-val-09 3000
setp lincurve.0.x-val-10 3500
setp lincurve.0.y-val-10 3210
setp lincurve.0.x-val-11 3750
setp lincurve.0.y-val-11 3425
setp lincurve.0.x-val-12 4000
setp lincurve.0.y-val-12 3640
setp lincurve.0.x-val-13 4250
setp lincurve.0.y-val-13 3855
setp lincurve.0.x-val-14 4500
setp lincurve.0.y-val-14 4050
setp lincurve.0.x-val-15 5000
setp lincurve.0.y-val-15 4475
net spindle-vel-cmd-rpm-abs => lincurve.0.in
net spindle-output <= lincurve.0.out
net spindle-output => hm2_5i25.0.7i76.0.0.spinout
John
Last edit: 12 Mar 2018 01:47 by JohnnyCNC.
The following user(s) said Thank You: giz
Please Log in or Create an account to join the conversation.
Time to create page: 0.107 seconds