Need a bit of help with a Raspberry PI 4 GPIO Glass scales control loop

More
22 Feb 2021 19:42 #199756 by yagias
Thank you for helping me.
And you have my sincerest apologies but i have to stop for tonight.

But!!!!
I seem to have the axis chasing it's own tail trying to get right on the money.
e.g. PID feedback running.

I'll clean up the file which is a horrible mess and post it to you tomorrow.

ok.. so at this point i'm pretty happy :)

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

More
23 Feb 2021 09:14 #199805 by Hakan
I hope I don't come and confuse things now.
These are the three setups I have used.

1. Standard stepper motor without any feedback (stepgen in velocity mode)
P = 1000              # This is dependent on the SERVOPERIOD=1000000
FF1 = 1
net x-pos-fb hm2_7i76e.0.stepgen.00.position-fb

2. Stepper motors with encoders but no feedback engaged
P = 0
I = 0
D = 0
FF1 = 1
net x-pos-fb hm2_7i76e.0.encoder.00.position
It is safe to run it this way, there should be no oscillations or anything.

3. Stepper motors with feedback engaged
P = 30
I = 100
D = 0.025
FF1 = 1
net x-pos-fb hm2_7i76e.0.encoder.00.position
One need to start slowly with a low P and gradually work the parameters until satisfied.

1. is where one should start from. That is the setup generated by the various configuration programs.
2. is to hook up the encoder and see that the encoder part works
3.is to start reducing the follow error by adding feedback.

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

More
23 Feb 2021 17:13 #199859 by yagias
I’ve had a chance to clean up the hal file and remove duplicates etc. and here’s a copy if anyone holds interest.

The PID control loop is engaged and doing it’s thing (now verified) So this is where i say a huge thank you!!! for all your advice and effort.
I know that for you guys it’s nothing big but i’m immensely happy that this has finally been achieved.

I played around a bit and sort off stabilized the system.
Next up for me i think is drawing a diagram to wrap my head around what actually happened here in detail :)
And straight after that comes PID tuning.

And no Hakan in my mind you’re not confusing things you’re offering what i perceive to be the best advice i can think off for the next natural step.

@ Chris. As there’s no PM option here on forum.Linuxcnc i setup a temporary email address you can contact me on to settle. (Yagias at minisumo dot dk)

I’ll add a couple of updates as i move along.

And again… Thank you.

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

More
23 Feb 2021 17:47 #199867 by chris@cnc
You are welcome. I am happy when you are happy. Enjoy your new toy. :)

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

Time to create page: 0.081 seconds
Powered by Kunena Forum