pull down to refresh

A PLC (programmable logic controller) is a rugged industrial computer that repeatedly makes simple control decisions. It replaces a cabinet full of hard-wired relays with logic that can be tested, diagnosed and changed without rewiring the whole machine.

Its basic loop is called a scan:

  1. Read inputs — copy the current state of sensors and switches into memory.
  2. Run the program — evaluate the ladder logic, function blocks or structured text from top to bottom.
  3. Update outputs — energize or de-energize output points according to the result.
  4. Housekeeping — communications, diagnostics and fault checks; then the scan starts again, usually within milliseconds.

Typical inputs include a start button, emergency-stop status, limit switch, photo-eye, motor overload contact, tank float, temperature sensor or 4–20 mA pressure transmitter. Typical outputs include an indicator lamp, alarm horn, solenoid valve, contactor coil, heater relay, control valve command or VFD speed reference. The PLC normally commands a relay, contactor or drive—it does not feed a large motor directly.

Simple example: filling a tank. When the low-level switch is active and all safety permissives are healthy, the PLC starts the pump and opens the inlet valve. It keeps scanning the level switches. When the high-level switch turns on, it stops the pump and closes the valve. If the motor overload trips, flow does not appear within a timeout, or the level signals disagree, the PLC stops the process, latches a fault and turns on an alarm. An operator can see which condition failed instead of tracing dozens of relay wires.

PLCs are used because they tolerate electrical noise, heat and vibration; respond predictably; support industrial I/O and networks; and make machines easier to troubleshoot and maintain. The program is normally stored in non-volatile memory, while selected counters or settings can be configured as retentive so an ordinary power loss does not erase the machine logic.