Programmable logic controller
A programmable logic controller ( PLC , English: programmable logic controller , PLC ) is a device which is used to control or control used a machine or plant and on a digital basis programmed is. It replaces the "hard-wired" connection-programmed control in most areas.
Richard E. Morley (Modicon) and Odo J. Struger ( Allen-Bradley ) can be described as the fathers of the PLC. In 1969 Morley introduced a Modicon 084 as a solid-state sequential logic solver (semiconductor-based sequential logic system).
Among other things, Struger was significantly involved in the formulation of the associated institute standards in the USA .
Morley resisted the term "computer". He saw this endangered the acceptance of the control experts who had previously worked. Therefore the ladder diagram was developed, which is similar to a circuit diagram. Then there was a one-to-one implementation of NC contacts, NO contacts, parallel and series connections to the new concept.
In the simplest case, a PLC has inputs, outputs, an operating system ( firmware ) and an interface via which the user program can be loaded. The user program determines how the outputs are to be switched depending on the inputs.
The operating system ensures that the current encoder status is always available to the user program. Using this information, the user program can switch the outputs in such a way that the machine or system functions in the desired manner.
The PLC is connected to the machine or system using sensors and actuators . There are also status displays. The sensors are connected to the inputs of the PLC and tell the PLC what is happening in the machine or system. Examples of sensors are e.g. B. pushbuttons , light barriers , incremental encoders , limit switches , or temperature sensors , level sensors etc. The actuators are connected to the outputs of the PLC and offer the possibility of controlling the machine or system. Examples of actuators are contactors for switching on electric motors, electric valves for hydraulics or compressed air, but also modules for drive controls (motion control, speed control with controlled acceleration or deceleration, stepper motor controls).
A PLC can be implemented in very different ways, e.g. B. as a single device (" assembly "), as a PC plug-in card, as software emulation, etc. Modular solutions in which the PLC is composed of individual plug-in modules (also referred to as assemblies) are widely used. The subject of drive control (motion control, speed control with controlled acceleration or deceleration) is increasingly associated with the PLC.
Individual devices offer advantages in terms of miniaturization and are cheaper for smaller automation tasks. A modular structure offers the typical advantages of a modular system: high flexibility, expandability, cost savings in larger systems through the use of many identical modules that can be manufactured in large numbers.
In many areas the PLC has replaced the previously hardwired arrangement of relays ( connection-programmed control ). Inexpensive assemblies, standardization of the control task and high flexibility are characteristic of the PLC concept and have helped the PLC to triumph.
In addition to the core task (control and regulation), current PLC assemblies are increasingly taking on additional tasks: visualization (design of the human-machine interface ), alarms and recording of all operational messages (data logging).
The sensors and actuators are also increasingly connected to the PLC via a fieldbus and no longer discretely. This reduces the wiring effort. For some time now, not only sensors and actuators but parts of the PLC such as input and output modules have been connected to a central station via a bus and (bus) interface modules ( decentralized peripherals ). The bus systems are replaced by networks (Profi-Net) in modern systems or supplemented by them. Compared to bus systems, networks (Ethernet) are more flexible and faster.
Finally, there is also an increasing connection to the administration computer of a company ( vertical integration ). So are z. For example, current data on production statuses, stocks, etc. is always available ("networked factory").
The difference between a modern PLC and a process control system is getting smaller and smaller. The further technical development is as rapid as in computer technology in general.
The different concepts
Differences according to the processing sequence
- Cycle-oriented PLC
- A large group of PLC devices work cycle-oriented, i.e. strictly according to the EVA principle . The operating system stored by the manufacturer controls this cycle. After determining the operational readiness of all connected modules, the process image of all inputs is updated. This often means querying the status of all input cards. The operating system then transfers control to the user program . The result of this is the process image of the outputs. Control now goes back to the operating system. The process image of the outputs is transferred to the periphery. This often means controlling the output cards. And then the cycle starts all over again. Typical cycle times are between one and ten milliseconds. For more powerful models or small programs, this can also be in the range of 100 µs. There are versions with a fixed cycle and those with an asynchronous cycle. The user program can contain branches and conditional calls, which result in different runtimes.
- Cyclic PLC with interrupt processing
- For special cases there are special input cards that report an alarm ( interrupt ) to the operating system when a connected sensor changes status . This interrupts the running program and calls a user program module specially adapted for this situation ( Interrupt Service Routine ) and then continues the interrupted program. In this way, time-critical tasks that conflict with the cycle time can be mastered.
- Event-controlled PLC
- Another group is event-driven. Most of these systems are also object-oriented at the same time . The operating system lists all "events" - status changes of a sensor - and processes the corresponding user program parts in this order. All sensors are taken into account or no sensor is “overslept”. Compared to cycle-oriented systems, this concept usually has advantages due to the additional object orientation, which can be used for simultaneous visualization.
Differences according to modularity
- Modular PLC
The control consists of individual components, each of which fulfills a different task. The simplest example would be a PLC, which consists of a central processing unit (with the main processor) and at least one input and one output unit. These systems can be expanded by adding modules if more inputs or outputs are required. With specialized modules, e.g. B. a module with a serial interface, components such as. B. Integrate weather stations. Processing of analog input signals, complex control modules and numerous other modules can be added.
- Compact PLC
Compact controls cannot be expanded or can only be expanded to a limited extent, but are correspondingly cheaper and space-saving. Otherwise they offer the same basic functions as modular PLCs.
Special shapes have been on the market since 1980 for use in mobile machines and their high demands. "Mobile Automation": These compact PLCs have a closed metal housing due to the great environmental influences. Another feature is the ability to directly control hydraulic valves proportionally. Areas of application are: construction machinery, cranes, lifting platforms and municipal vehicles.
Further types and properties of a PLC
Some examples of different assemblies of a modular system:
- Central assembly (seat of the main processor)
- Connections: assemblies for connecting a fieldbus system
- Bus modules (screw or crimp terminals, alarms)
- Digital input card (mostly electrical isolation using an optocoupler)
- Digital output card (open collector or relay)
- Analog input card
- Analog output card
In contrast, there are also integrally constructed controls, i. H. PLC systems that consist of a single complete unit. There are also mixed forms.
Intrinsically safe or non-intrinsically safe construction: Intrinsically safe systems are electrically designed in such a way that even in the event of a fault, no sparks can arise that could cause an ignitable mixture to explode. A feature of such devices is the limitation of input and output currents (0 or 4–20 mA). Application areas for intrinsically safe devices are e.g. B. Chemical plants.
As soft PLC software packages are called, which can run on a PC. In practice, PC versions suitable for industrial use are often chosen, although this is also possible with commercially available personal computers. The peripherals (sensors and actuators) are connected either serially via bus systems or with commercially available input and output cards. These systems work without a special bit processor and sometimes do not yet achieve the necessary speed. They are therefore only suitable for non-time-critical applications. A slot PLC is a built-in card for the PC. A bit processor and the PLC operating system are usually located on this.
Another concept is the basis for the high-availability and safety-related devices. In addition to the risk of failure due to high temperatures, there are other reasons for the possible failure of a module. This can be summarized by the term "aging". This also includes the issue of corrosion . Depending on the (financial) amount of damage caused by a standstill of the system in the event of an error, you can now use several PLC modules. These work simultaneously on the same control task (synchronized with each other). This is a redundant, multi-channel system. In the event of a conflict, an alarm message is generated and the system continues to run. This saves time to replace the defective assembly. In the (statistically) unlikely event that the sister system also fails, the system is down.
Safety-related devices have a similar structure. However, in the event of a conflict, the system is brought into the "safe" state as quickly as possible. An associated amount of damage is irrelevant. Safety-related devices are z. Sometimes also referred to as safety-related programmable logic controllers and consequently abbreviated to SSPS. These controls are also called safety PLCs .
The options for creating the user program can also be distinguished. In addition to the standards available for this, there is also the type of program display: graphically or (only) as an instruction list . Graphically supported displays can a circuit diagram ( Ladder ) or a logic diagram ( function block diagram similar). Most electricians understand the ladder diagram, even if they are new to computers or PLC equipment. This has greatly accelerated the introduction of the PLC into the technical world.
A purchase decision often takes into account the reusability of already proven user software. New concepts often also require additional training from specialist staff.
Limits of usability
Since the PLC can also process analog signals (via DA / AD converter ), it has also conquered the field of control technology . There are standardized solutions (e.g. as function modules) for almost every control task. In this respect, the term “control” no longer corresponds to the strict definitions of controls and regulations ( open and closed loop control ).
The hazardous areas are a technical limit. Here one works either with pneumatic signals or with intrinsically safe circuits. A commercially available PLC can be encapsulated pressure-tight according to the regulations. Of course, it is then not accessible during operation. A solution must also be found for connecting the sensors and actuators (e.g. pressure-resistant bulkhead screw connections). In general, one can say: A PLC is seldom used in potentially explosive areas. There are now input and output cards to which intrinsically safe circuits can be connected. There are also intrinsically safe data buses. The PLC itself is then located in a control room outside the endangered area.
The use of a PLC for control tasks with very few inputs and outputs also makes little sense. Example: star-delta starting of a motor. There are special (also electronic) modules here.
There are also machines that have to cope with very time-critical tasks. Such machines usually have very rare and highly specialized sensors. Example: the detection of a thread break in a high-performance weaving machine. The use of a PLC would require expensive field tests.
The PLC has enormous advantages in terms of flexibility. This is exactly why it is not very suitable for "tamper-proof" controls. This has nothing to do with safety in the sense of avoiding danger to people and the environment, but it has to do with keeping unauthorized people away. Examples: Recognition of access authorization, machines with money transactions.
In July 2010, the first computer worm was discovered (with the name Stuxnet ), which is specifically aimed at industrial systems and can not only spy on them, but also manipulate how they work.
PLC and security
When controls were built with a collection of relays and contactors, the issue of safety was easier to consider than with the new concept of a PLC. The one-to-one implementation of the logic laid down in the circuit (interlocking) on the PLC concept inevitably had to come into conflict with individual, previously safe circuits. Then there was the lack of experience.
Example: The stamp is only allowed to move when the protective grille is closed. So that nothing happens in the event of a fault, both NO contacts of the limit switch were connected in series and linked to the release of the stamp - taking into account the closed-circuit principle and the possible welding of a contact.
Cross-circuits can be detected using clocked signals.
Soon a rule was: "No safety-related circuit may be created with the PLC". The attention of trade associations and other institutions has now been directed to this problem. Overall, a new discussion began on the subject of safety in technical systems.
Safety was defined with a risk assessment of the danger to people and the environment. Together with the manufacturers, concepts have been worked out how the necessary and prescribed safety can also be achieved with a PLC. A key point was: The user programs in a safety-related PLC are subject to testing. Every change request must first be checked again. The system must be shut down when a new user program version is transferred. These are considerable restrictions on the flexibility that is otherwise so advantageous with the PLC. The examination is also associated with significant costs.
The risk assessment covers two areas.
- How high is the risk and what type of risk is it (material damage, personal injury, environmental damage)? Only the machine or system is considered here. The technical design of the lock is irrelevant. Depending on the answers to these questions (specified in a standard), there are requirements for the control.
- Which errors are possible or conceivable in a PLC? Here one goes so far as to accept an unwanted change in the program memory (diffusion in the semiconductor crystal). The command randomly stored there could mean “switch on” instead of “switch off”. One can assume that such an extreme error does not happen at the same time in the sister system. In a safety-related PLC, two processors therefore run the same program and check each other. Incidentally, these multi-channel systems had already been developed to increase reliability.
The aim of all safety-related PLC versions is to put the system into a safe state as quickly as possible in case of doubt. This goal inevitably conflicts with the desire to increase the availability of the system (= reliability).
Advantages / disadvantages of PLC compared to VPS ( connection-programmed control )
- wear-free (no internal relays)
- much more flexible
- more reliable
- often cheaper in the long term
- Can be networked with other IT systems
- quick error analysis
- Remote maintenance
- Control logic can often be changed via the Internet
- lower power consumption
- Usually less effort for rewiring or changing functions compared to the VPS
- better to use for more complex tasks
- additional infrastructure required (programming devices or software, data backup, etc.)
- higher qualified personnel required
- Complex security concept to safeguard undefined possible system states
- in some cases additional or separate, independent hardware-based security concept required
- Troubleshooting only with the programming device
- More susceptible to faults in the power supply
Due to the risk of manipulation (see Stuxnet worm), new approaches are now being taken when developing new systems. If the architecture of a system allows, the operating system and the program are moved to a read-only memory (ROM). This means that these sensitive areas can no longer be overwritten or manipulated in the future.
Structure and programming
The classic PLC has a processor architecture that is essentially optimized for bit, byte , word or double word linking. Siemens controllers, for example, are addressed byte by byte, while Omron controllers address 16 bits. The different addressing must be taken into account particularly when different controls via fieldbus , e.g. B. Profibus , are linked together. Under certain circumstances, octets within a word must be swapped in pairs in order to represent the correct information (see byte order ). The adaptation of the bit, byte or word processing to the machine or system to be controlled is carried out by a program that defines the desired sequence and is stored in the memory.
Usually software for communication between the programming device and the controller is also supplied with the PLC. Programming is done using this programming device, for example an application under Microsoft Windows or Linux on a PC or a customized system. The so-called "configuration" provided here is loaded onto the controller during programming. It remains there in memory until it is deleted or overwritten by the user.
Modern PLCs are classic microcontrollers with their own CPU and basic software that also allows I / O signals to be linked in words. The basic software consists of a real-time operating system and PLC-specific "modules" that implement PLC functions such as time functions and interfaces to expansion boards. Newer systems go a step further here. These combine the conveniences and advantages of PLC, IPC and PAC systems ( programmable automation controller ) and, thanks to their simple programming method, enable better and faster connection to their place of use in addition to increased user comfort .
In recent years, pressure from users has resulted in the controls being optimized to minimize the space required in the control cabinet. Some companies use the term Bus Terminal for these miniaturized control components , although there is no clear definition for this term. A bus terminal is an intelligent terminal block that can process a wide variety of analog and digital input and output signals. It is housed and wired as easily and compactly as a conventional terminal block, but, in contrast to the terminal block, has intelligent electronics.
The head of this electronic terminal block is the bus coupler. It usually has an interface for a fieldbus . Bus couplers with their own intelligence are called Bus Terminal Controllers. They often already have PLC functionality.
- Overview of languages in: IEC 61131 / EN 61131
Programmable logic controllers are usually programmed with special (often graphic) programming languages. In response to the demands of the American automobile industry, an electronic control system with a screen display was developed that is based on the display in electrical control technology. This representation / language ( ladder diagram ) was the first graphically supported programming of electronic controls. Several companies ( Texas Instruments , Modicon, ISSC, Allen-Bradley (later Rockwell)) further developed this language in their systems in the 1970s. The first German manufacturer was the Klaschka company in 1975 with the SECON controls. As early as the early 1980s, these controls offered bit, byte and word processing for both the I / O level and the marker level, as well as special functions such as sequencers (stepping mechanisms), analog value processing, PID controllers and graphic operator interfaces.
In addition to specially adapted high-level languages, which allow the programming of highly complex processes in automation, a standardized standard has established itself today: Five programming languages are specified in DIN EN 61131-3 (for more details see there).
Every programming language deals with operands that are linked together or changed.
In relation to the PLC, the main operands are:
- (English input ) Is connected to the associated encoder in the system.
- (English output ) Is connected to the associated actuator in the system.
- This defines an “interim result”, the meaning of which is determined by the programmer. However, if the variable is not assigned a value, it is considered "undefined".
- Function block
- (English function block) Several instances can be created from a function block (FB). The instance of a function block can be called in the program.
- (Engl. function ) When calling a function to be re-initializes all internal variables. This has the advantage that a function call with the same values of the input variables delivers the same result.
- (English program ) The variables of a program are only initialized the first time they are called. Calling a program with identical input variables can therefore lead to different results.
Flags, counters and timers can be designed to be retentive if required ; the value is retained in the event of a power failure. A backup battery or a special capacitor supplies the associated storage area in the event that the connected mains power fails, or the states are stored in an Eeprom. Internal states can also be saved in such a way that they are retained even if the program is changed or after a cold start. The programmer must decide on a case-by-case basis whether the information saved in this way is helpful for restarting the system after a restart, in particular because undesirable or dangerous consequences are possible in special cases.
Compatibility and Interoperability
Many manufacturers support these "standardized" languages. Nevertheless, the promised portability of the user programs is limited because there are often manufacturer-specific adaptations or extensions. The differences between the components of the software libraries are particularly large. In addition, not every manufacturer supports interfaces via which the programs can be output or read in a format that can also be processed by other manufacturers. It is only theoretically possible to write a program and run it on controllers from different manufacturers without changes - in practice this usually fails due to the peculiarities of the different makes.
With approaches to bridging these difficulties, z. B. the following bodies / organizations:
- TC6 XML workgroup of the PLCopen
- In the documents of this working group, an XML format is specified in which projects that comply with IEC 61131 should be stored . This enables project data to be exchanged between different tools.
Interoperability of a PLC is its ability to work together with controllers from different manufacturers in one overall system. This is usually ensured by several manufacturer-independent standards. This includes, for example, agreements on access to symbolic information and the exchange of variables via field buses and networks.
Like any other computer, the PLC works according to the EVA principle , so it has an input, a processing and an output part. The I / O devices (to the inputs / outputs, engl. Input / Output , connected devices) are wired to the PLC. The peripheral map of the inputs is read in at the beginning of a cycle, then the program is processed and the outputs are transferred to the peripheral map of the outputs. In earlier programmable logic controllers, the peripheral map of the inputs was mirrored on flags and these were queried in the program because the query time for inputs was significantly higher.
The PLC works cyclically: It reads in the values of all inputs at the beginning of a cycle (one also speaks of "reading in the process image" in this context) - if a command is repeated, the last instruction applies (dominant set or reset) - leads then the saved programs (also called modules or networks ) and at the end sets the outputs. Then the cycle starts again - there is no end of the program. Event-oriented processing is mostly only supported by so-called high-end controls.
Changes in status that occur at the sensors connected to the inputs during the cycle are only recognized if they are loaded with special commands immediately before processing. Depending on their values, the actuators connected to their outputs are controlled according to the built-in program. This happens once at the end of the cycle.
In most PLC concepts, the PLC differentiates between the operating states
- START ( RUN ).
These are not to be confused with the possibilities for the PLC to switch the global power supply OFF and ON.
As soon as it is switched to STOP, the system program no longer calls the user program. Furthermore, the process images are no longer updated. The rest of the cyclical processing remains. This also includes updating the user program block list. All outputs are switched off, whereby the process image is retained.
After the START, the entire cyclic processing begins again. Only the first processing of the user program can change the process image of the outputs. A part of the process image can then retain the state before the restart. Such behavior is often undesirable. A RESET is then required before the restart, which deletes the process image of the outputs.
- Industrial Ethernet - Ethernet communication in control and regulation technology
- Bliesener et al. ( Festo ): Programmable logic controllers, textbook basic level . Springer-Verlag, Berlin 1997.
- Eaton circuit manual (previously: Moeller circuit manual) ( download ).
- Manfred Ochs: SPS for technical training basics and practice . 4th completely revised edition, Hüthig Verlag, Heidelberg 2001, ISBN 3-7785-2825-4 .
- Matthias Seitz: Programmable logic controllers for factory and process automation . 4th edition, Hanser-Verlag, Munich 2015, ISBN 978-3-446-44273-3 (with a PLC learning and exercise page ).
- Günter Wellenreuter, Dieter Zastrow: Automation with PLC - Theory and Practice , 5th, corrected and expanded edition, Vieweg + Teubner, Wiesbaden 2011, ISBN 978-3-8348-1504-0 ( book information and download ).
- Günter Wellenreuter, Dieter Zastrow: Automation with PLC overviews and exercises . 4th, revised. and additional edition, Vieweg + Teubner, Wiesbaden 2008, ISBN 978-3-8348-0561-4 ( book information and download ).
- Berthold Heinrich, Petra Linke, Michael Glöckler: Basics of automation - sensors, regulation, control . Springer Fachmedien, Wiesbaden, 2015, ISBN 978-3-658-05960-6 .
- Tilo Heimbold: Introduction to automation technology. Automation systems, components, project planning and planning. Specialist book publisher at Carl Hanser Verlag, Leipzig; Munich 2015, ISBN 978-3-446-42675-7 , e-book ISBN 978-3-446-43135-5 .
- Hans-Joachim Zander : Control of discrete-event processes. Novel methods for describing processes and designing control algorithms. Springer Vieweg Verlag, Wiesbaden 2015, ISBN 978-3-658-01381-3 , eBook- ISBN 978-3-658-01382-0 .
- Horst Völz : Storage as the basis for everything. Shaker Verlag, Düren 2019, ISBN 978-3-8440-6964-8 .
- Olof Leps: The construction of operating and control systems . In: Hybrid test environments for critical infrastructures . Springer Vieweg, Wiesbaden, 2018, ISBN 978-3-658-22613-8 , pp. 25–39 , doi : 10.1007 / 978-3-658-22614-5_3 ( springer.com [accessed December 30, 2018]).
- See message " Stuxnet-Wurm can control industrial plants " on heise.de.
- Manual for program development. Retrieved October 8, 2017 .