- Posts: 4
- Thank you received: 0
Macro is not ending
9 years 10 months ago #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.
Code:
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 to join the conversation.
9 years 10 months ago #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
because this is gmoccapy
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
because this is gmoccapy
Just enter after the G10 command a new line
Code:
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
Please Log in to join the conversation.
9 years 10 months ago #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.
Of course you can use the code.
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.
Of course you can use the code.
Thanks, Pawel
Please Log in to join the conversation.
9 years 10 months ago #84120
by newbynobi
Replied by newbynobi on topic Macro is not ending
Please Log in to join the conversation.
Time to create page: 0.076 seconds
