A programmable logic controller or PLC is a small computer used for automation of real-world processes, such as control of machinery on factory assembly lines. Where older automated systems would use hundreds or thousands of relays, a single PLC can be programmed as a replacement.
The PLC is a microprocessor based device with either modular or integral input/output circuitry that monitors the status of the field connected "sensor" inputs and controls the attached output "actuators" (motor starters, solenoids, pilot lights/displays, speed drives, valves, etc.) according to a user-created, logic program stored in the microprocessor's battery-backed RAM memory. The functionality of the PLC has evolved over the years to include capabilities beyond typical relay control; sophisticated motion control, process control, DCS and complex networking have now been added to the PLC's list of functions.
Analog vs Digital Inputs and Outputs
Digital signals behave as switches, yielding simply an On or Off signal. Pushbuttons, limit-switches, and photo-eyes are examples of devices providing a digital signal. Analog signals behave as volume controls, yielding a range of values between On and Off. Pressure transducers, scales and gas leak detectors can provide analog signals.
PLCs have a limited number of connections built in for signals such as digital inputs, digital outputs, analog inputs and analog outputs. Typically expansions are available if the base model does not have sufficient I/O.
Programming
PLCs programs are generally written in a special application on a personal computer then downloaded over a custom cable to the PLC. The program is stored in the PLC either in battery-backed-up RAM or some other non-volatile memory.
Early PLCs were designed to be used by electricians who train on the job. These PLC's were programmed in "ladder logic", which strongly resembles a schematic of relay logic. Modern PLCs can be programmed in ladder logic or in more traditional programming languages ie;list