Inductive Proximity Switches for CNC Machines: NPN vs PNP vs NAMUR and Their Roles as Hard Limits, Reference Switches and Tool Presence Sensors

Proximity switches are the most numerous components on a machine and among the most casually replaced. But the same NPN switch can be a safety hazard on a hard limit and can destroy repeatability on a reference axis. This guide does not rehash generic NPN/PNP theory: it focuses on the three machine roles – hard limit, reference/home switch, and tool or workpiece presence – and how each should be selected for output type, NO versus NC, mounting and wiring. Specific part numbers, sensing distances and mounting criteria follow the manufacturer datasheet and your machine manual.

Sister article: Proximity switches NPN / PNP / NAMUR for machine tools – the Chinese guide; related: How to read a CNC machine electrical schematic, Machine safety circuits: STO vs SS1 and dual channels, CNC homing failure classification, Fanuc I/O Link address assignment, Spindle unclamp failure: PMC input signal chain, CNC 24 V / 5 V control power faults.

17.1 Verdict first: default to PNP for new installs, NPN only for legacy retrofits

NPN PNP selection verdict
  • PNP (sourcing) switches +24 V to the input and matches the sourcing-input convention of mainstream PLCs such as Siemens S7-1200, Schneider Modicon and Beckhoff. Catalogues carry roughly three times as many PNP as NPN models (one major brand lists about 207 PNP series versus 74 NPN).
  • NPN (sinking) pulls the input to 0 V and is common on Japanese CNC controls and older stepper drives.
  • The choice depends on the PLC input common: sourcing inputs need PNP, sinking inputs need NPN. On a retrofit, replace the sensor rather than adding an NPN-to-PNP converter – fewer components, fewer failure modes.
广告

Table 1. NPN / PNP selection (follow the PLC input type)

17.2 The three output families

Three output families
FamilyWiringOutput behaviourTypical use
NPN (sink)Brown + / blue – / black outputPulls the load to 0 VJapanese CNC, legacy steppers
PNP (source)Brown + / blue – / black outputFeeds +24 V to the loadEuropean PLCs, new machines
NAMUR (IEC 60947-5-6)Two-wire, about 8.2 V via an isolating amplifierCurrent draw below 1.2 mA / above 2.1 mAIntrinsically safe loops, Ex zones
Four-wire complementaryOne NO plus one NCBoth states availableSeries safety chains

Table 2. Output families (four-wire is a variant; check the datasheet)

Two-wire sensors sit in series like a mechanical switch but have leakage current and an on-state voltage drop: the PLC input must tolerate them (IEC 61131-2 Type 2/3 inputs do) or the input may never turn off. The key NAMUR advantage is that wire breaks and shorts are detectable – current still flows in the low state, so a monitoring loop can see an open circuit.

17.3 The three machine roles (the focus of this guide)

Three machine roles

1. Hard limit – prefer normally closed (NC)

A broken wire then reads as “limit triggered” – that is fail-safe: the machine stops rather than losing protection. Four-wire complementary types (one NO, one NC) or PNP/NPN NC sensors wired in series into a single E-stop chain are the mainstream architecture for industrial machine safety circuits. See machine safety circuits for the chain design.

2. Reference / home switch – repeatability is what matters

At constant temperature, repeatability is typically ≤0.01 mm, adequate for stepper and servo reference return. Mount the target so it sweeps past the sensor rather than striking the sensing face – consistent side-swipe triggering reduces mechanical shock and improves repeatability. For home-failure diagnosis see homing failure classification; for inputs being missed see I/O Link addressing.

3. Tool / workpiece presence – M12 4-pin PNP NO is the industry convention

On automatic tool changers and pallet changers, M12 / M18, PNP, NO and 4-pin connectors are the common configuration. For the PMC-side signal path see spindle unclamp / tool not seated.

Table 3. Selection by role (part numbers follow the machine builder and datasheet)

17.4 Three corrections to sensing distance

Rated distance Sn applies only to a standard mild-steel target:

  • Copper / aluminium is roughly 30-50% of steel (aluminium about 0.4, copper about 0.3 – use the reduction factor in the datasheet); small or thin targets reduce it further.
  • A non-flush sensor needs at least 2 x Sn of free space around the sensing face; mounting it flush in a steel bracket leaves it permanently triggered.
  • On stainless or aluminium panels, use the maker’s flush-mount accessory or a non-flush type rated around 2.2 x Sn.

For consistent distance across mixed metals, choose a Factor 1 (all-metal) sensor. All reduction factors follow the manufacturer datasheet – no universal numbers.

17.5 Wiring and supply

Three-wire sensors commonly use 10-30 V DC: brown +, blue -, black output; reverse polarity destroys the sensor. Output current is typically ≤200 mA, enough for a relay or PLC input. Two-wire types need attention to leakage and minimum load current; NAMUR must use an isolating amplifier, never a plain PLC input.

17.6 Three EMC rules

  1. Keep at least 300 mm from variable-frequency drives;
  2. Route power and signal cables separately;
  3. Add 0.1 uF across the PLC input to suppress spikes (per input circuit and maker recommendation).
广告

For grounding and shielding practice see SV0381 linear scale alarms caused by poor grounding.

17.7 Four checks for intermittent operation

Four checks for intermittent operation
  1. Wrong mounting distance – especially on copper/aluminium, recalculate with the reduction factor;
  2. Metal mounting surface shortens the range – check whether a non-flush type was mounted flush;
  3. Adjacent sensors interfering – allow at least twice the sensing distance between them, or use alternating-frequency models;
  4. Strong magnetic sources (welding robots) – use Mu-metal shielding or a Factor 1 magnet-immune type.

17.8 Magnet selection and mounting

For magnet actuation, neodymium iron boron 15 x 5 mm with a field of at least 800 Gauss is a common starting point (follow the supplier spec). Keep axial alignment within ±3 degrees and radial spacing within 80% of nominal. Magnet specifications vary widely by brand.

17.9 Retrofit advice: replace the sensor, do not stack converters

When converting a legacy NPN installation to PNP, replace the sensors instead of adding NPN-to-PNP converter circuits. Every extra module is another failure point. If the old wiring must stay, verify the PLC input common first, then choose PNP or NPN accordingly.

17.10 Commissioning and acceptance

With the real target, verify and record both the switch-on and switch-off points in the machine log; re-check after insertion, vibration and temperature changes. Acceptance items are covered by the 30-point used-machine electrical checklist and CNC 24 V / 5 V control power faults.

Frequently Asked Questions

What is the difference between NPN and PNP proximity switches, and which should a new machine use?

PNP (sourcing) feeds +24 V to the input, NPN (sinking) pulls it to 0 V; that describes the output transistor and says nothing about NO/NC. The choice follows the PLC input common: sourcing inputs need PNP, sinking inputs need NPN. New installs default to PNP because it matches mainstream European PLCs and is far more available; choose NPN only for legacy Japanese equipment.

Why should a machine hard-limit switch be normally closed?

Because an open cable is the most likely failure in a limit loop. With NC topology, a broken wire reads as “limit triggered” and the machine stops – that is fail-safe. With NO, a broken wire reads as “not at limit” and protection is silently lost. The overall chain still needs a safety relay.

What happens if a reference switch is mounted crooked, and what repeatability is realistic?

A crooked mount makes the trigger point inconsistent, so the home position drifts with each return. At constant temperature an inductive switch typically reaches ≤0.01 mm repeatability (check the datasheet). Mount the target so it sweeps past the sensor side rather than striking the sensing face, keeping the trigger point consistent.

Last updated: 2026-11-19

Where to go next

Read the guide, get the right instrument, or walk the diagnosis through with someone — pick whichever you need.

© 版权声明
THE END
喜欢就支持一下吧
点赞6赞赏 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容

CNC电气调试问题解答 | 数控机床电气工程师资料共享屋
CNC电气调试问题解答 | 数控机床电气工程师资料共享屋
CNC电气调试问题解答 | 数控机床电气工程师资料共享屋
CNC电气调试问题解答 | 数控机床电气工程师资料共享屋
CNC电气调试问题解答 | 数控机床电气工程师资料共享屋
CNC电气调试问题解答 | 数控机床电气工程师资料共享屋
图片-CNCShare | 数控电气技术中心
图片-CNCShare | 数控电气技术中心
图片-CNCShare | 数控电气技术中心
图片-CNCShare | 数控电气技术中心
图片-CNCShare | 数控电气技术中心
图片-CNCShare | 数控电气技术中心
SINUMERIK Servo Alarms 25000, 25010 and 25201: Which Layer to Troubleshoot First-CNCShare | 数控电气技术中心
828D / 840D sl 伺服报警 25000 / 25010 / 25201 怎么分层?先看 NC 报警还是 F 码-CNCShare | 数控电气技术中心
Mitsubishi MT Works2 / MR Configurator2: Official Download Path, Modules and Servo Parameters-CNCShare | 数控电气技术中心
三菱 MT Works2 / MR Configurator2 哪里下载?伺服调参上位机三大模块、怎么连 MR-J4/J5、能改哪些参数与三大下载坑-CNCShare | 数控电气技术中心
SINUMERIK 828D Tool Management NC-PLC Interface Explained: DB4300, Three Tables and the Drum-Magazine Wrong-Tool Case-CNCShare | 数控电气技术中心
SINUMERIK 828D 刀具管理 NC-PLC 接口详解:DB4300 任务/应答 + 三张表 + 换刀步骤与圆盘刀库取错刀号复盘-CNCShare | 数控电气技术中心
SINUMERIK 828D / 840D sl Tool Management DB Quick Reference: DB4300 Bits, DB9900/9901/9902 Tables and Transfer/Ack Steps-CNCShare | 数控电气技术中心
SINUMERIK 828D / 840D sl 刀具管理 DB 接口速查表:DB4300 位域 × DB9900/9901/9902 三表 × 传输/应答步骤号-CNCShare | 数控电气技术中心
FANUC M98 / M99 Subprogram Calls: P Numbers, Nesting Limits and How to Troubleshoot Alarms 076 / 077 / 078-CNCShare | 数控电气技术中心
FANUC M98 / M99 子程序怎么调用?P 号规则、嵌套上限与 076 / 077 / 078 三个报警怎么查-CNCShare | 数控电气技术中心
Inductive Proximity Switches for CNC Machines: NPN vs PNP vs NAMUR and Their Roles as Hard Limits, Reference Switches and Tool Presence Sensors-CNCShare | 数控电气技术中心
接近开关 NPN / PNP / NAMUR 到底怎么选怎么接?机床三大角色(硬限位 / 原点 / 刀位检测)的不同选法 + 常闭优先的失效安全 + 误动作四查-CNCShare | 数控电气技术中心
文章精选
专心做好一件事
打造更优雅的WordPress主题-CNCShare | 数控电气技术中心
专心做好一件事
打造更优雅的WordPress主题