Programmable logic controller: Difference between revisions

Content deleted Content added
broken link fixed. other links improved.
 
(30 intermediate revisions by 17 users not shown)
Line 7:
A '''programmable logic controller''' ('''PLC''') or '''programmable controller''' is an industrial [[computer]] that has been [[ruggedized]] and adapted for the control of manufacturing processes, such as [[assembly line]]s, machines, [[robotic]] devices, or any activity that requires high reliability, ease of programming, and process fault diagnosis.
 
PLCs can range from small modular devices with tens of [[Input/output|inputs and outputs]] (I/O)]], in a housing integral with the processor, to large rack-mounted modular devices with thousands of I/O, and which are often networked to other PLC and [[SCADA]] systems.<ref>Tubbs, Stephen Phillip. ''Programmable Logic Controller (PLC) Tutorial, Siemens Simatic S7-1200.'' Publicis MCD Werbeagentur GmbH; 3rd ed., 2018.</ref> They can be designed for many arrangements of digital and analog I/O, extended temperature ranges, immunity to [[electrical noise]], and resistance to vibration and impact.
 
PLCs were first developed in the automobile manufacturing industry to provide flexible, rugged and easily programmable controllers to replace hard-wired [[relay logic]] systems. [[Dick Morley]], who invented the first PLC, the Modicon 084, for [[General Motors]] in 1968, is considered the father of PLC.
Line 23:
In 1968, GM Hydramatic,<!--Don't link hydramatic transmission--> the [[automatic transmission]] division of [[General Motors]], issued a [[request for proposal]]s for an electronic replacement for hard-wired relay systems based on a white paper written by engineer Edward R. Clark. The winning proposal came from Bedford Associates from [[Bedford, Massachusetts]]. The result, built in 1969, was the first PLC and designated the ''084'', because it was Bedford Associates' eighty-fourth project.<ref name=":9">{{Harvnb|Laughton|Warne|2002|loc=chpt. 16}}</ref><ref name=":0">{{Cite web |url=https://www.automationmag.com/855-the-father-of-invention-dick-morley-looks-back-on-the-40th-anniversary-of-the-plc/ |title=The Father of Invention: Dick Morley Looks Back on the 40th Anniversary of the PLC |last=Dunn |first=Alison |date=2009-06-12 |website=Manufacturing Automation |access-date=2020-02-23 }}</ref>
 
Bedford Associates started a company, '''Modicon, Inc.''',<ref name="b677">{{cite book | last=Group | first=Career Communications | title=US Black Engineer & IT | publisher=Career Communications Group | date=1993 | url=https://books.google.com/books?id=pESCcEtfrusC&dq=modicon%2520inc&pg=PA42 | access-date=2025-06-09 | page=}}</ref> dedicated to developing, manufacturing, selling, and servicing this new product, which they named '''{{visible anchor|Modicon}}''' (standing for "modular digital controller"). One of the people who worked on that project was [[Dick Morley]], who is considered to be the father of the PLC.<ref name=":1">{{Cite web|url=https://www.isa.org/standards-and-publications/isa-publications/intech-magazine/2003/august/cover-story-50th-anniversary-leaders-of-the-pack/|title=Leaders of the pack|last=Strothman|first=Jim|date=2003-08-01|website=ISA|url-status=live|archive-url=https://web.archive.org/web/20170808184918/https://www.isa.org/standards-and-publications/isa-publications/intech-magazine/2003/august/cover-story-50th-anniversary-leaders-of-the-pack/|archive-date=2017-08-08|access-date=2020-02-24}}</ref> The Modicon brand was sold in 1977 to [[Gould Electronics]] and later to [[Schneider Electric]], its current owner.<ref name=":0" /> About this same time, Modicon created [[Modbus]], a data communications protocol to be used with its PLCs. Modbus has since become a standard open protocol commonly used to connect many industrial electrical devices.<ref>{{cite web |title=Mobus Networking Guide: Introduction |url=https://development.libelium.com/modbus_networking_guide/introduction |website=Libelium.com |access-date=27 October 2022 }}</ref>
 
One of the first Modicon 084 models built is now on display at Schneider Electric's facility in [[North Andover, Massachusetts]]. It was presented to Modicon by [[General Motors|GM]], when the unit was retired after nearly twenty years of uninterrupted service. Modicon used the 84 moniker at the end of its product range like Modicon Micro 84 and Modicon TSX CSY 84 until after the 984 made its appearance.<ref>{{cite book |last=Chakraborty |first=Kunal |title=Industrial Applications of Programmable Logic Controllers and SCADA |date=2016 |publisher=Anchor Academic Publishing |___location=Hamburg |isbn=978-3960670247 }}</ref>
 
===Allen-Bradley===
Line 33:
Many early PLC programming applications were not capable of graphical representation of the logic, and so it was instead represented as a series of logic expressions in some kind of Boolean format, similar to [[Boolean algebra]]. As programming terminals evolved, because ladder logic was a familiar format used for electro-mechanical control panels, it became more commonly used. Newer formats, such as state logic,<ref>{{cite web |url=https://control.com/technical-articles/state-machine-programming-in-ladder-logic/ |title=State Machine Programming in Ladder Logic |access-date=2024-08-18}}</ref> [[function block diagram]]s, and [[structured text]] exist. Ladder logic remains popular because PLCs solve the logic in a predictable and repeating sequence, and ladder logic allows the person writing the logic to see any issues with the timing of the logic sequence more easily than would be possible in other formats.<ref>{{cite web |title=Wrapping Your Head around Ladder Logic |date=27 August 2018 |url=https://www.dosupply.com/tech/2018/08/27/wrapping-your-head-around-ladder-logic/ |website=DoSupply.com |access-date=19 October 2020}}</ref>
 
Up to the mid-1990s, PLCs were programmed using proprietary programming panels or special-purpose programming [[Computer terminal|terminals]], which often had dedicated function keys representing the various logical elements of PLC programs.<ref name=":9" /> Some proprietary programming terminals displayed the elements of PLC programs as graphic symbols, but plain [[ASCII art|ASCII]] character representations of contacts, coils, and wires were common. Programs were stored on [[cassette tape cartridge]]s. Facilities for printing and documentation were minimal due to a lack of memory capacity. The oldest PLCs used [[magnetic-core memory]].<ref>{{citeCite web |urllast=https://www.reddit.com/r/PLC/comments/17p2wzj/the_inside_of_the_core_memory_module_of_a_plc2_if/Miller |titlefirst=TheAlex inside|date=2014-01-29 of|title=What theis corea memoryPLC? moduleAnd ofwhere adid PLC2,they ifcome anyone's interested.from? |dateurl=6 November 2023https://learntechnique.com/what-is-a-plc-and-where-did-they-come-from/ |access-date=20242025-0708-2524 |website=Technique Learning Solutions |language=en}}</ref>
 
==Architecture==
Line 51:
[[File:PLC AB InstaladoV1.JPG|alt=Modular PLC with EtherNet/IP module, digital and analog I/O, with some slots being empty.|thumb|Modular PLC with [[EtherNet/IP]] module, discrete and analog I/O, with some slots being empty]]
 
There are two types of mechanical design for PLC systems. A ''single box'' (also called a ''brick'') is a small programmable controller that fits all units and interfaces into one compact casing, although, typically, additional expansion modules for inputs and outputs are available. The second design type{{snd}} a ''modular'' PLC{{snd}} has a chassis (also called a ''rack'') that provides space for modules with different functions, such as power supply, processor, selection of I/O modules and communication interfaces{{snd}} which all can be customized for the particular application.<ref>{{Harvnb|Bolton|2015|pp=12–13}}</ref> Several racks can be administered by a single processor and may have thousands of inputs and outputs. Either a special high-speed serial I/O link or comparable communication method is used so that racks can be distributed away from the processor, reducing the wiring costs for large plants.{{Citation needed|date=April 2020}}<!--[[User:Kvng/RTH]]-->
 
===Discrete and analog signals===
[[Digital signal|Discrete (digital) signals]] can only take ''on'' or ''off'' value (1 or 0, ''true'' or ''false''). Examples of devices providing a discrete signal include [[limit switch]]es, and [[photoelectric sensor]]s and [[Encoder (position)|encoders]].<ref name=":8">{{Harvnb|Bolton|2015|pp=23–43}}</ref>
 
[[Analog signal]]s can use voltage or current that is proportionalanalogous to the size of the monitored variable and can take any value within their scale. Pressure, temperature, flow, and weight are often represented by analog signals. These are typically interpreted as integer values with various ranges of accuracy depending on the device and the number of bits available to store the data.<ref name=":8" /> For example, an analog 0 to 10&nbsp;V or 4-20 &nbsp;mA [[current loop]] input would be [[analog-to-digital converter|converted]] into an integer value of 0 to 32,767. The PLC will take this value and transposetranslate it into the desired units of the process so the operator or program can read it. Proper integration will also include filter times to reduce noise as well as high and low limits to report faults. Current inputs are less sensitive to electrical noise (e.g. from welders or electric motor starts) than voltage inputs. Distance from the device and the controller is also a concern as the maximum traveling distance of a good quality 0-10 V signal is very short compared to the 4-20 mA signal.{{Citation needed|date=January 2021}} The 4-20 mA signal can also report if the wire is disconnected along the path as a <4 mA signal would indicate an error.{{Citation needed|date=September 2023}}
 
===Redundancy===
Some special processes need to work permanently with minimum unwanted downtime. Therefore, it is necessary to design a system that is [[fault- tolerant and capable of handling the process with faulty modules]]. In such cases, to increase the system availability in the event of hardware component failure, [[Redundancy (engineering)|redundant]] CPU or I/O modules with the same functionality can be added to a hardware configuration forto prevent preventinga total or partial [[Plant process and emergency shutdown systems|process shutdown]] due to hardware failure. Other redundancy scenarios could be related to safety-critical processes, for example, large hydraulic presses could require that bothtwo PLCs turn on output before the press can come down in case one outputPLC does not turn offbehave properly.
 
==Programming==
[[File:Ladder temporizado.svg|thumb|upright=0.9|Example of a ladder diagram logic]]
 
Programmable logic controllers are intended to be used by engineers without a programming background. For this reason, a graphical programming language called [[Ladderladder logic|Ladder Diagram]] (LD, LAD) was first developed. It resembles the schematic diagram of a system built with electromechanical relays and was adopted by many manufacturers and later standardized in the [[IEC 61131-3]] control systems programming standard. {{As of|2015|post=,}} it is still widely used, thanks to its simplicity.<ref name=":6">{{Harvnb|Bolton|2015|pp=16–18}}</ref>
 
{{As of|2015|post=,}} the majority of PLC systems adhere to the [[IEC 61131-3]] standard that defines 2 textual programming languages: [[Structured text|Structured Text]] (ST; similar to [[Pascal (programming language)|Pascal]]) and [[Instruction list|Instruction List]] (IL); as well as 3 graphical languages: [[ladder logic]], [[function block diagram]] and [[sequential function chart]].<ref name=":6" /><ref>Keller, William L Jr. ''Grafcet, A Functional Chart for Sequential Processes'', 14th Annual International Programmable Controllers Conference Proceedings, 1984, p. 71-96.</ref> [[Instruction list|Instruction List]] (IL) was deprecated in the third edition of the standard.<ref>{{Cite web|url=https://plcopen.org/status-iec-61131-3-standard |title=Status IEC 61131-3 Standard |date=2018-07-19 |website=PLCopen |access-date=2020-04-01 }}</ref>
 
Modern PLCs can be programmed in a variety of ways, from the relay-derived ladder logic to programming languages such as specially adapted dialects of [[BASIC]] and [[C (programming language)|C]].<ref>{{Cite web |title=Programmable logic controller for automation systems |url=https://www.isisvarese.edu.it/wp-content/uploads/2016/03/CLIL-5B-MEC-PLC.pdf |access-date=April 8, 2024 |website=www.isisvarese.edu.it}}</ref>
 
While the fundamental concepts of PLC programming are common to all manufacturers, differences in [[I/O addressingaddress]]ing, [[memory organization]], and [[instruction setsset]]s 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.<ref>{{Cite web |date=September 2020 |title=A mini view of PLC |url=https://www.researchgate.net/publication/344308053 |access-date=April 8, 2024 |website=www.researchgate.net}}</ref>
 
===Programming device===
Manufacturers develop programming software for their controllersPLCs. In addition to being able to program PLCs in multiple languages, they provide common features like hardware diagnostics and maintenance, software debugging, and offline simulation.<ref name=":7" />
PLC programs are typically written in a programming device, which can take the form of a desktop console, special software on a [[personal computer]], or a handheld programming device.<ref name=":7">{{Harvnb|Bolton|2015|pp=19–20}}</ref> Then, the program is downloaded to the PLC directly or over a network. It is stored either in non-volatile [[flash memory]] or battery-backed-up [[RAM]]. In some programmable controllers, the program is transferred from a personal computer to the PLC through a programming board that writes the program into a removable chip, such as [[EPROM]].
 
PLC programs are typically written in a programming device, which can take the form of a desktop console, special software on a [[personal computer]], or a handheld programming device.<ref name=":7">{{Harvnb|Bolton|2015|pp=19–20}}</ref> Then, theThe program is then downloaded to the PLC directlythrough a cable connection or over a network. It is stored either in non-volatile [[flash memory]] or battery-backed-up [[RAM]] on the PLC. In some programmable controllersPLCs, the program is transferred from a personal computer to the PLCprogramming throughdevice using a programming board that writes the program into a removable chip, such as [[EPROM]] that is then inserted into the PLC.
Manufacturers develop programming software for their controllers. In addition to being able to program PLCs in multiple languages, they provide common features like hardware diagnostics and maintenance, software debugging, and offline simulation.<ref name=":7" />
 
===Simulation===
IncorrectlyAn incorrectly programmed PLC can result in lost productivity and dangerous conditions for programmed equipment. PLC simulation is a feature often found in PLC programming software. It allows for testing and [[debugging]] early in a project's development. Testing the project in simulation improves its quality, increases the level of safety associated with equipment and can save costly downtimetime during the installation and commissioning of automated control applications since many scenarios can be tried and tested before the system is activated.<ref name=":7" /><ref>{{cite book |last1=Lin |first1=Sally |url=https://books.google.com/books?id=CHYlTBxqrM8C&pg=PA553 |title=Advances in Computer Science, Environment, Ecoinformatics, and Education, Part III: International Conference, CSEE 2011, Wuhan, China, August 21-22, 2011. Proceedings |last2=Huang |first2=Xiong |date=9 August 2011 |publisher=Springer Science & Business Media |isbn=9783642233449 |pages=15 |via=Google Books }}</ref>
PLC simulation is a feature often found in PLC programming software. It allows for testing and [[debugging]] early in a project's development.
 
Incorrectly programmed PLC can result in lost productivity and dangerous conditions. Testing the project in simulation improves its quality, increases the level of safety associated with equipment and can save costly downtime during the installation and commissioning of automated control applications since many scenarios can be tried and tested before the system is activated.<ref name=":7" /><ref>{{cite book |last1=Lin |first1=Sally |url=https://books.google.com/books?id=CHYlTBxqrM8C&pg=PA553 |title=Advances in Computer Science, Environment, Ecoinformatics, and Education, Part III: International Conference, CSEE 2011, Wuhan, China, August 21-22, 2011. Proceedings |last2=Huang |first2=Xiong |date=9 August 2011 |publisher=Springer Science & Business Media |isbn=9783642233449 |pages=15 |via=Google Books }}</ref>
 
==Functionality==
[[File:Siemens Simatic S7-416-3.jpg|thumb|upright|PLC system in a rack, left-to-right: power supply unit (PSUPS), CPU, interface module (IM) and communication processor (CP)]]
[[File:PLC Control Panel.png|thumb|upright|Control panel with PLC (gray elements in the center). The unit consists of separate elements, from left to right: [[power supply]], controller, [[relay]] units for input and output.]]
 
The main difference fromcompared to most other computing devices is that PLCs are intended for and therefore tolerant of more severe environmental conditions (such as dust, moisture, heat, cold), while offering extensive [[input/output]] (I/O) to connect the PLC to [[sensor]]s and [[actuator]]s. PLC input can include simple digital elements such as [[limit switch]]es, analog variables from process sensors (such as temperature and pressure), and more complex data such as that from positioning or [[machine vision]] systems.<ref>Harms, Toni M. & Kinner, Russell H. P.E., ''Enhancing PLC Performance with Vision Systems''. 18th Annual ESD/HMI International Programmable Controllers Conference Proceedings, 1989, p. 387-399.</ref> PLC output can include elements such as indicator lamps, sirens, [[electric motor]]s, [[pneumatic]] or [[hydraulic]] cylinders, magnetic [[relay]]s, [[solenoid]]s, or analog outputs. The input/output arrangements may be built into a simple PLC, or the PLC may have external [[I/O module]]smodules attached to a fieldbus or computer network that plugs into the PLC.
 
The functionality of the PLC has evolved over the years to include sequential relay control, motion control, [[process control]], [[distributed control system]]s, and [[computer network|networking]]. The data handling, storage, processing power, and communication capabilities of some modern PLCs are approximately equivalent to [[desktop computer]]s. PLC-like programming combined with remote I/O hardware, allows a general-purpose desktop computer to overlapserve someas PLCsa PLC in certain applications.{{citation needed|date=November 2014}} Desktop computer controllers have not been generally accepted in heavy industry because desktop computers run on less stable operating systems than PLCs, and because the desktop computer hardware is typically not designed to the same levels of tolerance to temperature, humidity, vibration, and longevity as the processors used in PLCs. Operating systems such as Windows do not lend themselves to deterministic logic execution, with the result that the controller may not always respond to changes of input status with the consistency in timing expected from PLCs. Desktop logic applications find use in less critical situations, such as laboratory automation and use in small facilities where the application is less demanding and critical.{{citation needed|date=November 2014}}
 
===Basic functions===
The most basic function of a programmable logic controller is to emulate the functions of electromechanical relays. DiscreteWithin the PLC programming environment, discrete inputs are given a unique address, and a PLC instruction can test if the input state is on or off. Just as a series of relay contacts perform a [[logical AND]] function, not allowing current to pass unless all the contacts are closed, so a series of "''examine if on"'' instructions will energize its output storage bit if all the input bits are on. Similarly, a parallel set of instructions will perform a [[logical OR]]. In an electromechanical relay wiring diagram, a group of contacts controlling one coil is called a "''rung"'' of a "''ladder diagram"'', and this concept is also used to describe PLC logic. {{efn|Some models of PLC limit the number of series and parallel instructions in one "rung" of logic. Some PLCs enforce a strict left-to-right, top-to-bottom execution order for evaluating the rung logic. This is different from electro-mechanical relay contacts, which, in a sufficiently complex circuit, may either pass current left-to-right or right-to-left, depending on the configuration of surrounding contacts. The elimination of these ''sneak paths'' is either a bug or a feature, depending on the programming style.}} The output of each rung sets or clears a storage bit, which may be associated with a physicaldiscrete output address or which may be an "''internal coil"'' with no physical connection. Such internal coils can be used, for example, as a common element in multiple separate rungs. Unlike physical relays, there is usually no limit to the number of times an input, output or internal coil can be referenced in a PLC program.
 
More advanced instructions of the PLC may be implemented as functional blocks, which carry out some operation, such as manipulating internal variable, when enabled by a logical input and which produce outputs to signal, for example, completion or errors, while manipulating variables internally that may not correspond to discrete logic.<!--[[User:Kvng/RTH]]-->
Some PLCs enforce a strict left-to-right, top-to-bottom execution order for evaluating the rung logic. This is different from electro-mechanical relay contacts, which, in a sufficiently complex circuit, may either pass current left-to-right or right-to-left, depending on the configuration of surrounding contacts. The elimination of these "sneak paths" is either a bug or a feature, depending on the programming style.
 
More advanced instructions of the PLC may be implemented as functional blocks, which carry out some operation when enabled by a logical input and which produce outputs to signal, for example, completion or errors, while manipulating variables internally that may not correspond to discrete logic.
 
=== Communication ===
Line 167 ⟶ 162:
* [[Industrial control system]]
* [[PLC technician]]
 
==Notes==
{{Notelist}}
 
==References==
Line 191 ⟶ 189:
[[Category:Industrial automation]]
[[Category:Industrial computing]]
[[Category:Wikipedia articles with ASCII art]]