Welcome, Guest. Please login or register.
Did you miss your activation email?
May 26, 2012, 04:35:32 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
| | |-+  M98 Subroutine Directory
Pages: 1   Go Down
Print
Author Topic: M98 Subroutine Directory  (Read 393 times)
0 Members and 2 Guests are viewing this topic.
rcaffin
Active Member

Offline Offline

Posts: 280


View Profile
« on: August 01, 2010, 06:38:46 AM »

After some hours of frustration, and then another hour of searching here, it appears that any named subroutine I call must be in the Mach3/SubRoutine directory.
This is slightly anomalous as I can load a main routine from anywhere, but I cannot do that with subroutines. That is, the following does not work for me:

M98 (c:\mach3\gcode\sub.tap)

Would it be possible to have the next release allow the full filename string please? That way I can keep projects separate.
If there is another way to handle this, or if I am just wrong, please advise!

Cheers
Logged
Mc2
Active Member

Offline Offline

Posts: 22


View Profile
« Reply #1 on: August 02, 2010, 02:44:22 PM »

I ran into the same issue. You can however just locate your sub program at the end of your regular program that is to say:

(Main program here)
G0 X0 Y0


M98 O0100

M30

(After M30 put the sub program with program number. By the way they start with the Letter O not zero.)

O0100
(Lines of code to run when sub program called)
M99

This will keep all sub programs and main program together. If you use the same sub program for other programs you will have to add it in or save sub program to the subroutine's directory. If there is another way, I have not found it.
Jim.

Logged
rcaffin
Active Member

Offline Offline

Posts: 280


View Profile
« Reply #2 on: August 02, 2010, 05:03:52 PM »

I ran into the same issue. You can however just locate your sub program at the end of your regular program

Oh, I know that. I want to use an external file as a subroutine to hold a large number of parameters which are common to several programs. That way, if I alter a parameter, it is automatically altered for every program which uses that parameter file. But it would be nice to have each project in its own folder.

Cheers
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!