What's new
What's new

Facing Macro.

Martian

Plastic
Joined
Mar 30, 2021
Hi guys,

Got a little problem with this macro as it conventional mill and the high feed doesn't like that so I need to change this to climb milling. any help would be appreciated.

%
O1120(SKIMMING - TITANIUM ONLY)
T30M6
(63mm HIGH FEED SECO FACEMILL)
(PULL STUD = 1x THU COOLANT 308765 50)
(BACKEND = 1x BT50BSM2C22100M)
(CUTTER BODY = 1x R220.21-0063-LO06.9A)
(SPARE SCREWS = 9x C02508-T08P)
(INSERT = 9x LOHT060310TR-M07 MS2050)
G40G80G17G21
M50
M68
G0G90G80G40G54X0Y0S315M3
M16
T50
G43Z200H30
G65P9921D30X0.Y0.U1899.V140.R1.Q.6Z0.C10.E0.75F1700
(D=TOOL NUMBER)
(X=X START OF BILLET)
(Y=Y START OF BILLET)
(U=X FINISH SIZE)
(V=Y FINISH SIZE)
(R=START HEIGHT)
(Q=DEPTH OF CUT-MAX 0.6)
(Z=FINISH HEIGHT)
(C= RUN OFF DISTANCE)
(E= STEP OVER PERCENTAGE)
(F=FEED RATE)
G0Z50
G0G80M09
M05
G94
M69(CHIP CONVEYOR OFF)
M50
M30
%

%
O9921(SQUARE-UNI-DIR)
(G65P9921X-Y-U-V-D-R-Z-F-E-C-K-Q-)
#31=#4001
#33=#4003
#32=#5003
IF[#24EQ#0]GOTO10
GOTO20
N10#24=#5001
N20IF[#25EQ#0]GOTO30
GOTO40
N30#25=#5002
N40IF[#18EQ#0]GOTO993(R)
IF[[#18-#26]LT0]GOTO993
IF[#26EQ#0]GOTO994(Z)
IF[[#7*#9*#21*#22]EQ0]GOTO990
IF[#21LT0]GOTO990
IF[#22LT0]GOTO990
#10=#[13000+#7]+#[12000+#7](OFFSET-C-TYPE&&OFFSET-NUMBER-LE-200)
IF[#10LE0]GOTO991
IF[#8EQ#0]GOTO50
GOTO60
N50#8=0.60
N60IF[#8GT1]GOTO996
IF[#3EQ#0]GOTO70
GOTO80
N70#3=#10
N80IF[#3LT0]GOTO992
IF[#6EQ#0]GOTO90
GOTO100
N90#6=0
N100#26=#26+#6
IF[#17EQ#0]GOTO110
GOTO120
N110#17=#18-#26
N120IF[#17GT[#18-#26]]GOTO997(Q-GT-[R-Z])
IF[#6GT#17]GOTO998(K-GT-Q)
#27=#24-[#3+#10]
#28=#25+#10*[2*#8-1]
#29=#18-#17
#30=#28
#14=2*#10*#8
DO1
#28=#30
G00X#27Y#28
Z#18
G01Z#29F[#9/2]
DO2
G01X[#21+#3+#10+#24]F#9
#12=#28+#10-#25
IF[#12GE#22]GOTO200
#28=#28+#14
G00Z#18
G00Z#32
G00Y#28X#27
G00Z#18
G01Z#29F[#9/2]
END2
N200#29=#29-#17
IF[#29GE#26]GOTO300
IF[[#29+#17]EQ#26]GOTO400
#29=#26
N300G00G90Z#18
Z#32
END1
N400(***END-OF-CYCLE***)
IF[#6EQ0]GOTO500
#26=#26-#6
G00G90Z#18
Z#32
#28=#30
G00G90X#27Y#28
Z#18
G01Z#26F[#9/2]
DO3
G01X[#21+#3+#10+#24]F#9
#12=#28+#10-#25
IF[#12GE#22]GOTO500
#28=#28+#14
G00Z#18
G00Z#32
G00Y#28X#27
G00Z#18
G01Z#26F[#9/2]
END3
N500(***END-OF-FINISH***)
G00G90Z#18
Z#32
G#31G#33F#9
GOTO999
N990#3000=81(DATA-LACK-OR-ERROR-D.F.U.V.)
N991#3000=82(OFFSET-ERROR)
N992#3000=83(DATA-ERROR-FOR-C.)
N993#3000=84(RAPID-APPROACH-POINT-R.)
N994#3000=85(Z-END-POINT-Z.)
N995#3000=86(CORNER-RADIUS-I.)
N996#3000=87(MODIFY-E.)
N997#3000=88(MODIFY-Q.)
N998#3000=89(MODIFY-K.)
N999M99
%
 

metalmadness

Hot Rolled
Joined
Nov 25, 2015
Um why on earth do you need a macro for a simple facing operation??????? Unless I am dumb and missing something this is pointless.

Additionally, why not use CAM? It does all the things
 

thedude31

Plastic
Joined
Sep 14, 2018
No man keep it simple. There is no damn reason you should be running a macro for face milling. If this is common practice in your shop I feel bad for you son, I got 99 problems but a facing macro aint one.
 

metalmadness

Hot Rolled
Joined
Nov 25, 2015
No man keep it simple. There is no damn reason you should be running a macro for face milling. If this is common practice in your shop I feel bad for you son, I got 99 problems but a facing macro aint one.

I don't know of any application you would use a macro for facing...like I said unless I am dumb. Am i missing something? Do people do this?
 

Martian

Plastic
Joined
Mar 30, 2021
I'm the manufacturing engineer at a big shop we use multiple macros for for operations that are similar in process. i.e. we constantly face plates to customer thickness, using the macro means I can have an operator do any size or thickness with a few quick alterations. Although this is normally done on aluminium and the conventional milling is not a problem.
Running some titanium at the moment and conventional produces a 75% reduction in tool life and the alternative of having to cam a program for every part will consume my every minute.
 

sinha

Stainless
Joined
Sep 25, 2010
Location
india
I'm the manufacturing engineer at a big shop we use multiple macros for for operations that are similar in process. i.e. we constantly face plates to customer thickness, using the macro means I can have an operator do any size or thickness with a few quick alterations. Although this is normally done on aluminium and the conventional milling is not a problem.
Running some titanium at the moment and conventional produces a 75% reduction in tool life and the alternative of having to cam a program for every part will consume my every minute.

This process can be further automated with probing. The probe will measure the dimensions, set the WCS, and face the workpiece, without any air-cutting. If the facing is of the same thickness, then the program will be same for all workpieces. Otherwise, this would need to be specified in the beginning of the program.
 

Martian

Plastic
Joined
Mar 30, 2021
This process can be further automated with probing. The probe will measure the dimensions, set the WCS, and face the workpiece, without any air-cutting. If the facing is of the same thickness, then the program will be same for all workpieces. Otherwise, this would need to be specified in the beginning of the program.

There are multiple thicknesses with varying amounts to be removed. At present its easier to set the machine bed as zero then Z= thickness of the part and R=Thickness of material.
 

angelw

Diamond
Joined
Sep 10, 2010
Location
Victoria Australia
I'm the manufacturing engineer at a big shop we use multiple macros for for operations that are similar in process. i.e. we constantly face plates to customer thickness, using the macro means I can have an operator do any size or thickness with a few quick alterations. Although this is normally done on aluminium and the conventional milling is not a problem.
Running some titanium at the moment and conventional produces a 75% reduction in tool life and the alternative of having to cam a program for every part will consume my every minute.

Hello Martian,
Whether you wanted to Climb or Convention mill could be specified using a flag set via an argument passed to the Macro. Based on this flag, the Macro could calculate which side of the workpiece to start using the dimensions of the blank and its Origin.

Regards,

Bill
 

Martian

Plastic
Joined
Mar 30, 2021
Hello Martian,
Whether you wanted to Climb or Convention mill could be specified using a flag set via an argument passed to the Macro. Based on this flag, the Macro could calculate which side of the workpiece to start using the dimensions of the blank and its Origin.

Regards,

Bill

Hi Bill,

I have very little knowledge of macro use so if you could further explain that it would be great.
 

angelw

Diamond
Joined
Sep 10, 2010
Location
Victoria Australia
Hi Bill,

I have very little knowledge of macro use so if you could further explain that it would be great.

Hello Martian,
If you always use the same X/Y Zero, then you need only pass the coordinates of the diagonally opposite corner of the workpiece and a Flag to specify whether Climb or Conventional milling is to be used. If that's not the case, then the coordinates of both corners on a diagonal would be passed. Given that information and the cutter diameter, its a simple calculation to determine a start point for either Climb, or Conventional Milling.

I'll have time tomorrow night to knock up an example.

Regards,

Bill
 

CORONA VIRUS

Banned
Joined
Feb 25, 2020
I'm the manufacturing engineer at a big shop we use multiple macros for for operations that are similar in process. i.e. we constantly face plates to customer thickness, using the macro means I can have an operator do any size or thickness with a few quick alterations. Although this is normally done on aluminium and the conventional milling is not a problem.
Running some titanium at the moment and conventional produces a 75% reduction in tool life and the alternative of having to cam a program for every part will consume my every minute.

I'm gonna have to disagree. Set up a cam template with a solid face. Create a toolpath, assign to that face and stretch the face to your desired dimension. 90 seconds later you have the program at the machine...if done right.
 

thedude31

Plastic
Joined
Sep 14, 2018
I'm gonna have to disagree. Set up a cam template with a solid face. Create a toolpath, assign to that face and stretch the face to your desired dimension. 90 seconds later you have the program at the machine...if done right.


Exactly! Keep it simple stupid. Creating a master template and operation processes will not only save you time, but save you from potential machine crash or even worse injuries! Obviously these are not the answers he's looking for but just because his shop is use to this practice does not mean it should continue to practice it. Be the big guy and create a template that's universal and clean up the place from that awful macro. Only time I macro is for probing. I've never really had the need to macro for machining purposes. Maybe I haven't been expose to more "complex" shops with this type of practice, but I feel as though this is really unnecessary. Either you guys have a really lazy programmer or you're paying top dollar to have cnc machinist that understand Macro B.

Everyone is some form of an engineer these days :rolleyes5:

^^lol
 

angelw

Diamond
Joined
Sep 10, 2010
Location
Victoria Australia
Exactly! Keep it simple stupid. Creating a master template and operation processes will not only save you time, but save you from potential machine crash or even worse injuries! Obviously these are not the answers he's looking for but just because his shop is use to this practice does not mean it should continue to practice it. Be the big guy and create a template that's universal and clean up the place from that awful macro. Only time I macro is for probing. I've never really had the need to macro for machining purposes. Maybe I haven't been expose to more "complex" shops with this type of practice, but I feel as though this is really unnecessary. Either you guys have a really lazy programmer or you're paying top dollar to have cnc machinist that understand Macro B.

Although the OP's Macro is not all that great, there is nothing wrong using a Macro for family part production (same basic part with different dimensions), which is what the OP's application seems to be.

By only having to change the values of variables, I doubt that the change of one program to another could be done quicker, even with CAM following a template. With error trapping in the Macro to ensure that no required data is either omitted or outside a range, a safe program results.

A well thought out Macro doesn't require the machine operator to understand Macro B, but only the variables that have to be edited, which is no more difficult than changing an Offset.

Regards,

Bill
 

boosted

Stainless
Joined
Jan 4, 2014
Location
Portland, OR
I do everything in CAM. But anyone who is arguing that this obviously should be done in CAM is just being a contrarian. :rolleyes5:

I have worked in plenty of places where "just do it in CAM" means that an operator has to hike 5 minutes upstairs to programming, take 15 minutes to BS with a programmer, knock out a $40,000 seat of CATIA while they screw around with it for 10 more minutes, then spend 5 minutes walking back to the machine, only repeat the process once they realize a decimal got transposed and the first facing cut is going to take off an inch of material... :willy_nilly: That's a lot more work than 60 seconds editing a common macro.

In some environments a macro at the machine is the KISS approach. We aren't all working out of a shed 4 feet away from the machine.
 

CORONA VIRUS

Banned
Joined
Feb 25, 2020
I have to agree with "thedude". Macros are not needed for stuff like this. As you can tell by the original post, the macro is not working. How many years has he run this macro only to find out it has a bug and must be reprogrammed. Even the programmer is now dumbfounded and is seeking help. What do the operators do? Using a template allows for very quick changes on the fly. This code has been posted for 2 days and there is still no update here to fix his problem. A complete waste of time. Is this guy related to the guy trying to macronize a thread cycle in Mazatrol?
 

angelw

Diamond
Joined
Sep 10, 2010
Location
Victoria Australia
I have to agree with "thedude". Macros are not needed for stuff like this. As you can tell by the original post, the macro is not working. How many years has he run this macro only to find out it has a bug and must be reprogrammed. Even the programmer is now dumbfounded and is seeking help. What do the operators do? Using a template allows for very quick changes on the fly. This code has been posted for 2 days and there is still no update here to fix his problem. A complete waste of time. Is this guy related to the guy trying to macronize a thread cycle in Mazatrol?

So says he who doesn't have much of a grip on Trig; still waiting on your reply to your two triangle solution in the "Using Trig for manual programming" Thread.

It seems to me that the OP's Macro is working and its not a bug per se; he just wants the cutting action to be Climb Milling and doesn't know how to get there. The same could apply to a CAM generated program, if the user wasn't totally familiar with the CAM software.

Changes can also be made "on the fly" to affect the resulting action of a Macro and one doesn't even have to step away from the machine; no going back the CAM software, regenerating a new CNC program and uploading it to the control.

Are you Johnny Larue or Deadly Kitten incognito, or as suggested in another Thread by others, the monkey and the stick guy?
 

Martian

Plastic
Joined
Mar 30, 2021
Hello Martian,
If you always use the same X/Y Zero, then you need only pass the coordinates of the diagonally opposite corner of the workpiece and a Flag to specify whether Climb or Conventional milling is to be used. If that's not the case, then the coordinates of both corners on a diagonal would be passed. Given that information and the cutter diameter, its a simple calculation to determine a start point for either Climb, or Conventional Milling.

I'll have time tomorrow night to knock up an example.

Regards,

Bill

Hi Bill,
firstly thank you so much for your time on this, secondly what you've said there doe not mean much to me... apologies for my ignorance on this matter.
 








 
Top