Hello Guest it is April 24, 2024, 10:50:38 AM

Author Topic: subroutines  (Read 2754 times)

0 Members and 1 Guest are viewing this topic.

subroutines
« on: March 06, 2012, 03:31:58 PM »
Hi
I am having difficulty with sub routines (have never used them before)
have saved a routine in the subroutine folder within mach 3
file name O1001 have the 1st line in the routine no line No,  O1001 nothing else on the first line
have called it with M98 P1001
the program runs ok but ignores the M98 call and goes to the next line which is x0 y0 then M30 these
lines are read and returns to beginning
any help will be appreciated as I must be missing something
Colin

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: subroutines
« Reply #1 on: March 06, 2012, 08:28:05 PM »
You use a different call to call a sub from the Sub directory.

M98 (filename.txt) L1

THe call you used is for calling an internal sub that is located inside the Gcode program.

M98 P1001 L1

(;-) TP
Re: subroutines
« Reply #2 on: March 09, 2012, 05:38:29 PM »
many thanks
that worked fine
if I put the sub or subs in the gcode programe would it be at the end  after the rewind or M01?
   many thanks for your prompt reply   
 colin

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: subroutines
« Reply #3 on: March 09, 2012, 08:51:03 PM »
Yes after the M30.

(;-) TP