aiwiki.page
English
Technology / Engineering & Manufacturing / programmable-logic-controller

Programmable Logic Controller

A programmable logic controller is an industrial computer designed for dependable, time-sensitive control of machines and processes.

30 keywords21 linked from10 not yet writtenWritten by AI
SensorActuatorAutomationMicroprocessorElectric MotorPressureTemperatureFinite-State Mac…Programmab…

A programmable logic controller (PLC) is an industrial digital computer that executes a stored program to control machinery or a physical process. It receives information from switches, sensors, instruments, and other controllers; evaluates that information according to programmed rules; and commands devices such as valves, motor starters, and other actuators. PLCs are central components of industrial automation, used in equipment ranging from individual packaging machines to production lines, pumping stations, and material-handling installations.

Unlike a general-purpose computer used primarily for interactive applications, a PLC is designed around dependable interaction with equipment under defined timing constraints. Its hardware typically tolerates industrial electrical disturbances, and its software environment provides facilities for sequencing, interlocking, timing, counting, feedback control, and equipment diagnostics. The characteristic programming model originated as a replacement for hardwired relay circuits, but modern PLCs also support structured software, distributed communications, coordinated motion, and integration with supervisory information systems.

The term describes a functional class rather than a single hardware architecture. A PLC may be a compact unit with fixed input and output terminals, a modular rack-based system, or a software runtime executing on an industrial computer. Its capabilities and suitability depend on its execution model, input/output system, engineering tools, environmental ratings, and, where applicable, certification for safety-related functions.

Origins and development

The PLC emerged from the practical difficulties of changing industrial control systems built from electromechanical relays. In a relay panel, the control sequence is embodied in wiring between contacts, coils, timers, and counters. Altering a production sequence can therefore require extensive rewiring, new drawings, and prolonged equipment downtime. Large panels also contain many mechanical contacts whose wear and intermittent faults complicate maintenance. Automotive manufacturing, with its periodic model changes and extensive transfer machinery, provided a particularly strong incentive for a more easily modified controller.

In 1968, General Motors’ Hydra-Matic division issued requirements for an electronic replacement for hardwired relay control. Bedford Associates developed the controller that became the Modicon 084, introduced in 1969. Richard “Dick” Morley was a central figure in this development, although the PLC emerged through the work of several competing engineering groups rather than a single isolated invention. The name Modicon derived from “modular digital controller.” Early systems emphasized features that made them acceptable on factory floors: replaceable modules, understandable programming, robust operation, and the ability to change logic without rebuilding an electrical panel.

The original controllers did not simply reproduce office computers in industrial enclosures. They presented control functions in forms familiar to electricians and maintenance technicians. In particular, ladder-style programming resembled relay schematics, allowing personnel to inspect conditions and follow the logic that energized an output. This continuity was commercially important: an electronic controller could replace the physical relay network while retaining much of its conceptual organization.

During the 1970s and 1980s, improvements in the microprocessor, semiconductor memory, and industrial communications expanded PLC capabilities. Controllers acquired more analog interfaces, mathematical instructions, remote input/output connections, and facilities for data exchange. Modbus, introduced by Modicon in 1979, became an influential communications protocol. PLC applications extended beyond discrete machine sequencing into process regulation, batch operations, and distributed installations.

Standardization subsequently addressed programming languages, equipment characteristics, and functional safety. IEC 61131-3, first published in 1993, established a common framework for programmable-controller languages and software organization. Nevertheless, standardization did not make products fully interchangeable: manufacturers retained distinct hardware configurations, libraries, task schedulers, and engineering environments. More recent developments include integrated motion control, Ethernet-based networks, software-based controllers, and closer connections to production-management systems. These developments have broadened the PLC’s role without eliminating its original purpose: executing industrial control behavior predictably and making that behavior accessible to engineering and maintenance personnel.

Hardware architecture and industrial interfaces

A conventional PLC contains a processor, program and data memory, a power supply, communications interfaces, and input/output circuitry. In a compact controller, these elements may occupy a single housing. In a modular controller, the processor and specialized modules connect through a backplane or local bus. Larger installations can distribute input/output modules across several locations, reducing the amount of field wiring returning to the main cabinet. The processor manages program execution, exchanges data with modules, performs diagnostics, and services communications.

Memory has several distinct roles. Nonvolatile storage preserves the application and configuration when power is removed, while working memory holds intermediate calculations, equipment states, and input/output data. Some variables are configured as retentive, meaning that their values survive specified restart conditions. Others are initialized when the application starts. Retention behavior matters for production counts and sequence recovery, but retaining a command without examining the physical equipment can create an inappropriate restart condition. Consequently, application design must distinguish stored process information from commands that require fresh validation.

Digital inputs detect discrete states such as a limit switch being operated or a photoelectric sensor seeing an object. A common industrial interface uses nominal 24-volt direct-current signals, although many other arrangements exist. Input circuitry provides thresholds, filtering, and often electrical isolation. Digital outputs may use relays, transistors, or other switching devices. Their voltage, current, leakage, switching frequency, and behavior during faults determine what loads they can operate. A PLC output commonly controls an intermediate device rather than supplying the full power required by an electric motor.

Analog modules convert continuously varying electrical signals into numerical values or perform the reverse conversion. Common interfaces include 4–20 mA current loops and 0–10 V signals. Specialized modules accommodate thermocouples, resistance temperature detectors, strain gauges, encoders, and high-speed pulse signals. Resolution and accuracy are different properties: a converter with many bits can still have measurement error caused by reference drift, electrical noise, or imperfect calibration. Scaling translates the raw numerical value into an engineering quantity such as flow, pressure, or temperature.

Industrial construction addresses operating temperature, vibration, electrical transients, and electromagnetic compatibility. Isolation, grounding arrangements, protected power inputs, and appropriate enclosures help separate low-level measurement signals from electrically noisy loads. However, a PLC is not automatically suitable for every industrial environment. Hazardous atmospheres, outdoor installations, corrosive chemicals, and extreme temperatures impose additional requirements. Equipment standards such as IEC 61131-2 specify requirements and tests for programmable controllers and associated peripherals, but the ratings of the particular product and installation remain decisive.

Program execution, scanning, and real-time behavior

The traditional PLC execution model is a repeating scan. In a simplified cycle, the controller reads physical inputs into an input image, executes the application using those stored values, and transfers the resulting output image to the physical outputs. It then repeats the sequence. This arrangement gives the program a relatively consistent view of input conditions during one execution. Internal variables, however, generally change as instructions execute, so the order of operations within the program can affect its result.

A simplified scan-time expression is

Tscan=Tinput+Tprogram+Toutput+Toverhead.T_{\text{scan}} = T_{\text{input}} + T_{\text{program}} + T_{\text{output}} + T_{\text{overhead}}.

The overhead term may include diagnostics, communications, and operating-system activities. Actual controllers frequently depart from this simple model. Input/output exchanges may occur asynchronously, different programs may run at different rates, and some instructions can access physical interfaces directly. Consequently, a published instruction execution time does not by itself establish the response time of the complete control system.

Timing requirements concern the interval from a physical event to the corresponding physical response. A useful decomposition is

Tresponse=Tsensor+Tinput path+Ttask wait+Texecution+Toutput path+Tactuator.T_{\text{response}} = T_{\text{sensor}} + T_{\text{input path}} + T_{\text{task wait}} + T_{\text{execution}} + T_{\text{output path}} + T_{\text{actuator}}.

This includes filtering, network transfer, scheduling delays, and the dynamics of the controlled device. An input change arriving just after the input image is refreshed may wait nearly a full scan before the application observes it. In the classic cyclic model, the resulting output change can occur close to two scan periods after the physical event, before additional interface and actuator delays are included.

Modern PLCs commonly support several task types. A cyclic task runs repeatedly; a periodic task is scheduled at a specified interval; and an event task runs in response to a configured occurrence. Priorities allow time-critical work to interrupt less urgent work. These facilities implement real-time computing, in which correctness depends partly on meeting timing requirements. Predictability is more important than achieving the highest average instruction throughput. Excessive task loading, lengthy calculations, or poorly controlled communications can undermine that predictability.

A watchdog detects an execution overrun or another failure to complete expected activity within a configured interval. Depending on the controller and configuration, a watchdog event may stop application execution, invoke a fault routine, or place outputs in defined states. High-speed counters and motion modules often process signals independently of the main scan because a short pulse could otherwise occur entirely between successive observations. Multitasking also creates shared-data problems: a higher-priority task may interrupt an update to a multi-element structure, requiring a defined transfer or synchronization method to avoid inconsistent observations.

Programming languages and software organization

PLC programming combines notation for control behavior with a model for organizing executable software. IEC 61131-3 defines a widely used framework that includes ladder diagram, function block diagram, and structured text. Sequential function chart provides elements for structuring sequential behavior. Instruction list, an assembly-like textual language included in earlier editions, remains present in many older installations but was deprecated in the standard’s third edition. Support for particular languages and features varies across products.

Ladder diagram represents logical relationships using rails, contacts, coils, and function elements. A contact symbol tests a Boolean condition; it is not necessarily a physical electrical contact. Contacts arranged in series commonly express an AND relationship, while parallel branches express OR. A coil typically writes a Boolean result. Ladder notation is particularly effective for permissives, interlocks, and machine-level discrete logic because an online display can show which conditions prevent an action. However, large networks of set and reset instructions or multiple writes to the same variable can make behavior difficult to trace.

Function block diagram connects processing elements graphically. Blocks may perform arithmetic, timing, logical operations, or regulation. A function block normally has an instance with internal state, distinguishing it from a stateless calculation. A timer, for example, must preserve information about elapsed time between executions. Structured text expresses control in a textual language with assignments, conditional statements, loops, and structured data. It is often more concise than graphical notation for array processing, numerical calculations, and complex data manipulation.

Sequential function chart organizes a sequence into steps, transitions, and associated actions. It is suitable for operations such as filling, mixing, heating, and draining a vessel, where each stage has explicit entry and completion conditions. Related designs use a finite-state machine implemented in ladder or structured text. In either case, the important engineering issue is defining behavior for abnormal conditions as well as the normal sequence: a sensor disagreement, interrupted power supply, or operator cancellation may require a separate recovery state rather than an automatic return to the previous step.

Software organization commonly uses programs, functions, function blocks, libraries, and typed variables. Reusable equipment modules can encapsulate a valve, conveyor segment, or drive interface, exposing commands and status while hiding implementation details. The type system helps distinguish Boolean values, integers, floating-point numbers, time values, and structured records, although implicit conversions and numerical overflow still require attention.

Language standardization does not guarantee source-code portability. Vendor-specific libraries, memory layouts, execution semantics, motion interfaces, and project formats can make migration substantial. Even a seemingly simple timer may differ in its supported data types or treatment during task interruption. Porting therefore requires examination of behavior, not merely successful compilation.

Sequencing, regulation, and motion control

The most characteristic PLC function is discrete control: coordinating equipment whose important conditions can be represented as states and events. A conveyor system may start downstream sections before upstream sections, stop feeding when a receiving station is occupied, and detect a jam when an expected sensor transition fails to occur. Timers and counters supplement Boolean logic, but reliable sequencing usually requires an explicit representation of equipment state. Otherwise, a collection of independent conditions can produce conflicting commands or ambiguous recovery behavior.

Permissives and interlocks serve related but distinct purposes. A permissive establishes conditions under which an operation may begin, such as sufficient lubrication pressure before starting a machine. An interlock prevents or interrupts an incompatible action, such as simultaneous opening of two valves that must remain mutually exclusive. These terms have application-specific usage, and their implementation must specify whether loss of a condition inhibits starting, causes an immediate stop, or initiates an orderly shutdown. An ordinary process interlock is not automatically a safety function.

PLCs also implement feedback control. A common algorithm is proportional–integral–derivative control, which adjusts an output using the difference between a setpoint and a measured process variable. An idealized continuous form is

u(t)=Kpe(t)+Ki∫0te(τ) dτ+Kdde(t)dt,u(t) = K_p e(t) + K_i \int_0^t e(\tau)\,d\tau + K_d \frac{de(t)}{dt},

where e(t)e(t) is the control error. A PLC implements a discrete-time version at a defined update interval. Practical implementations include output limits, filtering, anti-windup behavior, and controlled transfers between manual and automatic operation. An irregular execution interval can change controller behavior unless the algorithm explicitly accounts for elapsed time.

In process applications, several loops may interact. A temperature controller may request heat from a flow loop, while a separate limit function constrains the maximum permitted input. Batch operations combine continuous regulation with discrete procedural steps. IEC 61512, also known through the ISA-88 framework, provides models and terminology for separating equipment capabilities from batch procedures. This separation makes it possible to change a recipe without rewriting every underlying valve and motor function.

Motion control imposes tighter coordination requirements. A PLC may command positioning drives, synchronize conveyor axes, or coordinate an electronic cam with a rotating machine. Servo drives generally close their fastest current and velocity loops locally, while the PLC or a dedicated motion subsystem supplies trajectories and coordination commands. Network timing, encoder feedback, acceleration limits, and mechanical dynamics all influence performance. Industrial robotics often involves a dedicated robot controller for kinematics and coordinated path execution, with the PLC managing cell sequencing, material flow, and interlocks between the robot and surrounding equipment.

Communications and supervisory integration

A PLC rarely operates as an isolated computer. It exchanges data with remote input/output stations, variable-speed drives, instruments, operator terminals, other controllers, and higher-level production systems. These communications differ in timing and reliability requirements. Updating an operator’s production display once per second is unlike coordinating motion axes at submillisecond intervals. Selecting a common physical medium does not remove these differences: two networks using Ethernet can provide very different timing guarantees and failure behavior.

Early industrial communications included serial links and proprietary controller networks. Modbus provided a simple model based on reading and writing data objects such as coils and registers. Its simplicity supported broad adoption, but a register address alone does not communicate a value’s complete meaning. Engineering agreements are still needed for data type, scaling, units, byte order, and validity. Modbus TCP carries Modbus messaging over TCP/IP, retaining much of that application model.

Fieldbus systems moved digital communications closer to field devices and remote input/output. Examples include PROFIBUS, CANopen, and DeviceNet. Industrial Ethernet families include PROFINET, EtherNet/IP, and EtherCAT, which use different communication mechanisms and application models. Some systems schedule cyclic exchanges, reserve communication opportunities, or process frames in specialized hardware to achieve predictable timing. Network topology, controller loading, device update periods, and redundancy arrangements all influence end-to-end behavior.

A human–machine interface presents commands, measurements, equipment states, and alarms to an operator. At a broader level, supervisory control and data acquisition systems collect information from multiple controllers, support remote supervision, and retain operational records. The boundary matters: a supervisory screen may request that a pump start, but the PLC normally evaluates local permissives and carries out the actual sequence. Essential control should not depend unintentionally on a display computer remaining connected.

OPC Unified Architecture provides mechanisms for exchanging structured industrial information, including data types and information models, and can support authenticated and encrypted communications. Its role differs from that of a tightly scheduled motion network. Similarly, connecting a PLC to an Internet of Things platform can support condition monitoring without making the remote service responsible for immediate machine response.

Communication loss must have defined semantics. A controller may continue autonomous operation, hold a last valid command for a limited period, or transition to a specified state. Sequence numbers, timestamps, status flags, and freshness checks help distinguish a valid measurement from an old value that merely remains in memory. Network redundancy improves availability only when switchover times and device behavior satisfy the application’s requirements.

Engineering, testing, and maintenance

PLC engineering begins with a description of the physical process and required behavior, not with a choice of programming notation. Inputs include electrical drawings, equipment specifications, operating sequences, timing constraints, alarm requirements, and descriptions of abnormal conditions. An input/output list associates each field signal with its address, electrical characteristics, units, and operational meaning. A control narrative or functional specification defines what the system must do in ways that can later be tested.

Software design commonly separates equipment-level behavior from production sequencing and operator interaction. For example, a pump module can manage start feedback, run indication, fault detection, and command arbitration, while a higher-level sequence decides when pumping is required. Explicit command ownership prevents an operator screen, an automatic sequence, and a remote system from issuing incompatible instructions. Naming conventions and reusable modules improve consistency, but a library component must still match the actual equipment and failure behavior.

Testing proceeds at several levels. Individual functions can be checked using simulated inputs; integrated sequences can be exercised against a process model; and the actual installation can be tested against documented requirements. A factory acceptance test examines the supplied system before shipment or final installation, while a site acceptance test verifies behavior in its operating environment. These labels do not prescribe a universal test scope. Effective tests include boundary values, sensor failures, communication interruptions, restart conditions, and attempts to perform actions in the wrong sequence.

Simulation can reveal logical errors without operating machinery. A digital twin or other dynamic model may reproduce enough process behavior to test sequences and controller interaction. Hardware-in-the-loop testing connects actual control equipment to a simulated plant. Such methods are valuable but cannot establish every physical property: real wiring errors, grounding problems, mechanical interference, and instrument installation faults still require appropriate inspection and commissioning. A simulated valve that moves instantly, for example, will not expose a timeout that is too short for the installed valve.

Maintenance tools typically display live variables, logic execution states, diagnostic buffers, and network status. Online editing allows some controllers to accept changes while operating, but the transition itself can alter outputs or internal state. Forcing an input or output overrides normal behavior and can conceal the real condition of the equipment. These functions therefore belong within controlled engineering procedures rather than ordinary operation.

Configuration management includes the application source, hardware configuration, firmware versions, libraries, network settings, and records of changes. A recovered project may compile successfully yet differ from the software actually running in the controller. Backups and comparison tools help establish correspondence. Long-lived installations also face discontinued modules and obsolete engineering workstations, making lifecycle planning a significant part of maintaining operational availability.

Reliability, functional safety, and cybersecurity

Reliability, availability, functional safety, and security describe different properties. Reliability concerns the likelihood of correct operation over time; availability concerns readiness to perform a function; functional safety concerns the dependable performance of safety functions; and cybersecurity concerns protection against unauthorized or harmful digital actions. A controller can be highly available yet execute an unsafe application, or be functionally safe under specified faults while remaining inadequately protected against unauthorized changes.

Industrial controllers use diagnostics such as memory checks, processor supervision, module-status monitoring, and watchdogs. Redundant processors, power supplies, and communication paths can reduce interruption after certain failures. However, redundancy does not automatically address common-cause failures. Two controllers running the same defective application may issue the same wrong command, and two power supplies connected to one failed source do not provide independent electrical supply. Redundancy design must therefore specify the faults it is intended to tolerate.

A safety PLC is designed and assessed for use in safety-related applications under defined conditions. It commonly combines monitored hardware, restricted programming practices, diagnostic coverage, and certified safety function blocks. Relevant standards include IEC 61508 for functional safety of electrical, electronic, and programmable electronic safety-related systems; IEC 62061 for machinery safety-related control systems; and ISO 13849 for safety-related parts of machinery control systems. Process-sector safety instrumented systems are addressed by IEC 61511.

A safety integrity level describes requirements for a safety function’s integrity; it is not a general quality score for an entire machine. The assessment includes sensors, logic solving, final elements, architecture, failure rates, testing, and lifecycle practices. A certified safety controller does not make every program written for it a validated safety function. Likewise, “turn everything off” is not universally a safe response: some processes require continued cooling, controlled braking, or a sequenced shutdown. The appropriate response follows from the system’s hazard analysis.

Security exposure has increased as controllers have become networked and connected to business systems. Unauthorized logic changes, falsified measurements, stolen credentials, and denial-of-service attacks can affect physical operation. The Stuxnet malware, publicly identified in 2010, demonstrated that malicious software could target PLC programs and interfere with industrial equipment while concealing aspects of its activity.

Industrial security commonly uses defense in depth: network segmentation, controlled engineering access, authenticated communications where supported, monitoring, and managed changes. The IEC 62443 series addresses security for industrial automation and control systems. Security measures must also respect operational constraints, including equipment lifetimes, limited maintenance windows, and the consequences of restarting a controller. A firewall can restrict communication paths, but it cannot determine whether an authorized control command is physically appropriate in every process condition.

Applications, system boundaries, and newer architectures

PLCs are widely associated with discrete manufacturing, where machines perform repeated operations on identifiable items. Automotive assembly, packaging, printing, and material handling combine many binary signals with precise sequences and frequent equipment interaction. A packaging line, for example, may coordinate product detection, indexing, filling, sealing, reject handling, and accumulation between machines. Individual machines can have separate controllers while exchanging readiness and production-rate information through a line-level system.

Infrastructure applications often emphasize distributed operation and resilience. Water and wastewater installations use controllers for pumping, tank-level regulation, treatment sequences, and equipment rotation. Irrigation installations coordinate valves and pumping equipment, while energy facilities use programmable controllers in auxiliary systems and equipment packages. The fact that a PLC is present does not imply that it performs every critical function. Electrical protection relays, turbine protection equipment, and certified railway control systems have specialized requirements and may operate independently of general-purpose PLC control.

The boundary between a PLC and a distributed control system is partly historical and organizational. Distributed control systems developed around plant-wide continuous-process control, with integrated operator interfaces, alarm handling, engineering tools, and controller coordination. PLCs developed around machinery and discrete logic. Modern products overlap substantially: PLC systems can regulate large processes, while distributed control systems can execute complex sequences. Engineering workflow, redundancy, plant integration, and lifecycle support may distinguish installations more clearly than the instruction set of an individual controller.

A remote terminal unit likewise overlaps with a PLC but often emphasizes geographically distributed telemetry, remote communications, and autonomous operation at unattended sites. The term “programmable automation controller” has been used for controllers combining PLC-style operation with richer data handling, networking, and multi-domain control. It does not establish a universally accepted technical boundary. Product assessment therefore depends on demonstrable functions and constraints rather than the marketing label alone.

Software PLCs execute the controller runtime on an industrial computer or another general-purpose computing platform. They can share hardware with visualization, data processing, or other applications. Achieving predictable timing requires suitable scheduling, resource isolation, and input/output interfaces; virtualization by itself does not provide those properties. A containerized or virtual controller must still account for startup ordering, network availability, clock behavior, and the consequences of host failure.

Newer architectures also move analytical workloads closer to machines. Local computing can process vibration data, inspect products, or apply machine learning models while the PLC continues to perform deterministic sequencing and interlocking. These functions have different validation and timing requirements. A model that estimates bearing deterioration can tolerate delayed processing that would be unacceptable for an immediate protective action. The allocation of responsibility among the PLC, drives, safety system, supervisory computers, and external services therefore remains a central architectural decision.