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 > Parametric Programing


Parametric Programing (custom macro b, fadal macro, okuma user task)


This forum is sponsored by:

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Ban this user!
Old 02-25-2010, 11:12 PM
 
Join Date: Feb 2006
Location: United States
Posts: 273
dpuch is on a distinguished road
Ball in a cage example

I was feeling like making something fun, and this looked like it.

I stole the original code from EMC's wiki but then modified it slightly to run on fanuc controls, and added roughing passes. I only had a stub ball mill, so the roughing lets you specify a max cutter engagement depth for each pass. There are lots more ways to clean it up an add more features.

Code:
%
O0070  (BALL IN CUBE)
(CENTER TOP OF CUBE IS XYZ ZERO)
#1=1.5 (SIZE OF BOX AND DIAMETER OF FINISHED BALL)
#2=0.0625 (BALL MILL CUTTER RADIUS)
#3=0.125 (SIZE OF BOX BARS)
#4=5.0 (DEGREES OF STEPOVER RESOLUSION AT THE CORNERS)
#5=#4 (STEPOVER COUNTER)
#6=[[#1/2]+#2] (ACTUAL CUTTER PATH RADIUS OF SPHERE -- CUTTER RADIUS + RADIUS)
(#6 ALSO MINIMUM TOOL FLUTES REQUIRED FOR FULL SPHERE)
#7=5.0 (FEED RATE)
#10=2.0 ( > 1 EQUALS A ROUGH PASS AT #10*#4 STEPOVER)
IF [#10 LT 1.0] THEN #10=1.0 (SAFTEY CHECK - KEEP #10 >= 1.0)
#11=0.05 (ROUGH PASS MATERIAL TO LEAVE IN Z)
#12=0.17 (MAX Z DEPTH PER ROUGH PASS)
#13=FUP[[#6-#11]/#12] (ROUGH PASSES TO TAKE)
#14=[#6-#11]/#13 (Z PER ROUGH PASS)
#15=#11+#14*#13 (SET ROUGHPASS Z OFFSET)

G90 G57 G0 X0 Y0 M3 S4000
(G43 Z1.0 H1)
Z0.1

N0010
   IF [#10 LE 1.0] THEN #15=0 (FINISH Z LEVEL)
   #8 = [[SIN[#5*#10]*#6]*SIN[45]] ( X AND Y ARC START POSISION)
   #9 = [0-[[1-COS[#5*#10]]*#6]]+#15 (ARC Z START HIGHT)
   IF [#8 LT [#1/2-#2-#3]] GOTO 20
   #8 = [#1/2-#2-#3]  (SET LAST PASS AT FINISHED BAR SIZE)
   #9 = 0-[#6 - SQRT[#6*#6 - [#8*#8+#8*#8]]]+#15
   N0020
   IF [#9 GT 0] GOTO 15 (WOULD ONLY CUT AIR, STILL ABOVE Z0)
   G1X[#8]Y[#8] F#7
   Z[#9] F[#7/3]
   G18 G02 X[0-#8]Z[#9]I[0-#8]K[0-[#9+[#6]]] F[#7]
   G19 G03 Y[0-#8]Z[#9]J[0-#8]K[0-[#9+[#6]]]
   G18 G03 X[#8]Z[#9]I[#8]K[0-[#9+[#6]]]
   G19 G02 Y[#8]Z[#9]J[#8]K[0-[#9+[#6]]]
   N0015
   #5=[#5+#4]
IF [#8 LT [#1/2-#2-#3]] GOTO 10

#5=#4 (RESET STEPOVER COUNTER FOR NEXT ROUGH-FINISH PASS) 
G0 Z0.1 
X0 Y0

IF [#10 LE 1.0] GOTO 9000 (DONE)
#13=#13-1.0 (STEP DOWN Z RIOUGHING PASS)
IF [#13 LT 0] GOTO 100 (ROUGHING DONE)
#15=#11+#14*#13 (STARTING ROUGHPASS Z OFFSET)
GOTO 10
N0100
#10=1.0
GOTO 10

N9000
G0 Z1.0
M9
M5
M30
%
I made the mistake of trying to cut the 6th side while just grabbing the sides of the ball :/ It is cut free at least, just not a full sphere.
Attached Thumbnails
Click image for larger version

Name:	DSCN1344.jpg‎
Views:	261
Size:	70.4 KB
ID:	100799  
Reply With Quote

  #2   Ban this user!
Old 02-25-2010, 11:50 PM
CNCRim's Avatar  
Join Date: Feb 2006
Location: usa
Posts: 947
CNCRim is on a distinguished road

nice work!!!!!!!
__________________
The best way to learn is trial error.
Reply With Quote

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

The cube appears to have been machined from five sides, after suitably tilting it everytime. How did you ensure accuracy in positioning, so that the workpiece zero point does not shift. The starting cube may not have been a perfect cube.

I also have machined a half-sphere, but used a CAM software to generate the toolpath.
Reply With Quote

  #4  
Old 02-26-2010, 02:34 AM
tobyaxis's Avatar
Moderator
 
Join Date: Jan 2006
Location: USA
Posts: 4,396
tobyaxis is on a distinguished road

This is one of the best things about being a machinist. We can make what ever we can imagine.

Great job on this dpuch!!!!!
__________________
Toby D.
"Imagination and Memory are but one thing, but for divers considerations have divers names"
Schwarzwald

(Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)

www.refractotech.com
Reply With Quote

  #5   Ban this user!
Old 02-26-2010, 05:35 AM
ImanCarrot's Avatar  
Join Date: Nov 2005
Location: UK
Posts: 1,468
ImanCarrot is on a distinguished road

Oh, I am sooo gonna make one of them. That is awesome!
__________________
I love deadlines- I like the whooshing sound they make as they fly by.
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 02-26-2010, 07:30 AM
 
Join Date: May 2005
Location: canada
Posts: 1,149
cyclestart is on a distinguished road

Originally Posted by dpuch View Post
I made the mistake of trying to cut the 6th side while just grabbing the sides of the ball :/ It is cut free at least, just not a full sphere.
How would you approach the 6th side if cutting another one ?

Very cool btw
__________________
Anyone who says "It only goes together one way" has no imagination.
Reply With Quote

  #7   Ban this user!
Old 02-26-2010, 08:05 AM
 
Join Date: May 2007
Location: US
Posts: 779
Andre' B is on a distinguished road

Originally Posted by cyclestart View Post
How would you approach the 6th side if cutting another one ?

Very cool btw
There are some metal alloys available from MSC, Travers, etc. which melt at low temps, less then boiling water. And when the freeze they expand a very little bit.
So freeze the part in some of that, machine it, then melt it to get the parts.
Reply With Quote

  #8   Ban this user!
Old 02-26-2010, 08:24 AM
 
Join Date: Jul 2003
Location: Holmen, WI
Posts: 1,082
samco is on a distinguished road

That is just awesome. I wrote that program initally to test the owords in emc2. I never acutally finished one to see if it actually worked.

Nice work!

sam
Attached Thumbnails
Click image for larger version

Name:	woodcube.jpg‎
Views:	214
Size:	53.3 KB
ID:	100825   Click image for larger version

Name:	axisubuntu.jpg‎
Views:	178
Size:	85.1 KB
ID:	100830  

Last edited by samco; 02-26-2010 at 08:34 AM. Reason: add screenshot
Reply With Quote

  #9   Ban this user!
Old 02-26-2010, 08:42 AM
 
Join Date: Jul 2003
Location: Holmen, WI
Posts: 1,082
samco is on a distinguished road

re: holding for the last cut..

I was always going to machine a negative of the ball and cage and put it in a vise. The negative would hold the ball and cage well enough to finish the last side. (that was my hope anyways)

sam
Reply With Quote

  #10   Ban this user!
Old 02-26-2010, 09:00 AM
ImanCarrot's Avatar  
Join Date: Nov 2005
Location: UK
Posts: 1,468
ImanCarrot is on a distinguished road

I've seen stuff like this b4 (but it was a lose cube) and they used wax to hold the last face.
__________________
I love deadlines- I like the whooshing sound they make as they fly by.
Reply With Quote

Sponsored Links
  #11   Ban this user!
Old 02-27-2010, 03:28 PM
 
Join Date: Feb 2006
Location: United States
Posts: 273
dpuch is on a distinguished road

Thanks everyone for the comments.

Originally Posted by sinha_nsit View Post
How did you ensure accuracy in positioning, so that the workpiece zero point does not shift.
Nothing special, I did start out with a cube I machined to about ±0.002" within square. I just used a fixed stop in a vice to relocate the block as I rotated it. As this was a first try I didn't really worry about trying to get really tight tolerances or fine finish.

Originally Posted by cyclestart View Post
How would you approach the 6th side if cutting another one?
Anders comment below is exactly what I was thinking of. The way the program is written you can have VERY small squares of material left on the 6 sides of the ball. I had a minor hope that clamping tight enough on these (flexing in the cage) and reducing the feed rate to about 10% would be enough. But the ball rotates too easily on such small contact points. I think it might work if it a clamp was put on 90° to keep it from rotating.

Originally Posted by Andre' B View Post
There are some metal alloys available from MSC, Travers, etc. which melt at low temps, less then boiling water. And when the freeze they expand a very little bit.
So freeze the part in some of that, machine it, then melt it to get the parts.
Yep, CeroBEND or CeroSAFE or similar.

Originally Posted by samco View Post
That is just awesome. I wrote that program initally to test the owords in emc2. I never acutally finished one to see if it actually worked.
Great to have your input! Yep the math and code worked well. Like I said, I did have to change the o code loop logic to fanuc IF GOTO but otherwise the original ran fine as well. Most of the other changes were just to add the roughing passes capability. Oh, and one other to make sure the last pass left the right bar size regardless of the step over.

If I get a chance to run another soon I'll take some more pictures of it in progress.
Reply With Quote

  #12   Ban this user!
Old 02-27-2010, 07:41 PM
 
Join Date: Oct 2009
Location: usa
Posts: 5
Trevtech is on a distinguished road

Great job --- Nice
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
Need Help!- KM3P Card Cage wires winds1sj HURCO 1 07-05-2011 08:48 PM
Need help: Identify ball screw/ ball nut RickOmatic General Metal Working Machines 0 04-12-2009 01:02 PM
Need Help!- Programming a Ball stuby G-Code Programing 1 05-05-2008 03:11 PM
Ball Screws jessslp05 Linear and Rotary Motion 6 04-27-2008 11:28 AM
Big Ball Screw & Ball Nut mistake. Jack F General Metal Working Machines 12 04-28-2006 10:53 PM




All times are GMT -5. The time now is 01:02 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