Macro is not ending
13 Dec 2016 16:18 #84041
by pawelosyp
Macro is not ending was created by pawelosyp
Hi all,
Some time ago I started working with CNC machine. It is managed by LinuxCNC with gmoccapy.
I have made some macros that are helping me (resetting axis, tool change and measure etc.).
The problem is that the simplest and shortest macro is not ending, I must stop it manually by clicking icon. The source code of it is under. Macro shuld reset X and Y in G54 in the position it is. It is doing this but isn't ending.
Maybe you have any ideas why it isn't working as I expect.
Pawel
Some time ago I started working with CNC machine. It is managed by LinuxCNC with gmoccapy.
I have made some macros that are helping me (resetting axis, tool change and measure etc.).
The problem is that the simplest and shortest macro is not ending, I must stop it manually by clicking icon. The source code of it is under. Macro shuld reset X and Y in G54 in the position it is. It is doing this but isn't ending.
o<zerujxy> sub
G92.1
G92.2
G40
G10 L20 P0 X0 Y0
o<zerujxy> endsub
m2
Maybe you have any ideas why it isn't working as I expect.
Pawel
Please Log in or Create an account to join the conversation.
13 Dec 2016 18:30 - 13 Dec 2016 18:32 #84049
by newbynobi
Replied by newbynobi on topic Macro is not ending
Hallo Pawel,
that is a known problem. It is caused because your code does not make a machine move, so the interpreter does not get busy and after that idle again. But the GUI needs the "interpreter gets idle" signal to know the macro has ended.
The solution is as simple as the problem![;) ;)](/media/kunena/emoticons/wink.png)
because this is gmoccapy![:) :)](/media/kunena/emoticons/smile.png)
Just enter after the G10 command a new line
That causes the interpreter to stop for 0.1 seconds and get idle again.
I will add that one to the known problems in the documentation. I hope you do not mind if I take your example code.
Norbert
that is a known problem. It is caused because your code does not make a machine move, so the interpreter does not get busy and after that idle again. But the GUI needs the "interpreter gets idle" signal to know the macro has ended.
The solution is as simple as the problem
![;) ;)](/media/kunena/emoticons/wink.png)
because this is gmoccapy
![:) :)](/media/kunena/emoticons/smile.png)
Just enter after the G10 command a new line
G4 P0.1
That causes the interpreter to stop for 0.1 seconds and get idle again.
I will add that one to the known problems in the documentation. I hope you do not mind if I take your example code.
Norbert
Last edit: 13 Dec 2016 18:32 by newbynobi.
The following user(s) said Thank You: pawelosyp
Please Log in or Create an account to join the conversation.
14 Dec 2016 06:26 #84075
by pawelosyp
Replied by pawelosyp on topic Macro is not ending
Hallo Norbert,
Thanks for response. I'll notice this. I haven't any idea about the problem but now everything is working as I expect.![:) :)](/media/kunena/emoticons/smile.png)
Of course you can use the code.![:) :)](/media/kunena/emoticons/smile.png)
Thanks, Pawel
Thanks for response. I'll notice this. I haven't any idea about the problem but now everything is working as I expect.
![:) :)](/media/kunena/emoticons/smile.png)
Of course you can use the code.
![:) :)](/media/kunena/emoticons/smile.png)
Thanks, Pawel
Please Log in or Create an account to join the conversation.
14 Dec 2016 19:45 - 14 Dec 2016 19:50 #84120
by newbynobi
Replied by newbynobi on topic Macro is not ending
Last edit: 14 Dec 2016 19:50 by newbynobi. Reason: wrong link
Please Log in or Create an account to join the conversation.
Time to create page: 0.114 seconds