![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| Parametric Programing (custom macro b, fadal macro, okuma user task) |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
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 % |
|
#3
| |||
| |||
| 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. |
|
#4
| ||||
| ||||
| 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 |
|
#6
| |||
| |||
| Very cool btw
__________________ Anyone who says "It only goes together one way" has no imagination. |
|
#7
| |||
| |||
| So freeze the part in some of that, machine it, then melt it to get the parts. |
|
#8
| |||
| |||
| 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 Last edited by samco; 02-26-2010 at 08:34 AM. Reason: add screenshot |
|
#9
| |||
| |||
| 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 |
|
#11
| |||||
| |||||
| Thanks everyone for the comments. 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. If I get a chance to run another soon I'll take some more pictures of it in progress. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |
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 |