586,055 active members*
4,277 visitors online*
Register for free
Login
Results 1 to 6 of 6
  1. #1

    Nesting from existing G-Code

    If I already have my G-Code, is there a utility that will replicate it at a given offset in X or Y so that I can produce multiple items from a single piece of material?

  2. #2
    Join Date
    Apr 2004
    Posts
    475

    Re: Nesting from existing G-Code

    A good question. My current control, wincnc can do this, and quite handy if using cam software that can't (Vcarve....I also have mastercam that has such arrays built in).

    I've thought there must be something, but have not tried to look....will post if I find something.

    edit: GWizard Editor: A G-Code Editor and Simulator might work, but not 100% clear from website, perhaps an email is in order, and not the cheapest thing out there.

    Another option would be to get a python programmer (or whatever language) to write a program to copy, translate, and paste the code based on the array you want. If the arcs are incremental, should be fairly easy to do, I'd just suggest that you put some thought into what exactly gets translated and what is only one time at the beginning and end. Guru.com or odesk would make quick work of a well-defined project.

    edit #2
    NCPlot Version 2 Features I think will work too.

    Edit #3
    https://code.google.com/p/grecode/ will work too, and free! Looks like you might be best taking out the beginning and end code first.

    Greg,

  3. #3
    Join Date
    Feb 2011
    Posts
    353

    Re: Nesting from existing G-Code

    you could try and move work offsets to keep your g program the same
    g54
    m98pxxxx
    g55
    m98pxxxx
    or use goto instead of m98xxxx

    rcs60

  4. #4
    Thanks for your replies. I didn't think that anyone had responded from the list of threads as it showed no replies.

    @rcs60 I didn't want to do it by offsets as I was sure that it would end in tears.

    I shall look at the other links when I have the chance.

    I have actually managed to do it with EXCEL. A bit agricultural but it works.

    I will now be able to replicate the proven code and then cut and paste to consolidate all the bits that use the same cutter.

    I don't have any fancy software and use G-Simple to generate the code. This then takes a lot of manual text work so that, say, thread milling actually cuts a righthand thread! A lot of Xs and Ys!!!!!!

    Think that I will go have a cuppa to celebrate!

  5. #5
    Join Date
    Apr 2009
    Posts
    125

    Re: Nesting from existing G-Code

    Two easy ways of doing what you need.
    #1 - Temporary Offsets - G52. Example shows how or lookup G52.

    (Your Setup code Here)

    M98 P1 (Execute 1st std location)

    G52 X50 Y50 (Temp Offset #1)
    M98 P1 (Execute at Offset #1)

    G52 X100 Y50 (Temp Offset #2)
    M98 P1 (Execute at Offset #2)

    G52 X150 Y50 (Temp Offset #3)
    M98 P1 (Execute at Offset #3)

    G52 X0 Y0 (Back to standard)

    M30

    O1
    (Your code here)
    M99

    or #2 - Use a Gcode Editor such as Ezilathe's that has the mathematical functions required to offset selected code as required.
    Designed for lathe, but the basic editor functions can be applied to Mill. (Find at CNCZone/Downloads/Post Files)

  6. #6
    Thanks Stutank. I thought about temporary offsets but that still leaves me swapping tools like a madman unless I swap offsets for each position for each tool. Possible but I think I will mess it up.

    I will investigate Ezilathe as that is what I was looking for in the first place. The only one that I found with the mathematical functions didn't seem to want to include them in a macro.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •