Results 1 to 9 of 9

Thread: G-Code Duplication

  1. #1
    Registered
    Join Date
    Jul 2008
    Location
    united states
    Posts
    4
    Downloads
    0
    Uploads
    0

    G-Code Duplication

    I need help with duplicating similar cutting patterns. I am not sure if mirror image is the way to go. I have attached an example of the program I am working with. Any help would be greatly appreciated!
    Attached Files Attached Files


  2. #2
    Registered
    Join Date
    Sep 2010
    Location
    Australia
    Posts
    989
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by bjgbur View Post
    I need help with duplicating similar cutting patterns. I am not sure if mirror image is the way to go. I have attached an example of the program I am working with. Any help would be greatly appreciated!
    Your example program already mirror images one cutting pattern to produce the other, so I'm assuming you want advice regarding whether Mirror Image function on the machine is a better option than duplicating the code.

    Both have their advantages and disadvantages, it depends a bit on the program. If the program is large, and the machine is not equipped with much memory, then using the Mirror Image function would have an advantage. The cutting program could go in a sub and called from the main with Mirror Image on and off. The biggest disadvantage with doing a straight Mirror Image is that one cutter path will use Climb Milling, whilst the other will use Conventional Milling.

    Your example program has been programmed so that the cutting method for the Mirrored Detail is the same. If the machine has sufficient memory, or the facility for DNC, I would prefer to duplicate the code so that the cutting method was consistent.

    Regards,

    Bill


  3. #3
    Registered
    Join Date
    Jul 2008
    Location
    united states
    Posts
    4
    Downloads
    0
    Uploads
    0

    What the program does

    What the program does is cut out a dog bone shape from flat specimens. It does this in a repeat process. What I am looking to do is add more stacks with an offset of say 2 to 3 inches between stacks. How do you write the program to duplicate the initial program to repeat after offsetting in the Y direction.

    Does anyone know where to get a free G code simulator?


  4. #4
    Registered Perfect Circle's Avatar
    Join Date
    Jul 2010
    Location
    USA
    Posts
    267
    Downloads
    0
    Uploads
    0
    Use a G92 off set at the end of the program

    G00"X" 'KEEP THE SAME AS IN YOUR PROGRAM" Y3.0 "Z" SAME AS PROGRAM
    G92X0.0Y0.0Z0.0
    That should just move everything in Y by 3.00"
    But dont forget to put a G92 at the start of your program to cancel out the
    G92.
    I would write you a full program but im sorry I dont have too much time today.
    This should help you out

    Good Luck~!


  • #5
    Registered Perfect Circle's Avatar
    Join Date
    Jul 2010
    Location
    USA
    Posts
    267
    Downloads
    0
    Uploads
    0
    This is the best I could do with the time ....There is a shorter way, but I hope that this gets you going in the right direction
    Attached Files Attached Files


  • #6
    Registered
    Join Date
    Jul 2008
    Location
    united states
    Posts
    4
    Downloads
    0
    Uploads
    0

    Response to Perfect Circle

    What I tried using was a G97 code that resets the work coordinate system to where ever you choose then did the same thing you did. I was just wondering if there was a way to shortcut the copy and paste of the whole program to do the cutting. Is there a way to reference the whole thing in a one line?


  • #7
    Registered Perfect Circle's Avatar
    Join Date
    Jul 2010
    Location
    USA
    Posts
    267
    Downloads
    0
    Uploads
    0
    Try putting an L value at the end of the program ever how many times you want it to repeat with the step over in Y in inc. distance ...That should be the shortest way


  • #8
    Registered
    Join Date
    Sep 2010
    Location
    Australia
    Posts
    989
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by bjgbur View Post
    What I tried using was a G97 code that resets the work coordinate system to where ever you choose then did the same thing you did. I was just wondering if there was a way to shortcut the copy and paste of the whole program to do the cutting. Is there a way to reference the whole thing in a one line?
    What make and model control is it?

    A simple way to achieve your result is how I would do it with a Fanuc control.

    1. Put the cutting component of your original program into a Sub Program
    2. From your main program you would drive to the start point in X and Y and call the Sub.
    3. Move the desired offset for the next repeat, set the coordinate system and call the sub again.
    4. you can keep doing this as many times as required.

    Alternatively, do as in 1 above, but when you call the Sub from the main program, pass the parameter to have it repeat a number of tines. If you do it this way, you would have to make the shift offset and the setting of the coordinate system within the Sub. An example of the Sub call with repeat is as follows for a Fanuc control.

    M98 P1000 L4

    The the above line Sub program 1000 would be called and repeated 4 times.

    Post the make and model of the control and I'll do a program for you.

    Regards,

    Bill


  • #9
    Registered Perfect Circle's Avatar
    Join Date
    Jul 2010
    Location
    USA
    Posts
    267
    Downloads
    0
    Uploads
    0
    ok you can try a sub program it will be the fastest way without copying code... you can try this to get you headed in the right direction...
    sorry I cant be of more help im crazy busy today..Good Luck and keep the chips flying!

    (CALL SUB PROGRAM)
    M98P1000 L24 "HOW MANY

    TIMES TO SHIFT"
    N271M30

    (SUB PROGRAM)
    1000(SUB PROGRAM#)
    N272G91G0"INC.MOVE"Y3.0
    N273G92X0Y0Z0
    M99


  • Similar Threads

    1. Replies: 4
      Last Post: 03-29-2011, 09:39 AM
    2. Converting Fanuc G code to Seimens 840D G code
      By Jasbinder in forum Siemens Sinumerik CNC controls
      Replies: 2
      Last Post: 02-20-2011, 11:02 AM
    3. Replies: 8
      Last Post: 12-15-2010, 03:32 PM
    4. learning g code or cad-cam code output?
      By slow_rider in forum G-Code Programing
      Replies: 3
      Last Post: 02-27-2010, 09:48 PM
    5. looking for g code 3d from bobcadcam or simmilar for indexer lpt v5 with g code soft
      By troyswood in forum Ability Systems - LPT Indexer and G-Code
      Replies: 2
      Last Post: 12-24-2006, 10:21 PM

    Posting Permissions



    About CNCzone.com

      We are the largest and most active discussion forum from DIY CNC Machines to the Cad/Cam software to run them. The site is 100% free to join and use, so join today!

    Follow us on

    Facebook Dribbble RSS Feed


    Search Engine Friendly URLs by vBSEO ©2011, Crawlability, Inc.