Skip to content

homing: home a joint while other joints are homing - #4964

Open
grandixximo wants to merge 1 commit into
LinuxCNC:masterfrom
grandixximo:home-concurrent
Open

grandixximo wants to merge 1 commit into
LinuxCNC:masterfrom
grandixximo:home-concurrent

Conversation

@grandixximo

Copy link
Copy Markdown
Contributor

Since #3314 motion refuses a home command while any joint is homing, so homing X and then Y before X is done gives "Homing not possible until current homing process is finished." The refusal was the safe fix for a runaway: the second home took over the sequence state, and the joint already homing dropped out of it and kept moving. In #3314 @rmu75 asked why two joints should not home at the same time, and @Sigma1912 tried this in homing.c but it broke other things.

A home command for a joint, or a synchronized group, that is not homing now starts it next to the joints already homing, and the running sequence is left alone. A single-joint home ends with its own group instead of stepping the sequence number, so it cannot restart a joint that joined. The synchronized-group helpers compare a joint with its own group instead of the current sequence number, and the sync latch is per joint, so a group that joins stays synchronized. During a Home All, or for a joint that is already homing, the command is still refused.

The GUI freeze from #3314 comes from task reporting busy while any joint moves, so wait_complete() after the second home waits until the first joint stops. AXIS and gmoccapy now send the home without their joint mode switch and wait_complete() while a joint is homing; motion is already in joint mode then.

tests/home-dist homes joint 0 and, while it homes, the synchronized pair, and checks that all three finish homed with no error. It fails without the fix. This also fixes the tests/hard-limits failure on #4959, where the test sends three homes back to back.

Since 9d5570c (LinuxCNC#3314) motion refuses a home command while any joint
is homing. Before that, a second single-joint home took over the
sequence state and dropped the joint already homing out of it, which
then ran away. The refusal stopped the runaway, but homing X and then Y
before X is done is a normal thing to do.

A home command for a joint, or a synchronized group, that is not
homing now starts it next to the joints already homing, without
touching the running sequence. A single-joint run ends with its own
group instead of stepping the sequence number, so it cannot restart a
joined joint. The synchronized-group helpers compare a joint with its
own group instead of the current sequence number, and the sync latch
is per joint, so a joined group stays synchronized. During a Home All,
or for a joint that is already homing, the command is still refused,
now from homing.c.

AXIS and gmoccapy dropped their own refusal. While a joint is homing
motion is already in joint mode, so they send the home without the
teleop switch and wait_complete(), which would block until the homing
joints stop.

tests/home-dist homes joint 0 and, while it homes, the synchronized
pair, and checks that all three finish homed with no error.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant