G-code reference

G254 G-Code: Dynamic Work Offset (Haas DWO)

Dynamic Work Offset (Haas DWO) — Haas DWO automatically adjusts the work offset when the rotary axes move, so the part does not have to sit exactly on the rotary centre. G255 cancels.

By cnccode · Updated
PropertyValue
CodeG254
FunctionDynamic Work Offset (Haas DWO)
Modal group23
TypeModal — stays active until replaced by another code of the same group
Used onMilling machines
SyntaxG254 … G255

What does G254 do?

Haas DWO automatically adjusts the work offset when the rotary axes move, so the part does not have to sit exactly on the rotary centre. G255 cancels.

G254 is modal: once programmed it remains in effect for the following blocks until another code from modal group 23 replaces it or the control is reset.

Syntax and parameters

Format
G254  …  G255

G254 example program

Example
G54 G254
(4/5-axis machining)
G255

▶ Open this example in the G-code viewer

Tips and common mistakes

  • Cancel DWO before tool changes and at program end.

Controller compatibility

G254 follows the ISO/Fanuc dialect used by Fanuc, Haas, Brother, Doosan, Hurco (ISO mode), Mazak (EIA/ISO mode), Okuma (G-code mode) and Siemens in ISO dialect mode. Parameters, option packages and builder-specific behaviour can differ, so confirm the details in your machine's programming manual before running a new program.

Frequently asked questions

Is G254 modal?
Yes. G254 belongs to modal group 23 and stays active until another code of that group is programmed.
What does G254 mean in CNC?
G254 means Dynamic Work Offset (Haas DWO). Haas DWO automatically adjusts the work offset when the rotary axes move, so the part does not have to sit exactly on the rotary centre. G255 cancels.
What is the difference between G254 and G234?
G254 is Dynamic Work Offset (Haas DWO), while G234 is Tool Centre Point Control (Haas TCPC). See the G234 page for its syntax and examples.
Can I use G254 on a lathe?
Usually not with the same meaning: G254 is documented here for milling machines. Check your control manual for the equivalent.