![]() | |
| 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
| |||
| |||
Could someone please give me an example of using an M98 or, M99 coupled with a "P" and "L". Just a short example would do - like profiling a rectangle and using a subroutine to step the cutter down -ie. "rough depths". Another example I am looking for is to use a subroutine to drill a series of holes. My control supports the RS 274 format. Any help would be appriciated..... Patrick |
|
#2
| ||||
| ||||
| Below are some examples: (Call a simple subroutine and repeat the subroutine 3 times.) N1 G0 X0 Y0 Z0 N2 M98 P1234 L3 N3 M30 O1234 N4 G1 Z-.5 F25 N5 G0 Z.1 N6 M99 (Use a subroutine to loop the entire program 100 times.) N1 M98 P1234 L100 N2 M30 O1234 N4 G0 X0 Y0 Z0 N5 G1 Z-.5 F25 N6 G0 Z.1 N7 M99 (Nested subroutines) N1 G0 X0 Y0 Z0 N2 M98 P1234 L1 N3 M30 O1234 N4 G0 X1 Y1 Z1 N5 M98 P5678 L1 N6 M99 O5678 N7 G1 Z-.5 F25 N8 G0 Z.1 N9 M99 Karl |
|
#3
| |||
| |||
| Karl, Thank you for the quick response and the clear-cut reply. Now if I may ask one more question? Can I switch into G91 programing from G90 programing in order to get the "stepping" effect. If so how would the code look. By the way I made a mistake my manual lists M79 (Send SWI '0' (ascii 79) commands ,value in "P" WORD) . Also it lists M98 as Subroutine call to block (PWORD), repeat (LWORD). Thank you for any help.... Patrick Last edited by PROTOTRAKFAN; 06-18-2005 at 11:17 PM. |
|
#4
| |||
| |||
| The example given did not specify a work coordinate system eg. G54, 55 etc. therefore the code would look the same for G91 (incremental).The only thing that changes between G90 and G91 programs are the X,Y and Z values. |
|
#5
| ||||
| ||||
| Here's a program to cut holes in a piece of 6" wide stock to hold R8 tooling. Makes use of switching from G90 to G91 and back. :Cut holes in 6" channel for R8 holders (*BLEC'*',CMST';',CNDL3,CNDR4,ZRSP0,PDOF0.05,FDOV0*) %count = 0 *;counter for looping ; Circle - Coordinate Start Point Type G90 G40 F2.0 *; ABSOLUTE,NO CUTTER COMP, FEED RATE T01 *; TOOL 1 %LOOP: *;loop to here %count = %count + 1 G73 Y 1.0 Z-0.50 Q 0.060 F 2.0 *; DRILL HOLE AT 0,1 G00 Z -0.5 *; BACK TO BOTTOM OF HOLE G01 G91 G42 T 01 X0.0 Y0.485 *; INCREMENTAL,CUTTER COMP RIGHT,TOP OF CIRCLE G02 X0.0 Y 0.0 I 0.0 J -0.485 F 4.0 *;CIRCLE, change radius line up also for new size G90 G40 G00 Z0.0 *;ABSOLUTE,,NO CC,RAPID UP G73 Y 3.0 Z-0.50 Q 0.060 F 2.0 *; DRILL HOLE AT 0,1 G00 Z -0.5 *; BACK TO BOTTOM OF HOLE G01 G91 G42 T 01 X0.0 Y0.485 *; INCREMENTAL,CUTTER COMP RIGHT,TOP OF CIRCLE G02 X0.0 Y 0.0 I 0.0 J -0.485 F 4.0 *;CIRCLE, change radius line up also for new size G90 G40 G00 Z0.0 *;ABSOLUTE,,NO CC,RAPID UP G73 Y 5.0 Z-0.50 Q 0.060 F 2.0 *; DRILL HOLE AT 0,1 G00 Z -0.5 *; BACK TO BOTTOM OF HOLE G01 G91 G42 T 01 X0.0 Y0.485 *; INCREMENTAL,CUTTER COMP RIGHT,TOP OF CIRCLE G02 X0.0 Y 0.0 I 0.0 J -0.485 F 4.0 *;CIRCLE, change radius line up also for new size G90 G40 G00 Z0.0 *;ABSOLUTE,,NO CC,RAPID UP G00 Y0.0 *;BACK TO HOME G91 G00 X2.0 *;INCREMENTAL, MOVE 2.0 FOR NEXT ROW OF HOLES IF (%COUNT LE 10) GOTO %LOOP *;LOOP 10 TIMES |
| Sponsored Links |
|
#6
| |||
| |||
| Thank you Karl for the great example. A long time ago (8 years) I was starting to get into the groove of programing a Sharnoa machining center with parametric programing but, I quit that job for a better one and since then have forgotten alot. The Prototrak I use (DPM V5) is quite honestly a pleasure to use everyday. It can be programed with Gcodes in addition to conversational programing. When I have a very complex job I use OneCnc Expert and havnt had any problems. I would like to increase my skills in manual Gcode programing ,however, and that is why I am asking these questions. The machine doesnt have work offsets on the Gcode side- It does have 6 of them on the conversational side though. Anyway thanks again..... Patrick |
|
#7
| |||
| |||
I have been busy this week and my machine has been tied up so I havnt gotten a chance to try out a test subroutine. I have made one and hopefully have attached it correctly. Did I make the subroutine correctly? My objective is to edit cam programs so that I only have to program a profile or, a pocket level "once" then use subroutines to "step down" the depths. I have another question not related to subroutines. Can I program a helix to ramp a tool down in a pocket and then connect it to the pockets first G01 move so that the tool stays "down"..... Patrick |
|
#8
| |||
| |||
#100=1. (Full Depth) #101=.25 (Depth Increment) #102=0 N1 #102=[#102+#101} IF[#102GE#100]THEN[#102=#100] G01 Z-#102 F1. *****CUT POCKET OR PROFILE******** G0 Z.1 IF[#102NE#100]GOTO1 I think this would work in Macro B. Last edited by gravy; 07-15-2008 at 05:14 PM. |
![]() |
| 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 |
| Making money with CNC | Johnuk | CNCzone Club House | 26 | 12-13-2009 11:46 AM |
| Mold making with Deskcam | Jon D | Carken Products (Deskam, DeskCNC etc) | 2 | 02-08-2007 04:41 PM |
| What are people making with there cnc plasma tables? | Apples | CNC Plasma and Waterjet Machines | 9 | 01-09-2007 08:57 PM |
| Pictorial Guide to Making PCB (DIY) | abasir | General Electronics Discussion | 31 | 08-18-2005 12:14 AM |
| Anyone Know a know of a good book for mill, tool making? | sendkeys | General Metalwork Discussion | 6 | 11-01-2004 10:56 PM |