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 P1–P99 (the legacy G110–G129 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.
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 = -450a different setup — P1 near G54:
#14001 = -120.5#14002 = -60#5221 = -100Your 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.