Machsupport Forum
Mach Discussion => FAQs => Topic started by: Mario25 on January 28, 2009, 05:03:07 PM
-
Hi guys,
as this is my first time to program something to use Mach3 mill I decided to do something really easy, this is what I have programed:
O1000
G54 G94 G90 G21
M6 T1
G43 H01 G0 Z50
G0 X0 Y0
M98 P50 2000
G80
G0 Z10 M30
O2000
G81 R2 Z-12
G91 X5
G90 M99
What I notice is that Mach3 do not seem to accept M98, is there any one who could help me? Does Mach3 has a different code to call the sub-program?
Thank you very much for your help.
Mario
-
Hi, Mario
Try this'
O1000
G54 G94 G90 G21
M6 T1
G43 H01 G0 Z50
G0 X0 Y0
M98 P2000 L50; P2000 calls O2000, L50 repeat's it 50 times
G80
G0 Z10 M30
O2000
G81 R2 Z-12
G91 X5
G90 M99
% ;need this or blank line feed also
Chip
-
Hi Chip,
Thanks for your reply, I just tried it and it only does two holes for some reason, I do not understand because everything seems to be OK.
With my program I could not even make one hole so eventually we will get there :)
Any other suggestion you could do.
Many thanks.
Mario
-
Hi Chip,
I went back to the program on Mach 3 and I only noticed now that it does not accept M99 although it is written on the file which I load.
I already tried several times and ways but I can not manage to load the M99 and that is probably the reason it only drills two holes.
Any way if you have any idea please let us know.
Thanks once more for your concern.
Mario
-
Hi, Mario
Your leaving out the % or line feed at the bottom of your G-code.
Chip
-
Also, if your not wanting to drill each hole twice, you need to put the "G80" in the line after the "G81"
The max number of repeats is 998 I think.
-
Hi Chip,
thanks a lot it works perfect, I only now worked out what you mean by %, it is just a something after the last line of the program to accept M99.
I thought I had to put some kind of percentage value for example 20% or whatever and did not realize it was only necessary to put the % signal.
Best regards.
Mario
-
Hi Sam,
that is well pointed, I tried it and really only drills the hole once and then goes to the next one , so with this two ways of drilling we can choose which one suit us better.
Thank you both, it was a great help.
Mario
-
Hi, Mario
It's a good habit to get into, Most if not all Cam software allows it.
O1000
G54 G94 G90 G21
M6 T1
G43 H01 G0 Z50
G0 X0 Y0
M98 P2000 L50 ;M98 P50 2000, P2000 calls O2000, L50 repeat's it 50 times
G80
G0 Z10
M30
% ;You can put it hear also
O2000
G81 R2 Z-12
G91 X5
G90 M99
% ;Need this or blank line feed
Glad I could help, Chip