What it is and what it does on the panel
The Square D XU2S18PP340WD is an XU2 series thru-beam photoelectric sensor in an M18 threaded nickel-plated brass housing, with a 90° side sensing head and an IP67 enclosure rating. The XU2S18PP340WD pairs an emitter and a receiver across an 8 m optical path; the receiver side is the switched device, set up here for PNP output on a 12 to 24 VDC loop and terminated through an M12 4-pin DC micro male connector. In a control panel this class of device sits across a conveyor gap, a machine guard line, or a pallet-index station, breaking the beam to flag a part present, a door closed, or a tray in position. At 8 m the XU2S18PP340WD covers the longer spans inside a packaging cell or a transfer line — long enough to bridge a wide belt, short enough that alignment is forgiving on a hand-held test rig.
Ratings that decide the fit
Sensing range is 8 m on this emitter/receiver pair, with a 1 millisecond response and a 500 Hz switching frequency — fast enough for indexing conveyors at typical line speeds, not the part you'd pick for high-rate part counting on a small-pitch feeder. The lens is PMMA, the beam is infrared, and the operating mode is light/dark selectable so the receiver can be wired either way without re-aiming. Supply is 12 to 24 VDC on a M12 4-pin DC micro male pigtail, PNP output, 100 mA maximum load current on the switched leg. Approvals on the record are UL, CSA, and CE, which is what the cross-border trader will look for on the declaration pack. Side-look head at 90° means the optical axis comes off the side of the M18 body rather than the front face — useful when the emitter and receiver need to mount on a bracket that runs along the conveyor frame instead of across it.
How it sits against the same-family peers
The XUB2BPBWM12R is the same M18 threaded, M12 4-pin, PNP thru-beam form factor but stretches to 15 m sensing range rather than 8 m. If the application needs the longer span, XU2S18PP340WD will not reach; for installs where 8 m covers the gap, it drops in on the same wiring pin-out and supply range. The XUB2BPAWM12R sits in the same envelope as XUB2BPBWM12R — 15 m, M12 4-pin, PNP — and differs on the output contact logic rather than on the optical envelope, so it is not a closer functional match for the XU2S18PP340WD than XUB2BPBWM12R is. The XU2M18MB230 is a different animal — 24 to 240 VAC/VDC supply, 2-wire cable exit, front sensing, 20 ms response. It is not a cross for XU2S18PP340WD on a 12–24 VDC PNP loop.
Wiring and mounting in practice
The M18 threaded nickel-plated brass body takes the standard through-hole bracket or a pair of lock nuts; the IP67 rating holds as long as the M12 connector is seated and the cable jacket is in spec. A field swap on a wet line is workable from the van — no factory return needed — provided the replacement is the same emitter/receiver pairing and the alignment is re-checked after mounting.
Sourcing posture and where this leaves the buyer
The M12 4-pin PNP profile is the common denominator across the XU2 and XUB photoelectric families, so a spare drawn from this listing will physically and electrically fit a panel originally specced on an XUB-series receiver with the same 12 to 24 VDC PNP wiring, within the 8 m range limit above.
