G-Code

I put myself through college programming CNCs by hand (before PCs were available). Gcode is actually very simple. Basic examples that I recall:

A line of code can be made up of N,G,M,F,S,X,Y,Z,I,J,K components. Only one of each in a line. There are others that are machine/controler specific but these are the basic ones.

Nxxx, is the line number

Fxx, set feedrate X per minute.

Xxxxx, X axis command

Yxxxx, Y axis command

Zxxxx, Z axis command

Sxxxx, spindle speed

G90 places the controller in absolute coordinate space. All positional commands are relative to a single point in space, 0,0,0.

G91 places the controller in incremental coordinate space. The following move command will be done relative to the current position.

G00 the move command will be a rapid traverse to the X,Y,Z coordinates.

G01 linear move at the current programmed feed rate.

G02 clockwise arc move at the current feed rate. May require I,J,K coordinates.

G03 counter clockwise arc at the current feed rate. May require I,J,K coordinates.

M03 activate spindle clockwise

M04 activate spindle counter clockwise.

M05, spindle off

M30, end of program?

Example

N010 G90
N020 M03 G00 X1.0 Y-1.34
N030 Z-3.0
N040 G01 F10.0 X0.0 Y3.0
N050 G00 Z0
N060 X0 Y0 M05
N070 M30

I know there are some others but I think I last did this in 1982. But I think you can get the drift. Find an old CNC controller manual and there will be some good explainations.
 
Last edited:
Do a quick search for CAM software (Computer Assisted Machining) there are several packages that are quite cheap, and also have trial versions...

How many axis are in the system?
 

Similar Topics

Hi All, Someone at work has put a PLC system on my desk, that's just been taken off an idle production line. He said "It's an S7 PLC. We don't...
Replies
10
Views
260
hello, I'm a student and for my final grade I have to repare a sepro robot. the only problem I have for now is that i have an error code 3...
Replies
0
Views
37
I received an email from a student with the following code attached. This is supposed to control a floodgate system, and supposed to be written...
Replies
23
Views
788
I have a machine which is undergoing upgradation. As part of the process two SEW drives are being replaced., existing Gen B with new Gen C. The...
Replies
3
Views
204
I want to set user security level based on the value of a tag in my PLC called "ActiveUser". That tag will contain the A-P code which we use for...
Replies
6
Views
221
Back
Top Bottom