Hello Guest it is April 19, 2024, 05:57:37 PM

Author Topic: subroutine  (Read 2147 times)

0 Members and 1 Guest are viewing this topic.

subroutine
« on: January 26, 2014, 10:36:14 PM »
cant make m98 m99 work correctly. i know its simple but im losing the battle.
example program:
subs are the a moves at the bottom
need to run program
move a
run again
run all locations on a axis, then stop
can someone plug the sub codes in there?
thanks
larry



G00 Z.050
GOO X0 Y0
GO1 Z-.050F5
GO1 X 1.25F25
G01 Z .050
G00 X0 Y0


G00 A72

G00 A144

G00 A216

G00 A288

G00 A360
M30

Offline mbele

*
  •  58 58
    • View Profile
Re: subroutine
« Reply #1 on: January 28, 2014, 04:09:54 AM »
(assuming that Z0.5 is safe for rapids along xy)
G00 Z.050 (go to safe Z level)

G00 A72 (next A position)
M98 P1 (call subroutine 1)

G00 A144 (next A position)
M98 P1 (call subroutine 1)

G00 A216 (next A position)
M98 P1 (call subroutine 1)

G00 A288 (next A position)
M98 P1 (call subroutine 1)

G00 A360 (next A position)
M98 P1 (call subroutine 1)

(exit move)
G00 Z.050 (go to safe Z level)

M30 (end program)

O1 (subroutine 1 start)
G00 X0 Y0 (assuming we're in safe Z, position xy for the start of the cut)
G01 Z-.050F5 (engage)
G01 X 1.25F25 (cut)
G00 Z.050 (go to safe Z level)
M99 (return from subroutine)


Re: subroutine
« Reply #2 on: January 28, 2014, 05:39:52 PM »
thank u my friend. that puts me back in the shop......... ;D

larry