I used one on my z axis. I did because I could purchase them
from digikey for about a $1.47. There are a few negatives to using them.
They are difficult to mount due to their design. Finding connectors that
won`t fall off the pins is usually a difficult search. They need a resistor in
series so you won`t blow out the internal LED. After I installed the photo
sensor I then tried npn proximity switches from automation direct and have
been happy with them. They also sell a screw on cable that is very secure.
I used them only as homing switches. It was my assumption that they would
be more accurate then a snap action limit .