Gee Five Four: WPC or Work Position Co-ordinate
G54 Is a programmed and known base set of positions relative to the Machines Zero that are used as a datum for each program.
Syntax:
G54
When using a lathe G54 will represent two pre-programmed positions that the running program will access and use as a datum point in both X and Z axis. Typically in the offset setting page G54 will be two numbers representing the two different axis.
That’s all pretty simple however some Fanucs do differ.
On older controls this will be called a “Workshift” that you set in much the same way as G54 but it is a single entry on the “Workshift” page. You will also see on the Offset page of later Fanucs that there are TWO G54 sections, one called “G54” and one called “G54 EXT”
If you set your machine using G54 EXT you will not need to “call” G54 in the actual program. The machine will assume you mean the G54 EXT numbers.
Lets have a look at a Fanuc Oi control.

You will see both a (G54) setting No 00 EXT) (highlighted). You can set your values in here and the machine will run without any need to put G54 in your program. Think of G54 EXT as a “Global” entry.

However if you set 01 (G54) highlighted above, then you will need to call G54 in your program. Think of G54 EXT as “Workshift” is on older controls.
Now it gets a little bit more involved. If you are using (01) G54 and you put any numbers in the G54 EXT (00) they will modify your other G54 (01) in an incremental mode. The same for all other Work Position G-codes, G54, G55, G56, G57 etc they are all modified by the G54 EXT.
G54 Is A Modal Command