Posted hal file is correct. The problem was hiding in "custom_postgui.hal", where debounce was already initiated for z probe (I downloaded some pyvcp examples from linuxcnc forum (MONSTERV7)). Commenting out "debounce" in custom_postgui.hal solved my problem (here posted hal works with no problem!).