Access to machine position in macros?

Is there a way to access the machine position from macros? I ported over my macros from cncjs and mposx, mposy, mposz seem to return the current work position.

@PyDrew - Andrew, I think there is a switch in the firmware settings that indicate whether to report work coordinates or machine coordinates. Look at $10 setting. I’m not sure if that’s what you’re looking for or not but worth checking out.

@PyDrew did it work with the machine coordinates provided by the variables mposx, mposy, mposz in the macro code?

I tried it out myself. With FluidNC as grbl controller the machine position in macro code is provided by the variables mentioned above (mposx, mposy and mposz). Just in case anybody else has the same question.