Hello Guest it is November 13, 2019, 11:09:23 PM

Author Topic: Just starting out  (Read 6272 times)

0 Members and 1 Guest are viewing this topic.

Just starting out
« on: November 21, 2014, 02:59:27 PM »
Hi there
I'm Michael (brayford) from Lincoln in the UK and I'm just getting started with G-Code. I will eventually build a cnc router, but first I need to get to grips with the code as I don't want to shell out x amount for the machine only to find I can't work it because I don't know anything about the code.

I've managed to find a Mach3 program and a couple of other bits of software. So could someone please tell me the best place to start.

Thanks a lot.

Michael.
Re: Just starting out
« Reply #1 on: November 21, 2014, 05:33:56 PM »
I've been running my home built router for years now and can't write g-code to save myself. My Cad/Cam program writes the code for me.
The sort of work you intend to do with your router will dictate the style of programs you should look at.
If you are only going to cut out simple shapes on the machine, then you will get by with simple programs, but if you are wanting to create 3D or rotary projects, then you're looking at higher spec programs.
I use Vcarve Pro or Aspire from Vectric for my work. You can download a trial version of these programs to get a feel for them.
Just to clear this up for you. You will need a program such as Mach3 to control the machine as well as a Cad/Cam program to do your design work. Which ever way you go, you'll need to make sure that your design program will export the correct code for your control program.
All the Vectric programs export code to mach3 in mm or inch, as well as dealing with tool changers and rotary axis work if it's applicable to the program.

Hope that helps.
Re: Just starting out
« Reply #2 on: November 22, 2014, 02:19:12 AM »
(x =across y = up and down  z cutting depth f = feed rate makes it cut faster or slower make a square box 3 inch by 3 inch if mach 3 is in inchs )

g00 g1

g0 x0.000 y0.00 f20 (starting point)
g1 z-1  (cutting depth)
g1 x3.0 (3 inch across x)
g1 y3.0  (3 inchs y up/down)
g1 x0.00
g1 y0.00
g0 z1.5
m2 (end program)

(if mach 3 in mm)

g00 g1

g00 x0.00 y0.00 f20
g1 z -1
g1 x76.22
g1 y76.22
g1 x0.00
g1 y0.00
g0 z1.5
m2 (end program)
basic programing if you master a box you can make dovetails joint

g00 x0.00 y0.00 f20
g1 z-1.0
g1 x3.0
g1 x3.2 y3
g1 x-0.2
g1 x0.00 y0.00
m3


and a triangle would be

3 inchs 1.5inchs

g0 g1 f20 (feedrate speedto cut faster make it 200)

g1 z-1.0
g0 x0.00 y 0.00
g1 x3.0
g1 x1.5 y3.0
g1 x0.00 y0.00
m2  


(basic circle  and all text in brackets will be shown as text if its not in brackets it will stop you code)



G01 X3.0Y2.0

g02 X3.0 Y2.0 I-1.25 J0


other shapes best using a wizard makes it easy I have some helpfull videos gcode from jpeg
and shapes using wizards with link to wizard i used in how to make a pcb circuit to gcode more videos next week and some xmas gcode

hope this helps you understand a little bit
Re: Just starting out
« Reply #3 on: November 22, 2014, 04:55:08 AM »
Hi Oxymax
So its the best of two evils, learn G-code or Autocad. That's something I'll have to think about before I go any further. Actually I had a copy of Autocad 2015 and the book to go with it, but I saw a post that said you could get by on G-Code rather than learn how to use Autocad.

Hello tonywads
Thanks for the G-Code and yes it does help. I think little snippets of code are much better that a mass as it helps you understand it better. Its like learning a foreign language, best taken in bits and pieces to start with. As I said to Oxymax, I'm not sure which road to go down at this moment in time and have to mull it over before I decide Autocad or G-code.

Thank you both for your input   :-\ .

Offline ger21

*
  • *
  •  6,288 6,288
    • View Profile
    • The CNC Woodworker
Re: Just starting out
« Reply #4 on: November 22, 2014, 06:41:01 AM »
The learning curve for AutoCAD is about 10,000x steeper than learning g-code.
g-code is really quite simple. It's just XY coordinates, with codes to tell the machine how to get to those coordinates. For a router, all you really need to know is 4 basic g-codes.

G0 - move at rapid rate
G1 - move at feedrate, specified with F (F100 = 100ipm)
G2 - clockwise arc
G3 - counterclockwise arc.

There's a button in Mach3 which brings up a list of g-codes, with explanations and examples. You can also find this info in the manual, which has an entire section on g-code. If you want to get advanced, most recommend a book by Peter Smid.

Personally, I'd recommend learning CAD and CAM. Download the demo version of Vectric's V Carve Pro, and work through all the tutorials. This is the easiest method of creating complex designs, and turning them into g-code.

While it's good to understand g-code, I don't recommend hand writing it. It takes a long time, and handwriting will inevitably have errors from typing mistakes, which are unavoidable.
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
Re: Just starting out
« Reply #5 on: November 22, 2014, 11:38:35 AM »
Thanks Gerry

Your not kidding about the learning curve of Autocad. Even with Autocad 2015 for beginners it daunting to say the least. I'm inclined to go with G-Code as you say its much easier to tell the router where to go. After all that's what Autocad is doing anyway. I'll also look at Peter Smid's book.

Thanks for the heads up.

Michael.

Offline BR549

*
  •  6,916 6,916
    • View Profile
Re: Just starting out
« Reply #6 on: November 22, 2014, 01:07:00 PM »
Well Basic 2.5D CNC use of CAD is just as easy as Gcode you are ONLY dealing with  LINES and ARCS Same as Gcode.

I remember many years ago I used a  Script in Acad that would draw the object for basic Command line inputs.   Such as

Start Point, End Point for lines and Start Point, End Point, Radius for arcs  It did work very well for simple 2.d work.

Just a thought, (;-) TP
Re: Just starting out
« Reply #7 on: November 27, 2014, 11:37:28 PM »
you should build a simple box with square joints and cut a circle/triangles/stars ect.. getting them in the correct place can be a headache :) in the sides of your box. (you can do all this without a cnc and mach 3 will show it cutting you piece out) you will see mistakes like not lifting z before it goes to point B from point A also it will get you on the way to understanding g code and how it works but other cad programs and v carve a (excellent program for text and pictures and you could make your box using vcarve but that takes the fun out of it :) takes the hard work out off complicated builds.
it does help to know basic g code so you can clean up the g code generated, sometimes they have extra lines or you might have to adjust the speed or depth of the cuts



and once you have you box design when you get your cnc cut it out and you will have a nice box to store your mill and carve bits
« Last Edit: November 27, 2014, 11:40:43 PM by tonywads »

Offline RICH

*
  • *
  •  7,370 7,370
    • View Profile
Re: Just starting out
« Reply #8 on: November 28, 2014, 08:33:19 AM »
Michael,
I would suggest that you or anyone purchase the CNC Programming Handbook by Peter Smid.
It will ground you in CNC, serve as a longtime / single source reference, save you time in learning.
But.......you must read it and then you must study it......like anything else!

There are other sources of info out there for code, check the Member's Doc's as there may be a Hauss
gcode manual there.
link:
http://www.machsupport.com/forum/index.php/topic,24580.msg173809.html#msg173809

Note that there are different dialects of gcode, so, you need to look at, read, study, the Mach manual.

I echo what Gerry sugggested.

There are no shortcuts and the CNC learning curve is never ending, depending on what one wants to do.

RICH

« Last Edit: November 28, 2014, 08:43:08 AM by RICH »