The Shop > Electronics & IC Programing
Cheap Cnc Controls.
vtsteam:
Glad it helped Anthony. Since then I've thought of a couple more things.
First, the reason Dawai's system seems complicated in description is because he is building some of the basic components I listed from scratch. Essentially he's building a replacement for the computer, in fact.
You don't have to do that. you can just go with pre-built black boxes and a regular older computer. In his system one of the main building blocks uses a microprocessor which also needs control programming. It's very cool, and interesting to hardware hackers (me included), but again, not something you would have to do at all.
As far as operating your machine, G-code shouldn't be frightening. It is actually very simple, but yes usually a program writes the G-code for you nowadays. Usually it is CAM software which translates what you draw in CAD to the G-code needed to do the work by the machine.
Just briefly, G-code is a simple list of commands, like "move to point x,y z". On your mill, without CNC, you would do the same thing by cranking handles to get to a position you want to plunge in at.
That's all it is. simple list of mechanical instructions. It may then say "move to Z - 3.000" That would mean lower the mill head 3mm (and presumably start cutting).
Say you wanted to move to x=1, Y=2 and Z=4. And then plunge into the material to Z= -3. Here's what the actual G-code for those two instructions might look like:
G00 X1.000 Y2.000 Z4.000
G01 Z-3.000
G00 means "move as fast as you can to this position"
G01 means "move at the feed rate to this position"
X, Y and Z just tell what axis to move
The feed rate was set earlier in your program by a different G-code -- not shown. You can change it at any time.
That's the basics. Obviously there are a LOT of available G-codes. Some for cutting circles, or peck drilling, or tapping, or changing tools, or changing feed rates or changing from metric to imperial units, etc, etc. But all undertandable if you just look at it this way -- it's just a list of commands. Of all the kinds of things you want to do.
Sometimes I think the easiest way to learn it is NOT to try to follow a course of study, but just to have your CAM program generate a simple G-code program for a simple part, and just read through the program, and look up the G-codes as you go along. Just as if you were the mill and you needed to know what way to move. You will quickly pick up the basics and probably have some of the most common G-codes memorized in a day. And that's probably all you'll need for quite some time -- the rest you'll pick up along the way. Don't let giant dictionaries of G-codes snow you -- you don't need to know every command and a lot of the jargon for an exam. You just want to learn how to use your machine for practical personal uses -- the rest will follow.
PS, if you want a simple free CAD program linked with a simple free CAM G-code output capability, try SketchUp with Sketch-U-Cam installed.
Best to first go to the Sketchucam website, http://sketchucam.jimdo.com/ before getting Sketchup from Trimble -- that way you will have enough info to know what you want and how to install and configure it.
geoff_p:
Some years ago, I built CNC router from scratch - balanced on top of an old twin-tub washing-machine, it used 5/8 UNC threaded rod for axis-movement, each driven by a 200 oz-inch stepper, and controlled by Mach 2 (prior to Mach 3 coming out.) It cut wood and some plastics quite well - though the noise of the router-motor was appalling.
Nowadays my PC doesn't have a printer-port and I can't justify the cost of bits-n-bobs to go USB from Mach 3, so I use GRBL -> Arduino (Uno) -> A4988 stepper motor driver (2Amps max) -> 200 Oz-inch steppers.
G-code is fed down a USB-cable from grbl-controller, on the PC, to GRBL on the Arduino.
G-code is written by hand in a text-editor: as VT says, it is not complicated - there are only four "codes" you will use most of the time, Plus a couple for set-up and called just once per file. Everything within () brackets is ignored, but it does help Me follow what I have written.
Thus:
File name: extra-base-with-bolt-lugs.O-R.nc
(Extra base for Twiss-engine, with bolt-lugs)
(Drg: "extra-base-with-bolt-lugs.xar")
(This file cuts around the OUTSIDE)
(same file-name + .I.nc for the INSIDE)
G21 G90
(drawing assumes 1/2" ~ 1/4" taper cutter at 1/2-depth i.e. 9mm)
(Start at "A") (A label on my drawing)
G92 x9.9 y0 (G92 sets the machine starting point. Normally you would use X0 Y0)
F150 (Feed-rate or cutting speed.) (This is "remembered" until YOU change it.)
(Go To "B")
G3 x9.8 y19.2 R9.61 (An anti-clockwise arc, ending at X9.8, Y19.2, with a radius of 9.61)
(Go To "C")
G1 x10 y19.2 (go to x10 y18,2 at cutting speed - that F150 we saw earlier)
(Go To "D")
G1 x10 y50.5
And So On .....
By the way, ALL CAM files are merely TEXT-files but often with deliberately confusing file-extensions - .nc; .tap; etc etc
The .xar file referred to is a 2D vector-drawing package. It does NOT output CAD/CAM stuff.
And if I need to check my G-codes, I simply load the file into Mach 3 for viewing. It will often show-up the error(s) of my ways!
Geoff
Thailand.
vtsteam:
Nice touch Geoff adding comments to your code throughout with parenthesis (). :thumbup:
Dawai:
PLUS, timing, as the "micro seconds" tick off stepping a motor in Windows, Microslop decides to "go off" and check to see if there are new Adobe updates it can install or?? what ever it does..
In your ears.. you can hear the bridgeport "stutter", the high pitched scream of a stepper (not on the bp) hiccups..
THE arduino is not saddled with so many issues to tend to at once, Look in your system monitor and see how many processes are running at once, in this machine is 72. To make Mach3 efficient you have to "strip it" down to minimal functions. Fine unless you use the computer for design and other functions too.. as I do.
3.1 Dos was better for somethings.. old turbocnc was written in Turbo Pascal, you lose the wizards of mach3, and the mouse, and ... I ran mixer machines running off computers for "weeks without turning them off".. now the blue screen of death will show up long before that. I'd like to find one of them 50lb At Dos computers that still worked.. I've tried Qdos, the linux imitator dos, etc..
MY newest creation here is a cnc plasma table, servos, gearboxes, chain drive.. running on "plastic trolley wheels" on inverted angle iron.. I started out big, now have shrunk it down to 7'6" x 5" x 10".. it may get a router, drill, tapper, and eventually laser. Stepper motors are much easier to "tune" in.. servos "hunt" all around where you want them to go. It really needs a dual trace o-scope to make them right where you can see input and response waves.
philf:
--- Quote from: Dawai on September 03, 2014, 04:07:03 PM ---PLUS, timing, as the "micro seconds" tick off stepping a motor in Windows, Microslop decides to "go off" and check to see if there are new Adobe updates it can install or?? what ever it does........ To make Mach3 efficient you have to "strip it" down to minimal functions. Fine unless you use the computer for design and other functions too.. as I do.
--- End quote ---
My CNC runs fine on a Shuttle PC with a minimum install of XP and Mach3. It cost all of £23 delivered + a cheap 64Mb Video card. (Video with shared memory can cause problems.) There's no internet connection and no network connection - I transfer Gcode files from my laptop where I have my CAD and CAM programs with a USB memory stick.
I've got rid of Adobe Reader on all my computers primarily for the reason you state. A much better reader for me is Nitro Reader - it will even write pdfs from any program that has a print function. e.g. It works perfectly with Autocad. It also reads pdfs which point-blank refuse to open with Adobe Reader!
CCleaner from Piriform is one thing I couldn't do without. It allows you to easily see what Windows wants to Start Up and you can disable anything you deem to be unnecessary (which, in fact, is nearly everything).
You also need to disable screensavers and any auto sleep functions.
Phil.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version