Do you have to invent your own CNC language? I know it is pretty simple overall, but just wondered if there is a standard.
here is a CNC program I had created in eagle to do a small circuit board, this is just the milling file, normally drill files are separate....LIKE ANY COMPUTER-BASED system, CNC has a protocol -- that is, the way you have to program it to do its work. The primary protocol is CNC (Computer Numerical Control) language. CNC language is often specific to a particular machine from a particular manufacturer, but some elements are constant. For example, any line or block (the two terms are interchangeable) of program that appears on a display screen consists of six "words." Following is an example of a line of a program:
N01 - the line (block) number
G02 - the preparatory code
X3.0 - movement in the X-axis
Z4.5 - movement in the Z-axis
F.5 - feed speed
M30 - miscellaneous code
G codes, and to a certain extent M codes, are the foundation of CNC programming. G codes prepare and introduce certain operations to occur on the machine. They are a two-digit number (00 to 99) preceded by the word address letter "G." This G code determines the mode of operation for the machine. There have been attempts to standardize G codes among manufacturers and many are common to some degree, but many companies still use proprietary codes that are particular to their machines. Regardless of manufacturer, G codes are used to perform the following four operations:
1. Select a measurement system (English or metric);
2. Program for compensation and differences in tool lengths and diameters;
3. Select a movement system, i.e., rapid traverse or programmed feed rate;
4. Select a preset preset Cardiac pacing A parameter of a pacemaker that is programmed permanently when manufactured sequence of events known as canned cycles.
A few G codes that seem to be standard across brands of CNC equipment are G00 (rapid traverse for point-to-point positioning), G01 Linear interpolation, G02 (circular interpolation)
M (for miscellaneous) codes act as on/off switches for the functions they control. They vary widely between different machines (even more than G codes) because the number of programmable con trolled switching functions vary widely from machine to machine. A few of the more common ones are M00 (program stop), M03 Spindle control ( Like G codes, M codes are also modal and nonmodal. If a machine has a particular need, for example, to turn vacuum on and off, an M code will be included in its programming protocol.
At a bare minimum, any CNC machine's programming codes should comply with ANSI/EIA standard RS-274-D; that is:
A = Rotation about the X axis
B = Rotation about the Y axis Y axis,
n See axis, Y.
C = Rotation about the Z axis
F = Feed rate commands
G = Preparatory functions
I = Circular interpolation X-axis offset
J = Circular interpolation Y-axis offset
K = Circular interpolation Z-axis offset
M = Miscellaneous commands
N = Sequence number
O = Sequence number for the secondary axis
R = Arc radius
S = Spindle speed
T = Tool number
X = X-axis data
Y = Y-axis data
Z = Z-axis data
Taken together, these codes tell the machine what to do, but not where to go. That function is left to the machine axes and coordinates.
( This file generated 9/11/2007 09:46:24a ) ( T01 0.023622 )
( T02 0.032000 )
( T03 0.040000 )
G20
G90
M05
G00 X0.0000 Y0.0000 Z1.0000
M06 T01 ; 0.0236
G00 Z0.1250
M03
G04 P3.000000
G00 Z0.125000
G00 X-0.1750 Y0.1000
G01 Z0.0000 F8.00
G01 Z0.125000
(R0.1250 P3.000000)
(G00 Z0.125000)
G00 X-0.1750 Y0.4500
G01 Z0.000000
G01 Z0.125000
M05
G00 X0.0000 Y0.0000 Z1.0000
M06 T02 ; 0.0320
G00 Z0.1250
M03
G04 P3.000000
G00 Z0.125000
G00 X-0.2500 Y0.3250
G01 Z0.0000 F8.00
G01 Z0.125000
(R0.1250 P3.000000)
(G00 Z0.125000)
G00 X-0.2500 Y0.4250
G01 Z0.000000
G01 Z0.125000
(G00 Z0.125000)
G00 X-0.2750 Y0.2250
G01 Z0.000000
G01 Z0.125000
(G00 Z0.125000)
G00 X-0.5250 Y0.1000
G01 Z0.000000
G01 Z0.125000
(G00 Z0.125000)
G00 X-0.6750 Y0.2250
G01 Z0.000000
G01 Z0.125000
(G00 Z0.125000)
G00 X-0.7250 Y0.1000
G01 Z0.000000
G01 Z0.125000
M05
G00 X0.0000 Y0.0000 Z1.0000
M06 T03 ; 0.0400
G00 Z0.1250
M03
G04 P3.000000
G00 Z0.125000
G00 X-0.4250 Y0.3500
G01 Z0.0000 F8.00
G01 Z0.125000
(R0.1250 P3.000000)
(G00 Z0.125000)
G00 X-1.1250 Y0.3500
G01 Z0.000000
G01 Z0.125000
(File Footer)
T01
G00 Z0.0620
M05
M02
Holy Crap!NEVER HEAT THINNER WHAT SO EVER, AND NEVER PANIC AROUND A FIRE.
hahahahahahahaha!!!no - more - hair.
Please stop...Yeah... You should of been there. He had a raccoon mask of burn around his eyes (Not to bad). So for the next hour, we drove around the horse track in a '69 Mustang he was rebuilding that had no windshield, so the wind would hit his face, cooling him. We were waiting for his parents to go out so we could get in the house without them freaking out over their sons newly and oddly crafted hairdo.
B Morse.
Regarding the engraver, what type of μC will I need to control all the axis from my PC.
Can you give me a heads up so that I can order it before hand. It's OK if the PIC is big, The bigger the better for later improvements.
I am checking out the screw threads that you sent me, I think I will buy them, haven't decided yet.
I'll be posting the stepper and the drivers I have real soon.
Before that I need to get some solder. I ran out just now.