What type of switch.? There are many types with some differences in how they connect.

If proximity Switches then are they NPN or PNP.? How did you wire them, which colours where.?
We need more details than just pin numbers