Welcome, Guest. Please login or register.
Did you miss your activation email?
May 26, 2012, 07:48:08 PM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
+  Machsupport Forum
|-+  Mach Discussion
| |-+  General Mach Discussion
| | |-+  need help w/ subroutine
Pages: 1   Go Down
Print
Author Topic: need help w/ subroutine  (Read 317 times)
0 Members and 1 Guest are viewing this topic.
CharliePatten
Active Member

Offline Offline

Posts: 46


View Profile
« on: August 17, 2010, 06:43:14 AM »

How do I create a subroutine program for

M8M9
G4P.25

that is repeated many times thruout a program?
Logged
BR549
Active Member

Online Online

Posts: 2,554


View Profile
« Reply #1 on: August 17, 2010, 07:04:22 PM »

There are several ways to do it.    One is too call the sub from inside the Gcode program . The other way is to call it from  the macro directory


G98 P1 L1              Calls the sub from inside the program.



o1                     This would be the sub code included at the end of the program
M8 M9
G4 P0.25
M99
%


M98 (Name of sub.tap)   would call the sub from the macro directory


'Name of sub.tap               This would be the sub program stored in the macro directory under the name of "Name of Sub.tap"
M8 M9
G4 P0.25
M99
%

Hope that helps,   (;-)
Logged
Pages: 1   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!