PDA

View Full Version : How to cut multiple parts (loop a program)



Bird_E
05-04-2005, 01:03 PM
I kinda of new to Mach and CNC and have a question.
I have a program that I use to cut a part from a plate, Now I want the program to run one part, move over a couple of inches in X and run the same program again....... and again and again.... I would like make 5 parts with the same program and have it automatically move over in X and run the program again. My question is, what is the best way to handling this using MACH2 as my controller and surfcam as My cam software?

Thanks a million!
Bob
:confused:

JFettig
05-04-2005, 01:14 PM
One way you can do it is set up fixtures, if you have multiple tools, you can program it so it will use one tool do all the parts, then next tool do all the parts etc.

Basicly what the fixtures are is G54, G55, G56, G57, G58, G59 and more that I am not totally sure how to use.

in the offsets tab, you can use each fixture and set them up in there. Otherwize theres a temporary coordinates code that you can tell it to move over like that without setting up fixtures, I am unsure how to use that as I havent ever done so.

Jon

JavaDog
05-04-2005, 01:15 PM
This is something I have always been very curious about as well, and I haven't found a good answer on how to accomplish this.

When talking with the OneCNC guys during my demo, I asked them about this as well - thinking that maybe XR had a way to do this and output the correct gcode - but no dice.

JFettig
05-04-2005, 01:31 PM
I belive that the best way to do this is with fixtures, or at least 1 fixture and all the part offsets, especially if you have home switches so its always set up exactly the way you want.

I typically have 2 fixture offsets, G54 and G55, one for each side of the stop in my vice.
I have another small fixture peice that I use off of one of my other fixtures in my vice, it has G56, G57, G58, and G59 which have an offset from G54 and I do a similar thing which you are wanting to do. I simply have a common zero zero for the program in each fixture(or location) and put the G55 then the program, then lift up the a safe z height and G56 G0 X0(or wherever it may be) then the program again(I just copy and paste) and do the same for the rest.

Jon

Barker806
05-08-2005, 03:11 PM
You can use a Sub and it would look like this:
G90 G00 G54 X0.0 Y0.0
S3000 M3
G43 H5 Z1.0
M98 P00005 L6
G92.2
M30

O00005
G00 G54 X0.0 Y0.0
G01...

<CODE HERE>

G90 X0.0 Y0.0
G92 X-6.0 Y0.0 This is where you shift for the next part
M99


Here is an other way to do the same thing. I could explain how this works but the maual is so good!!! It will give you a chance to see how the codes are used!

G90 G00 G54 X0.0 Y0.0
S3000 M3
G43 H5 Z1.0
M98 P00005
G53 X6.0 Y0.0 Z0.0
M98 P00005
G53 X12.0 Y0.0 Z0.0
M98 P00005
G53 X18.0 Y0.0 Z0.0
M98 P00005
G53 X24.0 Y0.0 Z0.0
M98 P00005
G53 X30.0 Y0.0 Z0.0
M98 P00005
G52 X0.0 Y0.0 Z0.0
M30

O00005
G00 G54 X0.0 Y0.0
G01...

<CODE HERE>
M99

Best of luck
Brian

mdlmkr
05-13-2005, 03:55 PM
Maybe I misunderstood the question, but it sure sounds like all you want to do is array or copy the same program and you are using Surcam.

All you have to do is use the "Transform" button in the operations manager. Use the rectangular array feature and plug in your offset. If you are just offsetting in one direction, put in 1 copy with a zero offset in the stationary directions.

You have the option to sort by tool, which will run each toolpath individually across your array, or running each part individually.

I hope this helps.

Mortek
05-13-2005, 04:16 PM
program 1 part in surfcam in incremental mode, this would be your subroutine.
Then call out your sub from each new x,y position in absolute mode:

G90 G0 X0Y0
M98P001
G90 G0 X2 Y0
M98P001
G90 G0 X4 Y0
M98P001
ETC....