Component to toggle PID values?

More
22 Sep 2019 20:09 #145888 by blazini36
I'm sure there's a standard component in there somewhere to do this but I can't figure it out at the moment.

For ridged tapping I set my spindle to low gear and use a button on the GUI with the gearchange component to rescale position and velocity (the encoder is on the motor, index is on the spindle). This works plenty fine, but since I use an 8i20 (torque mode drive) for the spindle the PID loop values are not sufficient for a different gear ratio at slow speeds.

Basically I need to use the same button I set low gear with to also change the Pgain value to a higher number. I realize I could probably use another gearchange component to scale the 2nd value, but that's a bit more than what's necessary I just have to change Pgain from 0.1 to 2.0 with the button.

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

More
22 Sep 2019 20:32 #145891 by Todd Zuercher
Sounds like a job for a mux component.
If you only need to choose between one of two settings use a mux2.
linuxcnc.org/docs/html/man/man9/mux2.9.html
If you might need different settings for more than one set of gear changes use mux_generic.
linuxcnc.org/docs/html/man/man9/mux_generic.9.html

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

More
23 Sep 2019 05:04 #145912 by Hakan
setp pid.s.Pgain 2.0
is what you want to do, Can maybe be incorporated in your button macro?

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

More
23 Sep 2019 13:54 #145959 by blazini36

Sounds like a job for a mux component.
If you only need to choose between one of two settings use a mux2.
linuxcnc.org/docs/html/man/man9/mux2.9.html
If you might need different settings for more than one set of gear changes use mux_generic.
linuxcnc.org/docs/html/man/man9/mux_generic.9.html


That's what I was looking for, thanks.

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

More
25 Sep 2019 23:27 #146204 by andypugh
I wrote the "lincurve" component specifically for "something-dependent" PID terms. (though it has many other uses)

But mux might make more sense here if the dependency is switched rather than continuous.

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

Time to create page: 0.070 seconds
Powered by Kunena Forum