Hi zarsss,
there is no 'Ref All Home' instruction in G code. Mach4 has a function like that or you could code your own if you wanted something a bit special.
You would have a macro, m100, for instance, and in that macro there would be a call to Machs 'Ref All Home' function or other Lua code of your choice.
Whenever you want to 'Ref All Home' in G code you'd write m100....easy!
Craig