7i95 Encoder counter error

More
2 years 7 months ago #296535 by kofsky0328
At first I thought it was a delay or something that caused the encoder counting error, but when I made the three axes move rapidly simultaneously, the encoder counting would not go wrong. This is what confused me.

about index, if the encoder feedback cannot be used to make a closed loop, I will use a grating ruler to connect the servo driver to make a closed loop without going through the mesa card, and the mesa card only connects the Z signal of the servo driver for homing, and the driver and the machine tool achieve a closed loop, but the driver Open the loop with Mesa. Obviously, this is not the optimal way to close the loop.

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

More
2 years 7 months ago #296544 by PCW
Replied by PCW on topic 7i95 Encoder counter error
Encoder feedback can be used to close the loop. To check this
you would need to lower the P term to say 10 and widen the following error
limits to see the system behavior using halscope.

If you only use index, you must have firmware that implements stepgen index
to be able to home to index, since the stepgen feedback position must be zeroed
at index occurrence, and this requires special stepgen hardware.

Also note that you must disconnect the encoder velocity feedback from
the PID in this case (actually this should always be disconnected even if encoder
feedback is used)

Here is 7I95 firmware that implements step/dir index:

 

File Attachment:

File Name: 7i95sdid.zip
File Size:125.21 KB


Note that with this firmware, there are now 2 index enable pins,
encoder.xx.index-enable and stepgen.xx.index-enable
and the proper one must be used in hal based on the feedback source

This firmware may require LinuxCNC 2.9 or master
The following user(s) said Thank You: kofsky0328

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

More
2 years 7 months ago #296552 by kofsky0328
Oh, you are the best, thank you very much for your help

But just using the index is the last resort, I think the closed loop from the mesa card to the drive is the optimal solution (is it?)

I will try to continue debugging the PID to achieve full speed operation without following errors

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

More
2 years 7 months ago #296568 by tommylight


I think the closed loop from the mesa card to the drive is the optimal solution (is it?)

I will try to continue debugging the PID to achieve full speed operation without following errors
Yes it is the optimal solution, although most of the time there is no difference, until some motor skips steps, then it becomes very, very useful.
And PID is quite easy to , example of my config
P = 50
I = 0
D = 0
FF0 = 0
FF1 = 0.38
FF2 = 0
BIAS = 0
DEADBAND = 0.001
Using Gecko G320 and Mesa 7i95
As PCW already mentioned (not sure if this topic) do not start tuning the PID without having the machine working in open loop first with scaling correct, then make sure encoders count in the right direction and with correct scaling, only then switch to closed loop and use the above values as a starting point.
The following user(s) said Thank You: kofsky0328

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

More
2 years 7 months ago #296569 by besriworld
The guy didn't say what the servo motors were. Because if they have an absolute encoder it's very likely to have my problems :)
The following user(s) said Thank You: kofsky0328

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

More
2 years 7 months ago #296577 by kofsky0328
Thank you very much for your suggestion. I plan to tune the servo driver in open loop first to solve the problem of delay or error. After solving these problems, I will try to tune the PID in closed loop.

I only have 1 hour at most to play with these things every day. Why are there only 24 hours in a day? It’s not enough time!

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

Time to create page: 0.081 seconds
Powered by Kunena Forum