MACRO HACKS! Automate Your Tool Offsets and Data - Haas Automation Tip of the Day

Published 2019-02-14
Mark gets back out into the deep water on this one. Check out how you can automate the proper entry of tool offsets and other important tool data using one of Mark's favorite macro variables; #3026. It's easy to understand and use, and it'll make your programs more efficient.

Link to bonus "Cheat Sheet":
www.haascnc.com/video/Video-Bonus-Content.html

Links to the plethora of other "Macro" related TOD videos:
In-Process probing    • In-Process Part Measurement; Probing ...  
Probing Variables    • Automate Using Your Probe! Make the M...  
DPRNT    • Output Your Machine Data for Analysis...  
M97    • Run More Than One Part at a Time; How...  
Tool Offsets Probing    • Tool Offsets Explained – Haas Automat...  
Work Offset Probing    • Set Work Offsets in Seconds – Haas Au...  
Displaying Macro Info    • Get the info you need by customizing ...  
Lookahead    • Limiting Block Look-Ahead when using ...  
Create your own G-Codes    • Easily Create Your Own Custom M and G...  
Angle Probe Macro    • Quickly Pick Up a Work Offset and an ...  
M30 Counters, and their variables    • Easily keep track of your parts using...  

Don’t miss any TIP-OF-THE-DAY videos. Click here www.haascnc.com/about/Newletter_Signup.html to join our email list!

If you enjoyed this video, please hit the like button and share it with a friend who’ll find it helpful . . . and thanks!

Follow Haas:
Facebook – www.facebook.com/HaasAutomationInc/
Instagram – www.instagram.com/haas_automation/
Twitter – twitter.com/Haas_Automation
LinkedIn - www.linkedin.com/company/haas-automation/

All Comments (21)
  • @Tpreb6
    Here is a macro I wrote to pickup a part from one side, jog to the other side and pick the opposing side up and store the mid-point in the selected work offset. It will also store the edge locations and the overall sizes in the G154P01, G154P03 and G14P3 offsets. Where is this useful? Anytime you need to pickup the mid-point of a machined or odd size part that would be difficult or time consuming to use the canned cycles. Now, I am by no means an expert in macros, but learning all the time. And, there are always many ways of writing a macro to do the same thing so, I would appreciate any constructive criticism or helpful information that would help me, and others out. -Mark, and Haas, HUGE Thank you for continuing to share and help your users out! It is very appreciated! #100= 1 (X=1, Y=2 AXIS TO PICKUP) #101= 54 (WORK OFFSET, 54-59) (MAKE SURE BLOCK DELETE IS OFF FOR FIRST PICKUP) (FIRST PICKUP PROBE MOVES + POSITIVE) (SECOND PICKUP PROBE MOVES - NEGATIVE) (1-JOG PROBE TO WITHIN .5 OF FIRST SURFACE) (2-RUN PROGRAM) (3-JOG PROBE TO WITHIN .5 OF OPPOSITE SECOND SURFACE) (4-RUN PROGRAM) (MID POINT OF BOTH PICKUPS = OFFSET SELECTED) (INDIVIDUAL SURFACE PICKUPS ARE STORED IN G154P01 & G154P02) (OVERALL DISTANCE BETWEEN THE PICKUP ARE ON G154P03) (FIRST X PICKUP=G154P01) (SECOND X PICKUP-G154P02) (OVERALL DISTANCE BETWEEN X PICKUP-G154P03) (FIRST Y PICKUP=G154P01) (SECOND Y PICKUP-G154P02) (OVERALL DISTANCE BETWEEN Y PICKUP-G154P03) IF [#100 LT 1] #3000=15 (#100 MUST BE 1 OR 2) IF [#100 GT 2] #3000=15 (#100 MUST BE 1 OR 2) IF [#101 LT 54] #3000=20 (WORK OFFSET MUST BE 54-59) IF [#101 GT 59] #3000=21 (WORK OFFSET MUST BE 54-59) IF [#100EQ1] GOTO 100 IF [#100EQ2] GOTO 200 (BEGINNING OF X PICKUP) N100 /(1ST X PICKUP IN + DIRECTION) /G65 P9995 W154.01 A20. D.5 /#110=#14001 /GOTO 110 (2ND X PICKUP IN DIRECTION) G65 P9995 W154.02 A20. D-.5 #111=#14021 (AVERAGE FOR BOTH PICKUPS IN X) #115=[[#110+#111]/2] #7041=#7021-#7001 (SETTING WORK OFFSET FOR X) IF[#101EQ54] #5221=#115 IF[#101EQ55] #5241=#115 IF[#101EQ56] #5261=#115 IF[#101EQ57] #5281=#115 IF[#101EQ58] #5301=#115 IF[#101EQ59] #5321=#115 GOTO 120 N110 #3032=1(TURN BLOCK DEL ON) M30 N120 #3032=0(TURN BLOCK DEL OFF) M30 (END OF X PICKUP) (BEGINNING OF Y PICKUP) N200 /(1ST Y PICKUP IN + DIRECTION) /G65 P9995 W154.01 A20. E.5 /#112=#14002 /GOTO 210 (2ND Y PICKUP IN -DIRECTION) G65 P9995 W154.02 A20. E-.5 #113=#14022 (AVERAGE FOR BOTH PICKUPS IN Y) #115=[[#112+#113]/2] #7042=#7022-#7002 (SETTING WORK OFFSET FOR Y) IF[#101EQ54] #5222=#115 IF[#101EQ55] #5242=#115 IF[#101EQ56] #5262=#115 IF[#101EQ57] #5282=#115 IF[#101EQ58] #5302=#115 IF[#101EQ59] #5322=#115 GOTO 220 N210 #3032=1(TURN BLOCK DEL ON) M30 N220 #3032=0(TURN BLOCK DEL OFF) M30 (END OF Y PICKUP)
  • @nyccnc
    Love this stuff - keep it up!
  • @YCM30cnc
    Mark / HAAS; these tips are 5-Star, the #3026 making sure tool offset always matches the tool # in the spindle is BIG stuff. Amateur here moving from Mach3 CNC to the next level and the ‘HAAS culture’ is guiding the way. 👍👍💪💪
  • @_P0tat07_
    Once my classmate showed me that Auto probing macro, I’ve been flying through with tool setups. It makes setting tools up so, so much faster and enjoyable.
  • @RafaelSoldan
    Talking about tool offsets I would love to see a video on diameter offsets tool comp. All your videos are amazing and great teaching tools. Thank you!
  • @akronnekron233
    Thank you! Cad cam is awesome, but maybe macros are better at least some areas. At age of 37 I still love to learn and I love my job more with every new thing I learn.
  • after 40 years on lathes I'm now being dragged kicking and screaming onto mills, these videos are helping so much.
  • We didn't purchase to tool probe so we created a macro to ease setting tool lengths. We set all tools from the table surface as it never changes. We found the distance from home to the table surface in Z, store that number, then touch off tools to the table surface. #5023 is the current machine position in Z. Subtract that from the distance found before and you have your tool length. Using #3026 we then write it to the correct offset with a cycle start.
  • @tarkka
    Fantastic chart!! Thank you!
  • @GC-hw9ju
    I wish there was a video explaining how to set the tool offsets on the TL-1 Lathe with the next generation control. Could you do a video on that?
  • any plans on doing a video about the new way to touch of tools in the lathe? you know when you go to edit/vps/probe to do that?
  • @vitalcarry
    Hey Mark, do a video if the C-Axis on the CL-1 and just a little more in depth video on the CL-1, PLEASE!! My CL-1 delivers later this month and would love to see more of it in action!
  • @Thefreakyfreek
    I wrote Marcos for milling a keyway an boring a hole with a endmill an also enlarging a hole from a diameter I use them all the time but I use Fanuc so I hope I can also use #3202 which would be amazing for me so radius compensation would be automatically used instead of puting a g41 d10 ; g40 in front of them
  • Still not to the macro level. But LOL on the ...pause...Daniel Machado :-) Brilliant. I will come back to this later as my reference library...Thanks, Mark, excellent presentation as usual.
  • Love the channel and have learned a ton of new tips over the years. Now I'm at a spot where I'm programming and running my Haas CNC machines and about ready to pull the trigger on getting a robot to load pallets in and out of the machine. But I cant find anywhere online that tells me how to TRULY run lights out with the HAAS and my Renishaw probe. so if a tool break detection finds a tool break it will automatically switch to the sister tool. If anyone has some tips I'd love to hear it. Thanks in advance.
  • This is really fucking cool even though I'm not in a shop that needs it! Awesome to know. Thanks for supporting your average machinist with all these awesome videos! Great stuff.
  • @GintasMilcius
    Thanks for great tips. I was wondering is there a way in HAAS control to have more than 200 tool offsets? In our shop we like to have different tool number for every tool and 200 offsets don't seem to be a lot.