smithy cnc1240 Linuxcnc 2.6.4 new PID settings?
15 May 2015 20:09 - 15 May 2015 20:09 #58733
by dogon1013
smithy cnc1240 Linuxcnc 2.6.4 new PID settings? was created by dogon1013
The hard-drive on my companies Smithy CNC 1240 mill stopped booting up. (its actually a CF Card in an IDE adapter) luckily I could copy all the necessary files off it.
It was running linuxcnc 2.5.something on ubuntu.
so I decided to switch to a serial ATA solid state drive and update to linuxCNC 2.6.4 and Debian.
This went OK. but I did have to replace the HM2 firmware sssvst2_2_4_v31.bit file with a new copy I found online (the one included with linuxcnc kept getting an error...bad header or something)
Then of course there were some HAL file issues because some pins were removed or renamed in the new version.
Once I got linuxCNC to start up, I was able to home and move the machine like usual, but the spindle would not turn. After many hours of trying to chase down connection issues, and thinking it was the max-lim or min-lim current settings, and also trying the "setp pid.0.error-previous-target false" setting, as mentioned here: wiki.linuxcnc.org/cgi-bin/wiki.pl?UpdatingTo2.6 I finally played with the PID settings and got it working:
OLD version 2.5 PID settings (work in 2.5, but not in 2.6) from the 1240combined.HAL file:
# load and configure the spindle speed PID
loadrt pid num_chan=1
setp pid.0.Pgain 0.1
setp pid.0.Igain 100.0
setp pid.0.Dgain 0.0
setp pid.0.maxoutput 1.0
setp pid.0.deadband 0.01
In order to get it to work fairly well in linuxCNC 2.6.4 I had to change the MAXOUTPUT from 1.0 to 4.25 so now it looks like this
# load and configure the spindle speed PID
loadrt pid num_chan=1
setp pid.0.Pgain 0.1
setp pid.0.Igain 100.0
setp pid.0.Dgain 0.0
setp pid.0.maxoutput 4.25 #was 1.0
setp pid.0.deadband 0.01
With these settings the spindle seems to be stable at all speeds, but doesn't seem as smooth as it was under version 2.5
Is there anything else that may need to change?
from the update information at wiki.linuxcnc.org/cgi-bin/wiki.pl?UpdatingTo2.6 it seems like there was little change to the PID system, but going from 1.0 to 4.25 seems like a big jump. Is there something else I am missing?
Thanks,
It was running linuxcnc 2.5.something on ubuntu.
so I decided to switch to a serial ATA solid state drive and update to linuxCNC 2.6.4 and Debian.
This went OK. but I did have to replace the HM2 firmware sssvst2_2_4_v31.bit file with a new copy I found online (the one included with linuxcnc kept getting an error...bad header or something)
Then of course there were some HAL file issues because some pins were removed or renamed in the new version.
Once I got linuxCNC to start up, I was able to home and move the machine like usual, but the spindle would not turn. After many hours of trying to chase down connection issues, and thinking it was the max-lim or min-lim current settings, and also trying the "setp pid.0.error-previous-target false" setting, as mentioned here: wiki.linuxcnc.org/cgi-bin/wiki.pl?UpdatingTo2.6 I finally played with the PID settings and got it working:
OLD version 2.5 PID settings (work in 2.5, but not in 2.6) from the 1240combined.HAL file:
# load and configure the spindle speed PID
loadrt pid num_chan=1
setp pid.0.Pgain 0.1
setp pid.0.Igain 100.0
setp pid.0.Dgain 0.0
setp pid.0.maxoutput 1.0
setp pid.0.deadband 0.01
In order to get it to work fairly well in linuxCNC 2.6.4 I had to change the MAXOUTPUT from 1.0 to 4.25 so now it looks like this
# load and configure the spindle speed PID
loadrt pid num_chan=1
setp pid.0.Pgain 0.1
setp pid.0.Igain 100.0
setp pid.0.Dgain 0.0
setp pid.0.maxoutput 4.25 #was 1.0
setp pid.0.deadband 0.01
With these settings the spindle seems to be stable at all speeds, but doesn't seem as smooth as it was under version 2.5
Is there anything else that may need to change?
from the update information at wiki.linuxcnc.org/cgi-bin/wiki.pl?UpdatingTo2.6 it seems like there was little change to the PID system, but going from 1.0 to 4.25 seems like a big jump. Is there something else I am missing?
Thanks,
Last edit: 15 May 2015 20:09 by dogon1013.
Please Log in or Create an account to join the conversation.
15 May 2015 20:40 - 15 May 2015 20:41 #58736
by andypugh
The difference is that previously a PID output of 1 gave full-scale output from the 8i20 drive
As the update page mentions, the 8i20 current command is now in absolute amps rather than scaled 0-1.
What is the rated current of the motor? You will need to set the 8i20 maxlim to that value, and do the same with the pid maxoutput.
You will also find that now the PID output is allowed to go 4x higher the P, I and D gains will need to be 4x higher to get the same tuning
Replied by andypugh on topic smithy cnc1240 Linuxcnc 2.6.4 new PID settings?
Is there anything else that may need to change?
from the update information at wiki.linuxcnc.org/cgi-bin/wiki.pl?UpdatingTo2.6 it seems like there was little change to the PID system, but going from 1.0 to 4.25 seems like a big jump. Is there something else I am missing?,
The difference is that previously a PID output of 1 gave full-scale output from the 8i20 drive
As the update page mentions, the 8i20 current command is now in absolute amps rather than scaled 0-1.
What is the rated current of the motor? You will need to set the 8i20 maxlim to that value, and do the same with the pid maxoutput.
You will also find that now the PID output is allowed to go 4x higher the P, I and D gains will need to be 4x higher to get the same tuning
Last edit: 15 May 2015 20:41 by andypugh.
The following user(s) said Thank You: dogon1013
Please Log in or Create an account to join the conversation.
15 May 2015 20:50 - 15 May 2015 20:53 #58738
by dogon1013
Replied by dogon1013 on topic smithy cnc1240 Linuxcnc 2.6.4 new PID settings?
It was not clear on the update page that the current COMMAND was in absolute amps. I thought it was just the min-lim and max-lim settings that were in absolute amps, since it is stated directly after that, in the same sentence (the wording is a little confusing, but I see it now)
Just looked at the motor specs.
Its model 123IN-BLM-300HA-SMT DC300V, 2200W, 6Krpm, 9.2A
The version 2.5 HAL file had max current set to 30, but it sounds like I should make sure it is at 9.2A
so are you suggesting each of the PID setting should theoretically be 4 times their previous value? Why 4?
Just looked at the motor specs.
Its model 123IN-BLM-300HA-SMT DC300V, 2200W, 6Krpm, 9.2A
The version 2.5 HAL file had max current set to 30, but it sounds like I should make sure it is at 9.2A
so are you suggesting each of the PID setting should theoretically be 4 times their previous value? Why 4?
Last edit: 15 May 2015 20:53 by dogon1013.
Please Log in or Create an account to join the conversation.
15 May 2015 20:54 #58739
by andypugh
I was. I now think that they should be 9.2 x larger.
Replied by andypugh on topic smithy cnc1240 Linuxcnc 2.6.4 new PID settings?
so are you suggesting each of the PID setting should theoretically be 4 times their previous value?
I was. I now think that they should be 9.2 x larger.
The following user(s) said Thank You: dogon1013
Please Log in or Create an account to join the conversation.
15 May 2015 21:32 #58743
by dogon1013
Replied by dogon1013 on topic smithy cnc1240 Linuxcnc 2.6.4 new PID settings?
Thanks,
at first it did not work....spindle would not get past 3Krpm
but then I remembered "setp pid.0.error-previous-target false" and it works
so now my working 2.6 settings are:
# load and configure the spindle speed PID
loadrt pid num_chan=1
setp pid.0.error-previous-target false
setp pid.0.Pgain 0.92 #was 0.1
setp pid.0.Igain 920.0 #was 100
setp pid.0.Dgain 0.00 #was 0.0
setp pid.0.maxoutput 9.2 #was 1.0
setp pid.0.deadband 0.01
and I also set the min-lim and max-lim to -9.5 and 9.5 respectivelly
Thanks for the help.
at first it did not work....spindle would not get past 3Krpm
but then I remembered "setp pid.0.error-previous-target false" and it works
so now my working 2.6 settings are:
# load and configure the spindle speed PID
loadrt pid num_chan=1
setp pid.0.error-previous-target false
setp pid.0.Pgain 0.92 #was 0.1
setp pid.0.Igain 920.0 #was 100
setp pid.0.Dgain 0.00 #was 0.0
setp pid.0.maxoutput 9.2 #was 1.0
setp pid.0.deadband 0.01
and I also set the min-lim and max-lim to -9.5 and 9.5 respectivelly
Thanks for the help.
Please Log in or Create an account to join the conversation.
15 May 2015 22:32 #58746
by PCW
Replied by PCW on topic smithy cnc1240 Linuxcnc 2.6.4 new PID settings?
You should set the current limit to the peak motor current (9.2 is continuous rating)
so 30 A is probably right
so 30 A is probably right
The following user(s) said Thank You: dogon1013
Please Log in or Create an account to join the conversation.
18 May 2015 19:14 - 18 May 2015 19:16 #58817
by dogon1013
Replied by dogon1013 on topic smithy cnc1240 Linuxcnc 2.6.4 new PID settings?
Thanks for all the help. I put the max-lim and min-lim to 30.
BTW, attached is sssvst2_2_4_v31.bit firmware file that works (in case someone else has the same issue I had). for some reason the one in the Distro gave errors.
BTW, attached is sssvst2_2_4_v31.bit firmware file that works (in case someone else has the same issue I had). for some reason the one in the Distro gave errors.
Last edit: 18 May 2015 19:16 by dogon1013.
Please Log in or Create an account to join the conversation.
Time to create page: 0.121 seconds