Programmable Logic Controllers (PLCs)

Progammable Logic Controllers (PLCs)

Tools predate the stone age where sticks and rocks held by hand assist prehistoric humans in everyday tasks. These later evolved to wheels, levers, and pulleys. Although clocks and other mechanisms were the beginning of automation or the process of controlling a devise by using another system it wasn’t until electricity that automation rapidly takes off. Not that it was invented, electricity has been around forever, but it isn’t until the 1800’s that electricity began to be understood and harnessed providing for everyday needs such as lighting, communication and operating motors. So begins the industrial revolution where a number of devises can control or be controlled by others. The invention of vacuum tubes leads to development of much smaller semiconductor diodes and transistors replacing mechanical relays and begins the electronic revolution.

For industrial applications PLCs imitate relays. Relays are a mechanical device where an electric magnet is used to operate mechanical switches such as a light switch turning it on or off. Three and four way light switches make electrical contact in one position and open in the other and so with relays. These tiny integrated semiconductor chips are referred to as flip-flops in the computer world. Small ice cube relays generally include two three way switches. PLCs do not use mechanical switches but simulate them using computer programs.

Programmable Logic Controllers usually consist of four components: power supply, central processing unit (CPU), input/output modules, and a rack connecting them all together. The power supply converts conventional 120 volts to either 12 or 24 volts direct current more than adequate and safe to operate miniature components in the PLC but it is necessary to hook the output module to external mechanical relays capable of operating lights, solenoids and motors requiring much more current and voltage.

Some advantages of PLCs are they use less power to operate, their computer generated actuators can control more switching capabilities than two provided by most mechanical relays, switching can be changed from normally open or closed by programming instead of rewiring, and can be done in a lot less physical space. They also have the capability of being controlled by discrete or analog inputs. Discrete inputs are either on or off such as a light switches. Analog inputs measure the values of sensors such as temperature, flow and pressure and can be programmed to control the output at designated values. An example of this is cruise control on an automobile. The throttle is wide open until the car reaches a certain speed but when it does less gas is injected keeping its velocity where the operator desires. This closed loop is called negative feedback where the input is controlled by the output.

There are many types of programmable logic controllers offered by several manufacturers. Unless they are preprogrammed keep in mind that they are compatible with software available for the laptop being used.  The American National Standards Institute (ANSI) in the United States attempts to standardize manufacturers to regulations more straightforwardly understood by all users. However, they comply with the International Electrotechnical Commission headquartered in Geneva, Switzerland. IEC 61131-3 deals with PLC programs and acknowledges two textual languages and two graphical languages.

The two textural languages are Instruction List (IL) and Structural Text (ST). Structured Text is a complex language block structured for industrial control similar to C or PASCAL programming. Instruction List is less complicated similar to Assembly programming. Assembly language is understood by humans compared to Machine Language compatible with machines. As their names imply, they are a list of instructions written in computer code.

The two graphical languages are Ladder Diagrams and Functional Block Diagrams. It all starts with the Functional Block Diagram similar to Sequential Function Charts used by System Engineers and Software developers and similar to flow charts. Input variables are illustrated in boxes interconnected with arrows to operational parameters also shown in block diagrams. How it is all interconnected by graphical arrows determines different results. An algorithm can now be developed to decide on the best path to achieve the objective.

Ladder Diagrams are very similar to electrical schematic diagrams used for mechanical relays and are often used because they are more familiar to what electricians are used to. Instead of using normally open or closed relay contactors these computer programs depict make or break symbols although they operate much the same as contactors. Depending on how they are interconnected creates the integrated logic gates: NOT (open or closed switch with one input), AND (NO open contactors in series), OR (NO contactors in parallel), and XOR (a combination of both). The opposite being NAND, NOR and XNOR where normally closed relay contactors or computer generated break symbols are used. They can be visualized by using Truth Tables. The end result energizes an external relay coil (or not) to operate lights, motors, etc. depending on whether normally open or closed contactors in the output relay are physically wired allowing electrical current to apparatuses to achieve desired results. Depending on the inputs it might be desirable for some motors to run and others not, vice versa, or a combination of both. When dealing with water tanks for example the pump filling it depends on low level and pressure while the pump emptying it might operate when the tank is full or exceeds pressure and sensors on the system being fed calls for it.

In addition to a port on the central processing unit where a USB cable from a laptop with appropriate software can be plugged in many PLCs are compatible with HMIs (Human Machine Interface). These are generally small touch computer screens with a diagram showing the system to be monitored and controlled. They show tanks, wells and so on as well as schematic configurations of sensors, actuators, pumps motors, etc. with real-time values or whether they are running or not. Although they cannot change logic in PLCs, HMIs easily allow interaction between human operators and machines. Not only do they show data from sensors such as temperature, pressure, flow rate and levels but their values can be adjusted by operators controlling actuators and motors.

Remote Terminal Units (RTUs) can also be compatible with PLCs. They are microprocessors that transmit digital and analog data and interface similar to HMIs but by radio to a distributed control system or SCADA network using protocols such as Modbus and Ethernet/IP. Advanced technology allows this to be done using cell phones provided they have the appropriate application and access codes. SCADA is a control and acquisition system accessed worldwide. Although SCADA is convenient because operators need not be physically on site, it makes the system vulnerable to competitors wishing to disrupt it or demand ransomware.

Eberling@www.thndrsns.com

Posted in Electrical Construction.