Jump to content

Welcome to eMastercam

Register now to participate in the forums, access the download area, buy Mastercam training materials, post processors and more. This message will be removed once you have signed in.

Use your display name or email address to sign in:

cncchipmaker

Verified Members
  • Posts

    190
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by cncchipmaker

  1. My newest macro for Haas machining centers. My brother needed a way to automatically set G52-G59 using any tool guage length. O0001 (Use decimal point when changing coordinate system number.) (Change #600) #600=52.(Coordinate System) (Coordinate System Variable Set) #652=5203.(G52) #654=5223.(G54) #655=5243.(G55) #656=5263.(G56) #657=5283.(G57) #658=5303.(G58) #659=5323.(G59) (SET Z) #[600.+#600]=#5023+#[2000.+#3026] M30
  2. We use a rotation macro at work. It depends on how your machine is set up. If you know trig and know how to manipulate your system variables you can create your own version.
  3. Has anyone used one of the macros yet? I am just curious.
  4. rpadyk please give this a try: O3333(SPIRAL ROUGH ID POCKET) (INCREMENTAL AND ABSOLUTE MACRO) (MUST HAVE START HOLE IN CENTER) (UNPROVEN) (FORMAT G65/G66 QSTDRZEFV) (Q = #17 - STEPOVER IN Z/ DOC) (S = #19 - STEPOVER IN X/ PERCENTAGE) (T = #20 - TOOL DIAMETER) (D = #7 - PART INTERNAL DIAMETER) (R = #18 - R PLANE) (Z = #26 - Z START/ TOP OF STOCK) (E = #8 - END OF POCKET IN Z) (F = #9 - FEEDRATE) (V = #22 - 1 FOR VARIABLE FEEDRATE, 0 = FIXED) (*********************************) (CALCULATE DOC IN Z) #100=ABS[#26]-ABS[#8] #100=ABS[#100] IF[[#26*#8]GE0]GOTO1 #100=ABS[#26]+ABS[#8] N1#101=ROUND[#100/#17] #102=#100/#101 IF[#102GT[#100/2.]]THEN#102=#100 (CALCULATE DOC IN X) #103=[#19*.01]*#20 #104=[#7/2.]-[#20/2.] #105=ROUND[#104/#103] #106=#104/#105 IF[#106GT[#104/2.]]THEN#106=#104 #107=#5001 #108=#5002 G0G90X#107Y#108 Z[#26+.1] G1Z#26F#9 #109=#5003-#102 #116=3.14*[#106*2.] #119=#9 #126=#106 WHILE[#101GT0]DO1 IF[#101EQ0]GOTO10 #101=#101-1. G90G1Z#109F#119 G91G41X#106 G03I-[#106] #105=#105-1. #106=#106+#126 IF[#105EQ0]GOTO20 WHILE[#105GT0]DO2 IF[#105EQ0]GOTO20 #129=#119*[[3.14*[#106*2.]]/#116] IF[#22EQ0]THEN#129=#119 G03X-[#106*2.]I-[#106]F#129 #105=#105-1. #106=#106+#126 IF[#105EQ0]GOTO20 #129=#119*[[3.14*[#106*2.]]/#116] IF[#22EQ0]THEN#129=#119 G03X[#106*2.]I#106F#129 #105=#105-1. #106=#106+#126 END2 N20 IF[#5001LT#107]GOTO30 G03I-[#106] GOTO40 N30 G03I#106 N40 G90G1G40X#107Y#108F100. #109=#109-#102 END1 N10 G90G0Z#18 M99
  5. Sorry rpadyk, I did not give you what you really wanted. I am however working on a pocket id macro that does what you are looking for but its at work and I will have to wait after the holiday to get it to you.
  6. Give this a try. I did not have one written so I made up this new one. It is setup for horizontal milling so you can see in the Y axis where it starts and stops. Let me know if it works please. I do not get a chance to prove everything out here at work. O6011(FINISH ID) (ABSOLUTE MACRO) (UNPROVEN) (FORMAT G65/G66 TCDRZEFS) (T = #20 - TOOL DIAMETER) (C = #3 - CUTTER COMP DISTANCE) (FROM EDGE OF TOOL) (D = #7 - PART INTERNAL DIAMETER) (R = #18 - R PLANE) (E = #8 - END OF ID IN Z) (F = #9 - FEEDRATE) (S = #19 SPRING PASSES 3 MAX) (*********************************) #103=#5001 #105=#5002 #109=#19 IF[#109GT3.]THEN#109=3. #113=#105 #115=#105+[[[#7/2.]-[#20/2.]]-#3] #105=#105+[[#7/2.]-[#20/2.]] #155=0 #155=#155+[[#7/2.]-[#20/2.]] G0G90X#103Y#115 Z#18 G1Z#8F50. G41Y#105F[#9/3.] WHILE[#119GE0]DO1 IF[#119LT0]GOTO10 #119=#119-1. G03J-#155Z#106F#9 END1 N10G90G03J-#155 G1G40Y#115 G0Z#18 X#103Y#113 M99
  7. I need to update one of the macros because I found an error in it when I was reviewing it, sorry I am not perfect. Please replace the ID-Cone Macro with this: O6888(CUT 0-180 DEG ID TAPER) (ABSOLUTE SURFACING MACRO) (UNPROVEN) (FORMAT G65/G66 AQDTSRZEF) (A = #1 - INCLUDED ANGLE OF PART FROM BOTTOM) (Q = #17 - STEPOVER IN Z/ CUSP HEIGHT) (D = #7 - TOOL DIAMETER) (T = #20 - TOOL RADIUS/ BALL OR BULL) (S = #19 - PART ID/ TOP) (R = #18 - R PLANE) (Z = #26 - Z START ZERO) (E = #8 - END OF TAPER IN Z) (F = #9 - FEEDRATE) (***********************************) #100=ABS[#26]-ABS[#8] #100=ABS[#100] IF[[#26*#8]GE0]GOTO1 #100=ABS[#26]+ABS[#8] N1#101=ROUND[#100/#17] #102=#100/#101 IF[#102GT[#100/2]]GOTO1000 #103=#5001 #105=#5002 #113=#105 #115=[[#19/2]-[#7/2]]-.1 #115=#105+#115 #155=0 IF[#7EQ[#20*2]]GOTO10 #105=#105-[[#7/2]+#20] #155=#155-[[#7/2]+#20] N10#105=#105+[#19/2] #155=#155+[#19/2] #125=90.+[#1/2] #105=#105-[#20/TAN[#125/2]] #155=#155-[#20/TAN[#125/2]] G0G90X#103Y#115 Z[#26+.1] G1Z#26F#9 #106=#5003 G41Y#105 WHILE[#101GE0]DO1 IF[#101LT0]GOTO100 #101=#101-1. G90G02J-#155F[#9] #105=-[TAN[#1/2]*#102] #155=#155-[TAN[#1/2]*#102] G91G1Y#105Z-[#102]F[#9/3] END1 N100G0G90Z#18 X#103Y#113 M99 N1000#3000= 1( Q VALUE TOO BIG )
  8. Here you go. You will have to create subs with your font and size of number starting with program 8100 representing zero, 8101 representing 1 and so forth. These subs should be posted in incremental. O8116( S/N MACRO ) ( USE OFFSET #100 FOR SERIAL # ) ( 00.0001 WILL ENGRAVE 1 ) ( 1ST NUMBER ) #138=[#100*.1] #140=FIX[#138] #141=#140+8100. ( 2ND NUMBER ) #138=[#140*10] #139=FIX[#100] #140=#139-#138 #142=#140+8100. ( 3RD NUMBER ) #138=[#139*10] #139=FIX[#100*10] #140=#139-#138 #143=#140+8100. ( 4TH NUMBER ) #138=[#139*10] #139=FIX[#100*100] #140=#139-#138 #144=#140+8100. ( 5TH NUMBER ) #138=[#139*10] #139=FIX[#100*1000] #140=#139-#138 #145=#140+8100. ( 6TH NUMBER ) #138=[#139*10] #139=FIX[#100*10000] #140=#139-#138 #146=#140+8100. ( ARGUMENT ) IF[#141GT8100.]GOTO1 IF[#142GT8100.]GOTO2 IF[#143GT8100.]GOTO3 IF[#144GT8100.]GOTO4 IF[#145GT8100.]GOTO5 IF[#146GT8100.]GOTO6 GOTO100 N1M98P#141 N2M98P#142 N3M98P#143 N4M98P#144 N5M98P#145 N6M98P#146 (UPDATE SERIAL NUMBER) N100#100=#100+.0001 M99
  9. Yes, it is for using a hard tool touch off ike using a piece of .001 shim stock or a .5 inch Joe block. You would have to subtract these values after the touch of or you could just change the macro like this: .001 shim #5003-.001 or .5 Joe Block #5003-.5.
  10. Anyone out there get a chance to use any of the macros yet or have any questions?
  11. I was going through my files and realized that I spelled square wrong on a couple of folders, oops my brain must have been on overload.
  12. I believe your syntax is a little off and that is why you are getting the alarms. Please try it this way. X[113.4+#117].
  13. Most of these I wrote about five years ago when I first realized how powerful custom macro b was. I would have to say that most applications for these would be for tooling but we have used them for parts here at work. If it is not clear as to what something does for you guys please ask and I will gladly answer any questions for you. Remember if it says not proven it means I have not even cut any chips with it yet. So, it is worthy of a dry run if you want to play with it. I believe most or all of the toolpath I incorporated has a .100 thousandths clearance on all of the moves. If you would like to change something with one of them we can do that here as well. Just post the macro with your request and I can help you change it. One I forgot to add to the list was my most recent. It is a tool change macro that automatically sets each tool. Should work for most fanucs and robodrills. O0001(AUTOMATIC TLO MACRO) (CHANGE 2000 TO 2200 FOR ROBODRILL) (YOU MUST MANUALLY SET #100 & #101) (DO NOT FORGET THE DECIMALS) M00 #100=1.(FIRST TOOL TO SET) #101=10.(LAST TOOL TO SET) N1T#100M06 #102=#100+2000. M00 (TOUCH TOOL) (HIT CYCLE START) #[#102]=#5003 G91G28Z0 G90 #100=#100+1. IF[#100LT#101]GOTO1 M30
  14. So I have decided I am going to share my custom macro B programs. These programs generate 3D and basic 2D shapes for CNC mills. The C variable on the radius macros is the angle of incremental rotation that you want to cut in degrees. Cool Macros.zip
  15. Here is my latest macro for standard mills. I have only dry ran it and not been able to cut any chips with it yet. I am not familiar with mill turns so in order for me create the macro you are looking for I would need to know your exact variable inputs, the variables that you have at your disposal and what you need the macro to do exactly in order for me to help you. Thanks. O5656(DIAMOND PIN MACRO) (PIN AT 0 DEGREES IS VERTICAL) (ABSOLUTE MACRO) (FORMAT G65/G66 ABDTMWREFS) (A = #1 - INCLUDED ANGLE OF PIN) (60 DEGREES IS COMMON) (B = #2 - G68 ROTATION FROM 0 DEGREES) (D = #7 - DIAMETER OF PIN) (T = #20 - TOOL DIAMETER) (M = #13 - MATERIAL SIZE) (SQUARE OR ROUND) (W = #23 - WIDTH OF PIN CONTACT) (R = #18 - R PLANE) (E = #8 - END OF EM IN Z) (F = #9 - FEEDRATE) (S = #19 - # OF SPRING PASSES) (*********************************) (LIMIT SPRING PASSES TO 3.) IF[#19GT3.]THEN#19=3. (STORE CURRENT XY POSTION) #100=#5001 #101=#5002 (CALCULATE TANGENT POSITIONS) (BASED ON ARGUMENT -A-) (-X-/-I-) #102=[#23/2.]+[COS[#1/2.]*[#20/2.]] (-Y-/-J-) #123=ASIN[#23/2.]/[#7/2.] #103=[COS[#123]*[#7/2.]]+[sIN[#1/2.]*[#20/2.]] (CALCULATE FIRST POSITION -X-) #105=#102+[TAN[#1/2.]*[#103]] (CALCULATE MATERIAL CLEARANCE) #106=[#13/2.]+[#20/2.]+.1 (STORE EACH LOCATION) #110=#100-#106 #111=#101 #112=#100-#105 #113=#100-#102 #114=#101+#103 #115=#100+#102 #116=#101+#103 #117=#100+#105 #118=#101 #119=#100+#102 #120=#101-#103 #121=#100-#102 #122=#101-#103 (SET SPRING PASS COUNTER) #149=#19 (SET ROTATION) #530=#2 IF[#2GT180.]THEN#530=#2-360. G68R#530 (GOTO 1ST POSTION) G0G90X#110Y#111 Z[#8+.1] G1Z#8F#9 G41X#112 WHILE[#149GE0]DO1 IF[#149LT0]GOTO10 #149=#149-1. G1X#113Y#114 G02X#115Y#116I#102J-[#103] G1X#117Y#118 X#119Y#120 G02X#121Y#122I-[#102]J#103 G1X#112Y#111 END1 N10G1G40G90X#110 G0Z#18 G69 X#100Y#101 M99
  16. I hope someone out there will have a use for this. Someone at work gave me the idea. Check it out. O5656(DIAMOND PIN MACRO) (PIN AT 0 DEGREES IS VERTICAL) (ABSOLUTE MACRO) (UNDER DEVELOPMENT) (FORMAT G65/G66 ABDTMWREFS) (A = #1 - INCLUDED ANGLE OF PIN) (60 DEGREES IS COMMON) (B = #2 - G68 ROTATION FROM 0 DEGREES) (D = #7 - DIAMETER OF PIN) (T = #20 - TOOL DIAMETER) (M = #13 - MATERIAL SIZE) (SQUARE OR ROUND) (W = #23 - WIDTH OF PIN CONTACT) (R = #18 - R PLANE) (E = #8 - END OF EM IN Z) (F = #9 - FEEDRATE) (S = #19 - # OF SPRING PASSES) (*********************************) (LIMIT SPRING PASSES TO 3.) IF[#19GT3.]THEN#19=3. (STORE CURRENT XY POSTION) #100=#5001 #101=#5002 (CALCULATE TANGENT POSITIONS) (BASED ON ARGUMENT -A-) (-X-/-I-) #102=[#23/2.]+[COS[#1/2.]*[#20/2.]] (-Y-/-J-) #123=ASIN[#23/2.]/[#7/2.] #103=[COS[#123]*[#7/2.]]+[sIN[#1/2.]*[#20/2.]] (CALCULATE FIRST POSITION -X-) #105=#102+[TAN[#1/2.]*[#103]] (CALCULATE MATERIAL CLEARANCE) #106=[#13/2.]+[#20/2.]+.1 (STORE EACH LOCATION) #110=#100-#106 #111=#101 #112=#100-#105 #113=#100-#102 #114=#101+#103 #115=#100+#102 #116=#101+#103 #117=#100+#105 #118=#101 #119=#100+#102 #120=#101-#103 #121=#100-#102 #122=#101-#103 (SET SPRING PASS COUNTER) #149=#19 (SET ROTATION) #530=#2 IF[#2GT180.]THEN#530=#2-360. G68R#530 (GOTO 1ST POSTION) G0G90X#110Y#111 Z[#8+.1] G1Z#8F#9 G41X#112 WHILE[#149GE0]DO1 IF[#149LT0]GOTO10 #149=#149-1. G1X#113Y#114 G02X#115Y#116I#102J-[#103] G1X#117Y#118 X#119Y#120 G02X#121Y#122I-[#102]J#103 G1X#112Y#111 END1 N10G1G40G90X#110 G0Z#18 G69 X#100Y#101 M99
  17. I would like some more ideas for this stuff. The latest one was a friend of mine who wanted a diamond pin macro which I am working on right now. I will post it when all of the bugs are worked out.
  18. Its almost easier to write it by hand. All u have to do is use a W and this allows u to pull out the stock incrementally in Z. Ex if you want to pull one in than, set bar puller, unclamp chuck, W1., clamp, reference return.
  19. I worked in a small shop many years ago and all the owner used were 80 deg diamond inserts for rigitity reasons and we would also use left handed tooling to put all of the pressure on the machine instead of pulling up the turret. Depending on how u program the part we would use a .015 rad tool at .004 per revolution with a .005 doc. Now if u are facing and dragging the tool then u would only want to leave .002 on the face for finish.
  20. I think they are the same someone just renamed them here for whatever probably non essential reason.
  21. I have never machined a magnet before, but if straight carbide does not work try a diamond coating or CBN tool.
  22. Here is my rough draft of the probe calibration Macro for 4 AXIS. Please give me your feed back as I have not proven this out yet. As for the probe head this macro would work regardless of the ruby size. You would just have to change the size of #500. O0001(MITSUI Probe Cal 15M Fanuc) (Probe Calibration Block Is) (A 6x6x1 Inch Aluminum Plate) (Y0 IS BASE OF BLOCK) (Machine is grided to COR X0 Z0) G90G10P1L2X0Y0Z0B0 G11 T1 (SET VARIABLES) (2MM RUBY BALL RADIUS) #500=[1./25.4] (X SHIFT) #501=0 (Y SHIFT) #502=0 (BALL Z CENTERLINE) #503=#500 M00 (MEASURE RAIL W/ A MICROMETER) (CHANGE VARIABLE #600 TO RAIL) (MEASUREMENT AND THEN xxxxM) (RAIL AND BORE FOR FULL CLEANUP) (RUN DRY OR USE ALCOHOL) #600=1. M00 N1T1M06 T2 (T1 = .5 4FLT EM) (CUT RAIL BOTH SIDES) (REMOVE .005 FROM EACH SIDE) M03S8000 M11 G0G90G54B-3. B0 M10 G0X-4.Y5.8 G43Z5.H1D1 G1Z[[#600/2.]-.005]F5. X4.F50. (SPRING PASS) X-4. Y10. M11 G0G90G54B177. B180. M10 G1Y5.8 X4. (SPRING PASS) X-4. GOZ5. M98P8800 M01 N2T2M06 T9000 (T2 = BORING BAR) (NEED FULL CLEAN UP) (BORE A HOLE AT X0Y0) (ALL THE WAY THROUGH BLOCK) (RUN DRY OR USE ALCOHOL) M03S1000 M11 G0G90G54B-3. B0 M10 G0X0Y3. G43Z5.H2D2 G98G85X0Y3.Z-.55R.55F5. G0G80Z5. M98P8800 M01 M00 (MEASURE RAIL AGAIN WITH MIC) (INPUT #600) (THIS FEATURE WILL BE USED) (TO SET #503 AND Z GRID) #600=.99 M00 (MEASURE BORED HOLE WITH) (A TRI MIC OR DIAL BORE) (INPUT #601 WILL BE USED) (TO SET #500~#502 AND) (X GRID SHIFT) #601=1. M01 N100M00 T9000 (T9000 = 2MM PROBE) (USING STANDARD 9911 AND 9914) (MACROS SET #500~#503) (AND VERIFY GRID) (IF THIS SECTION OF CODE) (KEEPS GOING BACK TO) (N100 CHECK BALL) (FOR RUNOUT AND/OR SEE) (IF IT IS LOOSE OR DAMAGED) T9000M06 M11 G0G90G54B-3. B0 M10 X0Y3. G43Z5.H9000D9000 Z.1 (SAFETY Z MACRO) G65P9910Z0F50. (SET PROBE HOLE AT B0) G65P9914D#601R.5Q.5 #500=#500+[#143/2.] #501=#140/2. #502=#141/2. #503=#500 (SET ACCURACY AT .0002) #602=[#140+#141+#143]/3. IF[#602GT.0002]GOTO100 G0Z1. Y5.75 (PROBE RAIL Z AT B0) G65P9911Z[#600/2.]R.5Q.5 #603=#138 #604=#142 G0Z5.Y10. M11 G0G90G54B177. B180. M10. X0Y5.75 Z1. (PROBE RAIL Z AT B180.) G65P9911Z[#600/2.]R.5Q.5 #605=#138 #606=#142 (CHECK GRID PROBE HOLE AT B180.) X0Y3. (SAFEFTY Z MACRO) G65P9910Z0F50. G65P9914D#601R.5Q.5 #607=#140 IF[ABS[[#604+#606]/2.]GT.0005]G0T0200 IF[ABS[#607]GT.0005]G0T0300 G0Z5. M98P8800 M30 M00 N200 (Z GRID IS OFF CHECK #603~#606) M00 N300 (X GRID IS OFF CHECK #607)
  23. Rob, thanks for trying it out. I have plenty more where that came from if you need anything else.
  24. Got busy the past couple of weeks with other projects, but I did start to write the 4 axis probe calibration cycle for the Mitsui. It will use variables #500~#503 as the set values for all of the other probe macros. This program will also be able to check and help set the grid of the machine as well. I wont know until we run it, wish me luck.

Join us!

eMastercam - your online source for all things Mastercam.

Together, we are the strongest Mastercam community on the web with over 56,000 members, and our online store offers a wide selection of training materials for all applications and skill levels.

Follow us

×
×
  • Create New...