I think G28.1 was already in the postprocessor. It's been a while since I've worked on this. This is what I could find:
function Reference()
firstRef = false
if (refHome) then
post.ModalText(" G28.1 Z")
post.Number(3 * scale, "0.00")
else
post.ModalText(" G31 Z -100")
end
post.ModalNumber (" F", refFeed * scale, "0.0###")
post.Eol()
post.ModalText(" G92 Z0.0\n")
post.ModalText (" G00")
post.Text(" Z")
post.Number (switchOffset * scale, "0.0000")
post.Eol()
post.ModalText(" G92 Z0.0\n")
end
This code is on the top of the post processor file to use G28.1 instead of G31.
--If this value is set to true then use G28 (home) for the Z reference
--Set it to false for G31 probe
refHome = true