CNC Programming

Home Model Engine Machinist Forum

Help Support Home Model Engine Machinist Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

cfellows

Well-Known Member
Project of the Month Winner
Joined
Aug 25, 2007
Messages
3,890
Reaction score
715
As I recall, there are alternatives to 3D CAD or modelling software for programming CNC machines. How difficult is it to program the stepper movement directly using Basic or some CNC programming language? Anybody on the board have any experience with this?

Chuck
 
G-code is the 'assembly language' of CNC-- commands like: "Move to X32.1 Y12.6 Z3.2 at a speed of 7" (actual code: G01 X32.1 Y12.6 Z3.2 F7) and "drill a hole at X17.1 Y8.9 to a depth 1 at a feed of 7" (something about like: G81 X17.1 Y8.9 Z-1 F7). A quick Google on 'G-code' will turn up a lot.

Hand writing that isn't too bad. It's tedious for large parts but I've seen some very complex parts made that way, and I use it to do simple parts on my little CNC reasonably frequently-- things that I don't feel like drawing up in CAD and running through the system-- often they'd probably be easier to do by twiddling the knobs.. if only it had them.

The "Idea-to-Part" CNC steps at a very high level consist of :

  • 1 - CAD is where you draw your part in circles and lines and piled up blocks and so on. The CAD program saves that into a 'model file'. Most of the time, the model files are portable-- you can take them from most any CAD system and load them into most any CAM program or another CAD program.
  • 2 - CAM is where that model file gets converted into G-code programs-- those are created particular to your machine, tools, speeds and so on. You can move G-code programs from machine to machine, and in theory the tool movements will be the same, but there can be pitfalls, the less alike the machines are, the more traps there are.
  • 3 - The machine controller then converts the G-codes into motor movements. Even if those were saved somewhere, they'd be extremely specific to the machine itself.

You can hand-create model files and skip step 1 if you want to, but most people don't bother.
You can also hand-create G-code and skip steps 1 and 2. That's what I refer to above
I don't know if you can skip step 3 and just drive the motors around. Maybe MACH has a feature for that, but I don't know anybody that's done it that wasn't writing their own controller software.
 
cfellows said:
As I recall, there are alternatives to 3D CAD or modelling software for programming CNC machines. How difficult is it to program the stepper movement directly using Basic or some CNC programming language? Anybody on the board have any experience with this?

Chuck
I have some experience from a homeshop standpoint with CNC routing. Simple moves, point A to point B can easily be writtten in any text editor. More than a few simple moves though becomes very tedious and screw-ups happen far too easily.

For 2D, most any CAD .dxf file can be easily converted to G-Code with ACEConverter, a free download.

Milton

3D is another ballgame alltogether and to me would be impossible to hand write code for. I'm afraid the only real solution for that is to learn 3D CAD and invest in a decent CAM program.
 
I run a CNC everyday for a paycheck, but it is Mazak Mazatrol programing.

It took me a year to get comfortable with the user friendly Mazatrol.

G-Code confuses me to death! LOL

Rick
 
Anyone know of cheap/free G-Code simulators that let you plot the movements graphically on the screen without actually having a CNC hookup?

Chuck
 
Punch "free G-code simulator" into google.. ;) I've seen a couple that are reported to be good, but I can't remember which they were.

I've not tried the simulator in AutoEditNC (it has one), but grab a copy of it in any case-- it's got some good tools I use all the time-- basic pocketing routines, speed/feed calculator, and a good assisted G-code section.




 

Latest posts

Back
Top