Industrial Motors -- Programmable Logic Controllers (PLC)

Home | Articles | Forum | Glossary | Books

AMAZON multi-meters discounts AMAZON oscilloscope discounts

GOALS:

  • List the principal part of a programmable logic controller.
  • Describe differences between programmable logic controllers and other types of computers.
  • Discuss differences between the I/O Rack, CPU, and program loader.
  • Draw a diagram of how the input and output modules work.

Programmable logic controllers (PLCs) were first used by the automotive industry in the late 1960s. Each time a change was made in the design of an automobile, it was necessary to change the control system operating the machinery. This consisted of physically rewiring the control system to make it perform the new operation.

Rewiring the system was, of course, very time consuming and expensive. What the industry needed was a control system that could be changed without the extensive rewiring required to change relay control systems.

Differences Between PLCs and PCs

One of the first questions generally asked is, "Is a programmable logic controller a computer?" The answer to that question is "yes." The PLC is a special type of computer designed to perform a special function.

Although the programmable logic controller (PLC) and the personal computer (PC) are both computers, there are some significant differences. Both generally em ploy the same basic type of computer and memory chips to perform the tasks for which they are intended, but the PLC must operate in an industrial environment.

Any computer that is intended for industrial use must be able to withstand extremes of temperature; ignore voltage spikes and drops on the power line; survive in an atmosphere that often contains corrosive vapors, oil, and dirt; and withstand shock and vibration.

Programmable logic controllers are designed to be programmed with schematic or ladder diagrams in stead of common computer languages. An electrician that is familiar with ladder logic diagrams can generally learn to program a PLC in a few hours as opposed to the time required to train a person how to write programs for a standard computer.


--- A central processing unit by Allen-Bradley, a Rockwell International Company.


--- Plug connections located on the CPU. (Siemens Energy and Automation, Inc.)

Basic Components


above: PLC modules (dark gray blocks near top) are well-protected inside a small, environmentally-sealed cabinet. There is a control-panel on the outside, mounted on the door.

Programmable logic controllers can be divided into four primary parts:

A. The power supply.

B. The central processing unit (CPU).

C. The programming terminal or program loader.

D. The I/O (pronounced eye-oh) Rack.

The Power Supply

GE-Fanuc IC693PWR321R, $85.00 -- 90-30 Series, PLC Power Supply Module, 120/240 VAC In, 24V DC Out.
above: GE-Fanuc IC693PWR321R, 90-30 Series, PLC Power Supply Module, 120/240 VAC In, 24V DC Out. $85.00.

The function of the power supply is to lower the in coming AC voltage to the desired level, rectify it to direct current, and then filter and regulate it. The internal logic of a PLC generally operates on 5 to 24 volts DC, depending on the type of controller. This voltage must be free of voltage spikes and other electrical noise and be regulated to within 5% of the required voltage value.

The switch power supply, in compact size, light weight (250G) and high efficiency-- voltage and current can be matched, has current protection and provides with UPS support, soft start and remote control functions. It is widely used in computers, terminal equipments, communication equipment and almost all the electronic equipments.
above: A PLC power supply from China. Most modern PSUs use switching-mode technology.

Some manufacturers of PLCs build a separate power supply and others build the power supply into the central processing unit.

The CPU

The CPU, or central processing unit, is the "brains" of the programmable logic controller. It contains the microprocessor chip and related integrated circuits to perform all the logic functions. The microprocessor chip used in most PLCs is the same as that found in most home and business personal computers.


above: A PLC CPU by Siemens: S7-313C-2 DP PLC CPU Base Unit

The CPU often has a key located on the front panel. This switch must be turned on before the CPU can be programmed. This is done to prevent the circuit from being changed or deleted accidentally.

Other manufacturers use a software switch to protect the circuit. A software switch is not a physical switch.

It’s a command that must be entered before the pro gram can be changed or deleted. Whether a physical switch or a software switch is used, they both perform the same function. They prevent a program from being accidentally changed or deleted.

Plug connections on the CPU provide connection for the programming terminal and I/O Racks. CPUs are designed so that once a program has been developed and tested, it can be stored on some type of medium such as tape, disc, CD, or other storage device. In this way, if a CPU fails and has to be re placed, the program can be downloaded from the storage medium. This eliminates the time consuming process of having to reprogram the unit by hand.


--- Hand held programming terminal and small programmable logic controller. (Cutler Hammer, Eaton Corp.)


--- A notebook computer is often used as the programming terminal for a PLC. (Dell Computers.)


---- Analyzing circuit operation with a terminal.


--- Programming terminal. (Allen-Bradley, a Rockwell International Company.)

The Programming Terminal

The programming terminal, or loading terminal, is used to program the CPU. The type of terminal used depends on the manufacturer and often the preference of the consumer. Some are small handheld devices that use a liquid crystal display or light-emitting diodes to show the program. Some of these small units will display one line of the program at a time and others require the program to be entered in a language called Boolean.

Another type of programming terminal contains a display and keyboard. This type of terminal generally displays several lines of the program at a time and can be used to observe the operation of the circuit as it’s operating.

Many industries prefer to use a notebook or laptop computer for programming. An interface that permits the computer to be connected to the input of the PLC and software program is generally available from the manufacturer of the PLC. The terminal is not only used to program the PLC but is also used to troubleshoot the circuit. When the terminal is connected to the CPU, the circuit can be examined while it’s in operation. --- a circuit typical of those that are seen on the display. Notice that this schematic diagram is different from the typical ladder diagram. All of the line components are shown as normally open or normally closed contacts.

There are no NEMA symbols for push button, float switch, limit switches, etc. The PLC recognizes only open or closed contacts. It does not know if a contact is connected to a push button, a limit switch, or a float switch. Each contact, however, does have a number. The number is used to distinguish one contact from another.

In this example, coil symbols look like a set of parentheses instead of a circle as shown on most ladder diagrams. Each line ends with a coil and each coil has a number. When a contact symbol has the same number as a coil, it means that the contact is controlled by that coil. The schematic shows a coil numbered 257 and two contacts numbered 257. When coil 257 is energized, the PLC interprets both contacts 257 to be closed.

A characteristic of interpreting a diagram while viewing it on the screen of most loading terminals is that when a current path exists through a contact, or if a coil is energized, it will be highlighted on the display. In the example shown, coil 257, both 257 contacts, contact 16, and contact 18 are drawn with dark heavy lines, illustrating that they are highlighted or illuminated on the display. Highlighting a contact does not means that it has changed from its original state. It means that there is a complete circuit through that contact. Contact 16 is highlighted, indicating that coil 16 has energized and contact 16 is closed and providing a complete circuit. Contact 18, however, is shown as normally closed. Since it’s highlighted, coil 18 has not been energized, because a current path still exists through contact 18. Coil 257 is shown highlighted, indicating that it’s energized. Since coil 257 is energized, both 257 contacts are now closed, providing a current path through them.

When the loading terminal is used to load a pro gram into the PLC, contact and coil symbols on the keyboard are used (). Other keys permit specific types of relays such as timers, counters, or retentive relays to be programmed into the logic of the circuit. Some keys permit parallel paths, generally referred to as down rungs, to be started and ended. The method employed to program a PLC is specific to the make and model of the controller. It’s generally necessary to consult the manufacturer's literature if you are not familiar with the specific PLC.


--- Symbols are used to program the PLC.


--- I/O Rack with input and output modules. (Schneider Automation.)


--- I/O Rack with input and output modules. (Allen-Bradley Co., Systems Division.)


--- Central processor with I/O Racks. (General Electric.)


--- Input Circuit.

The I /O Rack

The I/O Rack is used to connect the CPU to the out side world. It contains input modules that carry information from control sensor devices to the CPU and output modules that carry instructions from the CPU to output devices in the field. I/O Racks are shown. Input and output modules contain more than one input or output. Any number from4 to 32 is common, depending on the manufacturer and model of the PLC. The modules shown can each handle sixteen connections. I.e., each input module can handle 16 different input devices such as push buttons, limit switches, proximity switches, float switches, and so on. The output modules can each handle 16 external devices such as pilot lights, solenoid coils, or relay coils. The operating voltage can be either alternating or direct current, depending on the manufacturer and model of controller, and is generally either 120 or 240 volts. The I/O Rack shown can handle 10modules. Since each module can handle 16 input or output devices, the I/O Rack is capable of handling 160 input and output devices. Many PLCs are capable of handling multiple I/O Racks.

I / O Capacity

One factor that determines the size and cost of a PLC is its I/O capacity. Many small units may be intended to handle as few as 16 input and output devices.

Large PLCs can generally handle several hundred. The number of input and output devices the controller must handle also affects the processor speed and amount of memory the CPU must have. A CPU with I/O Racks is shown.


--- Input Circuit.


--- Four-input module.

The Input Module

The central processing unit of a programmable logic controller is extremely sensitive to voltage spikes and electrical noise. For this reason, the input I/O uses opto-isolation to electrically separate the incoming signal from the CPU. --- shows a typical circuit used for the input. A metal-oxide-varistor (MOV) is connected across the AC input to help eliminate any voltage spikes that may occur on the line. The MOV is a voltage sensitive resistor. As long as the voltage across its terminals remains below a certain level, it exhibits a very high resistance. If the voltage should be come too high, the resistance changes almost instantly to a very low value. A bridge rectifier changes the AC voltage into DC. A resistor is used to limit current to an LED. When power is applied to the circuit, the LED turns on. The light is detected by a phototransistor, which signals the CPU that there is a voltage present at the input terminal.

When the module has more than one input, the bridge rectifiers are connected together on one side to form a common terminal. On the other side, the rectifiers are labeled 1, 2, 3, and 4. ---1 shows four bridge rectifiers connected together to form a common terminal. --- shows a limit switch connected to input 1, a temperature switch connected to input 2, a float switch connected to input 3, and a normally open push button connected to input 4. Notice that the pilot devices complete a circuit to the bridge rectifiers. If any switch closes, 120 volts AC will be connected to a bridge rectifier, causing the corresponding LED to turn on and signal the CPU that the input has voltage applied to it. When voltage is applied to an input, the CPU considers that input to be at a high level.

The Output Module

The output module is used to connect the CPU to the load. Output modules provide line isolation between the CPU and the external circuit. Isolation is generally provided in one of two ways. The most popular is with optical isolation, very similar to the input modules. In this case, the CPU controls an LED. The LED is used to signal a solid-state device to connect the load to the line. If the load is operated by direct current, a power phototransistor is used to connect the load to the line (). If the load is an alternating current device, a triac is used to connect the load to the line. Notice that the CPU is separated from the external circuit by a light beam. No voltage spikes or electrical noise can be transmitted to the CPU.

The second method of controlling the output is with small relays. The CPU controls the relay coil. The contacts connect the load to the line.

The advantage of this type of output module is that it’s not sensitive to whether the voltage is AC or DC and can control 120 or 240 volt circuits. The disadvantage is that it does contain moving parts that can wear. In this instance, the CPU is isolated from the external circuit by a magnetic field instead of a light beam.

If the module contains more than one output, one terminal of each output device are connected together to form a common terminal similar to a module with multiple inputs (). Notice that one side of each triac has been connected together to form a common point. The other side of each triac is labeled 1, 2, 3, or 4. If power transistors are used as output devices, the collectors or emitters of each transistor would be connected to form a common terminal. --- shows a relay coil connected to the output of a triac. Notice that the triac is used as a switch to connect the load to the line. The power to operate the load must be provided by an external source. Output modules don’t provide power to operate external loads.

The amount of current an output can control is limited. The current rating of most outputs can range from 0.5 to about 3 amperes, depending on the manufacturer and type of output. Outputs are intended to control loads that draw a small amount of current, such as solenoid coils, pilot lights, and relay coils. Some outputs can control motor starter coils directly and others re quire an interposing relay. Interposing relays are employed when the current draw of the load is above the current rating of the output. Interposing relays are also employed when the PLC controls starters in a motor control center. This prevents two different power sources from being present inside an MCC module.

Two power sources inside a control module could pre sent a safety hazard.


--- Pilot devices connected to input modules.

Internal Relays

The actual logic of the control circuit is performed by internal relays. An internal relay is an imaginary device that exists only in the logic of the computer. It can have any number of contacts-from one to several hundred-and the contacts can be programmed normally open or normally closed. Internal relays are programmed into the logic of the PLC by assigning them a certain number. Manufacturers provide a chart that lists which numbers can be used to program inputs and outputs, internal relay coils, timers, counters, and so on.

When a coil is entered at the end of a line of logic and is given a number that corresponds to an internal relay, it will act like a physical relay. Any contacts given the same number as that relay will be controlled by that relay.


--- A power phototransistor connects a DC load to the line.


--- A triac connects an AC load to the line.


--- A relay connects the load to the line.


--- Multiple output module.

Timers and Counters

Timers and counters are internal relays, also. There is no physical timer or counter in the PLC. They must be programmed into the logic in the same manner as any other internal relay, by assigning them a number that corresponds to the timer or counter. The difference is that the time delay or number of counts must be programmed when they are inserted into the program. The number of counts for a counter is entered using numbers on the keys on the load terminal. Timers are generally programmed in 0.1 second intervals. Some manufacturers provide a decimal key and others do not. If a decimal key is not provided, the time delay is entered as 0.1 second intervals. If a delay of 10 seconds is de sired, e.g., the number 100 would be entered, because 100 tenths of a second equals 10 seconds.


--- An interposing relay is used to operate the starter in a motor control center module.


--- Off-delay timer circuit.

Off-Delay Circuit

Some PLCs permit a timer to be programmed as on or off delay, but others permit only on-delay timers to be programmed. When a PLC permits only on-delay timers to be programmed, a simple circuit can be used to permit an on-delay timer to perform the function of an off-delay timer. To understand the action of the circuit, recall the operation of an off-delay timer. When the timer coil is energized, the timed contacts change position immediately. When the coil is de energized, the contacts remain in their energized state for some period of time before returning to their normal state. In the circuit it’s assumed that contact 400 controls the action of the timer. Coil 400 is an internal relay coil located somewhere in the circuit.

Coil 12 is an output and controls some external device.

CoilTO-1 is an on-delay timer set for 100 tenths of a second. When coil 400 is energized, both 400 contacts change position. The normally open 400 contact closes and provides a current path to coil 12. The normally closed 400 contact opens and prevents a circuit from being completed to coilTO-1when coil 12 energizes. Note that coil 12 turns on immediately when contact 400 closes. When coil 400 is de-energized, both 400 contacts return to their normal position. A current path is maintained to coil 12 by the now closed 12 contact in parallel with the normally open 400 contact. When the normally closed 400 contact returns to its normal position, a current path is established to coil TO-1 thorough the now closed 12 contact. This starts the time sequence of timer TO-1. After a delay of 10 seconds, the normally closed TO-1 contact opens and de-energizes coil 12, returning the two 12 contacts to their normal position. The circuit is now back in the state. Note the action of the circuit. When coil 400 is energized, output coil 12 turns on immediately. When coil 400 is de energized, output 12 remains on for 10 seconds before turning off.

The number of internal relays and timers contained in a PLC is determined by the memory capacity of the computer. As a general rule, PLCs that have a large I/O capacity will have a large amount of memory. The use of PLCs has steadily increased since their invention in the late 1960s. A PLC can replace hundreds of relays and occupy only a fraction of space. The circuit logic can be changed easily and quickly without requiring extensive hand rewiring. They have no moving parts or contacts to wear out, and their down time is less than an equivalent relay circuit. When replacement is necessary, they can be reprogrammed from a media storage device.

The programming methods presented in this text are general, because it’s impossible to include examples of each specific manufacturer. The concepts presented in this section, however, are common to all programmable controllers. A PLC used to control a DC drive is shown.


--- DC drive unit controlled by a programmable logic controller. (Reliance Electric.)

QUIZ:

1. What industry first started using PLCs?

2. Name two differences between PLCs and common home or business computers.

3. Name the four basic sections of a PLC.

4. In what section of the PLC is the actual logic performed?

5. What device is used to program a PLC?

6. What device separates the CPU from the outside world?

7. What is opto-isolation?

8. If an output I/O controls a DC voltage, what solid-state device is used to connect the load to the line?

9. If an output I/O controls an AC voltage, what solid-state device is used to connect the load to the line?

10. What is an internal relay?

11. What is the purpose of the key switch located on the front of the CPU in many PLCs?

12. What is a software switch?

Links:

plcdev.com---how_plcs_work

Features of the Programmable Controller

Top of Page

PREV: Start-Stop Push-Button Control | NEXT: Programming a PLC Guide Index | HOME