Thread: Tile / Repeat G-Code?
Hybrid View
-
08-02-2013 #1
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!
-
10-02-2013 #2
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.
-
12-02-2013 #3
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 -
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Anyone got some 2.5D G-code please ?
By dudz in forum Programmers CornerReplies: 5Last Post: 22-06-2013, 11:21 PM -
Cambium Code Web Tools – Parametric G-code Generation
By CambiumMachines in forum Manufacturer NewsReplies: 0Last Post: 09-01-2013, 04:56 AM -
Mach3 Using a physical button to repeat current gcode
By RLKS Rob in forum Artsoft Mach (3 & 4)Replies: 2Last Post: 12-08-2012, 01:30 PM -
Use a tile cutter as a hobby table saw?!!!
By HankMcSpank in forum General DiscussionReplies: 10Last Post: 21-07-2009, 06:56 PM -
G Code help
By moose007 in forum Programmers CornerReplies: 4Last Post: 22-05-2009, 11:39 AM
Bookmarks