if program 0 was just set in mdi, then reset, and z on screen should be z offset from tool table
if a tool 0 was just set in manual, then, again, z on screen should be z offset from tool table ( no reset this time )
for both, there is no futher check in mdi / is it ok ?