There are a number of ways to do this. Perhaps the best way is by setting up a status report and requesting for it when you want it. It will be returned immediately if it’s a request {“sr”:null}, and all fields in the status report will always be returned (i.e. requests are not filtered). You can either leave auto-generated status reports on, or turn them off {“sv”:0″}
You can set status to report in external units and in the work coordinate system by using the posX variables. This is useful for a DRO style display. Example:
{“sr”:{“line”:true,”posx”:true,”posy”:true,”posz”:true,”vel”:true,”stat”:true}}
Alternately, if you are going to be using the status reports for drawing on a screen you might want internal machine format – always in MM and always relative to the homed position. The offsets and units are useful if you want both a drawing and a DRO, as you can use the current offsets and the units to compute the values that show in the DRO. ‘t’ is a shorthand for true. Example:
{“sr”:{“line”:t,”mpox”:t,”mpoy”:t,”mpoz”:t,”ofsx”:t,”ofsy”:t,”ofsz”:t,”vel”:t, “unit”:t,”stat”:t}}
See the status reports page for details:
https://github.com/synthetos/TinyG/wiki/Status-Reports
You can also just ask for the values you want:
{“posx”:null}
{“posy”:null}
{“posz”:null}
Or ask for the pos (or mpo) group. You will get all 6 axes:
{“pos”:null}