G54 sets the X Y & Z coordinates to your reference tool. One of the pieces of data you enter for each tool is the LENGTH.What is happening as you change tools the Ddiplay value for Z will change to reflect the currently called out tool. So - if for your reference tool - the Z position at a certain height of the machine is 3", then is you change to a tool that is an inch shorter and have an M6 T?? line matching the new tool, the Z value would read 4 reflecting the current position of the now active tool.