On Sat, 10 Dec 2022 at 23:14, Dewey Garrett <dgarr...@panix.com> wrote:

>
> > Is anyone else able to reproduce this behaviour?
>
> $ wget www.panix.com/~dgarrett/stuff/arc.tgz
> $ tar xzf arc.tgz
> $ cd arc
>

Using this test (thanks, up until this point I had been unable to reproduce
the issue) I have been able to find what seems to be a problem.

I believe that what is happening is that the homing sequence happens in
joint mode, and then at the end the joint positions (via kins) are used to
calculate the initial _axis_ positions.
The joint positions after homing are based on the joint-pos-fb pins (which,
for a machine with any kind of feedback, including stephen feedback) is
correct behaviour, it's your best information about the actual position of
the machine.

However, this means that the initial axis position after homing is not
exactly the home position.

The test G-code explicitly uses X and Y coordinates and so the start and
end positions of the arc, if an arc is the first _axis_ mode movement after
homing, are not identical enough to be identified as a full circle.

I have found a way to make this initial arc happen, by modifying homing.c
around line 1341:

       case HOME_FINISHED:
            H[joint_num].homing = 0;
            H[joint_num].homed = 1; // finished
            H[joint_num].home_state = HOME_IDLE;
            joints[joint_num].free_tp.curr_pos = H[joint_num].home; **********
This line is new *******
            immediate_state = 1;
            H[joint_num].joint_in_sequence = 0;
            break;

This fixes the issue. But does it make homing (for example to encoder
feedback) less accurate? I think it might, but I am not sure. The offsets
from feedback / index to machine coordinates have already been set at this
point.
Possibly with this change there will be a small remaining offset between
feedback and commanded position at the switch to world mode, but then that
might not be a bad thing, the machine will then move more exactly to home.
(Possibly).

This issue is only seen when a feed-rate, full circle arc is commanded with
a specific syntax[1] immediately after the switch from joint mode to world
mode at the end of homing. I think that is an unusual use-case.
There is a chance that my fix here is worse than the disease.

[1] An arc of the format G2 Z-1 J4 F1000 (ie, the "from here in XY"
shorthand) will work as-expected, even without this bug fix.

-- 
atp
"A motorcycle is a bicycle with a pandemonium attachment and is designed
for the especial use of mechanical geniuses, daredevils and lunatics."
— George Fitch, Atlanta Constitution Newspaper, 1912

_______________________________________________
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to