![]() | |
| 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
| |||
| |||
I am very new to G-code! I have circles down, but need to do a square now. What I have is: The stock is a square tube 5x3x37" and I need three square holes in the 3" side. One half inch in from the end, 11” long and 2.5" wide. This is what I came up with. Oh yea the mill is only 2d so all I have is X and Y. My ref will be set to X 0 Y 0 at the outside left corner. g0 x .5 y .25 g42 g0 x 0.09375 y 0.09375 Off set for 3/16” bit g1 y 2.5 g1 x 11 g1 y -2.5 g1 x -11 g40 Will this work or am I missing something? Last edited by tbitt1; 02-08-2011 at 11:53 AM. Reason: Updated measurements |
|
#3
| ||||
| ||||
| Just my opinion, but for simple things it easier to do without cutter offset. Then you don't have to worry about some hard to control approach mystery. Not knocking G41 stuff, but KISS. Keep It Simple Stupid. Are you trying to plunge a hole. How is it going to start? You control the Z? Then you need to pause to do it with M0.
__________________ Super X3. 3600rpm. Three ways to fix things: The right way, the other way, and maybe your way, which is possibly a faster wrong way. |
|
#4
| |||
| |||
|
|
#5
| ||||
| ||||
| Just put the offset in in your toolpath, off by the radius. Put a M0 whenever you need it to pause to move the Z manually. Hit cycle start to continue until next M0, or just single step, and never walk away. Problem with G41 is thew is a preparatory move, which is no problem on the outside of something, but inside, To overcome this, I do the weird moves above the job, then ramp down after the dirty bit. When there is nowhere to go but cut, you really don't want those weird moves. Or you can use liberal M1s and turn optional stop on and off as required to stop. I use F4 key as a hot key to toggle optional stop. That is emergency pause, for my wife. ![]() ![]()
__________________ Super X3. 3600rpm. Three ways to fix things: The right way, the other way, and maybe your way, which is possibly a faster wrong way. Last edited by neilw20; 02-09-2011 at 05:52 AM. Reason: typos and dumb grammar |
| Sponsored Links |
|
#6
| ||||
| ||||
its quite easy what neil is saying. reduce your hole dimensions by the tool diameter. thats a radius to each side. then a simple code along the lines of go1 x0 y0 x10y0 x10y10 x0y10 x0y0. a very basic square. its rough. it has no feed controls, no offsets... nothing to confuse you... chuck in f100 say... and the m0 every second line... but its kiss and as long as your setup is right... rethink your reference... it works. |
|
#7
| |||
| |||
How does this look? Reference being X 0 Y 0 g0 x 0 y 0 g1 y 2.40625 m0 g1 x 10.90625 m0 g1 y -2.40625 m0 g1 x -10.90625 m0 Thanks again |
|
#8
| ||||
| ||||
| You can round those to 4 decimal places. Do you really think your machine can resolve 0.00001 ?? Add some comments so that the prompt line makes sense (next week) You must select a feed for G1 to work Code: G0 X0 Y0 G1 y2.4063 F10 (You must have a FEED or G1 will complain) m0 (Turn ON spindle, and MOVE Z DOWN) X10.9063 M0 Y-2.4062 M0 X-10.9062 M0 (RETRACT Z NOW) G0 (maybe not a good idea in your case) M30 (End of program) Spaces for clarity, but keep the numbers with their respective letters for readability. G0 and G1 are modal, so don't keep repeating yourself. Less stuff means improved readability
__________________ Super X3. 3600rpm. Three ways to fix things: The right way, the other way, and maybe your way, which is possibly a faster wrong way. Last edited by neilw20; 02-09-2011 at 02:14 PM. Reason: Extra thoughts |
|
#10
| ||||
| ||||
| is that code absolute or incremental? not to be picky but i see a square of 5 by 20 inches here... 0,0 being the centre. at least the way i use my machine... a quick pic. white square. your material. grey square, hole. the corners shall be radius, of course. red square is the tool path. green circle is cutter at 0,0 (already subtracting tool radius) opposite corner would be X5 Y2.5 minus, again, tool radius. two radii make a diameter ![]() the way i work, (aasuming this to be a 5" by something hole...)the purple circle is at approx X2.5 Y2.41967283 whatever it was ( ), with the tool heading TOWARDS X0 Ywhatever it was... OR,, the cutter is moving AWAY FROM X0 Y whatever it is... (in the X axis only!) get the idea? then you must consider...to hold X at 0, and move Y first? or to hold Y at 0, and move X? (ie; X0 Y0 X0 Y10 X10 Y10 versus X0 Y0 X10 Y0 X10 Y10...) which way you go depends on machine capabilities. cutter turns clockwise from above. to travel X first results in CLIMB MILLING, Y first is conventional milling. when doing an inside cut. move Y first if you have backlash, so the hole is cut in a CLOCKWISE direction... yes, it is important! confusing? this is basic! |
| Sponsored Links |
|
#12
| ||||
| ||||
| Not incremental. This code described here is absolute.
__________________ Super X3. 3600rpm. Three ways to fix things: The right way, the other way, and maybe your way, which is possibly a faster wrong way. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How square is enough? | zeeway | DIY-CNC Router Table Machines | 7 | 12-03-2009 05:22 AM |
| 3mm square 16 pin QFN | powerr | PCB milling | 3 | 11-06-2009 01:09 PM |
| Newbie- Square hole in square tube | bubblybill | General Metalwork Discussion | 6 | 09-20-2009 10:18 PM |
| Square | hydrogen | DIY-CNC Router Table Machines | 8 | 05-27-2008 11:39 PM |
| WOn't cut square! | Ed_R | DIY-CNC Router Table Machines | 51 | 03-23-2006 05:19 AM |