- Posts: 66
- Thank you received: 0
Python interface program pause code ?
8 years 7 months ago #107023
by bladekel
Python interface program pause code ? was created by bladekel
Hello friends,
I'm trying design a custom UI for emc.
My problem is I couldnt pause the running program.
I used ;
import linuxcnc
c = linuxcnc.command()
c.auto(linuxcnc.AUTO_PAUSE)
...code but when I run this code, terminal shows me "Can't switch mode while mode is AUTO and interpreter is not IDLE" message.
How can I pause my running program, can you explain it ?
I'm trying design a custom UI for emc.
My problem is I couldnt pause the running program.
I used ;
import linuxcnc
c = linuxcnc.command()
c.auto(linuxcnc.AUTO_PAUSE)
...code but when I run this code, terminal shows me "Can't switch mode while mode is AUTO and interpreter is not IDLE" message.
How can I pause my running program, can you explain it ?
Please Log in to join the conversation.
8 years 7 months ago #107034
by andypugh
Replied by andypugh on topic Python interface program pause code ?
That seems to be exactly what the Axis GUI does
github.com/LinuxCNC/linuxcnc/blob/master...cripts/axis.py#L2259
Maybe the"magic" is the ensure_mode function?
github.com/LinuxCNC/linuxcnc/blob/master...cripts/axis.py#L2259
Maybe the"magic" is the ensure_mode function?
Please Log in to join the conversation.
Time to create page: 0.135 seconds
