Secret Art of MACRO PROGRAMMING on a CNC Machine | G-Code Genius

Ғылым және технология

You all have asked for it, and here it is! Donnie's first video simplifying Macros on a CNC machine. Specifically Tornos' SWISS GT 32. To start out this Macro Series the first macro we will cover is a Tool Counting Macro. Programming Macros made simple. Macros make the difference between a GOOD Machinist and a MASTER Programmer.
Tornos - bit.ly/3MDcqLh
0:00 Tornos SWISS GT 32
0:06 What is a Macro?
1:30 Macro Programming on CNC Machine
2:56 Tool Counting Macro
4:10 Comparison Operators
8:17 Macro Program Overview
9:42 Swapping Kennametal CNMG Inserts
10:10 Titansofcnctooling.com
10:23 CNCExpert.com
11:20 Torno's Switzerland Machine Shop Facility
Help us fund FREE Education by purchasing tools seen in our videos here:
TITANSofCNCTooling.com
Create your free CNCEXPERT profile here:
rebrand.ly/TiCNCEx
FREE CNC Machining Academy:
rebrand.ly/TiAcademy
FREE Aerospace Academy:
rebrand.ly/TiAero
FREE Grinding Academy:
rebrand.ly/TiGRIND
Subscribe for daily content and expert knowledge: rebrand.ly/SUBTITANS
___
___
Follow us on Instagram:
rebrand.ly/TiINSTA
Like us on Facebook:
rebrand.ly/TiFACEBOOK
Join the conversation on our Facebook Group:
rebrand.ly/TiFBGroup
Connect with us on LinkedIn:
rebrand.ly/TiLINKEDIN
___
___
THANK YOU to our Partners who make this content possible:
Kennametal - rebrand.ly/TiKennametal
Heller C Series - www.ellisontechnologies.com/h...
Heller HF Series - www.ellisontechnologies.com/h...
DN Solutions - www.titansfordn.com/machines
United Grinding - hubs.ly/Q013zHpC0
Mastercam - rebrand.ly/MastercamEDUTiYT
Tornos - bit.ly/3MDcqLh
Blaser Swisslube - rebrand.ly/TiBlaser
Solidworks - rebrand.ly/TiSLDWRKS20
Trumpf - rebrand.ly/TiTRUMPF2022
Markforged - rebrand.ly/TITAN-Markforged
Tyrolit - rebrand.ly/TiTYROLIT
Mitutoyo - rebrand.ly/TiMitutoyo
Haimer - rebrand.ly/TiHAIMER
Schunk - rebrand.ly/TiSchunk
Kaeser Compressors - us.kaeser.com/titan
#CNC #Machining #Machinist

Пікірлер: 212

  • @TITANSofCNC
    @TITANSofCNC Жыл бұрын

    Here is the Macro used in the video for any of you that are interested. % O1090() #601 = 10 (T112 MAX TOOL LIFE) G800 A1.125 B1 C0.5 D0.1 E.03 F0.0155 G801 A1100 B0.118 C0 D97 E2000 F.004 G802 A0.5 B0.5 C0.5 D0.5 E1 F0.5 G803 A2 B0 C1 M9000 (*** INITIALISATION ***) M10 M82 /M8 G4 X1 G900 M9001 M9002 (*** AXIS REF ***) G28 U0 G28 V0 (*** INITIAL CUTOFF ***) M8 G910 M9003 (*** START LOOP ***) N1 M120 (*** END OF BAR TEST ***) G913 G930 M9004 (*** FEED NEW PART ***) G912 B500 G0 W0.00787 (RETRACT THE BAR IN Z) G0 X1.33858 T110 D0 (RETRACT THE CUT OFF TOOL X) G1 G94 W.65 F165. G28 U0 M9005 (*** MACHINING ***) M9 G0 G95 G97 S1450 M103 P1 T112 D0 Y0 X1.2 Z0 G92 S5000 G96 S330 P1 G1 X-.05 F.007 G0 X.775 Z.02 G4 U1.2 G1 Z0 F.008 X.875 Z-.05 Z-1.03 X1.15 G0 G97 X1.2 #600 = #600+1 G28 U0 () () M9200 (*** CUT-OFF PREPARATION ***) G97 M8 G0 X1.33858 Y0 T110 D0 M103 S5000 P1 G911 G1 G95 X.775 F.004 G0 X.9 W.045 G1 X.875 X.785 W-.045 G0 X.9 M9201 M9202 G1 G95 X-.045 F.004 (CUTOFF) M9203 G1 X-.05 F0.00118 (END OF CUTOFF) G97 (CONSTANT CUT-OFF CANCELLATION) IF [ #600 GE #601 ] GOTO 1234 N5678 (*** END LOOP ***) M121 M9204 M9 M105 M1105 M2105 M9205 M0 (STOP A END OF CYCLE) /M8 G4 X1 M9206 M99 P1 M2 N1234 #600 = 0 (RESET TOOL COUNTER) G28 U0 M9 M103 S100 P1 G4 U1. M105 P1 #3006 = 1 (CHANGE T112 CNMG TURN) M00 G0 Y0 X1.2 T110 G97 S1300 M103 P1 M112 G1 G95 X-.05 F.007 M105 P1 GOTO 5678 O1090() M9000 (*** INITIALISATION ***) M10 G900 M702 M2 M22 (Z4 TORQUE LIMITER VALUE) M702 M3 M1181 (Z4 SERVO-LAG VALUE) M9001 (*** AXIS REF ***) G28 W0 (REF Z4) G28 U0 V0 (REF X4 Y4) M9002 G919 M9003 (*** START LOOP ***) N1 M120 M9004 G55 M405 M9005 (*** MACHINING ***) () () (*** PART EJECTION ***) G55 (Z4 ZERO OFFSET FOR BACKWORK MACHINING) M405 G28 W0 (REF Z4) G0 X0 T500 M11 (OPEN THE COLLET S4) G4 X0.5 M84 M85 G4 X0.2 G28 W0 (REF Z4) G28 U0 (REF X4) M9200 M9201 (*** PART PICKOFF ***) G915 (SHIFTING FOR WORK IN OPERATION) G97 G0 X0 Z0.07874 T400 M404 S5000 P4 (APPROACH BACK SPINDLE) M418 (SYNCHRO PHASE) M702 M4 M1 (TORQUE LIMIT Z4) M702 M5 M1 (ENABLE SERVO-LAG CHECK Z4) G924 (PART PICKOFF) M9202 M9203 G1 G94 W0.07874 F78.74016 (CHECK BREAKAGE CUTOFF TOOL) M702 M5 M0 (Z4 DISABLE SERVO-LAG CHECK) M702 M4 M0 (Z4 TORQUE LIMIT CANCELLATION) G95 (FOR LOOP START) G28 W0 (RETRACT BACK SPINDLE) (*** END LOOP ***) M121 M9204 M405 M5105 M9205 M0 (STOP A END OF CYCLE) M9206 M99 P1 M2 %

  • @williamjohnson7764

    @williamjohnson7764

    Жыл бұрын

    #3006 is the same as M0 but with a message. Do you have to press cycle start twice? I use this all the time in programs, usually between tool changes, to have the operator clear scrap, fasten a part down, rotate a part, etc. He hits cycle start and program continues. #3006=1 (MESSAGE) is part of my default insert manual code in Mastercam. 👍

  • @lo77401

    @lo77401

    Жыл бұрын

    😉

  • @PerlStyle

    @PerlStyle

    Жыл бұрын

    sooo my fanuc didnt have a internal program to do cavity type operations ... so i spent a good day at home outside of work hours..... and made this abomination. when i made it i was warking in italy so comments are in italian . not changing it for this post just google translate things :D % :0887(SVUOTAMENTO CIRCOLARE) (VERSIONE 2.0 PERL) G52X#31Y#32Z#33(POSIZIONAMENTO) G0G54X0Y0 Z1 G1Z0.1 (---DATI FRESA---) (DIAM FRESA) #1=22.3 (PERCENTUALE UTILIZZO FRESA - DA 1 A 100) #6=95 (---DATI CAVA---) (DIAM CAVA) #2=28 (PROFFONDITA MAX) #3=18 (SOVRAMETALLO PARETE) #4=0 (SOVRAMETALLO FONDO) #5=0 (PARTENZA LAVORO Z - METTERE ZERO SE PARTE DA SOPRA) #7=0 (NUMERO PASSATE PASSATE) #8=23 (---CONTROLLO SICUREZZA---) IF[#2LE#1]GOTO100 (---MATEMATICHE---) (DIVISIONI PER RAGGI) #11=[#1/2](RAGGIO FRESA) #12=[#2/2](RAGGIO CAVA) #13=[#1/100] #14=[#13*#6](PERCENTUALE UTILIZZO FRESA) #15=[#14/2](META UTILIZZO FRESA) #17=[#12-#4](RAGGIO PARETE CON SOVRAMETALLO) #18=[#3-#5](FONDO CON SOVRAMETALLO) #22=[#18/#8](INCREMENTO PASSATA Z CALCOLATO) #23=[#22/2](INCREMENTO -Z- PER FORI MINORI RAGGIO FRESA) #30=[#17-#11](INCREMENTO -X- PER FORI MINORI RAGGIO FRESA) (--- MODULI FORI MINORI RAGGIO FRESA---) IF[#17LT#1]GOTO1 IF[#17GT#1]GOTO2 N2 #110=#22 #111=#14 G0X0Y0 WHILE[#110LE#18]DO1 #111=#14 G1X#15Y0 G1X-#15Z-[#110-#23] G1X#15Z-#110 WHILE[#111LT#30]DO2 G1X#111Y0 G3I-#111 #111=[#111+#14] END2 G1X#30 G3I-#30 G1X[#30-1]Z-[#110-1] G1G40X0Y0 Z-#110 #110=[#110+#22] END1 G0Z10 GOTO101 N1 #110=#23 G1X0X0 G1X#30 WHILE[#110LE#18]DO1 G3I-#30Z-#110 #110=[#110+#23] END1 G3I-#30 G1G40X0Y0 G0Z10 GOTO101 N101 G0Z20 M99 G53Y0Z0 N100 M30 %

  • @PerlStyle

    @PerlStyle

    Жыл бұрын

    also one for radial holes . % :0885(FORATURA SU ARCO CIRCOLARE) (V.1 PERL) G52X#31Y#32Z#33(POSIZIONAMENTO) G16 (#2=DIAMETRO INTERASSE) (#3=PARTENZA IN GRADI) (#4=GRADI TOTALI) (#5=NR.FORI) (---MATEMATICHE---) #8=[#5-1] #7=[#2/2](RAGGIO) #6=[[#4-#3]/#8] #110=[#6+#3] X#7Y#3 WHILE[#110LE#4]DO1 X#7Y#110 #110=[#110+#6] END1 G15 G17 M99 M30 %

  • @PerlStyle

    @PerlStyle

    Жыл бұрын

    and circular holes % :0886(FORATURA CIROLARE) (V.1 PERL) G52X#31Y#32Z#33(POSIZIONAMENTO) G16 (#2=DIAMETRO INTERASSE) (#3=PARTENZA IN GRADI) (#4=GRADI TOTALI) (#5=NR.FORI) (---MATEMATICHE---) #7=[#2/2](RAGGIO) #6=[[#4-#3]/#5] #110=[#6+#3] X#7Y#3 WHILE[#110LT#4]DO1 X#7Y#110 #110=[#110+#6] END1 G15 G17 M99 M30 %

  • @mohammedalbattal77
    @mohammedalbattal77 Жыл бұрын

    I watched the video for the first time and then I said, boy, this video needs a cup of tea, a notebook and a pen, there is really a lot of information in this video that needs to be jotted down, thank you guys for this video, especially the rap song at the end of the video, you made me laughing alot 😂

  • @mikemcmullin149
    @mikemcmullin149 Жыл бұрын

    Love the video. I once altered a cnc heater band cutting tool path so it could handle differing slot lengths and any kind of clearances. Commented the living daylights out of the top page explaining what the variable did on the program. Showed the boss a simulation and asked if we could try it. Long story short, less cutting time, everything matched up, and less cutter sharpening. This also freed up the cam programmers to concentrate on one off programming. And yes I got a nice raise too boot.

  • @damionparson247
    @damionparson247 Жыл бұрын

    Thanks for helping make understanding macros so easy. Great video! Great job!

  • @Orakwan
    @Orakwan Жыл бұрын

    This is what separates master machinists to machinist GODS. I've been testing macros for a year on my turret doosan, usually for knowing how long the bar stock is before changing to a new bar, or for milling polygons as Manual Guide i doesn't have a cycle for face milling polygons on my machine. You can even use macros for calculations while in a toolpath, if you want to make an elliptical shape or anything that is not a cone or a circle with some math included without a cam software. When done right, it is beautiful, efficient and, your co-workers who probably don't even know what a macro is will think you're doing some black magic and put their professional knowledge in question. On a technical note, always prefer using conditional loops such as WHILE rather than GOTO statements to avoid some nightmare situations. One interesting book about macros is CNC Programming using Fanuc Custom Macro B, by S.K Sinha. The author also replies to emails with technical questions and is much responsive on cnc forums

  • @paulkraus4799
    @paulkraus4799 Жыл бұрын

    I have to say I have watched a ton of your videos but this is the first one I have saved . Great content

  • @penpal222
    @penpal222 Жыл бұрын

    A lot more simple than I thought it would be! Very cool!

  • @Jack-yl7cc
    @Jack-yl7cc Жыл бұрын

    Busting out a nearly 20 year old book Peter Smid at the beginning; FANUC CNC custom macros, Programming resources for Fanuc Custom Macro B users And yet because of how archaic G code is(Develop around the same time as FORTRAN), that book is still relevant. On the plus side G code is still being updated which is why Marcos and conditional loops are a thing. Now if only the manufacturers would actually standardize their G code and Macros.

  • @MrRtkwe

    @MrRtkwe

    Жыл бұрын

    It's wild seeing this as a regular computer developer. This goes right back to the earliest ways of programming with explicit GOTOs and persistent global variables called macros for some reason...

  • @moorepower7
    @moorepower7 Жыл бұрын

    That book is the best thing ever for learning macros!! Read it cover to cover 10 years ago and I haven't programmed the same since!!

  • @suicidesquadie7990
    @suicidesquadie7990 Жыл бұрын

    G code simplified with complex macro's. Still copying and pasting your macro's so many of my programs. Made some of my own too, nothing too advanced. Appreciate the excellent training I received from you.

  • @josechavez3670
    @josechavez3670 Жыл бұрын

    Great video Donnie. Keep ‘em coming

  • @christophervillalpando1815
    @christophervillalpando1815 Жыл бұрын

    Awesome video Donnie, I'm still recovering from my workout!

  • @gerhardvictor5475
    @gerhardvictor5475 Жыл бұрын

    Great video. I'm looking forward to more on this topic. Thanks a mill

  • @zyndapp800
    @zyndapp800 Жыл бұрын

    Excellent video guys, it's so good that you're showing it off on a Fanuc controller! There are just so many of them out there and macro stuff is super useful. It's just such a shame that Fanuc isn't producing anything similar...

  • @adammiller4879
    @adammiller4879 Жыл бұрын

    Now that Iv mastered g code… I’m on to learning macros, and boy is it so much more difficult 😂I know 2 people that add their own custom macros for in process inspection and automatic tool changed after life expires and retouch off with tool break detect too, if you ever find guys that can make programs fool proof for lights out like that, pay them in gold and never let them go

  • @DolphinWantsPeace
    @DolphinWantsPeace Жыл бұрын

    You can actually do the whole tool life macro (for all the tools) in a subprogram. This keeps your main program much cleaner and shorter. There are also so many more uses for these macros, for example automatically calculating the origin point of the piece (even for both spindles if your machine has them). Also for dual spindle you can calculate where the 2nd spindle should go exactly when taking the workpiece from the 1st spindle using macro and subprogram (to keep main program clean and short). I've done a whole system like this (more stuff than I wrote here) for myself when I was in school, even tho these things are not taught in school. I wish I could have a job like these guys where I can try stuff and discover better systems.

  • @cloudriz

    @cloudriz

    Жыл бұрын

    Why can you not have a job like this? I’ve been doing this for 17 years and I can clearly see you know what you’re talking about. You don’t have to wish anymore dude.

  • @DolphinWantsPeace

    @DolphinWantsPeace

    Жыл бұрын

    @@cloudriz because nobody gives me a chance to prove my skills. Maybe one day I'll also get lucky

  • @tj9382
    @tj9382 Жыл бұрын

    Great video. I was pleasantly surprised to see that book, the very same one I got my company to buy me many years back. And I still use it today when I need to reference or refresh my knowledge. Once I discovered Macro B it was a game changer for many of my had written programs.

  • @ShootingUtah
    @ShootingUtah Жыл бұрын

    As a regular computer science student and certified programmer it's interesting to see how similar but also how extremely different gcode macro coding is to other languages like c++, Java, or python. It's all the same kind of logic at the base level. This actually reminds me of coding in assembly language now that I think of it.

  • @donniehinske

    @donniehinske

    Жыл бұрын

    That’s interesting to hear!

  • @tj9382

    @tj9382

    Жыл бұрын

    Yes macro B uses the same kind of line by line logic as the older languages such as BASIC as opposed to the OOP approach of C++ and Python. Who knows, perhaps CNC controls will all us to write our classes one day. 😅

  • @mikemcmullin149

    @mikemcmullin149

    Жыл бұрын

    One thing I noticed is the GT LT type statements. I'm used to >, ,

  • @mikemcmullin149

    @mikemcmullin149

    Жыл бұрын

    @@tj9382 Fun Fact, DMG uses linux on their controllers and the GUI is python based with XFCE as the display manager.

  • @tj9382

    @tj9382

    Жыл бұрын

    @@mikemcmullin149 Oh really, that’s cool to know. 👍🏻

  • @cncshorts1075
    @cncshorts1075 Жыл бұрын

    Donnie my favorite guy at titans by far

  • @berntinulkshredder
    @berntinulkshredder Жыл бұрын

    Fan and work, make the production a million times smoother! just cool to be seeing this sessions and love it. Just killing it all the time.

  • @shaniegust1225
    @shaniegust1225 Жыл бұрын

    Wow! Great video Donnie! Looking forward to more 👍

  • @adamfreeman218
    @adamfreeman218 Жыл бұрын

    extremely informative video, Great episode

  • @Tablebreaker77
    @Tablebreaker77 Жыл бұрын

    Thank you so much for this its really helping Me fill in the gibberish after starting my job as a cnc operator.

  • @gooblio
    @gooblio Жыл бұрын

    Have fun in Switzerland, I went to Tornos over 20 years ago and bought a couple Decos.

  • @brettmccafferty465
    @brettmccafferty465 Жыл бұрын

    This is control specific. Especially with fanuc controls. I highly recommend you read the machine manual AND the yellow fanuc books that come with your machine. With most fanuc controls you'll need a #3000 under your M30 or "end of record" M code.

  • @fernandonegrete425
    @fernandonegrete425 Жыл бұрын

    Awesome! Excellent video. A macro for compensating work offset with touch probe would be very interesting :D

  • @mtn_sivliu
    @mtn_sivliu Жыл бұрын

    this was actually very educating. thanks a lot.

  • @raghvendrasingh7941
    @raghvendrasingh7941 Жыл бұрын

    Very useful my knowledge of cnc program

  • @master8laster49
    @master8laster49 Жыл бұрын

    Awesome Donnie, I have one for you that I've wanted for quite some time: A macro that can turn really long parts with seamless transitions, no lift just turning all the way to 35" and lets do it in Titanium, I could really use that!

  • @Dn1sdr
    @Dn1sdr Жыл бұрын

    Love to see more information about using macros to interface with the ERP systems.

  • @achpek13
    @achpek13 Жыл бұрын

    Love this guy. Natural vlogger!

  • @Sara-TOC
    @Sara-TOC Жыл бұрын

    Excellent video Donnie! I’d get in trouble if I was caught using the macro part counter back in the day because the supervisor didn’t understand macros and was afraid the machine would crash. LOL “GOTO” on the other hand, was a lifesaver for proving out programs and picking up with where I left off in general. I’ve also heard you can create your own alarms too! I never had the opportunity to ask the guy who figured it out; probably for the better because you know there would be some witty intent behind it 😆

  • @Orakwan

    @Orakwan

    Жыл бұрын

    For part counter there is M54 on fanuc controllers that does just that. On some machines there will be an alarm when you reach the number you want, some other machines don't care and keep going

  • @CncFrezar
    @CncFrezar Жыл бұрын

    Very interesting video!👍

  • @CD3DP
    @CD3DP9 ай бұрын

    Thank you for the lesson you’re a great teacher!

  • @dustinvinci345
    @dustinvinci345 Жыл бұрын

    Great video. Next video you should use the machine time to do an auto power off function!

  • @rcandcnc9684
    @rcandcnc9684 Жыл бұрын

    Cool, really well explained.

  • @senorimotor
    @senorimotor Жыл бұрын

    Nice job with this video.

  • @sicstar
    @sicstar Жыл бұрын

    Donnie the magician introducing us into the dark arts of macro's in programming. :D Well all in all no black magic if you know what you doing, much appreciated to show a glimps of whats going on inside the blackbox for people not that familiar with it or still learning! Also really nice to throw the whole macro code in the comments!

  • @dimsum5567
    @dimsum5567 Жыл бұрын

    You guys produce great content!

  • @davidsum8924
    @davidsum8924 Жыл бұрын

    yes. marco is very useful. as early as the 6M series, i myself have created quite a variety of marco.

  • @younhap
    @younhap Жыл бұрын

    Thank you for the video!

  • @VanillaGorilla_Machinist
    @VanillaGorilla_Machinist Жыл бұрын

    Donnie taught me Threadmilling macros when he was at my shop while as an application engineer for a different project and now I’ve copied that macro to all our mills and we use the crap out of it 🤘🏻🤘🏻🤘🏻

  • @donniehinske

    @donniehinske

    Жыл бұрын

    Thats awesome! What shop are you at?

  • @VanillaGorilla_Machinist

    @VanillaGorilla_Machinist

    Жыл бұрын

    @@donniehinske it’s Steve from RockTech my username won’t come up

  • @donniehinske

    @donniehinske

    Жыл бұрын

    @@VanillaGorilla_Machinist ohhhhh yea! I remember writing that with you guys! It was on an OKK if I recall! Glad it works out for you guys that’s so cool to hear!!!

  • @jimcarriesa1911
    @jimcarriesa1911 Жыл бұрын

    Love that book.

  • @ashokzala2683
    @ashokzala26837 ай бұрын

    Very nice i like your guidelines

  • @zakm0n
    @zakm0n Жыл бұрын

    I program at a job shop with machines that are mostly 35+ years old. Macros and Subs help me keep my programs small enough to fit in the 32k-1024k of program memory I have. Also, I make macros for simple operations so the machinists can punch in a few variables and get stuff like helical plunge operations without bothering me

  • @rkrbrts7149

    @rkrbrts7149

    Жыл бұрын

    helical plunging is a waste of time prefer to plunge point for pocketing dynamic. also subroutine G91 G03 I-. Z-. for counter bores much easier to identify, edit, much faster

  • @brendonv101
    @brendonv101 Жыл бұрын

    I'm not a machinist nor do I intend on becoming one, yet I still found this highly enjoyable. ☺️

  • @brianmcbrinn7564
    @brianmcbrinn7564 Жыл бұрын

    A video I would like to see: Creating your own g codes and incorporating macro variables(like tornos G800/G900). These variables are used in other G codes or you can even create a torx head.

  • @adammiller4879
    @adammiller4879 Жыл бұрын

    Can we please get a video on how a Swiss machines collet system works so well and clamps well enough to Turn ? Pretty please

  • @damiansz4883
    @damiansz4883 Жыл бұрын

    Great!!! More macro examples please!!!

  • @Yamahog
    @Yamahog4 ай бұрын

    Great Vid .... Brings back memories of the 90's when I was punching G-code into my Haas VF 1 and VF 2 Anywho, Don, a question .... Kenametal or Valenite. And what about Boron Nitride ,( CBN ). Stay Safe

  • @nrodondi
    @nrodondi8 ай бұрын

    Yes more videos about macros please

  • @backyardengineer916
    @backyardengineer91611 ай бұрын

    Donnie is such a vibe

  • @boldlyspokennoah307
    @boldlyspokennoah307 Жыл бұрын

    I’ve been super curious about macros so this was pretty cool would definitely like to see more. Also Donnie I’ve said this before but you got mega ninja turtle vibes my dude

  • @donniehinske

    @donniehinske

    Жыл бұрын

    Haha well thank you. Usually I get told I have golden retriever energy

  • @boldlyspokennoah307

    @boldlyspokennoah307

    Жыл бұрын

    @@donniehinske I mean not gonna lie that too lmao but definitely more ninja turtle then golden retriever

  • @travistucker7317

    @travistucker7317

    Жыл бұрын

    @@boldlyspokennoah307 you trying to say he hangs out with sewer rats?

  • @boldlyspokennoah307

    @boldlyspokennoah307

    Жыл бұрын

    @@travistucker7317 cmon don’t rip on yourselves like that!? Jkjk although that would probably make titan master splinter

  • @fishsticks88
    @fishsticks88 Жыл бұрын

    Great for using same program for multiple sized parts. Or things like circles or thread mills

  • @donniehinske

    @donniehinske

    Жыл бұрын

    GREAT ideas! Thank you!!!

  • @bdude92

    @bdude92

    Жыл бұрын

    Exactly this. We use this at my work for varying sized parts. Soo much easier having one program to make 20 sizes than 20 programs!

  • @dakotareid1566
    @dakotareid1566 Жыл бұрын

    Can y’all do more videos like this for mills and lathes?

  • @coreyb4073
    @coreyb4073 Жыл бұрын

    I did a macro program for a tapered stud for a customer, they called me in to do a new version of the stud about 2 years later, I changed 3 variables and the machine was making parts.

  • @tdg911
    @tdg911 Жыл бұрын

    Looks like Unix bash shell scripts 😁. Much love and gratitude.

  • @Jack-yl7cc

    @Jack-yl7cc

    Жыл бұрын

    If only G code had the same level of flexibility as BASH but unfortunately it can't even compare to POSIX Shell.

  • @tdg911

    @tdg911

    Жыл бұрын

    @@Jack-yl7cc exactly. Been using Unix for 32 years now I’m learning g code so at least I have all of the different language structures down. Just need to focus on some manual programming g-code.

  • @moosedeuce2307
    @moosedeuce2307 Жыл бұрын

    I’d love to get some videos on macros for setting machine offsets

  • @jonivanart
    @jonivanart7 ай бұрын

    Can you write a sub-macro where it can calculate the amount of travel a particular tool made while cutting and add that up to calculate actual tool wear? Then add that to any similar tool when programming it so you can change it out when it has reached its limit. Very cool stuff though. Similar to robotics programming, which is my field. 🤙

  • @cloudriz
    @cloudriz Жыл бұрын

    I would enjoy and make great use of a video that could probe a bore populate a work offset. I have some parts in my shop that need reworked. The swimgarms for Polaris slingshots lol.

  • @mikhaildavydenko6841
    @mikhaildavydenko6841 Жыл бұрын

    You miss to tell about #3901's variables which is about workpieces counter. In many cases, when we have a looped workflow we need to deal with that thing

  • @ExplodingPinappleHD
    @ExplodingPinappleHD Жыл бұрын

    Can we also see some mill applications for macros? I used them on 4 axis mills in a aerospace shop on tombstone type fixtures

  • @donniehinske

    @donniehinske

    Жыл бұрын

    Good idea thank you! Will be a great way to show system variables

  • @stevedevney7322
    @stevedevney7322 Жыл бұрын

    I would love to see a multi tool change based on Useage. Is parts 1-10 on t1, parts 11-20 on t2, … parts 51-60 on t6.

  • @moorepower7
    @moorepower7 Жыл бұрын

    Can you show a way to write a macro to keep track of time from a cycle start to a cycle start? I am wanting an easy way to track time per part including setup for billing purposes. The machine (Haas) tells cycle time but I want to easily track part to part time. Trying to stopwatch is a pain 😆

  • @Chiefs1582
    @Chiefs1582 Жыл бұрын

    We run a ton of macro programs at work it's super convenient

  • @Sk8rdkr
    @Sk8rdkr Жыл бұрын

    I got a 3 axis vertical mill. Fanuc control. With very little memory. I would like to run multiple vises and run more parts without creating longer programs and sometimes you may only be able to setup one or 2 vises. With each vise being assigned G54, G55, G56, etc. Is it possible to write a macro to change the work offset in each tool block to cycle through G54, G55, G56? May make for a informative video? Great job with all your doing! Helping us all means a lot!

  • @travistucker7317

    @travistucker7317

    Жыл бұрын

    There are a few ways to do this, but sticking with what was in the video, you could do the same format, run your program in g54, hit 601, your 1234 takes you to a g55, since that's modal, your program can run assuming you don't have 100 g54s in the way, then 602 takes you to g56. Or something like that. You can sit down and write it out

  • @vladimirivanov8114

    @vladimirivanov8114

    Жыл бұрын

    most fanuc controls can switch the work offset just by typing G54, G55 etc. (that's why they actually called G..) so the program will be as simple as G54; M98 P0001; G55; M98 P0001; ... M30;

  • @ttools_professional5173
    @ttools_professional5173 Жыл бұрын

    Please do a course for the swiss type lathe

  • @kevinkc3onohelijeepworld953
    @kevinkc3onohelijeepworld953 Жыл бұрын

    Machining & programming all in one vid 😊exciting 010 power logo up 020 illumination on 030 move forward 30 paces 040 announce hello ☺️we had a robot in elementary school and got to program it to move about the school, now I get to run a automated pick n place machine and watch it build smt pc boards 😉

  • @Rooster121384
    @Rooster121384 Жыл бұрын

    Can you show how you would input the same macro "tool life" for multiple tools that have various tool life. Say od turn rough has 20pcs tool life. Od finish 40pcs. Cutoff 40pcs etc. I feel like your greater to or equal to main count say od turn rough of 20 would have to be in a different area. Or do you just create those macros in tandem with start at say 400 finish 401. But with all tool life? Thanks in advance

  • @sondreheggnes8321
    @sondreheggnes8321 Жыл бұрын

    i'd love to see a macro for siemens, i have a siemens 840d sl controller, and the machine is automated with a robotic arm from ABB, however the camera that sends the coordinates for the part to pick to the robot is not that good. when i use marposs probe i want to be able to limit the probe if i have a part sticking out on the one side for milling it so i don't have to machine my jaws over and over again

  • @keithkeller1025
    @keithkeller1025 Жыл бұрын

    What’s the repeatability of that specific tool holder? In the past on various Swiss machines, like a Star, you’d have to pull the whole holder out, touch off, etc m, then make an offset. Just curious

  • @stuartgaylor2420
    @stuartgaylor24207 ай бұрын

    Is it possible to do MACRO using live axial Endmilling to make different sized hexagons or squares. Like, type in 12 so it will do a 12mm hexagon

  • @jasonbohacek1130
    @jasonbohacek1130 Жыл бұрын

    Fancy BASIC

  • @heyjeeery7587
    @heyjeeery7587 Жыл бұрын

    cute video, you can also use GOTO to skip over a tool or tools in a program, just in case you have to change the order without bugging your programmer.

  • @richhuntsd12
    @richhuntsd12 Жыл бұрын

    Awesome video, thank You, but I just can’t hear that fast! Whew

  • @falconidaes
    @falconidaes Жыл бұрын

    Never use GOTO statement in any code. Yo can learn that in the first year of University. In the next years you can learn it from experience when other try to use it. Anyway, series of programming CNC I found very productive. Keep it rolling.

  • @filippomontevecchi8618

    @filippomontevecchi8618

    Жыл бұрын

    If you are programming fanuc cnc it is not easy to avoid GOTO. The IF statements allows the conditional execution of a single macro statement or a conditional GOTO. Therefore if you want to condionally execute a bunch of macro ans cnc lines there are little alternatives. But I agree with you that GOTO should be avoided whenever possible.

  • @smokeymadden44fan
    @smokeymadden44fan Жыл бұрын

    How does that work without having end1 and do1 statements? Never seen it done this way. Awesome video thanks

  • @donniehinske

    @donniehinske

    Жыл бұрын

    Those statements go into a WHILE statement. This is just IF and GOTO. They work a little differently

  • @TOXIXIFY
    @TOXIXIFY Жыл бұрын

    I'd really like to see a macro that can vary the spindle speed during a cut on a lathe to prevent chatter.

  • @Glenrok

    @Glenrok

    Жыл бұрын

    You can do it. I’ve written one in the past, it’s usually dependent on an added variable for the distance travelled before the chatter starts then adjusting the speed up or down as required when it reaches that point. I found it a bit awkward to use in practice because it requires trial and error for each different type of part before they can run in production.

  • @xm210c

    @xm210c

    Жыл бұрын

    ​@@Glenrok I think the top level comment is actually talking about a macro that constantly varies cutting speed based on a randomly generated (or a seed generated / function) pattern along the programmed path (whatever that is) around a base value. This should by itself alleviate some chatter issues by itself because it'd break up resonance from building up. What you seem to be implying is a cutting speed gradient along a path which is a trial and error solution but you can guesstimate from experience a bit sometimes. Something like a 50% slowdown over a 4xD distance for example. My own experience is actually more dealing with extremely long endmills, 6xD+, occasionally had to grab a 10xD here and there to mixed success.

  • @Glenrok

    @Glenrok

    Жыл бұрын

    @@xm210c yes, that’s exactly how my macro worked. Either way it would have to effect some change in rpm based on either time or distance- obviously I chose distance for mine. I like your idea of a randomly generated number within a specified range, unfortunately I neither know or can find a function in Macro B which would produce one, so a macro would have to be written just for that which would then be called by the chatter macro. I doubt the maths to do so is beyond me- but it is beyond what I could be bothered to mess around with to find out…….😏

  • @khusco1180
    @khusco1180 Жыл бұрын

    Moro macros please 😁

  • @kingbullol3314
    @kingbullol3314 Жыл бұрын

    I had no idea macros were even a thing before your thread macro video, so any video on any macro will be interesting for me. Also, are macros mostly used in swiss machines and production of big quantities of parts?

  • @donniehinske

    @donniehinske

    Жыл бұрын

    Macros can be used on almost any CNC machine. Some just may be formatted differently. Any Fanuc control with Macro B will work like this. You just may only have #500-#549 to play with

  • @havokwest4359

    @havokwest4359

    Жыл бұрын

    Macros can be used in a wide variety of lathes and mills. I've created mill macro program to quick write center/drill/tap programs that kick out proper speeds and feeds for simple plates, a single program for making multiple simple bushings per push off our Haas Lathe w/ barfeeder just by entering the desired OD and length, and controlling stock breaks on Swiss machines when for when you find yourself swapping bar sizes every time you run a job. They definitely take a lot of upfront programming and knowledge of what your using them for, but can save a lot of time in the end for shops that find themselves making a lot of simple parts that change sizes with the wind.

  • @tomislavsvogor3877

    @tomislavsvogor3877

    Жыл бұрын

    @@havokwest4359 when you learn to use a macro, programming becomes easier and the program is clearer and neater when written by hand on a machin. and the advantage is that you seem like God to operators who cannot learn and understand how macro works 😄

  • @Hi_Doctor_Nick

    @Hi_Doctor_Nick

    Жыл бұрын

    I ran a EDM wire 95% of the time using macros. Had it from setting up a pallet of parts, calling programs to set each position, then each program per part. Even had it changing power settings and spark gap for the same program depending on material thickness. All from changing a few numbers. Macros are brilliant and simple for operators to use. I love programming them, the harder the better. Really gets the old brain working lol.

  • @johnl5177
    @johnl5177 Жыл бұрын

    Next idea. Do how to engrave counting serial numbers for parts that will update and store quantity

  • @zyndapp800

    @zyndapp800

    Жыл бұрын

    Yes, please start with G1025 engraving cycle that is using macro variables for serial number. This would be super useful!

  • @yassinesaidi2230
    @yassinesaidi2230 Жыл бұрын

    Great video..and in fact we really need more tutorial videos about macro program..when I was working in milling machine I tried to understand macro programming many times but I failed...not because it hard..it because I didn't find any one can explain that in easy way and further more there are really few videos in KZread talk about this type of programming.

  • @donniehinske

    @donniehinske

    Жыл бұрын

    That’s why I am really looking forward to bringing you guys this series! I truly hope it helps

  • @donniehinske

    @donniehinske

    Жыл бұрын

    That’s why I am really looking forward to bringing you guys this series! I truly hope it helps

  • @rahimzettili9354
    @rahimzettili93547 күн бұрын

    Is 3006=1 work for all the machines or I need to look on manual which one it allows the message not alarm.

  • @user-vh2tq6fi8e
    @user-vh2tq6fi8e Жыл бұрын

    Is it possible to have the screen automatically go back to the program screen when cycle start is pressed after user defined message appears?

  • @rkrbrts7149
    @rkrbrts7149 Жыл бұрын

    good vid, would prefer less cartooning during the training (off track) other than that good macro

  • @stevesye9114
    @stevesye9114 Жыл бұрын

    I would love to see a macro that can cut 100 grooves around 360 degrees. Thanks

  • @Yamototamto
    @Yamototamto Жыл бұрын

    How about programing making a hole with an endmill with spiral toolpath?

  • @donniehinske

    @donniehinske

    Жыл бұрын

    Yea that’s a good one! You thinking like a circular pocket macro?

  • @tomislavsvogor3877

    @tomislavsvogor3877

    Жыл бұрын

    do you mean just the normal helix? you don't need a macro for that. I will write you an example of how I do it (Heidennhein) G0 X0 Y0 Z50 G0 Z10 G1 Z1 F... G43 X=50:2 ( 50 is the diameter of the hole in millimeters ) G41 G3 Z-20 I0 J0 K-1 ( K-1 means that when the tool is working, the shift is 1mm downwards for one round. in this case, the tool will make 20 circles downwards ) G3 I0 J0 ( I only do this to clean the bottom of the hole ) G40 G1 X0 Y0 G0 Z100

  • @Yamototamto

    @Yamototamto

    Жыл бұрын

    @@donniehinske yes. I work on a 4axis mill on FANUC. Basically I use mostly build in instructions from machine. But i'm curious if it is possible to make a macro for making a circular hole but with spiral toolpath like from cam software. Normally fanuc does it like this. Drop down in pre drilled hole or pocket then it makes a circle then adjust one step into the material and then another circle upsizing hole with each circle by that step u programmed in built in cycle. It would be awesome to do it like from cam where you have constantly increasing diameter in which tooll traverses. With macro i think you can program end diameter you want and then program step of that spiral. It would need to include that incremental instructions but it is hard for me to grasp yet. Sorry for bad english. Thanks for reply love your content ppl and all of it. Best wishes from Poland! BOOM!

  • @donniehinske

    @donniehinske

    Жыл бұрын

    @@Yamototamto I see what you are saying. Let me start jumbling that around in my mind and I’ll think of something. I’ve written circular interpolation macros before like you are saying I’ve never had it increase diameter as it does the circular movement (spiral) like you are saying. It CAN be done though. Nothing is impossible! Stay tuned for a video

  • @donniehinske

    @donniehinske

    Жыл бұрын

    @@Yamototamto also… thank you! I am glad you enjoy our videos!!! 😀

  • @supremecommander2398
    @supremecommander2398 Жыл бұрын

    i am still waiting for the internal hexagon on the swiss cnc 😆

  • @ronvonbargen8411
    @ronvonbargen84116 ай бұрын

    I don't understand the GE line wouldn't you want that to be a LT so that the machine keeps running while it's LT ten and then when it counts up to ten have it go to m30 or m00 etc Would this work? #601=10 #600=0 N1234 Main program #600=#600+1 If[#600 LT #601]N1234 M2

  • @cncmilljunkie
    @cncmilljunkie Жыл бұрын

    The only way to know if a macro is not being used is to do a deep dive to every program on the machine and check for macros that are being used. Reading the documentation that comes with the machine is a good start, but I ran machines where the machine tool builder book was wrong. On top of that, you don’t know if anyone had dip there fingers in the programs on the machine. I myself will program Marcos that will return the values to null when finished as a safety check to make sure those values can’t be used somewhere else. With that being said, can you go over the basic concepts to writing programs for probing? Like how to check for low battery State Calibration procedures How to find the safest max feed rate during a non contact move and the fastest feed rate that can be use for a measuring move.

  • @Glenrok

    @Glenrok

    Жыл бұрын

    That’s a good idea, but a better idea would be to read and store any value already in the variable, then return it to that value after your macro finishes. That way, if the machine is depending on an already stored variable, it’s not jeopardised from having been returned to null…..

  • @Ramkumar-mr2cq
    @Ramkumar-mr2cq Жыл бұрын

    How to run a 200mm length work in Tsugami bo206-iii ? Give any ideas !!

  • @kevgh3869
    @kevgh3869 Жыл бұрын

    Hi. We are trying to make a macro that indexes a horizontal table (B) 15 degrees . We have tried : #1=[#1 =15.] it only works for the first index. Can any one tell us what are we doing wrong?

  • @manfredlafs8472
    @manfredlafs8472 Жыл бұрын

    Really nice and informatic video im currently on a DMG Morie NLX3000, with a Mapps II OS, is it Possible to do it in a Maschine like this with the same macro code or do i have to search for the macro code for my machine?

  • @donniehinske

    @donniehinske

    Жыл бұрын

    Your machine will have #500s and up. Just find them in your offset page and make sure they aren’t being used before typing away. I know on older Mori machines the macro menu is harder to find. It’s annoying but it’s there

  • @manfredlafs8472

    @manfredlafs8472

    Жыл бұрын

    @@donniehinske Thank you for youre reply, i found the macro page but i never used it cause im just a trainee and for our Programm wen dont really use them

  • @donniehinske

    @donniehinske

    Жыл бұрын

    @@manfredlafs8472 Just be careful and take your time! Learning them is one of the most powerful tools in the industry!

  • @manfredlafs8472

    @manfredlafs8472

    Жыл бұрын

    @@donniehinske I first need to ask for permission to make something like this cause it takes time, and if the machines not running the company losing money

  • @tomislavsvogor3877

    @tomislavsvogor3877

    Жыл бұрын

    @@donniehinske when we use the macro, we use it so that there is no problem even if the macro is used. for example: if I use #500 to define the offset at the beginning of the tool and another operator overwrites that macro with another variable, it's not a problem because when I start my program, macro #500 is set again to the value I defined. you mentioned that you have a macro of that thread stored next to it. if you defined those macro values in that program, you can later delete or change them without any problem, because the next time you start that threading program, your values will be written again in the macro you use.

  • @merouanebenderradji1582
    @merouanebenderradji1582 Жыл бұрын

    wait what if the macro variable number 600 was used by the machine manufacturer and it just happens to be 0 by chance at the time you're checking it, how to figure that out ?

  • @malopomalo6563
    @malopomalo6563 Жыл бұрын

    Hey people, any g code basics video yall recommend. Im a student btw so i need THE basics.

  • @arturobetancourth3988
    @arturobetancourth3988 Жыл бұрын

    Macro for auto-comp please!

  • @theoDSP
    @theoDSP Жыл бұрын

    I'm a software engineer. and looking at the Macro programming guide I can see very chaotic style of programming ther. Global variables, goto statements, implicit semantics. AKA a nightmare...

  • @flyingjeep911
    @flyingjeep911 Жыл бұрын

    Can y’all do a vidjeo on DO Loops

  • @donniehinske

    @donniehinske

    Жыл бұрын

    Yes we will

  • @williamlind2843
    @williamlind2843 Жыл бұрын

    Dude!! I have guys with me that can barely write G-code. They are so afraid of it and make it harder than it is. My 1st supervisor left me to go to the mill dept after 2 years operating experience. He said you're the new lathe supervisor, G1 is feed, G0 is rapid and walked away forever!! 35 years later I'm running a CNC division at a large manufacturer, and I can't get these guys to get it!!! I'm literally here watching TITAN'S of CNC on my own time!! They won't do it!!!

  • @DannyWallsPratt

    @DannyWallsPratt

    7 ай бұрын

    You're so fuckin awesome. You're a great expert. Bet your company would fold without you....punk

  • @suicidesquadie7990
    @suicidesquadie7990 Жыл бұрын

    Still have the self destruct in that program.

Келесі