Switch mode from Auto to Man after abort

More
28 Sep 2024 03:42 #310942 by spumco
Starting new thread from here:
forum.linuxcnc.org/qtpyvcp/53922-probe-c...axes?start=10#310882

Topic:  Aborted probing routine leaves LCNC in auto mode.  Jogging, MDI, or other recovery actions not possible without the user manually switching modes.

@Lcette:
Yes, I think it's a chicken and egg problem.

@Aciera's response:
It's not possible to switch to manual from gcode but you could set an analog output in gcode to indicate to a python component that you want to switch to manual mode when the gcode finishes or aborts (ie the interpreter switches to IDLE):

Warning: Spoiler!


My idea - untested - is to do it through HAL using <on_abort.ngc>.  I think Aciera's suggestion would be more graceful, especially if there's a way to point the python script to an INI section to connect the appropriate motion pin and other settings.
%
o<on_abort> sub
...[i]normal abort codes[/i]...
[b]M64 Pn[/b]
o<on_abort> endsub
%

setp  timedelay.N.on-delay  2
setp  oneshot.N.width  1
net SIGNAL1  <= motion.digital-out-n
net SIGNAL1  => oneshot.N.in
net SIGNAL2  <= oneshot.N.out
net SIGNAL2  => timedelay.N.in
net SIGNAL3  <= timedelay.N.out
net SIGNAL3  => halui.mode.manual

I'll test out my HAL experiment this weekend and report back.
The following user(s) said Thank You: Unlogic

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

Moderators: KCJLcvette
Time to create page: 0.162 seconds
Powered by Kunena Forum