Macro is not ending
- pawelosyp
- Offline
- New Member
Less
More
- Posts: 4
- Thank you received: 0
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.
- newbynobi
- Offline
- Moderator
Less
More
- Posts: 2075
- Thank you received: 406
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
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
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.
- pawelosyp
- Offline
- New Member
Less
More
- Posts: 4
- Thank you received: 0
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.
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 or Create an account to join the conversation.
- newbynobi
- Offline
- Moderator
Less
More
- Posts: 2075
- Thank you received: 406
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.
Moderators: newbynobi, HansU
Time to create page: 0.069 seconds