Feedback of the stepper motor to the encoder

More
11 Mar 2024 13:24 #295631 by Dmitry Krupin
Hello forum members, I am new to LinuxCNC. I wanted to understand what it is and what it is used for.
I chose a lathe as a model and started building a system with feedback.

Here's the configuration of what I use:
Brains -Raspberry pi 5 with linuxcnc 2.9.2
Main board - 7i92 (with .bit for lpt-dptr)
Interfece board - LPT-DPTR 1.03
Microstep driver PLD545-G4
Stepper motor - PL57H76
Encoder - linear converter LIR-7M

I put all this together and faced a problem: LinuxCNC sees and processes signals from the encoder, the motor starts and works fine, but as soon as I try to "connect" them in the hal file nothing works! I picked up the direction and scale of linear movements, but the program gives the error ~joint 0 following error~. I thought that the mismatch is due to differences in indicators and set FERROR and MIN_FERROR to 10. The error disappeared, but the motor screams and the driver goes to sleep. I don't understand what to do next, what can be the problem? I will attach configuration files.
Attachments:

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

More
11 Mar 2024 18:16 #295667 by PCW
Sounds like oscillation in the PID loop

As a general rule, you will need to reduce
the P term down to the 5 to 100 range
to get encoder feedback to work.

Feedback from the stepgen can use a very high
P term (typically 1000) as there is no significant
delay between  commanded velocity and actual
stepgen velocity. With an actual encoder you have the
drives delays, motor inductance, mechanical spring/mass
etc all of which reduce the maximum stable feedback
gain (P)

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

Time to create page: 1.211 seconds
Powered by Kunena Forum