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. Have you tried using a while/do? Check out this example: #100=532. WHILE[#100LT899.]DO1 #[#100]=#0 #100=#100+1. END1 Basically what happens here is that #100 is set to your first variable that you want to set and 899. is the last variable to set. All of the variables inbetween the two get set to #0 which is null. Of course this will only work for you if you are setting everything the same.
  2. I apologize for the error, but would that help u out?
  3. Yes you can pull the current absolute positions of your tool using #5001 for x, #5002 for y, and #5003 for z and store those values into variables of your chosing and repeat forthe next tool, so your macro would look like this. T1M06 #601=#5001 #611=#5002 #621=#5003 T2M06 #602=#5001 #612=#5002 #622=#5003 Ect. Then pgm G0X#501Y#511Z#521
  4. We roll tap all of our 304 stainless parts at work using oil and it works great. You will need a modified tap drill diameter. You can find that information under cold forming in a machinist handbook.
  5. Does anyone out there have any more ideas for macros? I would really like to continue to help people with this stuff.
  6. Yes this is what we use here at work: Where #2001 equals tool offset 1 and #2002 equals tools offset 2 and so forth using fanuc controls. T01M06 IF[#2001LT1.]GOTO100 IF[#2001GT2.]GOTO200 Run Program M30 N100 M00(TOOL TOO SHORT) N200 M00(TOOL TOO LONG) So if your tool is shorter than 1. inch it will give the message tool too short and if your tool is greater than 2 inches. it will give the message tool too long. It's a pretty simple way of letting the operator know there is something wrong. You can also use custom alarms depending on your control, but this is the bare minimum.
  7. Here is a serialization macro that I wrote about 4-5 years ago. You will have to post each number incrementally and creat a subprogram in the 8100's for each number. If you want to use a different offset for you starting s/n just change #2098 to desired variable. O8116( S/N MACRO ) ( USE OFFSET 98 FOR SERIAL # ) ( 00.0001 WILL ENGRAVE 1 ) ( 1ST NUMBER ) #138=[#2098*.1] #140=FIX[#138] #141=#140+8100. ( 2ND NUMBER ) #138=[#140*10] #139=FIX[#2098] #140=#139-#138 #142=#140+8100. ( 3RD NUMBER ) #138=[#139*10] #139=FIX[#2098*10] #140=#139-#138 #143=#140+8100. ( 4TH NUMBER ) #138=[#139*10] #139=FIX[#2098*100] #140=#139-#138 #144=#140+8100. ( 5TH NUMBER ) #138=[#139*10] #139=FIX[#2098*1000] #140=#139-#138 #145=#140+8100. ( 6TH NUMBER ) #138=[#139*10] #139=FIX[#2098*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 N100M99
  8. This macro is designed to create a diamond pin of your choosing machining it right into the fixture. It's mainly for emergency use only and is not going to really substitute a real diamond pin. The G68 rotation allows you to rotated the whole pin to any angle desired. The furthest I have got with it is a dry run and have not cut any chips with it yet, but as soon as I do I will post a pic. So in a nutshell you could pull up any catalogue with diamond pins in them and copy the specs to the macro to recreate the pin desired.
  9. Have u tried using a GOTO for the loop instead of an M99?
  10. OK cool, I will have to work on it sometime next week I'm pretty busy this weekend. Thanks for responding. I will go ahead and make the stepover percentage a variable since not every application and machine can handle an 80 percent engagement on the tool.
  11. OK, one last question. Do you want to climb cut only or would you mind it if the cutter climbed and conventional cut which would save time?
  12. This would not be a difficult macro to write, the only other bit of information I would need is what you would want the toolpath to look like. For instance do you want the tool to come off of the stock every pass or do you want it to stay on the part?
  13. Have you considered using a macro to write to your offsets automatically? If you know how to manipulate your system variables you should be able to get the outcome you desire without having to use a calculator.
  14. O5000(CUSTOM PECK DRILL MACRO) (ABSOLUTE MACRO) (WORKS) (FORMAT G65/G66 QRZEFIH) (Q = #17 - STEPOVER IN Z/ DOC) (R = #18 - R PLANE) (Z = #26 - Z START ZERO) (E = #8 - END OF DRILL IN Z) (F = #9 - ENTRANCE FEEDRATE) (I = #4 - PECK FEEDRATE) (H = #11 - IN AND OUT 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 #103=#5001 #105=#5002 G0G90X#103Y#105 Z#18 G1Z#26F#9 #106=#5003 WHILE[#101GE0]DO1 IF[#101LT0]GOTO10 #101=#101-1. G1Z#106F#4 Z#18F#11 Z[#106+.005] #106=#106-#102 END1 N10G0G90Z#18 X#103Y#105 M99 I had one such application a couple of years ago. Here is the macro I came up with.
  15. I do not know how to to do any of that. Is there a website that explains in further detail?
  16. O6000 (CARBIDE DRILL MACRO) (FORMAT G65/G66 STRZQWFE) (S = #19 - INITIAL TOOL RPM) (T = #20 - BREAKTHROUGH TOOL RPM) (R = #18 - R PLANE) (Z = #26 - Z START ZERO) (Q = #17 - Z START OF RPM & FEERATE CHANGE) (W = #23 - END OF BREAKTHROUGH IN Z) (F = #9 - INITIAL FEEDRATE) (E = #8 - BREAKTHROUGH EXIT FEEDRATE) (*********************************) M03S#19 #600=#5001 #601=#5002 G0G90X#600Y#601 Z#26+.1 G1Z#17F#9 M03S#20 G1Z#23F#8 G0Z#18 X#600Y#601 M99 I think this is more of what you were looking for. Sorry about any confusion.
  17. O5001(GUN DRILL MACRO) (ABSOLUTE MACRO) (FEEDRATE WILL BE CALCULATED) (BASED ON CHIP LOAD AND RPM) (WORKS) (FORMAT G65/G66 SICQRZE) (S = #19 - INITIAL RPM) (I = #4 - INCREMENTAL RPM) (C = #3 - DRILL CHIP LOAD) (Q = #17 - STEPOVER IN Z/ DOC) (R = #18 - R PLANE) (Z = #26 - Z START ZERO) (E = #8 - END OF DRILL IN Z) (*********************************) (CALCULATE Z INCREMENTS) #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 #103=#5001 #105=#5002 (GOTO CENTER OF HOLE) G0G90X#103Y#105 Z#18 M03S050 G1Z#26F5. #106=#5003 (SET INITIAL RPM, FEED) #107=#19-#4 #108=#107*#3 (EXECUTE MACRO) WHILE[#101GE0]DO1 IF[#101LT0]GOTO10 #101=#101-1. M03S#107 G1Z#106F#108 (RECALCULATE Z, RPM, FEED) #106=#106-#102 #107=#107+#4 #108=#107*#3 END1 N10M03S1000 G90G1Z#26F50. M03S050 Z#18F5. M5 X#103Y#105 M99 I'm not sure if this will work for you. I think you are looking for something much more simple. If you can tell me what your variable inputs are and what outcome you want I can write the macro for you. Thanks.
  18. OK, I'm sure there has to be at least one question out there regarding this stuff. Please post something. Thank You.

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...