Following error when using linear encoder feeback

More
17 Dec 2023 04:44 - 17 Dec 2023 05:18 #288374 by Robbbbbb
I've been upgrading my RF45 clone (stepper/ballscrew driven) from a Centroid acorn to a Mesa 7i95 so I could add more axis' in the future, and so I could connect the already installed linear encoders on the X & Y axis. I'm having issues with following errors when using feedback from the encoder, if I jog the axis it will almost instantly error out. I've currently only connected the x Axis for testing and I have it running fine without feedback and I can jog around and issue g0 and g1 commands with no errors at 900mm/min - position correctly corresponds with the values I'm seeing from the encoder and the actual machine moves the correct amount +-50um.

I've attached my conf, the PID values in the file aren't the ones I'm using - I ran the autotuner after I grabbed that file and forgot to update it, manually tuning the PID values doesn't seem to help. I've tried increasing the error values in the x axis config but it still errors out even with insanely large numbers 10+mm etc. I've used the HAL probe to look at the position on the linear encoder and it matches the position on screen when the error occurs, edit: I guess it will always match, what should I be comparing it to, is there a target position value? I'm not seeing any latency errors - previously I was seeing some before tweaking bios/power settings.

Please let me know if I've missed any relevant info.
Attachments:
Last edit: 17 Dec 2023 05:18 by Robbbbbb.

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

More
17 Dec 2023 12:11 #288388 by bkt
you can not run a Gui with ini file written for 3 axis and physically connect one only .... sometime follow error can appear ... plus ....

MAX_ERROR = 0.0127

not sure is avaiable on linuxcnc ..... FERROR instead ... but better if you start to read some wiki on these like these one: linuxcnc.org/docs/html/config/ini-config...ub:ini:sec:joint-num

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

More
17 Dec 2023 15:03 #288410 by PCW
I would change this:

setp hm2_[MESA](BOARD).0.dpll.01.timer-us -50

to
setp hm2_[MESA](BOARD).0.dpll.01.timer-us -200

Also set MAX_ERROR to 0

and increase your following error limits in the INI file to say
1 mm temporarily, so you can run the machine and plot the following
error and do some tuning...

The current tuning (setup for a stepgen) will have much too high a P term
to be stable with encoder feedback
The following user(s) said Thank You: Robbbbbb

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

More
18 Dec 2023 05:48 #288461 by Robbbbbb

setp hm2_[MESA](BOARD).0.dpll.01.timer-us -200
Also set MAX_ERROR to 0

That seemed to do it, the auto tune now worked, and when I set the f-error and min-f-error to .2 and .1 I can jog around all day without error.

Will continuing to finetune the PID values allow me to reduce the f-error, or is that a limitation of my machine at this point?

Also once it reaches the position I tell it to it bounces back and forward by 5-10um, do I just keep inceasing the deadband value until that stops happening? I currently set it to 50um, and it helped, but still does it even and 100um.

Thanks for the assistance.
Attachments:

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

More
18 Dec 2023 13:50 #288486 by PCW
The oscillation may be tuning or backlash related, have you measured the backlash in the system?

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

More
19 Dec 2023 08:03 #288557 by Robbbbbb
Looks like it was both, and I also think my acceleration was way too low, since increased to 150mm/min^2. I measured and set the backlash (~30um), set the deadband to 7.5um (5um linear scales), and started tuning manually following the guide (auto tuning seems to generate garbage values). I've now got the f-error down to less than 20um with no oscillation once it reaches the set-point. I'll keep tuning but that might be as good as I can get.

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

Time to create page: 0.139 seconds
Powered by Kunena Forum