CNCzone.com-The Largest Machinist Community on the net!



Home Page Mark Forums Read Today's Posts My Replies Classifieds Reviews Photo Gallery Web Links Share Files Advertise With Us Ad List
Go Back   CNCzone.com-The Largest Machinist Community on the net! > Machine Controllers Software and Solutions > Fanuc


Fanuc Discuss Fanuc controllers here!


This forum is sponsored by:

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Ban this user!
Old 02-28-2009, 08:02 AM
 
Join Date: Feb 2009
Location: UK
Posts: 5
KNEELY is on a distinguished road
macro B PROGRAMMING

I need help to make a macro program for machining slots,bores,squares etc with tapered sides. is this possible
Reply With Quote

  #2   Ban this user!
Old 02-28-2009, 05:01 PM
 
Join Date: Jun 2008
Location: United States
Posts: 1,507
stevo1 is on a distinguished road

Anything is possible with macro's. We are going to need a lot more information. What make and model machine and control are you using? We also need more descriptions on the type of parts you are making...dimensions, multiple parts, tooling, fixturing, how many operations/tools ect.

Stevo
Reply With Quote

  #3   Ban this user!
Old 03-01-2009, 10:04 AM
 
Join Date: Feb 2009
Location: UK
Posts: 5
KNEELY is on a distinguished road

Hi stevo1,
sorry about the wait working shifts. the machine is a european axe & status vertical milling m/c with fanuc oi-mc control. i have already put macros for milling bores,slots ,pcd holes etc using old programs from fanuc 6 and 10m systems and work ok but i need to know how to mill say a slot or a bore with any taper using macros as i do not have acess to cad cam. the work i do are one offs so i need to be able to change the values in the programme for every piece. say i want to machine a bore of 100mm diameter at the top decreasing to 30mm dia 50mm deep using a ballnose cutter how can i program this. if you do not hear from me in a couple of days it is because of my shift work, not that iam rude
Reply With Quote

  #4   Ban this user!
Old 03-02-2009, 05:55 AM
 
Join Date: Feb 2006
Location: india
Posts: 1,187
sinha_nsit is on a distinguished road

First prepare a macro for a circular pocket, with variable radius . Start circular interpolation from the centre, and spiral out to the final radius. Then call it in a loop, with the radius defined in terms of depth, till you reach the final depth. The depth of the pocket should be very small for obtaining smooth side-wall. You will also need to use radius compensation; alternatively, define the centre of the ballnose cutter as the tool reference point, and reduce the radius of the pocket by the radius of the tool. First make a block diagram of the algorithm, and then start writing the code.
Reply With Quote

  #5   Ban this user!
Old 03-03-2009, 05:11 AM
 
Join Date: Feb 2009
Location: UK
Posts: 5
KNEELY is on a distinguished road

any chance of giving me an example of the macro program you suggest as i'm out of my depth here
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 03-03-2009, 06:18 AM
 
Join Date: Feb 2006
Location: india
Posts: 1,187
sinha_nsit is on a distinguished road

Originally Posted by KNEELY View Post
any chance of giving me an example of the macro program you suggest as i'm out of my depth here
I do have a ready-made program for circular pocket. But, it is an standard application and many people have such a macro with them. Somebody should post it here.
Reply With Quote

  #7   Ban this user!
Old 03-03-2009, 09:48 AM
 
Join Date: Jun 2008
Location: United States
Posts: 1,507
stevo1 is on a distinguished road

I know this is not exactly what you are looking for and it’s not the prettiest, but I don’t have a macro designed to spin the hole ramping down and in a cone at the same time. Only straight wall ramping C-bore. This program is the only one that I have right now that will do conical milling. However it steps down instead of ramping. Now I have not used this program in awhile and I had to change a few things because this was originally designed to step mill down a part that was already precast with some extra stock on it. You however want to achieve this with no center hole or maybe a small drilled hole first. I also have it designed to use an indexable mill not a ball nose tool. I never ran the calculations with a ball nose but it might work. If you use a mill you must not set your pick(Q) larger than the tool tip radius or you will step the part. We would rough using larger picks which would create steps but then finish with smaller picks at a much faster feedrate.

If I get some time I will start working on a ramping conical macro. I never had a use for it but I think it might come in handy someday.

A=cone side angle(#1)
C=tool corner radius(#3)
I=ramp radius(#4)
K=feature position(#6)
D=tool radius(#7)
E=exit plane(#8)
F=feed rate(#9)
H=feature diameter at “K”(#11)
Q=pick size in Z(#17)
R=reference plane(#18)
S=spindle speed(#19)
T=tool number used(#20)
X=center position of hole(#24)
Y=center position of hole(#25)
Z=final cutting depth(#26)

O0001(MAIN PROGRAM)
G65P8013A35C6.35I10K0D12.7E25F50H100Q4R1S250T2X0Y0Z-50
M30

O8013(G17 M3 CCW ID CONICAL STEP MILLING)
#30=#17*TAN[#1]
IF[#18EQ#6]THEN#18=#3-#3*TAN[#1/2]
IF[#6EQ#0]THEN#6=#18
#32=#11/2+[#18-#6]*TAN[#1]+#3-#3*TAN[45-#1/2]-#7
IF[#4EQ#0]THEN#4=#32/2
G90G17G0X#24Y#25Z#8M3S#19
Z[#18+#17]F#9
N1
G1X#24Y#25M8
IF[#18LT#26]THEN#18=#26
Z#18
G1X[#24+#32-#4]Y[#25-#4]M8
#33=#32/[#7+#32]
G03X[#32+#24]Y#25R#4F[#9*#33]
X[#24-#32]Y#25R#32
X[#32+#24]Y#25R#32
X[#32-#4+#24]Y[#25+#4]Z[#18+#23]R#4F[#9*#33*3]
#32=#32-#30
#18=#18-#17
IF[[#18+#17]GT#26]GOTO1
G1X0Y0M9
G0Z#8M5
M99

Stevo
Reply With Quote

  #8   Ban this user!
Old 03-08-2009, 06:00 AM
 
Join Date: Feb 2009
Location: UK
Posts: 5
KNEELY is on a distinguished road
program

cheers stevo1 i'll give it a go and see how it goes
Reply With Quote

  #9   Ban this user!
Old 03-09-2009, 06:23 PM
 
Join Date: Jan 2009
Location: canada
Posts: 21
skidoo is on a distinguished road

%
O9013(RADIAL ARC)
IF[#7EQ#0]GOTO2001
IF[#1EQ#0]GOTO2002
IF[#11EQ#0]GOTO2003
IF[#3EQ#0]GOTO2004
IF[#9EQ#0]GOTO2005
IF[#1EQ#0]GOTO2006
#140=#5003
#27=#7/2
#100=0
#101=360/#11
#102=#11
G0X[#27*COS[#19-#1]]Y[#27*SIN[#19-#1]]
WHILE[#100LT#102]DO1
N1G0Z#18
G1Z#26F#3
G3X[#27*COS[[#100*#101]+[#19+#1]]]Y[#27*SIN[[#100*#101]+[#19+#1]]]R#27Z
#2F#9
G0Z#140
#100=#100+1
G0X[#27*COS[[#100*#101]+[#19-#1]]]Y[#27*SIN[[#100*#101]+[#19-#1]]]
END1
G0Z#5003
M99
N2001#3000=1(NO DIAMETER GIVEN)
N2002#3000=9(NO START ANGLE "S" GIVEN)
N2003#3000=2(NO HOLE VALUE "H" GIVEN)
N2004#3000=8(NO PLUNGE FEED "C" GIVEN)
N2005#3000=3(NO CUTTING FEED "F" GIVEN)
N2006#3000=18(NO HALF ANGLE "A" WAS GIVEN)
(Z=depth to start slots)
(D=diameter of slots)
(B=depth to end slot if a ramped slot is to be cut)
(C=plunge feed)
(F=feed to cut with)
(A=angle of slot from centreline)
(S=angle of centerline of first slot)
(H=number of slots to cut)
M30
%
Reply With Quote

  #10   Ban this user!
Old 03-09-2009, 06:24 PM
 
Join Date: Jan 2009
Location: canada
Posts: 21
skidoo is on a distinguished road

%
O9010(BOLT HOLE MACRO)
IF[#7EQ#0]GOTO2001
IF[#11EQ#0]GOTO2002
IF[#9LT#0]GOTO2003
IF[#3EQ#0]GOTO2004
IF[#18EQ#0]GOTO2005
#100=1
27=#7/2.0
G0X[[COS[#1]*#27]+#24]Y[[SIN[#1]*#27]+#25]
G[#3*10000]Z#26R#18F#9Q#17P#20
#101=360/#11
N1WHILE[#100LTABS[#11]]DO1
X[[[COS[[#101*#100]+#1]*#27]+#24]]Y[[[SIN[[#101*#100]+#1]*#27]+#25]]
#100=#100+1
END1
M99
N2001#3000=1(NO DIAMETER GIVEN)
N2002#3000=2(NO HOLES GIVEN)
N2003#3000=3(NO FEEDRATE "F" GIVEN)
N2004#3000=4(NO DRILL CYCLE GIVEN)
N2005#3000=20(NO REFERENCE POINT GIVEN)
(X=X AXIS CENTER)
(Y=Y AXIS CENTER)
(Z=Z AXIS DEPTH)
(R=REFERENCE POINT ABOVE PART)
(T=DWELL VALUE FOR G82)
(Q=PECK INTERVAL FOR G73,G83)
(H=NUMBER OF HOLES TO DRILL)
(A=START ANGLE OF FIRST HOLE)
(D=DIAMETER OF BOLT CIRCLE)
(C=DRILL CYCLE TO USE)
M30
%
Reply With Quote

Sponsored Links
  #11   Ban this user!
Old 03-09-2009, 06:25 PM
 
Join Date: Jan 2009
Location: canada
Posts: 21
skidoo is on a distinguished road

%
O9016(COUNTERBORING CYCLE)
N1IF[#7EQ#0]GOTO2001
N2IF[#9EQ#0]GOTO2002
N3IF[#18EQ#0]GOTO2003
IF[#26EQ#0]GOTO2004
N4#140=#5003(STORE INITIAL Z PT.)
N7#143=#4107+2000(H + 2000)
N8#144=#[#143](RADIUS OF END MILL)
N9#27=#7/2
N10#100=#27-#144(RAD OF CTRBR - RAD OF EM)
#101=#100*2
G0Z#18(RAPID TO REF PT.)
G1Z#26F#9(FEED TO DEPTH)
G1Y-#100
G3G91X0.0 Y#101R#100
G3G91X0.0Y-#101R#100
G1Y#100F20.
G0Z#140
M99
N2001#3000=1(NO DIAMETER GIVEN)
N2002#3000=3(NO FEEDRATE GIVEN)
N2003#3000=20(NO REFERENCE POINT)
N2004#3000=7(NO "Z" DEPTH GIVEN)
(Z=DEPTH OF COUNTERBORE)
(D=DIAMETER OF COUNTERBORE)
(R=REFERENCE POINT ABOVE PART)
(F=FEEDRATE)
M30
%
Reply With Quote

  #12   Ban this user!
Old 03-09-2009, 06:26 PM
 
Join Date: Jan 2009
Location: canada
Posts: 21
skidoo is on a distinguished road

%
O9017(LINE-ANGLE)
IF[#11EQ#0]GOTO2001
IF[#9EQ#0]GOTO2002
IF[#3EQ30]GOTO2003
IF[#26EQ#0]GOTO2004
IF[#24EQ#0]GOTO2005
IF[#25EQ#0]GOTO2006
IF[#1EQ#0]GOTO2007
IF[#4EQ#0]GOTO2008
#100=1
G0X#24Y#25
G98G[#3*10000]Z#26R#18F#9Q#17P#20
WHILE[#100LT#11]DO1
N1G91X[COS[#1]*#4]Y[SIN[#1]*#4]
#100=#100+1
END1
M99
N2001#3000=2(NO H VALUE GIVEN)
N2002#3000=3(NO FEEDRATE GIVEN)
N2003#3000=4(NO DRILL CYCLE "C" GIVEN)
N2004#3000=7(NO Z DEPTH GIVEN)
N2005#3000=15(NO "X" START PT. GIVEN)
N2006#3000=16(NO "Y" START PT. GIVEN)
N2007#3000=10(NO ANGLE GIVEN)
N2008#3000=17(NO I VALUE GIVEN)
(I DISTANCE BETWEEN HOLES)
(A ANGLE FROM X AXIS CCW)
M30
%
Reply With Quote

Reply




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I learn about Macro programming? ChsBrown Haas Lathes 5 01-06-2011 10:32 PM
MACRO PROGRAMMING Stebedeff G-Code Programing 14 07-10-2010 11:49 PM
Need Help!- Macro Programming john terrell Daewoo/Doosan 3 08-18-2008 08:16 PM
Macro Programming danhaskell Fanuc 1 05-07-2008 02:04 PM
Macro Programming dapoling G-Code Programing 4 01-18-2008 11:33 AM




All times are GMT -5. The time now is 09:37 PM.





Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO
Template-Modifications by TMS

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361