Specification of the NCX elements
All elements of the NCX language at a glance: keywords, addresses, values, examples and G-code equivalents – from PROGRAM to FEEDRATE_TYPE and COMM.
Each element of the NCX language is written as one cell of the form [KEYWORD:ADDRESS=VALUE]: the keyword, an optional address and the value. The following overview documents all elements with their addresses, values and examples; where available, the corresponding conventional G or M command is given as well. The underlying grammar is described in the Definition.
Program
PROGRAM – Program
Defines the header data of an NC program: name, unit of measurement and an optional comment.
| Keyword | PROGRAM |
|---|---|
| Address |
|
| Values |
|
| Example | PROGRAM:NAME=5544 |
Motion
INTERPO – Interpolation
Sets the interpolation mode of the following movement: rapid traverse, feed motion, or a clockwise or counterclockwise arc.
| Keyword | INTERPO |
|---|---|
| Values |
|
| Example | INTERPO=ARC,CCW |
| Equivalent | G00/G01/G02/G03 |
CENTER – Arc center
Specifies the distance from the arc start point to the arc center for circular interpolation – one cell per axis.
| Keyword | CENTER |
|---|---|
| Address |
|
| Values |
|
| Example | CENTER:X=20 |
| Equivalent | I/J/K |
GOTO – Movement
Moves the specified axis to the target position. The type of movement is set beforehand with INTERPO; one cell is written per axis.
| Keyword | GOTO |
|---|---|
| Address |
|
| Values |
|
| Example | GOTO:X=-22.543 |
WORKPLANE – Working plane
Selects the working plane. The axis after the plus sign is the tool axis perpendicular to the plane.
| Keyword | WORKPLANE |
|---|---|
| Values |
|
| Example | WORKPLANE=XY+Z |
| Equivalent | G17/G18/G19 |
Compensation & offset
COMPENSATION – Radius compensation
Switches tool radius compensation on to the left or right of the programmed contour, or off.
| Keyword | COMPENSATION |
|---|---|
| Values |
|
| Example | COMPENSATION=OFF |
| Equivalent | G41/G42/G40 |
OFFSET – Tool offset
Calls a compensation value (offset) for tool length or tool diameter by its number.
| Keyword | OFFSET |
|---|---|
| Address |
|
| Values |
|
| Example | OFFSET:LEN=10 |
| Equivalent | H/D word |
Tools
TOOL_CALL – Tool call
Loads the specified tool into the spindle.
| Keyword | TOOL_CALL |
|---|---|
| Values |
|
| Example | TOOL_CALL=12 |
| Equivalent | M06 |
TOOL_SELECT – Tool preselection
Preselects the next tool in the magazine without loading it.
| Keyword | TOOL_SELECT |
|---|---|
| Values |
|
| Example | TOOL_SELECT=12 |
| Equivalent | T word |
Canned cycles
CYCLE – Canned cycle
Activates a canned cycle such as drilling, tapping or reaming; STOP cancels the active cycle.
| Keyword | CYCLE |
|---|---|
| Values |
|
| Example | CYCLE=DRILL,DEEP_HOLE |
| Equivalent | G81–G85/G80 |
Machine functions
MACHINE_FUNCTION – Machine function
Switches a control-specific machine function via its M-code number.
| Keyword | MACHINE_FUNCTION |
|---|---|
| Values |
|
| Example | MACHINE_FUNCTION=56 |
| Equivalent | M word |
SPINDLE – Spindle
Turns the spindle on (clockwise or counterclockwise) or off. The address selects the spindle number.
| Keyword | SPINDLE |
|---|---|
| Address |
|
| Values |
|
| Example | SPINDLE:1=CCW |
| Equivalent | M03/M04/M05 |
RPM – Spindle speed
Specifies the spindle speed in revolutions per minute.
| Keyword | RPM |
|---|---|
| Values |
|
| Example | RPM=1200 |
| Equivalent | S word |
Work offset & shift
ORIGIN – Datum
Activates a stored work offset (datum) by its number.
| Keyword | ORIGIN |
|---|---|
| Values |
|
| Example | ORIGIN=1 |
| Equivalent | G54–G59 |
MATRIX – Datum shift
Shifts the active datum by the specified amount along an axis.
| Keyword | MATRIX |
|---|---|
| Address |
|
| Values |
|
| Example | MATRIX:SHIFT_X=33.5 |
| Equivalent | G52/TRANS |
Feed
FEEDRATE – Feed rate
Specifies the feed rate for the following cutting movements.
| Keyword | FEEDRATE |
|---|---|
| Values |
|
| Example | FEEDRATE=200 |
| Equivalent | F word |
FEEDRATE_TYPE – Feed rate type
Defines how the feed rate value is interpreted: per minute, per revolution or as feed per tooth.
| Keyword | FEEDRATE_TYPE |
|---|---|
| Values |
|
| Example | FEEDRATE_TYPE=MIN |
| Equivalent | G94/G95 |
Comment
COMM – Comment
Inserts a comment into the program. Spaces are not permitted – join words with underscores instead.
| Keyword | COMM |
|---|---|
| Values |
|
| Example | COMM=PLANFRAESEN |