Hello Guest it is April 29, 2024, 02:18:28 AM

Author Topic: M98 & 99  (Read 10019 times)

0 Members and 2 Guests are viewing this topic.

M98 & 99
« on: February 13, 2006, 04:51:01 PM »
When using M98, I am coding it as M98 P10 and the machine keeps looping more then 10 times.  Also, is it possible to call an external file  as a sub-routine?
Re: M98 & 99
« Reply #1 on: February 13, 2006, 06:01:22 PM »
A sub should look like this:

(my main program)
G00 X0 Y0
M98 (Other.Tap) L10 (call this program and run it 10 times) <---- Edit :)
M30

The other file would be
(Other.tap)
G91
X2.0 Y1.0
G01 Z-3.0 F30
G00 Z3.0
M99


How is that, any help?
« Last Edit: February 14, 2006, 11:47:19 AM by Barker806 »
Fixing problems one post at a time ;)

www.newfangledsolutions.com
www.machsupport.com
Re: M98 & 99
« Reply #2 on: February 14, 2006, 11:41:01 AM »
Are you sure about G98?  Shouldn't it be M98?  Doesn't matter, I can't get either to work.

Mike
Re: M98 & 99
« Reply #3 on: February 14, 2006, 11:46:39 AM »
Sorry M98 :)

What are you getting for an error? Try This all in the same file:

(my main program)
G00 X0 Y0
M98 P1000 L10 (call this program and run it 10 times)
M30

O1000
G91
X2.0 Y1.0
G01 Z-3.0 F30
G00 Z3.0
M99
Fixing problems one post at a time ;)

www.newfangledsolutions.com
www.machsupport.com
Re: M98 & 99
« Reply #4 on: February 14, 2006, 12:13:19 PM »
Well, I tried you new code and it does call the subroutine.  When I Single BLK and cycle start, the code goes jumps to the subroutine, and runs the code in the subroutine once and then stops on the last line, which, interestingly enough, is not the M99, but the line before the M99 and the M99 never shows in the g-code window.  When I tried to use an external .tap file, with the "P" word, I get a "Unknown word where unary operation could." If I use your example, and put "()" around the file name, I get a "Connot Load original File"

Mike

Offline nicad

*
  •  40 40
    • View Profile
Re: M98 & 99
« Reply #5 on: February 14, 2006, 12:40:33 PM »
I have seen this same thing in Mach3. It will not show or get to the last line, which so far has always been M99 or M30.
One time I simply edited the code and put a couple of <enters> after the last line, and that actually fixed it.
Other times it still ignored it.
It also seems to make a difference in how you start the program.. but I haven't nailed it down yet.
Re: M98 & 99
« Reply #6 on: February 14, 2006, 01:14:45 PM »
hit enter at the end  and all will be good  :)

Fixing problems one post at a time ;)

www.newfangledsolutions.com
www.machsupport.com
Re: M98 & 99
« Reply #7 on: October 22, 2006, 10:22:43 AM »
A sub should look like this:

(my main program)
G00 X0 Y0
M98 (Other.Tap) L10 (call this program and run it 10 times) <---- Edit :)
M30

The other file would be
(Other.tap)
G91
X2.0 Y1.0
G01 Z-3.0 F30
G00 Z3.0
M99


How is that, any help?

Hi I'm trying to call a sub program I have used your example and still can't get iti working can you see where I'm going wrong?

Hood

*
Re: M98 & 99
« Reply #8 on: October 22, 2006, 01:53:08 PM »
I am a real beginner at Gcode but heres what I do
You need to hit enter key after the last line (ie M99) I always tend to put in a % sign as the last line, that works the same as hitting the enter key and I know it is there because I see it in the text file ;)
Should look like this
(my main program)
G00 X0 Y0
M98 P1000 L10 (call this program and run it 10 times)
M30

O1000
G91
X2.0 Y1.0
G01 Z-3.0 F30
G00 Z3.0
M99
%

Offline Graham Waterworth

*
  • *
  •  2,673 2,673
  • Yorkshire Dales, England
    • View Profile
Re: M98 & 99
« Reply #9 on: October 22, 2006, 01:56:06 PM »
Try it like this :-

enter this all as one .tap file

(main program)
G00 X0 Y0
M98 P1001 L10
M30

O1001
(sub program)
G01 x.........
.............
............
M99

Make sure you have a carriage return on the last line

Graham.
Without engineers the world stops