An industrial sensor converts something physical (a metal bracket arriving, a pipe temperature, a tank pressure) into an electrical signal that a PLC input card can read. Choosing well comes down to five questions: what are you detecting or measuring, what is the target made of, how far away or how wide is the range, what will the environment do to the sensor, and what signal does your controller expect.
What does a PLC actually receive from a sensor?
A PLC receives one of three things: a discrete on/off signal, an analogue signal, or digital data over a communication link. Discrete sensors (proximity and photoelectric switches) switch a 24 V DC line. Analogue transmitters (temperature, pressure, flow, level) send a continuously varying signal, and the industry standard is the 4-20 mA current loop.
The 4-20 mA loop is popular for good engineering reasons. According to the Wikipedia article on current loops, it is a self-monitoring signal: currents below 3.8 mA or above 20.5 mA are taken to indicate a fault, so a broken wire reads as a fault rather than as a plausible low value. The same article notes the loop has high noise immunity because it is a low-impedance circuit, usually run over twisted pair, and it can be carried over long cables. The 4 mA "live zero" also allows two-wire transmitters to power themselves from the loop.
Many 4-20 mA devices also speak HART, which overlays a digital signal on the same pair of wires so configuration and diagnostics travel alongside the analogue value (Wikipedia, HART Protocol). IO-Link, covered later, does a similar job for discrete sensors.
Which proximity sensor should you use?
Use an inductive sensor for metal, a capacitive sensor when the target is non-metallic or is a liquid or powder, and a photoelectric sensor when you need longer range or to detect almost any object. Proximity sensors are the workhorses of factory automation because they detect a target without touching it.
| Sensor | Detects | Strengths | Watch out for |
|---|---|---|---|
| Inductive | Metal only | No moving parts; works in wet or dirty conditions because liquids and most dirt do not disturb the magnetic field | Short range; the rated distance depends on the target metal |
| Capacitive | Anything conductive, or with a dielectric constant different from air | Detects plastics, liquids and powders, including level through a non-metallic wall | Needs adjusting against the real product; compare datasheet correction factors |
| Photoelectric: through-beam | Anything that blocks the beam | Longest range of the three photoelectric modes | May miss translucent objects; needs wiring on both sides |
| Photoelectric: retro-reflective | Anything that interrupts the beam to a reflector | One housing plus a reflector; better range than diffuse | May miss highly reflective objects |
| Photoelectric: diffuse | Anything that reflects the beam back | One housing, no reflector | Shortest range; colour and surface of the target change the result |
The inductive and capacitive behaviour above follows the Wikipedia articles on inductive sensors and capacitive sensing, and the three photoelectric modes follow its article on photoelectric sensors. For a feel for real hardware, the photo below shows an M18 inductive switch rated for an 8 mm operating distance, according to its Wikimedia Commons description.

This short animation compares the three sensor families side by side.
How do you measure temperature, pressure and flow?
Temperature is measured with thermocouples or resistance temperature detectors (RTDs), pressure with gauge, absolute or differential transmitters, and flow with magnetic, Coriolis, differential-pressure and other meter types. The right choice depends on range, accuracy and the fluid.
Temperature: thermocouple or Pt100?
A thermocouple generates a tiny voltage (tens of microvolts per degree) from two dissimilar metals, so it needs a reference-junction (cold-junction) correction and care with wiring. A Pt100 RTD is a platinum element whose resistance is 100 ohms at 0 degC; it is defined in IEC 60751 and changes by a nominal 0.385 ohms per degC, according to Wikipedia's article on resistance thermometers.
| Thermocouple (Type K / Type J) | RTD (Pt100) | |
|---|---|---|
| Range quoted by Wikipedia | Type K about -200 to +1350 degC; Type J about -40 to +1200 degC | Typically used over a narrower range at moderate temperatures |
| Output | Millivolt-level voltage | Resistance |
| Wiring | Matching thermocouple extension cable and cold-junction compensation | 2-, 3- or 4-wire; 3- and 4-wire cancel lead resistance |
| Typical use | Furnaces, kilns, exhaust, high temperature | Process piping, HVAC, food, pharma |
On a PLC you usually buy a dedicated thermocouple or RTD input module, or fit a head-mounted transmitter that converts the sensor into 4-20 mA near the sensor, which is often the more noise-robust choice over long runs.
Pressure and flow
Gauge transmitters measure against atmosphere, absolute transmitters against a vacuum reference, and differential transmitters measure the difference between two points. Differential pressure is also a flow technique: across an orifice plate, flow is estimated from the square root of the differential pressure, and the international standard for those calculations is ISO 5167 (Wikipedia, Orifice plate). That square-root relationship is why a differential-pressure flow signal is normally linearised in the PLC.
An electromagnetic flow meter works by electromagnetic induction and needs a conducting fluid, such as water containing ions, in an insulating-lined pipe (Wikipedia, Magnetic flow meter). A Coriolis meter infers mass flow from the phase shift between two vibrating tubes and can also report density, though its calibration depends on tube rigidity (Wikipedia, Mass flow meter). Vortex and ultrasonic meters are the other common families; read the manufacturer's application note against your fluid before specifying one.
How do you scale a 4-20 mA signal in the PLC?
Convert the current linearly onto the transmitter's calibrated span. In plain text: value = low + (current - 4) / 16 x (high - low).
For a pressure transmitter ranged 0 to 10 bar, a reading of 12 mA gives 0 + (12 - 4) / 16 x 10 = 5 bar. A reading of 4 mA is 0 bar, 20 mA is 10 bar, and anything below 3.8 mA should raise a wire-break alarm rather than be scaled. Analogue input modules deliver an integer count for the current, so check your module manual for the nominal count range, then scale the count to engineering units and clamp or flag out-of-range values. The same arithmetic is practised in the free process control simulator.
How do you choose a sensor for the job?
Work through the same short checklist every time:
- Target and measurand: metal, non-metal, liquid, transparent, or a process variable.
- Range and accuracy: sensing distance or measuring span, plus repeatability, not just the headline accuracy.
- Environment: temperature, vibration, dust, chemicals and wash-down. Ingress protection is defined in IEC 60529 (EN 60529); IP67 covers temporary immersion, while the IP69K test, defined in ISO 20653, uses high-pressure, high-temperature wash-down water at 80 degC (Wikipedia, IP Code).
- Output and interface: PNP or NPN switching, 4-20 mA, or IO-Link, matched to your input cards.
- Certification: ATEX or IECEx where there is an explosive atmosphere, and the right safety rating if the sensor is part of a safety function (see our functional safety guide).
What is IO-Link and when is it worth using?
IO-Link is an international standard (IEC 61131-9) for point-to-point communication with sensors and actuators over the familiar three-wire connection, with no special cable required, according to the IO-Link community. It is not a fieldbus; each device connects to an IO-Link master port. In practice it gives remote parameter changes, device identification and diagnostics, which shortens replacement time because a new sensor can be re-configured automatically. Our IO-Link integration guide covers the architecture in more detail.
How EDWartens can help
EDWartens' Professional Module is a five-day live online class in Siemens TIA Portal (S7 PLCs, HMI and WinCC SCADA), plus self-paced Basic Engineering that includes an instrumentation and sensors module. It is Siemens-focused and online, so you will not handle physical sensors on a rig; practise signal handling in PLCSIM and the free browser labs instead. See the Professional Module or create a free account. Free options: the industrial instrumentation course and the multimeter simulator.




