Page 3 of 3 FirstFirst 123
  1. #21
    Would someone help me, please! (Mr. Hobnob?) I'm trying to use the repeat command in Dolphin CAM and it doesn't seem to do anything.

    In the help file it says it needs a start command and an end command. I assume end is a stop command. How do I do a start command? M6? Will it show the repeated parts in the CAM window or will it just issue a repeat G-Code command or something? I have uploaded the Dolphin file I wanted repeated in a 2x2 grid (4 parts) here - File Here

    Help appreciated, thanks!

  2. #22
    Quote Originally Posted by Tenson View Post
    Would someone help me, please! (Mr. Hobnob?) I'm trying to use the repeat command in Dolphin CAM and it doesn't seem to do anything.

    In the help file it says it needs a start command and an end command. I assume end is a stop command. How do I do a start command? M6? Will it show the repeated parts in the CAM window or will it just issue a repeat G-Code command or something? I have uploaded the Dolphin file I wanted repeated in a 2x2 grid (4 parts) here - File Here

    Help appreciated, thanks!
    That files corrupted.!! (Edit: Sorry see it's Dolphin file not G-code. . Doh)

    M6 is tool change command. Won't work.!!

    What exactly are you wanting to do repeat the Entire G-code program in the same place or at different locations on the bed.?

    There isn't a dedicated G or M code to repeat entire program but there is way to do it using Sub programs M98/M99. This could be what Dolphin is referring to has M98 calls the sub program and M99 Ends it.

    It's common for a good Cam package to use Sub calls for repetitive procedures like holes etc has it cuts down on the number of lines and file size. This same Sub program technique can be used to call the entire bulk of the program but still leave the initialisation code. Chances are this is what Dolphin does with the repeat option.?

    Creating a Sub-Program is easy to do by simple putting a label NUMBER starting with O (not zero) IE: O200 before the code you want repeating then at the end of the code has the very last command put M99 to define it's end point.

    This creates your Sub program which is now no longer part of the MAIN program but is completely separate set of code which we can call either 1 time or 9999 times using the L address option thats parameter of the M98 call. It can also be placed at any point in the code and doesn't have to be in sequence.

    To use we include the M98 command in our MAIN program followed by the label number for the Sub program using P parameter IE: P200 then we tell it how many times we want it repeated using the parameter L IE: L4.

    So the entire thing would look like this M98 P200 L4 . . . .This will repeat the code in Sub-program O200 4 x times before returning to the next line after the M98 call where it then continues on thru the remaining MAIN code.

    The entire program to repeat same code 4 times would look something like this.

    N01 G21 G17 G40 G80 (Initialization)
    N02 G90 G0 G54 X10 Y10 S10000 M03 T01 ( Absolute coords and start location & 10K RPM, Start spindle, tool 1)
    N03 M6 (Tool change)
    N04 M98 P200 L4 (Call Sub Program O200 4 times)
    N05 G28 Z M5 ( Z Home & spindle stop)
    N06 G28 X Y ( X & Y Home)
    N07 M30 ( End program & rewind code)

    O200 (Sub program with code to repeat)
    N100 (Code)
    N110 (Code)
    N120 (Code)
    N120 M99 (End of Sub program return to N05)

    If you wanted to repeat the same code but at different places then it would be easy to do using Work offsets and call the Sub program after each offset is applied IE

    N01 G21 G17 G40 G80 (Initialization)
    N02 G90 G0 G54 X10 Y10 S10000 M03 T01 ( Absolute coords and start location & 10K RPM, Start spindle, tool 1)
    N03 M6 (Tool change)
    N04 G55 M98 P200 ( applied Work offset 55 call Sub x1 no L value defaults to 1 call)
    N05 G56 M98 P200 ( applied Work offset 56 )
    N06 G57 M98 P200 ( applied Work offset 57 )
    N07 G28 Z M5 ( Z Home & spindle stop)
    N08 G28 X Y ( X & Y Home)
    N09 M30 ( End program & rewind code)

    O200 (Sub program with code to repeat)
    N100 (Code)
    N110 (Code)
    N120 (Code)
    N120 M99 (End of Sub program return to N05)

    Hope this helps.
    Last edited by JAZZCNC; 10-02-2013 at 05:22 PM.

  3. #23
    Thanks Jazz, to be honest I can't follow that very easily on a Monday night after a few beers. I'm sure it will help others when they search though so thanks for taking the time.

    I did manage to get the Dolphin PartMaster repeat option to work just now though! For those who might need to know, you start the sequence with the repeat menu option and the radio button set to 'start sequence and enter your offsets. Then you need to go to the end point of what you want to repeat and do the exact same repeat menu option but this time switch the radio button to 'end sequence'. Ignore the other settings this time since it is the end of the sequence the offsets don't need to be set. This probably seems really obvious having done it, but for some reason I wasn't getting it, I think mostly because I didn't expect to use the same menu button to mark the start and one to mark the end.


  4. #24
    Ok but thats not really repeat G-code it's cutting 4 Identical parts in the same Gcode program. It's Repeat tool-paths really.!
    All your actually doing is copying the same tool paths in 4 different locations but in the same Work Offset (G54). Creating one large G-code program with the same tool paths calculated at different locations.

    Don't really matter in this day n age of modern controls and large PC memory but this would create a massive file size compared to repeating g-code like I mentioned. . . BUT. . It's doing what you want and that's all that really matters..

  5. #25
    Quote Originally Posted by Tenson View Post
    Would someone help me, please! (Mr. Hobnob?) I'm trying to use the repeat command in Dolphin CAM and it doesn't seem to do anything.

    In the help file it says it needs a start command and an end command. I assume end is a stop command. How do I do a start command? M6? Will it show the repeated parts in the CAM window or will it just issue a repeat G-Code command or something? I have uploaded the Dolphin file I wanted repeated in a 2x2 grid (4 parts) here - File Here

    Help appreciated, thanks!
    Just use the code you have and bracket it between the repeat commands.
    File attached, change the .zip to .cnc don't unzip it just rename it.

    8mm-2-toberepeat_1.zip

    On the first line you see the repeat and the start radio box is ticked 2 x 2 selected and x is 120mm so it sits to the right and Y is -20 so it sits underneath.

    The end repeat just needs to have the end radio box selected, doesn't matter about filling the boxes in as it's just an end command.
    John S -

  6. #26
    Bump
    Tensing did you miss this ?
    John S -

  7. #27
    Learn to use Do /while on Fanuc controls
    This will help a lot with repeat cycles

    O1000(Drill Holes 2mm deep 5 mm apart*10)
    #501=10 (number of holes )
    Goo G90 G54 p1 Xo Yo Z50 Mo3 S1000 G43 H1
    G00 Z2.0
    ()
    While [#501 GT 0]Do 1
    Go1 G91 Z-4.0 F100.0
    Goo z4.0
    G00 x-5.0
    #501=[#501-1]
    END 1


    Commands to Home

  8. #28
    Quote Originally Posted by Ulsterman View Post
    Learn to use Do /while on Fanuc controls
    This will help a lot with repeat cycles

    O1000(Drill Holes 2mm deep 5 mm apart*10)
    #501=10 (number of holes )
    Goo G90 G54 p1 Xo Yo Z50 Mo3 S1000 G43 H1
    G00 Z2.0
    ()
    While [#501 GT 0]Do 1
    Go1 G91 Z-4.0 F100.0
    Goo z4.0
    G00 x-5.0
    #501=[#501-1]
    END 1


    Commands to Home
    Bit late this Ulster man but anyway think Tenson use's Mach3 control which doesn't support conditional code like Do/while in the main G-code file so needs to be done thru macro's. And think he was meaning more for the CAD/CAM software to post process it in main G-code file has most folks on here don't get into running macro's and sub routines etc.

Page 3 of 3 FirstFirst 123

Similar Threads

  1. Anyone got some 2.5D G-code please ?
    By dudz in forum Programmers Corner
    Replies: 5
    Last Post: 22-06-2013, 11:21 PM
  2. Cambium Code Web Tools Parametric G-code Generation
    By CambiumMachines in forum Manufacturer News
    Replies: 0
    Last Post: 09-01-2013, 04:56 AM
  3. Mach3 Using a physical button to repeat current gcode
    By RLKS Rob in forum Artsoft Mach
    Replies: 2
    Last Post: 12-08-2012, 01:30 PM
  4. Use a tile cutter as a hobby table saw?!!!
    By HankMcSpank in forum General Discussion
    Replies: 10
    Last Post: 21-07-2009, 06:56 PM
  5. G Code help
    By moose007 in forum Programmers Corner
    Replies: 4
    Last Post: 22-05-2009, 11:39 AM

Bookmarks

Posting Permissions

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