Following Error When Homing

More
16 Nov 2012 00:05 #26631 by Todd Zuercher
I am having trougble with getting a following error allarm when homing the machine for the first time after opening Axis. If I open Axis and click on home all, my 1st 2 axis home fine (w and z) then the 2nd two start to home (x and y). Almost always x (joint 0) will give a following error alarm and stop the homing and somtimes y will as well. This happens just before the axis reaches the home/limit switch. I can then repress the home button and all axis will home and run fine and not give any errors, I can rehome as often as I like without a problem. But if I close and reopen Axis, I get a following error the first time I try to home every time. I am using analog torque mode servos, homing to index after touching the limit switch.

Any ideas what the source of the problem is and why it only happens the first time I try to home after start up?

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

More
16 Nov 2012 08:30 #26648 by PCW
Replied by PCW on topic Following Error When Homing
Yes, one possibility is that you dont have index enable wired to the PID component
so when the encoder count is cleared you get a big 1servo thread thump in the D term

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

More
16 Nov 2012 11:07 #26656 by Todd Zuercher
My config was done with PNC config. Is there someplace I could find a good example hal file to compare this with?

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

More
16 Nov 2012 23:48 #26680 by PCW
Replied by PCW on topic Following Error When Homing
I dont know if the examples use this (as it only affects homing via index) but it is documented in the PID component manual:

pid.N.index-enable bit in
On the falling edge of index-enable, pid does not update the
internal command derivative estimate. On systems which use the
encoder index pulse, this pin should be connected to the index-
enable signal. When this is not done, and FF1 is nonzero, a
step change in the input command causes a single-cycle spike in
the PID output. On systems which use exactly one of the -deriv
inputs, this affects the D term as well.

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

More
20 Mar 2013 03:47 #31619 by Todd Zuercher
I don't think this is my problem as I do have a line in my hal file that is:
net x-index-enable <=> pid.x.index-enable
Attachments:

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

More
20 Mar 2013 04:22 #31623 by PCW
Replied by PCW on topic Following Error When Homing
You will probably have to halscope the index_enable, homeswitch, and following error to track this down

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

More
21 Apr 2020 08:00 #164930 by rmu
Replied by rmu on topic Following Error When Homing
Has this situation ever been resolved? I have more or less the same problem. Homing works for the first axis (Z), but X and Y generate following error at first try. Subsequent homing attempts always work.

this is in the .hal file:
net x-index-enable  <=> pid.x.index-enable
net x-index-enable    joint.0.index-enable  <=>  hm2_7i93.0.encoder.00.index-enable
net y-index-enable  <=> pid.y.index-enable
net y-index-enable    joint.1.index-enable  <=>  hm2_7i93.0.encoder.01.index-enable
net z-index-enable  <=> pid.z.index-enable
net z-index-enable    joint.2.index-enable  <=>  hm2_7i93.0.encoder.02.index-enable

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

More
21 Apr 2020 11:18 #164941 by billykid
I have the same problem we discussed it here:

forum.linuxcnc.org/27-driver-boards/3562...e-homing-only#121831

I did some tests but in the end I gave up because the system after homing is perfect.

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

More
21 Apr 2020 12:25 #164953 by PCW
Replied by PCW on topic Following Error When Homing
Can you post your hal file?

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

More
21 Apr 2020 12:48 #164956 by Todd Zuercher
No, I never was able to resolve this problem for this machine.

The problem for me is that I chose an unusual configuration where I am communicating with the Mesa cards and running the PID loops in a fast floating point base-thread, rather than running them in the servo thread. This is defeating the mechanisms built into Linuxcnc that allow for the encoder count to be reset to zero without setting a following error when homing to index.

If I could run the servo-thread at the speed of my floating point base-thread, and do away with the base-thread, the problem would go away. But on this machine because of servo-tuning issues I want to run the PIDs as fast as possible, and this configuration lets me squeak out a few more kHz without receiving real time alarms on this PC. So I'm just living with having to home the machine twice after restarts of Linuxcnc.

If you are having a problem with following errors when homing to index caused by the encoder count being reset, on an ordinary config. The problem is usually a problem with the order components are addf-ed to the servo-thread. But there are numerous other reasons you may be receiving a following error, that may be unrelated.

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

Time to create page: 0.105 seconds
Powered by Kunena Forum