Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/src/gui/axis.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -1057,7 +1057,7 @@ real OUT axisui.jog.increment
----

AXIS has a HAL output pin that indicates when an abort has occurred. The
'axisui.abort' pin will be 'TRUE' and come back to 'FALSE' after 0.3ms.
'axisui.abort' pin will be 'TRUE' and come back to 'FALSE' 0.3 s after the last abort.

----
Type Dir Name
Expand Down
15 changes: 13 additions & 2 deletions src/emc/usr_intf/axis/scripts/axis.py
Original file line number Diff line number Diff line change
Expand Up @@ -2047,6 +2047,12 @@ def get_states():
)
#-----------------------------------------------------------

abort_pulse = None
def end_abort_pulse():
global abort_pulse
abort_pulse = None
comp["abort"] = False

class TclCommands(nf.TclCommands):
def next_tab(event=None):
current = widgets.right.raise_page()
Expand Down Expand Up @@ -2468,8 +2474,13 @@ def task_stop(*event):
comp["abort"] = True
c.abort()
c.wait_complete()
time.sleep(0.3)
comp["abort"] = False
# Hold axisui.abort for 0.3 s after the last press. A sleep here
# froze AXIS for 0.3 s per press, so whoever pressed Esc the most,
# in the greatest hurry, waited the longest.
global abort_pulse
if abort_pulse is not None:
root_window.after_cancel(abort_pulse)
abort_pulse = root_window.after(300, end_abort_pulse)

def mdi_up_cmd(*args):
if args and args[0].char: return # e.g., for KP_Up with numlock on
Expand Down
Loading