Automation Is a Part of Our Daily Lives
An attempt to describe automation can be like the five blind men in the proverbial story encountering an elephant for the first time – each explores one aspect of the animal and narrates his experience accurately, yet all the narratives together do not yield an overall picture. We can look at automation in the following ways:
- Automation is a subject that can be examined in terms of components
- Automation can be examined in terms of the system software, application software, and libraries
- Significantly, automation can be understood by understanding the algorithms and the products
When we stack up these views, we are able to build a realistic 3D image of automation.
Control challenges in the production of objects of everyday use are many. A close look at the kind of challenges that are encountered opens an interesting puzzle. Problem categories are few because the object parameters that need to be controlled are few. These could be, for example, the physical dimensions of the object, weight, thickness, and surface finish. Corresponding control variables are nearly always the same—speed, rate, tension, position, thickness, pressure, level, temperature, and so on. Control algorithms themselves are notably limited, for example, proportional control, integral control, and proportional, integral, derivative (PID) control. What is the puzzle that we mentioned at the beginning of the paragraph? The puzzle involves so many of the challenges that arise during implementation in an industry situation. These challenges arise from less-than-ideal measurements, control responses, imperfect earthing, and other problems. In spite of all these shortcomings, the machine must function properly and deliver good products. This is the magic achieved by clever control algorithms. Control schemes and algorithms are the solutions to the puzzle.
This book is meant for students but even more for faculty. There is always a gap between learning theory from textbooks or classrooms and learning from a hands-on lab experiment. A lab experiment is oriented to deepening your understanding of the theory. Too frequently, we encounter the opinion that academic design is not useful in industry practice, and that there is a gap between the lab and the shop floor. This book express the views of the industry and hopes to bridge this gap. Each chapter can be a starting point for creating a lab setup for investigating actual issues in industrialized automated machines. We do not delve into theoretical aspects of control loops and control design. The storyline is from an industrial implementation point of view.
Moving on to the focus of this chapter, would you be surprised if I told you that we are surrounded by elements, products, or goods that are an outcome of automation? Manufacturing is the backbone for producing these everyday products that we so often take for granted. As an engineer or a technical person, you learn so many aspects of engineering but can sometimes fail to understand how these translate or are applied to manufacturing products. We will introduce you to a typical manufacturing setup and demonstrate how machines and lines are built to enable a factory to produce the necessary products. We will also introduce the basic elements of a factory and manufacturing line. In addition, we will also introduce the aspects of how automation, control systems, robotics, and mechanics are instrumental in building up a machine. This will help you understand the finer elements of an entire manufacturing setup. You will be able to envision this setup, which forms the basis of the book, and also start relating various daily used products with manufacturing and automation setups. We will take you through the automation components and structures, helping you understand these elements in detail that will also be carried forward throughout the book.
This chapter will cover the following main topics:
- Understanding our daily rituals and the products we use
- Probing how consumer demands and needs are drivers
- Analyzing the elements of a factory – production lines and machines
- Analyzing the elements of automation – components and structures
Understanding our daily rituals and the products we use
"What is going on?" wonders Jacob on a rainy afternoon while returning from his final day at his internship. Jacob is a brilliant third-year electronics and telecommunication engineering student who got an early opportunity to work as an intern during his semester break. He has been getting excellent grades during his previous semesters, but his internship has been an eye-opener. He has realized that even after being fantastic in his studies, his time in the industry has been filled with hurdles. Being a sincere student, he feels dejected due to the vast gap that exists between his curriculum and the expectations in the industry. That evening over dinner, Jacob is quiet, and his mother realizes something is wrong and decides to talk with him. At first, Jacob doesn't feel comfortable enough to open up to her, but with her persistence, he explains what is on his mind. Being a banking professional, she does not understand what he is trying to express, and she tries her best to motivate him. However, Jacob is still unconvinced and uncertain about many topics. His father, a senior and respected professional in automation, overhears this conversation between his wife and his son. He is instantly taken back to the days of his first job, where after graduating in electronics engineering, he was exposed to the world of automation. He instantly recollects many facets of what his son is going through and realizes that he needs to do something so that his son starts believing in engineering studies and how the industry operates. He faced a torrid time during his initial work years as he was unable to understand that even after being a high achiever in college, the activities in the industry were way too different, and the industry had not only varied but also very high expectations.
He decides that he will pass on all his knowledge to his son so that he is able to overcome these challenges without too many difficulties. He decides to have a detailed discussion with Jacob.
The following day after breakfast, Jacob realizes that his father is trying to get into a conversation. He understands that it must be the continuation of his conversation with his mother, and he is not wrong.
Both of them enjoy a long conversation about how automation is central to what he is studying and the career he will choose.
Figure 1.1 – Engineering disciplines have these fundamental elements
We will take you through their conversation in the following chapters.
How do you start your day? You wake up and most probably head to the bathroom to brush your teeth. You pick up the toothbrush and apply the toothpaste to it. You might also own an electronic toothbrush as well as a plastic cover to protect or keep your toothbrush bristles safe and clean. Heading to the breakfast table, you serve yourself delicious food. In addition, you use cutlery and plates to eat your food with. Having a bath and getting ready, you need a block of soap, body wash, shampoo, conditioner, and a towel. You then open your closet and take out clothes. You like to utilize the refrigerator to make your packaged milk last longer. You also keep various food and beverages, such as butter, cottage cheese, meat, cheese, ketchup, ice creams, bread, and so many other things stocked up in your refrigerator. Heading out of the house for work or college, you either drive a car, motorbike, or bicycle, or take the subway, train, or bus. At work or college, you open a book and write in it with a pen, and you also use various stationery at your workplace. If you feel thirsty or hungry, you visit the store and pick up a bottle of water, a packet of chips, or packaged food. You might even wish to buy a soft drink. At lunch, you open your lunch box and enjoy your home-cooked meal. In the evening, you go out for a cup of tea or coffee. On coming home, you either open your laptop or turn on your smart TV to watch some web series or sports. You also load your washing machine and start the cleaning process. You might have a robotic cleaner to help with the sweeping and mopping. You then make your bed by removing the bed cover, putting on bed sheets and pillow covers, and setting your comforter. You might even put on your air conditioner before getting a good night’s rest.
Figure 1.2 shows many of the common devices and foods that you can use on waking up at home:
Figure 1.2 – Some of the devices and foods that we handle on waking up at home
All these products mentioned here are just the tip of the iceberg of the enormous list of products that are the outcome of automation. Surprised? We are not joking; all these products are made in a factory following a process on different machines, maybe even different locations. In addition, the supply chain, logistics, and distribution play a phenomenal role in not only manufacturing the product but also enabling the organization to make it reach its desired destination and, eventually, its consumer.
Let us take the example of a supermarket and identify various products that we see on the shelves. In the vegetable corner, you find some fruit or vegetables that are wrapped in a thin film and sealed. Film wrapping is very common in the packaging industry to enable foods to be contamination-free and provide safe transit. These concepts are also applied to bottles, soda, soft drinks (bottles and cans), and oil cans, enabling easier handling, transport, and stocking. You have likely observed such packaging in many stores and supermarkets. Figure 1.3 shows how cans or bottles are shrink-wrapped in factories:
Figure 1.3 – Shrink-wrapped cans in factories
In addition, filling liquid in these bottles is also a very different kind of automation that requires accuracy and precision. We will walk you through these processes in further chapters. Ideally, the bottling line will incorporate sections such as blowing the bottle, filling the bottle with the desired fluid, labeling the bottle, and then capping it. When we reach the aisle with all the packaged foods as well as consumer and personal care products, such as lentils, flour, pulses, soup, ready-to-eat items, shampoo sachets, biscuits, cookies, chips and chocolates, we see perfectly packaged and weighed packets. These packets are also an outcome of complex machines and automation. Vertical form fill seal (VFFS) and horizontal form fill seal (HFFS) are the machines that are deployed in the factory for producing such products. These packaged products are shown in Figure 1.4:
Figure 1.4 – Packaged products that are manufactured on VFFS and HFFS machines in the factory
I would go one step further and say that all the products in the supermarket are made using some form of automation. Until now, we have just focused on the food and beverage and packaging industries. However, there are so many industries, such as automotive, textile, plastics, printing, and pharmaceuticals, that also have immense automation. We will touch upon the manufacturing landscape and automation capabilities in all these industries in the coming chapters.
By this time, you will have realized that everything that surrounds you is, in one way or another, related to automation and manufacturing.
Probing how consumer demands and needs are drivers
The market has moved from a supplier market to a consumer market. All organizations have realized that customer-centric behavior enables higher growth and improves customer loyalty. Even for organizations working in the Business-to-Business (B2B) domain, it is not that different. An organization in the B2B domain is one where the organization directly sells goods and products to another organization and not to the consumer. Let us take a simple example of buying a laptop. An individual can buy a laptop online or from the store irrespective of the brand. Thus, companies such as Dell, HP, etc., would be an organization in the Business-to-Consumer (B2C) segment. However, electronic chips are needed to manufacture laptops, which might be delivered by a company like Intel. Therefore, Intel will sell its chips to HP, Dell, etc. Thus, Intel would work in the B2B domain. In most organizations, you will encounter the statement the customer is king. This is largely evident in the way products are made and offered to us today versus a few decades back. You must have seen that over the years, products have undergone a huge change. In the 1990s, food items were sold loose; however, due to hygiene requirements, ease of transportation, and storage, you mostly find products that are well packaged or you prefer buying packaged products. What has led to this change? As you might rightly point out, consumer and market demands are acting as drivers. There is a similar situation in the automotive industry. In the 1980s and 1990s, for instance, there were hardly any vehicles and variants in the Indian market, which was mostly dominated by a few manufacturers. Today, you have local and multinational brands offering you multiple variants. In simple terms, you are spoilt for choice.
All these changes are solely due to consumers demanding the supplier provide these possibilities. Today, it is just not enough for you to own a car or a motorbike; equally important are the features being offered and the cost-to-feature ratio. It is also possible that you might even pay a little more for that additional comfort.
Consumer awareness has increased. As a result, consumer demands on quantity, quality, safety, and price have all gone up. It can be very difficult to satisfy this need without automation.
Analyzing the elements of a factory – production lines and machines
By now, you might have a fair idea about how everyday products are made and eventually how to associate this with the manufacturing landscape and automation. Let us dive deeper into the concepts of the factory, a line, and a machine. I am sure these terminologies must be totally new for many of our readers. A manufacturing setup is primarily split into two main areas, the information technology (IT) infrastructure and the operational technology (OT) infrastructure. As the name suggests, the IT infrastructure in the factory is responsible for handling all the IT activities and managing all data. The production and related automation take place in the OT area. The factory floor is the place where all the machines are lined up in a particular sequence to manufacture a particular product.
Continuous process versus discrete process
There are two types of processes in manufacturing – process automation and discrete automation. Process automation can also be termed as continuous process automation; as indicated by the name, it is a continuously operated process. These specific automation possibilities can be together or in separate areas. A continuous process is a process where the end product or finished product is manufactured continuously without a break, and the manufacturing demands this continuous activity. Wherever there are process-based operations, any untimely stoppages usually lead to wastage and losses. Moreover, restarting the process takes a lot of time. It is important to understand that the continuous process is well connected, and an error in any area disrupts the entire process. Thus, these are critical operations and need critical infrastructure for handling such processes.
On the other hand, discrete processes are independent operations where there are links but then any untimely stoppages in one area do not necessarily directly affect the other areas. However, stoppages in discrete processes usually lead to bottlenecks in the system. With discrete processes come the concept of a line and machines. Discrete processes are built up of several machines that, in turn, are connected with one another to form a line. Each machine is responsible for a particular activity or process. A product must move through these machines and undergo processing at each station. Thus, raw material is fed into one end of the line, and a finished product is obtained at the other end. Let us take the example of a soap-making plant.
Soap making combines both areas of continuous process and discrete process. Preparing the soap mixture is a continuous manufacturing process. This forms the raw material for manufacturing the actual soap block that you can find in supermarkets. A brick of soap is first split into smaller soap blocks at the first station. Then these blocks get punched with the brand or the name of the soap at the following station. After this, the soaps are wrapped in branded glossy or carton packaging. There could be multiple stations for wrapping the soaps. A conveyor takes the soap block through each station. At the end of the wrapping line, the soaps are put together in a huge carton and then shipped to the warehouse for further distribution.
Mass/batch production versus customized production
The process described earlier is a form of mass production or batch production. Thus, once the batch is started, the batch will only finish after the raw material is used up. Let us again head to the kitchen to check an analogy. If you have one burner and are already preparing tea, if someone asks you to prepare coffee, you will need to first finish preparing tea. Once you are done preparing tea, only then will you be able to prepare coffee. This is an example of a batch process, where you need to finish one batch before you start a new or a different one. Thus, on a single machine or a line, there could be multiple soaps that might be manufactured. However, before you take up manufacturing a soap of a different scent, you need to finish the batch at hand. You might also need to clean the existing equipment to avoid contamination.
This is a concept that was introduced in automotive manufacturing. On the other hand, individualized production is a relatively new concept where each product can be customized. Today, you can gift chocolates with personalized messages and individual names. You need to pay a premium to purchase such products, but there is immense pleasure in having or gifting a bar of personalized chocolate. With adaptions made to existing production lines, organizations enable such unique possibilities. The major focus for organizations is to have a perfect balance between the cost of producing individualized products and not overburdening the consumer. Simply put, the manufacturing cost cannot be too high and the unique product cannot cost too much. Let us follow an example to better understand this: if a bar of chocolate costs $10 with a manufacturing cost of around $2, then the cost of personalized chocolates cannot be $20 with a manufacturing cost of $12. There will always be a limit on how much premium a consumer is willing to pay for a special product. Thus, the focus for organizations is to keep the costs under control while also offering such unique products that bring something new to the market.
Batch production or mass production provides an organization with cost-effective manufacturing. Moreover, this kind of production methodology is developed to cater to rising demands as well as keep costs in check. Once again, the focus of these innovations and changes is the consumer. As the consumer demands such possibilities, organizations are working toward building such products. In particular, to satisfy the pressure on price, goods need to be manufactured in large quantities at high speed. This is a case for automation.
Inside a factory
Every factory in every industry is a bit different; however, the basics always remain the same. In a factory, there is always an area for the corporate teams that might include research and development, human resources, finance, marketing, management, supply chain, and sourcing, among many others. This forms the office space of a factory. Then there is an area where the goods are manufactured, such as the shop floor. This area forms the OT space inside a factory. There are other areas, such as stocking incoming raw materials, stocking finished goods, the warehouse, and the distribution of products. In larger factories, there could be a possibility that these elements are not in a single area but might be spread over acres of land or even across one city or multiple cities.
There are even factories that are set up in different parts of the country or even the world, while still being connected to each other. There are examples of factories in the US, Europe, China, and India that are connected via the internet for various operations. These are the cases for huge organizations that are spread globally.
Let us now focus on one part of the factory that is of utmost importance for this book—the shop floor.
The shop floor or the factory floor is the place where the products are manufactured. The question is how? The shop floor is made up of different machines. Each machine is responsible for performing a certain action. Let us take the example of preparing a burger in any big burger shop. The bun needs to be toasted, which happens on, say, counter no. 1. A person manning this counter will toast the buns and, once done, will pass on these buns to the next counter. The buns then need to have some sauces applied to them, which takes place on counter no. 2. The person manning the counter then applies sauces on the buns based on the order. The buns also might need the addition of lettuce, which can take place either on a subsequent counter or on the same counter. After this process, this product is moved to the subsequent counter, say counter no. 3, where a deep-fried patty is inserted between the buns. Finally, the burger is ready and then this product is moved to another counter, say counter no. 4, where the burger is packed in a paper carton and sent to the delivery counter. Thus, the counters for assembling the burger are stationary and the product, that is, the burger, makes its way from the first counter to the final delivery to the consumer. There is also a possibility that along with the product, the person manning the stations moves with it or there are different people manning different counters. On the shop floor, these individual counters are called stations and are made up of individual machines. Each machine has a unique role to play. These stations together are termed as a line in the factory. This forms the basis of a machine and a line. A typical line in the packaging industry is shown in Figure 1.5:
Figure 1.5 – A typical production line in the packaging industry
Figure 1.6 – A view of a production line with various stations, operators, and conveyors
Let us take the example of a factory in the packaging industry to clarify how these concepts add up. In the packaging industry, let us focus on a bottling line where the factory manufactures and fills water bottles.
Water is one of the raw materials, and the factory needs to have a huge storage of water for filling the bottles. The PET bottles are made from a miniature plastic preform that is no more than 10 cm in length. This is another raw material for the bottling factory. This preform is molded into a PET bottle with a capacity of 1 liter using a process called PET blow/blow molding. This is the first station in the factory, where the preforms are blown into the desired shape of a bottle. The bottles are then transferred either manually or on a conveyor and taken to the subsequent station. At this station, the bottles are cleaned and then filled with water. These filled bottles are then moved on to the next station on the same conveyor for capping. After applying caps, the bottles then have labels applied for various purposes, such as branding, compliance assurance, and other information, and then are checked for quality. If the bottles are unequally filled or there are quality issues with the bottles, capping, or labeling, then this station rejects the faulty bottles and only accepts good bottles. After this, the conveyor takes the bottles to either a carton or shrink-wrap station, where the bottles are packaged for transport. A robot then creates a stack of these packaged cartons or shrink-wrapped bottles and they are made ready for storage or dispatch. The conveyor is responsible for transferring the products from one station to another. The stations are individual machines and are controlled by individual controllers, which we will see in the next section.
The line on the factory shop floor is a network of many machines, one after the other, performing different actions in order to manufacture a complete product. A machine is an independent entity that is responsible for performing only one or a set of tasks. Thus, any faults in one machine do not affect the operation of one on another station. However, as discussed earlier, if one station is down, then it leads to a bottleneck, as the previous stations in the line are healthy and producing at full speed, and the stations after the faulty station are healthy but are starved of products, as the station feeding them with products is broken down. Thus, as soon as the machine with a fault is back up and running, the line immediately starts operating at full speed. Systems resuming with a healthy status and returning the entire line in a factory to full speed operation is a scenario that is usually possible in discrete manufacturing with machines and lines; however, this is unlikely in a continuous process.
It is possible that inside a factory there could be multiple lines and tens to hundreds of machines on each line. There is the possibility that an entire building is dedicated to one line and there might be multiple buildings/shopfloors that constitute a factory. It is also possible that in one building there could be multiple lines for different products. In a printing press, there could be four lines printing different newspapers of the publication in different languages. In the case of a packaging line, there could be three parallel lines that are manufacturing, packaging, and cartoning different types of cookies/biscuits of the same brand. In the case of an automotive factory, there might be different buildings for the body shop, the paint shop, the engine line, the chassis line, and the final assembly, with each line having different machines and robots.
As we are now familiar with the elements of the factory, lines, and machines, let us go a step further and understand the finer elements of a machine.
Analyzing the elements of automation – components and structures
A machine is a mix of mechanics, mechatronics, electricals, and electronic components. The mechanical components are the gears, conveyors, structure, safety guards, base or foundation, hydraulics, or pneumatic connection. The electrical installations usually cover the electrical panels where all the electricals and electronics are mounted, such as the cabling and power connection. The electronics are components such as the programmable logic controller (PLC), human-machine interface (HMI), drives, motors, input/output (I/O) modules, sensors, actuators, and programming software. All these together form the machine. Without even a single element, the machine will fail to operate. Each element needs detailed attention, and this is the way any machine is built, developed, and then commissioned on any factory floor. The traditional approach to machine building involves building mechanical components as it is the most time-consuming and resource-intensive activity. Once the mechanical element is nearing completion, the electrical cabinet manufacturing and cabling can be started as it is the next most time- and resource-intensive work. After this, the software can be developed, installed, and tested to check the entire machine. However, with various advancements such as digital twins, the simulation of the electrical and software development can start in parallel, helping machine builders achieve a reduced time to market.
Control, automation, and data technologies
Automation forms a part of Industry 3.0, and can also be called digitization. Data technologies, which are the backbone of Industry 4.0, provide the means to monitor and assist managers to make competent decisions, based on events and measurements from the shop floor.
Control is the design effort to keep a chosen parameter within defined limits, even as the process environment changes. Control predates digitization and even electronic controls. Automation is a means of defining in great detail a control process and a means to perform the control task tirelessly and repeatedly according to the programming.
Automation is not technically a necessary element for data technologies. Yet, if the elementary parameters of throughput and quality are not achieved using good control automation, the benefits of data techniques cannot be obtained.
Now, let us understand the control loop. There are three standard parameters in a control loop. There is, first and foremost, the parameter to be controlled; it is called the control variable. It could be the level of liquid in a tank, the temperature of a substance, or something along similar lines. Next, there is a set point. This is the desired value to be attained or maintained by the control variable. There will be a measurement of the actual value of the control variable—what its value is now. The difference between the set point and control value is the deviation, usually called the delta, which is the third parameter. This deviation will act on a control element—a valve or a heater or something—to reduce this deviation. We will explore many control schemes. In every chapter, we will take objects that you encounter in everyday life. We will touch briefly on some of the processes involved in the manufacturing of these items. We will sketch out the control schemes employed to improve productivity in this manufacture. We will give some hints as a starting point for faculty and students to devise experiments in controls using automation:
Figure 1.7 – A typical closed-loop system in industrial automation
An efficient control algorithm is one that keeps the process variable (PV) within permitted limits around the set point. The greaterore the number of excursions, the higher the amplitude of the excursions, and the worse the algorithm is. Some of the factors that influence the behavior of a control algorithm are the inertia of the load system, noise in measurement, the frequency of sampling of the control variable, the rate of change of the process variable (for example, jerk change), and the rate of execution of the control program itself.
Control algorithms and PLC programs
A PLC program is a representation of the control algorithm in software. A typical PLC program cycle works like this: initially, all inputs are scanned and recorded in the local memory. This constitutes the input image and is assumed consistent; that is, all values have the same timestamp. Then the logic is executed, and outputs are calculated and written to the output image. Finally, the output image is transferred to the actuators. Hence you can see that there is, in the worst case, a latency of three cycle times. The discussion becomes more complex if you consider remote I/O systems, multiple controllers communicating on a bus, and what is very common—control loops inside control loops. The inertia of the load is not always mechanical inertia in moving parts. It is sometimes, for example, thermal inertia, such as when you try to heat an object, depending on its heat capacity, the response (increase in temperature) can be slow. The control algorithm needs to have this inertia and the latencies as factors. Control algorithms need tuning for a given installation. This is mostly a manual input and is provided by experienced operators. Present-day practice is moving toward auto-tuning to increase operator comfort. A practical issue is that during tuning, the material is wasted. Hence, the need arises to shorten the time needed for tuning and the trial-and-error involved so that wastage is minimized.
We are primarily going to examine automation in the field of manufacturing; therefore, we always talk of industrial automation. Thereby, we distinguish it from office automation—by which we refer to the hardware and software used for the automation of office functions, such as accounts, HR, sales, and inventory. In this book, we will walk our way through using control algorithms as our street guide and understand them by exploring how they play a role in making some of the very familiar products we use daily. This structure allows us to have a good idea of the progress achieved as we go along. The idea is that some control problems are common to the manufacturing of many products, and at the same time, any product will use many control elements. It is also very interesting that the same control problem is solved using different control elements, different control algorithms, and, particularly, different control strategies. Industrial automation is a complex organism. It has a structure and a function. There is a logic that drives the function and the structure. The structure evolves, and the development is guided by the intended or foreseen functions. Sometimes it works the other way as well; because of developments happening in components, some devices get developed. Then, new, innovative applications are created and put out on the market.
Tools and machines
A tool is a device that enhances the strength of a human. It mostly needs a human to wield it. There are also machine tools, where the machine uses the tool to achieve desired modifications in the workpiece. Examples of simple tools are the hammer, saw, and screwdriver.
The drive for more industrial automation
We can list the components moving from the smallest element to the largest—sensors/actuators, I/Os, drives and motors, the controller (PLC), and the software to program the PLC. All these elements have to be compatible and should be able to communicate with each other so that they work as desired. But you can see that each element has a different function and design. So, it is important to note that the sum of these components is much more capable than any one individual part.
Programmable logic controller (PLC)
The PLC is the brain of the automation system. As the name suggests, the PLC is an electronic component that can be programmed as per the needs of the user. The program can be written, deleted, or re-written in the PLC. The data from the machine operations is also written and stored in the PLC. The PLC is identical to your computer or laptop. It has a processing chip, a motherboard, random access memory (RAM), read-only memory (ROM), a clock, storage space, Ethernet ports, and USB ports. In the industry, it can either be a microprocessor-based, field-programmable gate array (FPGA) or an industrial PC:
Figure 1.8 – An architecture of the PLC with hardware and software functions
Software is needed to program these PLCs, which we will see in the upcoming subsection, Programming software and tools. This software is installed on a laptop or a desktop, and the developer then connects their laptop with the PLC for programming it.
Inputs and outputs (I/Os)
Just like our hands, ears, nose, tongue, and eyes are the sensory organs and provide the necessary information to our brain, some inputs are required for the PLC to function efficiently and take necessary actions. When we pick up something that is very hot, our fingers realize it and send signals to our brain, to which our brain responds by most probably dropping the object we picked up and holding our hand in cold water. Thus, the input from our finger is translated into action.
Similarly, the PLC needs inputs from various devices, such as sensors, to gather information about what is happening in the machine to take necessary action. I/Os in automation are extremely essential elements. As we saw earlier, inputs are needed to gather data from the field from sensing devices, and outputs are needed to take action based on the inputs received from the field. The software inside the PLC converts the raw data from the inputs into actionable information. Let us take an example of a tank being filled with water having two sensors for sensing the levels—one at the bottom and another at the top. When the sensor at the bottom is not triggered (sensed), then normally, the tank is empty, and water should be filled into the tank. When the sensor on the top is triggered, that means the tank is full, and the water filling should stop and remain stopped until the sensor at the bottom is once again not triggered. However, as a programmer, you need to take care of faulty sensors. What would happen if the sensor at the bottom is faulty and shows an indication that it has not been triggered , but the tank is full? The programmer needs to understand these possibilities and program accordingly. In addition, apart from these sensors, the market also provides analog ultrasonic sensors for measuring levels. We will study these in detail in Chapter 4, Level Control: Controlling the Level of Liquid to Avoid Drying Up or Spilling Over.
Typically, signals are ideally either digital or analog. A state of 0 or 1 represents off and on, respectively. A digital input, as well as digital output, has the same binary representation of 0 and 1. When you need to start a machine and you press a button, the input ‘on’ (binary 1) is sent to the PLC. This is a momentary push of a button. The moment the button is released, the signal changes to ‘off’ (binary 0). Similarly, to start an operation, a PLC needs to send an ‘on’ (binary 1) signal to the device and if you need to stop the device, then an ‘off’ (binary 0) needs to be sent to the device.
On the other hand, analog signals have a range that might be 0 to 65,535 or –32,768 to 32,767 and can be scaled to identify the actual value. Typically, analog signals are used for frequency, pressure, temperature, and flow.
Sensors and actuators
As described in the Inputs and outputs (I/Os) subsection, the sensors are connected to the inputs and the actuators are connected to the outputs of the PLC. Sensors are, let us say, the eyes and ears of the controller, whereas actuators are the arms and legs. Similar to our sensory organs, the sensors sense changes in the machine and provide them as inputs to the PLC. The PLC, in turn, runs the program and decides what the predefined actions are that are needed after particular inputs are activated. Let us again take the example of the water tank. What is the meaning of filling water? In most common situations, water would be filled into the tank by either turning on a valve or switching on a motor. These are outcomes of switching on outputs from the PLC and physically connecting them to the motor or the value activating them. When the motor or valve is switched on, there could be feedback to check whether they are actually turned on. These are all various possibilities, and the programmer needs to take care of these aspects.
There are many types of sensors, such as capacitive and inductive, that provide digital signals to the PLC and need digital inputs for detecting these inputs. There are also sensors that are analog in nature; that is, they provide inputs in the value range of 0 to 65,535 and need an analog input to sense these signals. There are also sensors that provide pulse-width-modulated signals, and some are high-speed inputs that need special input modules. There is a large set of potential inputs, and we have only covered some basics in this section.
Similarly, there are different types of outputs for various actuators, such as a digital output providing signals in 0 or 1 for actuating the output. There are relay-type outputs too. Outputs also come in the form of analog outputs where the activation of the outputs varies from 0 to 65,535. There are pulse-width-modulated outputs as well as high-speed outputs.
The following is a list of some of the sensors used in automation:
- Inertia measurement units: This is a unit that includes a set of accelerometers and gyroscopes
- Temperature and humidity sensors: These compensate for errors due to thermal expansion
- Angle sensors (encoders): These calculate the exact positions of arms and end effectors
- Load cells: These avoid system malfunctions and breakdowns
- Vision systems: These are used for identifying objects, especially for pick-and-place operations
The following are examples of basic actuators:
- Stepper motors: These are used for high accuracy
- Servo motors: These are used for better control of the overall system
- Pneumatic and hydraulic actuators: These are usually used for higher load capacity
Drives and motors
There are very few machines that do not have moving parts and that do not need drives or motors. Thus, most machines have some form of motion components. There are servos, steppers, variable frequency drives, and motors connected to them for controlling moving parts.
Depending on the precision needed, the machine builder will choose between a stepper, variable frequency, or servo drive. Indeed, the cost implications also change based on the choice of drive and motor.
Robots, too, are controlled by drives and motors. A six-axis robot has six motors and associated drives; a Selective Compliance Articulated Robot Arm (SCARA) robot (a type of industrial robot) or a delta robot has three motors and associated drives.
All motion components are controlled by the PLC in various forms. There are different ways to control these motion components, and we will take a detailed look at them in Chapter 5, Motion Control – Control, Synchronization, and the Interpolation of Axes for Accuracy and Precision.
Programming software and tools
Beyond the hardware components such as I/Os, PLCs, drives, and motors that we have examined till now, there is an important component—software. Software permeates all components of automation. As much as it is a physical presence, the software also determines the function of the parts.
PLC is the brain of the system, but what powers it is the software. A PLC without software is like a car without an engine. PLC is merely a hardware component, and the same piece of hardware is used in different applications. What differentiates the PLC is the software. If for any reason the PLC fails, the hardware can be replaced, and the machine can be brought back to life by simply exchanging the software. This is exactly like when you change your phone; with a few clicks, all data can be brought back to your phone.
As we can see, the software defines the way a system performs and works. Thus, software is becoming an increasingly essential element in machine and factory automation.
A piece of software can be primarily classified as system software, application software, and libraries.
Let us now look at system software. System software means the operating system and libraries. Like with every CPU, to address the CPU directly from user code is very dangerous. This is because usually in programming there are variables that are either entered by the user or holding intermediary calculations. However, there is also a possibility to reference the storage space where the variable is stored. With this, we directly use variables to work with or address the CPU from a user code. If such codes are wrongly implemented, there are chances that the CPU will shut off and go into an unknown state. CPUs have functions and code that differ from version to version, revision to revision. The operating system provides uniform access to the CPU. For industrial automation purposes, we need to react to events in real time; hence, we need a real-time operating system (RTOS). System libraries are common functions that are used in every application. The manufacturer generally provides these functions along with the operating system.
Application software is the area to which the automation engineer/programmer devotes the most time and attention. This software is user-specific, and it provides the functionality that the machine builder/machine user actually needs. With the same controller, machines can be made to perform very different functions using different application software. All algorithms that are used for different control purposes are implemented in the application software.
Algorithms and products
Automation is mainly always experienced by automation engineers in terms of algorithms and products. The operating system and other libraries are only of concern to the more experienced programmer. The developer’s view of the actual functionality focuses on the logic and algorithms that produce a good product. The definition of a good product (end product), and what features the product must have, is defined by the manufacturer of it, who we will call the end user (from the machine builder’s, automation vendor’s and programmer’s perspective). The end user is usually a manufacturing plant or factory.
From this point of view, automation is viewed by what it actually delivers. It is understood by the functionality. It may be controlling temperature, tension control, or the control of the position of a machining tool tip.
Indeed, the rest of our discussion throughout this book will be about products, which algorithms are used in the manufacture of these products, and how there are surprising commonalities in the algorithms used in manufacturing very different products. At the same time, there are startling differences in algorithms of similar parameters, depending on the way the mechanics are constructed.
Jacob is taken aback after getting a glimpse of so many aspects he had no clue about and is captivated throughout the conversation. Jacob now has so much more information than he had before. He wonders how, if this information had been available to him before his internship, life might have been a little easier. After this conversation, he now understands how a product gets made, what the role of a factory is, and how machines are deployed in factories to enable production. He also now has a clearer view of various automation elements and how the puzzle fits together and can see the complete picture. However, this is merely an overview, and there are so many aspects and finer details that need to be covered.
This chapter shed light on how we, as human beings, are surrounded by automation while performing all our daily rituals and activities. Moreover, you are now also able to understand the changing manufacturing landscape, how it continues to evolve, and how consumer demands and needs are fueling this change. You were introduced to the elements of a factory, a line, and a machine. Finally, you were taken into the world of automation and introduced to various essential elements, such as hardware and software, comprising PLCs, I/Os, drives, motors, and libraries.
Jacob had a million questions at the start of the conversation, and even after the engaging discussion, he still has millions more. I am sure you, like our young and enthusiastic Jacob, have similar questions in your mind at this point of the book and are looking forward to reading what the father will further expose about the field of automation and manufacturing.
With an understanding of the basics of automation, factories, lines, and machines, we are all set to open a new chapter and look forward to learning so many new and interesting topics.
In the next chapter, we will dwell on specific and interesting control challenges and explain how the manufacturing of everyday products actually overcomes so many control challenges. The first control challenge we take up is in Chapter 2, The Art of Temperature Control.