![]() | |
| 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
| ||||
| ||||
My Sacrificial Table needs surfacing to get it perfectly flat. Is there any way of writing a Program in G-Code to do the number of passes without hand coding every pass? I had in mind an automatic routine that will make a full pass in the Y-Axis direction, stepping the X-Axis one tool width and then returning to Y00, stepping one tool width; ad infinitum, etc etc, untill done. or, a rectangular spiraling pattern that increments/decrements by one tool width each pass. Is this possible or is hand coding the only way to do it?
__________________ Skype me on imagineeringnz ---------------------------- Intuitor: (noun) A person with a passion for learning and innovating that is so strong it is often more powerful than the desire to eat, sleep or seek personal wealth. Ummm . . . Guilty as charged. |
|
#2
| ||||
| ||||
| Should only take a few minutes using ACE converter and any CAD program.
__________________ Gerry Mach3 2010 Screenset http://home.comcast.net/~cncwoodworker/2010.html (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management) |
|
#3
| ||||
| ||||
05 'something' = 1 10 Do 'something' 15 'something' = 'something' + 1 20 GOTO 10 That sort of thing.
__________________ Skype me on imagineeringnz ---------------------------- Intuitor: (noun) A person with a passion for learning and innovating that is so strong it is often more powerful than the desire to eat, sleep or seek personal wealth. Ummm . . . Guilty as charged. |
|
#4
| ||||
| ||||
| You can, but for me it would be faster to do it in CAD. Read the TurboCNC docs, it should be in there.
__________________ Gerry Mach3 2010 Screenset http://home.comcast.net/~cncwoodworker/2010.html (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management) |
|
#5
| ||||
| ||||
| This is called parametric programing. I prefer it to CAM written programs for repetitive tasks like this. The program syntax is slightly different for every control, unfortunately. Here a program to cut the teeth in a lathe softjaw. It has two loops like you need: ;TEETH,ADJUST TRUE SOFT JAWS ;set second jaw back 0.100", third back 0.200" (*BLEC'*',CMST';',CNDL3,CNDR4,ZRSP0,PDOF0.05,FDOV0*) %LAPPER = 0 %ZDEPTH = 0.5000 %START: %COUNTER = 0 %ZDEPTH = %ZDEPTH + 0.025 *;DEPTH OF CUT FOR EACH PASS %LAPPER = %LAPPER + 1 G92 X 0.00 Y 0.00 Z %ZDEPTH G90 G00 X 0.000 Y -0.250 Z 0.00 %LOOP: %COUNTER = %COUNTER + 1 G42 T 02 G01 X 0.008 Y 0.000 F 3.0 G01 X 0.122 Y 0.000 G03 X 0.096 Y 0.750 I -1.304 J 0.330 G01 X 0.000 Y 0.750 G02 X 0.008 Y 0.000 I -3.986 J -0.420 G01 X 0.008 Y -0.125 G01 G 40 X 0.2857 Y -0.25 G92 X 0.000 Y -0.25 Z 0.00 IF (%COUNTER LE 9) GOTO %LOOP G54 G00 X 0.00 Y 0.00 Z 0.00 IF (%LAPPER LE 5) GOTO %START *;DO ALL TEETH 5 TIMES |
| Sponsored Links |
|
#6
| |||
| |||
This is the style of program I use for facing various size one offs on a vertical cnc. I have omitted all the stuff about tool selection, rpm, etc., this is just the tool path for a 3/4" dia. tool facing 18 inches by 14 inches. N100 G54 X0. Y0. N101 Z0. N102 G91 G01 Y-0.74 F100. M97 P1000 L10 N103 G28 M30 N1000 G90 X-19.5 N1001 G91 Y-0.74 N1002 G90 X0. M99 Comments: Line N100; Put the work zero slightly more than one tool diameter positive from the corner of the workpiece nearest machine zero. N101 Set tool offset at the finished surface. N102 This increments the Y slightly less than one tool diameter and calls the subroutine starting at N1000 ten times. N1000 The uses absolute positioning to face across the X distance. N1001 This increments the Y again. N1002 This returns in absolute back to X 0. and returns from the subroutine. The Y travel for each call of the subroutine is 1.48" and the total Y travel is 14.8". For different size cutters and different size parts it is only necessary to change the Y increment, the X travel and the L count. |
|
#7
| ||||
| ||||
| Thanks Gerry, Karl T and Geof, My spindle at the moment is a Dremel which will only take a 1/8 shaft as a tool. This limits me to a 3mm dia end mill. Geof, I'll have a crack at your program and substitute your tool dia to utilise my 3mm tool. It'll take a few loops of the subroutine, but I think that this is a better way than drawing it up in CAD. Thanks guys.
__________________ Skype me on imagineeringnz ---------------------------- Intuitor: (noun) A person with a passion for learning and innovating that is so strong it is often more powerful than the desire to eat, sleep or seek personal wealth. Ummm . . . Guilty as charged. |
|
#8
| ||||
| ||||
| Geof, I thought that I could manage this program OK, but it seems not. I've rewritten it to achieve my aims of surfacing X=500 Y=380 with a 3mm dia Tool but when 'Dry Verifying' under TurboCNC it gives me an error message of "A target line (0 Word) is required". This appears to be in line N102 and I cannot figure it out. Where have I gone wrong?? Attached File.
__________________ Skype me on imagineeringnz ---------------------------- Intuitor: (noun) A person with a passion for learning and innovating that is so strong it is often more powerful than the desire to eat, sleep or seek personal wealth. Ummm . . . Guilty as charged. |
|
#9
| ||||
| ||||
| Change P1000 to O1000. It's in the manual under M97.
__________________ Gerry Mach3 2010 Screenset http://home.comcast.net/~cncwoodworker/2010.html (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management) |
|
#10
| ||||
| ||||
| Not sure if TurboCNC supports the L126 in the M97, btw. It doesn't list it in the manual, anyway. Also, you can change TurboCNC to possibly use the P instead of O by going to configure>dialect
__________________ Gerry Mach3 2010 Screenset http://home.comcast.net/~cncwoodworker/2010.html (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management) |
| Sponsored Links |
|
#11
| |||
| |||
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |