Python interface program pause code ?

More
06 Mar 2018 11:19 - 06 Mar 2018 11:28 #107023 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 ?
Last edit: 06 Mar 2018 11:28 by bladekel.

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

More
06 Mar 2018 13:58 #107034 by andypugh
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?
The following user(s) said Thank You: bladekel

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

More
07 Mar 2018 08:42 #107069 by bladekel
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
Powered by Kunena Forum