How to connect proximity switch as limit switch?

HOW TO CONNECT PROXIMITY SWITCH AS LIMIT SWITCH USING OPTOCOUPLER?

There are two types of switches – PNP (3002PA, 3002PB, …) and NPN (3002NA, 3002NB, …)

proximity

 

Switches are also categorized as NC – normaly closed (3002PB, 3002NB, …) and NO – normaly open (3002PA, 3002NA, …).
For NC switches enable “Invert Limit” in software settings, for NO switches disable this setting.


You can connect ordinary switch with optocoupler like this:

switch