
[title] Supported operations on expressions
[path] G-code/Macro programming/

# Unary operations

| **Operation** | **Description**                                           |
| ------------- | --------------------------------------------------------- |
| abs           | Absolute Value                                            |
| acos          | Arc cosine                                                |
| asin          | Arc sine                                                  |
| atan\[y]\[x]  | Arc tangent                                               |
| cos           | Cosine                                                    |
| exp           | e raised to                                               |
| fix           | Round down                                                |
| fup           | Round up                                                  |
| int           | Integer part                                              |
| ln            | Natural log of                                            |
| round         | Round                                                     |
| sin           | Sine                                                      |
| sqrt          | Square root                                               |
| tan           | tangent                                                   |
| not           | Logical not                                               |
| ResetModulo   |  \[A\|B\|C]  reset a rotation axis to its modulo position |

# Binary Operations

| **Operation** | **Description**          |
| ------------- | ------------------------ |
| /             | Divided by               |
| mod           | Modulo                   |
| \*\*          | Power                    |
| \*            | Times                    |
| and           | Logic AND                |
| xor           | Logic exclusive OR       |
| -             | Minus                    |
| or            | logic nonexclusive OR    |
| +             | Plus                     |
| >             | Greater then             |
| >=            | Greater than or equeal   |
| \<            | Less then                |
| \<=           | Less than or equal       |
| ==            | Is equel                 |
| \<>           | Not equeal               |
| band          | Bitwise AND              |
| bxor          | Bitwise exclusive OR     |
| bor           | Bitwise nonexeclusive OR |
| \<\<          | Shift left               |
| >>            | Shift right              |

# Example

This example drills holes at a circle with a radius of 10, each 30 degrees. The code that performs this is put in a subroutine, which can be called as many times as needed in the main program.&#x20;

:::BlockQuote
sub do\_circle\_holes &#x20;
\#100=0
g0 z1 x0 y0&#x20;
while \[#100 \<> 360]   &#x20;
&#x20;  \#102 = \[10 \* sin\[#100]]   &#x20;
&#x20;  \#103 = \[10 \* cos\[#100]]   &#x20;
&#x20;  g0 x\[#103] y\[#102]     &#x20;
&#x20;  g1 z-1   &#x20;
&#x20;  g1 z1  &#x20;
&#x20;  \#100 = \[#100 + 30]   &#x20;
&#x20;  if \[#100 == 360]     &#x20;
&#x20;     msg "Done"  &#x20;
&#x20;  else     &#x20;
&#x20;     msg "processing at angle "#100  &#x20;
&#x20;  endif &#x20;
endwhile  &#x20;

endsub &#x20;

gosub do\_circle\_holes&#x20;

M30
:::


[title] M0, M1, M2, M30, M60 (Program Stopping and Ending)
[path] G-code/Supported M-codes/

To temporarily halt a running program, program `M0`. If a program is stopped by an `M0`, pressing the cycle start button will restart the program at the following line, so the program will continue.

To optionally halt a program when the stopM1 feature is enabled in the user interface, please use the `M1` command.

Command `M30` results in:

- The selected plane is set to CANON\_PLANE\_XY (like `G17`).
- Distance mode is set to MODE\_ABSOLUTE (like `G90`).
- The feed rate mode is set to UNITS\_PER\_MINUTE (like `G94`).
- Feed and speed overrides are set to ON (like `M48`).
- Cutter compensation is turned off (like `G40`).
- The spindle is stopped (like `M5`).
- The current motion mode is set to G\_1 (like `G1`).
- Coolants are turned off (like `M9`).
- The program is rewinded to the first line, ready for the next start.
- All 3D printer heating OFF.

Note that the coordinate systems are not reset when M30 is issued.

Program `M60` instead of `M30` if the spindle and coolants should remain on, which is useful with nesting.

### ****


[title] System parameters/Variables
[path] G-code/Language standard/

In the RS274/NGC language view, a machining center maintains 5999 numerical parameters. They can be accessed by #1 .. #5999. The specific parameters with a dedicated function are listed in the table below. Other parameters in the range of 1..5999 are free to use in your G-Code program. Some of them have a special function and are read-only; see the table below:

\**parameters in italics are read-only*

| Parameter Number                               | Purpose                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| ---------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| *1 - 26\**                                     | Used for **parameters&#x20;**&#x77;hen overriding m-functions.<br />In the g-code there is e.g.&#xA;`M999 X100 S1000` <br />And you have in your macro.cnc:<br />:::BlockQuote
Sub m999&#xA;    msg “this is my m999 X=”#24” S=”#19&#xA;Endsub
:::<br />Inside the subroutine, the given X and S parameters are at #24 and #19<br />#1-#26 = A – Z parameter value.<br />Values are negative -1e10 if not provided with `m999` in this example. |
| 27 - 4999                                      | **Free to use**, note that 4995 – 4999 are used by the tool length measurement function under user button 2.<br />`Z#4996` safe height for tool measurement above the fixed tool setter.&#xA;`x#4997` `y#4998` fixed tool setter position.&#xA;`z#4999` chuck height, or zero length tool height, chuck just touches the fixed tool setter at this height.&#xA;`Z#4995` is used for the tool setter height for zeroing Z under user button 1.   |
| 4000 - 4999                                    | Free to use, **persistent**, see above some of these are used by tool length measurement and zeroing.                                                                                                                                                                                                                                                                                                                                           |
| *5001 - 5006\**                                | Position of X – C, interpreter position = work position                                                                                                                                                                                                                                                                                                                                                                                         |
| *5008\**                                       | Current tool number                                                                                                                                                                                                                                                                                                                                                                                                                             |
| *5009\**                                       | Current tool radius                                                                                                                                                                                                                                                                                                                                                                                                                             |
| *5010\**                                       | Current tool Z offset (length + zDelta)                                                                                                                                                                                                                                                                                                                                                                                                         |
| *5011\**                                       | New tool number during tool change (M6)                                                                                                                                                                                                                                                                                                                                                                                                         |
| *5012\**                                       | Current tool X offset (X offset + xDelta)                                                                                                                                                                                                                                                                                                                                                                                                       |
| *5013\**                                       | Current G43 Z offset (Z offset + zDelta)                                                                                                                                                                                                                                                                                                                                                                                                        |
| *5014\**                                       | Current G43 X offset (X offset + xDelta)                                                                                                                                                                                                                                                                                                                                                                                                        |
| 5015 - 5050                                    | Used in tool change sub routine                                                                                                                                                                                                                                                                                                                                                                                                                 |
| *5051 - 5056\**                                | Probe position X - C in machine coordinates                                                                                                                                                                                                                                                                                                                                                                                                     |
| *5061 - 5066\**                                | Probe position X - C in work coordinates                                                                                                                                                                                                                                                                                                                                                                                                        |
| *5067\**                                       | 1 if the probe is triggered after `G38.2`, 0 otherwise                                                                                                                                                                                                                                                                                                                                                                                          |
| *5068\**                                       | Current probe value                                                                                                                                                                                                                                                                                                                                                                                                                             |
| *5069\**                                       | Handwheel counter                                                                                                                                                                                                                                                                                                                                                                                                                               |
| *5070\**                                       | Spindle rate in rev/second                                                                                                                                                                                                                                                                                                                                                                                                                      |
| *5071 - 5076\**                                | Position of X - C, interpreter position without offsets = machine position                                                                                                                                                                                                                                                                                                                                                                      |
| *5081 - 5086\**                                | Probe position X - C in joint coordinates                                                                                                                                                                                                                                                                                                                                                                                                       |
| *5101 - 5106\**                                | MCA negative limit X - C                                                                                                                                                                                                                                                                                                                                                                                                                        |
| *5111 - 5116\**                                | MCA positive limit X - C                                                                                                                                                                                                                                                                                                                                                                                                                        |
| *5121 - 5126\**                                | Home position X - C                                                                                                                                                                                                                                                                                                                                                                                                                             |
| *5131 - 5133\**                                | TCA negative limit X - Z                                                                                                                                                                                                                                                                                                                                                                                                                        |
| *5141 - 5143\**                                | TCA positive limit X - Z                                                                                                                                                                                                                                                                                                                                                                                                                        |
| *5150\**                                       | Active kinematics type:<br />1: Trivial&#xA;2: 4\_AX\_ACYLINDER (Y -> A mapping)&#xA;3: Virtual C&#xA;4 - 17: System reserved&#xA;18 - 30: Custom 1 – Custom 12                                                                                                                                                                                                                                                                                 |
| *5151\**                                       | ZHC is active                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| *5152\**                                       | 1 if the spindle is on, 0 if the spindle is off.                                                                                                                                                                                                                                                                                                                                                                                                |
| *5161 - 5166\**                                | G28 home X - C                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| *5181 - 5186\**                                | G30 home X - C                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| *5190\**                                       | G68 rotation method (0 = off, 1 = on)                                                                                                                                                                                                                                                                                                                                                                                                           |
| *5191 - 5193\**                                | G68/G51 rotation point X - C                                                                                                                                                                                                                                                                                                                                                                                                                    |
| *5194\**                                       | G68 rotation angle XY                                                                                                                                                                                                                                                                                                                                                                                                                           |
| *5195\**                                       | G68 rotation angle YZ                                                                                                                                                                                                                                                                                                                                                                                                                           |
| *5196\**                                       | G68 rotation angle XZ                                                                                                                                                                                                                                                                                                                                                                                                                           |
| *5200\**                                       | 0 if G51 scaling is off, 1 if G51 scaling is on                                                                                                                                                                                                                                                                                                                                                                                                 |
| *5204\**                                       | G51 scaling factor X                                                                                                                                                                                                                                                                                                                                                                                                                            |
| *5205\**                                       | G51 scaling factor Y                                                                                                                                                                                                                                                                                                                                                                                                                            |
| *5206\**                                       | G51 scaling factor Z (always 1.0)                                                                                                                                                                                                                                                                                                                                                                                                               |
| 5211 - 5216                                    | G92 offset X - C                                                                                                                                                                                                                                                                                                                                                                                                                                |
| 5220                                           | Coordinate system number                                                                                                                                                                                                                                                                                                                                                                                                                        |
| 5221 - 5226                                    | Coordinate system 1 X - C                                                                                                                                                                                                                                                                                                                                                                                                                       |
| 5241 - 5246                                    | Coordinate system 2 X - C                                                                                                                                                                                                                                                                                                                                                                                                                       |
| 5261 - 5266                                    | Coordinate system 3 X - C                                                                                                                                                                                                                                                                                                                                                                                                                       |
| 5281 - 5286                                    | Coordinate system 4 X - C                                                                                                                                                                                                                                                                                                                                                                                                                       |
| 5301 - 5306                                    | Coordinate system 5 X - C                                                                                                                                                                                                                                                                                                                                                                                                                       |
| 5321 - 5326                                    | Coordinate system 6 X - C                                                                                                                                                                                                                                                                                                                                                                                                                       |
| 5341 - 5346                                    | Coordinate system 7 X - C                                                                                                                                                                                                                                                                                                                                                                                                                       |
| 5361 - 5366                                    | Coordinate system 8 X - C                                                                                                                                                                                                                                                                                                                                                                                                                       |
| 5381 - 5386                                    | Coordinate system 9 X - C                                                                                                                                                                                                                                                                                                                                                                                                                       |
| *5390\**                                       | Spindle selection 0 = M90, 1 = M91, 2 = M92                                                                                                                                                                                                                                                                                                                                                                                                     |
| *5391 - 5393\**                                | Alternative spindle offset X- Z                                                                                                                                                                                                                                                                                                                                                                                                                 |
| *5394 - 5397\**                                | Spindle speed max M90 - M93                                                                                                                                                                                                                                                                                                                                                                                                                     |
| 5230, 5250, 5270, 5290, 5310, 5330, 5350, 5370 | Reserved for rotation coordinate system                                                                                                                                                                                                                                                                                                                                                                                                         |
| *5380\**                                       | Simulation mode, 0: controller connected, 1: simulation mode                                                                                                                                                                                                                                                                                                                                                                                    |
| *5397\**                                       | Running mode, 0: running, 1: rendering<br />Use e.g. if you have `G38.2` movements in your macro file because during rendering `G38.2` always runs until the given end point which may give incorrect tool measurement results. Always take care that the tool table contains (approx.) correct tool data                                                                                                                                       |
| *5398\**                                       | Return value of `dlgmsg` (1 = OK, -1 = Cancel)                                                                                                                                                                                                                                                                                                                                                                                                  |
| *5399\**                                       | Return value for `M55`, `M56`                                                                                                                                                                                                                                                                                                                                                                                                                   |
| 5401 - 5499                                    | Tool Z offset (length) for tools 1 - 99                                                                                                                                                                                                                                                                                                                                                                                                         |
| 5501 - 5599                                    | Tool diameter for tools 1 - 99                                                                                                                                                                                                                                                                                                                                                                                                                  |
| 5601 - 5699                                    | Tool X offset (for lathe) for tools 1 - 99                                                                                                                                                                                                                                                                                                                                                                                                      |
| 5701 - 5799                                    | Tool orientation (for turning) for tools 1 - 99                                                                                                                                                                                                                                                                                                                                                                                                 |
| 5801 - 5899                                    | Tool X delta due to wear                                                                                                                                                                                                                                                                                                                                                                                                                        |
| 5901 - 5999                                    | Tool Z delta due to wear                                                                                                                                                                                                                                                                                                                                                                                                                        |

**

[title] G40, G41, G41.1, G42, G42.1 (Cutter Radius Compensation)
[path] G-code/Supported G-code/

To turn cutter radius compensation off, program `G40`. It is OK to turn compensation off when it is already off. Cutter radius compensation may be performed only if the XY plane is active.

To turn cutter radius compensation on the **left** (i.e., the cutter stays to the left of the programmed path when the tool radius is positive), program `G41 D...`. To turn cutter radius compensation on the **right** (i.e., the cutter stays to the right of the programmed path when the tool radius is positive), program `G42 D...`. The D-word is optional; if there is no D-word, the radius of the tool currently in the spindle will be used. If used, the D number should normally be the slot number of the tool in the spindle, although this is not required. It is OK for the D number to be zero; a radius value of zero will be used.

It is an error if:

- The D number is not an integer, is negative or is larger than the number of car­ousel slots
- The XY-plane is not active or for turning the ZX plane is not active
- Cutter radius compensation is commanded to turn on when it is already on.

The behavior of the machining center, when cutter radius compensation is on, is described in Appendix A.

With `G41.1 D...` is the same as `G41 D...` except now the D number is not a tool number but a tool diameter.

With `G42.1 D...` is the same as `G42 D...` except now the D number is not a tool number but a tool diameter.

### Example code for milling

This example mills out a rectangular object from the outside and inside.

On the outside, we use G42, tool radius compensation right and for the inside G41, tool radius compensation left is used.

For both contours, a tool-radius-compensation entry move is programmed consisting of a line that must be longer than the tool-radius used and a circle, of which also the radius is bigger than the tool.

As a side note, all arc radii should be bigger than the tool radius. If you have inside corners, there should always be an arc, so that the tool fits.

::Image[]{src="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/kW9Z8PLEhilnZ_fNIfgRy_image.png" size="54" width="373" height="339" caption="Milling Example 1" position="flex-start" signedSrc="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/kW9Z8PLEhilnZ_fNIfgRy_image.png"}

The G42, G41, and G40 codes are programmed with a / (block delete sign) in front. This makes it easy to debug tool comp programs. The program is loaded with the block delete, this is the blue curve.

Then the program is run with block delete off resulting in the yellow curve.

It is clear to see what the entry move does.

:::BlockQuote
g0 z3
g0 x-15 y15
f500
/g42.1 D6
g1 x-5       (cutter comp entry move 1)
g2 x0 y10 r5 (cutter comp entry move 2)
g1 z-3       (plunge down)
g3 x10 y0 r10
g1 x70
g3 x80 y10 r10
g1 y90
g3 x70 y100 r10
g1 x10
g3 x0 y90 r10
g1 x0 y10
/g40
g0 z3
g0 x30 y30
/g41.1 d6
g1 x20
g3 x10 y20 r10
g1 z-3
g3 x20 y10 r10
g1 x60
g3 x70 y20 r10
g1 y80
g3 x60 y90 r10
g1 x20
g3 x10 y80 r10
g1 y20
/g40
g0 z3
m30
:::

## Example Code for Turning

The movement starts at the right upper corner.

The blue line is the programmed contour. The yellow is the contour with tool-radius compensation G41.

The first G1 line is the tool comp entry move.

You can get this figure by putting a / character in front of the G41/G40 codes. The load the program with block delete on and execute it with block delete off. With block delete on the tool comp is skipped.



::Image[]{src="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/ISNFknuk7W3z_gLvrD3dl_image.png" size="54" width="513" height="437" caption="Turning Example 1" position="flex-start" signedSrc="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/ISNFknuk7W3z_gLvrD3dl_image.png"}

The G42, G41, and G40 codes are programmed with a / (block delete sign) in front. This makes it easy to debug tool comp programs. The program is loaded with the block delete, this is the blue curve.

Then the program is run with block delete off resulting in the yellow curve.

It is clear to see what the entry move does.

:::::Tabs
::::Tab{title="Diameter / R arcs"}
:::BlockQuote
(Radius programming)
(Use I,K programming for arc’s)
g0 x-10 z20
/g41.1 d5
g1 x-10 z10
g3 x0 z0 i10 k0
g1 x10
g2 x20 z-10 i0 k-10
g1 z-20
g3 x30 z-30 i10 k0
/g40
m30
:::
::::

::::Tab{title="Diameter / I,K arcs"}
:::BlockQuote
(Diameter programming)
(Use I,K programming for arc’s)
g0 x-20 z20
/g41.1 d5
g1 x-20 z10
g3 x0 z0 i10 k0
g1 x20
g2 x40 z-10 i0 k-10
g1 z-20
g3 x60 z-30 i10 k0
/g40
m30
:::
::::

::::Tab{title="Radius / R arcs"}
:::BlockQuote
(Radius programming)
(Use R word for arc’s)
g0 x-10 z20
/g41.1 d5
g1 x-10 z10
g3 x0 z0 r10
g1 x10
g2 x20 z-10 r10
g1 z-20
g3 x30 z-30 r10
/g40
m30
:::
::::

::::Tab{title="Radius / I, K arcs"}
:::BlockQuote
(Radius programming)
(Use I,K programming for arc’s)
g0 x-10 z20
/g41.1 d5
g1 x-10 z10
g3 x0 z0 i10 k0
g1 x10
g2 x20 z-10 i0 k-10
g1 z-20
g3 x30 z-30 i10 k0
/g40
m30
:::
::::
:::::


[title] G2, G3 (Arc at Linear Feed)
[path] G-code/Supported G-code/

A circular or helical arc is specified using either G2 (clockwise arc) or G3 (counterclockwise arc). The axis of the circle or helix must be parallel to the X, Y, or Z-axis of the machine coordinate system. The axis (or, equivalently, the plane perpendicular to the axis) is selected with [**G17, G18, G19 (Plane Selection)**](docId\:Uo-PghD6GWTJ4p9XJ2NzP) (Z-axis, XY-plane), [**G17, G18, G19 (Plane Selection)**](docId\:Uo-PghD6GWTJ4p9XJ2NzP) (Y-axis, XZ-plane), or [**G17, G18, G19 (Plane Selection)**](docId\:Uo-PghD6GWTJ4p9XJ2NzP) (X-axis, YZ-plane). If the arc is circular, it lies in a plane parallel to the selected plane.&#x20;

If a line of RS274/NGC code makes an arc and includes rotational axis motion, the rotational axes turn at a constant rate so that the rotational motion starts and finishes when the XYZ motion starts and finishes. Lines of this sort are hardly ever programmed.&#x20;

If cutter radius compensation is active, the motion will differ from what is described here. See Appendix A.&#x20;

Two formats are allowed to specify an arc. We will call these the center format and the radius format. In both formats, the G2 or G3 is optional if it is the current motion mode.&#x20;

## Radius Format Arc

In the radius format, the coordinates of the endpoint of the arc in the selected plane are specified, along with the radius of the arc. Program `G2 X... Y... Z... A... R...` (or use G3 instead of G2) where R is the radius. The axis words are all optional except that at least one of the two words for the axes in the selected plane must be used. The R number is the radius. A positive radius indicates that the arc turns through 180 degrees or less, while a negative radius indicates a turn of 180 degrees to 359.999 degrees. If the arc is helical, the value of the endpoint of the arc on the coordinate axis parallel to the axis of the helix is also specified.

It is not good practice to program radius format arcs that are nearly full circles or are semicircles (or nearly semicircles) because a small change in the location of the endpoint will produce a much larger change in the location of the center of the circle (and, hence, the middle of the arc). The magnification effect is large enough that rounding errors in a number can produce out-of-tolerance cuts. Nearly full circles are outrageously bad, semicircles (and nearly so) are only very bad. Other size arcs (in the range of tiny to 165 degrees or 195 to 345 degrees) are OK.&#x20;

Here is an example of a radius format command to mill an arc: `G17 G2 x10 y15 r20 z5`.&#x20;

That means to make a clockwise (as viewed from the positive Z-axis) circular or helical arc whose axis is parallel to the Z-axis, ending where X=10, Y=15, and Z=5, with a radius of 20. If the starting value of Z is 5, this is an arc of a circle parallel to the XY plane; otherwise, it is a helical arc.

## Center Format Arc

In the center format, the coordinates of the endpoint of the arc in the selected plane are specified along with the offsets of the center of the arc from the current location. In this format, it is OK if the end point of the arc is the same as the current point. It is an error if:&#x20;

- When the arc is projected on the selected plane, the distance from the current point to the center differs from the distance from the endpoint to the center by more than 0.0002 inches (if inches are being used) or 0.002 millimeters (if millimeters are being used).

When the XY-plane is selected, program `G2 X... Y... Z... A... I... J...` (or use G3 instead of G2). The axis words are all optional except that at least one of X and Y must be used. I and J are the offsets from the current location (in the X and Y directions, respectively) of the center of the circle. I and J are optional except that at least one of the two must be used. It is an error if:&#x20;

- I and J are both omitted.&#x20;

When the XZ-plane is selected, program `G2 X... Y... Z... A... I... K...` (or use G3 instead of G2). The axis words are all optional except that at least one of X and Z must be used. I and K are the offsets from the current location (in the X and Z directions, respectively) of the center of the circle. I and K are optional except that at least one of the two must be used. It is an error if:&#x20;

- I and K are both omitted.&#x20;

When the YZ-plane is selected, program `G2 X... Y... Z... A... B... C... J... K...` (or use G3 instead of G2). The axis words are all optional except that at least one of Y and Z must be used. J and K are the offsets from the current location (in the Y and Z directions, respectively) of the center of the circle. J and K are optional except that at least one of the two must be used. It is an error if:&#x20;

- J and K are both omitted.&#x20;

Here is an example of a center format command to mill an arc:&#x20;

`G17 G2 x10 y16 i3 j4 z9`

That means to make a clockwise (as viewed from the positive z-axis) circular or helical arc whose axis is parallel to the Z-axis, ending where X=10, Y=16, and Z=9, with its center offset in the X direction by 3 units from the current X location and offset in the Y direction by 4 units from the current Y location. If the current location has X=7, Y=7 at the outset, the center will be at X=10, Y=11. If the starting value of Z is 9, this is a circular arc; otherwise, it is a helical arc. The radius of this arc would be 5.&#x20;

In the center format, the radius of the arc is not specified, but it may be found easily as the distance from the center of the circle to either the current point or the endpoint of the arc.&#x20;

[title] Mapping X/Y G-code to cylinder on A-Axis
[path] How to use/

### Mapping X/Y G-code to cylinder on A-Axis

This is useful if you have a 4th axis and want to mill on the outside of a cylinder as if it were the X-Y plane. You must have set up the A axis as “4THMILL”. This is possible with a normal XY G-Code file. EdingCNC will perform the mapping for you. Some calibration needs to be done to make this work. It is done on the coordinates page. The location of the A-axis rotation point needs to be set and also the radius of the workpiece needs to be set first.

![](https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/rsc9LeI7XE-A9Ixcek6vo_screenshot-coordinate-tab-with-5th-axis-milling.jpg)

**First, we set the location of the A rotation point:**

We move by jogging or MDI to the center point of rotation of the A axis, only Z and Y are important here. Press button "**1. Set to current position**". Done, center is set.

**Next, we set the outside radius of the workpiece:**

There are *two&#x20;*&#x70;ossibilities to do this:&#x20;

1\. Just type the radius if you know it and press "**Set Radius**"&#x20;

2\. We move the Z up touch the outside of the material with the tool bit and press&#x20;
"**Calibrate Radius**".

Calibration is done. First, we need to be sure that our Y axis is at the correct position before we switch on the Y->A mapping. We need to do this now because when the mapping is ON, Y can no longer be moved, as Y is now mapped to A. You can press "**Move Y to rotation point**” to do the movement.

The mapping can be switched ON now. Then, we can load a standard G-Code file with XYZ coordinates. Below, we see how it looks in the graphic.

Position the X and the Z at the zero point of the drawing, so where the milling should start.

Now Zero all axes in the **Operate&#x20;**&#x73;creen

:::hint{type="info"}
Important: Zero the Z at the top surface of the cylindric material, in this case, the material has a radius of 20 mm, so the Z zero is 20 mm higher than the CenterPoint.
:::



**Y to A mapping OFF**

//IMAGE of flat picture....



**Y to A mapping ON**

[title] M6 (Tool Change)
[path] G-code/Supported M-codes/

To change a tool in the spindle from the tool currently in the spindle to the tool most&#x20;

recently selected (using a T word - see Section 3.7.3), program `M6`. When the tool change is complete:&#x20;

- The spindle will be stopped.&#x20;
- The tool that was selected (by a T word on the same line or on any line after the previous tool change) will be in the spindle. The T number is an integer giving the changer slot of the tool (not its id).&#x20;
- If the selected tool was not in the spindle before the tool change, the tool that was in the spindle (if there was one) will be in its changer slot.&#x20;
- The coordinate axes will be stopped in the same absolute position they were in before the tool change (but the spindle may be re-oriented).&#x20;
- No other changes will be made. For example, coolant will continue to flow during the tool change unless it has been turned off by an M9.&#x20;

The tool change may include axis motion while it is in progress. It is OK (but not useful) to program a change to the tool already in the spindle. It is OK if there is no tool in the selected slot; in that case, the spindle will be empty after the tool change. If slot zero was last selected, there will definitely be no tool in the spindle after a tool change.&#x20;

The tool change command will call the `change_tool` subroutine inside *macro.cnc*.

You can adapt  the behavior for your own needs in this function e.g:

- Perform automatic tool-length measurement
- Perform tool change with an automatic tool changer.

For a (non-functional)  example of how to implement automatic tool change for a 16-tool changer.  see the contents of the *default\_macro.cnc&#x20;*&#x66;ile at the end of this document. It checks whether the current tool is already in the spindle. It checks that the tool number is in the range of 1-4. Then it first drops the current tool and picks the new tool:




[title] M54, M55, M56, M57 (General purpose IO)
[path] G-code/Supported M-codes/

:::hint{type="warning"}
Please note that mentioned commands may fail during loading and/or simulation.

To make your macro code avoid these errors please take a look at the manual section [**Run behavior during loading of job file and simulation**](docId\:p2Jh9fFRvp0WCb5jCD9px)
:::

## Digital outputs

### Set output - M54 &#x50;*...&#x20;*

The P word must be between `1` and `10` where `1` is *AUX1* and `10` is *AUX10*.&#x20;

:::BlockQuote
M54 P1  (set AUX1 out to 1)
:::

If the connected controller only has one AUX output, `2` is mapped to *FLOOD&#x20;*&#x61;nd `3` to *MIST*.

:::BlockQuote
M54 P2  (set AUX2 out to 1 or FLOOD to 1 if the controller has 1 AUX)
:::

***

### Clear output - M55 &#x50;*...*

Clear output. The P word must be between `1` and `10` where `1` is *AUX1* and `10` is *AUX10*.&#x20;

:::BlockQuote
M55 P1 (set AUX1 out to 0)
:::

If the connected controller only has one AUX output, `2` is mapped to *FLOOD* and `3` to *MIST*.

:::BlockQuote
M55 P2  (set AUX2 out to 0 or FLOAD to 0 if the controller has 1 AUX)
:::

***

### Read outputs - M57 P

Read output *x*, store the result in variable `#5399`

:::BlockQuote
M57 P...
:::

| Output           | P value  |
| ---------------- | -------- |
| AUX1-AUX*n*      | 1 to *n* |
| Machine On       | 51       |
| Drive Enable     | 52       |
| Coolant1 (Flood) | 61       |
| Coolant2 (Mist)  | 62       |
| Tool             | 63       |
| Tool direction   | 64       |

***

## Digital inputs

### Read input - M56 &#x50;*...*&#x20;

| P value  | Input           |
| -------- | --------------- |
| 51 - 56  | Home Inputs X-C |
| 61       | Probe Input     |
| 62       | Sync Input      |
| 63       | HWA Input       |
| 64       | HWB Input       |
| 65       | ESTOP1          |
| 66       | ESTOP2          |
| 67       | EXTERR          |
| 68       | PAUSE           |

The result is stored in [**System-Parameters/Variables**](docId\:oqHjs3LLCfQkSac_cemc2)  `#5399`

Example: erad AUX input 3:

:::BlockQuote
M56 P3 (Read AUX in 3)
If \[#5399 == 1]
&#x20;  Msg "AUX3=ON"
Else
&#x20;  Msg "AUX3=OFF"
endif
:::

Example: read home-input of X axis:

:::BlockQuote
M56 P51
If \[#5399 == 1]
&#x20;  Msg "HOME X=ON"
Else
&#x20;  Msg "HOME X=OFF"
endif
:::

***

### Read input + wait - M56 &#x50;*&#x20;...&#x20;*&#x4C;...  Q...

Read digital input *P* and specify wait mode, the result is stored in variable `#5399`

- **P**...: the input number
- **L*****0*****:** do not wait
- **L*****1*****:** Wait for High
- **L*****2***: Wait for Low
- **Q**...: timeout (seconds)

:::BlockQuote
M56 P3 L2 Q30 (Read AUX in 3)
If \[#5399 == -1]
&#x20;  Errmsg "Timeout while waiting for AUX3 becoming low"
Else
&#x20;  Msg "AUX3 is off"
Endif
:::

Note that we use wait (L2) here, in the event of a timeout, the value of `#5399` is -1.

In order to make this **code simulation and rendering proof&#x20;**&#x77;e need to extend it like this:

:::BlockQuote
If \[\[#5380 == 0] and \[#5397 == 0]] ;;Check only if running job
&#x20;  M56 P3 L2 Q30 (Read AUX in 3)
&#x20;  If \[#5399 == -1]
&#x20;   Errmsg “Timeout while waiting for AUX3 becoming low”
&#x20; Else
&#x20;   Msg “AUX3 is off”
&#x20; Endif
Endif&#x20;
:::

***

## Analog inputs

### Read analog input - M56 &#x45;*…*

Read analog input E, result stored in `#5399`

:::BlockQuote
M56 E3
Msg "analog value is " #5399
:::

***

## PWM

### Set PWM - M54 E... &#x51;*...*

Set PWM output E to permille value Q (0 \<= *y* \<= 1000)

:::BlockQuote
M54 E2 Q500 (Set PWM2 to 50% PWM)
:::

***

### Read PWM output - M57 E...

Read PWM output, result stored in `#5399`

:::BlockQuote
M57 E3
If \[#5399 == 0]
&#x20;  Msg "PWM IS OFF"
Else
&#x20;  Msg "PWM IS ON, VALUE="#5399
endif
:::

***

## Optional IOCARD

If a relay board is used such as [**RLY8**](https://edingcnc.com/product/rly8-io/), the IO number *P* or *E* is specified like in the following examples:

- value of `103` means card 1 port 3
- value of `208` means card 2 port 8


[title] G38.2 (Straight Probe)
[path] G-code/Supported G-code/

### The Straight Probe Command

Program `G38.2 X... Y... Z... A...` to perform a straight probe operation. The rotational axis words are allowed, but it is better to omit them. If rotational axis words are used, the numbers must be the same as the current position numbers so that the rotational axes do not move. The linear axis words are optional, except that at least one of them must be used. The tool in the spindle must be a probe.

It is an error if:

- The current point is less than 0.254 millimeters or 0.01 inches from the pro­grammed point
- G38.2 is used in inverse time feed rate mode
- Any rotational axis is commanded to move
- No X, Y, or Z-axis word is used

In response to this command, the machine moves the controlled point (which should be at the end of the probe tip) in a straight line at the current feed rate toward the programmed point. If the probe trips, the probe is retracted slightly from the trip point at the end of the command execution. If the probe does not trip even after overshooting the programmed point slightly, an error is signaled.

After successful probing, [**System-Parameters/Variables**](docId\:oqHjs3LLCfQkSac_cemc2) `#5061` to `#5066` will be set to the program coordinates of the location of the controlled point at the time the probe tripped. Variables `#5051` to `#5056` will contain the machine coordinates. Useful for measuring tools in absolute machine positions. `G53 G38.2` will move in machine coordinates.

### Using the Straight Probe Command

Using the straight probe command, if the probe shank is kept nominally parallel to the Z-axis (i.e., any rotational axes are at zero) and the tool length offset for the probe is used so that the controlled point is at the end of the tip of the probe:

- Without additional knowledge about the probe, the parallelism of a face of a part to the XY-plane may, for example, be found.
- If the probe tip radius is known approximately, the parallelism of a face of a part to the YZ or XZ-plane may, for example, be found.
- If the shank of the probe is known to be well-aligned with the Z-axis and the probe tip radius is known approximately, the center of a circular hole, may, for example, be found.
- If the shank of the probe is known to be well-aligned with the Z-axis and the probe tip radius is known precisely, more uses may be made of the straight probe command, such as finding the diameter of a circular hole.

If the straightness of the probe shank cannot be adjusted to high accuracy, it is desirable to know the effective radii of the probe tip in at least the +X, -X, +Y, and -Y directions. These quantities can be stored in variables either by being included in the variables file or by being set in an RS274/NGC program.

Using the probe with rotational axes not set to zero is also feasible. Doing so is more complex than when rotational axes are at zero, and we do not deal with it here.

### Example Code

As a usable example, the code for finding the center and diameter of a circular hole is shown below. For this code to yield accurate results, the probe shank must be well-aligned with the Z-axis, the cross-section of the probe tip at its widest point must be very circular, and the probe tip radius (i.e., the radius of the circular cross-section) must be known precisely. If the probe tip radius is known only approximately (but the other conditions hold), the location of the hole center will still be accurate, but the hole diameter will not.

In the code below, an entry of the form `<description of number>` is meant to be replaced by an actual number that matches the description of the number. After this section of code has been executed, the X-value of the center will be in variable `#1041`, the Y-value of the center in variable `#1022`, and the diameter in variable `#1034`. In addition, the diameter parallel to the X-axis will be in variable `#1024`, the diameter parallel to the Y-axis in variable `#1014`, and the difference (an indicator of circularity) in variable `#1035`. The probe tip will be in the hole at the XY center of the hole.

The example does not include a tool change to put a probe in the spindle. Add the tool change code at the beginning, if needed.

:::BlockQuote
N010 (probe to find the center and diameter of circular hole)
N020 (This program will not run as given here. You have to)
N030 (insert numbers in place of \<description of number>.)&#x20;
N040 (Delete lines N020, N030, and N040 when you do that.)&#x20;
N050 G0 Z \<Z-value of retracted position> F \<feed rate>&#x20;
N060 #1001=\<nominal X-value of hole center>&#x20;
N070 #1002=\<nominal Y-value of hole center>
N080 #1003=\<some Z-value inside the hole>&#x20;
N090 #1004=\<probe tip radius>&#x20;
N100 #1005=\[\<nominal hole diameter>/2.0 - #1004]&#x20;
N110 G0 X#1001 Y#1002 (move above nominal hole center)&#x20;
N120 G0 Z#1003 (move into the hole - to be cautious, substitute G1 for G0 here)
N130 G38.2 X\[#1001 + #1005] (probe +X side of hole)&#x20;
N140 #1011=#5061 (save results)&#x20;
N150 G0 X#1001 Y#1002 (back to the center of the hole)&#x20;
N160 G38.2 X\[#1001 - #1005] (probe -X side of hole)
N170 #1021=\[\[#1011 + #5061] / 2.0] (find pretty good X-value of hole center)
N180 G0 X#1021 Y#1002 (back to the center of the hole)&#x20;
N190 G38.2 Y\[#1002 + #1005] (probe +Y side of the hole)&#x20;
N200 #1012=#5062 (save results) N210 G0 X#1021 Y#1002 (back to center of hole)&#x20;
N220 G38.2 Y\[#1002 - #1005] (probe -Y side of the hole)
N230 #1022=\[\[#1012 + #5062] / 2.0] (find very good Y-value of hole center)
N240 #1014=\[#1012 - #5062 + \[2 \* #1004]] (find hole diameter in Y-direction)
N250 G0 X#1021 Y#1022 (back to the center of the hole)&#x20;
N260 G38.2 X\[#1021 + #1005] (probe +X side of hole)&#x20;
N270 #1031=#5061 (save results)&#x20;
N280 G0 X#1021 Y#1022 (back to the center of the hole)&#x20;
N290 G38.2 X\[#1021 - #1005] (probe -X side of the hole)
N300 #1041=\[\[#1031 + #5061] / 2.0] (find very good X-value of hole center)&#x20;
N310 #1024=\[#1031 - #5061 + \[2 \* #1004]] (find hole diameter in X-direction)
N320 #1034=\[\[#1014 + #1024] / 2.0] (find average hole diameter)&#x20;
N330 #1035=\[#1024 - #1014] (find difference in hole diameters)
N340 G0 X#1041 Y#1022 (back to the center of the hole)&#x20;
N350 M2 (Probing ended)
:::


[title] Order of execution
[path] G-code/Macro programming/

The order of execution of items on a line is critical to safe and effective machine operation. Items are executed in the order shown in the table below if they occur on the same line.&#x20;



1. Comment (includes message).&#x20;
2. Set feed rate mode (**G93, G94 -inverse time or per minute**).
3. Set feed rate (**F**). &#x20;
4. Set spindle speed (**S**). &#x20;
5. Select tool (**T**)
6. Change tool (**M6**)&#x20;
7. Spindle on or off (**M3, M4, M5**) &#x20;
8. Coolant on or off (**M7, M8, M9**)
9. Enable or disable overrides (**M48, M49**)
10. Dwell (**G4**)
11. Set active plane (**G17, G18, G19**)&#x20;
12. Set length units (**G20, G21**)
13. Cutter radius compensation on or off (**G40, G41, G42**) &#x20;
14. Cutter length compensation on or off (**G43, G49**) &#x20;
15. Coordinate system selection (**G54, G55, G56, G57, G58, G59, G59.1, G59.2, G59.3**)
16. Set path control mode (**G61, G61.1, G64**) &#x20;
17. Set distance mode (**G90, G91**)&#x20;
18. Set retract mode (**G98, G99**)
19. Home (**G28, G30**) or change coordinate system data (**G10**) or set axis offsets (**G92, G92.1, G92.2, G94**). &#x20;
20. Perform motion (**G0 to G3, G80 to G89**), as modified (possibly) by G53.&#x20;
21. Stop (**M0,M1, M2,M30,M60**)






[title] Software license
[path] Software Manual/

# Do I need a license to start using the product?

All our boards come with a software license onboard, and no further steps are necessary to start using your controller.

# License upgrade

Some controllers can be upgraded with extra features such as support for more axes or Ethernet support.&#x20;

After you have purchased an upgrade (from [**our webstore**](https://edingcnc.com/products/) or from one of [**our distributors**](https://edingcnc.com/distributors/)), we will ask you to provide us with a request code. You can obtain the code in the software:

::::::WorkflowBlock
:::WorkflowBlockItem
Connect the board to the PC (if you have an Ethernet board, please ensure that your [**network adapter is configured first**](https://www.youtube.com/watch?v=mT6eFq6CC9A))
:::

:::WorkflowBlockItem
Start the software
:::

:::::WorkflowBlockItem
Navigate to license settings in the *Setup tab*

::::Tabs
:::Tab{title="Version 5"}
Go to the *Licenses & Support*



![](https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/95el7qKqvFUnt9wMOsr35_image.png)
:::

:::Tab{title="Version 4"}
Press the *Setup Licences* button



![](https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/9qMT8G5Q8jFgsUyZiAUxg_image.png)
:::
::::
:::::

:::::WorkflowBlockItem
::::Tabs
:::Tab{title="Version 5"}
In the Request License section, set your name in `Name of the new license holder` field, check all the license options that apply to your newly purchased license and press `Get request code`.&#x20;

![](https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/x00cmLhKIGPBbtdos_iNo_image.png)
:::

:::Tab{title="Version 4"}
In the Request License section, set your name in the first text field, check all the license options that apply to your newly purchased license and press `Get Request Code`

![](https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/G32_EnNaX3Xe_qpJyPwKE_image.png)


:::
::::


:::::

:::WorkflowBlockItem
[**Send us a message**](https://support.edingcnc.com/support/tickets/new) with the request code and order/payment number and we will reply to you with your new license code
:::

:::WorkflowBlockItem
Set the license code and press *Activate&#x20;*/ *Activate license* - please note that the board has to be connected for this step
:::
::::::


[title] Setup tab
[path] Getting started/User interface/1. Tab overview/


[title] Configuring an automatic oil pump
[path] How to use/

If your machine has a device that needs to be periodically switched on during use, such as an oil pump, you can use the service feature to automate this.

This feature will toggle an output as long as the CNC software is on, regardless of the machine's state.

# Configuration

You can configure this feature under *Pump parameters* in the *Service&#x20;*&#x74;ab.

![](https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/aHEQe2Z_tQLzsfNEKTmAx_service-pump-parameters.png)

The configuration items are:

| Item               | Description                                                                 |
| ------------------ | --------------------------------------------------------------------------- |
| Pump interval time | Amount of time that the output is switched off (time between pump action)   |
| Pump pulse time    | Amount of time that the output is switched on (duration of one pump action) |
| Pump output        | AUX output to be switched on/off by this feature                            |

*Pump time to next* value is a status value that can be used to check how much time is left until the output is switched on i.e. time until the next pump action.

It is required to press the save button to apply the configuration.

# Example

Let's assume that there is an oil pump device that we can power on with a relay. The relay is wired to AUX5 output on our CNC controller and we would like the pump to turn on for 3 seconds every hour.
In this example, the configuration to achieve this would be:

| Item               | Value |
| ------------------ | ----- |
| Pump interval time | 3597  |
| Pump pulse time    | 3     |
| Pump output        | AUX5  |


[title] Supported M-codes
[path] G-code/

| M Code                                                                                  | Meaning                                                                                                                                  |
| --------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| [**M0, M1, M2, M30, M60 (Program Stopping and Ending)**](docId\:LHmMbAy23Q7kqBe9WDV0_)  | Program stop                                                                                                                             |
| [**M0, M1, M2, M30, M60 (Program Stopping and Ending)**](docId\:LHmMbAy23Q7kqBe9WDV0_)  | Optional program stop                                                                                                                    |
| [**M0, M1, M2, M30, M60 (Program Stopping and Ending)**](docId\:LHmMbAy23Q7kqBe9WDV0_)  | Program end                                                                                                                              |
| [**M3, M4, M5, M90 - M97 (Spindle/Tool head Control)**](docId\:LCGnVkPx_hp4rq3G5m9QV)   | Turn spindle clockwise                                                                                                                   |
| [**M3, M4, M5, M90 - M97 (Spindle/Tool head Control)**](docId\:LCGnVkPx_hp4rq3G5m9QV)   | Turn spindle counterclockwise                                                                                                            |
| [**M3, M4, M5, M90 - M97 (Spindle/Tool head Control)**](docId\:LCGnVkPx_hp4rq3G5m9QV)   | Stop spindle turning                                                                                                                     |
| [**M6 (Tool Change)**](docId\:kQG7dD1dpwUw3hchbArUT)                                    | Tool change                                                                                                                              |
| [**M7, M8, M9 (Coolant Control)**](docId\:CKpEEqps6uVHTMidSiRnR)                        | Mist coolant on                                                                                                                          |
| [**M7, M8, M9 (Coolant Control)**](docId\:CKpEEqps6uVHTMidSiRnR)                        | Flood coolant on                                                                                                                         |
| [**M7, M8, M9 (Coolant Control)**](docId\:CKpEEqps6uVHTMidSiRnR)                        | Mist and flood coolant off                                                                                                               |
| M10                                                                                     | Laser off (PWM off)                                                                                                                      |
| M11                                                                                     | Laser on with Power S                                                                                                                    |
| [**M20, M21, M22 (Torch height control / Plasma THC)**](docId:4KZjVMWs8l4YNN6N5ZmcB)    | Plasma Torch Height Control ON                                                                                                           |
| [**M20, M21, M22 (Torch height control / Plasma THC)**](docId:4KZjVMWs8l4YNN6N5ZmcB)    | Plasma Torch Height Control OFF                                                                                                          |
| [**M20, M21, M22 (Torch height control / Plasma THC)**](docId:4KZjVMWs8l4YNN6N5ZmcB)    | M23 Q… Set Plasma THC set point value                                                                                                    |
| [**M26, M27 (Rotary axis clamping)**](docId\:b-HT95-u-CRzgtMitKpI8)                     | Enable rotary axis clamping                                                                                                              |
| [**M26, M27 (Rotary axis clamping)**](docId\:b-HT95-u-CRzgtMitKpI8)                     | Disable rotary axis clamping                                                                                                             |
| [**M0, M1, M2, M30, M60 (Program Stopping and Ending)**](docId\:LHmMbAy23Q7kqBe9WDV0_)  | Program end, spindle and coolants off, and rewind                                                                                        |
| [**M48 - M53 (Feed-Speed Override Control)**](docId\:C9jbUdjZJbt5_JzMT_hWm)             | Enable speed and feed overrides                                                                                                          |
| [**M48 - M53 (Feed-Speed Override Control)**](docId\:C9jbUdjZJbt5_JzMT_hWm)             | Disable speed and feed overrides                                                                                                         |
| [**M48 - M53 (Feed-Speed Override Control)**](docId\:C9jbUdjZJbt5_JzMT_hWm)             | Set feed override                                                                                                                        |
| [**M48 - M53 (Feed-Speed Override Control)**](docId\:C9jbUdjZJbt5_JzMT_hWm)             | Set speed override                                                                                                                       |
| [**M48 - M53 (Feed-Speed Override Control)**](docId\:C9jbUdjZJbt5_JzMT_hWm)             | Enable feed override by analog input                                                                                                     |
| [**M48 - M53 (Feed-Speed Override Control)**](docId\:C9jbUdjZJbt5_JzMT_hWm)             | Enable feed hold input                                                                                                                   |
| [**M54, M55, M56, M57 (General purpose IO)**](docId\:pkHadTeLJOSp0wTTu_1dJ)             | Set general-purpose output                                                                                                               |
| [**M54, M55, M56, M57 (General purpose IO)**](docId\:pkHadTeLJOSp0wTTu_1dJ)             | Clear general-purpose output                                                                                                             |
| [**M54, M55, M56, M57 (General purpose IO)**](docId\:pkHadTeLJOSp0wTTu_1dJ)             | Read general-purpose input                                                                                                               |
| [**M54, M55, M56, M57 (General purpose IO)**](docId\:pkHadTeLJOSp0wTTu_1dJ)             | Read general-purpose output                                                                                                              |
| [**M0, M1, M2, M30, M60 (Program Stopping and Ending)**](docId\:LHmMbAy23Q7kqBe9WDV0_)  | Program stop, use this with nesting instead of M30 so that the spindle/coolants remain on during the transition from one to the next run |
| M80                                                                                     | Drive enable ON                                                                                                                          |
| M81                                                                                     | Drive enable OFF                                                                                                                         |
| [**M3, M4, M5, M90 - M97 (Spindle/Tool head Control)**](docId\:LCGnVkPx_hp4rq3G5m9QV)   | Standard Head/spindle                                                                                                                    |
| [**M3, M4, M5, M90 - M97 (Spindle/Tool head Control)**](docId\:LCGnVkPx_hp4rq3G5m9QV)   | Alternate Head/2nd spindle                                                                                                               |
| [**M3, M4, M5, M90 - M97 (Spindle/Tool head Control)**](docId\:LCGnVkPx_hp4rq3G5m9QV)   | Alternate Head/3rd spindle                                                                                                               |
| [**M3, M4, M5, M90 - M97 (Spindle/Tool head Control)**](docId\:LCGnVkPx_hp4rq3G5m9QV)   | Alternate Head/4th spindle                                                                                                               |
| [**M3, M4, M5, M90 - M97 (Spindle/Tool head Control)**](docId\:LCGnVkPx_hp4rq3G5m9QV)   | Alternate Head/Probe                                                                                                                     |
| [**M3, M4, M5, M90 - M97 (Spindle/Tool head Control)**](docId\:LCGnVkPx_hp4rq3G5m9QV)   | Alternate Head/Camera                                                                                                                    |

:::hint{type="info"}
Note that a head may as well be e.g. a tangential knife configuration.
:::

## 3D printing specials

| M Code                                                                                                                      | Meaning                                                      |
| --------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------ |
| [**M1, M100, M104, M106, M107, M109, M140, M143, M190; (3D printer control, discontinued)**](docId\:HHDBn9QPO179onaPOasZL)  | Set extruder temperature                                     |
| [**M1, M100, M104, M106, M107, M109, M140, M143, M190; (3D printer control, discontinued)**](docId\:HHDBn9QPO179onaPOasZL)  | Workpiece cooling fan on                                     |
| [**M1, M100, M104, M106, M107, M109, M140, M143, M190; (3D printer control, discontinued)**](docId\:HHDBn9QPO179onaPOasZL)  | Workpiece cooling fan off                                    |
| [**M1, M100, M104, M106, M107, M109, M140, M143, M190; (3D printer control, discontinued)**](docId\:HHDBn9QPO179onaPOasZL)  | M109 S... Set extruder temperature and wait until reached    |
| [**M1, M100, M104, M106, M107, M109, M140, M143, M190; (3D printer control, discontinued)**](docId\:HHDBn9QPO179onaPOasZL)  | M140 S... Bed temperature                                    |
| [**M1, M100, M104, M106, M107, M109, M140, M143, M190; (3D printer control, discontinued)**](docId\:HHDBn9QPO179onaPOasZL)  | M143 S... Maximum Hot-end temperature to prevent overheating |
| [**M1, M100, M104, M106, M107, M109, M140, M143, M190; (3D printer control, discontinued)**](docId\:HHDBn9QPO179onaPOasZL)  | M190 Wait for bed temperature to reach the target value      |


[title] M3, M4, M5, M90 - M97 (Spindle/Tool head Control)
[path] G-code/Supported M-codes/

To start the spindle turning clockwise at the currently programmed speed, program `M3`.

To start the spindle turning counterclockwise at the currently programmed speed, program `M4`.

To stop the spindle from turning, program `M5`.

`M3` or `M4` can be used if the spindle speed is set to zero. If this is done (or if the speed override switch is enabled and set to zero), the spindle will not start turning. If, later, the spindle speed is set above zero (or the override switch is turned up), the spindle will start turning. It is OK to use `M3` or `M4` when the spindle is already turning or to use `M5` when the spindle is already stopped.

If there is more than one spindle in your machine, or if you have a mounted touch probe on the Z slide or a camera you can select the offset/IO you want

- `M90` standard spindle
- `M91` alternate 2nd spindle
- `M92` alternate 3rd spindle
- `M93` alternate 4th spindle
- `M95` touch probe
- `M97` Camera

Each spindle is connected to a different set of outputs and has different parameters.

Alternate spindles 1 and 2 may have defined offsets for X, Y, and Z.

Because this option is rarely used by customers, it is required to perform the settings yourself by editing the cnc.ini file.

There are 5 sets of parameters for each spindle configuration. For the 2nd 3rd 4th and 5th spindle configuration you can set the axis offsets with respect to the 1st spindle. Note that the 5th and 6th spindle configuration is used for a touch probe and camera.

Example system:

- Main Spindle,
- Tangential knife
- Oscillating tangential knife
- Touch probe


[title] How to use...
[path] /


[title] Getting started
[path] /


[title] G92, G92.1, G92.2, G92.3 (Coordinate System Offset)
[path] G-code/Supported G-code/

To make the current point have the coordinates you want (without motion), program `G92 X... Y... Z... A...`, where the axis words contain the axis numbers you want. All axis words are optional, except that at least one must be used. If an axis word is not used for a given axis, the coordinate on that axis of the current point is not changed.

It is an error if:

- All axis words are omitted

When G92 is executed, the origin of the currently active coordinate system moves. To do this, origin offsets are calculated so that the coordinates of the current point with respect to the moved origin are as specified on the line containing the G92. In addition, parameters `#5211` to `#5216` are set to the X, Y, Z, A, B, and C-axis offsets. The offset for an axis is the amount the origin must be moved so that the coordinate of the controlled point on the axis has the specified value.

Here is an example. Suppose the current point is at X=4 in the currently specified coordinate system and the current X-axis offset is zero, then G92 x7 sets the X-axis offset to -3, sets parameter `#5211` to -3, and causes the X-coordinate of the current point to be 7.

The axis offsets are always used when motion is specified in absolute distance mode using any of the nine coordinate systems (those designated by G54 - G59.3). Thus all nine coordinate systems are affected by G92.

Being in incremental distance mode has no effect on the action of G92.

Non-zero offsets may already be in effect when the G92 is called. If this is the case, the new value of each offset is A+B, where A is what the offset would be if the old offset were zero, and B is the old offset. For example, after the previous example, the X-value of the current point is 7. If G92 x9 is then programmed, the new X-axis offset is -5, which is calculated by \[\[7-9] + -3].

To reset axis offsets to zero, program **G92.1** or **G92.2**. G92.1 sets parameters `#5211` to `#5216` to zero, whereas G92.2 leaves their current values alone.

To set the axis offset values to the values given in parameters `#5211` to `#5216`, program **G92.3**.

You can set axis offsets in one program and use the same offsets in another program. Program G92 in the first program. This will set parameters `#5211` to `#5216`. Do not use G92.1 in the remainder of the first program. The parameter values will be saved when the first program exits and restored when the second one starts up. Use G92.3 near the beginning of the second program. That will restore the offsets saved in the first program. If other programs are to run between the program that sets the offsets and the one that restores them, make a copy of the parameter file written by the first program and use it as the parameter file for the second program.

[title] Introduction
[path] Software Manual/

To optimally use the software it is of course important to find all the functions of the software. In this chapter we will go the user interface and how to use it. Please note that it's possible that due to development of new features screenshot can sometime be a little different that th software that you are using.

[title] How to...
[path] Software Manual/


[title] Using the goto menu
[path] Software Manual/How to.../


[title] Special features
[path] G-code/


[title] Milling un-even surfaces / Z-heigh compensation
[path] How to use/

# Milling un-even surfaces.

This compensation can compensate for slight unevenness in the material surface. It is intended for relatively small compensation with a smooth, natural behavior.

![](https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/IQ9U9EEMBPQowmXMOxVlr_image.png)



![](https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/c8G6BQ9BnwlF9UdxPQCHK_image.png "Allowed types of compensation")

The compensation is applied directly to the motion of the Z axis, therefore the acceleration profile is determined by the shape of the compensation.

In cases where the compensation is not continuous, position errors may occur depending on the driver type used, the quantity of the discontinuity, and the speed of the actuators used. In open-loop systems, this may result in lost steps, and in closed-loop systems, this may result in a position following error.

## Start Measurement

::Image[]{src="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/nGIbg5xt2hK-ZsAMk32U5_z-height-comp-start-measurement.png" signedSrc size="50" width="361" height="438" position="flex-start" caption}

This button will pop up an interpreter dialog for the automatic measurement macro using a touch probe. It executes the `zhcmgrid` macro. We provide a default implementation for this in the default macro file, but this may be modified by the machine builder or user. These instructions assume the use of the unmodified macro.

![](https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/a9Tneol3JDsKWj9TNxKzu_z-height-comp-grid-measure-dialog.png)

- **nx** The number of points on the x-axis to be measured. This needs to be a whole number.
- **ny** The number of points on the y-axis to be measured. This needs to be a whole number (integer).
- **maxZ** The z height from where the measurements start. Ensure that this is higher than the highest point on the grid or the probe will collide with the material.
- **minZ** The lowest point that the probe operation will travel to. If a point is below this number on the z-axis, this point will not be measured, this is displayed to the user during and after the measurements.
- **gridSize** The distance between measurement points on each axis.
- **Feed** The feed rate at which the probe operation measures the point. The lateral movements occur at G0 speeds.

Pressing **Cancel** will not run the Z Height Calibration macro. Pressing **Submit** will perform the calibration. **Render** will render the movements of the macro in the job view. Executing the macro again after the render is complete will open the dialog again with the previously entered values. Adjustments can be made and the calibration can be started.

After the calibration is complete, the measurements will be loaded into the software, but it is not activated yet. This is done by either checking the **Z height compensation on** checkbox or by executing the `ZHC ON` command. Additionally, the compensation is saved to the installation directory as *zHeightCompTable.txt.*

## Save Measurement

::Image[]{src="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/L-SzZzCKzeCUak0Km3ywJ_z-height-comp-save-measurement.png" signedSrc size="50" width="361" height="438" position="flex-start" caption}

This button saves the measurements to a file. A dialog opens where the location and name of the file can be selected.

## Load Measurement

::Image[]{src="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/vVLlN8UX0JItTvbW_Pgfu_z-height-comp-load-measurement.png" signedSrc size="50" width="361" height="438" position="flex-start" caption}

This button will open a file dialog where the file containing the calibrations must be selected. This loads the file, but it does not activate the Z height compensation yet. This is done by either checking the **Z height compensation on** checkbox or by executing the `ZHC ON` command.

## Check Measurement

::Image[]{src="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/8Pj5qBxPNDrwYO3oh4pQS_z-height-comp-check-measurement.png" signedSrc size="50" width="361" height="438" position="flex-start" caption}

This button checks the currently loaded compensation file for completeness. This executes the `ZHCcheck 20` command.

## Move To Start Position

::Image[]{src="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/s-fr4XMZQuZDN98Q8ZxWY_z-height-comp-move-start-position.png" signedSrc size="50" width="361" height="438" position="flex-start" caption}

This button will move the machine to the first measurement point in the Z height compensation grid. It executes the `ZHCMOVETO 0 0` command.

## Z height compensation on

::Image[]{src="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/JmIPTKhRPhKyegWyjQQrW_z-height-comp-on.png" signedSrc size="50" width="361" height="438" position="flex-start" caption}

Checking this checkbox will enable the Z height compensation, unchecking it will disable the Z height compensation.

## Show current compensation value in DRO

::Image[]{src="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/wf_gUQNvmPqIG2RXpf18s_z-height-comp-show-in-dro.png" signedSrc size="50" width="361" height="438" position="flex-start" caption}

Checking this checkbox will show the compensation values in the DRO.

::::VerticalSplit{layout="middle"}
:::VerticalSplitItem
![](https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/qzkrJgnwj8_3euZf8hLjY_z-height-comp-off-dro.png "Show current compensation on")
:::

:::VerticalSplitItem
![](https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/w6MHfYzlLIDRxllf2zLIx_z-height-comp-on-dro.png "Show current compensation off")
:::
::::

****

[title] M7, M8, M9 (Coolant Control)
[path] G-code/Supported M-codes/

To turn the mist coolant on, program `M7`. To turn flood coolant on, program `M8`. To turn all coolants off, program `M9`. It is always possible to use any of these commands, regardless of what coolant is on or off.&#x20;


[title] M1, M100, M104, M106, M107, M109, M140, M143, M190; (3D printer control, discontinued)
[path] G-code/Supported M-codes/

:::hint{type="warning"}
Please note that the default implementation of 3D printing-specific features is discontinued.

This does **not&#x20;**&#x6D;ean that a 3D printer cannot be made to work with our software, it simply means that 3D printer-specific M-commands should be overridden by the macro in order to manipulate the outputs and thus by proxy devices such as fans, and temperature controllers.&#x20;
This approach allows for greater flexibility and the ability to interface with complex machines.

Please take a look at how to define custom M-functions in the section [**M-code function override and user M-code functions**](docId\:v5hvlzJR2jO4uJo6txezz)
:::

`M1` All heating and Fans off

`M100 P...` Change A axis resolution during execution by a factor (factor 1 is standard, 1.01 is 1% more, 0.99 is 1% less.

`M104 S...` Set extruder temperature, (`M104 S50` sets the temperature to 50 degrees *Celsius*).

`M106 S...` Workpiece cooling fan on optionally with S=0-100, for 0-100% *PWM*

`M107` Work piece fan off

`M109 S...` Set the extruder temperature and wait until it is reached.

`M140 S...` Set bed temperature.

`M143 S...` Set maximum hot-end temperature to prevent overheating.

`M190 S...` Set the bed temperature and wait until reached.

[title] Overview
[path] Getting started/User interface/

When the software is started, the primary operations screen is shown.

![](https://app.archbee.com/api/optimize/wP9peVc2bAVBPOh6IboCS/YQ5nEZHhFy4OyS-l62TyT_image.png "Main application screen")

The different parts are:

1. Several tabs with different functions
2. Direct I/O Control and input statuses
3. Main graphical display.&#x20;
4. Homing buttons, DRO with machine and work coordinates
5. Job/macro view
6. Message screen
7. Operations buttons

At the top of the window, the software version is shown. In the image below, you see that this is version V5.3.

::Image[]{src="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/L-u7hLe0M3Ioc9kw0DLOO_image.png" signedSrc size="72" width="664" height="206" position="center" caption}

Additionally, in this case, it indicates that it is in **simulation&#x20;**&#x6D;ode. This means there is no connection to the controller. In simulation mode, the software can be used entirely as if it were connected to a controller. The software will still yield the same result as if a controller were connected, with respect to path control. This also offers you the opportunity to experiment with settings and observe the path that the machine would travel without actually needing to run it on a CNC machine. Also, it's an excellent way to develop your macros.

However, there are two ***crucial&#x20;***&#x64;ifferences between running in simulation or not:

:::hint{type="info"}
1. It can not simulate input signals, so macros that read inputs will not work correctly in simulation mode.
2. In simulation mode, more or different I/Os can be shown that are not available at the controller that you are using.

TIP: It can be helpful to automatically skip macros that will not correctly work in a simulation mode. If you would like more information, please look at the macro programming information.
:::

When the software is connected to one of our controllers, it will show the name of the controller and its firmware version.

To the right of the version information and controller version, the filename of the currently loaded CNC program file is loaded.

#




[title] MCAGuard
[path] G-code/Special commands/

Switches on or off the machine area guard, no collisions will be given.
This is used during the rendering process, where the job file is checked for collisions with the machine area and tool change area.


:::BlockQuote
MCAGuard \<on | off>
:::


[title] F; (Feed rate)
[path] G-code/Other input codes/

The F parameter in G-code is a versatile value that represents the feed rate, which is the rate at which the machine's tool or device moves relative to the workpiece during the machining process. This parameter can be applied to various machines and processes, such as milling, turning, laser cutting, or 3D printing, and typically determines the speed of linear and curved toolpath movements. The F parameter plays a crucial role in controlling the efficiency, accuracy, and surface finish quality of the machined part or object.

To set the feed rate, program `F...`. The application of the feed rate is described in Section 2.1.2.5, unless the inverse time feed rate mode is in effect, in which case the feed rate is as described in Section 3.6.23.&#x20;

[title] Profiles
[path] Software Manual/How to.../

:::::Tabs
::::Tab{title="Version 5"}
:::hint{type="warning"}
Support for profiles was added in version 5.2 of the software. Older versions require separate installations in different directories to work.
:::

The default location for configurations is in the install directory in the config folder. In most cases, it is desirable to have separate instances of all settings and macro files. These can then be edited without affecting the other configuration. In this case, it is advisable to have every configuration in a different folder on the PC. To achieve this, there are two ways depending on the situation.

### Setting up a configuration from an existing configuration

When the new configuration is based on an existing machine (e.g. when creating two configurations for a machine with changeable tool heads), the files present in the config folder can be copied to a new separate directory. This directory should ideally be located in the config folder with a descriptive folder name. In this example we will be setting up a lathe machine, we therefore will copy the files to a folder named "lathe"

::Image[]{src="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/GZcEkUFrf-5IjLKalWWqt_image.png" signedSrc size="50" width="268" height="270" position="flex-start" caption}

Now the settings below can be followed to complete the setup.

### Setting up a new configuration from scratch

When the new machine's configuration differentiates fundamentally from the original (e.g. for a totally different machine), it is recommended to set up the configuration from scratch.

Create a copy of the shortcut on the desktop and rename it to be able to differentiate it from the other configuration. In this example, we will be creating a setup for a lathe machine denoted by Eding CNC Lathe.

::Image[]{src="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/0Ye9Nd64MRC52KYqmsIeF_image.png" signedSrc size="50" width="189" height="121" position="flex-start" caption}

Right-click on the shortcut for the new configuration and select properties. Under Target, add the location where the new configuration should be stored. In this case, we opt for a folder within the config folder named lathe. Additionally, the name of the configuration file should be specified.

:::hint{type="info"}
Make sure a space is present between the configuration file
:::



::Image[]{src="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/YwUzbsmc72l8lNc7qxcol_image.png" signedSrc size="70" width="363" height="543" position="flex-start" caption}

Apply and close this window. Clicking this shortcut will now create a new configuration in the specified location.
::::

:::Tab{title="Version 4"}
If you have multiple machines controlled from the same computer, you can make a copy of the software icon on the desktop and then rename one to “CNC4.03 TURN” and the other “CNC4.03 MILL,” for example.

::Image[]{src="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/ZMQ-Nkp5uDVUyMS1ryj12_image.png" signedSrc size="38" width="191" height="117" position="flex-start" caption}

Now right-click the right icon ICON and select “properties”:

::Image[]{src="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/O0wh8XWmJZ-6BCRAqIT1F_image.png" signedSrc size="50" width="358" height="510" position="flex-start" caption}

Add the name of the settings file behind **C:\CNC4.03\cnc.exe** to use for the software, in this case, we use **turn.ini.&#x20;**&#x54;he result is that with the left **CNC4.03 Mill** Icon without changes except the name, **cnc.ini** is used as the file name for all settings, and with the right **CNC4.03 Turn** Icon, **turn.ini** is used for the settings. So now you have created 2 configurations.
:::
:::::

:::hint{type="info"}
Running multiple instances of the Eding CNC software on the same PC is not supported. When multiple machines are supposed to run simultaneously, separate computers must be used.
:::


[title] M Function override and user M-functions
[path] G-code/Macro programming/

The system allows M functions in the range of M1..M999.  This means there are many unused M-functions.
The user can create their own M-Function by creating a subroutine for it in the macro.cnc.&#x20;

For example:

:::hint{type="info"}
sub m100
;Do your stuff here
Msg “my M100”
M54 p1; switch on AUX output 1
endsub
:::

# Parameters


So if the G-code file performs M100, the subroutine will be called. Also, parameters in the form M100 S100 are possible.
In the subroutine the parameter can be accessed using #19 (#1 .. #26 accesses parameter A..Z), S is number 19 in the alphabet.
This creates further possibilities:
It is possible to override existing M functions as well.
Suppose you want additional function for M3 which is spindle on standard.
If you spindle has an output speed-reached, you can wait for it like this:



:::hint{type="info"}
sub m3
&#x20;msg "my customized m3"
&#x20;m3 s#19                                    ;The real m3, inside sub routine this m3 will execute the real m3
&#x20;m56 P1 L2 Q60                         ; Wait max. 1 minute for input 1 to become low
endsub
:::



When you are inside your m3 subroutine and perform an m3, then the subroutine is not called, but the default m3 is called instead. There are some limitations on using the M Function override:


• There must be nothing else on the G-code line as the M-Function, e.g.


:::hint{type="info"}
N2000 M3 S1000 is OK.


N2000 M3 M8 G1X100 is NOT OK!
:::




• The user parameters 1-26 will be used as parameter and will be overwritten when M-Function subroutines are used. Take this into account and do not use #1..#26 in your program if you use this functionality. Variable 1-26 match with the letter of the alphabet, #1 will get the value of parameter A, #26 will get the value of parameter Z.&#x20;




[title] G33, G33.1 (Spindle-Synchronized Motion)
[path] G-code/Supported G-code/

For spindle-synchronized motion in one direction, program `G33 X... Y... Z... K...` where K gives the distance moved in XYZ for each revolution of the spindle.

For G33 the software performs this:

1. Start a synchronized move with the spindle with K feed per revolution. Assumed is that the spindle already runs ([**M3, M4, M5, M90 - M97 (Spindle/Tool head Control)**](docId\:LCGnVkPx_hp4rq3G5m9QV))
2. Done

For G33.1 the software performs:

1. Start a synchronized move with the spindle with K feed per revolution. Assumed is that the spindle is running (M3)
2. Wait until this motion is done
3. Reverse spindle direction
4. Move back to the original position where we were before the G33.1
5. Done

All the axis words are optional, except that at least one must be used.

It is an error if:

- All axis words are omitted
- The spindle is not turning when this command is executed
- The requested linear motion exceeds machine velocity limits due to the spindle speed


[title] Coordinates
[path] Getting started/User interface/1. Tab overview/

![](https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/diMcV52EO-ozLwfBhI5Rh_coordinates.png)

The coordinates tab allows the operator to calibrate and switch between the coordinate systems. Furthermore, Z height compensation and optionally A Cylinder kinematics can be set up here.

# Calibrate

![](https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/25yHmSLd38se7rFJlPKRO_coordinates-calibrate.png)

Pressing one of the buttons in the calibrate section sets the current position as the origin for that coordinate system. The button performs `G10 L20 P... X... Y... Z...` Where `P...` is the number of the coordinate system and the coordinates are the current position of the machine. For more information on this action see [**G10 (Set Coordinate System Data)**](docId\:b9LKOzR8VYIIM7e85U0X3).

The offsets associated with a coordinate system can be seen on the [**Variables tab**](docId\:GXw9wEBk8aZ35cyV-ELYH) tab, where these values can be edited as well.

# Activate

![](https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/QknayZpUuqX3M-sa2ZpmB_coordinates-activate.png)

Pressing one of the buttons in the activate section activates that coordinate system. This means that the offsets of that coordinate system are applied to the machine's position. The button performs `G54` to `G59.3` depending on the button. For more information on this action see [**G54 - G59.3 (Select Coordinate System)**](docId\:baX8uyfAimzYLPAp9bPJ3).

The currently active coordinate system is shown by the accented color of one of the coordinates. Additionally, it can be seen in the list of currently active G-codes.

::Image[]{src="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/QNipqKGLvc_bhXQWHY4kk_image.png" signedSrc size="26" width="178" height="97" position="flex-start" caption="G54 is currently active, G55 is not." alt}

::Image[]{src="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/9_9UcJomty-U23qWbzrBI_image.png" signedSrc size="72" width="357" height="66" position="flex-start" caption="G54 is currently active." alt}

#

# Milling un-even surfaces.

This compensation can compensate for slight unevenness in the material surface. It is intended for relatively small compensation with a smooth, natural behavior.

![](https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/IQ9U9EEMBPQowmXMOxVlr_image.png)



![](https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/c8G6BQ9BnwlF9UdxPQCHK_image.png "Allowed types of compensation")

The compensation is applied directly to the motion of the Z axis, therefore the acceleration profile is determined by the shape of the compensation.

In cases where the compensation is not continuous, position errors may occur depending on the driver type used, the quantity of the discontinuity, and the speed of the actuators used. In open-loop systems, this may result in lost steps, and in closed-loop systems, this may result in a position following error.

## Start Measurement

::Image[]{src="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/nGIbg5xt2hK-ZsAMk32U5_z-height-comp-start-measurement.png" signedSrc size="50" width="361" height="438" position="flex-start" caption}

This button will pop up an interpreter dialog for the automatic measurement macro using a touch probe. It executes the `zhcmgrid` macro. We provide a default implementation for this in the default macro file, but this may be modified by the machine builder or user. These instructions assume the use of the unmodified macro.

![](https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/a9Tneol3JDsKWj9TNxKzu_z-height-comp-grid-measure-dialog.png)

- **nx** The number of points on the x-axis to be measured. This needs to be a whole number.
- **ny** The number of points on the y-axis to be measured. This needs to be a whole number (integer).
- **maxZ** The z height from where the measurements start. Ensure that this is higher than the highest point on the grid or the probe will collide with the material.
- **minZ** The lowest point that the probe operation will travel to. If a point is below this number on the z-axis, this point will not be measured, this is displayed to the user during and after the measurements.
- **gridSize** The distance between measurement points on each axis.
- **Feed** The feed rate at which the probe operation measures the point. The lateral movements occur at G0 speeds.

Pressing **Cancel** will not run the Z Height Calibration macro. Pressing **Submit** will perform the calibration. **Render** will render the movements of the macro in the job view. Executing the macro again after the render is complete will open the dialog again with the previously entered values. Adjustments can be made and the calibration can be started.

After the calibration is complete, the measurements will be loaded into the software, but it is not activated yet. This is done by either checking the **Z height compensation on** checkbox or by executing the `ZHC ON` command. Additionally, the compensation is saved to the installation directory as *zHeightCompTable.txt.*

## Save Measurement

::Image[]{src="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/L-SzZzCKzeCUak0Km3ywJ_z-height-comp-save-measurement.png" signedSrc size="50" width="361" height="438" position="flex-start" caption}

This button saves the measurements to a file. A dialog opens where the location and name of the file can be selected.

## Load Measurement

::Image[]{src="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/vVLlN8UX0JItTvbW_Pgfu_z-height-comp-load-measurement.png" signedSrc size="50" width="361" height="438" position="flex-start" caption}

This button will open a file dialog where the file containing the calibrations must be selected. This loads the file, but it does not activate the Z height compensation yet. This is done by either checking the **Z height compensation on** checkbox or by executing the `ZHC ON` command.

## Check Measurement

::Image[]{src="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/8Pj5qBxPNDrwYO3oh4pQS_z-height-comp-check-measurement.png" signedSrc size="50" width="361" height="438" position="flex-start" caption}

This button checks the currently loaded compensation file for completeness. This executes the `ZHCcheck 20` command.

## Move To Start Position

::Image[]{src="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/s-fr4XMZQuZDN98Q8ZxWY_z-height-comp-move-start-position.png" signedSrc size="50" width="361" height="438" position="flex-start" caption}

This button will move the machine to the first measurement point in the Z height compensation grid. It executes the `ZHCMOVETO 0 0` command.

## Z height compensation on

::Image[]{src="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/JmIPTKhRPhKyegWyjQQrW_z-height-comp-on.png" signedSrc size="50" width="361" height="438" position="flex-start" caption}

Checking this checkbox will enable the Z height compensation, unchecking it will disable the Z height compensation.

## Show current compensation value in DRO

::Image[]{src="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/wf_gUQNvmPqIG2RXpf18s_z-height-comp-show-in-dro.png" signedSrc size="50" width="361" height="438" position="flex-start" caption}

Checking this checkbox will show the compensation values in the DRO.

::::VerticalSplit{layout="middle"}
:::VerticalSplitItem
![](https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/qzkrJgnwj8_3euZf8hLjY_z-height-comp-off-dro.png "Show current compensation on")
:::

:::VerticalSplitItem
![](https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/w6MHfYzlLIDRxllf2zLIx_z-height-comp-on-dro.png "Show current compensation off")
:::
::::

**



# A Cylinder

![](https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/aoAlc8ZXSiqOp0IiYio-f_a-cylinder.png)

This feature is useful when milling on the outside of a cylinder using a rotary axis on the A-axis. When enabling this feature, a flat job file can be projected on the cylinder where the movements on the Y-axis are mapped to the A-axis, taking into account the radius of the cylinder.

:::hint{type="info"}
Note that this configuration is only visible when the A-axis is set to *4th milling axis* and Kinematics DLL is set to *acilinderkins.dll.*
:::

This feature requires some configuration to correctly map the Y-axis to the A-axis. It requires both the rotation point and the radius of the cylindrical workpiece.

## Setting Rotation Point

::Image[]{src="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/n9JY4gRnGt2BWjfGzyb5K_a-cylinder-rotation-point.png" signedSrc size="70" width="458" height="185" position="flex-start" caption}

The rotation point can either be set by entering the position and pressing (1) Set position, or by moving to the rotation point and pressing (1) Set to current position.

### (1) Set position

::Image[]{src="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/iLabS8-WNDjgTzt08Bwhp_a-cylinder-set-position.png" signedSrc size="70" width="458" height="185" position="flex-start" caption}

When the exact location of the rotation point is known beforehand, these coordinates (Y- and Z-axis) can be set directly in the respective input boxes. The (1) Set position needs to be pressed to apply and confirm this position.

### (1) Set to current position

::Image[]{src="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/8QKL616Tm9aQ59B-uEAlF_a-cylinder-set-to-current-position.png" signedSrc size="70" width="458" height="185" position="flex-start" caption}

When the exact position is not known beforehand, usually because the A-axis is removable and cannot be repositioned exactly, the position can be calibrated manually. To calibrate the position, move the machine to the rotation point on the Y- and Z-axis, and press (1) Set to current position.

## Setting Cylinder Radius

::Image[]{src="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/drcRxZHSGilMsLHxpV0fw_a-cylinder-radius.png" signedSrc size="70" width="458" height="185" position="flex-start" caption}

The cylinder radius can be set either by entering the radius in the input box labeled R and pressing (2) Set radius, or by moving to the machine so the tool touches the top of the material and pressing (2) Calibrate radius.

### (2) Set radius

::Image[]{src="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/l9g-F70ZIqcS5U5t1qgoh_a-cylinder-set-radius.png" signedSrc size="70" width="458" height="185" position="flex-start" caption}

When the exact radius of the material is known beforehand, the value can be entered in the input box labeled R. To confirm this position, the (2) Set radius button needs to be pressed.

### (2) Calibrate radius

::Image[]{src="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/kjdZ1vJ-JoPAsPK4pY7sw_a-cylinder-calibrate-radius.png" signedSrc size="70" width="458" height="185" position="flex-start" caption}

When the radius of the cylinder is not known beforehand, the radius can be determined by moving the tooltip on top of the material and pressing (2) Calibrate radius. This calculates the radius from the current position of the machine and the previously set rotation point.

## Reset calibration

::Image[]{src="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/Gsz-nyIpV7ojcisIGI-A5_a-cylinder-reset-calibration.png" signedSrc size="70" width="458" height="185" position="flex-start" caption}

Pressing the Reset calibration button will reset the rotation point and radius settings, in case Map Y -> A was turned on, it will be turned off after.

## Save calibration

::Image[]{src="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/Ireztnl4PU82RUpZ9Alz1_a-cylinder-save-calibration.png" signedSrc size="70" width="458" height="185" position="flex-start" caption}

Pressing the Save calibration button will save the rotation point and radius to the configuration file, so these values will automatically reload when restarting the software. Do note that Map Y -> A is not turned on automatically every time the software starts. This needs to be done either by moving the Y-axis to the rotation point and checking the checkbox or by executing the `KIN ON` command.

## Move to Y rotation point

::Image[]{src="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/bPgLklV9fkpoDPLK222yj_a-cylinder-move-to-y-rotation-point.png" signedSrc size="70" width="458" height="185" position="flex-start" caption}

Pressing the Move to Y rotation point button will move the machine to the Y coordinate of the rotation point.

:::hint{type="info"}
Note that the machine will move to the Y coordinate of the rotation point at the current X and Z coordinate. It is therefore important to ensure that the Z axis is at an appropriate height and there are no obstructions in the path.
:::

## Map Y -> A

::Image[]{src="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/r6W9YcxGiDObbQJpbu7UK_a-cylinder-map-y-to-a.png" signedSrc size="70" width="458" height="185" position="flex-start" caption}

Checking the Map Y -> A checkbox will turn the A Cylinder options on if all conditions are met. Ensure that:

- The rotation point is set
- The radius is set
- The Y-axis is at the rotation point

In case these conditions are not met, the option will not turn on and an error message will be visible in the message window.

[title] WaitForRLYUpdate
[path] G-code/Special commands/

This command will hold execution of further commands until the next relay board value update.

The relay board values are updated automatically at an interval, so while usage of this command is not necessary for most applications, if it is expected that the input state changed less than 100 ms before a value read, using this command right before the reading command will ensure that the read value is current.

[title] LogMsg
[path] G-code/Special commands/

Logs message to a text file.

The file has to be specified prior by the [**LogFile**](docId\:O8uMNjPOxJ29-g_tKKAsN) command.

:::BlockQuote
LogMsg  "\<message text>"
:::

### Parameters

- message text parameter specifies the message to be displayed
  - if [**Variables**](docId\:oqHjs3LLCfQkSac_cemc2) numbers are included outside of quotation marks, this results in the value of that variable being appended to the message e.g.&#x20;
    `Msg "value of variable 4000 is " #4000`
  - if `%t...`  is included outside of quotation marks, this results in the tool description of the tool number being appended to the message e.g.&#x20;
    `Msg "T1 is " %t1` or `msg "Current tool: " %t#5011`
  - if `%d`  is included outside of quotation marks, this results in the current date and time being appended to the message e.g. `Msg "Time: "%d` will output *Time: 2022-10-28 13:35:52*

### Example

:::BlockQuote
LogFile "text.txt" 1
LogMsg "Current position of X is "#5001
:::


Now check the contents of file text.txt will now contain&#x20;

Msg, LogMsg, WarnMsg, ErrMsg can now use %txx (xx = 0-99) and this will show the tool description text.&#x20;
Example: msg %t#5011 " is changed to "Tool number 5" this is text from the tool table.

[title] MistOff
[path] G-code/Special commands/

Turns off the mist output on the controller.

:::hint{type="warning"}
If a custom override for M9 exists, this subroutine is not executed by the MistOff command. Refrain from using MistOff in this case.
:::


[title] G10 (Set Coordinate System Data)
[path] G-code/Supported G-code/

To set the coordinate values for the origin of a coordinate system, program `G10 L2 P X... Y... Z... A...`, where the P number must evaluate to an integer in the range 1 to 9 (corresponding to [**G54 - G59.3 (Select Coordinate System)**](docId\:baX8uyfAimzYLPAp9bPJ3)), and all axis words are optional. The coordinates of the origin of the coordinate system specified by the P number are reset to the coordinate values given (in terms of the absolute coordinate system). Only those coordinates for which an axis word is included on the line will be reset.&#x20;

It is an error if:&#x20;

- the P number does not evaluate as an integer in the range 1 to 9.&#x20;

If origin offsets (made by [**G92, G92.1, G92.2, G92.3 (Coordinate System Offset)**](docId:-_dARrxY7XSFSM2Qp6jJL)) were in effect before G10 is used, they will continue to be in effect afterward.&#x20;

The coordinate system whose origin is set by a G10 command may be active or inactive at the time the G10 is executed.&#x20;

Example: `G10 L2 P1 x 3.5 y 17.2` sets the origin of the first coordinate system (the one selected by G54) to a point where X is 3.5 and Y is 17.2 (in absolute coordinates). The Z coordinate of the origin (and the coordinates for any rotational axes) are whatever those coordinates of the origin were before the line was executed.&#x20;

`G10 L20 P... X... Y... Z... A...`

Set coordinate system given by P number relative to actual machine position.
Working is similar to G92. Jog to any position, then apply e.g. `G10 L20 P1 X0 Y0` to set G54 coordinate system zero point at the current machine position.

[title] Run behavior during loading of job file and simulation
[path] G-code/Macro programming/

Simulation refers to the software mode that is used when no hardware is connected.
During the loading of a G-Code file, the interpreter runs the file while generating output for the graphic. During this no actions to the machine are applied, no motion and no I/O, only checks if the g-code is valid and stays within the machine limits.


If there is advanced macro programming, e.g. because the machine has automatic tool change, it is important to take into account that in simulation and render mode no machine actions take place.

## Check example that should be always executed

Suppose we have a machine with a 6-tool automatic tool changer. A check is programmed that generates an error if a g-code file is loaded that tries to change the tool to a number that the machine does not have:

:::BlockQuote
if \[#5011 > 6]
&#x20; ErrMsg “Please select a tool in the range of 1 to 6”
Else
&#x20; ; Code to perform the tool change
Endif
:::

It stands to reason that we want this “ErrMsg …” line to be executed always, when running but also in simulation mode and when loading the file.&#x20;

Check example that should be only executed during the job&#x20;
---------------------------------------------------------------

:::BlockQuote
sub check\_airpresure
&#x20;   m56 p5
&#x20;   if \[#5399 == 0]
&#x20;     errmsg "Error, No Air pressure"
&#x20;   else
&#x20;     msg "Air Pressure OK"
&#x20;   endif
endsub
:::

This check on air pressure will not work correctly while loading a g-code file or while the system is in simulation mode, because no actual inputs are read.

:::BlockQuote
sub check\_airpresure
&#x20;   ; Check only if not rendering and not during simulation
&#x20;   if \[\[#5380 == 0] and \[#5397 == 0]]
&#x20;       m56 p5
&#x20;       if \[#5399 == 0]
&#x20;         errmsg "Error, No Air pressure"
&#x20;       else
&#x20;         msg "Air Pressure OK"
&#x20;       endif
&#x20;   endif
endsub
:::

Here we see the modification to make the on the air pressure sensor input 5 simulation and render proof, the check is only performed when we are not in render or simulation mode, only an extra if statement that checks variable `#5380` (contains the value of 1 when simulation mode) and `#5397` (contains the value of 1 when rendering) is added.



[title] DlgMsg
[path] G-code/Special commands/

:::hint{type="warning"}
Please note that mentioned commands may fail during loading and/or simulation.

To make your macro code avoid these errors please take a look at the manual section [**Run behavior during loading of job file and simulation**](docId\:p2Jh9fFRvp0WCb5jCD9px)
:::

Opens a dialog window that the operator can interact with.

The dialog can be used to input up to 12 [**Variables**](docId\:oqHjs3LLCfQkSac_cemc2) values.&#x20;
The dialog will show the current values of the specified variables.
The specified variable values are changed according to the users' input once the dialog is submitted.

:::BlockQuote
DlgMsg \<dialog name> \<variable1 text> \<variable1 number> ... \<variable12 text> \<variable12 number>
:::

The dialog has an OK and a Cancel button.
When the user selects OK, variable `#5398`  is set to 1.
When the user selects CANCEL, variable `#5398` is set to -1.
During the job loading process, the dialog display is skipped and `#5398` is automatically set to the value of 1. The macro can give the queried variables a value before the `DlgMsg` command takes place which will serve as a default value.

The macro file can then query check these variables and proceed accordingly.



If \<dialog name>.png file exists in the *dialogPictures* directory located inside the installation directory then it will be displayed in the dialog.

### Example

`DlgMsg "Please input job parameters" width 100 height 101`

:::BlockQuote
Sub user\_3 ;Example of dlgmsg
&#x20;   \#1 = 0
&#x20;   \#2 = 0
&#x20;   \#3 = 0
&#x20;   \#4 = 0
&#x20;   \#5 = 0
&#x20;   \#6 = 0
&#x20;   \#7 = 0
&#x20;   \#8 = 0
&#x20;   \#9 = 0
&#x20;   \#10 = 0
&#x20;   \#11 = 0
&#x20;   \#12 = 0

&#x20;   ;dlgmsg will show a dialog with picture edingcnc.png from the installation directory\dialogPictures
&#x20;   dlgmsg "edingcnc" "A" 1 "B" 2 "C" 3 "D" 4 "E" 5 "F" 6 "G" 7 "H" 8 "I" 9 "J" 10 "K" 11 "L" 12

&#x20;   if \[#5398 == 1]
&#x20;       msg "OK #1="#1 "#2="#2 "#3="#3 "#4="#4 "#5="#5 "#6="#6 "#7="#7 "#8="#8 "#9="#9 "#10="#10 "#11="#11 "#12="#12
&#x20;   else
&#x20;       msg "CANCEL #1="#1 "#2="#2 "#3="#3 "#4="#4 "#5="#5 "#6="#6 "#7="#7 "#8="#8 "#9="#9 "#10="#10 "#11="#11 "#12="#12
&#x20;   endif

Endsub
:::

![](https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/Mnsi8OwGFvy9ptgjyLBTB_image.png)


[title] 1. Tab overview
[path] Getting started/User interface/

At the top, several tabs are displayed. Based on your configuration, some might have been hidden.

::Image[]{src="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/H5hRLGrsCCJO5nyymcshs_image.png" signedSrc size="64" width="966" height="187" position="center" caption="Tabs in the main window" alt}

Each tab has a separate function:

| **Tab name** | **Function**                                                               |
| ------------ | -------------------------------------------------------------------------- |
| Operate      | The main operations screen                                                 |
| Coordinates  | Setting up different coordinate systems, surface compensatio, and 4th axis |
| Program      | An interface to external CAM software                                      |
| Tools        | An overview of available tools                                             |
| Variables    | Information about internal variables, also for debugging purpose           |
| IO           | Information about inputs, and controlling manually outputs                 |
| Service      | Service-related information                                                |
| Setup        | The Setup screen for configuring hard and software                         |
| Help         | Information about software, support and more.                              |

It's also possible to navigate the tabs through the keyboard shortcuts.

**Tab navigation**

It's possible to navigate the tabs by using keyboard shortcuts:

| Keyboard keys            | Function                |
| ------------------------ | ----------------------- |
| `CTRL `+ `TAB`           | Select tab to the left  |
| `CTRL `+ `SHIFT `+ `TAB` | Select tab to the right |
| `ALT `+ `O`              | Jump to operate tab     |

In the next pages we're&#x20;

[title] Software installation
[path] Getting started/

## Installation of the Eding CNC software

To find the latest version of the software alongside the release notes, visit the [**download page**](https://edingcnc.com/download-software/) on the website.

![](https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/8NGsWbM68owz5ir383SAH_image.png)

Download the executable for the software version you wish to install, and start the installer.

:::hint{type="info"}
Windows might not recognize the installer and flag it as unsafe, in this case, a pop-up will show. If the installer was downloaded from our website it is safe to install. Click ***More info*** to continue with the installation process.



::Image[]{src="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/gdhwIPMtazlS9e9h0PHIn_image.png" size="50" width="665" height="624" caption position="flex-start" signedSrc="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/gdhwIPMtazlS9e9h0PHIn_image.png"}



Click ***Run anyway***



::Image[]{src="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/6eY6gkajBKS-nZ-qEiQXi_image.png" size="50" width="663" height="622" caption position="flex-start" signedSrc="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/6eY6gkajBKS-nZ-qEiQXi_image.png"}



The installation of the software will continue
:::

When the installation starts, a window will be presented. Click ***Yes&#x20;***&#x74;o start the installation.

::Image[]{src="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/Js0dREjZwkbP6WN6NFHke_image.png" size="50" width="541" height="259" caption position="flex-start" signedSrc="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/Js0dREjZwkbP6WN6NFHke_image.png"}

The installer will start by asking the language for the installation. Select the appropriate language and press ***OK*** to continue.

::Image[]{src="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/LkWmpATKKNFKiAtScdqau_image.png" size="40" width="345" height="208" caption position="flex-start" signedSrc="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/LkWmpATKKNFKiAtScdqau_image.png"}

A window with the License Agreement will show. If you agree, select ***I accept the agreement*** and press ***Next***&#x20;

::Image[]{src="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/Lpgkw2RoBNX4sQkV0OMa0_image.png" size="70" width="579" height="479" caption position="flex-start" signedSrc="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/Lpgkw2RoBNX4sQkV0OMa0_image.png"}

The installation location is shown. In this case, the software will be installed in folder ***C:\EdingCNC5.00***. To change the install directory, click on ***Browse…*** and select a different folder.&#x20;

::Image[]{src="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/VAKGW9b0DtCT1eOPA5UBF_image.png" size="70" width="578" height="478" caption position="flex-start" signedSrc="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/VAKGW9b0DtCT1eOPA5UBF_image.png"}

The next screen will ask whether to create a desktop shortcut and/or Quick Launch shortcut. Make the selection and press ***Next***

::Image[]{src="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/gvTaoYShtsA_ykX5RXIxL_image.png" size="70" width="579" height="478" caption position="flex-start" signedSrc="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/gvTaoYShtsA_ykX5RXIxL_image.png"}

On the last screen of the installation, an overview is shown of the selected settings for installation. Click ***Install*** to start the installation.

::Image[]{src="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/Q64h7wmRwYRkvPwPEaBVm_image.png" size="70" width="578" height="479" caption position="flex-start" signedSrc="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/Q64h7wmRwYRkvPwPEaBVm_image.png"}

The progress of the installation can be monitored. It can be stopped by clicking on ***Cancel***.

::Image[]{src="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/n1jlr95bjs02gmmBnku8f_image.png" size="70" width="579" height="479" caption position="flex-start" signedSrc="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/n1jlr95bjs02gmmBnku8f_image.png"}

When the installation has finished, a new window appears in which several options can be selected. These settings will help in using the software, some are mandatory others are optional but recommended.

::Image[]{src="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/YNNHVf41uakPc1EsWUjYE_image.png" size="70" width="578" height="479" caption position="flex-start" signedSrc="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/YNNHVf41uakPc1EsWUjYE_image.png"}

The options that are greyed out are mandatory.
The settings are:

- **Start EdingCNC.exe as administrator.**
  This setting is recommended because starting the software as an administrator ensures it will utilize the maximum system performance. Without it, the software might experience dropouts.
- **Virtual keyboard (osk) compatibility mode.**
  This option makes sure that the virtual keyboard can be used in the software.
- **Disable User Account Control prompt.**
  This will stops Windows from interfering with the installed application; you can deselect the option. However, the
  OS can ask you whether you are sure you want to start the software, which can be very annoying.
- **Network drives visible for cnc.exe.**
  By default, applications running in administrator mode cannot see the network drives from the logged-in user.
- **Disable Windows Update.**
  Disabling Windows Update is highly recommended, because you do not want Windows to update and interrupt a
  200-hour CNC job. Better update Windows manually when you want to.
- **Show known Windows file extensions.**
  This will help in recognizing files and selecting the correct ones by displaying the file extensions. For example,
  ‘mickey.cnc’ or ‘cnc.ini’. Although not vital, it is strongly advised to enable it to help you operate the software.&#x20;

By clicking on ‘**Next**’, these settings will be set.

The next screen shows options to install additional third-party software that can be used in combination with the Eding CNC software. Select what software to install and press ***Next***.

::Image[]{src="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/Rcf-Q5fhLHrEKUg6meqqD_image.png" size="70" width="578" height="479" caption position="flex-start" signedSrc="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/Rcf-Q5fhLHrEKUg6meqqD_image.png"}

The final step of the installation is installing the USB drivers. This is also done through a simple installer. Click the checkboxes to install the USB drivers or/and view the release note for the software if desired. When this is the first time installing the software, make sure to also install the USB drivers. Click on ***Finish*** to finalize the installation.

::Image[]{src="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/_VfX5oEaz6-q9GZzNgbZv_image.png" size="70" width="577" height="479" caption position="flex-start" signedSrc="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/_VfX5oEaz6-q9GZzNgbZv_image.png"}

If ‘View the ReleaseNotes.txt’ is selected, immediately after pressing ‘Finish’ the release note will be shown. The release notes sum up what has changed or is new for this release of the software. Shown below is part of a release note.

![](https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/cb6da0FOOciHK4vwbii7K_image.png)

If the ***Install USB drivers*** option was selected, a window will appear to install these. Click ***Next*** to start installing the drivers.

::Image[]{src="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/CcLV_a2s44be1C4ykziRF_image.png" size="70" width="619" height="481" caption position="flex-start" signedSrc}

Upon completion, click ***Finish*** to close the wizard.

::Image[]{src="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/1WCEG-lRFS7gvZ8aixFKN_image.png" size="70" width="619" height="480" caption position="flex-start" signedSrc="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/1WCEG-lRFS7gvZ8aixFKN_image.png"}

:::hint{type="info"}
Please note, the driver will contain the name USBCNC, this is Eding CNCs previous name.
:::

After the installation, please reboot the PC. After rebooting, connect the machine. The machine is now found by Windows if the machine is connected using USB.

To check that the USB driver was installed correctly, open Device Manager in Windows by pressing the ***Win key + X***, then choose Device Manager.

This will show the device manager. If a USB-based controller is connected it will show under ***Ports*** as ***USBCNC COM Port***. The port that is indicated, which is COM17 in this case, may vary per configuration.

![](https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/LYjQKgOgX5Hz1lNZElSIy_image.png)

:::hint{type="info"}
If your machine is connected to the PC using Ethernet, follow the [**Network setup**](docId:1TgQjqVfRjXCVg0VjcGw1) to ensure a connection to the machine can be established. When using a USB controller this step can be skipped.
:::


[title] Software Manual
[path] /

This software manual describes how to use the software, and it's intended audiences are end-user how operate a machine.

[title] Macro programming
[path] G-code/

The macro file provides a place to add functionality or override existing behavior specific to the machine. The contents of this file are treated the same way as a job and accept the same commands.











[title] GetHeightControlVact
[path] G-code/Special commands/

:::hint{type="info"}
This command will only be executed when the machine type is set to **plasma&#x20;**&#x6F;r **laser**.
:::

Retrieves the current value of the Vact of the height control.

:::BlockQuote
GetHeightControlVact \<variable number>
:::

The resulting value is stored in the specified variable.

### Example

:::BlockQuote
GetHeighControlVact 5399
:::


[title] Supported G-code
[path] G-code/

G codes of the RS274/NGC language are shown on a specific page each.

The descriptions contain command prototypes, formatted as `a code block`.

In the command prototypes, three dots `…` substitute a real value. As described earlier, a real value may be (1) an explicit number, 4, for example, (2) an expression like `[2+2]`, (3) a parameter value, `#86`, for example, or (4) a unary function value like `acos[0]`.

In most cases, if axis words (any or all of `X…`, `Y…`, `Z…`, `A…`, `B…`, `C…`) are given, they specify a destination point. Axis numbers are in the currently active coordinate system unless explicitly described as being in the absolute coordinate system. Where axis words are optional, any omitted axes will have their current value. Any items in the command prototypes not explicitly described as optional are required. It is an error if a required item is omitted.

In the prototypes, the values following letters are often given as explicit numbers. Unless stated otherwise, the explicit numbers can be real values. For example, `G10 L2` could equally well be written `G[2*5] L[1+1]`. If the value of parameter 100 were 2, `G10 L#100` would also mean the same. Using real values that are not explicit numbers, as just shown in the examples, is rarely useful.

If `L…` is written in a prototype, the `…` will often be referred to as the "L number". Similarly, the `…` in `H…` may be called the "H number", and so on for any other letter.

| G Code                                                                                        | Meaning                                                       |
| --------------------------------------------------------------------------------------------- | ------------------------------------------------------------- |
| [**G0 (Rapid Linear Motion)**](docId\:sMEIPmfNLzqwnk8pfSSZC)                                  | Rapid positioning                                             |
| [**G1 (Linear Motion Feed at Feed Rate)**](docId\:rIq0kXPLy7LFjPIEIK24B)                      | Linear interpolation                                          |
| [**G2, G3 (Arc at Linear Feed)**](docId\:DpEeyJKCmM8gHOFGpx91b)                               | Circular/helical interpolation (clockwise)                    |
| [**G2, G3 (Arc at Linear Feed)**](docId\:DpEeyJKCmM8gHOFGpx91b)                               | Circular/helical interpolation (counterclockwise)             |
| [**G4 (Dwell)**](docId\:G-JGI-faoUvo1TqR5NO78)                                                | Dwell                                                         |
| [**G10 (Set Coordinate System Data)**](docId\:b9LKOzR8VYIIM7e85U0X3)                          | Coordinate system origin setting                              |
| [**G17, G18, G19 (Plane Selection)**](docId\:Uo-PghD6GWTJ4p9XJ2NzP)                           | XY-plane selection                                            |
| [**G17, G18, G19 (Plane Selection)**](docId\:Uo-PghD6GWTJ4p9XJ2NzP)                           | XZ-plane selection                                            |
| [**G17, G18, G19 (Plane Selection)**](docId\:Uo-PghD6GWTJ4p9XJ2NzP)                           | YZ-plane selection                                            |
| [**G20, G21, G70, G71 (Length Units)**](docId\:tMFh7VgzKxLCgKy5DalRG)                         | Imperial system selection                                     |
| [**G20, G21, G70, G71 (Length Units)**](docId\:tMFh7VgzKxLCgKy5DalRG)                         | Millimeter system selection                                   |
| [**G28, G30 (Return to Home)**](docId\:hiQpVG7ODggc7wQsV-aNk)                                 | Move to park position 1, setup on the variable page           |
| [**G28, G30 (Return to Home)**](docId\:hiQpVG7ODggc7wQsV-aNk)                                 | Move to park position 2, setup on the variable page           |
| [**G33, G33.1 (Spindle-Synchronized Motion)**](docId\:fWBx0fGEp7FiOiEzUhpa5)                  | Lathe, motion synchronized to the spindle                     |
| [**G38.2 (Straight Probe)**](docId\:F-KbF-l0L8hsYegslP9Xs)                                    | Straight probe                                                |
| [**G40, G41, G41.1, G42, G42.1 (Cutter Radius Compensation)**](docId\:fyQHuNSflfSdBpEnqYkQJ)  | Cancel cutter radius compensation                             |
| [**G40, G41, G41.1, G42, G42.1 (Cutter Radius Compensation)**](docId\:fyQHuNSflfSdBpEnqYkQJ)  | Start cutter radius compensation left                         |
| [**G40, G41, G41.1, G42, G42.1 (Cutter Radius Compensation)**](docId\:fyQHuNSflfSdBpEnqYkQJ)  | Start cutter radius compensation right                        |
| [**G43, G43.1, G49 (Tool Length Offset)**](docId\:DcUuepSG6YTe-sD5BBvdh)                      | Tool length offset (plus), tool X offset for lathe            |
| [**G43, G43.1, G49 (Tool Length Offset)**](docId\:DcUuepSG6YTe-sD5BBvdh)                      | Cancel tool length offset                                     |
| [**G53 (Move in Absolute Coordinates)**](docId\:LcnWMZ2I2Ii08f90oBaL-)                        | Motion in machine coordinate system                           |
| [**G54 - G59.3 (Select Coordinate System)**](docId\:baX8uyfAimzYLPAp9bPJ3)                    | Use preset work coordinate system 1                           |
| [**G54 - G59.3 (Select Coordinate System)**](docId\:baX8uyfAimzYLPAp9bPJ3)                    | Use preset work coordinate system 2                           |
| [**G54 - G59.3 (Select Coordinate System)**](docId\:baX8uyfAimzYLPAp9bPJ3)                    | Use preset work coordinate system 3                           |
| [**G54 - G59.3 (Select Coordinate System)**](docId\:baX8uyfAimzYLPAp9bPJ3)                    | Use preset work coordinate system 4                           |
| [**G54 - G59.3 (Select Coordinate System)**](docId\:baX8uyfAimzYLPAp9bPJ3)                    | Use preset work coordinate system 5                           |
| [**G54 - G59.3 (Select Coordinate System)**](docId\:baX8uyfAimzYLPAp9bPJ3)                    | Use preset work coordinate system 6                           |
| [**G54 - G59.3 (Select Coordinate System)**](docId\:baX8uyfAimzYLPAp9bPJ3)                    | Use preset work coordinate system 7                           |
| [**G54 - G59.3 (Select Coordinate System)**](docId\:baX8uyfAimzYLPAp9bPJ3)                    | Use preset work coordinate system 8                           |
| [**G54 - G59.3 (Select Coordinate System)**](docId\:baX8uyfAimzYLPAp9bPJ3)                    | Use preset work coordinate system 9                           |
| [**G61, G64 (Path Control Mode and Look Ahead Feed)**](docId:2bjZDN24vLTY2JWZO_Txw)           | Set path control mode: exact path                             |
| [**G61, G64 (Path Control Mode and Look Ahead Feed)**](docId:2bjZDN24vLTY2JWZO_Txw)           | Set path control mode: exact stop                             |
| [**G61, G64 (Path Control Mode and Look Ahead Feed)**](docId:2bjZDN24vLTY2JWZO_Txw)           | Set path control mode: continuous                             |
| [**G68 (Coordinate System Rotation)**](docId\:VpyIB1fwdN7BZilxiuRb6)                          | XY rotation                                                   |
| [**G76 (Threading lathe)**](docId\:D1pnA2zyfWITU3ZQNDH54)                                     | Lathe, threading                                              |
| [**G80 (Cancel Modal Motion)**](docId:_FSUESGLv1pm3hKfV84FL)                                  | Cancel motion mode (including any canned cycle)               |
| [**G81 - G89 (Canned Cycles)**](docId\:bMnlFQH73fIoeAmGBFFvk)                                 | Canned cycle: drilling                                        |
| [**G81 - G89 (Canned Cycles)**](docId\:bMnlFQH73fIoeAmGBFFvk)                                 | Canned cycle: drilling with dwell                             |
| [**G81 - G89 (Canned Cycles)**](docId\:bMnlFQH73fIoeAmGBFFvk)                                 | Canned cycle: peck drilling                                   |
| [**G81 - G89 (Canned Cycles)**](docId\:bMnlFQH73fIoeAmGBFFvk)                                 | Canned cycle: right-hand tapping                              |
| [**G81 - G89 (Canned Cycles)**](docId\:bMnlFQH73fIoeAmGBFFvk)                                 | Canned cycle: boring, no dwell, feed out                      |
| [**G81 - G89 (Canned Cycles)**](docId\:bMnlFQH73fIoeAmGBFFvk)                                 | Canned cycle: boring, spindle stop, rapid out                 |
| [**G81 - G89 (Canned Cycles)**](docId\:bMnlFQH73fIoeAmGBFFvk)                                 | Canned cycle: back boring                                     |
| [**G81 - G89 (Canned Cycles)**](docId\:bMnlFQH73fIoeAmGBFFvk)                                 | Canned cycle: boring, spindle stop, manual out                |
| [**G81 - G89 (Canned Cycles)**](docId\:bMnlFQH73fIoeAmGBFFvk)                                 | Canned cycle: boring, dwell, feed out                         |
| [**G90, G91 (Set Distance Mode)**](docId\:nwnlRN2wTcaF7W5zIc62j)                              | Absolute distance mode                                        |
| [**G90, G91 (Set Distance Mode)**](docId\:nwnlRN2wTcaF7W5zIc62j)                              | Incremental distance mode                                     |
| [**G92, G92.1, G92.2, G92.3 (Coordinate System Offset)**](docId:-_dARrxY7XSFSM2Qp6jJL)        | Offset coordinate systems and set parameters                  |
| [**G92, G92.1, G92.2, G92.3 (Coordinate System Offset)**](docId:-_dARrxY7XSFSM2Qp6jJL)        | Cancel offset coordinate systems and set parameters to zero   |
| [**G92, G92.1, G92.2, G92.3 (Coordinate System Offset)**](docId:-_dARrxY7XSFSM2Qp6jJL)        | Cancel offset coordinate systems but do not reset parameters  |
| [**G92, G92.1, G92.2, G92.3 (Coordinate System Offset)**](docId:-_dARrxY7XSFSM2Qp6jJL)        | Apply parameters to offset coordinate systems                 |
| [**G93, G94, G95 (Set Feed Rate Mode)**](docId\:KTxMEPfXIFobiWMm13_uW)                        | Inverse time feed rate mode                                   |
| [**G93, G94, G95 (Set Feed Rate Mode)**](docId\:KTxMEPfXIFobiWMm13_uW)                        | Units per minute feed rate mode                               |
| [**G98, G99 (Set Canned Cycle Return Level)**](docId\:Em_0wL_Cftu_Bq5_Bezue)                  | Initial level return in canned cycles                         |
| [**G98, G99 (Set Canned Cycle Return Level)**](docId\:Em_0wL_Cftu_Bq5_Bezue)                  | R-point level return in canned cycles                         |


[title] Modbus
[path] G-code/Special commands/

Modbus command can be used to communicate with other devices over Modbus protocol.

Please note that your controller board needs to have the Modbus feature and that the controller board has to be the master device.

:::BlockQuote
ModBus \<s> \<f> \<a> \<n> \<v> \<u> \<b> \<fb> \<t> \<o>
:::

### Parameters

- **s** defines the slave number.
- **f&#x20;**&#x66;unction number
- **a&#x20;**&#x61;ddress
- **n** number of bits or registers
- **v** value
- **u** user variable
- **b&#x20;**&#x62;aud rate
  - If not specified, baud rate of 115200 is used
- **fb** parity / stop bits configuration designation
  - If not specified, no parity and 2 stop bits are used
- **t** data type used in RMR/3 and WMR/16
- **o** the data ordering used in RMR/3 and WMR/16

### Supported baud rates

- 9600
- 19200
- 38400
- 57600
- 76800
- 115200

### Supported function numbers

|    |      |                               |
| -- | ---- | ----------------------------- |
| 1  | RMC  | Read Multiple Coils           |
| 2  | RDI  | Read Discrete Inputs          |
| 3  | RMR  | Read Multiple Registers       |
| 4  | RMIR | Read Multiple Input Registers |
| 5  | WSI  | Write Single Coil             |
| 6  | WSR  | Write Single Registers        |
| 15 | WMC  | Write Multiple Coils          |
| 16 | WMR  | Write Multiple Registers      |
| 17 | RS   | Report SlaveID                |

The abbreviation can be used instead of the number, so `F=RMC` or `F RMC` is
equal to `F1`

### Parity / stop bits configuration designations

| Setting | Parity | Stop bits |
| ------- | ------ | --------- |
| E1      | even   | 1         |
| O1      | odd    | 1         |
| N2      | none   | 2         |
| N1      | none   | 1         |

### Data type designations (introduced in version 5.3)

| Value | Type information                  |
| ----- | --------------------------------- |
| u16   | 16-bit unsigned integer (default) |
| u32   | 32-bit unsigned integer           |
| u64   | 64-bit unsigned integer           |
| i16   | 16-bit signed integer             |
| i32   | 32-bit signed integer             |
| i64   | 64-bit signed integer             |
| d32   | 32-bit floating point number      |
| d64   | 64-bit floating point number      |

### Data ordering designation (introduced in version 5.3)

| Value | Ordering information                                            |
| ----- | --------------------------------------------------------------- |
| n     | No reordering of data (default)                                 |
| b     | Swap the bytes within each register(16-bits)                    |
| w     | Swap the placement of each register used in the combined value  |
| bw    | Swap both the register placement and the bytes in each register |

### Example

Write single coil

:::BlockQuote
Modbus s1 f5 a0 v1
:::

Write single coil, baud rate of 19200, even parity with 1 stop bit

:::BlockQuote
Modbus s1 f5 a0 v1 b19200 fb=e1
:::

Read multiple coils, store beginning at user variable #300

:::BlockQuote
modbus s1 f=rmc a0 n8 u300&#x20;
msg "c0="#300 " c1="#301 " c2="#302 " c3="#303 " c4="#304 " c5="#305 " c6="#306 " c7="#307
:::

Read discrete inputs

:::BlockQuote
modbus s1 f=rdi a0 n8 u400&#x20;
msg "i0="#400 " i1="#401 " i2="#402 " i3="#403 " i4="#404 " i5="#405 " i6="#406 " i7="#407
:::

Write single register

:::BlockQuote
modbus s1 f6 a0 v255
:::

Write multiple coils

:::BlockQuote
\#500=0
\#501=1
\#502=0
\#503=1
\#504=0
\#505=1
\#506=0
\#507=1
modbus s1 f15 a0 n8 u500
:::

Write multiple holding registers

:::BlockQuote
\#600 = 1
\#601 = 2
modbus s1 f16 a0 n2 u600
:::

Report slave id

:::BlockQuote
modbus s1 f17
:::

Read a double value (64-bit floating point) from a slave device with no data reordering. (introduced in version 5.3)

:::BlockQuote
modbus s1 f3 a0 n1 u700 t=d64 o=n
:::


[title] G61, G64 (Path Control Mode and Look Ahead Feed)
[path] G-code/Supported G-code/

Ideally one would like to have constant cutting speed during the work and maximum accuracy. This ideal is **physically** not possible, similar to driving a racecar on curvy roads is not possible with constant velocity. It is trivial that it needs to brake in the curves and accelerate on straight roads. If you would do the same speed in the curves as on a straight road, the car will spin out of control and collide. This analogy holds for CNC machines, constant speed and accuracy together are physically not possible. It would require infinite acceleration to go through a corner from one direction to another. In a CNC machine, this would result in position/step loss of stepper motors or high following error with servos. If a motion path consists of small lines (G1) it is even worse than driving a racecar because there is a sharp corner between every line. This is often the case with CAM-generated motion paths (g-code).

So a compromise has to be made. There are various options to choose the optimum between accuracy and constant speed or fast speed versus jerkiness.

## G61

`G61` puts the machine into exact path mode, In G61, the motion velocity between motion segments goes to zero, and the end position in corners is exactly reached, use this if you require maximum accuracy. When a workpiece consists of many small lines this gives a quite jerky/vibrating machine because of the continuous acceleration-deceleration-stop behavior. It is more practical to use G64 and G64 P… as specified below.

## G64

G64 is to be used for more smooth and fast motion. There are 4 parameters that can be used, they are explained below individually but they can be combined on one line.

### G64

`G64` without additional parameters switches on continuous/smooth velocity mode. In G64, subsequent moves are blended, when the previous move starts to decelerate and reaches a velocity such that the specified accuracy isn’t violated, the next move starts to accelerate, and the two motions are added. The result is smooth motion with the highest constant speed. The corners however are rounded. The amount of rounding is depending on the max acceleration of the machine. The higher the acceleration, the less rounding.

### G64 P…

The optional P value specifies the distance reached to the corner while blending. The next move is blended with the current such that the tool path remains no more than P from the corner. This will cause a velocity ramp down in the corner but not to zero. The figure below is a rectangle of 10x10 milled with `F2000`. This is done with P values from 0.1 to 1, you can see the impact. This gives the best compromise between accuracy and smooth motion. So you can say `G64 P...` is like a compromise between G61 and G64 without P.



::Image[]{src="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/NneXCnLx9_McBc-ZpG-D8_image.png" size="54" width="546" height="500" caption="This figure shows the impact of the P parameter on the amount of rounding." position="flex-start" signedSrc="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/NneXCnLx9_McBc-ZpG-D8_image.png"}

You may also conclude here that it is very important to have high acceleration on the machine because we can ramp down faster in the corner and have more accurate corners at higher speeds.

### G64 Q…

The optional Q parameter activates an embedded line simplification algorithm, which tries to combine short lines and make one long line. The optional Q parameter gives the tolerance used in the algorithm. Again to reduce the number of small corners.

The behavior of a long g-code program with short line segments is further optimized by the look ahead feed, see next page.

## Look Ahead feed

To explain this, we will compare a running CNC machine again with driving a race car.



::Image[]{src="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/Uc1X1aHXS2fg1-IC5SEBv_image.png" size="40" width="434" height="414" caption="Example race track" position="flex-start" signedSrc="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/Uc1X1aHXS2fg1-IC5SEBv_image.png"}

The road maximum velocity signs have to be obeyed and you have to drive your car exactly over the white line in the middle of the road. You will try to reach the maximum allowed velocity where possible. When you see a curve coming up ahead, you will brake so that you will not drift off the white line. You will try to look ahead as far as you can see and you take care that you can stop in time if the road suddenly stops.

When you would maintain your speed in sharp curves, you will drift off the road possibly resulting in a car accident. When the road has many short curves, then you will not be able to reach the desired speed. The more power you have in the car, the higher speed you will reach because you can accelerate faster.

This is a good comparison with a CNC machine, the same issues apply. A machine cannot suddenly change velocity, to reach a velocity the motors must accelerate first for a certain time to reach the velocity.

Eding CNC LAF behaves like the ideal racecar driver, it will reach the highest possible velocity without violating the maximum motor accelerations.

There is one additional problem while running CNC programs, some programs consist of short line segments. When the line pieces connect tangentially (are in line), then LAF will accelerate through over the lines, reaching the maximum allowed speed. Without LAF the speed would not be reached.

The angle to which LAF considers the segments in line is a setup parameter. The theoretical ideal value would be very small so that no acceleration value occurs.

More practical values are in the range of 1 to 4 degrees, the experience learns that most machines can handle acceleration spikes up to a certain limit.

The value can be set up to 180 degrees, in this case, you must know what you are doing, it can be useful during e.g. foam cutting. Be aware however that if the curve contains real sharp angles that step pulse loss may be the result when using large minimum LAF angles.

In practice, we have seen that milling times of complex 3D workpieces can be done within 50% of the time compared to competitors who do not have LAF. With `G64 R...` the LAF angle can be changed in the g-code file. The standard LAF angle is in the software setup. To give some realistic values: A value of 3 is good for most machines. A value of 6 may already give too much Jerky ness on some machines. Still, there are customers using values of 20 here, but they have quite specific machine constructions and applications e.g. dental milling.

### G64 F...

The F parameter defines the value of the Accel/Decel filter placed behind LAF. LAF with high R values (Angle) can cause acceleration spikes because LAF will travel through corners without stopping. The F parameter filters the trajectory generated by LAF and takes care the acceleration is never violated.

`F1` will give a RAMP time that matches with the max velocity / max acceleration from the setup and so `F1` and maximum speed will lead to the max acceleration that is allowed. Smaller F values filter less. This can be used if the milling velocity is less than the max velocity of the machine. Example:

The max velocity in the setup is 200 and the used milling velocity is `F6000` (100 mm/s),

Then F0.5 is safe to use. So now you can do this `G64 R100 F1` and you will not get acceleration spikes but a very smooth and fast movement. The price to pay is corner rounding which is depending on the max acceleration of the machine, the higher the max acceleration, the less corner rounding.

A good application example is with milling rubber or similar flexible material, the milling speed must be constant otherwise more material is removed in the corners due to the lower speed and the flexibility of the rubber. The `F1` in combination with `R100` will give constant and high speed for good milling surface quality of the rubber.

:::hint{type="info"}
For milling e.g. rubber when constant speed is more important than rounding. To have an acceptable amount of rounding the machine needs to have very high acceleration. This function was tested and used on a machine with a relatively low speed (100 mm/sec) and very high acceleration (4000 mm/sec \* sec).
:::

### G64 R…

The R parameter is the look-ahead feed angle. When subsequent lines/arcs have an angle together less than this value, the trajectory-generator will accelerate through these segments and this way optimizes the production time. With `R0`, LAF is switched off, and with LAF off a (much) lower but more constant speed is achieved. The higher the angle, the higher the speed, but the jerkier the motion becomes because of high acceleration peaks. This needs to be tuned depending on the quality of the machine and the power of the used motors. A compromise is to be found between speed and machine behavior.

### G64 R... S... D... (NEW for V4.03.xx)

New algorithm (Still experimental, but successfully used by a few customers): With the standard LAF setting `G64 R...` (no `S...` and no `D...`), the velocity in corners will be zero if the angle between the segments is bigger than LAF angle in the set-up. But there are angles that are big and also smaller angles, so we found a solution where depending on the angle size, the speed in the corner the velocity is limited but not to zero and further limited if the angle gets bigger. This allows faster production, especially for 3D work.

Putting a circle to the original path would be a solution. But this cannot be done in real-time and is also not always wanted because we want the contour to be milled as specified in the g-code.

However, we can calculate a circle between 2 segments when knowing their start and end vectors. The circle radius can then be used to calculate an allowable velocity in the corner taking the max acceleration into account like this:

**Vcorner = SQRT ( Amax \* R)&#x20;**&#x57;here A max is the maximum possible acceleration which is known by the setup and R is the calculated Radius depending on the angle between the segments and the D value supplied in the G64 command.

This is basically the idea. If we draw it, it gets more clear:

::Image[]{src="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/bFMtboPzqNeJQqYcurImx_image.png" size="70" width="1195" height="886" caption position="flex-start" signedSrc="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/bFMtboPzqNeJQqYcurImx_image.png"}

**Segment 1** and **Segment 2** are 2 subsequent motion segments.

**Alfa** is the change of direction angle between the segments. **Beta** is the angle between the lines to fit the circle. **D** is the user-supplied max deviation between the junction and the circle, this determines how far the junction speed is limited. **R** is the calculated radius from D and Beta.

So **D** is the parameter that determines the amount of speed reduction in the corner. Practical values are in the order of 0.01 to 0.0001 for **D**. The smaller the value the smaller the circle radius, the smaller the velocity in the corner becomes.

This value needs to be tuned by experimenting on the target machine, if the value is too high the machine will move jerkily. Note that the original path is traveled, but the corner velocity is limited in the corner as if there was an arc between the segments.

Both new and old algorithms co-exist in the software. So the user can specify 2 angles and the D parameters now with G64 together with the existing P parameter.

### G64 P... R... S... D...

**P**: Parameter for max rounding when blending **R**: LAF angle for standard algorithm where LAF will travel full speed of angle is lower. **S**: 2nd angle, the new algorithm will work between the `R...` angle and `S...` angle. **D**: deviation of the virtual circle in the corner used in the algorithm. Example: `G64 P0.1 R3 S90 D0.001`

The machine operates at full speed when the angle is less than the R angle. Reduced speed depends on D when the angle is between the R and S angle. For angles bigger than S... angle blending kicks in and uses the P... as tolerance.

### G64 P... Q... R... S... D... F...

There are 6 parameters that can be combined with G64. For normal milling, mostly G64 P... is used.

[title] Flow control
[path] G-code/Macro programming/

You can use the following flow control commands in a job:&#x20;

**IF\[x]-ELSE-ENDIF** constructs to define x-dependent execution&#x20;

**WHILE\[x]-ENDWHILE** constructs to define x-dependent repeated execution&#x20;

**SUB** \<name>-**ENDSUB&#x20;**&#x63;onstructs to define a subroutine&#x20;

**GOSUB** \<name> construct to call a subroutine&#x20;

[title] G90, G91 (Set Distance Mode)
[path] G-code/Supported G-code/

To make the current point have the coordinates you want (without motion), program G92 X… Interpretation of RS274/NGC code can be in one of two distance modes: absolute or incremental.

To go into absolute distance mode, program G90. In absolute distance mode, axis numbers (X, Y, Z, A, B, C) usually represent positions in terms of the currently active coordinate system.

To go into incremental distance mode, program G91. In incremental distance mode, axis numbers (X, Y, Z, A, B, C) usually represent a distance from the current values of the numbers.

I and J numbers always represent increments, regardless of the distance mode.

[title] TCAGuard
[path] G-code/Special commands/

Switches on or off the tool change area guard.
This can be used during the rendering process, where the job file is checked for collisions with the machine area and tool change area.

:::BlockQuote
TCAGuard \<on | off>
:::


[title] FloodOff
[path] G-code/Special commands/

Turns off the flood output on the controller.

:::hint{type="warning"}
If a custom override for M9 exists, this subroutine is not executed by the FloodOff command. Refrain from using FloodOff in this case.
:::


[title] EdingCNC Documentation
[path] /

On the left side, you can find numerous subjects. On the top left, there is a search bar so you can try to quickly find relevant information.

![](https://archbee-image-uploads.s3.amazonaws.com/CkesZuDJRdQOxJSzCi_9_-0v7vxub8ulGqxDC5aQ585-20241216-220845.jpg)

Legacy documents can be found here:

[**V4.03 Full manual**](https://edingcnc.com/wp-content/uploads/2021/11/edingcnc_manual_v4.03.pdf)

[**Customizing V4.03 manual**](https://edingcnc.com/wp-content/uploads/2021/11/gui-customizing-manual.pdf)

[**Basic User Manual V4.03**](https://edingcnc.com/wp-content/uploads/2021/11/Basic_User_manual_EdingCNC_GUI.pdf)

[title] G17, G18, G19 (Plane Selection)
[path] G-code/Supported G-code/

Program `G17` to select the XY-plane, `G18` to select the XZ-plane, or `G19` to select the YZ-plane.

[title] ErrMsg
[path] G-code/Special commands/

Shows an error message in the message log and stops current action of the machine.

:::BlockQuote
ErrMsg  "\<message text>"
:::

### Parameters

- message text parameter specifies the message to be displayed
  - if [**Variables**](docId\:oqHjs3LLCfQkSac_cemc2) numbers are included outside of quotation marks, this results in the value of that variable being appended to the message e.g.&#x20;
    `Msg "value of variable 4000 is " #4000`
  - if `%t...`  is included outside of quotation marks, this results in the tool description of the tool number being appended to the message e.g.&#x20;
    `Msg "T1 is " %t1` or `msg "Current tool: " %t#5011`
  - if `%d`  is included outside of quotation marks, this results in the current date and time being appended to the message e.g. `Msg "Time: "%d` will output *Time: 2022-10-28 13:35:52*


[title] G80 (Cancel Modal Motion)
[path] G-code/Supported G-code/

Program G80 to ensure no axis motion will occur.

It is an error if:

- Axis words are programmed when G80 is active unless a [**Modal groups**](docId\:wwCKgqqdL1JYxmBZy8GYf) 0 code is programmed which uses axis words.


[title] G20, G21, G70, G71 (Length Units)
[path] G-code/Supported G-code/

Program `G20` to use inches for length units. Program `G21` to use millimeters.&#x20;

It is usually a good idea to program either `G20` or `G21` near the beginning of a program before any motion occurs, and not to use either one anywhere else in the program. It is the responsibility of the user to be sure all numbers are appropriate for use with the current length units. `G70` and `G71` are added for CAM software compatibility.

[title] SP (Store Position)
[path] G-code/Special commands/

Store the current work position in a text file.

:::BlockQuote
SP "\<file path>" \[mode]
:::

### Parameters

- The file path parameter is a text parameter that specifies the file path to be used to write to
- mode parameter needs to be a value of either 0 or 1
  - **0** specifies that the file is to be overwritten
  - **1** specifies that the file is to be appended to
  - If this parameter is omitted, the file is appended to


[title] G54 - G59.3 (Select Coordinate System)
[path] G-code/Supported G-code/

To select coordinate system 1, program G54, and similarly for other coordinate systems. The system-number-G-code pairs are (1`G54`), (2`G55`), (3`G56`), (4`G57`), (5`G58`), (6`G59`), (7`G59.1`), (8`G59.2`), and (9`G59.3`).&#x20;

It is an error if:&#x20;

- one of these G-codes is used while cutter radius compensation is on.&#x20;


[title] PC Requirements
[path] Getting started/

|                  | Minimum requirement                                                                                                                                                                                                             | Recommended                       |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------- |
| Processor        | Intel Core i3 / 1.4 GHz                                                                                                                                                                                                         | Intel Core i3 / 2.0 GHz or better |
| Memory           | 4GB RAM                                                                                                                                                                                                                         | 8GB RAM or more                   |
| Graphics         | Any with OpenGL2.1 support or better                                                                                                                                                                                            |                                   |
| Display          | 1280 x 768                                                                                                                                                                                                                      |                                   |
| Operating System | Windows 10 ¹ 32 or 64-bit                                                                                                                                                                                                       |                                   |
| Connection Ports | 1x Free USB 2.0 for USB controllers.<br />1x Free Ethernet port for Ethernet controllers.<br />1x Additional free USB 2.0 if a wireless pendant is used.<br />1x Additional free USB 2.0 if a UIO-10 or Operator Panel is used. |                                   |
| Storage          | At least 250MB free, SSD is strongly recommended                                                                                                                                                                                |                                   |
| Speakers         | Only for the "probe beep" feature                                                                                                                                                                                               |                                   |

1: Windows XP supported up to software version 4.03.46

[title] User interface
[path] Getting started/


[title] Service tab
[path] Getting started/User interface/1. Tab overview/

![](https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/JEna4hLUg5mlwxb1vJNcn_service.png)

The service tab shows information relevant to servicing the machine. It shows the times and distances that the machine has run.

# Service status

::Image[]{src="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/Tt_6NwMKDtQIh9qMLxjK6_service-service-status.png" signedSrc size="70" width="876" height="560" position="flex-start" caption}

- **Job time \[h]** - The time in hours that the machine has performed jobs since receiving service.
- **Job distance \[unit]** - The distance that the machine has cut in the units selected by the user since receiving service.
- **Number of jobs done** - The number of jobs the machine has performed since receiving service.
- **Reset** - Pressing this button resets the service status when the machine has received service.

# Machine working status totals

::Image[]{src="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/yaT4CHJsBLyC6BTnVvthj_service-machine-working-status-totals.png" signedSrc size="70" width="876" height="560" position="flex-start" caption}

- **Total job time \[h]** - The total time in hours that the machine has performed jobs
- **Total distance \[unit]** - The total distance that the machine has cut in the units selected by the user
- **Total number of jobs done** - The total number of jobs the machine has performed

# Service parameters

::Image[]{src="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/EULUcj7pl0PL0if4G_gXH_service-service-parameters.png" signedSrc size="70" width="876" height="560" position="flex-start" caption}

- **Service time interval \[h]** - The time interval for service, the software will show a message when this time has elapsed at the end of a job.
- **Service distance interval \[unit]** - The traveled distance interval for service, the software will show a message to indicate the machine needs service.
- **Save service interval changes** - Pressing this button saves the interval settings

# Pump parameters

::Image[]{src="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/vb0tN3HRY9xEM90ZM0xKy_service-pump-parameters.png" signedSrc size="70" width="876" height="560" position="flex-start" caption}

Configuring the pump settings is explained on its specific page [**Configuring an automatic oil pump**](docId:0ZdtgcXnxakIhbvmR1Yph).


[title] M10, M11; Laser control (CNC7xx series only)
[path] G-code/Supported M-codes/

For the ***CNC7xx controller***, we have extra commands to control a laser 'on-the-fly' eg. for engraving.

Please note, to use them, an extra command is required to be executed first:

`LaserEngrave XY`.

## &#x20;M10 - Laser off

`M10` - laser off

## M11 - Laser on

:::BlockQuote
M11 S\<0-100>  - to switch laser on
:::

M11 will turn the laser on at a specified power or change the power.

:::BlockQuote
S-parameter: The percentage 0-100% at which the laser power needs to be set.
:::



## Example

This enables the feature where motion can be performed without a stop in between:

:::BlockQuote
LaserEngrave ON
M10
G1 F... X...
M11&#x20;
G1 X...
M10 X...
G1 X...
LaserEngrave OFF
M30
:::

The laser on/off `M11` and `M10` are executed while moving exactly at the right position.&#x20;

It is possible to do a lot of small line moves (G1s) with these laser commands in between. The motion will continue while doing this with constant speed. So this is ideal for photo laser engraving.

## &#x20;See also

Laserengrave


[title] G76 (Threading lathe)
[path] G-code/Supported G-code/

### G76 P... Z... I... J... R... K... Q... H... E... L...

**P** Pitch

**Z** driveline endpoint

**I** Outside thread diameter, always positive.

**J** First cut is **J** beyond **I**, always positive.

**R** Depth regression, use 1.0 for constant cutting depths or discard the parameter.

**K** Full thread depth beyond thread peak, always positive.

**Q** Compound slide angle, typical 30.

**H** Additional spring passes at full depth, use 0 for none.

**E** Taper distance along the drive line.

**L** Taper place, none, enter, exit, both.

:::BlockQuote
;Create a thread from z=20 to z=10, outside diameter=15, inside diameter=14, 10 passes.
G0 X20 Z20
G76 P1.0 Z10 I15 J0.1 K1.0
:::

It is an error if:

- The active plane is not the ZX plane
- Other axis words, such as `X...` or `Y...`, are specified
- The `R...` degression value is less than 1.0.
- All the required words are not specified
- `P...`, `J...`, `K...` or `H...` is negative
- `E...` is greater than half the drive line length

The “drive line” is a safe line outside the thread material. The “drive line” goes from the initial location to the `Z...` value specified with G76. The Z extent of the thread is the same as the drive line.

The “thread pitch”, or distance per revolution, is given by the `P...` value.

The “thread peak” is given by the `I...` value, which is an offset from the drive line. A negative I value indicates external threads and a positive I value indicates internal threads. Generally, the material has been turned to this size before the G76 cycle.

The “initial cut depth” is given by the `J...` value. The first threading cut will be J beyond the “thread peak” position. `J...` is positive, even when `I...` is negative.

The “full thread depth” is given by the `K...` value. The final threading cut will be K beyond the “thread peak” position. `K...` is positive, even when `I...` is negative.

The “depth degression” is given by the `R...` value. `R1.0` selects constant depth on successive threading passes. `R2.0` selects constant area. Values between 1.0 and 2.0 select decreasing depth and increasing area. Values above 2.0 select decreasing area. Beware that unnecessarily high degression values will cause a large number of passes to be used.

:::hint{type="info"}
(degression = a descent by stages or steps.), every next cutting pass less material is removed during the cutting process.
:::

The “compound slide angle” `Q...` is the angle (in degrees) describing to what extent successive passes should be offset along the drive line. This is used to cause one side of the tool to remove more material than the other. A positive Q value causes the leading edge of the tool to cut more heavily. Typical values are 29, 29.5, or 30.

The number of “spring passes” is given by the `H...` value. Spring passes are additional passes at full thread depth. If no additional passes are desired, program `H0`.

Tapered entry and exit moves can be programmed using `E...` and `L...`. `E...` gives a distance along the drive line used for the taper. `E0.2` will give a taper for the first/last 0.2 length units along the thread. `L...` is used to specify which ends of the thread get the taper. Program `L0` for no taper (the default), `L1` for entry taper, `L2` for exit taper, or `L3` for both entry and exit tapers.

The tool will pause briefly for synchronization before each threading pass, so a relief groove will be required at the entry unless the beginning of the thread is past the end of the material or an entry taper is used.

Unless using an exit taper, the exit move (traverse to original X) is not synchronized to the spindle speed. With a slow spindle, the exit move might take only a small fraction of a revolution. If the spindle speed is increased after several passes are complete, subsequent exit moves will require a larger portion of a revolution, resulting in a very heavy cut during the exit move. This can be avoided by providing a relief groove at the exit, or by not changing the spindle speed while threading.

The sample program g76.ngc shows the use of the G76 canned cycle and can be previewed and executed on any machine using the sim/lathe.ini configuration.

::Image[]{src="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/k3wwM8e7YGUo64Vr_d47l_image.png" size="70" width="602" height="238" caption="Figure: G76 canned cycle" position="flex-start" signedSrc="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/k3wwM8e7YGUo64Vr_d47l_image.png"}

This is how it works:

1. Before the start, the spindle rate is measured.
2. The feed for de z-axis is calculated: F = pitch \* spindleRate
3. The controller is programmed such that a movement is started on the spindle pulse.
4. The movement is calculated and sent to the machine.
5. The movement is started when the spindle pulse passes.
6. Before the treading starts, the spindle rate is measured, averaged, and the feed is calculated from this.

Not that the inside and outside thread diameter is determined by the start position, the position before G76, and the I, and K parameters.

[title] SetPos (set position)
[path] G-code/Special commands/

To set the current position of an axis to a certain value, program `SetPos X... Y... Z... A... B... C...`, where all axis words are optional, except that at least one must be used.&#x20;

It is an error if:&#x20;

- All axis words are omitted.

### Example

Set the machine position of the X axis to 100

:::BlockQuote
SetPos x100
:::

Set the machine position of the X axis to the value stored in var #4000

:::BlockQuote
SetPos x#4000
:::

Set the machine position of multiple axes

:::BlockQuote
Setpos x#4000 y#4001 z#4002 a0 b0 c10
:::

Read a position from a Modbus device and set the position to this value; this can be used in a homing routine, for example. For more information on the modbus command reference the [**Modbus**](docId\:dkUObkUk2JT5u2v2PkZF4) document.

:::BlockQuote
Modbus s1 f3 a0 n1 u700 t=d32
SetPos x#700
:::


[title] WarnMsg
[path] G-code/Special commands/

Shows a warning message in the message log.

:::BlockQuote
WarnMsg  "\<message text>"
:::

### Parameters

- message text parameter specifies the message to be displayed
  - if [**Variables**](docId\:oqHjs3LLCfQkSac_cemc2) numbers are included outside of quotation marks, this results in the value of that variable being appended to the message e.g.&#x20;
    `Msg "value of variable 4000 is " #4000`
  - if `%t...`  is included outside of quotation marks, this results in the tool description of the tool number being appended to the message e.g.&#x20;
    `Msg "T1 is " %t1` or `msg "Current tool: " %t#5011`
  - if `%d`  is included outside of quotation marks, this results in the current date and time being appended to the message e.g. `Msg "Time: "%d` will output *Time: 2022-10-28 13:35:52*


[title] M20, M21, M22 (Torch height control / Plasma THC)
[path] G-code/Supported M-codes/

`M20` - THC on
`M21` - THC off
`M22 Q...`  - THC setpoint voltage
[title] S (Tool intensity/spindle speed)
[path] G-code/Other input codes/

The S parameter in G-code can be described as a value that controls the primary output intensity or speed of the machine's tool or device, such as spindle speed in milling machines, or laser intensity in laser cutters and engravers. This parameter can be adapted to suit different machines and is used to manage the performance or effectiveness of the working tool or device within the machine's operation.

To set the speed in revolutions per minute (rpm) of the spindle, program `S...`. The spindle will turn at that speed when it has been programmed to start turning. The S-word can be used regardless of whether the spindle is turning or not. If the speed override switch is enabled and not set at 100%, the speed will be different from what is programmed.&#x20;

It is permitted to program `S0`; the spindle will not turn if that is done.&#x20;
The controllers that support PWM output will have their PWM value set corresponding to the requested spindle speed if the spindle is turned on.

An error is issued if:&#x20;
•	the S value is negative.&#x20;

[title] G98, G99 (Set Canned Cycle Return Level)
[path] G-code/Supported G-code/

When the spindle retracts during canned cycles, there is a choice of how far it retracts:

1. retract perpendicular to the selected plane to the position indicated by the R-word
2. retract perpendicular to the selected plane to the position that axis was in just before the canned cycle started (unless that position is lower than the position indicated by the R-word, in which case use the R-word position).

To use option (1), program G99. To use option (2), program G98. Remember that the R-word has different meanings in absolute distance mode and incremental distance mode.

[title] G50, G51 (Scaling)
[path] G-code/Supported G-code/

`G50` turns scaling off.

### UNIFORM Scaling

`G51 P... I... J...`

P is the scaling factor.

### NON-UNIFORM Scaling (X, Y different, only applicable when NO Arcs)

`G51 X... Y... I... J...`

X is the scaling factor for X coordinates.

Y is the scaling factor for Y coordinates.

I is the X coordinate scaling point

J is the Y coordinate scaling point

:::hint{type="info"}
When used in combination with [**G68 (Coordinate System Rotation)**](docId\:VpyIB1fwdN7BZilxiuRb6), the rotation point and scaling point are the same.
:::


[title] G0 (Rapid Linear Motion)
[path] G-code/Supported G-code/

For rapid linear motion, program `G0 X... Y... Z... A...`, where all the axis words are optional, except that at least one must be used. The G0 is optional if the current motion mode is G0. This will produce coordinated linear motion to the destination point at the current traverse rate (or slower if the machine will not go that fast). It is expected that cutting will not take place when a G0 command is executing.

An error occurs if:

• All axis words are omitted.

If cutter radius compensation is active, the motion will differ from the above; see Appendix A. If [**G53 (Move in Absolute Coordinates)**](docId\:LcnWMZ2I2Ii08f90oBaL-) is programmed on the same line, the motion will also differ.

[title] SetAcc (set acceleration)
[path] G-code/Special commands/

Changes in the maximum acceleration of an axis.

:::BlockQuote
SetAcc \<axis X-C> \<accValue mm/sec²>&#x20;
:::

### Example

`SetAcc Y 400` Set the max acceleration value for the Y-Axis to 400.


[title] Laserengrave
[path] G-code/Special commands/

laserengrave enables the laser motion mode. Use this command in MDI or in G-code at the start of a jobThis command changes the working mode of your controller board, restricting it to XYZ axes.

## &#x20;Laserengrave XY

Turns the laser engraving mode on

## laserengrave OFF

Turns the laser engraving mode on

[title] MistOn
[path] G-code/Special commands/

Turns on the mist output on the controller.

:::hint{type="warning"}
If a custom override for M8 exists, this subroutine is not executed by the MistOn command. Refrain from using MistOn in this case.
:::


[title] HomeIsEStop
[path] G-code/Special commands/

The HomeIsEStop feature can be used to guard the home sensor inputs while operating the machine. When the feature is turned on using the `HomeIsEStop on` command, any activation of one of the sensors triggers an error, causing the machine to stop moving.&#x20;

Because the machine needs to be able to home correctly, it is important to turn the feature off before starting any home operation. This can be done using the `HomeIsEStop off` command. It is advisable to place these commands at the start and end of all homing subroutines (either in the `sub home_all` or in each `sub home_x, y...`).

Switches ON or OFF the "Home Switch triggers E-Stop" feature.

:::BlockQuote
HomeIsEStop \<on | off>
:::


[title] G28, G30 (Return to Home)
[path] G-code/Supported G-code/

Two home positions are defined (by [**System-Parameters/Variables**](docId\:oqHjs3LLCfQkSac_cemc2) `#5161` to `#5166` for G28 and variables `#5181` to `#5186` for G30). The variable's values are in terms of the absolute coordinate system but are in unspecified length units.&#x20;

To return to the home position by way of the programmed position, program `G28 X... Y... Z... A...` (or use G30). All axis words are optional. The path is made by a traverse move from the current position to the programmed position, followed by a traverse move to the home position. If no axis words are programmed, the intermediate point is the current point, so only one move is made. The order of Z depends on its position, if the end position is higher than the current Z position Z will move first, otherwise Z will move last, this is to prevent collisions.

:::hint{type="warning"}
Addition for lathe: For a lathe the X axis is moved first, the assumption is that X moves away from the turning center.
:::


[title] M48 - M53 (Feed-Speed Override Control)
[path] G-code/Supported M-codes/

`M48` Enable feed and speed override, set back to last user feed override value.

`M49` Disable feed and speed override and set to 100%

`M50 P...`  Set feed Override to a given P value, if the P value is less than zero feed override is disabled and the value remains as is.

`M51 P...` Set speed Override to given P value, if the P value is less than zero speed override is switched off.

`M52 P...`Enable feed Override by analog input. `M52 P0` disables feed override by analog input. P1 is optional.

`M53 P...` Enable feed Hold input. M53 P0 disable feed Hold input. P1 is optional.

To enable the speed and feed override switches, program `M48`.&#x20;
To disable both switches, program `M49`.&#x20;

[title] G43, G43.1, G49 (Tool Length Offset)
[path] G-code/Supported G-code/

1. To use the tool offset of the tool in the spindle use `G43`. This assures that always the tool length of the tool in the spindle is compensated.
2. To use a tool length offset from the tool table, program `G43 H...`, where the H number is the desired index in the tool table. ( H = 1-99)
3. To use dynamic tool compensation (not from the tool table), use `G43.1 I... K...` where `I...` gives the tool X offset (turning) and `K...` gives the tool Z offset (for turning and milling)

:::hint{type="warning"}
Warning: If you use option 2 or 3, the tool-length compensation will not adapt to the new tool after `M6T…`
:::

To have no tool length offset compensation, program `G49`

[**System-Parameters/Variables**](docId\:oqHjs3LLCfQkSac_cemc2) `#5401` to `#5499` is the tool length of tool 1-99

Variables `#5501` to `#5599` is the tool diameter of tool 1-99

Variables `#5601` to `#5699` is the tool x-offset (width for turning) offset.

The variables can be modified runtime (in the G-Code file) if needed to compensate for tool-wear.

[title] LogFile
[path] G-code/Special commands/

Specifies the file to be used by the [**LogMsg**](docId:66N8dnIbKJn8fJX6mVJ-R) command.

:::BlockQuote
LogFile "\<file path>" \<mode>
:::

### Parameters

- the file path parameter is a text parameter that specifies the file path to be used to write to
- mode parameter needs to be a value of either 0 or 1
  - 0 specifies that the file is to be overwritten
  - 1 specifies that the file is to be appended to

### Example

:::BlockQuote
LogFile "C:\log.txt" 0
:::

:::BlockQuote
LogFile "log.txt" 1
:::


[title] G96, G97 (Spindle Control Mode)
[path] G-code/Supported G-code/

Two spindle control modes are possible, depending on the mode the spindle speed is calculated differently:

### G96 (Only for Lathe)

Select constant surface speed, S is now specified as meters per minute in mm mode (G21) or Feet per minute in inch mode (G20). This means that the spindle speed is adapted automatically when the Radius changes. Suppose you program `G96 S150` in millimeter mode, the spindle speed is calculated by: RPM = S / (2 \* PI \* X), and X is the radius. So your X zero must be where the diameter is zero.

Example: Your actual X position is 100 (100 millimeters = 0.1 meter), and you program `G96 S150 D1000`, this would result in a spindle RPM of 150 / (2 \* PI \* 0.1) = 238.7 rev/min. D1000 limits the maximum speed to 1000 RPM.

### G97

`G97` is normal RPM mode, and `S...` specifies the RPM.

[title] G68 (Coordinate System Rotation)
[path] G-code/Supported G-code/

### G68 X... Y... Z... I... J... K... R...

`X... Y... Z...` Optionally points to a rotation point, if not given, the current Work Zero point is used.

`I... J... K...` Optionally, without I, J, or K the rotation takes place in the actual plane [**G17, G18, G19 (Plane Selection)**](docId\:Uo-PghD6GWTJ4p9XJ2NzP). Either `I1`, `J1`, or `K1` can be used, not a combination.

`I1` specifies a rotation about X in the YZ plane, `J1` rotates about Y in the XZ plane, and `K1` rotates about Z in the XY plane.

`R…` Is the rotation angle in degrees, positive is counter-clockwise while negative is clockwise.






[title] T (Tool number)
[path] G-code/Other input codes/

The T parameter in G-code is a value that represents the tool selection or tool change command, which is used to specify the machine's tool or device being employed for a particular operation. This parameter can be applied to various machines and processes, such as milling, turning, or laser cutting, where multiple tools or devices may be used within a single program. The T parameter is typically followed by a tool number, which corresponds to a specific tool in the machine's tool library or carousel. It plays a significant role in managing the sequence of operations and ensuring that the correct tool is engaged for each process in a multi-tool machining setup.

To select a tool, program `T...`, where the number is the tool changer slot for the tool. The tool is not changed until an [**M6 (Tool Change)**](docId\:kQG7dD1dpwUw3hchbArUT) command is programmed. The T-word may appear on the same line as the `M6` command or on a previous line.&#x20;

It is possible to program a T word more than once before a tool change takes place, but only the last issued statement is taken into consideration. The carousel may move a lot, but only the most recent T-word will take effect at the next tool change. It is OK to&#x20;

It is possible to issue `T0` this means that no tool will be selected. This is useful if the spindle needs to be empty after a tool change.&#x20;

An error occurs if:&#x20;
•	a negative T number is used,&#x20;
•	a T number larger than the number of slots in the tool changer is used.&#x20;




 

[title] Vacuum
[path] G-code/Special commands/

Switches on or off vacuum sections that are used this is especially useful for large machines with different vacuum sections.
The software will determine in which section will be machined, then this command will switch only the used sections.

:::BlockQuote
Vacuum \<on | off>
:::

### Enabling the feature

The configuration of the vacuum sections is currently not available in the GUI settings, and it must be entered in the configuration file, which contains all settings.



The definition of the vacuum sections is manually in the cnc.ini for version 4 of the software and server.ini file inside the *config* directory for version 5 of the software, under section *\[VACUUMBED]*.

To enable this feature please modify the files (while the software is turned off) by specifying `automaticMode = 1` to turn the automatic management of vacuum sections on, and specify the number of vacuum sections:

:::BlockQuote
\[VACUUMBED]
automaticMode = 1
numberOfSections = 14
:::

Afterwards please start the software. The software will modify the file further with definitions of individual sections. Close the software and open the file again to modify the individual sections:

:::BlockQuote
\[VACUUMBED]
...
section\_1\_OutputID = 101 ;0: none, 1-10: AUX1-AUX10, GPIO101 GPIO408
section\_1\_XPosition = 0.000000
section\_1\_YPosition = 0.000000
section\_1\_XWidth = 999.000000
section\_1\_YWidth = 3000.000000
:::





[title] Msg
[path] G-code/Special commands/

Shows a message in the message log.

:::BlockQuote
Msg  "\<message text>"
:::

### Parameters

- message text parameter specifies the message to be displayed
  - if [**Variables**](docId\:oqHjs3LLCfQkSac_cemc2) numbers are included outside of quotation marks, this results in the value of that variable being appended to the message e.g.&#x20;
    `Msg "value of variable 4000 is " #4000`
  - if `%t...`  is included outside of quotation marks, this results in the tool description of the tool number being appended to the message e.g.&#x20;
    `Msg "T1 is " %t1` or `msg "Current tool: " %t#5011`
  - if `%d`  is included outside of quotation marks, this results in the current date and time being appended to the message e.g. `Msg "Time: "%d` will output *Time: 2022-10-28 13:35:52*

Example

:::BlockQuote
Msg "Spindle dust cap lowered"
:::

:::BlockQuote
Msg "The value of #1 = "#1" and the value of #2 = "#2
:::


[title] Exec
[path] G-code/Special commands/

Starts an external program within the job/macro and waits until the program exits. The return value of the program is stored in [**Variables**](docId\:oqHjs3LLCfQkSac_cemc2) `#5399`

:::BlockQuote
Exec "\<program path>" "\<command line parameter>" \<timeout\[ms]>
:::

The maximum wait time is 10 minutes.

### Example

:::BlockQuote
Exec "notepad.exe" "hello.txt" 6000

:::

This executes notepad.exe and waits 1 minute for it to exit.
An error is generated if it does not exit within the specified time.


[title] G53 (Move in Absolute Coordinates)
[path] G-code/Supported G-code/

For the linear motion to a point expressed in absolute coordinates, program `G1 G53 X... Y... Z... A…` (or use [**G0 (Rapid Linear Motion)**](docId\:sMEIPmfNLzqwnk8pfSSZC) instead of [**G1 (Linear Motion Feed at Feed Rate)**](docId\:rIq0kXPLy7LFjPIEIK24B)), where all the axis words are optional, except that at least one must be used. The G0 or G1 is optional if it is the current motion mode. G53 is not [**Modal groups**](docId\:wwCKgqqdL1JYxmBZy8GYf) and must be programmed on each line on which it is intended to be active. This will produce coordinated linear motion to the programmed point. If G1 is active, the speed of motion is the current feed rate (or slower if the machine will not go that fast). If G0 is active, the speed of motion is the current traverse rate (or slower if the machine will not go that fast).&#x20;

It is an error if:&#x20;

- G53 is used without G0 or G1 being active,&#x20;
- G53 is used while cutter radius compensation is on.&#x20;


[title] G1 (Linear Motion Feed at Feed Rate)
[path] G-code/Supported G-code/

For linear motion at feed rate (for cutting or not), program `G1 X... Y... Z... A...`, where all the axis words are optional, except that at least one must be used. The G1 is optional if the current motion mode is G1. This will produce coordinated linear motion to the destination point at the current feed rate (or slower if the machine will not go that fast).&#x20;

It is an error if:&#x20;

- All axis words are omitted.&#x20;

If cutter radius compensation is active, the motion will differ from the above; see Appendix A. If [**G53 (Move in Absolute Coordinates)**](docId\:LcnWMZ2I2Ii08f90oBaL-) is programmed on the same line, the motion will also differ.

[title] Dwell
[path] G-code/Special commands/

The `dwell <time in seconds>` command is identical to [**G4 (Dwell)**](docId\:G-JGI-faoUvo1TqR5NO78). The difference between these commands is that in the case of the former, the time programmed is always in seconds, regardless of the [**Interpreter**](docId\:mB7ZDFNFEtgk00UAM--dh) setting, while in the later, this setting is being used.

[title] Other input codes
[path] G-code/


[title] G4 (Dwell)
[path] G-code/Supported G-code/

For a dwell, program `G4 P...`. This will keep the axes unmoving for the period of time specified by the P number.

The P number is in seconds by default, and decimals can be used. The [**Interpreter**](docId\:mB7ZDFNFEtgk00UAM--dh) setting changes the time from seconds to milliseconds.

It is an error if:&#x20;

- the P number is negative.&#x20;


[title] Network setup
[path] Getting started/

:::hint{type="info"}
This information is only relevant if the controller has an Ethernet interface.
:::

For Ethernet, a free Ethernet port on the PC is needed. If the PC needs to be connected to the local network and an Ethernet controller, add a second network card. Optionally, it might also be possible to use WiFi to connect to the local network if it is not possible to add an extra network interface.

Connect the machine using a 100 Mbit Ethernet cross cable and supply power to the controller. Then set up the Ethernet adapter. The settings below are specified for multiple Windows versions, select the correct version to ensure that the instructions correspond to the operating system.

## Set up the Ethernet interface

::::Tabs
:::Tab{title="Windows 10"}


Go to the Windows network settings, press the Windows key + X, then choose Network Connections. In the window that appears select Ethernet.



![](https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/7lMBm9vGi-NMRNI6tLKZ__image.png "Ethernet Settings Windows 10")



Select ***Change adapter options*** under the Related settings.



![](https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/djMb7ZuJigI-0-DTyx0L3_image.png "Network Connections menu")



Double-click the adapter to which the machine is connected, It can be recognized because it shows ***Unidentified network.*** A new window containing more detailed information about the Ethernet port appears.



::Image[]{src="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/UBKAK6LNx-p2qTZU5G6VB_image.png" size="40" width="417" height="547" caption="Ethernet status" position="flex-start" signedSrc="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/UBKAK6LNx-p2qTZU5G6VB_image.png"}



Select ***Properties*** and deselect all items except ***Internet Protocol Version 4 (TCP/IPv4)***



::Image[]{src="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/ePQWxNOgprP3FBtb-1uor_image.png" size="40" width="447" height="584" caption="Ethernet Properties" position="flex-start" signedSrc="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/ePQWxNOgprP3FBtb-1uor_image.png"}



Select ***Internet Protocol Version 4 (TCP/IPv4)***, click on ***properties***, and enter the following in the window that opens.



::Image[]{src="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/apkK2XA1SVPIHolD-z6ij_image.png" size="50" width="495" height="566" caption="Internet Protocol Version 4 settings" position="flex-start" signedSrc="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/apkK2XA1SVPIHolD-z6ij_image.png"}



By default, the PC uses IP address: 172.22.2.101 and the machine uses 172.22.2.100. Some controllers like the CNC720/CNC760 allow this IP to be changed. For information on this process consult the corresponding page.
:::
::::

## Testing the communication

To verify that the applied changes are correct, a simple test can be performed. It can be tested using the Ping command in Windows.

::::Tabs
:::Tab{title="Windows 10"}


Open a Command prompt by clicking the Windows icon or pressing the Windows logo on the keyboard and typing ***Command Prompt***.



![](https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/FvoVwihEiu-3M90a9TYHb_image.png "Command Prompt")



Type ***ping 172.22.2.100*** and press enter. In case the machine has its IP configured differently, change the IP to that address in this command.



The command should return as displayed below.



![](https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/OsUnaPN31gdV6bksJqQW7_image.png "Successful setup")



When the setup was unsuccessful, the command will respond similarly to the image below.



![](https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/obDUDdqkWGykyNuNxyrfd_image.png "Unsuccessful setup")


:::
::::

## Troubleshooting

There are several reasons that the above test failed. First, try going through the setup process again to ensure nothing was missed. If this still fails, try the steps below

1. **Is the controller powered?** Refer to your controller's manual to determine which indicators need to be illuminated to signal power to the controller.
2. **Is the machine connected to the PC using a cross cable?** The cable to the machine must be a cross-type. Note, modern PC will often auto-detect when a cross connection is required when a non-cross cable is used. But if in doubt, try with a cross cable.
3. **Is the controller online?** Check the Link and Activity indicators on the controller. Refer to the controller's hardware manual for the location of these indicators.
4. **Is the controller active?** Check if the Status indicator is flashing. Consult the hardware manual of the controller for the location of this indicator.


[title] Keyboard shortcuts
[path] Software Manual/

Please note that the keyboard shortcuts cannot be modified.

| **Function**                        | **Key**                                          |
| ----------------------------------- | ------------------------------------------------ |
| Control Q                           | Quit program                                     |
| Control TAB, Control shift TAB      | Mode selection operate/coordinates/Program ..etc |
| Alt+O                               | mode operate                                     |
|                                     |                                                  |
| Control V, Control shift V          | Status tab next, previous                        |
| Control W                           | Toggle Work/Machine coordinates                  |
| Control F6                          | toggle MDI                                       |
|                                     |                                                  |
| Alt F1                              | Main menu                                        |
| Alt F2                              | Home menu                                        |
| Alt F3                              | Zero menu                                        |
| Alt F4                              | Auto menu                                        |
| Alt F7                              | Machine IO menu                                  |
| Alt F8                              | Graphics menu                                    |
| Alt F9                              | Jog menu                                         |
| Alt F10                             | Jog Pad                                          |
| Alt F11                             | User 1 menu                                      |
| Alt F12                             | User 2 menu                                      |
| Alt 1,2,3 .. 0, Ctrl+Alt 1,2,3 .. 0 | User macro 1 – User Macro 20                     |
|                                     |                                                  |
| Control R                           | Reset                                            |
| Control H,                          | Home all                                         |
| Control 1                           | Zero x                                           |
| Control 2                           | Zero y                                           |
| Control 3                           | Zero z                                           |
| Control 4                           | Zero a                                           |
| Control 5                           | Zero b                                           |
| Control 6                           | Zero c                                           |
|                                     |                                                  |
| Control + shift + A                 | Handwheel on A                                   |
| Control + shift + B                 | Handwheel on B                                   |
| Control + shift + C                 | Handwheel on C                                   |
| Control + shift + X                 | Handwheel on X                                   |
| Control + shift + Y                 | Handwheel on Y                                   |
| Control + shift + Z                 | Handwheel on Z                                   |
| Control + Alt + N                   | Handwheel X0.1                                   |
| Control + N                         | Handwheel X1                                     |
| Control + O                         | Handwheel X10                                    |
| Control + P                         | Handwheel X100                                   |
| Control + shift + N                 | Jog continue (Handwheel mode off)                |
| Control J, + shift J                | Jog mode up, jog mode down                       |
|                                     |                                                  |
| Alt + shift + A                     | Select JOG A                                     |
| Alt + shift + B                     | Select JOG B                                     |
| Alt + shift + C                     | Select JOG C                                     |
| Alt + shift + X                     | Select JOG X                                     |
| Alt + shift + Y                     | Select JOG Y                                     |
| Alt + shift + Z                     | Select JOG Z                                     |
|                                     |                                                  |
| Control+Alt+Shift+O                 | Select JOG Speed Low                             |
| Control+Alt+Shift+P                 | Select JOG Speed Med                             |
| Control+Alt+Shift+Q                 | Select JOG Speed High                            |
| Control+Alt+Shift+R                 | Select JOG Step 0.01                             |
| Control+Alt+Shift+S                 | Select JOG Step 0.1                              |
| Control+Alt+Shift+T                 | Select JOG Step 1                                |
| Alt+Shift+P                         | Start Jog+ selected axis                         |
| Alt+Shift+N                         | Start Jog- selected axis                         |
| Alt+Shift+S                         | Stop Jog                                         |
|                                     |                                                  |
| Control I                           | Load g-code file                                 |
| Control G, +shift                   | Run, Pause                                       |
| Control T                           | Toggle Single line                               |
| Control + B                         | Toggle Blockdelete                               |
| Control F, +shift                   | +Feed, -Feed                                     |
| Control S, Control + shift + S      | +Speed, -Speed                                   |
| Control+Alt+S                       | Speed override 100%                              |
| Control+Alt+F                       | Feed override 100%                               |
| Alt+Shift+O                         | Open Teach                                       |
| Control+Alt+Shift+A                 | Add Point                                        |
| Control+Alt+Shift+E                 | Edit                                             |
|                                     |                                                  |
| Control D, Control + shift D        | Spindle On right, Spindle Off                    |
| Control E, Control + shift D        | Spindle On left, Spindle Off                     |
| Control K                           | Toggle Flood                                     |
| Control L                           | Toggle Mist                                      |
| Control M                           | Toggle Aux1                                      |
| Control+Alt+Shift+1                 | Toggle Aux1 out                                  |
| Control+Alt+Shift+2                 | Toggle Aux2 out                                  |
| Control+Alt+Shift+3                 | Toggle Aux3 out                                  |
| Control+Alt+Shift+4                 | Toggle Aux4 out                                  |
| Control+Alt+Shift+5                 | Toggle Aux5 out                                  |
| Control+Alt+Shift+6                 | Toggle Aux6 out                                  |
| Control+Alt+Shift+7                 | Toggle Aux7 out                                  |
| Control+Alt+Shift+8                 | Toggle Aux8 out                                  |
| Control+Alt+Shift+9                 | Toggle Aux9 out                                  |
|                                     |                                                  |
| Control F1 - control F12            | reserved                                         |




[title] M-code function override and user M-code functions
[path] G-code/Special features/

The system allows M functions in the range of `M1` to `M999`
This means there are many M-Functions that can be user-defined.
The user can create his own M-Function by creating a subroutine for it in the macro file
e.g:

:::BlockQuote
sub m100
&#x9;;Machine-specific code here
&#x9;Msg "custom M100"
&#x9;M54 P1 ;switch on AUX output 1
endsub
:::



So if the G-Code file performs `M100`, the subroutine will be called.
Parameters are possible with syntax such as `M100 S100`.
In the subroutine the parameter can be accessed using [**System-Parameters/Variables**](docId\:oqHjs3LLCfQkSac_cemc2) `#19` (`#1` .. `#26` accesses parameter A through Z), S corresponds to no. 19 as in, the 19th letter in the English alphabet.

It is possible to override existing M functions as well.
As an example, additional action can be made during the [**M3, M4, M5, M90 - M97 (Spindle/Tool head Control)**](docId\:LCGnVkPx_hp4rq3G5m9QV).

If the machine's spindle has an output that signals that the target speed has been reached, the machine can wait for that output, as an example:

:::BlockQuote
sub m3
&#x20; msg "my customized m3"
&#x20; m3 s#19 ;Inside overridden subroutine this executes the standard M3
&#x20; m56 P1 L2 Q60 ;Wait max. 60 seconds for AUX input 1 to change to low
endsub
:::


When an M-command is called from inside the subroutine that also overrides the same M-command, then the overridden subroutine is not called recursively, but the standard `M3` implementation is executed instead.

There are some limitations to using the M Function override feature:

- There must be no other statements on the same line i.e.
  `N2000 M3 S1000`  is valid.
  `N2000 M3 M8 G1X100` is invalid
- The variables `#1` through `#26` will be used to hold parameter values and will be overwritten when M-Function subroutines are used.&#x20;
  Take this into account and do not use variables `#1`..`#26` in your macro program if you use this functionality.&#x20;
  Variables `#1` through `#26` correspond to the letter of the English alphabet, `#1` will get the value of parameter A, and `#26` will get the value of parameter Z.&#x20;



[title] M26, M27 (Rotary axis clamping)
[path] G-code/Supported M-codes/

The *A* axis is often used to rotate the workpiece on the machine and then do milling on that side of the workpiece. To be sure the workpiece is fixed in its place an axis clamp (Brake) can be used for *A*.&#x20;

`M26 Q... P...` where the *Q* parameter specifies the axis and the *P* parameter specifies an AUX output that will enable the clamp and the optional `P1` specifies the output that controls the brake, e.g. `M26 Qa P1`, `Qa` specifies axis A, `P1` specifies AUX1.

`M27 Q...` disables the clamp on the axis specified by the *Q* parameter, e.g. `M27 Qc` disables the clamp for axis C.&#x20;

When `M26` is active, the software does not accept motion such as from *G-Code* and jogging, an error message will appear that the axis is clamped.

[title] G93, G94, G95 (Set Feed Rate Mode)
[path] G-code/Supported G-code/

Three feed rate modes are recognized, depending on the selected mode the Feed of the axes is calculated differently:

- **G93** inverse time, a move is completed in **1/F minutes**. For example if F=6 the move is completed in 10 seconds. When G93 is active, the F must be specified on every line containing G1, G3, or G3.
- **G94** units per minute, this is the normal mode for millin&#x67;**, F means units per minute**, in millimeter mode mm/minute, in INCH mode inch/minute.
- **G95** **Units per revolution,** here the F word is the number of units that should be cut per spindle revolution. So the feed of the axes is depending on the rotation speed of the spindle. G95 F2 means to cut 2mm every spindle revolution, so when S=500, the feed for XZ would be FEED = F \* S = 2 \* 500 = 1000.


[title] Language standard
[path] G-code/

This chapter describes the input language, RS274/NGC.

The RS274/NGC language is based on lines of code. Each line (a "block") may include commands to a machining center to do several things. Lines of code may be collected in a file to make a program.

A typical line of code consists of an optional line number at the beginning followed by one or more "words." A word consists of a letter followed by a number (or something that evaluates to a number). A word may either give a command or provide an argument to a command. For example, `G1 X3` is a valid line of code with two words. `G1` is a command meaning "move in a straight line at the programmed feed rate," and `X3` provides an argument value (the value of X should be 3 at the end of the move). Most RS274/NGC commands start with either G or M (for miscellaneous). The words for these commands are called "G codes" and "M codes."

The RS274/NGC language does not have an indicator for the start of a program. It has two commands (`M2` or `M30`), either of which ends a program.

## System parameters/Variables

In the RS274/NGC language view, a machining center maintains 5999 numerical parameters. They can be accessed by #1 .. #5999. The specific parameters with a dedicated function are listed in the table below. Other parameters in the range of 1..5999 are free to use in your G-Code program. Some of them have a special function and are read-only; see the table below.

| Parameter Number                               | Purpose                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| ---------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| *1 - 26\**                                     | Used for parameters when overriding m-functions.<br />In the g-code there is e.g.&#xA;`M999 X100 S1000` <br />And you have in your macro.cnc:<br />:::BlockQuote
Sub m999&#xA;    msg “this is my m999 X=”#24” S=”#19&#xA;Endsub
:::<br />Inside the subroutine, the given X and S parameters are at #24 and #19<br />#1-#26 = A – Z parameter value.<br />Values are negative -1e10 if not provided with `m999` in this example.         |
| 27 - 4999                                      | Free to use, note that 4995 – 4999 are used by the tool length measurement function under user button 2.<br />`Z#4996` safe height for tool measurement above the fixed tool setter.&#xA;`x#4997` `y#4998` fixed tool setter position.&#xA;`z#4999` chuck height, or zero length tool height, chuck just touches the fixed tool setter at this height.&#xA;`Z#4995` is used for the tool setter height for zeroing Z under user button 1. |
| 4000 - 4999                                    | Free to use, persistent, see above some of these are used by tool length measurement and zeroing.                                                                                                                                                                                                                                                                                                                                         |
| *5001 - 5006\**                                | Position of X – C, interpreter position = work position                                                                                                                                                                                                                                                                                                                                                                                   |
| *5008\**                                       | Current tool number                                                                                                                                                                                                                                                                                                                                                                                                                       |
| *5009\**                                       | Current tool radius                                                                                                                                                                                                                                                                                                                                                                                                                       |
| *5010\**                                       | Current tool Z offset (length + zDelta)                                                                                                                                                                                                                                                                                                                                                                                                   |
| *5011\**                                       | New tool number during tool change (M6)                                                                                                                                                                                                                                                                                                                                                                                                   |
| *5012\**                                       | Current tool X offset (X offset + xDelta)                                                                                                                                                                                                                                                                                                                                                                                                 |
| *5013\**                                       | Current G43 Z offset (Z offset + zDelta)                                                                                                                                                                                                                                                                                                                                                                                                  |
| *5014\**                                       | Current G43 X offset (X offset + xDelta)                                                                                                                                                                                                                                                                                                                                                                                                  |
| 5015 - 5050                                    | Used in tool change sub routine                                                                                                                                                                                                                                                                                                                                                                                                           |
| *5051 - 5056\**                                | Probe position X - C in machine coordinates                                                                                                                                                                                                                                                                                                                                                                                               |
| *5061 - 5066\**                                | Probe position X - C in work coordinates                                                                                                                                                                                                                                                                                                                                                                                                  |
| *5067\**                                       | 1 if the probe is triggered after `G38.2`, 0 otherwise                                                                                                                                                                                                                                                                                                                                                                                    |
| *5068\**                                       | Current probe value                                                                                                                                                                                                                                                                                                                                                                                                                       |
| *5069\**                                       | Handwheel counter                                                                                                                                                                                                                                                                                                                                                                                                                         |
| *5070\**                                       | Spindle rate in rev/second                                                                                                                                                                                                                                                                                                                                                                                                                |
| *5071 - 5076\**                                | Position of X - C, interpreter position without offsets = machine position                                                                                                                                                                                                                                                                                                                                                                |
| *5081 - 5086\**                                | Probe position X - C in joint coordinates                                                                                                                                                                                                                                                                                                                                                                                                 |
| *5101 - 5106\**                                | MCA negative limit X - C                                                                                                                                                                                                                                                                                                                                                                                                                  |
| *5111 - 5116\**                                | MCA positive limit X - C                                                                                                                                                                                                                                                                                                                                                                                                                  |
| *5121 - 5126\**                                | Home position X - C                                                                                                                                                                                                                                                                                                                                                                                                                       |
| *5131 - 5133\**                                | TCA negative limit X - Z                                                                                                                                                                                                                                                                                                                                                                                                                  |
| *5141 - 5143\**                                | TCA positive limit X - Z                                                                                                                                                                                                                                                                                                                                                                                                                  |
| *5150\**                                       | Active kinematics type:<br />1: Trivial&#xA;2: 4\_AX\_ACYLINDER (Y -> A mapping)&#xA;3: Virtual C&#xA;4 - 17: System reserved&#xA;18 - 30: Custom 1 – Custom 12                                                                                                                                                                                                                                                                           |
| *5151\**                                       | ZHC is active                                                                                                                                                                                                                                                                                                                                                                                                                             |
| *5152\**                                       | 1 if the spindle is on, 0 if the spindle is off.                                                                                                                                                                                                                                                                                                                                                                                          |
| *5161 - 5166\**                                | G28 home X - C                                                                                                                                                                                                                                                                                                                                                                                                                            |
| *5181 - 5186\**                                | G30 home X - C                                                                                                                                                                                                                                                                                                                                                                                                                            |
| *5190\**                                       | G68 rotation method (0 = off, 1 = on)                                                                                                                                                                                                                                                                                                                                                                                                     |
| *5191 - 5193\**                                | G68/G51 rotation point X - C                                                                                                                                                                                                                                                                                                                                                                                                              |
| *5194\**                                       | G68 rotation angle XY                                                                                                                                                                                                                                                                                                                                                                                                                     |
| *5195\**                                       | G68 rotation angle YZ                                                                                                                                                                                                                                                                                                                                                                                                                     |
| *5196\**                                       | G68 rotation angle XZ                                                                                                                                                                                                                                                                                                                                                                                                                     |
| *5200\**                                       | 0 if G51 scaling is off, 1 if G51 scaling is on                                                                                                                                                                                                                                                                                                                                                                                           |
| *5204\**                                       | G51 scaling factor X                                                                                                                                                                                                                                                                                                                                                                                                                      |
| *5205\**                                       | G51 scaling factor Y                                                                                                                                                                                                                                                                                                                                                                                                                      |
| *5206\**                                       | G51 scaling factor Z (always 1.0)                                                                                                                                                                                                                                                                                                                                                                                                         |
| 5211 - 5216                                    | G92 offset X - C                                                                                                                                                                                                                                                                                                                                                                                                                          |
| 5220                                           | Coordinate system number                                                                                                                                                                                                                                                                                                                                                                                                                  |
| 5221 - 5226                                    | Coordinate system 1 X - C                                                                                                                                                                                                                                                                                                                                                                                                                 |
| 5241 - 5246                                    | Coordinate system 2 X - C                                                                                                                                                                                                                                                                                                                                                                                                                 |
| 5261 - 5266                                    | Coordinate system 3 X - C                                                                                                                                                                                                                                                                                                                                                                                                                 |
| 5281 - 5286                                    | Coordinate system 4 X - C                                                                                                                                                                                                                                                                                                                                                                                                                 |
| 5301 - 5306                                    | Coordinate system 5 X - C                                                                                                                                                                                                                                                                                                                                                                                                                 |
| 5321 - 5326                                    | Coordinate system 6 X - C                                                                                                                                                                                                                                                                                                                                                                                                                 |
| 5341 - 5346                                    | Coordinate system 7 X - C                                                                                                                                                                                                                                                                                                                                                                                                                 |
| 5361 - 5366                                    | Coordinate system 8 X - C                                                                                                                                                                                                                                                                                                                                                                                                                 |
| 5381 - 5386                                    | Coordinate system 9 X - C                                                                                                                                                                                                                                                                                                                                                                                                                 |
| *5390\**                                       | Spindle selection 0 = M90, 1 = M91, 2 = M92                                                                                                                                                                                                                                                                                                                                                                                               |
| *5391 - 5393\**                                | Alternative spindle offset X- Z                                                                                                                                                                                                                                                                                                                                                                                                           |
| *5394 - 5397\**                                | Spindle speed max M90 - M93                                                                                                                                                                                                                                                                                                                                                                                                               |
| 5230, 5250, 5270, 5290, 5310, 5330, 5350, 5370 | Reserved for rotation coordinate system                                                                                                                                                                                                                                                                                                                                                                                                   |
| *5380\**                                       | Simulation mode, 0: controller connected, 1: simulation mode                                                                                                                                                                                                                                                                                                                                                                              |
| *5397\**                                       | Running mode, 0: running, 1: rendering<br />Use e.g. if you have `G38.2` movements in your macro file because during rendering `G38.2` always runs until the given end point which may give incorrect tool measurement results. Always take care that the tool table contains (approx.) correct tool data                                                                                                                                 |
| *5398\**                                       | Return value of `dlgmsg` (1 = OK, -1 = Cancel)                                                                                                                                                                                                                                                                                                                                                                                            |
| *5399\**                                       | Return value for `M55`, `M56`                                                                                                                                                                                                                                                                                                                                                                                                             |
| 5401 - 5499                                    | Tool Z offset (length) for tools 1 - 99                                                                                                                                                                                                                                                                                                                                                                                                   |
| 5501 - 5599                                    | Tool diameter for tools 1 - 99                                                                                                                                                                                                                                                                                                                                                                                                            |
| 5601 - 5699                                    | Tool X offset (for lathe) for tools 1 - 99                                                                                                                                                                                                                                                                                                                                                                                                |
| 5701 - 5799                                    | Tool orientation (for turning) for tools 1 - 99                                                                                                                                                                                                                                                                                                                                                                                           |
| 5801 - 5899                                    | Tool X delta due to wear                                                                                                                                                                                                                                                                                                                                                                                                                  |
| 5901 - 5999                                    | Tool Z delta due to wear                                                                                                                                                                                                                                                                                                                                                                                                                  |

\**parameters in italics are read-only*

## Tool data

| Tool ID | zOffset (Length) | xOffset (For turning) | Diameter | orientation |
| ------- | ---------------- | --------------------- | -------- | ----------- |
| 1       |                  |                       |          | 1-9         |
| 2       |                  |                       |          | 1-9         |
| ..      |                  |                       |          | ..          |
| 99      |                  |                       |          | 1-9         |

### Tool Orientation for lathes

When the G18 plane (X-Z) is selected, special LATHE tool radius compensation can be used (G41, G42). Depending on the tool orientation and tool radius an extra offset is applied.

![](https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/byAC3IT5E2lzVGDH0wPc8_image.png)

The blue crosses show the radius center of the tool.

The green crosses show the controlled point depending on the tool orientation. For orientation 9 there is no offset compensation. For orientation 2, the compensation in X is –tool radius, in Z also –tool radius.

## Coordinate Systems

In the RS274/NGC language view, a machining center has an absolute coordinate system and nine program coordinate systems.

You can set the offsets of the nine program coordinate systems using G10 L2 Pn (n is the number of the coordinate system) with values for the axes in terms of the absolute coordinate system.

You can select one of the nine systems by using G54, G55, G56, G57, G58, G59, G59.1, G59.2, or G59.3. It is not possible to select the absolute coordinate system directly.

You can offset the current coordinate system using G92 or G92.3. This offset will then apply to all nine program coordinate systems. This offset may be canceled with G92.1 or G92.2.

You can make straight moves in the absolute machine coordinate system by using G53 with either G0 or G1.

Data for coordinate systems is stored in parameters, see the previous section.

During initialization, the coordinate system is selected that is specified by parameter 5220. A value of 1 means the first coordinate system (the one G54 activates), a value of 2 means the second coordinate system (the one G55 activates), and so on. It is an error for the value of parameter 5220 to be anything but a whole number between one and nine.

The g-code are described in detail in section 3.6

## Format of a Line

A permissible line of input RS274/NGC code consists of the following, in order, with the restriction that there is a maximum (currently 256) to the number of characters allowed on a line.

- An optional line number.
- Any number of words, parameter settings, and comments.

Any input not explicitly allowed is illegal and will cause the Interpreter to signal an error.

Spaces and tabs are allowed anywhere on a line of code and do not change the meaning of the line, except inside comments. This makes some strange-looking input legal. The line `g0x +0. 12 34y 7` is equivalent to `g0 x+0.1234 y7`, for example.

Blank lines are allowed in the input. They are to be ignored.

Input is case insensitive.

## Line Number

A line number is the letter N followed by an integer (with no sign) between 0 and 99999 written with no more than five digits (000009 is not OK, for example). Line numbers may be repeated or used out of order, although normal practice is to avoid such usage.

Line numbers may also be skipped, and that is normal practice. A line number is not required to be used but must be in the proper place if used.

## Word

A word is a letter other than N followed by a real value.

Words may begin with any of the letters shown in Table 3-2. The table includes N for completeness, even though, as defined above, line numbers are not words. Several letters (I, J, K, L, P, and R) may have different meanings in different contexts.

| **Letter** | **Meaning**                                                      |
| ---------- | ---------------------------------------------------------------- |
| D          | Tool radius compensation number                                  |
| F          | Feed rate                                                        |
| G          | General function (see Table 3-4)                                 |
| H          | Tool length offset index                                         |
| I          | X-axis offset for arcs X offset in G87 canned cycle              |
| J          | Y-axis offset for arcs Y offset in G87 canned cycle              |
| K          | Z-axis offset for arcs Z offset in G87 canned cycle              |
| L          | number of repetitions in canned cycles key used with G10         |
| M          | miscellaneous function (see Table 3-6)                           |
| N          | line number                                                      |
| P          | dwell time in canned cycles dwell time with G4 key used with G10 |
| Q          | feed increment in G83 canned cycle                               |
| R          | arc radius, clear\_z distance in canned cycle                    |
| S          | spindle speed                                                    |
| T          | tool selection                                                   |
| X          | X-axis of machine                                                |
| Y          | Y-axis of machine                                                |
| Z          | Z-axis of machine                                                |
| A          | A-axis of machine                                                |
| B          | B-axis of machine                                                |
| C          | C-axis of machine                                                |

A real value is some collection of characters that can be processed to come up with a number. A real value may be an explicit number (such as 341 or -0.8807), a parameter value, an expression, or a unary operation value. Definitions of these follow immediately. Processing characters to come up with a number is called "evaluating". An explicit number evaluates itself.

## Number

The following rules are used for (explicit) numbers. In these rules, a digit is a single character between 0 and 9.

- A number consists of (1) an optional plus or minus sign, followed by (2) zero to many digits, followed, possibly, by (3) one decimal point, followed by (4) zero to many digits - provided that there is at least one digit somewhere in the number.
- There are two kinds of numbers: integers and decimals. An integer does not have a decimal point in it; a decimal does.
- Numbers may have any number of digits, subject to the limitation on line length. Only about seventeen significant figures will be retained, however (enough for all known applications).
- A non-zero number with no sign as the first character is assumed to be positive.

Notice that initial (before the decimal point and the first non-zero digit) and trailing (after the decimal point and the last non-zero digit) zeros are allowed but not required.

A number written with initial or trailing zeros will have the same value when it is read as if the extra zeros were not there.

Numbers used for specific purposes in RS274/NGC are often restricted to some finite set of values or some to some range of values. In many uses, decimal numbers must be close to integers; this includes the values of indexes (for parameters and carousel slot numbers, for example), M codes, and G codes multiplied by ten. A decimal number that is supposed to be close to an integer is considered close enough if it is within 0.0001 of an integer.

## Parameter Value

A parameter number is the pound character # followed by an integer value between 1 and 5399. The value of the parameter is whatever number is stored in the numbered parameter.

The # character takes precedence over other operations, so that, for example, `[#1+2]` means the number found by adding 2 to the value of parameter 1, not the value found in parameter 3. Of course, `#[1+2]` does mean the value found in parameter 3. The # character may be repeated; for example `##2` means the value of the parameter whose index is the (integer) value of parameter 2.

Examples using a parameter:

`#100 = 1.1234`

`#101 = [#100 + 1]`

`G1 F[#100] X[#101 + 10]`

## Expressions and Binary Operations

An expression is a set of characters starting with a left bracket `[` and ending with a balancing right bracket `]`. In between the brackets are numbers, parameter values, mathematical operations, and other expressions. An expression may be evaluated to produce a number. The expressions on a line are evaluated when the line is read, before

anything on the line is executed. An example of an expression is `[1 + acos[0] - [#3 ** [4.0/2]]]`.

Binary operations appear only inside expressions. Nine binary operations are defined. There are four basic mathematical operations: addition (+), subtraction (-), multiplication (\*), and division (/). There are three logical operations: non-exclusive or (OR), exclusive or (XOR), and logical and (AND). The eighth operation is the modulus operation (MOD). The ninth operation is the "power" operation (\*\*) of raising the number on the left of the operation to the power on the right.

The binary operations are divided into three groups. The first group is power. The second group is multiplication, division, and modulus. The third group is addition, subtraction, logical non-exclusive or, logical exclusive or, and logical and. If operations are strung together (for example in the expression `[2.0 / 3 * 1.5 - 5.5 / 11.0]`), operations in the first group are to be performed before operations in the second group, and operations in the second group before operations in the third group. If an expression contains more than one operation from the same group (such as the first / and \* in the example), the operation on the left is performed first. Thus, the example is equivalent to: `[((2.0 / 3) * 1.5) - (5.5 / 11.0)]`, which simplifies to `[1.0 - 0.5]`, which is 0.5.

The logical operations and modulus are to be performed on any real numbers, not just on integers. The number zero is equivalent to logical false, and any non-zero number is equivalent to logical true.

## Unary Operation Value

A unary operation value is either `ATAN` followed by one expression divided by another expression (for example `ATAN[2]/[1+3]`) or any other unary operation name followed by an expression (for example `SIN[90]`). The unary operations are `ABS` (absolute value), `ACOS` (arc cosine), `ASIN` (arc sine), `ATAN` (arc tangent), `COS` (cosine), `EXP` (e raised to the given power), `FIX` (round down), `FUP` (round up), `LN` (natural logarithm), `ROUND` (round to the nearest whole number), `SIN` (sine), `SQRT` (square root), and `TAN` (tangent). Arguments to unary operations which take angle measures (`COS`, `SIN`, and `TAN`) are in degrees. Values returned by unary operations which return angle measures (`ACOS`, `ASIN`, and `ATAN`) are also in degrees.

The `FIX` operation rounds towards the left (less positive or more negative) on a number line, so that `FIX[2.8]` =2 and `FIX[-2.8]` = -3, for example. The `FUP` operation rounds towards the right (more positive or less negative) on a number line; `FUP[2.8]` = 3 and `FUP[-2.8]` = -2, for example.

## Parameter Setting

A parameter setting is the following four items one after the other: (1) a pound character `#`, (2) a real value which evaluates to an integer between 1 and 5399, (3) an equal sign `=`, and (4) a real value. For example, `#3 = 15` is a parameter setting meaning "set parameter 3 to 15."

A parameter setting does not take effect until after all parameter values on the same line have been found. For example, if parameter 3 has been previously set to 15 and the line `#3=6 G1 x#3` is interpreted, a straight move to a point where x equals 15 will occur and the value of parameter 3 will be 6.

## Comments and Messages

Printable characters and white space inside parentheses are a comment. A left parenthesis always starts a comment. The comment ends at the first right parenthesis found thereafter. Once a left parenthesis is placed on a line, a matching right parenthesis must appear before the end of the line. Comments may not be nested; it is an error if a left parenthesis is found after the start of a comment and before the end of the comment.

Here’s an example of a line containing a comment: `G80 M5 (stop motion)`. Comments do not cause a machining center to do anything.

A comment contains a message if `MSG,` appears after the left parenthesis and before any other printing characters. Variants of `MSG,` which include white space and lowercase characters are allowed. The rest of the characters before the right parenthesis are considered to be a message. Messages should be displayed on the message display device. Comments not containing messages need not be displayed there.

## Item Repeats

A line may have any number of G words, but two G words from the same modal group may not appear on the same line.

A line may have zero to four M words. Two M words from the same modal group may

not appear on the same line.

For all other legal letters, a line may have only one word beginning with that letter.

If a parameter setting of the same parameter is repeated on a line, `#3=15 #3=6` for example, only the last setting will take effect.

If more than one comment appears on a line, only the last one will be used; each of the other comments will be read and its format will be checked, but it will be ignored thereafter. Putting more than one comment on a line is expected to be very rare.

## Item order

The three types of items whose order may vary on a line (as given at the beginning of this section) are word, parameter setting, and comment. Imagine that these three types of items are divided into three groups by type.

The first group (the words) may be reordered in any way without changing the meaning of the line.

If the second group (the parameter settings) is reordered, there will be no change in the meaning of the line unless the same parameter is set more than once. In this case, only the last modification of the parameter will take effect. For example, after line `#3=15 #3=6` has been interpreted, the value of parameter 3 will be 6. If the order is reversed to `#3=6 #3=15` and the line is interpreted, the value of parameter 3 will be 15.

If the third group (the comments) contains more than one comment and is reordered, only the last comment will be used.

If each group is kept in order or reordered without changing the meaning of the line, then the three groups may be interleaved in any way without changing the meaning of the line. For example, the line `g40 g1 #3=15 (foo) #4=-7.0` has five items and means exactly the same thing in any of the 120 possible orders (such as `#4=-7.0 g1 #3=15 g40 (foo)`) for the five items.

## Commands and Machine Modes

In RS274/NGC, many commands cause a machining center to change from one mode to another, and the mode stays active until some other command changes it implicitly or explicitly. Such commands are called "modal". For example, if coolant is turned on, it stays on until it is explicitly turned off. The G codes for motion are also modal. If a G1 (straight move) command is given on one line, for example, it will be executed again on the next line if one or more axis words are available on the line, unless an explicit command is given on that next line using the axis words or canceling motion.

"Non-modal" codes have an effect only on the lines on which they occur. For example, G4 (dwell) is non-modal.

## Modal Groups

Modal commands are arranged in sets called "modal groups", and only one member of a modal group may be in force at any given time. In general, a modal group contains commands for which it is logically impossible for two members to be in effect at the same time - like measure in inches vs. measure in millimeters. A machining center may be in many modes at the same time, with one mode from each modal group being in effect. The modal groups are shown in the following tables.

## Modal groups for G-Codes

| **Name** | **G-Codes**                                                                  | **Group**                    |
| -------- | ---------------------------------------------------------------------------- | ---------------------------- |
| Group 1  | G0, G1, G2, G3, G38.2, G76, G80, G81, G82, G83, G84, G85, G86, G87, G88, G89 | Motion                       |
| Group 2  | G17, G18, G19                                                                | Plane selection              |
| Group 3  | G90, G91                                                                     | Distance mode                |
| Group 5  | G93, G94                                                                     | Feed rate mode               |
| Group 6  | G20, G21                                                                     | Units                        |
| Group 7  | G40, G41, G42                                                                | Cutter radius compensation   |
| Group 8  | G43, G49                                                                     | Tool length offset           |
| Group 10 | G98, G99                                                                     | Return mode in canned cycles |
| Group 12 | G54, G55, G56, G57, G58, G59, G59.1, G59.2, G59.3                            | Coordinate system selection  |
| Group 13 | G61, G61.1, G64                                                              | Path control mode            |
| Group 14 | G68, G69                                                                     | XY plane rotation            |

## Modal groups for M-Codes

| **Name**     | **M-Codes**                  | **Group**                                                                            |
| ------------ | ---------------------------- | ------------------------------------------------------------------------------------ |
| Group 4      | M0, M1, M2, M30, M60         | Stopping                                                                             |
| Group 5      | M54, M55, M56, M64, M65, M66 | AUX and general purpose I/O                                                          |
| Group 6      | M6                           | Tool change                                                                          |
| Group 7      | M3, M4, M5                   | Spindle turning                                                                      |
| Group 8      | M7, M8, M9                   | Coolant                                                                              |
| Group 9      | M48, M49, M50, M51, M52      | Enable/disable feed and speed override switches                                      |
| Group 10     | M90, M91, M92, M95, M97      | Select standard or alternate spindle or touch probe or camera offset, M90 = standard |
| Enable THC   | M20, M21                     | THC ON \| THC OFF (Torch height control)                                             |
| A axis clamp | M26, M27                     | Clamp on \| clamp off                                                                |

## Non-modal groups

| **Name** | **M-Codes**                                      | **Group** |
| -------- | ------------------------------------------------ | --------- |
| Group 0  | G4, G10, G28, G30, G53, G92, G92.1, G92.2, G92.3 |           |

For several modal groups, when a machining center is ready to accept commands, one member of the group must be in effect. There are default settings for these modal groups. The default values are automatically in effect when the machining center is turned on or otherwise re-initialized.

Group 1 is a group of G codes for motion. One of these is always in effect. That one is called the current motion mode.

It is an error to put a G-code from Group 1 and a G-code from Group 0 on the same line if both of them use axis words. If an axis word-using G-code from group 1 is implicitly in effect on a line (by having been activated on an earlier line), and a group 0 G-code that uses axis words appears on the line, the activity of the group 1 G-code is suspended for that line. The axis word using G-codes from group 0 are G10, G28, G30, and G92.


[title] G-code
[path] /


[title] GetToolInfo
[path] G-code/Special commands/

Retrieves information about used tools inside the current job and stores that information in a [**Variables**](docId\:oqHjs3LLCfQkSac_cemc2).

:::BlockQuote
GetToolInfo \<num | first | next> \<variable number>
:::

### Example

`GetToolInfo num 200` will store the number of used tools in the current job in variable `#200`
`GetToolInfo first 201` will store the first tool number in variable`#201`
`GetToolInfo next 201 `will store the next tool number in variable`#201`


:::BlockQuote
; Enumerate tools used in a job.
; As an example, this can be used to measure the length of all tools at once before running the job.

sub measure\_used\_tools
&#x20;   GetToolInfo num 5025 ;&#x20;
&#x20;   Msg "number of tools used = " #5025
&#x20;  &#x20;
&#x20;   GetToolInfo first 5025
&#x20;   while \[#5025 \<> -1]
&#x20;       gosub m\_tool\_no\_dlg ; Subroutine that measures tools       &#x20;
&#x20;       msg "Tool "#5025" is measured"
&#x20;       GetToolInfo next 5025
&#x20;   endwhile
endsub

:::


[title] Special commands
[path] G-code/


[title] FloodOn
[path] G-code/Special commands/

Turns on the flood output on the controller.

:::hint{type="warning"}
If a custom override for M7 exists, this subroutine is not executed by the FloodOn command. Refrain from using FloodOn in this case.
:::


[title] GetJobDistance
[path] G-code/Special commands/

Retrieves the travel distance of the current job.

:::BlockQuote
GetJobDistance \<variable number>
:::

The resulting value is stored in the specified variable.

### Example

:::BlockQuote
GetJobDistance 5399
:::


[title] G81 - G89 (Canned Cycles)
[path] G-code/Supported G-code/

The canned cycles `G81` through `G89` have been implemented as described in this section. Two examples are given with the description of `G81` below.

All canned cycles are performed with respect to [**G17, G18, G19 (Plane Selection)**](docId\:Uo-PghD6GWTJ4p9XJ2NzP). Any of the three planes (XY, YZ, and ZX) may be selected. Throughout this section, most of the descriptions assume the XY plane has been selected. The behavior is always analogous if the YZ or XZ plane is selected.

Rotational axis words are allowed in canned cycles, but it is better to omit them. If rotational axis words are used, the numbers must be the same as the current position numbers so that the rotational axes do not move.

All canned cycles use X, Y, R, and Z numbers in the NC code. These numbers are used to determine X, Y, R, and Z positions. The R (usually meaning retract) position is along the axis perpendicular to the currently selected plane (Z-axis for XY-plane, X-axis for YZ-plane, Y-axis for XZ-plane). Some canned cycles use additional arguments.

For canned cycles, we will call a number "sticky" if, when the same cycle is used on several lines of code in a row, the number must be used the first time, but is optional on the rest of the lines. Sticky numbers keep their value on the rest of the lines if they are not explicitly programmed to be different. The R number is always sticky.

In incremental distance mode: when the XY-plane is selected, X, Y, and R numbers are treated as increments to the current position and Z as an increment from the Z-axis position before the move involving Z takes place; when the YZ or XZ-plane is selected, treatment of the axis words is analogous. In absolute distance mode, the X, Y, R, and Z numbers are absolute positions in the current coordinate system.

The L number is optional and represents the number of repeats. L=0 is not allowed. If the repeat feature is used, it is normally used in incremental distance mode, so that the same sequence of motions is repeated in several equally spaced places along a straight line. In absolute distance mode, L > 1 means "do the same cycle in the same place several times," Omitting the L word is equivalent to specifying L=1. The L number is not sticky.

When L>1 in incremental mode with the XY-plane selected, the X and Y positions are determined by adding the given X and Y numbers either to the current X and Y positions (on the first go-around) or to the X and Y positions at the end of the previous go-around (on the repetitions). The R and Z positions do not change during the repeats.

The height of the retract move at the end of each repeat (called "clear Z" in the descriptions below) is determined by the setting of the retract mode: either to the original Z position (if that is above the R position and the retract mode is G98, OLD\_Z), or otherwise to the R position.

It is an error if:

- X, Y, and Z words are all missing during a canned cycle,
- a P number is required and a negative P number is used,
- an L number is used that does not evaluate to a positive integer,
- rotational axis motion is used during a canned cycle,
- inverse time feed rate is active during a canned cycle,
- cutter radius compensation is active during a canned cycle.

When the XY plane is active, the Z number is sticky, and it is an error if:

- the Z number is missing and the same canned cycle was not already active,
- the R number is less than the Z number.

When the XZ plane is active, the Y number is sticky, and it is an error if:

- the Y number is missing and the same canned cycle was not already active,
- the R number is less than the Y number.

When the YZ plane is active, the X number is sticky, and it is an error if:

- the X number is missing and the same canned cycle was not already active,
- the R number is less than the X number.

### Preliminary and In-Between Motion

At the very beginning of the execution of any of the canned cycles, with the XY-plane

selected, if the current Z position is below the R position, the Z-axis is traversed to the R position. This happens only once, regardless of the value of L.

In addition, at the beginning of the first cycle and each repeat, the following one or two moves are made:

1. a straight traverse parallel to the XY-plane to the given XY position,
2. a straight traverse of the Z-axis only to the R position, if it is not already at the R position.

If the XZ or YZ plane is active, the preliminary and in-between motions are analogous.

### G81 Cycle

The G81 cycle is intended for drilling. Program `G81 X... Y... Z... A... B... C... R... L...`

1. Preliminary motion, as described above.
2. Move the Z-axis only at the current feed rate to the Z position.
3. Retract the Z-axis at traverse rate to clear Z.

Example: Suppose the current position is (1, 2, and 3) and the XY-plane has been selected, and the following line of NC code is interpreted.

`G90 G81 G98 X4 Y5 Z1.5 R2.8`

This calls for absolute distance mode (G90) and OLD\_Z retract mode (G98) and calls for the G81 drilling cycle to be performed once. The X number and X position are 4. The Y number and Y position are 5. The Z number and Z position are 1.5. The R number and clear Z are 2.8. Old Z is 3. The following moves take place.

1. a traverse parallel to the XY-plane to (4,5,3)
2. a traverse parallel to the Z-axis to (4,5,2.8)
3. a feed parallel to the Z-axis to (4,5,1.5)
4. a traverse parallel to the Z-axis to (4,5,3)

**Example:** Suppose the current position is (1, 2, and 3) and the XY-plane has been selected, and the following line of NC code is interpreted.

`G91 G81 G98 X4 Y5 Z-0.6 R1.8 L3`

This calls for incremental distance mode (G91) and OLD\_Z retract mode (G98) and calls for the G81 drilling cycle to be repeated three times. The X number is 4, the Y number is 5, the Z number is -0.6 and the R number is 1.8. The initial X position is 5 (=1+4), the initial Y position is 7 (=2+5), the clear Z position is 4.8 (=1.8+3), and the Z position is 4.2 (=4.8-0.6). Old Z is 3.

The first move is a traverse along the Z-axis to (1,2,4.8), since old Z \< clear Z.

The first repeat consists of 3 moves.

1. a traverse parallel to the XY-plane to (5,7,4.8)
2. a feed parallel to the Z-axis to (5,7, 4.2)
3. a traverse parallel to the Z-axis to (5,7,4.8)

The second repeat consists of 3 moves. The X position is reset to 9 (=5+4) and the Y position to 12 (=7+5).

1. a traverse parallel to the XY-plane to (9,12,4.8)
2. a feed parallel to the Z-axis to (9,12, 4.2)
3. a traverse parallel to the Z-axis to (9,12,4.8)

The third repeat consists of 3 moves. The X position is reset to 13 (=9+4) and the Y position to 17 (=12+5).

1. a traverse parallel to the XY-plane to (13,17,4.8)
2. a feed parallel to the Z-axis to (13,17, 4.2)
3. a traverse parallel to the Z-axis to (13,17,4.8)

### G82 Cycle

The G82 cycle is intended for drilling. Program `G82 X... Y... Z... A... R... L... P...`

1. Preliminary motion, as described above.
2. Move the Z-axis only at the current feed rate to the Z position.
3. Dwell for the P number of seconds.
4. Retract the Z-axis at traverse rate to clear Z.

### G83 Cycle

The G83 cycle (often called peck drilling) is intended for deep drilling or milling with chip breaking. The retracts in this cycle clear the hole of chips and cut off any long stringers (which are common when drilling in aluminum). This cycle takes a Q number which represents a "delta" increment along the Z-axis. Program `G83 X... Y... Z... A... R... L... Q...`

1. Preliminary motion, as described above.
2. Move the Z-axis only at the current feed rate downward by delta or to the Z position, whichever is less deep.
3. Rapid back out to the clear\_z.
4. Rapid back down to the current hole bottom, backed off a bit.
5. Repeat steps 1, 2, and 3 until the Z position is reached at step 1.
6. Retract the Z-axis at traverse rate to clear Z.

It is an error if:

• the Q number is negative or zero.

### G73 Cycle

The G73 cycle (often called peck drilling) is intended for deep drilling or milling with chip breaking. The retracts in this cycle clear the hole of chips and cut off any long stringers (which are common when drilling in aluminum). This cycle takes a Q number which represents a "delta" increment along the Z-axi&#x73;**.**

Program `G73 X... Y... Z... A... R... L... Q...`

1. Preliminary motion, as described above.
2. Move the Z-axis only at the current feed rate downward by delta or to the Z position, whichever is less deep.
3. Rapid back out but only with increment Q, this is the difference with G83 above.
4. Rapid back down to the current hole bottom, backed off a bit.
5. Repeat steps 1, 2, and 3 until the Z position is reached at step 1.
6. Retract the Z-axis at traverse rate to clear Z.

It is an error if:

• the Q number is negative or zero.

### G84 Cycle

The G84 cycle is intended for right-hand tapping. Program `G84 X... Y... Z... A... B... C... R... L...`

1. Preliminary motion, as described above.
2. Move the Z-axis only at the current feed rate/per revolution to the Z position. So assume the spindle is running `M3 S600`. Then an F value of `F1` will give A feed of 600 /minute. The feed starts synchronized with the spindle pulse allowing it to tap the same hole again.
3. When the Z position is reached, reverse spindle `M4`. (Waits until spindle ramp-up and a new measurement of spindle speed)
4. Retract the Z-axis at the current feed rate to clear Z.

### G74 Cycle

The G74 cycle is intended for left-hand tapping. Program `G74 X... Y... Z... A... B... C... R... L...`

1. Preliminary motion, as described above.
2. Move the Z-axis only at the current feed rate/per revolution to the Z position. So assume the spindle is running `M3 S600`. Then an F value of `F1` will give A feed of 600 /minute. The feed starts synchronized with the spindle pulse allowing it to tap the same hole again.
3. When the Z position is reached, reverse spindle `M4`. (Waits until spindle ramp-up and a new measurement of spindle speed)
4. Retract the Z-axis at the current feed rate to clear Z.

### G85 Cycle

The G85 cycle is intended for boring or reaming but could be used for drilling or milling. Program `G85 X... Y... Z... A... B... C... R... L...`

Preliminary motion, as described above.

Move the Z-axis only at the current feed rate to the Z position.

Retract the Z-axis at the current feed rate to clear Z.

### G86 Cycle

The G86 cycle is intended for boring. This cycle uses a P number for the number of seconds to dwell. Program `G86 X... Y... Z... A... B... C... R... L... P...`

Preliminary motion, as described above.

Move the Z-axis only at the current feed rate to the Z position.

Dwell for the P number of seconds.

Stop the spindle turning.

Retract the Z-axis at traverse rate to clear Z.

Restart the spindle in the direction it was going.

The spindle must be turning before this cycle is used. It is an error if:

the spindle is not turning before this cycle is executed.

### G87 Cycle

The G87 cycle is intended for back boring.

Program `G87 X... Y... Z... A... R... L... I... J... K...`

The situation, as shown in the figure below, is that you have a through hole and you want to counterbore the bottom of the hole. To do this you put an L-shaped tool in the spindle with a cutting surface on the UPPER side of its base. You stick it carefully through the hole when it is not spinning and is oriented so it fits through the hole, then you move it so the stem of the L is on the axis of the hole, start the spindle, and feed the tool upward to make the counterbore. Then you stop the tool, get it out of the hole, and restart it.

This cycle uses I and J numbers to indicate the position for inserting and removing the tool. I and J will always be incremented from the X position and the Y position, regardless of the distance mode setting. This cycle also uses a K number to specify the position along the Z-axis of the controlled point top of the counterbore. The K number is a Z-value in the current coordinate system in absolute distance mode and an increment (from the Z position) in incremental distance mode.

1. Preliminary motion, as described above.
2. Move at traverse rate parallel to the XY-plane to the point indicated by I and J.
3. Stop the spindle in a specific orientation.
4. Move the Z-axis only at traverse rate downward to the Z position.
5. Move at traverse rate parallel to the XY-plane to the X, Y location.
6. Start the spindle in the direction it was going before.
7. Move the Z-axis only at the given feed rate upward to the position indicated by K.
8. Move the Z-axis only at the given feed rate back down to the Z position.
9. Stop the spindle in the same orientation as before.
10. Move at traverse rate parallel to the XY-plane to the point indicated by I and J.
11. Move the Z-axis only at traverse rate to the clear Z.
12. Move at traverse rate parallel to the XY-plane to the specified X, Y location.
13. Restart the spindle in the direction it was going before.

When programming this cycle, the I and J numbers must be chosen so that when the tool is stopped in an oriented position, it will fit through the hole. Because different cutters are made differently, it may take some analysis and/or experimentation to determine appropriate values for I and J.

::Image[]{src="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/vPayr8omhF3MIQDT5iW7a_image.png" size="72" width="811" height="454" caption position="flex-start" signedSrc="https://archbee-image-uploads.s3.amazonaws.com/wP9peVc2bAVBPOh6IboCS/vPayr8omhF3MIQDT5iW7a_image.png"}

### G88 Cycle

The G88 cycle is intended for boring. This cycle uses a P word, where P specifies the

number of seconds to dwell. Program `G88 X... Y... Z... A... R... L... P...`

Preliminary motion, as described above.

1. Move the Z-axis only at the current feed rate to the Z position.
2. Dwell for the P number of seconds.
3. Stop the spindle turning.
4. Stop the program so the operator can retract the spindle manually.
5. Restart the spindle in the direction it was going.

### G89 Cycle

The G89 cycle is intended for boring. This cycle uses a P number, where P specifies the

number of seconds to dwell. program `G89 X... Y... Z... A... R... L... P...`

1. Preliminary motion, as described above.
2. Move the Z-axis only at the current feed rate to the Z position.
3. Dwell for the P number of seconds.
4. Retract the Z-axis at the current feed rate to clear Z.


[title] Release notes
[path] /

:::hint{type="info"}
If you experience issues, please submit a support archive (Setup -> License & Support -> Create archive) when you contact us. That will give us the information that helps narrow down the problem. Thank you.
:::

:::hint{type="warning"}
Please note that starting with version 5, macro files can be annotated with the unit they use. Macro without annotation will result in a warning message.

Please look at [**Warning "Macro does not specify unit"**](docId:3t-7jWPydhuifdg_srNz0) for information on how to add annotation to the macro file.
:::

:::hint{type="info"}
&#x20; CPU5 controller board needs to have firmware version 1.12 to work with version 5 (software may indicate 1.13, but 1.12 is the current version).&#x20;

Please refer to [**Firmware upgrade**](docId\:pz3XEhfi-LimMFFTi-kyb) for further information.
:::

# Version 5.3.1

:::Changelog{title}
::ChangelogItem{type="added" description="Support for the french language"}

::ChangelogItem{type="added" description="Added Phoenix Contact Axioline support"}

::ChangelogItem{type="improved" description="Unsaved tool data is now stored when changing settings"}

::ChangelogItem{type="improved" description="Home is Estop command decoupled from setting"}

::ChangelogItem{type="fixed" description="CNC530 drive alarm did not work in certain configurations"}
:::

# Version V5.3

:::Changelog{title}
::ChangelogItem{type="added" description="Ability to disable all function keys from settings"}

::ChangelogItem{type="added" description="Add setting search to setup tab"}

::ChangelogItem{type="added" description="Add support for error messages to open pop-ups"}

::ChangelogItem{type="added" description="Introduction of error codes instead of text only messages"}

::ChangelogItem{type="added" description="Add feed/speed override max value setting for UIO-10"}

::ChangelogItem{type="added" description="Add rewind functionality to UIO-10"}

::ChangelogItem{type="added" description="Add coordinate data to the coordinate tab"}

::ChangelogItem{type="added" description="When RESET (escape) is executed, put the current line in the goto linenumber box"}

::ChangelogItem{type="added" description="Check whether home sensor is still active after first deceleration during homing"}

::ChangelogItem{type="added" description="UIO-10 Does not support enabling, disabling, and toggling FOV/SOV"}

::ChangelogItem{type="fixed" description="Server compains about modbus TCP address being incorrect even when it is not activated on the controlller"}

::ChangelogItem{type="fixed" description="Measure toollength is accidentally replaced after loading new job"}

::ChangelogItem{type="fixed" description="Screen was not updated/cleared when empty file is loaded"}

::ChangelogItem{type="fixed" description="Selecting next axis on wired pendant does not work with a tandem axis if it is set to visible"}

::ChangelogItem{type="fixed" description="User button icons use the wrong file"}

::ChangelogItem{type="fixed" description="Reset OP-25 does not react immeditaly"}

::ChangelogItem{type="improved" description="StatusView illuminate all leds in error state"}

::ChangelogItem{type="improved" description="Improve contrast and clarity for tabs"}

::ChangelogItem{type="improved" description="M54,55,56,57 commands should result in errors when not available on the connected controller"}

::ChangelogItem{type="improved" description="M54,55, 56, and 57 sometimes fall into the modbusTCP io operations while these are not supposed to be addressed"}

::ChangelogItem{type="improved" description="Make it possible to modify output during ALARM condition..."}

::ChangelogItem{type="improved" description="Change help icons to a smaller rounded blue icon"}

::ChangelogItem{type="improved" description="Renamed 'Halt on toolchange' to 'Run change_tool subroutine on M6 command'"}

::ChangelogItem{type="improved" description="Modify 'Traffic light/driver-disable/Safety relay' button/indicator"}

::ChangelogItem{type="improved" description="Show logical value for inputs on operate screen"}

::ChangelogItem{type="improved" description="Leave the logo in the bottom right corner in all menus with enough space"}

::ChangelogItem{type="improved" description="Option to hide help tab"}

::ChangelogItem{type="improved" description="Progress does not update if repeat is used"}

::ChangelogItem{type="improved" description="Axis setup improved"}

::ChangelogItem{type="improved" description="Added error codes in message screen that are clickable for more info"}
:::

# Version V5.2.1

:::Changelog{title}
::ChangelogItem{type="added" description="Probing macros examples, User_33/34/35"}

::ChangelogItem{type="added" description="Block Z-up on pause during tool change setting"}

::ChangelogItem{type="added" description="Laser support for LightBurn"}

::ChangelogItem{type="added" description="Help Tab + QR code to support and documentation"}

::ChangelogItem{type="added" description="QR for settings when the machine is offline"}

::ChangelogItem{type="fixed" description="Invertion of ports in setup"}

::ChangelogItem{type="added" description="Logo automatic centered"}

::ChangelogItem{type="added" description="Support StatusView"}

::ChangelogItem{type="improved" description="Variable page for debugging"}

::ChangelogItem{type="added" description="Do not show toggle tool direction when toggle tool is hidden"}

::ChangelogItem{type="added" description="Support for multiple profiles "}

::ChangelogItem{type="fixed" description="Restore spindle state after pause"}

::ChangelogItem{type="fixed" description="Issue wth m50 p.. being overwritten by next g1/g2/g3"}

::ChangelogItem{type="improved" description="Contrast for dark theme"}

::ChangelogItem{type="added" description="Automatically continue on m6 when switching to the same tool"}

::ChangelogItem{type="improved" description="Progress percentage indicator"}

::ChangelogItem{type="fixed" description="M80/M81 command fixed"}
:::

# Version V5.1.1

This hotfix version is meant for users experiencing issues with dialog boxes (dlgmsg command) not opening or closing prematurely in V5.01.

:::Changelog{title}
::ChangelogItem{type="fixed" description="Incompatibilities with specific macros due to enhancement of DialogBox solved."}
:::

# Version 5.01 (V5.1)

:::Changelog{title}
::ChangelogItem{type="added" description="Firmware included in release (\bin\firmware)"}

::ChangelogItem{type="added" description="New unified bootloader app '\bin\FirmwareToolUI.exe' "}

::ChangelogItem{type="fixed" description="Unicode rendering of characters in job/macro preview."}

::ChangelogItem{type="added" description="Render button for macro dialog windows to allow a preview of the resulting toolpath."}

::ChangelogItem{type="fixed" description="Several start condition checks"}

::ChangelogItem{type="improved" description="Reset behavior"}

::ChangelogItem{type="fixed" description="F6 also closes the MDI"}

::ChangelogItem{type="added" description="Pause Z-Up absolute position"}

::ChangelogItem{type="improved" description="Decimal support for camera rotation"}
:::

***Important changes:***

Behavior changes

- The 'Esc' key only stops the motion, but a 'Reset' is only performed by pressing F1
- When the machine is paused and a 'Reset' command is given, a dialog is displayed to confirm the reset.
- On wireless pendant, the 'Stop' button only pauses the operation and will not send a 'Reset' command.

# Version 5.00

:::Changelog{title}
::ChangelogItem{type="added" description="Lathe 3D rendering"}

::ChangelogItem{type="fixed" description="Software limits crossed error in rare cases"}

::ChangelogItem{type="added" description="Support for the CNC530 controller"}

::ChangelogItem{type="added" description="Auto detect polarity button for Home, E-Stop, and Drive Error"}

::ChangelogItem{type="fixed" description="OP25 button state not recovering"}

::ChangelogItem{type="improved" description="A-Axis rotation point configuration"}

::ChangelogItem{type="fixed" description="Extended user buttons not showing custom icons"}

::ChangelogItem{type="fixed" description="Negative spindle offsets not working"}
:::

# Version 5.00 Release Candidate

:::Changelog{title}
::ChangelogItem{type="added" description="OP-25 device support"}

::ChangelogItem{type="improved" description="Scrolling and rotation navigation of the 3D view"}

::ChangelogItem{type="added" description="Orthographic projection for the 3D view"}

::ChangelogItem{type="added" description="Preset views to change between side / top / rear for the 3D view"}

::ChangelogItem{type="fixed" description="Controller IP address validation"}

::ChangelogItem{type="improved" description="Relay board input state update algorithm"}

::ChangelogItem{type="added" description="WaitForRLYUpdate macro command "}

::ChangelogItem{type="fixed" description="LaserEngrave command causing issues when used with controllers that do not support it"}

::ChangelogItem{type="added" description="M10/M11 (Laser on/off) can be used inside a subroutine without causing a delay"}

::ChangelogItem{type="added" description="Detection of incorrect wireless handwheel driver"}

::ChangelogItem{type="improved" description="Display of job path for 4-axis milling machines"}

::ChangelogItem{type="added" description="Rotation direction setting for 4-axis milling machines in the Setup tab"}

::ChangelogItem{type="added" description="Tapping on DRO during handwheel tracking changes tracked axis (wired handwheel only)"}

::ChangelogItem{type="fixed" description="Error message when setting work zero with wired handwheel"}

::ChangelogItem{type="fixed" description="Zeroing while in handwheel state needing to be done twice to take effect"}

::ChangelogItem{type="fixed" description="Oil pump parameters not reflecting current state in certain circumstances"}

::ChangelogItem{type="fixed" description="Oil pump output not being stored correctly"}

::ChangelogItem{type="fixed" description="Mislabeled G28 variable in Variables tab"}

::ChangelogItem{type="added" description="Spanish language"}

::ChangelogItem{type="improved" description="Prevent the software from being started twice "}

::ChangelogItem{type="improved" description="Placement of label to escape current Setup tab category"}

::ChangelogItem{type="fixed" description="user_reset subroutine inconsistently called when Reset is issued"}

::ChangelogItem{type="fixed" description="G76 command resulting in error message in simulation mode"}

::ChangelogItem{type="improved" description="Refreshed icon images"}

::ChangelogItem{type="improved" description="Make icon size display consistent across the user interface"}

::ChangelogItem{type="added" description="Permit turning off single step mode during running job"}

::ChangelogItem{type="added" description="Permit changing block delete mode during running job"}

::ChangelogItem{type="added" description="Permit changing G28/G30 at the end of the job option during running job"}

::ChangelogItem{type="added" description="Permit changing arc feed override % during running job"}

::ChangelogItem{type="fixed" description="YTOA command"}

::ChangelogItem{type="fixed" description="Toolhead index not being swapped to camera when activating the work coordinate camera view"}

::ChangelogItem{type="improved" description="Work coordinate camera image display graduated from preview feature, with mirror and rotation settings"}

::ChangelogItem{type="added" description="Work coordinate camera offset in the Setup tab"}

::ChangelogItem{type="added" description="Camera device can now be selected within the work coordinate camera dialog"}

::ChangelogItem{type="added" description="Camera image brightness and contrast setting"}

::ChangelogItem{type="added" description="Camera image scaling setting"}

::ChangelogItem{type="added" description="Camera device zoom"}

::ChangelogItem{type="added" description="Work coordinate camera restores previous dialog position and size"}

::ChangelogItem{type="fixed" description="Incorrect &#x22;run job&#x22; action behavior from UIO-10"}

::ChangelogItem{type="improved" description="Separation between buttons in the jog dialog"}

::ChangelogItem{type="improved" description="Clarity of which mode the jog dialog is currently in"}

::ChangelogItem{type="improved" description="Touch screen handling in the jog dialog"}

::ChangelogItem{type="fixed" description="Unreadable hint text in the Program tab when using dark theme"}

::ChangelogItem{type="added" description="Jog dialog now stores jog speed override between sessions"}

::ChangelogItem{type="improved" description="Left Operate panel layout when user macro buttons are displayed in it"}

::ChangelogItem{type="fixed" description="Probe beep sound not playing"}

::ChangelogItem{type="fixed" description="Incorrectly displayed coordinates on the start of software with some configurations"}

::ChangelogItem{type="fixed" description="Displayed tool number text on top of the 3D view not reflecting actual tool number state"}

::ChangelogItem{type="added" description="Stepper spindle support for CNC720/CNC760"}

::ChangelogItem{type="improved" description="Clean up cnc-jobs directory"}

::ChangelogItem{type="added" description="UIO-10 specific macro subroutines: uio_1 through uio_32 can now be used in place of user subroutines"}

::ChangelogItem{type="improved" description="Make all axis letters in the Setup tab available regardless of connected controller"}

::ChangelogItem{type="fixed" description="Inaccurate step delta reported between homing"}

::ChangelogItem{type="added" description="Added AUX2-10 off on pause settings to the Setup tab"}

::ChangelogItem{type="added" description="G20/G21 will now issue a warning if loaded job units differ from configuration"}

::ChangelogItem{type="added" description="Disabled inchUnitMode setting that caused issues with dynamic variables"}

::ChangelogItem{type="added" description="Added &#x22;Show jog step 0.0001 button&#x22; setting to the Setup tab"}

::ChangelogItem{type="improved" description="Job is now redrawn automatically when attempting to start the job if it is required"}

::ChangelogItem{type="fixed" description="Setting to store coordinates on change not being correctly read/writen"}

::ChangelogItem{type="fixed" description="Time estimate factor setting value not being correctly read/written"}

::ChangelogItem{type="improved" description="Setting to store coordinates on change is now on by default for new configurations"}

::ChangelogItem{type="improved" description="Corrected settings in Setup tab for inch mode users"}

::ChangelogItem{type="improved" description="Corrected amount of displayed deimals in Setup tab for inch mode users"}

::ChangelogItem{type="added" description="Macro annotation that specifies used unit: mm or inch"}

::ChangelogItem{type="added" description="Warning when users load a job that uses different units than the machine is set up for"}

::ChangelogItem{type="fixed" description="Fixed an issue where tooltips were displayed on buttons that were not displayed at the time"}

::ChangelogItem{type="added" description="Setting for displayed decimals in the DRO"}

::ChangelogItem{type="added" description="Setting specifying whether 0.0001 jog step button is displayed"}

::ChangelogItem{type="added" description="Added AUX 2 through 10 off on pause settings to the setup"}

::ChangelogItem{type="fixed" description="Correct missing starting path lines in the 3D view"}

::ChangelogItem{type="fixed" description="Fixed incorrect line color in the 3D view in some cases"}

::ChangelogItem{type="improved" description="Dialog to load a job now pre-fills previous job file name"}

::ChangelogItem{type="fixed" description="Fixed an issue where the handwheel handling application failed to start"}

::ChangelogItem{type="improved" description="Automatically set correct count per revolution setting when wireless handwheel is selected"}

::ChangelogItem{type="fixed" description="Fixed state being changed to ready after zeroing with during handwheel tracking"}

::ChangelogItem{type="improved" description="Stop handwheel tracking when leaving the jogging menu"}

::ChangelogItem{type="added" description="Center of rotation point setting for trunnion table kinematics"}

::ChangelogItem{type="fixed" description="RUN IN input interaction"}

::ChangelogItem{type="added" description="RUN IN input now simulates 'Accept' action when an interpreter dialog is displayer"}

::ChangelogItem{type="fixed" description="Fixed zero all axes feature raising an error on systems with a tandem axis present"}

::ChangelogItem{type="improved" description="Removed mouse wheel interaction from numeric input to prevent accidental value changes"}

::ChangelogItem{type="added" description="Setting that applies current feed override to jogging"}

::ChangelogItem{type="improved" description="Changed numeric input < > signs to - +"}

::ChangelogItem{type="improved" description="Permit holding down the F-keys for feed and speed override keys, to continuously change the override value"}

::ChangelogItem{type="improved" description="Assign main spindle speed output to PWM1 in the demonstration configuration"}

::ChangelogItem{type="improved" description="Adjust the dark theme selected text color for better readability"}

::ChangelogItem{type="improved" description="The machine menu and left pane in the operate view now correctly display inverted input / output values"}

::ChangelogItem{type="fixed" description="Fix feed override value changing on reset when using a handwheel"}
:::


[title] EdingCNC post-processor
[path] /

On our [**website**](https://edingcnc.com/edingcnc-post-processor/), we offer several post-processors for different CAM software. These files are received from users who use them. We can't support all the available CAM software.&#x20;

However, we do try to help users in setting up the post-processor. Most of the time, this is pretty simple.

**Step 1. Select a 'Fanuc' post-processor**

We 'speak' ***Fanuc&#x20;***&#x47;-code, so it's likely that selecting this will already generate an almost compatible G-code file.

**Step 2. Generate G-code based on this post-processor**

The result G-code should be similar to examples found in the 'CNC-jobs folder.

**Step 3. Load the G-code in our software.**

When a G-code file is loaded, it will be checked for valid G-code; if it finds a G-code it does not understand, it will report this. In the event of an issue with a certain G-code, you can modify the post-processor and repeat steps 2 and 3.

If you run into issues with reported issues about the G-code, please get in touch with us and send the G-code for us to look at.

Another option is starting with, e.g., a MACH3 post-processor since that G-code is very similar.

