Hello Guest it is March 19, 2024, 07:47:42 AM

Author Topic: IF you could add new Gcode functions to Mach3 what would you want?  (Read 8511 times)

0 Members and 1 Guest are viewing this topic.

Offline BR549

*
  •  6,965 6,965
    • View Profile
Just curious as to what users would add to the Gcode Functions side IF they could.

Just a thought, (;-) TP
Re: IF you could add new Gcode functions to Mach3 what would you want?
« Reply #1 on: June 14, 2012, 06:19:48 PM »
I don't need G codes I need M codes  :D

Sync codes M70 M71 M72 for the Lathe

Presently a second computer running Mach3 would also be looking and using these.

Unless the "powers to be" can add gantry Y and B axis's to the mix and they could do concurrent but separate TP routines.
I love gantry loaders, conveyors and palletizers, just cant seem to figure a way to get mach to work with them all efficiently.

Offline Graham Waterworth

*
  • *
  •  2,667 2,667
  • Yorkshire Dales, England
    • View Profile
Re: IF you could add new Gcode functions to Mach3 what would you want?
« Reply #2 on: June 14, 2012, 07:59:11 PM »
My list would include :-

Lathe

G83 Front drilling cycle
G87 Side drilling
G84 Front tapping
G88 Side tapping
G85 Front boring
G89 Side boring

G34 Variable lead threading
G92 Threading
G76 Threading using standard Fanuc format

Mill/Lathe

G27 Ref return check

G31 P99 Torque limit skip

G65/G66 Macro calls with G & M code calls with parameters

M99 Pnnnn with conditional return from sub, e.g. jump to this line number on return from sub.

Just for starters  ;)

Graham
Without engineers the world stops
Re: IF you could add new Gcode functions to Mach3 what would you want?
« Reply #3 on: June 14, 2012, 09:08:26 PM »
I'd be happy if the existing G and M codes simply did what they were supposed to, first time, every time.  That has been my single greatest joy since switching to the KFlop - it is 100.000% reliable and consistent.  It has not screwed up, even a tiny bit, one single time in the last 5 months!  When the machine does something wrong, I KNOW it's because I programmed it wrong, and not that the program did not execute correctly.

Regards,
Ray L.
Regards,
Ray L.

Offline rcaffin

*
  •  1,052 1,052
    • View Profile
Re: IF you could add new Gcode functions to Mach3 what would you want?
« Reply #4 on: June 17, 2012, 04:43:42 AM »
Quote
I'd be happy if the existing G and M codes simply did what they were supposed to, first time, every time.
Sigh.
Especially with parameters and subroutines ...
But you knew I would say that of course :-)

Actually, to hark back to g83 for a moment: The Haas manual says that all the g8x codes are modal:
     'This G code is modal so that it is activated every X and/or Y axis move, and it will rapid
      to that position and then cause this canned cycle to be executed again, until it's canceled.'
so that the following should drill TWO holes, at X=1 and X=2 (I think)
g83 x1 y0 z-1 q1 r1
g0 x2
However, I find that under mach the g83 code is not really modal. The above code would only drill one hole.
I admit, I have never tried the following:
g83 x1 y0 z-1 q1 r1
x2

Where it gets worse is when the program (in a subroutine ... I know) looks like this
g0 x1 y0
g83 z-1 q1 r1
This does not *always* do the same thing as
g0 x1 y0
g83 x1 y0 z-1 q1 r1
That is, omitting the X & Y in the g83 sometimes gets Mach 3 very confused, and the holes are put in different places.

Sigh: defensive coding required.

Cheers

« Last Edit: June 17, 2012, 04:58:24 AM by rcaffin »

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: IF you could add new Gcode functions to Mach3 what would you want?
« Reply #5 on: June 17, 2012, 01:13:52 PM »
YOu will also find out SOME of the Drill Cycles turn the G64 OFF during the cycle BUT do not turn it back ON after it is cancelled (;-) That makes a clunky running program(;-) UNLESS you remember to turn the G64 back on in the code.

(;-) TP



Offline simpson36

*
  •  1,369 1,369
    • View Profile
Re: IF you could add new Gcode functions to Mach3 what would you want?
« Reply #6 on: June 21, 2012, 10:46:14 PM »

g0 x1 y0
g83 z-1 q1 r1
This does not *always* do the same thing as
g0 x1 y0
g83 x1 y0 z-1 q1 r1
That is, omitting the X & Y in the g83 sometimes gets Mach 3 very confused, and the holes are put in different places.
That is good info to have since I do this all the time . . if I am using G83 at all. To comment on your earlier observation, note that modal means 'on till turned off' so inserting another 'G' command (G0 in this case) within a modal frame is probably asking for trouble. Try the code that you said you have never tried as that should work fine for you.

Another option is to not use G83 at all and instead substitute a parametric macro. It may seem odd to replace what is essentially a macro (G83) with another macro, but you can do a lot more with it.

I have been asked about parametric programming a lot and I finally posted a video on that topic and it happens to use G83 as the 'whipping boy'. The video contains links to the actual parametric macros and the G-code that calls them so that interested persons can noodle over them and figure out what is actually going on.

http://www.youtube.com/watch?v=Cu61oBY5-rw
Re: IF you could add new Gcode functions to Mach3 what would you want?
« Reply #7 on: August 30, 2018, 06:08:28 AM »
Operation:- First positioning of tool at xy plane. After that tool rapidly traverse up to R plane , then boring operation start from R plane to  point Z. After that tool rapidly return to initial position.

O5129
N10   M06 T08 ;
N20   G90 G80 G17 G00 G54 X0 Y0 ;
N30   G43 Z100 H1 ;
N40   M03 S1000 ;
N50   M07 ;
N60   G99 G85 X10 Y25 Z-30 R5  F100 ;
N70   X40 Y10 ;
N80 G98 G80 G00 Z100 ;
N90 M05 M09 M30 ;       
for more details my link is- http://www.hdknowledge.com/2018/08/how-do-i-make-program-with-fanuc-g85-boring-cycle.html
Re: IF you could add new Gcode functions to Mach3 what would you want?
« Reply #8 on: August 30, 2018, 01:16:43 PM »
Most of the mill requests are for features useful to people programming by hand. The single biggest change in CNC is CAM. I have extensive hand programming experience. I use a CAM program almost exclusively now. The big bed mill we purchased for a tiny fraction of new was because the company that owned it could not justify the programming time for small quantities. We blow out single parts all the time.

Every CNC machine has idiosynchrosies like Mach 3. That is why CAM programs have post processors. You edit the post for your machine and all those issues go away. CamBam and others, the best $150 upgrade you can make on your machine.

The beauty of Mach 3/4 is that the control is a PC and you can run the CAM program right alongside.  Mere seconds to edit the CAM file and reload it into Mach3/4. Just broke your last 3/8” tool and only have a 1/4” for that pocket? Change it in CAM repost it, load the code and tool and finish the job.