Macro for homing using operator’s panel button

The macro serves for machine homing through a button on an operator’s panel.
To run the VB script you need one free digital input where to you should connect the button.

 Macropump for homing with a button