List of TouchCut 7 Standard NC Codes

<< Click to Display Table of Contents >>

Navigation:  Reference Section > Touchcut G Code Reference >

List of TouchCut 7 Standard NC Codes

Notes:

Uppercase characters specify the character part of an nc code.

Lowercase characters specify the value part of an nc code that is a parameter value.

Numbers specify the value part of an nc code that make up a command.

Square brakets [] represent an optional component.

A pipe | represents an or set of codes within an optional component.

Tool & macro text commands can not have comments or line break codes after them.

G0, G1, G2 & G3 may be ommited if it was the previous command. (eg G0X2.0; Y3.0; X-2.0; Y-3.0).

Bevel angles and rotations are always defined as absolute angles.

Bevel angles and rotations are now interpolated across the length of the segment.  To change the bevel angle or rotation without moving in the x & y use a line segment code with no x, y, i or j (eg G1A30B0; G1Y100; G1A10B-90; G1X100). Note: that also means you can drop the G1, G2 and G3 to A30B0 etc.



Tools:

 

 

 

T<p>

Select a tool based on the process p.

 

Only supported for pathing tools.

 

 

Tt[(s)]

Select tool t.

 

s = optional process name specifier for path tools.

 

 

Tt(s)

Select tool t.

 

s = required spindle name specifier for spindle/drill.

 

 

 

 

General:

 

 

 

G29Pp

Program information. p=program number.

 

 

Nn

Line number n.

 

May be prefixed before any line.

 

A number that can be associated with a process (or processes).

 

The active number at the tool on time will be used.

 

 

G0[Xx][Yy][Zz][Uu]

Rapid to x, y, z & u.

 

(z for 3D rapid sections)

 

(u for pipe cutter rotary axis )

 

 

G1[Xx][Yy][Uu][Aa][Rr]

Line segment to x, y, u, a & r

 

(u for pipe cutter rotary axis)

 

(at least one x, y, u, a or r required)

 

(must occur in a path block)

 

 

G2[Xx][Yy][Ii][Jj][Aa][Rr]

Clockwise arc segment to x, y, a & r.

 

(i & j define the center point)

 

(at least one x, y, i, j, a or r required)

 

(must occur in a path block)

 

 

G3[Xx][Yy][Ii][Jj][Aa][Rr]

Counter-clockwise arc segment to x, y, a & r.

 

(i & j define the center point)

 

(at least one x, y, i, j, a or r required)

 

(must occur in a path block)

 

 

G1Dd

Change milling depth.

 

 

G1[Xx][Yy]Dd

Change milling depth with XY movement.

 

If d value is zero the plate thickness (+ extra overshoot) is used.

 

d value is always absolute.

 

(must occur in a milling path block)

 

 

G2[Xx][Yy][Ii][Jj]Dd

Change milling depth with a clockwise arc segment.

 

If d value is zero the plate thickness (+ extra overshoot) is used.

 

d value is always absolute.

 

(must occur in a milling path block)

 

 

G3[Xx][Yy][Ii][Jj]Dd

Change milling depth with a counter-clockwise arc segment.

 

If d value is zero the plate thickness (+ extra overshoot) is used.

 

d value is always absolute.

 

(must occur in a milling path block)

 

 

G1[Xx][Yy][Zz]

3d milling line, linear interpolation mode (z +ve up).

 

A z of zero is the reference height.

 

z is incremental or absolute (based on current inc/abs state).

 

(must occur in a milling path block)

 

 

G2[Xx][Yy][Ii][Jj][Zz]

3d milling clockwise arc segment.

 

Linear interpolation mode (z +ve up).

 

A z of zero is the reference height.

 

z is incremental or absolute (based on current inc/abs state).

 

(must occur in a milling path block)

 

 

G3[Xx][Yy][Ii][Jj][Zz]

3d milling counter-clockwise arc segment.

 

Linear interpolation mode (z +ve up).

 

A z of zero is the reference height.

 

z is incremental or absolute (based on current inc/abs state).

 

(must occur in a milling path block)

 

 

G1|G2|G3...Ff            

Feedrate override, applied immediately

remains in effect until new feedrate supplied or path end

only available inside a path block

f = zero resets to default feedrate

the feed override velocity will be limited to machine maximum

feedrate feed override will ignore arc acceleration limits and

bevel speed compensation

 

 

G1|G2|G3...Pp              

Feedrate override as a percentage of default feedrate,applied

immediately remains in effect until new feedrate supplied

or path end only available inside a path block p = zero

resets to default feedrate the feed override velocity will be

limited to machine maximum feedrate feed override will

ignore arc acceleration limits and bevel speed compensation.

 

 

 

 

G4[Pp]

Dwell for p seconds.

 

(can be anywhere in a path)

 

(must occur in a path block)

 

 

L3[Ss][Rr][Aa][Hh][Ww](t)

Multiline macro text.

 

s - size (minimum 2mm)

 

r - rotation

 

a - alignment, one of:

 

0 (Top Left)

 

1 (Top Center)

 

2 (Top Right)

 

3 (Middle Left)

 

4 (Middle Center)

 

5 (Middle Right)

 

6 (Bottom Left)

 

7 (Bottom Center)

 

8 (Bottom Right)

 

h - line height spacing

 

w - wrap width

 

t - text

 

\p or "\P" denotes a line break.

 

\\ denotes "\" else single "\" ignored.

 

 

 

 

If outside of a path block:

 

 

 

G40

No kerf.

 

(default)

 

(must occur out of a path block)

 

 

G41[D21|D22]

Left kerf, with optional internal / external specifier.

 

(D21=external, D22=internal)

 

(must occur out of a path block)

 

 

G42[D21|D22]

Right kerf, with optional internal / external specifier.

 

(D21=external, D22=internal)

 

(must occur out of a path block)

 

 

 

 

 

 

 

 

G40

No kerf. (temporary override)

 

 

G41

Left kerf. (temporary override)

 

 

G42

Right kerf. (temporary override)

 

 

G57Rr

Start of subroutine r. (positive integer)

 

 

G58

End of subroutine.

 

 

G59RrCc

Execute subroutine r, c times.

 

Notes: subroutines can be nested, but not recursive



G52[Xx][Yy][Zz]...

Explicit Local Coordinate System (LCS) Offset

 

xyz defines the offset from the plate coordinate system,

Each G52 cancels any previous G52.

 

Note: z +ve is up.  Using a z value will also offset the z-ref position, temporarily changing the the top of the plate reference point for tool start, rapids etc.

 

The X,Y,Z values are offsets to the starting plate coordinate system, Incremental or Absolute mode has no effect on the behaviour of this function.

 

For the LCS Z Offset to be useful, the machine should be using Z-Reference.  LCS XY offsets can be applied without a Z offset.

 

G52 by itself resets any LCS offset.

 

It is an error to use G52 inside a process block.



 

subroutines must be defined before they are called.

 

 

G70

Use imperial units.

 

 

G71

Use metric units. (default)

 

 

G90

Use absolute mode. (default)

 

 

G91

Use incremental mode.

 

 

M0[Uu][(m)]

Operator message m.

 

Note: pops up a message and stops the machine

 

to allow the operator to perform some

 

operation and then smart start it again.

 

Will also give option to just continue.

If Uu is specified the user output u (1-10) will be turned on for the

duration the message is shown on screen.

 

 

M20[(material-thickness)]

Select material-thickness for the program.

 

Thickness value based on G70/G71 as to whether

 

it is interpreted as metric or imperial.

 

Zero thickness will not be accepted.

 

e.g. M20(MS-20.0) = Mild Steel @ 20.0mm.

 

Note: only one M20 will be accepted per program and

 

will be used for the whole program,

 

regardless of where it is situated.

 

M20 also cancels rotary axis substitution for macro codes

 

 

M21[ODod][THKthk][AXISaxis][(material-thickness)]

Extended version of M20 for pipe cutter mode with a rotary chuck.

Need to supply additionally the outer diameter and wall thickness

(same as material thickness) Also need to supply AXIS that is

replaced by the chuck- usually 1 meaning Y Axis, for a pipe cutter

whose rotary axis is parallel to the long (X) axis.

 

select material-thickness for the program and set up rotary axis

substitution for macro codes (for pipe cutting)

 

od - outer diameter of pipe (default = 0, disabled)

if specified, must be > 0

must be specified in first call

 

thk - thickness of pipe (default = currently selected material thickness)

1 = no substitution (same as calling M20)

0 = X axis

1 = Y axis

 

 

M3

Tool off.

 

Optional for spindle processes.

 

If specified, can indicate spindle should raise fully.

 

 

M4

Cut till arc off ( Tower machines only)

for plasma processes

once an M4 is reached, the tool (and path) should turn off

when arc has been lost on all active carriages

if the M3 is reached (end of path) before this occurs then

raise an error as this will indicate that the plate has

not been fully severed

 

 

M30[Aa][Rr]

Tool on for standard pathing tools (not milling).

 

Note: if beveling, height sensing and piercing will be performed

 

with the tool vertical. It will also be pre-rotated.

 

Initial angle/rotation can be specified here, else use

 

a line segment code with no x or y components.

 

Bevels will rotate to their next required position

 

during rapiding.

 

 

M30[Dd]

Tool on. (spindles)

 

d defines a drill depth, no depth=drill through.

 

 

M32Dd

Tool on. (routers)

 

d defines the milling depth (+ve down).

 

If d value is zero the plate thickness (+ extra overshoot) is used.

 

 

M32Zz

Tool on. (routers, 3d linear interpolation mode)

 

z defines the milling height (+ve up).

 

A z of zero is the reference height.

 

 

M33[Aa][Rr]

Tool on (3D waterjet paths),

note:no height sensing will be performed

initial angle/rotation should be specified here else zero angle / rotation

is assumed the bevel will rotate to this position during rapiding

Only G1 codes currently supported

Any kerf offset will be performed from the plane described by the

segment direction and the torch vector

- if the initial and final torch vectors are different a straight line will be extrapolated between them

- the shortest distance between the two segments will be used at the

corners

- the angle/rotation will be adjusted proportionally across this join

filler, segments may be extended by up to one kerf length to try to

find the shortest join path.

Rotation angles are defined as a normal to the path

- 0° when the normal is pointing in the x direction

- +ve counter-clockwise)

Bevel angles are defined zero with the torch upright

- +ve counter-clockwise when looking at the front

- limited to ±90°

 

 

M37[Dd[Xx][Yy]]              

Hypertherm True Hole™ macro code (for Hypertherm HPR XD

(auto gas consoles), Where d specifies the required hole diameter.

Optional X/Y params turn it into a True Slot, where the current point

is the center of the start arc and the X/Y position indicates the center

of the end arc.

Note: the XY slot offset does not affect the current position of the

program.

If d, x & y are not specified (ie only M37) then it is a True Hole™

path start code.

True Hole™ paths require 1 segment for the leadin and subsequent       segments to form a closed path.

True Hole™ paths automatically add their own leadout

True Hole™ paths only support line and arc g-codes

 

 

M38[Dd]Ee[Cc]                

Spindle Chamfer macro code (for spindles with chamfer bits),

where

d specifies the nominal hole diameter

(required for chamfer bits, but not snap chamfer bits)

e specifies the edges to chamfer (1 = Top, 2 = Bottom, 3 = Top &

Bottom)

c specifies the chamfer width

(required for chamfer bits, but not snap chamfer bits)

Use only with a chamfer-mill or a snap-chamfer, if using a standard

chamfer too just feed it to depth as you would a normal drill, ie use

M30Dd. See notes on Chamfering

 

 

M39DIAdia[Dd|Zz][Hh][Pp]

Spindle ThreadMill macro code (for spindles with threadmill bits),

where

dia specifies the outer thread diameter

d specifies the depth to mill to in relation to the surface (+ve down)

(where 0 = full through + overshoot)

z specifies the depth to drill to in relation to the surface (+ve up)

if neither d or z is specified the it will mill with d=0 (ie full through)

h specified thread type 1 = right hand thread (default), -1 = left hand

thread p pitch override. This should only be used with single tooth

bits.

 

 

M39DIAdia[Dd|Zz][Hh]Pp

Spindle HelicalMill macro code (for spindles with mill bits)

 

This will start the helical move at feed from height above the plate

and then do a complete pass at depth after completing the helical

section.

 

where

 

dia specifies the outer hole diameter

 

d specifies the depth to mill to in releation to the surface (+ve down)

(where 0 = full through + overshoot)

 

z specifies the depth to mill to in releation to the surface (+ve up)

 

if neither d or z is specified the it will mill with d=0 (ie full through)

 

h specified direction type 1 = clockwise (default), -1 =

counter-clockwise

 

p pitch. Depth per pass

 

 

M40Nn[Xx|Yy][Ff|Cc][MA(1|0)]

Space the boxes where n=1..8 & x|y = spacing.

 

If n<>1 then x|y is required.

 

Note: if boxes are spaced, then limit

 

the orientations of the program to 180°

 

(or 90 and 270 if x|y oposite to machine setup).

 

x and y support index notation, if no index is used then an index

of zero is assumed and all boxes get the same spacing.

An index between 2 & 8 sets the spacing between

individual boxes.

 

F & C enable Fixed and Center Line mirror banding respectively.

 

MA1 enables multi-axis mode (if there is more than one carriage)

 

MA0 (default) disables multi-axis mode

 

Fixed Line:

 

Fixed line can be used with either 2 or 3 boxes.

 

f defines the fixed mirror line for box 2.

 

If 3 boxes are spaced, box 3 is mirrored to box 1.

 

All boxes must be motor driven

 

because box 2 is fixed to the mirror line it is not

 

able to be adjusted for kerf. The box 1 path position

 

should allow for the kerf within the nc code, or enter

 

double the normal kerf value within the tool process

 

setting.

 

Center Line:

 

Center line can be used with an even number of boxes.

 

c defines the mirror line between boxes 1 and 2.

 

Subsequent mirror lines (eg 4 boxes spaced) are calculated

 

as c + (2 * x|y).

 

 

M40Nn[Xx|Yy]MA1

Enable multiaxis mode where the boxes ordinate positions in the

spaced axis are individually controlled.

eg G1 X200 Y[1]300 Y[2]400

 

 

M41

Unspace boxes and activate box 1.

 

(also deactivates mirror banding)

 

 

M50

Begin 3D section (3D rapids, full retract)

 

 

M51

End 3D section

 

 

M60

Enable height control.

 

Note: on by default at the start of each process.

 

 

M61

Disable height control.

 

 

M92[Aa]

Enable tangent following (bevel/knife axis b).

 

Tip bevel head to angle a and align B with path tangent.

 

 

M93

Disable tangent following (bevel/knife axis b).

 

Note: tangent following is disabled automatically

 

at the end of a process.

 

 

M100

Select the base (non-delegate process)

M101-M108

select process delegate 1 through to 8

An HPR plasma process can have up to 8 delegates

Selecting 1 of the delegates uses that tool process instead

One of the main uses is to link a related marking process to a

cutting process and swap between them

 

 

M110

Reset all user outputs (1 thru 10)

M111Uu

Set user output u

M112Uu

Reset user output u

M151

Activate carriage 1

M15n

Activate carriage n

M161

Deactivate carriage 1

M16n

Deactivate carriage n

Modified codes:

 

 

 

M30[Aa][Rr]

Was M30.

 

 

M30[Dd]

Was M30[(s)].

 

 

M40Nn[Xx|Yy][Cc]

Mirror banding parameter added.

 

 

M41

Now also deactivates mirror banding.

 

 

M92[Aa]

Used to only be placed before the M30, can now be placed

 

before the M30 if tangent following is to be enabled

 

immediately, or within a path block if tangent following

 

is not enabled at the time.

 

 

M93

Used to only be placed after the M3, can now be placed

 

after the M3 or before the M3 if tangent following

 

is turned off within a path block. M3 will now implicitly

 

disable tangent following if it was active.

 

 

M32Dd

2.5d milling / routering.

 

d defines the milling depth (+ve down).

 

If d value is zero the plate thickness (+ extra overshoot) is used.

 

 

M32Zz

3d milling / routering via linear interpolation mode.

 

 

 

 

New codes:

 

 

 

L3[Ss][Rr][Aa][Hh][Ww][Cc](t)

Multiline macro text code replacing L0, L1 & L2.

 

The new Cc parameter introduced in PCNE 4.134.28 is used to enable the option to print Data Matrix or QR Codes instead of Macro text

 

 

M20(material-thickness)

Select material-thickness for the program.

 

 

M60 & M61

Enable/disable height control, advanced command to

 

temporarily disable height control to avoid crashing

 

if cutting across previous paths or open space.

 

 

 

 

Obsolete but still supported codes:

 

 

L0t

Singleline macro text.

 

 

L1s

Set macro text size to s (minimum 2mm).

 

 

L2r

Set macro text angle to r.

 

 

 

 

Obsolete and no longer supported codes:

 

 

M31

Drilling tool on (not spindle) with pecking.