Origin Offsets in CNC Machines

From a mathematical point of view, if we are machining an infinite-length raw stock, the set of points through which the machine will pass does not change in either form or orientation with respect to a translation transformation. However, if we have a bounded domain, this may lead us in some cases (depending on the dimension of the domain) to a different shape from the original form because we may go out of the domain. In machining, the domain here is the set of points contained in the raw stock geometry. Therefore, it is crucial to know the offset used in CNC machines to preserve the desired final form.

What are machine offsets ?

Machine offsets are a set of static, geometric translation scalars known to the machine and defined at the time of its construction. These are programmable parameters that allow the machine to represent the position of a point defined within the program's reference frame.

Origin used in machining

In a CNC machine, we essentially have six origins that are fixed to the machine, the workpiece, and the turret. These origins may or may not change over time.

Machine Origin (MO)

In this position, the machine is at the mechanical stop. This position must have an offset from the measurement origin because when the machine moves to the home position at a high speed, there is a delay between the stop signal and the actual stop command of the motor, creating a displacement in Cartesian space.

Measurement Origin (mO)

Each axis in the NC Machine has its own regulation system which functions in a closed-loop regulation. The decoder (acquisition system) determines the absolute position of each axis relative to the absolute zero. This position is the measurement origin.

Workpiece Origin (W)

This origin is attached to the chuck mounting support. It is used to define both the program origin and the workpiece origin, as the workpiece is attached to the chuck with a rigid joint, allowing the origin of the workpiece to be determined by a translation.

Turret Origin (N)

The turret origin is fixed to the turret itself. During machining operations, as the turret moves along the tool holder, it's essential for the machine to return to the measurement origin. This allows for the determination of its position during machining, facilitated by geometric construction offsets.

Workpiece Holder Origin (N)

The workpiece holder origin is fixed to the workpiece holder itself. This origin has a static value which is set when the machine is constructed. All program origins and workpiece origins are calculated with respect to this origin.

Program Origin

Finally, we come to the program origin which, in basic usage, is utilized by NC software and G-code programmers. This origin is used to determine the coordinates of the machining program within the measurement origin.

Uses of origins in Gcode program

Usually, when we program using NC software from various CAM software providers, we primarily use the machine origin, workpiece origin, and program origin. Each software provider has their own philosophy in defining the semantics and logic of machining, but they all share the same results, which involve using these origins.
What is more interesting is that these offsets can be accessed using parameterized programming with #<address>. For example, we can access the G54 X offset with #5221 in both write and read modes, although this may vary from one machine to another.
We can gain additional benefits by determining the turret origin, which enables us to correct the tool offset using the probing system.

References

http://sitemeca.free.fr/index.php?page=prog/programmation&art=1.2.7http://philippe.berger2.free.fr/productique/ressources/origines/origines.htmhttps://www.cnccookbook.com/g54-g92-g52-work-offsets-cnc-g-code/

Get started with me today.

If you're looking for an engineer who can design, develop and integrate complex mechatronic systems, I'm the right choice for you.

Let's build something amazing together!