Aprogrammable logic controller(PLC) orprogrammable controlleris adigital computerused forautomationofelectromechanicalprocesses, such as control of machinery on factoryassembly lines, amusement rides, orlight fixtures. PLCs are used in many industries and machines. Unlike general-purpose computers, the PLC is designed for multiple inputs and output arrangements, extended temperature ranges, immunity to electrical noise, and resistance to vibration and impact. Programs to control machine operation are typically stored in battery-backed-up ornon-volatile memory. A PLC is an example of ahard real timesystem since output results must be produced in response to input conditions within a limited time, otherwise unintended operation will result.
PLC ProgrammingPLC programs are typically written in a special application on a personal computer, and then downloaded by a direct-connection cable or over a network to the PLC. The program is stored in the PLC either in battery-backed-up RAM or some other non-volatile flash memory. Often, a single PLC can be programmed to replace thousands of relays. Under the IEC 61131-3 standard, PLCs can be programmed using standards-based programming languages. A graphical programming notation called Sequential Function Charts is available on certain programmable controllers. Initially most PLCs utilized Ladder Logic Diagram Programming, a model which emulated electromechanical control panel devices (such as the contact and coils of relays) which PLCs replaced. This model remains common today.
IEC 61131-3 currently defines five programming languages for programmable control systems - Function block diagram (FBD)
- Ladder diagram (LD)
- Structured text (ST; similar to the Pascal programming language)
- Instruction list (IL; similar to assembly language)
- Sequential function chart (SFC)
These techniques emphasize logical organization of operations. While the fundamental concepts of PLC programming are common to all manufacturers, differences in I/O addressing, memory organization and instruction sets mean that PLC programs are never perfectly interchangeable between different makers. Even within the same product line of a single manufacturer, different models may not be directly compatible.