Differents PID´s for differents velocities

More
06 Sep 2013 16:41 - 06 Sep 2013 16:45 #38505 by casetero
Hello,

Maybe it is an stupid post, but im working with mechanich offsets a of 0.35 mm more or less. Im getting mad trying to adjust the PID for making the system stable, its very difficult to find a good PID configuration for all the posible velocities of machining.

I can make the system enough stable for single velocities of machining, but when i change the velocity of movement (jog for example) it gets unestable at all.


I dont know if there is any component able to change the PID values when changing the velocity of movement. Or something like this.

It would be great if for example i can do this:

For F from 0 to 100:

pid.0.Pgain 6
pid.0.Igain 0
pid.0.Dgain 0.5

For F from 100 to 200:

pid.0.Pgain 8
pid.0.Igain 0
pid.0.Dgain 1

.....

and so on

Thank you very much and regards.
Last edit: 06 Sep 2013 16:45 by casetero. Reason: mistakes of being spanish :)

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

More
06 Sep 2013 17:41 #38510 by andypugh

Maybe it is an stupid post

No, it is not uncommon to vary the PID parameters according to other system variables. In my day job I look after a system where the P-term is derived by multiplying together the value of 2 3S maps, and the I term by multiplying 3 3D maps.

I dont know if there is any component able to change the PID values when changing the velocity of movement.

In the Master branch there is a "lincurve" component intended specifically for this purpose:
www.linuxcnc.org/docs/devel/html/man/man9/lincurve.9.html

If you don't want to run the development version you could add the component to your standard installation using "comp". Ask if you need help with that.

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

More
07 Sep 2013 17:24 #38530 by casetero
Hi Andy,

Im trying to install the component, but i cant.

I cant install it with sudo comp, i tried to install a component made by you in the past too and i couldnt, it was called wheel.comp, do u remember??

To install wheel.comp i compiled linuxcnc in another folder with this new component placed in build/src/hal/components/ and copied wheel.ko in the folder of the real linuxcnc. It worked fine.

Now im trying to compile it again with lincurve.comp in the same folder, but it doestn create the lincurve.ko file.

It says:
ValueError: need more than 1 value to unpack

Do you have any idea of what im doing wrong??

Thank you and regards!!

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

More
07 Sep 2013 20:15 #38534 by andypugh

I cant install it with sudo comp, i tried to install a component made by you in the past too and i couldnt, it was called wheel.comp, do u remember??


Vaguely.

It is probably worth trying to get to the bottom of why you can't compile and install components. It's a very useful thing to be able to do.

If you go to System->Administration->Synaptic Package Manager and put "cnc" in the search box, do you see LinuxCNC and LinuxCNC-dev as installed packages?

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

More
08 Sep 2013 15:38 #38537 by casetero
Hello,

I´ll check it tomorrow.

Thank you.

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

More
09 Sep 2013 14:35 #38554 by casetero
I see the linuxcnc installed,
but linuxcnc-dev is not installed.

Can i install it without removing the linuxcnc i have installed now??

Thank you.

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

More
09 Sep 2013 16:09 #38557 by andypugh

I see the linuxcnc installed,
but linuxcnc-dev is not installed.

Can i install it without removing the linuxcnc i have installed now??.


Yes, if it appears in the list (and it should) then you can just mark linuxcnc-dev for installation and press the "do it" button (whatever that is actually called)

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

More
09 Sep 2013 17:44 #38558 by casetero
Hi again,

I have insttal the dev-package. Now i can use "comp" but it continues giving the same error, i copy paste for you:

pablo@Pablo-cnc:~/carpetaNuestra/build/src/hal/components$ comp --compile lincurve.comp
Traceback (most recent call last):
File "/usr/bin/comp", line 1335, in <module>
main()
File "/usr/bin/comp", line 1304, in main
process(f, mode, outfile)
File "/usr/bin/comp", line 1178, in process
a, b = parse(filename)
File "/usr/bin/comp", line 411, in parse
a, b = f.split("\n;;\n", 1)
ValueError: need more than 1 value to unpack
pablo@Pablo-cnc:~/carpetaNuestra/build/src/hal/components$

Maybe the component is not compatible with my version of linuxcnc. Actually im using the 2.5.0 version

Thank you.

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

More
09 Sep 2013 18:29 #38559 by andypugh

pablo@Pablo-cnc:~/carpetaNuestra/build/src/hal/components$ comp --compile lincurve.comp

You probably want comp --install lincurve.comp, but that isn't the problem.

File "/usr/bin/comp", line 1178, in process
a, b = parse(filename)
File "/usr/bin/comp", line 411, in parse
a, b = f.split("\n;;\n", 1)
ValueError: need more than 1 value to unpack

My best guess is that it isn't finding the file. Are you issuing the command from the same directory as lincurve.comp?
You either need to be in the same directory or give comp the full path.

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

More
09 Sep 2013 19:15 #38560 by casetero
Ok,

I have been trying to put the full path, go to the real folder of the file and so.

I think the problem isn´t that it cant find the file, because i try to put for example:

sudo comp -- install lincurve2.comp

and it says No such file or directory : `lincurve2.comp`

instead of Need more than 1 value to unpack

Thank you.

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

Time to create page: 0.165 seconds
Powered by Kunena Forum