Oscillation with Step/Dir and Encoder on a Servo
- halfwitEngineer
- Offline
- New Member
Less
More
- Posts: 2
- Thank you received: 0
28 Jul 2020 21:28 #176284
by halfwitEngineer
Oscillation with Step/Dir and Encoder on a Servo was created by halfwitEngineer
Hello, I'm a newbie and I've run into some trouble - I see oscillation on my servo motor as soon as the drive is enabled and throughout any motion. I've seen several similar posts but I've been unable to find a solution that works. I'm guessing I've made some dumb mistake along the way so I'm reaching out hoping someone can skim through my .hal/.ini files to find a glaring mistake (attached).
This is my first time tinkering with LinuxCNC and I'm trying to dip my toes in with a single axis rotary table project.
A breakdown of my hardware:
Raspberry PI 4
Mesa 7C81
Mesa 7i76
DMM DYN4 servo drive + servo motor/encoder
Rotary table with 180:1 worm reduction
The RPi talks nicely to the 7C81 and the 7i76 and I can jog the axis if using stepgen.00.position-fb for position feedback but as soon as I swap in the encoder position I get oscillation. Moving using stepgen does visually look like I've go the correct scaling ratio on steps and if I enable the encoder position but leave the drive disabled it also appears visually to have the correct scale (manually rotate the shaft and watch DRO). My hal/ini files originally came from PNCconf and I modified them to suit the 7C81 and a single axis so maybe my mistake occurred there somewhere.
It's also worth noting I changed joint0 min_ferror to 0.5 to allow the oscillation to take place rather than immediately error out with a joint following error. I've also changed a few other parameters but did my best to leave a "#was...." comment nearby.
I could go on and on with details but instead I think i'll wait for a bit of feedback. Thanks in advance for the help!
This is my first time tinkering with LinuxCNC and I'm trying to dip my toes in with a single axis rotary table project.
A breakdown of my hardware:
Raspberry PI 4
Mesa 7C81
Mesa 7i76
DMM DYN4 servo drive + servo motor/encoder
Rotary table with 180:1 worm reduction
The RPi talks nicely to the 7C81 and the 7i76 and I can jog the axis if using stepgen.00.position-fb for position feedback but as soon as I swap in the encoder position I get oscillation. Moving using stepgen does visually look like I've go the correct scaling ratio on steps and if I enable the encoder position but leave the drive disabled it also appears visually to have the correct scale (manually rotate the shaft and watch DRO). My hal/ini files originally came from PNCconf and I modified them to suit the 7C81 and a single axis so maybe my mistake occurred there somewhere.
It's also worth noting I changed joint0 min_ferror to 0.5 to allow the oscillation to take place rather than immediately error out with a joint following error. I've also changed a few other parameters but did my best to leave a "#was...." comment nearby.
I could go on and on with details but instead I think i'll wait for a bit of feedback. Thanks in advance for the help!
Please Log in or Create an account to join the conversation.
- PCW
- Away
- Moderator
Less
More
- Posts: 17988
- Thank you received: 4837
28 Jul 2020 21:32 #176286
by PCW
Replied by PCW on topic Oscillation with Step/Dir and Encoder on a Servo
You will need a _much_ lower P term for encoder feedback instead of stepgen feedback
This is because the stepgen feedback has instant response but the drive has significant
delay from command to feedback response
This is because the stepgen feedback has instant response but the drive has significant
delay from command to feedback response
Please Log in or Create an account to join the conversation.
- halfwitEngineer
- Offline
- New Member
Less
More
- Posts: 2
- Thank you received: 0
29 Jul 2020 12:51 #176384
by halfwitEngineer
Replied by halfwitEngineer on topic Oscillation with Step/Dir and Encoder on a Servo
Success!! You weren't kidding... dropped it all the way to 10. Will work my way back up to see how high I can get it before it becomes unstable.
Thank you!
Thank you!
Please Log in or Create an account to join the conversation.
Time to create page: 0.455 seconds