How to distinguish between NPN and PNP? How to connect them to PLC?

Nā 'huki maikaʻi