![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| G-Code Programing Discuss G-code programing and problems here! |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
new to trying to learn g-code and was wondering if anyone could help me out on this. I am wanting to use my homemade cnc engraver (using kelly ware or mach 3) to do some engine turning or jeweling on polished sheet metal. The movement I would need I've pretty much figured out(not the code just what it needs to do: home to one side upper corner, lower to make contact, pause three seconds in that position, raise up, move along y axis (?) amount, lower, pause three seconds, repeat however many times to move across the sheet, then home move down x axis and pretty much do the same then repeat everything to fill up sheet. How complex is this for code? What I am wondering is if there is a way to have it repeat code without retyping it or just copy paste when writing? |
|
#3
| |||
| |||
| I am not familiar with mach 3. Can it handle alternating absolute and incremental commands and can it handle an incremental motion command on the same line that it calls a subroutine many times using an L count? I have a program which steps its way through an array of points and can post a copy. |
|
#5
| ||||
| ||||
| http://xdobs.com/cnc/gcode-introduction.html http://www.positiveflow.com/freecode.htm its a start just google it , youll find lots of free info |
| Sponsored Links |
|
#6
| ||||
| ||||
| Probably the easiest way to do this is with G81 or G82 (drilling cycles), just enter the XYZ and feeds for the first "hole"/polish spot, then only the X's and Y's as needed after that. With a little copy & paste action this should take only a few minutes. |
|
#8
| |||
| |||
| The program below will create a ten by ten array of locations at which an operation is performed. It is a sequence of incremental moves and nested subroutines that are called multiple times. Subroutine N1100 is the one that performs the operation and it has a G82 spot drill cycle set to move to the Z 0.0 position and dwell for 3 seconds. Almost any operation could be performed here. The program starts at the work zero location, calls the first subroutine N1000 then immediately calls the second subroutine N1100 and does the operation. It then increments a move along X and calls N1100 another nine times (L9 on line N1001) to step along and perform the operation a total of ten times along the X axis. Then it increments a move on the Y axis and performs the operation there before stepping back (L9 on line N1003) along the X axis. After this sequence of moves out and back it then returns to the main program and goes through the sequence a total of five times (L5 on line N7). The spacing between the points is 0.5 in both X and Y. These are the incremental moves on lines N1001, N1002, N1003 and N1004. The X and Y distances here can be changed for a different spacing; they do not have to be the same. The L values on lines N7, N1001 and N1003 can be changed to alter the size of the array. The L value on line N7 is half the array size and the L value on lines N1001 and N1003 is one less than the array. It does not have to be a square array and if and additional line is added in the subroutine N1000 an odd number can be obtained for the number of locations along the Y axis. % O00000 N1 G00 G17 G20 G40 G49 G80 G90 G98 N2 (G54 AT FIRST HOLE) N3 T1 M06 N3 G43 H01 N5 M03 S1000 N6 G54 G00 X0. Y0. Z1. N7 M97 P1000 L5 N8 G53 G49 G00 Z0. N9 M30 N10 (----------------------------) N1000 M97 P1100 N1001 G91 X-0.5 M97 P1100 L9 N1002 G91 Y-0.5 M97 P1100 N1003 G91 X0.5 M97 P1100 L9 N1004 G91 Y-0.5 M99 N1005 (--------------------------) N1100 G90 G00 Z0.5 N1101 G82 Z0. F20. R0.1 P3000 N1102 G80 N1103 M99 % |
|
#9
| |||
| |||
| Brilliant and thank you very much, I owe you a beer at least more likely a case. I would be lying to say I get it all completely but I guess I dont have to. I want to though so I will spend some time working through it and watching it work. Really do appreciate it. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |