- LinuxCNC
- General LinuxCNC Questions
- Need a bit of help with a Raspberry PI 4 GPIO Glass scales control loop
Need a bit of help with a Raspberry PI 4 GPIO Glass scales control loop
- yagias
- Offline
- Junior Member
Less
More
- Posts: 21
- Thank you received: 0
22 Feb 2021 19:42 #199756
by yagias
Replied by yagias on topic Need a bit of help with a Raspberry PI 4 GPIO Glass scales control loop
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
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.
- Hakan
- Offline
- Platinum Member
Less
More
- Posts: 504
- Thank you received: 157
23 Feb 2021 09:14 #199805
by Hakan
Replied by Hakan on topic Need a bit of help with a Raspberry PI 4 GPIO Glass scales control loop
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)
2. Stepper motors with encoders but no feedback engagedIt is safe to run it this way, there should be no oscillations or anything.
3. Stepper motors with feedback engagedOne 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.
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
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
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.
- yagias
- Offline
- Junior Member
Less
More
- Posts: 21
- Thank you received: 0
23 Feb 2021 17:13 #199859
by yagias
Replied by yagias on topic Need a bit of help with a Raspberry PI 4 GPIO Glass scales control loop
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.
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.
- chris@cnc
- Offline
- Platinum Member
Less
More
- Posts: 529
- Thank you received: 139
23 Feb 2021 17:47 #199867
by chris@cnc
Replied by chris@cnc on topic Need a bit of help with a Raspberry PI 4 GPIO Glass scales control loop
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.
- ansiktsburk
- Offline
- New Member
Less
More
- Posts: 1
- Thank you received: 0
18 Aug 2022 14:36 #250020
by ansiktsburk
Replied by ansiktsburk on topic Need a bit of help with a Raspberry PI 4 GPIO Glass scales control loop
Hi!
I've been following this thread as I am aiming towards creating a similar setup with an RPI4 through the GPIOs with linear encoder open loop feedback.
In you final post, you mention there being a copy of the cleaned up hal file, but I cannot find any in the post.
Could you please post it? I would appriciate it greatly as it is a bit hard to follow the exakt changes made in the original files to get it to work.
Thank you in advance and good job om making it work!
I've been following this thread as I am aiming towards creating a similar setup with an RPI4 through the GPIOs with linear encoder open loop feedback.
In you final post, you mention there being a copy of the cleaned up hal file, but I cannot find any in the post.
Could you please post it? I would appriciate it greatly as it is a bit hard to follow the exakt changes made in the original files to get it to work.
Thank you in advance and good job om making it work!
Please Log in or Create an account to join the conversation.
- LinuxCNC
- General LinuxCNC Questions
- Need a bit of help with a Raspberry PI 4 GPIO Glass scales control loop
Time to create page: 0.112 seconds