First you need to have the hardwire done (connect your micro).
After this you need to set up in the config ports and pins the pin number that you connected the micro to a signal.
If you need to set Z, then the most direct form for you is the signal "Z Home" in the input signals window.
Now you can "home" and Z will automatically reset.
In the manual this is more detailed.