Usually connecting +Z or -Z from encoder to Z input should work fine.
Also, depending on + or - you get active low or active high.
Might have issues with "open collector" type outputs from encoder, can be easily fixed with a resistor between +V encoder power and input/encoder output.
The following user(s) said Thank You: atrex77, COFHAL