How many work offsets does a machine have?+−
The classic six, G54 to G59, plus the extended ones: G54.1 P1 to P48 on Fanuc (up to P300 with the option), G154 P1 to P99 on Haas and G505 to G599 on Siemens. On Heidenhain the list is the rows of the preset table. The extended ones are usually a machine option, so it pays to confirm they are enabled.
What happens if I write no G54 in the program?+−
The machine uses whichever work offset was active, which is normally the one from the last part machined. On most controls the power up default is G54, but that is a parameter and not a guarantee. Writing the work offset in the safety block of every tool costs nothing and takes the problem away.
Can I change work offset halfway through a program?+−
Yes, and it is the normal way to machine several parts on the table: you do the first under G54, retract the tool in Z, write G55 and call the same subprogram again. The only firm rule is that the work offset change happens with the tool up and in a safe positioning block.
What is the difference between G54-G59 and G52 or G92?+−
G54 to G59 select a row that is stored and visible on the work offset screen. G52 and G92 are shifts that add on top of the active work offset and stay set without appearing in that table. For repeatable work you use the first; the second only for temporary shifts, and always cancelling them.
Do the same work offsets apply on a mill and on a lathe?+−
The concept is the same and so are the codes, but on a lathe the normal thing is a single work offset with Z on the finished face of the part, using G55 or G56 for the second setup or the operation after turning it around. On lathes with a sub spindle each spindle usually carries its own set of work offsets.