I wrote a quick and dirty macro to give partial compatability with a Yaznaq G13 on our 518MSC (Fanuc 18M) Mori Seiki.
I say partial because Yaznaq uses an "L" as one of the optional augments. This is not possible on the Fanuc as "L" is not normally supported in Macro B.
You would need to look up several machine parameters and change the variables to match your 0m.
I can stop by the shop and get a copy to post here later if there is interest.
Note again this is the Yaznaq type which does not have ANY Z axis movement. You must use a G01 Z before the G13 and a G00 Z after...
Someday I will "Upgrade" the Macro to be more like the HAAS usage of a G13. But at the time I was handed a cart with all preset tooling and ready to run Yaznaq code that I had to edit into something we could run today and it was full of G13's.
You might also try the G65 Pxxxx method if you don't want to add a G13 command.