Hello Guest it is April 18, 2024, 11:27:26 PM

Author Topic: Mach3 M98 ignored  (Read 1488 times)

0 Members and 1 Guest are viewing this topic.

Mach3 M98 ignored
« on: February 15, 2023, 07:08:13 AM »
Hello,

I have a problem with M98 subroutine in Mach3.

If I run this gcode file:

Code: [Select]
G90

F2000
G1 Z -1
G1 X0 Y0

G91
M98 P1000 L4
M30

O1000
G1 Y200
G1 X200
G1 Y-200
G1 X-200
M99

%

the O1000 is never executed. When running in step by step mode, when the M98 line is focused, next step is M30 and not O1000.

If I wrote a second gcode file (1000.tap) and put it in the subroutine folder like this:
Code: [Select]
G1 Y200
G1 X200
G1 Y-200
G1 X-200
M99

%

and call it inside the main gcode file:

Code: [Select]
G90

F2000
G1 Z -1
G1 X0 Y0

G91
M98 (1000.tap) L4
M30

It works.
I try with .066 .062 and .043 version and it doesn't change anything.
Do you know where does come this problem? I haven't found answer on internet.

 

Thank you

jeff

Re: Mach3 M98 ignored
« Reply #2 on: February 15, 2023, 08:40:31 AM »
Thank you JohnHaine,
I already read this post and it doesn't work with subroutine program within the current part program file (separated subroutine in another gcode file works).

Re: Mach3 M98 ignored
« Reply #3 on: February 15, 2023, 11:09:59 AM »
Here is some code (actually for knurling with a rotary axis) which I know works.

G00 X1 Y0 Z67.595
G91
G00 A5
F100
G01 Z-1.397
M98 p2000 L37
G00 X1 Y0 Z67.595
G90
o2000
G91
G01 X10.783 A97.297
G01 X-10.783 A97.297
M99

The main difference I can see is that the "o" in o2000 is lower case.

Offline Graham Waterworth

*
  • *
  •  2,672 2,672
  • Yorkshire Dales, England
    • View Profile
Re: Mach3 M98 ignored
« Reply #4 on: February 15, 2023, 06:58:17 PM »
Try it like this :-

%
G00 X1 Y0 Z67.595
G91
G00 A5
F100
G01 Z-1.397
M98 p2000 L37
G00 X1 Y0 Z67.595
G90
M30

o2000
G91
G01 X10.783 A97.297
G01 X-10.783 A97.297
M99
%
Without engineers the world stops
Re: Mach3 M98 ignored
« Reply #5 on: February 16, 2023, 12:33:30 AM »
Thank you JohnHaine and Graham,
I try your gcodes with lower cases P and O but it doesn't change anything. I try with a fresh install of Mach3 .062 without any personal setup on a virtual machine and it dosen't work.
Is there a way to put Mach3 in debug mode to get log?

jeff
Re: Mach3 M98 ignored
« Reply #6 on: February 16, 2023, 06:55:54 AM »
Hi,
I post a video on youtube to show you the problem:
https://youtu.be/jWNtcMbCoAU

jeff
Re: Mach3 M98 ignored
« Reply #7 on: February 16, 2023, 12:07:35 PM »
Whenever I use M98 and M99 I have always added an M30 (and % on a new line) at the end of the program after the M99 in addition to  the one after the M98
grayhil
Re: Mach3 M98 ignored
« Reply #8 on: February 16, 2023, 12:13:04 PM »
Well I just tried it in simulation and it worked fine v03.422

Re: Mach3 M98 ignored
« Reply #9 on: February 16, 2023, 01:40:54 PM »
Thanks you,
I try to add M30 and % at end of file but it doesn't change anything. I will try with 3.422.
Thank you
Jeff