Hello Guest it is April 19, 2024, 07:51:35 PM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Sawdust

Pages: 1
1
General Mach Discussion / Re: Nested Subroutine hangs after 1 iteration
« on: December 03, 2020, 09:28:09 PM »
Doh :-\ Sometimes I can't see the forest for the trees.

Thanks

2
General Mach Discussion / Nested Subroutine hangs after 1 iteration
« on: December 03, 2020, 05:23:13 PM »
I'm running Mach 3 on a DIY machine.Can anyone tell me why the program hangs after the first time through subroutine O125? Also Mach 3 does not display the M99 at the bottom of the subroutine.

#1=-0.1
#2=1
#3=0
#4=60
G20 G40 G80 G90 G00
Z1.1
G1 F60
G1Z[#2]
(Calling sub O125)
M98 P125 Q5 (Repeat 5 times)
G00 Z1
G0A0
M30 (end program)

O124 (this is a sub)
G1 X0Z[#2] F60
#2=[#2+#1] (Step decrease Z by value of #1)
G1 Z1
G1 X6
M99

O125 (this is a sub)
(Call Sub O124)
M98 P124 Q5
#3=[#3+#4] (increase #3 by 60)
G0A[#3] (Rotate A axis 60 degrees)
M99

Pages: 1