Python interface program pause code ?
06 Mar 2018 11:19 - 06 Mar 2018 11:28 #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 ?
Last edit: 06 Mar 2018 11:28 by bladekel.
Please Log in or Create an account to join the conversation.
06 Mar 2018 13:58 #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?
The following user(s) said Thank You: bladekel
Please Log in or Create an account to join the conversation.
07 Mar 2018 08:42 #107069
by bladekel
Replied by bladekel on topic Python interface program pause code ?
Thanks bro. Like you said, everything works good ....
Please Log in or Create an account to join the conversation.
Time to create page: 0.062 seconds