![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| G-Code Programing Discuss G-code programing and problems here! |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
I would like to create duplicate parts without repeating programming each time. For example I produce the g-code in BobCAD-CAM and it takes me say 10 minutes to program the one part. Now I want to produce the very same part so many inches to the right. In fact I want to produce parts in both directions like when I do an array in AutoCAD. BobCAD-CAM suggested their nesting program, but I don’t have that. Surely there must be a way of doing this without buying another program? Brian |
|
#2
| |||
| |||
| Surely you can take your BobCad generated program and call it as a subprogram from another program that just selects the work zeroes for the different locations? Call the BobCad program PROG2 and write a PROG1 something like this: PROG1 G54 M98 O(PROG2) G55 M98 O(PROG2) etc etc M30
__________________ An open mind is a virtue...so long as all the common sense has not leaked out. |
|
#3
| |||
| |||
| You could also taylor the program to use incremental moves rather than absolute position. At the end of the previous part, rapid to the start of the new part and wait for the go button. Otherwise, you could nest the parts in a parametric program to position the start point, then call each part as a subroutine as Geof states. If you use variables to reposition the starting points, then you can change the variable values in the array of parts for rows and columns as you need them without rewriting the whole program. The start here. End there. Respool. DC
__________________ Learn cause and effect through experience. Mastering those relationships is the "Common Sense" ability within the art of any trade. |
|
#5
| |||
| |||
Use a G52 in a DO WHILE loop... O001 #500=0 WHILE[#500LE10]DO1 G52X#500 (Your BobCad prog here) Blah, blah G52X0 #500=#500+1(1 here represents your shift amount eg 1inch) END1 M30 This will pitch your prog over by 1 inch in X direction, 10 times. OR O002 #500=0 #501=0 WHILE[#501LE5]DO2 G52Y-#501 WHILE[#500LE10]DO1 G52X#500 (Your BobCad prog here) Blah, blah G52X0 #500=#500+1 END1 G52Y0 #501=#501+1 END2 M30 This will pitch your prog over by 1inch in X direction, 10 times. Then repeat that, pitching over by 1inch in Y- direction, 5 times. Only one datum to set (G54), O002 would repeat the same part 50 times. That would be quite a few work datums to set, and no messy subs or incremental programming, all done in one short prog. Just another way of doing the same thing ;-) Last edited by ChattaMan; 08-22-2007 at 05:21 PM. |
| Sponsored Links |
|
#6
| |||
| |||
| 070824-1619 EST USA Slight modification of ChattaMan's program. Changed LE to LT so number equals the part count rather than one more. Added variables at the beginning of program to easily see counts and increments between parts. Within DO1 it is not necessary to do G52 X0 each loop. This is only needed as a new initial value when G52 Y is changed. O002 G54 #510 = 1.25 (X increment between parts) #511 = 0.75 (Y increment between parts) #512 = 5 (number of parts in X direction) #513 = 10 (number of parts in Y direction) #500 = 0 (X location relative to G54, initialized to 0) #501 = 0 (Y location relative to G54, initialized to 0) WHILE [#501 LT #512] DO2 G52 Y-#501 WHILE [#500 LT #513] DO1 G52 X#500 (Subroutine call to your BobCad program to keep clutter out of these loops) #500 = #500 + #510 END1 #500 = 0 #501 = #501 + #511 END2 (move to unload location) M30 (Your BobCad prog here as a subroutine) . |
|
#8
| |||
| |||
| 050824-1901 EST USA Geof: Yours is simpler for a few, but not for a 10 x 10 matrix, or some transition point less than 100. And it may not be less work especially if this basic concept is applied for different parts. The transition point is probably a matrix around 2 x 2. However, if the job is setup multiple times it is only necessary to set G54 instead of the number of different G5xs that are used. One could save all the G5xs, but that is another file to keep track of, and load. Or the settings of the G5xs could be done in the program. Then what happens if the base G54 is different. So one could load all the G5xs above G54 from within the program based on G54. But that is more complex than the G52 method. And just looking in the G52 type program you have documented and can easilly read what the matrix incrementing is. . |
|
#10
| |||
| |||
Geof.... Yep, your way is simlper. I just try and get the machine to do the work. I'm getting lazy. But like Gar says, any number of parts and that's going to be time consuming setting all those Work Datums . Unless you do it by Macro . Gar.... Ah, yeah....LT not LE. I was trying to keep it simple and minimize the number of variables for someone who is not used to working with them. ...and back to work datums.Brian needs to shift his work datum. So why not use G52 Work Shift? It does what it says on the can. I hope Brian is reading all the posts. The best way to learn is to read and try other peoples ideas. I did. Brian has not replied yet, I presume he's still punching the numbers into his work datums (oops, I'm getting boring now!) |
| Sponsored Links |
|
#12
| ||||
| ||||
| with g52 shifts and subs a guy has more control , if you running twenty parts and an endmill breaks for example , you can change the endmill then you can skip over the other parts and carry on from where you left off , provided you cancel the g52 after each part |
![]() |
| 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 |
| MOST precise method of maching SMALL parts? | SRT Mike | General Metalwork Discussion | 2 | 12-02-2006 09:58 PM |
| need duplicate cylinder made | blasterboy1980 | Casting Metals | 0 | 10-29-2006 08:21 PM |