- Posts: 486
- Thank you received: 0
Stop program from M-Code
The problems is that when I send the halcmd command I get an error: "can't do that emc_task_plan_run in auto mode with interpreter reading"
indicates that an attempt to issue a RUN command (emc_task_plan_run)
was made which is consistent with using halui.program.run instead of
halui.program.stop.
Also, as mentioned, the code posted at message
forum.linuxcnc.org/10-advanced-configura...code?start=10#113013
the unasserted (False) state (but it should using an appropriate
sleep delay).
Please Log in to join the conversation.
ciccio85 wrote: My USER M CODE path is should be ok. My M codes are in that folder and they work. If it really is wrong please tell me why. Maybe is this the problem.
You git has
USER_M_PATH = /home/ciccio/linuxcnc/configs/3040t_no-endstops/M-codes
But there did not seem to be a _no_endstops in the actual path.
But looking again, I think that depends on where you install the config.
Please Log in to join the conversation.
dgarrett wrote: does not ensure that halui.program.stop is returned to
the unasserted (False) state (but it should using an appropriate
sleep delay).
Would it be better to poll for interp_idle ? (or a similar state)
Please Log in to join the conversation.
Please Log in to join the conversation.
forum.linuxcnc.org/10-advanced-configura...?limitstart=0#112926
but just pulsing halui.program.stop is a little more straightforward and ensures that
halui.program.stop is returned to the deasserted (False) state:
Please Log in to join the conversation.
linuxcnc.org/docs/2.7/html/man/man9/oneshot.9.html
Then you can net the oneshot output to program-stop. This means that you can toggle the oneshot input off-then-on in your M-code but program-stop only sees a brief pulse that resets.
Please Log in to join the conversation.
dgarrett wrote: Tbut just pulsing halui.program.stop is a little more straightforward and ensures that
halui.program.stop is returned to the deasserted (False) state:Code:... case $? in 0)halcmd setp halui.program.stop True sleep 2 halcmd setp halui.program.stop False ;; esac
The only drawback there is that the dialog box hangs around on screen for 2 seconds after you press the stop button.
Please Log in to join the conversation.
