When the spares shelf holds PNP switches but the machine was designed around NPN sinking inputs, a straight swap inverts every input. The cure is a deliberate three-step change: identify the common terminal, pick one of two routes, then a controlled trial run.
An NPN switch pulls the input down to 0V when conducting, so the PLC common S/S sits on +24V in sinking wiring. A PNP switch pushes the input up to +24V, which requires S/S on 0V in sourcing wiring. Step one is therefore not wiring but identifying the module common: find the S/S or COM terminal, note whether it currently carries 24V or 0V, and list which inputs are affected before touching anything.
Hardware route: move S/S to 0V, wire the PNP unit brown to +24V, blue to 0V, black to input X - the logic matches the old NPN and no program change is needed, provided every other device on that module is PNP too. Program route: leave S/S alone and swap the NO and NC contacts for that input, or invert the rung. Pick exactly one route; mixing both is how buried faults are born. Before sign-off, trigger each switch by hand and watch the module LED and the program monitor agree, audit every rung using that input - especially interlocks and e-stop chains - and run one low-speed cycle. Update the drawing with the S/S scheme and the polarity type.
| Item | Original NPN sinking | After PNP change |
|---|---|---|
| Module common S/S | On +24V | Move to 0V on the hardware route |
| Brown wire | +24V | Unchanged |
| Blue wire | 0V | Unchanged |
| Black wire | To input X | Unchanged |
| Level when active | Pulled toward 0V | Driven toward +24V |
| Program action | Original logic | None on hardware route, or swap NO/NC |
The whole conversion hinges on one terminal. After the change, photograph the wiring, update the drawing, and state on the front page that the module is all NPN or all PNP. That single discipline prevents most mixed-polarity incidents.
The quantities and component characteristics discussed here follow current national standards and the corresponding IEC documents: PLC input interfaces and control circuits per GB/T 5226.1 (IEC 60204-1); device characteristics per GB/T 14048.10. Always check the device datasheet and the product design file for ratings and derating.
Locate the issue with the approach above, then confirm with measurements; safety-related circuits must follow the standards and manufacturer requirements.