I did some more testing and did not get the variables 2000 to 2040 to read any other value than 0. I tried a fresh profile, a new installation on a different PC, i used the simulator instead of the CS Labs controller. This seems to be just broken (for me?).
To get the set z button (and the touch module) to work with hight offsets, is used a workaround. In the scripts i used the currently active tool and tool length from the tool table instead of the active hight offset. This works as long as the currently selected tool is the same as the active hight offset, so this is not perfekt.
To geht the current tool and its length i used this code in the scripts:
local CurTool = mc.mcToolGetCurrent(inst) --Current Tool Num
local CurToolHight = mc.mcToolGetData(inst, mc.MTOOL_MILL_HEIGHT, CurTool) -- Length of the current Tool (from the Tooltable)
So for the set z button, the calculation of the hight offset looks like this:
local OffsetVal = ZPos - GageBlock - CurToolHight
If anyone can have a look at the variable 2032 at their system with a active g43 hight offset, it would be helpful to know if its just me who has this problem.