Skip to content
Tutorials Center
My learning

Topics

Lesson 7 of 37 ยท Automation Basics

Sensors and Actuators for PLCs

Learn the common sensors and actuators a PLC connects to: proximity and photoelectric sensors, NO and NC contacts, contactors, solenoid valves and motors, with C stand-ins.

A PLC is blind and powerless on its own. Sensors are its eyes and ears: they tell it what is happening. Actuators are its hands: they do the work. Choosing the right device, and wiring it so a fault is detected, is half of automation.

This lesson surveys the common field devices, explains normally-open versus normally-closed contacts (and why safety-related stop buttons are wired normally closed), and shows how a program reasons about them.

Common sensors

Sensors: what they tell the PLC

Proximity Metal is near
Photoelectric Beam broken
Limit switch Arm reached the end
Analog Temp, pressure, level

Digital or analog output

1 / 2
Sensor Detects Output Notes
Push button / selector Operator command Digital Contact closes by hand
Limit switch Mechanical position Digital Robust, contact wears
Inductive proximity Metal objects, no contact Digital (PNP/NPN) Short range
Capacitive proximity Metal, liquids, plastic Digital Adjustable sensitivity
Photoelectric Any object breaking or reflecting a beam Digital Dust can disturb it
Pressure / level / flow Process variable Analog 4-20 mA Needs scaling
Thermocouple / RTD Temperature Analog, special input card Needs the right module
Encoder Position and speed Pulses Needs a high-speed counter

Normally open and normally closed

A contact is normally open (NO) if it is open (no current) when nothing acts on it, and normally closed (NC) if it conducts at rest. The words describe the resting state of the device, not the state of the program bit.

Which one to wire matters for fail-safe design. A stop button wired NC reads 1 at rest; pressing it, or a cut wire, makes the input 0. A wire break therefore stops the machine instead of silently disabling the Stop. A Start button, in contrast, is wired NO.

C Stand-in: why Stop buttons are wired normally closed (C)

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with scanf or fgets), it gets the next line from this box.

The NO design does not stop on the "wire cut" row. That is the danger the NC wiring removes.

Stopping through the PLC program is for normal control. A real emergency stop must also cut power through a dedicated safety circuit. See Safety and Troubleshooting.

Actuators

Actuator What it does Driven by
Contactor Switches a motor's power A digital output (the coil)
Motor starter / VFD Runs the motor, VFD sets speed Digital output or analog / network command
Solenoid valve Opens or closes air or fluid flow Digital output
Control valve Positions flow between 0 and 100 % Analog output (4-20 mA)
Pneumatic cylinder Pushes or pulls Solenoid valve
Indicator lamp, horn Tells the operator Digital output

A PLC output cannot usually carry motor current. It switches a small contactor coil, and the contactor switches the motor. Never connect a large load directly to a PLC terminal.

Feedback: do not trust a command alone

Turning an output on does not mean the device moved. A good program checks feedback (a limit switch, a motor-running contact, a flow switch) and raises an alarm if the device did not respond in time.

C Stand-in: a valve with open feedback and a timeout (C)

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with scanf or fgets), it gets the next line from this box.

Sensor outputs: PNP and NPN

Three-wire DC sensors come as PNP (sourcing: switches +24 V onto the signal wire when active) or NPN (sinking: pulls the signal wire to 0 V). Your input module must match the style. In Europe PNP is more common; in parts of Asia NPN is common. Always check.

Debounce, noise and shielding

Long cables pick up noise from motors and drives. Use shielded cable for analog signals, keep signal cables away from power cables, and ground shields at one end as the installation rules say.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. A normally closed stop button is read by the PLC as 1 when:

    An NC contact conducts at rest, so the input is 1; pressing or cutting the wire makes it 0.
  2. 2. Why not connect a large motor directly to a PLC output?

    PLC outputs switch small loads; a contactor handles the motor current.
  3. 3. Which sensor output type tells a PLC the exact temperature?

    Analog sensors give a continuous value that the PLC scales to degrees.
  4. 4. What is the purpose of feedback from an actuator?

    Feedback lets the program detect failures such as a stuck valve.

Summary

  • Sensors give the PLC information; actuators carry out its commands.
  • Wire stops NC so a broken wire becomes a stop, and check PNP/NPN compatibility.
  • Outputs switch contactor coils and valves, not heavy loads directly.
  • Use feedback and timeouts to detect failures.

Next: PLC Memory, Addressing and Tags