What is the difference between G90 and G91?+−
G90 measures coordinates from part zero and G91 measures them from wherever the tool is at that moment. In G90, X50. is position fifty; in G91, X50. is a move of fifty millimeters in the positive direction, wherever it starts from.
Can I mix absolute and incremental in one program?+−
Yes, and it is the normal thing: returns to reference are written in incremental and geometry in absolute. The practical rule is to go back to G90 in the same block where you pick up an absolute coordinate, so you never leave a G91 hanging.
What mode does the machine start up in?+−
It depends on a control parameter and how the builder left it. G90 is the most common, but you cannot take it for granted. That is why the first line of the program declares the mode instead of inheriting it.
Does M30 put the control back in G90?+−
On many machines, yes, but that is also decided by the configuration. A program that ends in G91 can leave the control that way for the next one. Writing G90 before M30 and again in the header of the next program solves the problem without depending on the machine.
How do you do absolute and incremental on a Fanuc lathe?+−
With different letters instead of modal codes: X and Z are absolute and U and W are incremental, and they can appear together in the same block. This is the G code list type A system, the most widespread one on lathes.