- Posts: 7368
- Thank you received: 2181
Dual PID loops and appropriate pins for feedback to the Trajectory Planner et al
- cmorley
- Offline
- Moderator
-
Less
More
2 months 4 weeks ago #348400
by cmorley
Replied by cmorley on topic Dual PID loops and appropriate pins for feedback to the Trajectory Planner et al
I wanted to add this to our docs some where for a guide to others.
When I looked at this and it seems you have both encoders connected to index-enable.
This seems wrong in my head, as it would depend on which encoder index fired first.
Any opinion or insight?
Thanks
When I looked at this and it seems you have both encoders connected to index-enable.
This seems wrong in my head, as it would depend on which encoder index fired first.
Any opinion or insight?
Thanks
The following user(s) said Thank You: akb1212, NWE
Please Log in or Create an account to join the conversation.
- NWE
- Offline
- Elite Member
-
Less
More
- Posts: 271
- Thank you received: 84
2 months 4 weeks ago #348402
by NWE
Replied by NWE on topic Dual PID loops and appropriate pins for feedback to the Trajectory Planner et al
I agree this sounds off. I suspect it will very likely always find the one index first, and I expect that to be the servo index, unless home switch is quite near to scale index. I think ideally you'd want to use only the scale index.When I looked at this and it seems you have both encoders connected to index-enable.
The following user(s) said Thank You: akb1212
Please Log in or Create an account to join the conversation.
- cmorley
- Offline
- Moderator
-
Less
More
- Posts: 7368
- Thank you received: 2181
2 months 3 weeks ago #348455
by cmorley
Replied by cmorley on topic Dual PID loops and appropriate pins for feedback to the Trajectory Planner et al
The following user(s) said Thank You: tommylight, NWE
Please Log in or Create an account to join the conversation.
- NWE
- Offline
- Elite Member
-
Less
More
- Posts: 271
- Thank you received: 84
2 months 3 weeks ago #348506
by NWE
Replied by NWE on topic Dual PID loops and appropriate pins for feedback to the Trajectory Planner et al
Please Log in or Create an account to join the conversation.
- cmorley
- Offline
- Moderator
-
Less
More
- Posts: 7368
- Thank you received: 2181
2 months 3 weeks ago #348518
by cmorley
Replied by cmorley on topic Dual PID loops and appropriate pins for feedback to the Trajectory Planner et al
Excellent. I will add it and a little writeup in the official docs.
Please Log in or Create an account to join the conversation.
- Becksvill
- Offline
- Elite Member
-
Less
More
- Posts: 224
- Thank you received: 115
2 months 3 weeks ago #348553
by Becksvill
Replied by Becksvill on topic Dual PID loops and appropriate pins for feedback to the Trajectory Planner et al
Chris there is a bug with the index enable stuff i think when summing the PID loops like this. I forget exactly why i connected both encoder index pulses to index enable
i read i think earlier in this thread that you can connect both encoders to index enable and also connect them with a physical wire so the first index to fire triggers the homing. but i couldn't get it to work. rereading my post it sounds like i just messed this up but i really do think there is a bug. I could test if you want to go through with me and prove the issue. we have messaged off forum on messenger before..
so i tried just one PID loop with the velocity input coming from the encoder and the position input coming from the scale. and that homed to index enable fine but the tuning was really rough. i couldn't believe how bad it was. it was like there was a stuffed bearing on the ballscrew. and the axis kept bounching back and forth around the 0.1mm backlash which was unusable. and after i had just tested the other way with a smooth as silk axis that always stopped perfectly within 0.002mm I wasn't going back I talked about the mesa index enable issue with PCW a bit but i ran out of time to fully prove it was a bug. But i definitely think that having the 2 separate PID loops breaks the index enable logic.
anyway after all that i read somewhere on the forum that someone else had the same issue for some reason and the really inelegant solution is to run the home switch through classic ladder and have it trigger on the home switch first and then look for the change in homing state and on the next state when the encoder is searching for index pulse use classic ladder to feed it the encoder physical index pulse from rotary motor encoder on end of ballscrew. this means that you have to home that last little bit extra slow as it can miss the pulse. and it is not that best. But in saying that i haven't had it miss the pulse yet and it's not that much slower to home.
But i would like to fix this as this is the last annoyance that if it was fixed i would probably go crazy and put scales all over my machines lol
So Chris your classic ladder is still getting used all the time by people keep up the good work.
cheers andrew
i read i think earlier in this thread that you can connect both encoders to index enable and also connect them with a physical wire so the first index to fire triggers the homing. but i couldn't get it to work. rereading my post it sounds like i just messed this up but i really do think there is a bug. I could test if you want to go through with me and prove the issue. we have messaged off forum on messenger before..
so i tried just one PID loop with the velocity input coming from the encoder and the position input coming from the scale. and that homed to index enable fine but the tuning was really rough. i couldn't believe how bad it was. it was like there was a stuffed bearing on the ballscrew. and the axis kept bounching back and forth around the 0.1mm backlash which was unusable. and after i had just tested the other way with a smooth as silk axis that always stopped perfectly within 0.002mm I wasn't going back I talked about the mesa index enable issue with PCW a bit but i ran out of time to fully prove it was a bug. But i definitely think that having the 2 separate PID loops breaks the index enable logic.
anyway after all that i read somewhere on the forum that someone else had the same issue for some reason and the really inelegant solution is to run the home switch through classic ladder and have it trigger on the home switch first and then look for the change in homing state and on the next state when the encoder is searching for index pulse use classic ladder to feed it the encoder physical index pulse from rotary motor encoder on end of ballscrew. this means that you have to home that last little bit extra slow as it can miss the pulse. and it is not that best. But in saying that i haven't had it miss the pulse yet and it's not that much slower to home.
But i would like to fix this as this is the last annoyance that if it was fixed i would probably go crazy and put scales all over my machines lol
So Chris your classic ladder is still getting used all the time by people keep up the good work.
cheers andrew
The following user(s) said Thank You: akb1212
Please Log in or Create an account to join the conversation.
Time to create page: 4.426 seconds