PlC Introduction
PlC Introduction
Another advantage of a PLC system is that it is modular. That is, you can mix and
match the types of Input and Output devices to best suit your application.
Suppliers
Well known PLC brands include -- Siemens, Allen-Bradley, IDEC, ABB, Mitsubishi,
Omron, Honeywell, Schneider Electric, Rockwell Automation, and General Electric
1
Innovians Technologies Introduction to PLC
History of PLC’s
• The Central Processing Unit, the CPU, contains an internal program that tells
the PLC how to perform the following functions:
• Execute the Control Instructions contained in the User's Programs. This
program is stored in "nonvolatile" memory, meaning that the program will
not be lost if power is removed
• Communicate with other devices, which can include I/O Devices,
Programming Devices, Networks, and even other PLC’s.
• Perform Housekeeping activities such as Communications, Internal
Diagnostics, etc.
2
Innovians Technologies Introduction to PLC
The CPU is the brain of a PLC system. It consists of the microprocessor, memory
integrated circuits, and circuits necessary to store and retrieve information from
memory. It also includes communications ports to other peripherals, other PLC's
or programming terminals. Today's processors vary widely in their capabilities to
control real world devices. Some control as few as 6 inputs and outputs (I/O) and
others 40,000 or more. One processor can control more than one process or
manufacturing line. Processors are often linked together in order to provided
continuity throughout the process. The number of inputs and outputs PLC’s can
control are limited by the overall capacity of the PLC system hardware and
memory capabilities. The job of the processor is to monitor status or state of input
devices, scan and solve the logic of a user program, and control on or off state of
output devices.
RAM or Random Access Memory is a volatile memory that would lose it's
information if power were removed. This is why some processor units incorporate
a battery back up. The type of RAM normally used is CMOS or Complementary
Metal Oxide Semiconductor. CMOS RAM is used for storage of the user's program
(ladder logic diagrams) and storage memory.
ROM or Read Only Memory is a non-volatile type of memory. This means you
don't need an external power source to keep information. In this type of memory,
information can be read, but not changed. For this reason the manufacture
sometimes calls this firmware. It is placed there for the internal use and operation
of processor units.
Input Module
There are many types of input modules to choose from. The type of input module
used is dependent upon what real world input to the PLC is desired. Some
examples of inputs are limit switches, electric eyes, and pushbuttons. DC inputs,
such as thumbwheel switches, can be used to enter integer values to be
manipulated by the PLC. DC input cards are used for this application. Since most
industrial power systems are inherently noisy, electrical isolation is provided
between the input and the processor. Electromagnetic interference (EMI) and
Radio Frequency Interference (RFI) can cause severe problems in most solid state
control systems. The component used most often to provide electrical isolation
within I/O cards is called an optical
3
Innovians Technologies Introduction to PLC
isolator or opto coupler. The wiring of an input is not complex. The object is to get
a voltage at a particular point on the card. Typically there are 8 to 32 input points
on any one input module. Each point will be assigned a unique address by the
processor. Analog input modules are special input cards that use analog to digital
conversion (A to D) to sense variables such as temperature, speed, pressure, and
position. The external device normally is connected to a controller (transducer)
producing an electrical signal the analog input card can interpret. This signal is
usually 4 to 20 Ma or a 0 to 10 volt signal.
Output Module
Output modules can be for used for ac or dc devices such as solenoids, relays,
contractors, pilot lamps, and LED readouts. Output cards usually have from 6 to
32 output points on a single module. The output device within the card provides
the Connection from the user power supply to the load. Usually silicon controlled
rectifiers (SCR), triac, or dry contact relays are use for this purpose. Individual
outputs are rated most often at 2 to 3 amperes. Output cards, like input cards have
electrical isolation between the load being connected and the PLC. Analog output
cards are a special type of output modules that use digital to analog conversion
(D to A). The analog output module can take a value stored in a 12 bit file and
convert it to an analog signal. Normally this signal is 0 -10 volts dc or 4 to 20 Ma.
This analog signal is often used in equipment such as motor operated valves and
pneumatic position control devices.
Operation of PLC
A PLC operates by continually scanning the program and acting upon the
instructions, one at a time, to switch on or off the various outputs. In order to do
this the PLC first "looks" at all the inputs and remembers their states (i.e. "1" or
"0" / on or off) this information is then stored in memory. The PLC then scans the
program instructions and decides if an output should be on or off and this is
important to remember, the physical output is NOT turned on immediately. When
the PLC has finished scanning the programmed instructions it will, finally, turn on
the required outputs. This is called updating the process output image.
At this point the PLC then checks its own operating system and if everything is ok
it then goes and checks the states of the inputs and starts all over again.
This is program scanning and the delay is called the program scan time.
4
Innovians Technologies Introduction to PLC
From the above statement it should be seen that there is a delay from when an
input is turned on; the program scanned and then a physical output being turned
on or off. As the delay is only mS it is not usually a problem unless you are using
the PLC in a high speed process. However it should be remembered that in a PLC
with many thousand I/O an input could turn on and then off before the PLC has
finished scanning the programmed instructions.
This could result in an output coming on for one or two scans when in fact it
should be off.
COMMUNICATIONS
There are several methods to communicate between a PLC and a programmer or
even between two PLC’s.
This direct link method of communication can be as simple as, if an output on the
first PLC is on then the corresponding input on the second PLC will be on and
then this input is used within the program on the second PLC.
If a word of input/outputs (16 bits) are used then numerical data can be transferred
from one PLC to the other (refer back to the section on numbering systems).
There are many other methods of communication between PLC’s and also from
PLC to PC. Please refer to the manuals supplied with the PLC that you are using
for full details on communications.
5
Innovians Technologies Introduction to PLC
• While Ladder Logic is the most commonly used PLC programming language,
it is not the only one. The following table lists of some of languages that
are used to program a PLC.
• Ladder Diagram (LD) Traditional ladder logic is graphical programming
language. Initially programmed with simple contacts that simulated the
opening and closing of relays, Ladder Logic programming has been
expanded to include such functions as counters, timers, shift registers,
and math operations.
Function Block Diagram (FBD) - A graphical language for depicting signal and
data flows through re-usable function blocks. FBD is very useful for expressing the
interconnection of control system algorithms and logic.
6
Innovians Technologies Introduction to PLC
Structured Text (ST)– A high level text language that encourages structured
programming. It has a language structure (syntax) that strongly resembles
PASCAL and supports a wide range of standard functions and operators. For
example;
Instruction List (IL): A low level “assembler like” language that is based on similar
instructions list languages found in a wide range of today’s PLC’s.
LD R1
MPC RESET
LD PRESS_1
ST MAX_PRESS
RESET: LD 0
ST A_X43
7
Innovians Technologies Introduction to PLC
INPUTS OUTPUTS
– Switches and Pushbuttons – Valves
– Sensing Devices – Motor Starters
– Solenoids
• Limit Switches – Actuators
• Photoelectric Sensors
• Proximity Sensors – Horns and Alarms
– Stack lights
– Control Relays
– Condition Sensors
– Counter / Totalizer
– Encoders
– Pumps
– Printers
• Pressure Switches
– Fans
• Level Switches
• Temperature Switches
• Vacuum Switches
• Float Switches
In case of PLC, before any output devices can be turned ON or OFF, the processor
has to scan the entire program that is in user memory. The program may be only
of a few rungs or it may be hundreds of pages in length, depending on the
equipment that is being controlled. It consists of three steps:-
Input Scan:- In input scan, the states of the inputs are scanned and input status
table is updated accordingly.
Program Scan:- In this scan, data in input table is applied to user created
program, program is executed and output table is updated accordingly. Output
Scan:- In this scan, the states of Outputs are generated as per the data associated
with output status table.
8
Innovians Technologies Introduction to PLC
In PLC, isolation is provided using optocoupler in its internal circuit that’s why it
is also known as optical isolation. Optical isolation means that there is no real
electrical connection between the input device and the processor. This eliminates
any possibility of the unwanted (high surge or malfunctioned) input line voltage
from coming in contact with and damaging the low voltage DC section of the
processor.
9
Innovians Technologies Introduction to PLC
10
Innovians Technologies Introduction to PLC
The wiring connection examples of Sink type Input and Sink type Output are
shown below:-
11
Innovians Technologies Introduction to PLC
The wiring connection example of Source type Input and Source type Output is
shown below:-
12
Innovians Technologies Introduction to PLC
Push Button
Input1
PLC
+24V DC
Push Button
Input1
PLC
+24V DC
13