Reading a G154 Offset

Read a Haas additional work offset (G154 P1) out of its system variables.

Beyond G54–G59, Haas gives you 99 more work offsets: G154 P1P99 (the legacy G110G129 codes are aliases for P1–P20). On the NGC the P1 origin lives at #14001 (X), #14002 (Y), #14003 (Z) — each P block 20 apart. They're ordinary registers: a macro reads them the same way it reads any variable.

Read firstHaas System VariablesComplete Haas CNC system variable reference with NGC and legacy mappings, read/write flags, and worked macro examples: probing, work offsets, timers, tool data, and machine state.

Your turn

Copy the G154 P1 X origin (#14001) into #101 and its Y origin (#14002) into #102. Then set #103 to how far the P1 origin sits from G54 in X — compute #14001 minus the G54 X origin (#5221).

The machine gives you

P1 set to the right of G54:#14001 = -300#14002 = -150#5221 = -450
a different setup — P1 near G54:#14001 = -120.5#14002 = -60#5221 = -100

Your program is run once for each set of conditions. It has to work for all of them.

Loading...

This is a learning simulation — always prove out a program on the actual control before you cut metal.