Repeat cycle

More
09 Feb 2011 19:01 #7099 by occesar_0
Repeat cycle was created by occesar_0
Hi!

Let's suppose that my g code generates an square of 5x5".

If a don't want to repeat my g code or edit, to do the same square in another part of my work table.

How can I define the new point?

I was reading the chapter of repeat cycle, but isn't so clear.

Thanks

Please Log in or Create an account to join the conversation.

More
09 Feb 2011 20:44 #7100 by BigJohnT
Replied by BigJohnT on topic Re:Repeat cycle
Generally you would use a work offset to cut the same part at a different location from machine zero. For example if machine zero (X&Y) is the spindle is located above the left rear corner then you move to the X0Y0 for your part 1 and set the G54 offset. Run your part. Move to the X0Y0 location of the second part and set the G55 offset. Now when you run the same code the part is cut in a different location. So if you had 4 vises on your machine you set the G5- offset for each one and when your run code for that location you just have to select the proper coordinate system for that vise.

www.linuxcnc.org/docview/html/common_User_Concepts.html#r1_5

www.linuxcnc.org/docview/html/gcode_coor...ha:Coordinate-System

John

Please Log in or Create an account to join the conversation.

More
10 Feb 2011 08:19 #7105 by andypugh
Replied by andypugh on topic Re:Repeat cycle
Alternatively you could code the shape in incremental mode as a subroutine, then go to the start point and call the subroutine.
I have, for example, a set of incrementally-coded subs for cutting holes for various connectors.

www.linuxcnc.org/docview/html/gcode_main.html#sub:G90,-G91:-Set

Which is most appropriate depends on the nature of what you are doing.

Please Log in or Create an account to join the conversation.

More
10 Feb 2011 11:25 #7108 by Rick G
Replied by Rick G on topic Re:Repeat cycle
Hello,

You can also complete the first box, then move to the next position you want to make the part and use G92 to set that location as the start point.

I start most of my work from CAD so I have a tendency just to draw all the parts where I want them and then convert to Gcode.

Rick G

Please Log in or Create an account to join the conversation.

More
10 Feb 2011 11:49 #7109 by andypugh
Replied by andypugh on topic Re:Repeat cycle
Rick G wrote:

You can also complete the first box, then move to the next position you want to make the part and use G92 to set that location as the start point.


That could be very useful for a machine with roll-feed stock where the X is the stock feed. (Think roll-feed plotter). This way of working would let you step endlessly down the roll.
I wonder if there are any hard limits on axis length?

For completeness, G10 L20 allows you to redefine the current coordinate system, rather like a cross between JT's suggestion and RickG's.
www.linuxcnc.org/docview/html/gcode_main.html#sec:G10-L20

Please Log in or Create an account to join the conversation.

More
10 Feb 2011 18:00 #7114 by occesar_0
Replied by occesar_0 on topic Re:Repeat cycle
My final solution was to use a G10 L2 to redefine my current coordinate system, but after all, I think the best solution would be draw all I need, where I want, just like Rick G.

I'm a little bit confusing about G54 and G55, I must read some more.

After solve that problem, I tried to add cutter radius compensation and I did it, but there's a mistake.

I f you can see my picture, I have a triangle arragement and after apply G41 or G42, one of the corners of all of them always get open. Days ago I did something similar, but without redefine coordinate system or do some Offset and had no problema so I thought this could be part of the problem or am I wrong?

Mathematically the program is correct that’s why I’m so confused.:(

Thanks in advanced

File Attachment:

File Name: doble_escuadra.ngc
File Size:1 KB
Attachments:

Please Log in or Create an account to join the conversation.

More
10 Feb 2011 23:06 - 10 Feb 2011 23:13 #7120 by M4MazakUser
Replied by M4MazakUser on topic Re:Repeat cycle
just to add to your confusion, you can also write cycles "defined shapes" using macro's (#<value1>) -u can do anything, once u can think programs up in algebra!

by the way, usually radius compensation issues are to do with where your start and end points are, tis usually good practice to extend the toolpath before and beyond the finished shape you need to allow the tool to move into correct position when rad comp is turned on, and finish the shape u are after when it is turned off.
Last edit: 10 Feb 2011 23:13 by M4MazakUser.

Please Log in or Create an account to join the conversation.

More
11 Feb 2011 00:01 #7124 by BigJohnT
Replied by BigJohnT on topic Re:Repeat cycle
Your g code runs fine and is doing exactly what you programed it to do, but I think your a bit confused as to how to start the lead in move for the smaller triangles. A proper start for an inside profile would be in the middle of a line with an arc move and progressing CCW around the profile and overlapping the start point and exit with an arc. This assumes you are using normal end mills and not backwards ones.

Please read:

www.linuxcnc.org/docview/html/gcode_tool...-Radius-Compensation

John

Please Log in or Create an account to join the conversation.

More
11 Feb 2011 09:15 #7135 by andypugh
Replied by andypugh on topic Re:Repeat cycle
occesar_0 wrote:

I'm a little bit confusing about G54 and G55, I must read some more.


Try linuxcnc.org/docs/html/gcode_coordinates.html

Please Log in or Create an account to join the conversation.

More
11 Feb 2011 10:50 #7137 by Rick G
Replied by Rick G on topic Re:Repeat cycle
Have you checked that you have the proper lead in move?



"G41 start cutter radius compensation to the left of the programmed line as viewed from the positive end of the axis perpendicular to the plane.

G42 start cutter radius compensation to the right of the programmed line as viewed from the positive end of the axis perpendicular to the plane.

The lead in move must be at least as long as the tool radius and can be a rapid move."

Rick G

Please Log in or Create an account to join the conversation.

Time to create page: 0.108 seconds
Powered by Kunena Forum