Emc2 dont run the program 2 times

More
10 years 6 months ago #73443 by andradela
Hi folks
I'm having some troubles with the emc.
I made this program, it run just the first time, if i reset the emc while its running, It can't start again. To start is necessary shut down and restart the emc.
Follow the program.
%
G17 G21 G90 G94
G54
#1=1
O101 while[#2 Lt 20]
G53 G0 Z0
G0 Z2
G1 Z#1 F600
G3 X0 Y-166.3 I166.3 J0 F500
X166.3 Y0 I0 J166.3
#1 =[#1-1]
#2=[#2+1]
O101 endwhile
%

Please Log in to join the conversation.

More
10 years 6 months ago #73449 by BigJohnT
When I try and run the program I get an error on the G3 move.

Normally you don't us % but use M2 to stop a file.

JT

Please Log in to join the conversation.

More
10 years 6 months ago #73463 by Rick G
The g3 move does throw an error.

Also it looks like you need to set / reset #2


Try this as an example...
Code:
% G17 G21 G90 G94 G54 #1=1 #2=0 O101 while[#2 Lt 20] G53 G0 Z0 G0 Z2 G1 Z#1 F600 g3 X1 Y1 I1 f600 ;G3 X0 Y-166.3 I166.3 J0 F500 ;X166.3 Y0 I0 J166.3 #1 =[#1-1] #2=[#2+1] O101 endwhile %

I always start and end my programs with a % to avoid possible unintentional effects of M2.

Please Log in to join the conversation.

More
10 years 6 months ago #73508 by andradela
Thanks folks for your reply.
I did like Mr Rick G told, it worked great.
Thanks for all for the fast response.

Please Log in to join the conversation.

Time to create page: 0.080 seconds
Powered by Kunena Forum