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 > G-Code Programing


G-Code Programing Discuss G-code programing and problems here!


This forum is sponsored by:

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Ban this user!
Old 12-26-2008, 07:43 PM
 
Join Date: Feb 2008
Location: uk
Posts: 19
tturnbull50 is on a distinguished road
Fanuc pocket milling macro

Have been trying to make a rect. pocket milling macro, so far as below but only if X is greater than or equal to Y, but can be rotated.

If anyone knows of a better way can they please post it.


O9999(RECT POCKET MACRO)
(X GE Y OR ROTATE AXIS)


#1=200.(LENGTH)
#2=100.(WIDTH)
#3=6.5(DEPTH) (**)
#4=20.(TOOL DIA.)
#5=10.(STEP OVER)
#6=2.(Z CUT) (**)
#7=200(FEED)
#8=1.5(Z START) (**)(MUST DIVIDE EQUALLY)
#9=[#3+#8]/#6(NO OF Z CUTS)
#24=#3+10.


#10=#1-#4(INC. X)
#11=#2-#4(INC. Y)
#12=#10/2(S.P. X)
#13=#11/2(S.P. Y)
#14=#10-#11
#15=#14/2
#16=#15+#12
#17=#14+#4
#18=#5+#5
#19=#12/2
#23=FUP[#11/#4]

#5=#11/[#23*2]


G68X0Y0R0.(R= ANGLE ABOUT X AND Y)
(CUTTER MUST START IN CENTRE OF POCKET)
G0G91
X-#12Y-#13
G01Z#8F50(Z1.0)
M98P9998L#9
G0Z#24
G69
M30
O9998
G01X#16 Y#13 Z-#6 F#7
X-#14
#21=1
WHILE[#21LE#23]DO2
X-#5Y#5
#22=#22+[#5*2]
#14=#14+[#5*2]
X#14
Y-#22
X-#14
Y#22
#21=#21+1
END2
Y-#22
M99
Reply With Quote

  #2   Ban this user!
Old 12-27-2008, 09:46 AM
 
Join Date: Oct 2006
Location: UK
Posts: 6
pilsburyagain is on a distinguished road
Cool Rectangle milling cycle

Under normal circumstances I would just cad up the rectangle I required, if however, I needed to produce many different rectangles, then I suppose a cycle such as yours my be useful.

Your going to have to think out of the box, the G68 rotation code is useful but limited.

I suggest that you avoid using it and improve your calculations to include trigonomic equations. In this case you only need a start point (X0. Y0.) and an angle for the first line.

Hope this helps
Reply With Quote

  #3   Ban this user!
Old 12-30-2008, 08:51 AM
 
Join Date: Jun 2008
Location: United States
Posts: 1,507
stevo1 is on a distinguished road

TTurnbull50,
I sent you a reply to your PM to refer back to this post. This will mill your pocket with the things that you wanted. I changed a bit of it so we can go a few different ways depending on how you want your rotation set up. Now when you’re going to rotate is there a small amount of rotations? Are they going to be equally spaced rotations? These are need to know so we can set up the macro either modal or non modal. Macro modal is easier if you only have a few rotations and especially if they are not equally spaced. If you have equally spaced it is better off coding it into the actual macro. What model Fanuc are you on?

I ran this through a test run on my 15M so it should work no problems. There will probably be a few adjustments that you might want to make as you go. Here are the definitions:

#1=100(LENGTH)(A)
#2=200(WIDTH)(B)
#3=6.5(DEPTH)(C)
#17=20.6(TOOL DIA.)(Q)
#8=.7(TO CUT LESS THEN 1/2 CUTTER FOR OVERLAP)(E)
#21=2(Z PICK)(U)
#9=200(FEED)(F)
#23=.5(FINISH STOCK ON WALLS)(W)
#20=10(TOOL NUMBER)(T)

I would set it up macro like this:

O0001(MAIN PROGRAM)
G65P9000A100B200C6.5Q20.6E.7U2F200W.5T10
M30

O9000(RECT. POCKET MACRO)
M6T#20
#10=[#17/2]-#8
#1=#1/2
#2=#2/2
#17=#17/2
#11=0(Y COUNTER)
#12=#21(Z COUNTER)
N100G0G90X0Y0Z1.
Z.1
G1Z-#12F#9
N200
WHILE[#11LT[#1-#17-#23]]DO1
#11=#11+#10
IF[#11GE[#1-#17/2-#23]]TH#11=[#1-#17-#23]
X-[#2-#17-#23]
Y-[#11-#23]
X[#2-#17-#23]
Y[#11-#23]
X-[#2-#17-#23]
Y0
END1
IF[#12EQ#3]GOTO300
#12=#12+#21
IF[#12GE#3]TH#12=#3
#11=0
GOTO100
N300
IF[#23EQ0]GOTO400
#23=0
GOTO200
N400G0Z1.
M99

Let me know how you want to do the rotation. Macro modal would have a format like this.

O0001(MAIN PROGRAM)
G66P9000A100B200C6.5Q20.6E.7U2F200W.5T10
#100=10
#100=30
#100=53
#100=108
#100=260
G67
M30
The #100 would be each rotation you want to mill a pocket at. Then in the program we would stick a G68X0Y0R#100.

Stevo
Reply With Quote

  #4   Ban this user!
Old 08-29-2010, 09:55 AM
 
Join Date: Jun 2006
Location: mexico
Posts: 12
rapo is on a distinguished road

i need to learn how to program a simple pocket with macros. can you help me please.
Reply With Quote

  #5   Ban this user!
Old 08-30-2010, 02:48 AM
 
Join Date: Feb 2006
Location: india
Posts: 1,187
sinha_nsit is on a distinguished road

In the modal macro call, tool movement is necessary.
Reply With Quote

Sponsored Links
Reply

Tags
fanuc, macro, pocket




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
Need help in hexagon pocket milling brianklein G-Code Programing 27 05-13-2009 11:56 AM
Pocket milling orionstarman Mazak, Mitsubishi, Mazatrol 1 04-07-2008 06:26 PM
pocket milling CNC stud General Metalwork Discussion 1 03-26-2008 03:33 PM
Problem with pocket milling... Driftwood GibbsCAM 1 09-03-2006 10:25 PM
rectangular pocket macro mistux G-Code Programing 0 11-01-2005 11:54 AM




All times are GMT -5. The time now is 12:09 AM.





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