PLC Control Systems & Automation -- Introduction



Home | Forum | DAQ Fundamentals | DAQ Hardware | DAQ Software

Input Devices
| Data Loggers + Recorders | Books | Links + Resources



AMAZON multi-meters discounts AMAZON oscilloscope discounts


This section is an introduction to the world of PLCs and their evolution over the past 55 years as the top choice and most dominant among all systems available for process-control and automation applications.

GOALS:

  • Understand concepts of process control.
  • Learn history of PLCs and relay logic.
  • Understand PLC hardware architecture.
  • Learn hardwired & PLC system characteristics.

A programmable logic controller (PLC) is a microprocessor-based computer unit that can perform control functions of many types and varying levels of complexity. The first commercial PLC system was developed in the early 1970s to replace hardwired relay controls used in large manufacturing assembly plants. The initial use of PLCs covered automotive assembly lines, jet engines, and large chemical plants.


AMAZON multi-meters discounts AMAZON oscilloscope discounts


PLCs are used today in many tasks including robotics, conveyors system, manufacturing control, process control, electrical power plants, wastewater treatment, and security applications. This section is an introduction to the world of PLCs and their evolution over the past 50 years as the top choice and most dominant among all systems available for process-control and automation applications.

1 Control System Overview

A control system is a device or set of structures designed to manage, command, direct, or regulate the behavior of other devices or systems. The entire control system can be viewed as a multivariable process that has a number of inputs and outputs that can affect the behavior of the process. Fig. 1 shows this functional view of control systems. This section is intended as a brief introduction to control systems. Additional material will be covered in more detail in Section 7.

====


Fig. 1 Control systems functional view. Inputs; Outputs; Multivariable Process

====

1.1 Process Overview

In the industrial world, the word process refers to an interacting set of operations that lead to the manufacture or development of some product. In the chemical industry, process means the operations necessary to take an assemblage of raw materials and cause them to react in some prescribed fashion to produce a desired end product, such as gasoline. In the food industry, process means to take raw materials and operate on them in such a manner that an edible high-quality product results. In each use, and in all other cases in the process industries, the end product must have certain specified properties that depend on the conditions of the reactions and operations that produce them. The word control is used to describe the steps necessary to ensure that the regulated conditions produce the correct proper ties in the product.

A process can be described by an equation. Suppose that we let a product be defined by a set of properties; P1 , P2 , . . . , Pn

Each of these properties must have a certain value for the product to be correct. Examples of properties are such things as color, density, chemical composition, and size. The process can be assumed to have m variables characterizing its unique behavior. Some of these variables also can be categorized as input, output, process property, and internal or external system parameters. The following equations express a process property and a variable as a function of process variables and time: Pi = F(v1 , v2 , . . . , vm, t) vi = G(v1 , v2 , . . . , vm, t) where Pi = the ith process property vi = the ith process variable

t = time

To produce a product with the specified properties, some or all the m process variables must be maintained at specific values in real time. Fig. 2 shows free water flow through a tank, similar to rain flow in a home gutter system. The tank acts in a way to slow the flow rate through the piping structure. The output flow rate is proportional to the water head in the tank. Water level inside the tank will rise as the input flow rate increases. At the same time, output flow rate will increase with a noticeable increase in the tank water level. Assuming a large enough tank, level stability will be reached when the flow in is equal to the flow out. This simple process has three primary variables: FLOW IN, FLOW OUT, and the tank level. All three variables can be measured and, if desired, also can be controlled. The tank level is said to be a self-regulated variable.


Fig. 2 Water flow tank process.

Some of the variables in a process may exhibit the property of self-regulation, whereby they will naturally maintain a certain value under normal conditions. Small disturbances will not affect the tank level stability because of the self-regulation characteristic. A small increase in tank inflow will cause a slight increase in the water level. An increase in water level will cause an increase in tank outflow, which eventually will produce a new stable tank level. Large disturbances in tank input flow may force undesired changes in the tank level. Control of variables is necessary to maintain the properties of the product, the tank level in our example, within specification. In general, the value of a variable v actually depends on many other variables in the process as well as on time.

======


Fig. 3 Manual control systems. SP Final control element; Process; Measuring element; Load disturbance

======

1.2 Manual Control Operation

In a manual control system, humans are involved in monitoring the process and carrying out necessary decisions to bring about desired changes in the process.

Still, computers and advanced digital technologies may be used to automate a wide variety of process operation, status, command, and decision-support functions. Sensors and measurement instruments are used to monitor the status of different process variables conditions, whereas final control elements or actuators are used to force changes in the process. As shown in Fig. 3, humans close the control loop and establish the connection between measured values, desired conditions, and the needed activation of the final control elements.

Manual control is widely available and can be effective for simple and small applications. The initial cost of such systems might be relatively smaller than that of automated ones, but the long-term cost is typically much higher. It is difficult for operators to achieve the same control/quality because of varying levels of domain expertise as well as unexpected changes in the process. The cost of operation and training also can become a burden unless certain functions are automated.

Most systems start by using manual control or existed previously with manual operation. System owners acquire and accumulate process-control experience over time and use this knowledge eventually to make process improvements and eventually automate the control system.

The introduction of digital computers into the control loop has allowed the development of more flexible control systems, including higher-level functions and advanced algorithms. Furthermore, most current complex control systems could not be implemented without the application of digital hardware. However, the simple sequence of sensing, control, and actuation for the classic feedback control becomes more complex as well. A real-time system is one in which the correctness of a result depends not only on the logical correctness of the calculation but also on the time at which the different tasks are executed. Time is one of the most important entities of the system, and there are timing constraints associated with system tasks. Such tasks normally have to control or react to events that take place in the outside world that are happening in real time. Thus a real-time task must be able to keep up with external events with which it is concerned.

Fig. 4 shows a simple manual control system. The level in the tank shown varies as a function of the flow rate through the input valve and the flow rate through the output valve. The level is the control or controlled variable, which can be measured and regulated through valve control and adjustment at the input or output flow or both. The two valves can be motorized and activated from an easy to-use operator interface. Valve position variations are achieved through an opera tor input based on observed real-time process conditions. We will see next that the operator can easily be eliminated.


Fig. 4 Tank level manual controls. Flow in; Flow out

1.3 Automated-System Building Blocks

The closed control loop shown in Fig. 5 consists of the following five blocks:

• Process

• Measurement

• Error detector

• Controller

• Control element

In manual control, the operator is expected to perform the task of error detection and control. Observations and actions taken by operators can lack both consistency and reliability. The limitations of manual control can be eliminated through the implementation of closed-loop systems and the associated process-control strategies. Details of such strategies will be provided in Section 7. Fig. 5 shows a block diagram of a single-variable closed-loop control.

The controller can be implemented using variety of technologies, including hardwired relay circuits, digital computers, and more often PLC systems.

It is impossible to achieve perfect control, but in the real world, it is not needed.

We can always live with small errors within our acceptable quality range. An oven with a desired temperature of 500°F can achieve the same results at 499.99°F. In most cases we are limited by the precision and cost of the actual sensors. There is no good justification for spending more money to achieve unwanted/unnecessary gains in precessions.

Errors in real time are used to judge the quality of the system design and its associated controller. The errors can be measured in three ways, as explained by the following definitions:

Absolute error = set point - measured value

Error as percent of set point = absolute error/set point × 100

Error as percent of range = absolute error/range × 100

Range = maximum value - minimum value

Errors are commonly expressed as a percentage of range and occasionally as a percentage of set point but rarely as an absolute value. Also, most process variables are also commonly quantified as percentage of the defined range. This quantification allows for universal input-output PLC computer interfaces regardless of the physical nature of the sensory and actuating devices. A PLC analog input module having several input slots can accommodate and process temperature, pressure, motor speed, viscosity, and many other measurements in exactly the same way. Later sections will detail the PLC hardware and software as applied to real-world industrial control applications. Even though the implementation focus will be on the Siemens S7-1200 system, the concepts covered will apply to other PLCs with no or very little modification. International standards and the success of open-system architectures are the main reasons for the universal nature of today's PLC technology and its compatibility.


Fig. 5 Closed-loop control.

Controller SP Final control element Measuring element Process Upset or load disturbance

2 Hardwired Systems Overview

Prior to the widespread use of PLCs in process control and automation, hard wired relay control systems or analog single-loop controllers were used.

This section will briefly introduce relay systems and the logic used in process control. It is important that you understand relay fundamentals so that you have a full appreciation of the role of PLCs in replacing relays, simplifying process-control design/implementation and enhancing process quality at much lower system overall cost. Coverage in this section is limited to functionality and applications without much detail of either electrical or mechanical characteristics.

2.1 Conventional Relays

This section shows how a relay actually works. A relay is an electromagnetic switch that has a coil and a set of associated contacts, as shown in Fig. 6. Contacts can be either normally open or normally closed. An electromagnetic field is generated once voltage is applied to the coil. This electromagnetic field generates a force that pulls the contacts of the relay, causing them to make or break the con trolled external circuit connection. These electrically actuated devices are used in automobiles and industrial applications to control whether a high-power device is switched on or off. While it is possible to have a device such as a large industrial motor or ignition system powered directly by an electric circuit without the use of a relay, such a choice is neither safe nor practical. For example, in a factory, a motor control may be placed far away from the high-voltage electric motor and its power source for safety reasons. In this case, it is more practical to have a low power electrical relay circuit control the high-power relay contacts than to wire a high-power electric switch directly from the control area to the motor and its independent power supply.


Fig. 6 Typical industrial relays.

Fig. 7 shows a control relay CR1 with two contacts normally open (CR1-1) and normally closed (CR1-2). On the left side of the figure, power is not applied to the coil (CR1), and the two contacts are in the normal state. On the right side of the figure, the power is applied to the coil, and the two contacts switch state.

Fig. 8 shows a simple relay circuit for controlling a bell using a single pole, single-through (SPST) switch. Pressing the switch causes the bell to sound.

A relay is typically used to control a device that requires high voltage or draws large current. The relay allows full power to the device without needing a mechanical switch that can carry the high current. A switch is normally used to control the low-power side, the relay-coil side. Notice that there are two separate circuits: the bottom uses the direct-current (dc) low power, whereas the top uses the alternating current (ac) high power. The two circuits are only connected through electro magnetic field coupling. The low-power dc side is connected to the coil, whereas the high-power ac side in this example is located in the field away from the control room. The two sides are normally powered from two independent sources in a typical industrial facility automated application. Of course, it is not cost-effective to replace the relay in this example with a PLC, but it does for a real application with hundreds or thousands of input-output (I/O) devices.


Fig. 7 Relay with two contacts normally open and normally closed.


Fig. 8 Simple relay circuit.

2.2 Relay Logic System

Relay logic systems are control structures appropriate for both industrial and municipal applications. The operations/processes that will be controlled by relay logic systems are hardwired, unlike programmable logic control systems. These systems are inflexible and can be difficult to modify after deployment. Because the operation of relay logic controllers is built directly into the device, it is easy to troubleshoot the system when problems arise. Such control systems are developed with fixed features for specific applications. Typically, large pumps and motors will be equipped with hardwired relay control to protect them against damage under overloads and other undesired working condition. PLC systems provide needed flexibility and allow for future continuous quality improvements in the process.

Fig. 9 shows two relay circuits for implementing two inputs: AND and OR logic functions, respectively. Each relay has two magnetic coils and an associated normally closed (NC) set of contacts. The two inputs are connected to one side of each of the two coils, and the other end of the coil is connected to ground. The contacts are connected in a predefined manner to produce the desired output as a function of the two inputs. Input A and input B can be at either the ground level (0/low logic/false logic) or the +V level (1/high logic/true logic). The AND arrangement produces the +V logic (high logic) only when the two inputs are high, whereas the OR configuration produces the ground logic (low logic) only when the two inputs are low. Notice that the relay operation involves electrical (coils and power supply) and mechanical (moving contacts) components.

Schematic diagrams for relay logic circuits are often called logic diagrams.

A relay logic circuit is an electrical diagram consisting of lines/networks/rungs in which each must have continuity to enable the intended output device. A typical circuit consists of a number of networks, with each controlling an output.


Fig. 9 (a) AND logic function. (b) OR logic function.

Each output is controlled through a combination of input or output conditions (e.g., switches and control relays) connected in series, parallel, or series-parallel to obtain the desired logic to drive the output. Relay logic diagrams represent the physical interconnection of devices. It is possible to design a relay logic diagram directly from the narrative description of a process-control event sequence. In ladder-logic diagrams, an electromechanical relay coil is shown as a circle and the contacts actuated by the coil as two parallel lines. Given this notation, the relay logic line diagrams for the AND and OR logic functions are shown in Fig. 10.

The L1 and L2 designations in this logic diagram refer to the two poles of a 120-Vac supply. L1 is the hot side of the supply, and L2 is the ground/neutral side. Output devices are always connected to L2. Any device overloads that are to be included must be shown between the output device and L2; other wise, the output device must be the last component before L2. Input devices are always shown between L1 and the output device. Relay contact control devices may be connected either in series, parallel, or a combination of both called series-parallel.


Fig. 10 Relay logic line diagrams.

2.3 Control Relay Application

Relays are widely used in process-control and automation applications. PLCs gained much acceptance in the last 30 years and gradually replaced most of the old hardwired relay-based control systems. It is important that you understand the old relay control systems so that you can appreciate and make the transition to the more powerful, easier-to-implement, less costly to maintain, and reliable PLC control. This section documents two simple relay control applications.

Fig. 11 shows the line diagram for a common application of electromechanical relay dc motor-control circuitry. A momentary NO push-button switch starts the motor, and another NC push-button switch stops the motor. The control relay contact is used to latch the Start push button after it is released. Another contact associated with the same relay is used to start the motor. Pressing the Stop push button at any time will interrupt the flow of electricity to the motor and cause it to stop.


Fig. 11 DC motor controls.


Fig. 12 Relay controlling two pilot lights.

Another application is shown in Fig. 12. The line diagram illustrates how a hardwired relay is used to control two pilot lights. The desired control is accomplished using two push-button switches; PB1 starts the operation, and PB2 terminates it at any time.

Below are the critical steps for this example:

• With no power applied to the control relay, the contacts are in a normal state.

The NO contacts are open, and the NC contacts are closed. The green pilot light receives power and turns on as indicated by the green fill light. The red pilot light is off as shown.

• Rung 1: Once the START PB1 is pressed, coil CR1 becomes energize; this, in turn, makes contacts CR1-1 close and maintains power to CR1 through the NC STOP push button PB2.

• When CR1 energizes the switch state of the contacts, the NO contacts close, and the NC contacts open. This will turn off the green light on rung 2 and turn on the red light on rung 3.

• When the STOP push button is pressed, the control relay loses power, and the contacts switch to the normal state. This results in turning the green light on and the red light off.


Fig. 13 High-power motor circuit.


Fig. 14 Low-power motor starter circuit.

2.4 Motor Magnetic Starters

A magnetic starter is used to control the high power to the motor, as shown in Fig. 13. Three of the motor magnetic starter contacts are used to connect the three phases of the high-voltage supply. In addition, overload relays are physically attached for the motor overload protection. Fig. 14 shows the low power motor starter circuit. START and STOP push-button switches start and stop the motor through the control of its magnetic starter. Magnetic starter con tact M-4 is used to latch the motor start action.

Fig. 15 presents a line diagram of a magnetic reversing starter controlled by forward and reverse push buttons. Pressing the forward push button completes the forward coil circuit from L1 to L2. Energizing coil F, in turn, energizes two auxiliary contacts F-1 and F-2. F-1 provides a latch around the forward push button maintaining coil F energized. The NC contact F-2 will prevent the motor from running in the reverse direction if the reverse push button is pressed before the Stop push button while the motor is running in the forward direction. The lower part of Fig. 15 presents a line diagram of the magnetic reversing starter controlled by forward and reverse push buttons.

Pressing the reverse push button completes the reverse-coil circuit from L1 to L2. Energizing coil R, in turn, energizes two auxiliary contacts R-1 and R-2. R-1 provides a latch around the reverse push button maintaining coil R energized.

The NC R-2 contact will prevent the motor from running in the forward direction if the reverse push button is pressed before the Stop push button while the motor is running in the reverse direction. Please refer to the for an interactive simulator illustrating the forward/reverse motor operation.

Reversing the motor running direction is accomplished by switching two of the motor input voltage phases. When coil R energizes R-2, R-3 and R-4 are closed; L1 connects to T3, L3 to T1, and L2 to T2, causing the motor to run in the reverse direction.

Vertical gate control for downstream water level regulation is one such application that makes use of this reversal of motor running direction. A desired increase in downstream water level requires running the motor in a certain direction, which causes the gate to move upward. Running the motor in the opposite direction will cause the downstream water level to decrease. Movements in both directions are accomplished by a single motor. These motors are heavy-load, high-power devices/actuators with wide use in industrial process-control and automation applications. Typical cost for each such motor is high, and they come ready equipped with a magnetic starter with all the needed instrumentation and protective gear, such as overload relay contacts.


Fig. 15 Control of reversing motor starter.

2.5 Latch and Unlatch Control Relay

Latch and unlatch control relays work exactly like the set-reset flip-flop covered in digital logic design. Set is the latch coil, and reset is the unlatch coil. It is designed to maintain the contact status when power is removed from the coil, as shown in Fig. 16. Fig. 17 shows the line logic diagram for the latch and unlatch control relay.

Once the START push button is pressed, coil L receives power and energizes.

After the START push button is released, coil L does not receive power but maintains the energized state. Contact L will close and cause motor M to run. To stop motor M, the STOP push button must be pressed to switch the state of the latch unlatch relay to the unlatched status.


Fig. 16 Latch and unlatch operation.


Fig. 17 Latch-unlatch control line diagram.

The START and STOP push-button switches are interlocked through hardwiring. Either action can be activated at any time, but never both at the same time.

The START (latch) and the STOP (unlatch) can be generated through program logic events instead of the two push-button switches shown, such as the tempera ture in a chemical reactor exceeding a certain range or the level in a boiler drum being below a certain threshold.

3 PLC Overview

This section is intended as a brief introduction to PLCs, their history/evolution, hardware/software architectures, and the advantages expected from their use relative to other available choices for process control and automation.

3.1 What Is a PLC?

A programmable logic controller (PLC) is an industrial computer that receives inputs from input devices and then evaluates those inputs in relation to stored program logic and generates outputs to control peripheral output devices. The I/O modules and a PLC functional block diagram are shown in Fig. 18. Input devices are sampled and the corresponding PLC input image table is updated in real time.

The user's program, loaded in the PLC memory through the programming device, resolves the predefined application logic and updates the output internal logic table. Output devices are driven in real time according to the updated output table values.

Standard interfaces for both input and output devices are available for the automation of any existing or new application. These interfaces are workable with all types of PLCs regardless of the selected vendor. Sensors and actuators allow the PLC to interface with all kinds of analog and ON/OFF devices through the use of digital I/O modules, analog-to-digital (A/D) converters, digital-to analog (D/A) converters, and adequate isolation circuits. Apart from the power supply input and the I/O interfaces, all signals inside the PLC are digital and low voltage. Details of PLC hardware and interfaces will be discussed later in Sections 2, 5, 7, and 8.

===

Output image table Input image table User program Data storage Input devices Output devices Programming device PLC


Fig. 18 Input-output (I/O) PLC architecture.

===

Since the first deployment of PLCs four decades ago, old and new vendors have competed to produce more advanced and easier-to-use systems with associated user-friendly development and communications tools. Fig. 19 shows a sample of actual industrial and popular PLCs. You should notice the diversity of sizes and obviously associated capabilities, thus not only allowing cost accommodation but also enabling the design and implementation of complex distributed control systems. Most vendors allow the integration of other PLCs as part of a networked distributed control system. It is also possible to implement extremely large system control on one PLC system with large number of interconnected chassis and modules.


Fig. 19 Typical industrial PLCs.

Wikipedia states that "a programmable logic controller (PLC) or programmable controller is a digital computer used for automation of electromechanical processes, such as control of machinery on factory assembly lines, amusement rides, or light fixtures." PLCs are used in many industries and machines. Unlike general purpose computers, the PLC is designed for multiple input 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 or nonvolatile memory. A PLC is an example of a hardwired real-time system because output results must be produced in response to input conditions within a bounded time; otherwise, unintended operation will result. Most of the electromechanical components needed for hardwired control relay systems are completely eliminated, resulting in great reduction in space, power consumption, and maintenance requirements.

A PLC is a device that can replace the necessary sequential relay circuits needed for process control. The PLC works by sampling its inputs and, depending on their state, actuating its outputs to bring about desired changes in the controlled system. The user enters a program, usually via software, that allows control systems to achieve the desired result. Programs are typically written in ladder logic, but higher-level development environments are also available. The International Electrotechnical Commission (IEC) 1131-3 Standard (global standard for industrial control programming) has tried to merge PLC programming languages under one international standard. We now have PLCs that are programmable in function block diagrams, instruction lists, C computer language, and structured text all at the same time! Personal computers (PCs) are also being used to replace PLCs in some applications.

PLCs are used in a great many real-world applications. The evolution of the competitive global economy mandated industries and organizations to commit to investments in digital process control and automation using PLCs. Wastewater treatment, machining, packaging, robotics, materials handling, automated assembly, and countless other industries are using PLCs extensively. Those who are not using this technology are wasting money, time, quality, and competitiveness.

Almost all application that use electrical, mechanical, or hydraulic devices have a need for PLCs.

For example, let's assume that when a switch turns on, we want to turn on a solenoid for 15 seconds and then turn it off regardless of the duration of the switch ON position. We can accomplish this task with a simple external timer. What if our process includes 100 switches and solenoids? We would need 100 external timers to handle the new requirements. What if the process also needed to count how many times the switches individually turned ON? We'd have to employ a large number of external counters along with the external timers. All this would require extensive wiring, energy, and space and expensive maintenance requirements. As you can see, the bigger the process, the more of a need there is for PLCs. You can simply program the PLC to count its inputs and turn the solenoids on for the specified time.

3.2 History of PLCs

Prior to the introduction of PLCs, all production and process-control tasks were implemented using relay-based systems. Industrialists had no choice but to deal with this inflexible and expensive control system. Upgrading a relay-based machine-control production system means a change to the entire production system, which is very expensive and time-consuming. In 1960s, General Motors (GM) issued a proposal for the replacement of relay-based machines. PLC history started with an industrialist named Richard E. Morley, who was also one of the founders of Modicon Corporation in response to the GM proposal. Morley finally created the first PLC in 1977 and sold it to Gould Electronics, which presented it to General Motors. This first PLC is now safely kept at company headquarters.

The website plcdev.com shows the history (reproduced in the following figures) of the development of the PLC by different manufacturers. It spans the period from 1968 to 2005. The new S7-1200 microcontroller was introduced by Siemens in 2009. It was designed to provide an easy-to-use and scalable infra structure for small and large distributed control applications. Details of the S7-1200 and associated interfaces, including hardware, software, human-machine interfaces (HMIs), communication, and networking, along with industrial-control application implementation using this Siemens infrastructure, will be the focus of this guide. Reduction in size, lower cost, larger capabilities, standard interfaces, open communication protocols, user-friendly development environment, and HMI tools are the trend in the evolution of PLCs, as shown in timeline.

The history of PLCs is displayed in time categories starting from the early systems introduced from 1968 to 1971 (Fig. 20). This is followed by a span of 6 years labeled as the first PLC generation. The second generation started in 1979 and covered a period of 7 years, ending in 1986. This period showed a greater number of vendors mostly from existing U.S. companies in addition to German and Japanese firms. The early third generation started 1987 and lasted for 10 years, followed by a lasting period of continued growth and advancement in both hardware and software tools, which led to a wide deployment of PLCs in most manufacturing automation and process-control activities.

====


Fig. 20 PLC history chart (R. Morley, father of PLCs).

1968 to 1971 Early PLC Systems Allen Bradley acquires information instruments Purchase of Bunker Ramo's numerical controls division First attempt the PDQ II Second attempt the PMC General Electric's first programmable control PC-45 Robert Morley details the programmable controller Richard Morley, Bedford Associates starts Modicon 084 Model General Motors Hydra-matic division specifies design for a " standard machine controller"

--


1971 to 1974 First-Generation PLC Systems 184 Model Second attempt the PMC First computer terminal for programming General Electric's first programmable control PC-45 First design of general purpose programmable controller-Logitrol Omron's first PLC SYSMAC-MIR PLC patent bulletin 1774

--


1975 to 1979 Early Second-Generation PLC Systems 284/384 Models Becomes operation division of Gould PLC-2 (1771 I/O) based on Intel 8080 DataHighway network Standard line of SYSMAC PLCs using microcomputers Modbus network communications

--


1980 to 1984 Second-Generation PLC Systems PLC-3 based on AMD microprocessor Series 6 PLC Series 1 PLC Siemens Simatic S5 PLC

--


1985 to 1989 Early Third-Generation PLC Systems 984 Model Rockwell international buys Allen Bradley for $1.651 billion.

IBM compatible programming terminal PLC-5 based on Motorola 68000 Series 3 PLC Series 5 PLC C200H General Electric and Fanuc partner to form GE Fanuc automation Mitsubishi A Series PLC debuts Sales hit $1 billion.

---


1990 to 1996 Third-Generation PLC Systems Profibus and Ethernet capabilities Quantum range of automation control SLC500 small processors 90-30 Model 90-70 Model CQM1 PLC Direct is founded as a subsidiary of Koyo Electronics Low-cost networked Block I/O Ethernet and TCP/IP capabilities DeviceNet, open network Allen Bradley software merges with ICOM to form Rockwell Software MicroLogix 1000 and Flex I/O Shipment of one millionth PLC

--


1997 to 2005 Compact PLC Systems Schneider Electric purchases Modicon ControlLogix VersaMax CS1 Series RX7i PLC PAC system Series RX3i PLC PAC system PLCDirect changes its name to AutomationDirect Mitsubishi Q Series PLC debuts

====


Fig. 21 PLC architecture.

Input circuit Input relays Output relays Counters Internal utility relays Data storage Timers Output circuit Power supply CPU Memory

====

3.3 PLC Architecture

A typical PLC mainly consists of a central processing unit (CPU), power supply, memory, communication module, and appropriate circuits to handle I/O data.

The PLC can be viewed as an intelligent box having hundreds or thousands of separate relays, counters, timers, and data-storage locations. These counters, timers, and relays do not exist physically, but they are software-simulated internal entities. The internal relays are simulated through bit locations in memory registers.

Fig. 21 shows a simplified block diagram of a typical generic PLC hardware architecture.

PLC input modules are typically implemented using transistors and do exist physically. They receive signals from external switches and sensors through contacts. These modules allow the PLC to interface with and get a real-time sense of the process status. Output modules are typically implemented using transistors and use triodes for alternating current (TRIACs) to switch the connected power to the output coil when the output reference bit is TRUE. They send ON/OFF signals to external solenoids, lights, motors, and other devices. These modules allow the PLC to interface with and regulate in real time the controlled process. Counters are software-simulated and do not exist physically. They can be programmed to count up, down, or both up and down events/pulses. These simulated counters are limited in their counting speed but suitable for most real-time applications.

Most PLC vendors provide high-speed counter modules that are hardware-based and can accommodate extremely fast events. Typical counters include up-counters, down-counters, and up/down-counters. Timers are also software-simulated and do not exist physically. The most common types are the on-delay, off-delay, and retentive timers. Timing increments vary but typically are larger than 1/1000 of a second. Most process-control applications make extensive use of timers and counters in a variety of ways and applications that will be detailed in Section 3.

Data storage is a high-speed memory/register assigned to simply store data.

These registers are usually used in math or data manipulation as temporary storage.

They also are used to store values associated with timers, counters, I/O signals, and user-interface parameters. Communication buffers and related networking and user-interface tasks also make use of high-speed storage. They also typically can be used to store data and programs when power is removed from the PLC. On power-up, the same contents that existed before power was removed will still be available.

===


Fig. 22 Contact and coil symbols.

A contact symbol; A coil symbol

===

3.4 Hardwired System Replacement

As stated in the preceding section, PLCs were introduced to replace hardwired relays. In this section we will introduce the process of replacing the relay logic control with a PLC. The example we will use to demonstrate this replacement process may not be very cost-effective for the use of a PLC, but it will demonstrate the fundamental concepts. As shown earlier, the first step is to create the process ladder-logic diagram /flowchart. PLCs do not understand these schematic diagrams, but most vendors provide software to convert ladder logic diagrams into machine code, which shields users from actually having to learn the PLC processor-specific code. Still we have to translate all process logic into the standard symbols the PLC recognizes. Terms such as switch, solenoid, relay, bell, motor, and other physical devices are not recognized by PLCs. Instead, input, output, coil, contact, timer, counter, and other terms are used.

Ladder-logic diagrams use standard symbols and associated addresses to uniquely represent different elements and events. Two vertical bars, representing L1 and L2, span the entire diagram and are called the power/voltage bus bars. All networks/rungs start at the far left, L1, and proceed to the right, ending at L2.

Power flows from left to right through available closed circuits. Inputs such as switches are assigned the contact symbol of a relay as shown in Fig. 22. Output such as the bell is assigned the coil symbol of a relay. The ac/dc supply is an external power source and thus does not show in the ladder-logic diagram. The PLC executes the logic and turns an output ON or OFF using a TRIAC switching interface without any regard to the physical device connected to that output.

The PLC must know the location of each input, output, or other element used in the application. For example, where are the switch and the bell going to be physically connected to the PLC? The PLC has pre-specified I/O addresses in a wide variety of signal forms and sizes to interface with all types of devices. For now, assume that the input (the push-button switch) will be labeled "0000" and the output (the bell) will be labeled "0500." The final step converts the schematic into a logical sequence of events telling the PLC what to do when certain real-time events or conditions are satisfied. In the example, we obviously want the bell to sound when the push-button switch is pressed. An electrical power connection to the bell is made while the push button switch is being pressed. Once the push button is released, the electrical power connection to the bell is removed. The only requirement for this small system to work is to have the push button connected to the PLC input module and to have the bell wired to the PLC output module, as will be shown later. Fig. 23 shows the logic diagram for this simple example. More industrial control examples and extensive discussion will illustrate this concept in subsequent sections.


Fig. 23 Bell logic diagram.


Fig. 24 Ladder rung/network.

3.5 PLC Ladder Logic

PLCs use a ladder-logic program, which is similar to the line diagram used in hardwired relay control systems. Fig. 24 describes the control circuit for a ladder-logic program rung, which is composed of three basic sections: the signal, the decision, and the action. The PLC input module scans the input signals, and the CPU executes the ladder-logic program in relation to the input status and makes a decision. The output module updates and drives all output devices. The following sections show the I/O terminal connection and describe the digital I/O addressing format.

As shown in Fig. 25(a), the input devices are connected to the input module through the hot (L1), whereas the neutral is connected directly to the input module. Fig. 25(b) shows the outputs wired to the output terminal module, the outputs are wired to the output terminal module, and the neutral (L2) is connected to the output devices. The figure shows two digital inputs, a foot switch and a pressure switch, and two outputs, a solenoid and a pilot light.


Fig. 25 I/O terminal connection.


Fig. 26 Manual/auto motor control PLC connection. L1 L2


Fig. 27 (a) Hardwired motor start/stop control relay. (b) Motor start/stop PLC ladder-logic control. (c) Motor start/stop PLC ladder logic in relation to I/O modules.


Fig. 28 (a) Hardwired solenoid valve relay control. (b) Solenoid valve PLC ladder-logic control. (c) Solenoid valve PLC ladder-logic control in relation to I/O modules.

3.6 Manual/Auto Motor Control Operation

Fig. 26 shows a manual/auto control of a three-phase induction motor. While the M/A switch is being held in the manual position, pressing the Start push button energizes the motor magnetic starter M1. Because the Start push button is an NO momentary switch, the power to the magnetic starter is maintained through the latch with the auxiliary contact M1-1 around the Start push button. When the M/A switch is placed in the AUTO position, the digital output module receives the hot line (L1) through the AUTO switch. When rung logic in the software for the output M1 is TRUE, switching of L1 occurs, and the magnetic starter is energized, causing the motor to run. Motor status can be monitored with NO contacts M1-2 wired between the hot line (L1) and the digital input module. The neutral phase is connected directly to the input module. The motor overload conditions, which typically is deployed in the motor for protection and safety operation, are combined and shown in the PLC wiring connection in Fig. 26. These safety and protection features are part of the standard safety requirement for most industrial motors.

Figures 27 and 28 show the results of converting a hardwired control relay to a PLC ladder-logic control. The first example implements a simple motor control using momentary START and STOP push buttons. The START push button is a NO contact that closes when the switch is pressed and opens when it is released.

The STOP push button is a NC contact that opens when the switch is pressed and closes when it is released. The second example shows a simple solenoid-valve control using START and STOP momentary push buttons. The solenoid valve is activated when the START push button is pressed and deactivated through the STOP switch action.

3.7 S7-1200 Book Training Unit Setup

Fig. 29 shows the Siemens PLC setup used to demonstrate hardware and software concepts covered in process control and automation. The training unit is also used to implement, debug, and document all examples, homework, laboratories, and projects throughout this guide.

The training unit shown in this figure consists of the following items:

• 24-V power supply (1)

• Power-supply-ready light-emitting diode (LED) (2)

• Processor status LEDs (3)

• Siemens PLC processor; CPU 1214C DC/DC/DC, 6ES7 214-1AE30-0XB0 V2.0. (4)

• One-port integrated analog output module: QW80 (5)

• Ethernet/PROFINET cables; CPU, HMI, and programming computer (6)

• Ethernet/PROFINET four-port communication module (7)

• Processor-integrated 14-digital-output LEDs (8)

• Processor-integrated 14-digital-input LEDs (9)

• Two-port integrated analog input module: port 1 (IW64) and port 2 (IW66) (10)

• Processor plug-in input-switch module: eight ON/OFF switches (11)

• 24-Vdc power connections to processor, switch module, communication module, and HMI (12)

• 120 Vac (13)

• SIMATIC HMI basic color with six function keys: KTP600 basic PN (14)

• Windows programming computer/laptop (15)

The eight ON/OFF switches (I0.0 to I0.7) are used to simulate and test discrete input devices. The corresponding LEDs indicate their individual status. The remaining six digital inputs (I1.0 to I1.5) can be wired to additional discrete input devices.

The 14 ON/OFF outputs (Q0.0 to Q0.7 and Q1.0 to Q1.5) are used to simulate and test discrete output devices. The corresponding LEDs indicate their individual status. The two analog inputs (IW64 and IW66) are connected to two potentiometers (0 to 10 V) that simulate analog variable signals. The analog output is connected to a small voltmeter (0 to 10 V). These are the tools and configurations used to establish the trainer in this guide. Other configurations can be implemented and used.


Fig. 29 S7-1200 book training unit.

=======

Tbl. 1 PLC and Control Relay Comparison

Issue of PLC and Control Relay Comparison ---- PLCs --- Control Relays

Control logic changes

Changes in logic can be easily implemented in software.

Changes require more complex hardware modifications.

Deployment on different systems Easier to customize and download software.

Requires construction of new control panels.

Future expansion New I/O modules, expansion chassis, HMIs, and software patches can be added.

Networked control systems can be used.

Expansion is possible but at higher cost.

Reliability PLCs are more robust, and redundancy is available.

Less reliable because of the use of individual components.

Down time Troubleshooting/changes can be made online with no downtime.

Changes or troubleshooting often requires the system to go offline.

Space requirement

Space requirement rapidly decreases as the number of relays increase.

Huge space requirement for a system with large number of relays.

Data acquisition and communication PLCs support data collection, analysis, and communication.

Not directly or easily possible.

Maintenance and speed of control

Less maintenance and faster speed of control.

Mechanical parts require more maintenance and reduce speed of control.

Cost -- Effective cost and performance for a wide range of process-control applications.

Can be cost-effective for very small systems.

=======

Tbl. 2 PLC and PC Control System Comparison

Comparison Issues --- PLCs --- PCs

Environment PLCs are specifically designed for harsh conditions with electrical noise, magnetic fields, vibration, and extreme temperatures or humidity.

Common PCs are not designed for harsh environments. Industrial PCs are available but at a much higher cost.

Ease of use By design, PLCs are friendlier to technicians because they are programmed in ladder logic and have easy connections.

Operating systems such as Windows, UNIX, and Linux are common.

Connecting I/O to the PC is not always easy.

Flexibility PLCs in rack format are easy to exchange and expand. They are designed for modularity and expansion.

Typical PCs are limited by the number of special cards they can accommodate and are not easily expandable.

Speed PLCs execute a single program in sequential order and have a better ability to handle real-time events.

PCs are designed to handle multitasks.

Real-time operating systems can handle real-time events.

Reliability A PLC rarely crashes over long periods of time.

Locking up and crashing are more frequent with PCs.

Programming languages PLC languages used are typically ladder logic, function block, or structured text.

PCs are very flexible and powerful in providing a wide variety of programming tools.

Data management -- Memory is limited in its ability to store and analyze large amounts of data.

PCs excel with any long-term data storage, modeling, simulation, and trending.

Cost -- Hard to compare pricing with many variables like I/O counts, hardware needed, programming software, and so on.

=======

3.8 Process-Control Choices

PLCs are not the only devices available for controlling a process or automating a system. Control relays and PCs can be used to implement the same control. Each choice may be of benefit depending on the control application. This debate has been going on for a long time while a mix of technologies has advanced at an incredible rate. With the continuing trend of declining PLC prices, size shrinking, and performance improving, the choice has become less of a debate in favor of PLCs . Yet system owners and designers have to ask themselves if a PLC is really overkill for an intended process-control or automation application. Tbl. 1 summarizes a brief comparison between PLCs and control relays and addresses important issues to be considered:

A dedicated controller is a single instrument that is dedicated to controlling one process variable such as temperature for a heating control. Dedicated controllers typically use proportional integral derivative (PID) control and have the advantage of an all-in-one package, typically with display and buttons. These controllers can be an excellent tool to use in simple applications. PLCs can compete pricewise and functionally with these controllers, especially if several controllers are needed. PLCs offer greater degree of flexibility and can be programmed to handle existing and future scenarios.

PCs also can be fitted with special hardware and software for use in process-control applications. PCs can provide an advantage in certain control tasks relative to PLCs, but their use is not as widespread as PLCs. Hybrid networked system of PLCs and PCs is in wide use in large distributed control applications. Tbl. 2 shows a brief comparison between PLCs and PCs and addresses important issues to be considered.

Quiz and Lab Projects

Quiz:

1 What is the meaning of the word process in the chemical industry?

2 Define the following:

a. Self-regulated process

b. Process variable

c. Process set point

d. Controlled variable

e. Controlling variable

f. The difference between manual and automated control

g. Dead band

3 What is the difference between open- and closed-loop control?

4 Describe the difference between direct-acting and reverse-acting control.

5 List at least four advantages of PLC control over hardwired relay control.

6 Explain the advantages of using a logic diagram or flowchart in programming.

7 Explain the steps used in implementing single-variable closed-loop control.

8 Define the following:

a. Absolute error

b. Error as a percent of set point

c. Error as a percent of range

9 If an oven set point = 210°C, measured value = 200°C, range = 200 to 250°C, answer the following.

a. What is the absolute error?

b. What is the error as a percent of set point?

c. What is the error as a percent of what range?

d. Repeat the preceding parts for a measured temperature value of 230°C, assuming that the same set point and range do not change.

10 Explain why the National Electrical Code demand users to control a motor's START/STOP using NO/NC momentary push-button switches instead of maintain switches.

11 Explain the following:

a. The function of a process controller

b. The function of the final control element

c. The main objectives of process control

12 Study the circuit in Fig. 30, and answer the following questions:

a. What logic gate type does the indicator represent?

b. What is the status (ON/OFF) of the indicator if push buttons A and B are pressed and released one time?

c. What is the status of the indicator if push buttons A and B are pressed and maintained closed all the time?

d. What is the status of the indicator if push button A or B is pressed one time?

e. Show how you can modify the circuit to maintain the indicator status ON if push button A or B is pressed and maintained closed.

f. Modify the circuit in the figure to maintain the indicator ON once the two push buttons are activated.

g. Add a STOP push button to turn the indicator OFF and restart the process at any time.


Fig. 30


Fig. 31 Auto/manual control.


Fig. 32 Hardwired control relay for motor and solenoid valve activation.

13 Fig. 31 shows a line diagram for an auto/manual motor-control circuit. The correct circuit was discussed in this section (Fig. 26). The STOP push-button switch will stop the motor only in the manual mode. The START push-button switch will start the motor and maintain its running status in the manual mode through the magnetic starter contact M1-1. The START push button can only jog the motor in the auto mode. As shown, the circuit has an error. Correct the error, and explain why the circuit should be corrected.

14 What is the status of CR1, M1, and SV1 in Fig. 32 under the following conditions?

a. PB1 is not pushed, and LS1 is open.

b. PB1 is pushed, and LS1 is open.

c. PB1 is pushed, and LS1 is close.

Projects:

Lab. 1: Getting familiar with Siemens S7-1200 PLC software


Fig. 33 S7-1200 Portal project view.

Fig. 34 Navigating the welcome tour.

Start the Siemens TIA Portal to launch the project view shown in Fig. 33. Perform the following steps in offline mode:

a. Welcome tour and opening an existing application (My_First_Lab)

Click Welcome Tour.

From your computer desktop find and click My_First_Lab as shown in Fig. 35..

Fig. 35 Loading My_First_Lab.

Fig. 36 PLC ladder program creation.

The project-tree functions look and behave like Windows Explorer:

• As with other Windows programs, a folder with a plus (+) sign can be expanded to show its contents.

• A folder with minus (-) sign can be collapsed to hide its contents.

Using the Windows tool bar, you can perform the following:

• Open files

• Delete files

• Copy files

• Rename files

• Create new file

Open file:

• After creating the application file (My_First_Lab), click Write PLC Program, and explore screen options.

• Explore the desired basic instructions, and use the Help menu for further clarification.

b. Laboratory requirements:

• Use an application file.

• Copy and save an application file.

• Navigate through the software.

• Navigate through the online help system.

• Get ready to create and edit a new PLC ladder program using the screen shown in Fig. 36.

Lab. 2: Getting familiar with S7-1200 software, offline programming, and the help menu

Part A

Enter the network shown in Fig. 37, and do the following from the project tree (as illustrated in Fig. 38):

1. Drag and drop the NO contact.

2. Enter the address I0.0.

3. Click on the contact to rename Tag_1 to STOP.

4. Click Change.

Fig. 38 Motor1 start network creation steps.

Fig. 39 Creating a parallel branch.

Fig. 40 Compiling the program.

Compile the program.

Notice that you have zero error and one warning after you compile the program as shown in Fig. 40. The warning is issued because the hardware is not configured. Hard ware configuration will be covered in Section 2, Laboratory 2.2. Save the program.

Part B

Enter the networks in Figs. 41 to 1.44 to implement the four combinational logics AND, OR, XOR, and XNOR. This diagram assumes two input switches (SW1 and SW2) and four output coils AND_LOGIC, OR_LOGIC, EXOR_LOGIC, and EXNOR_LOGIC.

Network 1

Fig. 41 Logic AND network.

Network 2

Fig. 42 Logic OR network.

Network 3

Fig. 43 Exclusive OR (XOR/EXOR) logic.

Fig. 44 Exclusive NOR (XNOR/EXNOR) logic.

I/O addresses should be documented as follows:

System Input

Tag Name Address Comments SW1 I0.0 Toggle switch SW2 10.1 Toggle switch System Output

Tag Name Address Comments AND_LOGIC Q0.0 Pilot light1 OR_LOGIC Q0.1 Pilot light2 EXOR_LOGIC Q0.2 Pilot light3 EXNOR_LOGIC Q0.3 Pilot light4

Fig. 45 Bit logic operations.

Fig. 46

Lab Requirements:

• Examine SW1 and SW2, the two inputs to the four network logics, and verify the logic.

• From the project tree under bit logic operation shown in Fig. 45, click Negate Assignment, and read the description from the Help menu.

• Edit and save Network 4, the XNOR logic network, to use the negate assignment and the XOR output instead of generating it from SW1 and SW2.

• Reload the program, and verify that new Network 4 logic works.

• Write the laboratory report to document all that you learned.

Lab. 3: Converting hardwired control relay to a ladder-logic program

Lab Requirements:

Using the information given in Lab 1, and assuming that PB1 and PB2 are NO and NC push buttons, respectively, wired hot in the line diagram in Fig. 46, do the following:

1. Convert the hardwired control relay shown in the figure to a ladder-logic program.

2. Assign and document all I/O addresses.

3. Document your program.

4. Compile and save the program.

NEXT

PREV.

All related articles   Top of Page   Home



Updated: Wednesday, April 22, 2015 22:54 PST