Automation and PLC LAB File
Automation and PLC LAB File
PRACTICAL FILE
SESSION: 2020-21
EXPERIMENT :01
Introduction
In any process plant, the purpose of automation to maintain the product quality,
consistency, reduce start-up time, and increase speed of operation with human safety.
Control system whether it is a Programmable Logic Controller (PLC) or a Distributed Control
System (DCS) is required for the same purpose. The purpose of Industrial automation
laboratory is to understand the theory and programming aspects of DCS.
Definition
Evolution of DCS
The control systems were developed along with the technology and as the difficulties faced
by each technology were realized.
In this technology, digital computers were applied for acquisition and processing of plant
data/laboratory data or test field data. At this time operator had to read this data and store
them, which was an offline process for acquisition and processing of data. No optimization
and feedback control.
2. Closed Loop : offline
In this technology, set point values were calculated by computer but still manually set by
plant operator. Thus offline closed loop control was formed. This was only acceptable when
timing condition of process control is not severe as manual intervention leads to
introduction of time delay in the control of the process.
3. Open Loop : online
In this era of 50’s computers were provided for process interface for data acquisition and
process control, by connecting inputs directly to the computer. But still used as open loop
control.
4. Closed Loop : online
At the end of 50’s era output elements were also connected to the computers for online
process monitoring and control. Thus data transfer in both the directions was the first step
towards online closed loop control.
In the first half of 60’s computers were used for dedicated functions i.e. their functions were
clearly defined like data processing, data acquisition etc. with no interconnection between
them. Data inter-exchange was only possible via a transportable medium.
6. Centralized Dedicated Computers
The information inter-exchange which was not possible in the distributed dedicated
computer control was possible by introducing another central computer in which data from
all the dedicated computers is collected, which can be shared later on. This led to the
information exchange but with computational speed and reliability of computer at stake.
In the beginning of the 70’s it was accepted that the central computer will solve central
automation problem only and peripheral computers have to solve local problems in their
close surrounding. A two stage hierarchical automation system structure called
Decentralized Computer System was introduced because of this .
Architecture and Block Diagram
Functionally Decentralized or Distributed Control System is divided into four different levels
as follows performing the functions as described below:
As the name suggests this level comprises of the basic field instruments like sensors,
transmitters etc. which are directly connected to the process.
1. Hardware Flow
In any process the sensory organs of a process are sensors and /or transmitters through
which the status of the process is known. The flow of signal passes from sensors/
transmitters to a local field junction box where number of wires comes. From field junction
box through a multi core cable it goes to the main junction box. Again from main junction
box it comes to a marshalling cabinet where the wires enter into the control panel. In the
control panel, controller and I/O cards are placed. After signal entering the panel, the signal
wire with or without a relay card goes into the input card connected to the controller.
Controller thereby processes the data according to the logic created and gives output to the
Final Control Element through output cards, following the same route.
2. Software
There is a scan cycle which needs to be completed for the execution of an instruction
needed to control the process. The scan period is set by the user while configuring DCS and
the following steps occur for each scan period:
• Firstly the status of inputs from the process through the input cards are checked.
• Then the values are updated in the program and according to the logic prepared by the
programmer output values are decided.
• These outputs then go to the field through output cards.
• Moreover the status is updated in the SCADA as well as the changes are stored for future
reference in the historian. Any alarms i.e. deviations in the process are there, then they are
also noted and stored.
Functions of DCS
Internals of DCS
• Controller
• Power supply for controller
• I/O Terminal Block
• DIN Rail
• I/O Interface Carrier
• Bulk Power Supply
• System Power Supply
• Server
• Professional Stations
• Operator Stations
• Application Stations
• Remote Workstations
• Relays
• To view and control the process using mimic, same as the real process (SCADA).
• Programming environment wherein logic can be created.
• A hierarchical view of the whole system
• Advance Control Strategy Schemes
• Configuration Suite to configure the hardware attached.
• Diagnostic Suite
• Alarm Module
• History Module
• Trends Module
• Database management module
Advantages
• System implementation can be carried out in a modular fashion due to which system
growth can be easily achieved as each processor has clearly defined set of functions; if
carefully designed.
• System overloading is less in case of DCS.
• In case of failure of a part, DCS doesn't affect the whole system/ process.
• Backup i.e. redundancy feature possible in DCS.
• Reliability of DCS is more than that of Centralized Control.
• Reduction of cost of interfacing to computer due to reduction in wire usage for control
purpose.
• DCS is more flexible in terms of altering configurations within a specified range so as to
confrm to the change requirements if any.
• Duplicate storage of critical data can be done easily.
• Independent or standalone processors communicate with each other which make
management of computers easy.
• Minimization of data loss as well as errors due to placement of controllers in the nearby
vicinity in DCS.
• Advanced control strategies are easy to implement in DCS.
Limitations
Selection Procedure
There are number of considerations for selecting a proper automation tool for a particular
application
For multiple product manufacturing, varied receipe parameters, multiple procedures, often
changes required in receipes, complex batch processes with number of regulatory
loops, DCS is preferred.
If the operator’s interaction is required to keep process to fulfill target performance, For
observing process with faceplates, critical trends, for responding effectively during plant
upsets, DCS is preferred.
DCS gives adjustable scan time, online configuration changes, simple to advanced PID
control and advanced process control strategies.
Difference Between PLC and DCS
EXPERIMENT: 02
· Definition name: This is the name by which the block is identified in the
library.
· Usage name: This name can be user defined as per his/her convention.
· Parameters: These are part of the function block available for standard
connection.
· Execution number: The number by which the function block is executed.
Analog Input
Analog Output
Discrete Input
Discrete Output
Pulse Input
2. Math Library
Add
Comparator
Divide
Multiply
Subtract
Absolute value
Integrator
3. Logical Library
And
Or
Condition
Not
Negative Edge Trigger
Positive Edge Trigger
Multiplexer
De multiplexer
On Delay Timer
Off Delay Timer
Counter
Retentive Timer
Timed Pulse
Input Selector
Limit
PID
Ratio
Ramp
Filter
Scalar
Signal Characterizer
Signal Generator
Signal Selector
Splitter
Let us discuss about the commonly used Input/ Output library function
blocks.
Analog Input function Block -
The Discrete Input (DI) Function blocks accesses a single digital input
value with its status between two states of the field devices. The block
gives processed physical input for other function blocks. In automatic
mode, Process variable is copied to output which can be either 0 or 1. In
manual mode, the digital input can be toggled manually and output
follows the same.
Digital Output block takes value from the process and writes it to specific
digital output channel. One can confirm physical output operation by
configuring a hardware discrete input to it. In automatic mode, when the
signal from process changes the output of the block which will be
connected to AO channel which in turn connects to field outputs e.g a
solenoid valve, changes.
Logical Library:
Commonly used logical blocks under logical library are described here
AND function block is used as an AND operator. For 2 input AND gate if
both the inputs are high the output of the function block is high.
NOT function block is used as NOT operator, wherein if the input to the
block is high or active the output is opposite i.e. low and vice versa. The
function block and the truth table are as given below:
Let us look at how programming is done using these blocks. The details
are given in under procedure tab.
Output AND GATE
OUTPUT OR GATE
OUTPUT NOT GATE
OUTPUT: DIGITAL INPUTS
EXPERIMENT :03
There are two types of delay required or available in the entire operation
• Logical delay
• Process delay
This internal clock is used as a reference when it is necessary to have a
logical delay in the program. Depending on number of cycles of the clock
the calculation of the delay is calculated. The base time of the delay can
vary for different manufacturers e.g. 1ms, 10ms or 1s. It is based on the
crystal oscillator present in the controller whose time is taken as the
reference for the calculation.
Concept of Counter
In timer, the internal clock of the controller is considered for calculation of
the delay, the same clock can be used to calculate the external pulses of
the physical world.
Suppose there is an application where in we need to count the number of
balls entering the vessel. A limit switch as a sensor can sense the ball as
it comes to the vessel. The high to low transition at the sensor output can
be counted by taking the reference of the internal clock pulse of the
controller.
TYPES OF TIMERS
Three types of timers available in DCS are On delay, Off delay and
Retentive timer.
1. On Delay Timer (OND): On delay timers are preferred in most of the
applications.
The example to demonstrate the function and operation of a timer is a
firecracker. The firecracker when it is lighted it takes some time to burst
because of the lead present which we light. Thus after burning the lead,
which is the delay the cracker burst. Now in terms of On Delay Timer
when a high/true/active signal is given at the input, time duration
specified, the output of the timer block becomes high only after the
specified time duration is elapsed,.
The function block and timing diagram for On Delay Timer is shown
below:
2. Off Delay Timer (OFFD): In Off Delay Timer, the output remains high
until a high to low pulse is applied at the input terminal. The output goes
low after the time duration specified has elapsed if a high to low transition
is applied at input. The functional block diagram and timing diagram of
the same is shown below:
3. Retentive Timer (RET): In the above timers if the input signal
changes its value back to original, before the specified time duration is
elapsed, the timer resets. It does not retain its value. In order to
overcome this problem retentive timer is used. As the name suggests, it
retains the value even if the input signal changes back to original state
before time duration has elapsed. These type of timers are used in real
time clocks where retention of time value is important. The block diagram
and timing diagram of the same is shown below:
TYPES OF COUNTERS
Theory
For implementing this logic using function blocks, on delay times can be
used.
Solution Hint:
For starting the Traffic Control System in auto mode use Pulse Input
Block.
For the lamps, Digital Output blocks can be used.
OUTPUT
EXPERIMENT :05
At this stage we are aware of various function blocks available in the dcs
library. In the traffic control application we have seen how on delay
timers (OND block) are used. Let us see another example for logic
development.
The P & I diagram for bottle filling plant is shown here.
Objective:-
1. Learn the basics and hardware components of PLC
2. Understand configuration of PLC system
3. Study various building blocks of PLC
Theory:
Evolution of PLC:-
When the first electronic machine control was designed, relays were to
control the machine logic.
Relay logic has its own limitations.
1.Less reliability
2.The delay involved in switching of contacts
3.Less flexibility and difficult troubleshooting due to hard wired
connection
What is PLC?
Basic Components of PLC:-
This is the device where PLC program is stored and processed. The size
and type of CPU determines the programming functions available, size of
the application logic available, amount of memory supported, and
processing speed.
Power
Inputs carry signals from the field (process) to the controller. Various
types of inputs can be switches, pressure sensors, transmitters etc. The
field devices to whom PLC sends the results of logical operations are the
output devices. These are the actuators that adjusts or control the
process, motors, lights, relays, pumps, etc. Many types of inputs and
outputs can be connected to a PLC and they can be categorized mainly as
analog and digital. Digital inputs and outputs operate on discrete or
binary change i.e. on/off, open/close. Analog inputs and outputs change
continuously with reference to time.
Programming Device:-
PLC Program:-
PLC Program is a Logic that is executed by the CPU. This logic can be
written in the form of Ladder diagram, Instruction List, Sequential
Function Charts, Structured text or Functional block diagram. These are
the languages used for writing logic as per IEC standard. The program is
then downloaded to the PLC. This is usually done by temporarily
connecting the PC or HHT to the PLC. Once the program is downloaded to
the CPU, it is usually not necessary for the PC to remain connected.
PLC Scan:-
Once the program is downloaded in the CPU, the PLC is switched to "run"
mode and the PLC executes the application program. The CPU regularly
reads the status of the input devices, and sends data to the output
devices as per the logical results after execution of the program. The
process of Initialization when power is turned on, Reading inputs,
Executing logic, and modifying outputs is called as PLC Scan Cycle.
Memory
The logic or application program is stored in memory. As the PLC
executes logic, it may also read and store values to memory. The values
may be referenced by the application program.
Digital I/O
Common digital field input devices include pushbuttons, limit switches,
photo sensor etc. Common digital output devices include relays, motor
starters, and solenoid valves.
Analog I/O
Common analog input devices are transmitters used for sensing various
parameters. Common output signals include motor speed, valve position,
air pressure, etc.
I/O modules connect "real world" field devices to the controller. They
convert the electrical signals used in the field devices into electronic
signals that can be used by the control system, and translate real world
values to IO table values.
I/O Wiring:-
Example of Input Module Wiring Diagram:-
If the device provides current to during it’s on state, the device is said to be souring
current.
If the device receives current in the ON or true state, then it is sinking current.
Result:
Software and Hardware used in PLC have been studied and understood.
EXPERIMENT :07
Objective:-
1. Develop a ladder using standard procedure.
2. Solve the problem using ladder programming.
Pre-requisites:-
Basics of Digital Electronics and Boolean Algebra:
Digitization is a process where continuous analog signal is converted into
a finite number of discrete states. These states are well separated so that
noise does not create errors.
The resulting digital signal has following advantages:
', 'l'
Logic
Truth Tables:
Boolean Algebra:
Logic can also be expressed in algebraic form.
e.g.Truth Table for AND gate:
Theory
Introduction
When the switch is on, current will flow through the coil on iron piece.
This iron core acts a electromagnet and due to the magnetic field upper
contact gets attracted towards lower one and circuit gets completed,
allowing current to flow from load.
Ladder Programming
Add a new rung by clicking on the 'Add Rung' icon. The window will appear
like this:
b. Place the contacts as per the requirement by left clicking the appropriate contact
shown at the top side. In the example demonstrated below one normally contact and
one coil is placed as shown the figure.
C. Right click on the contact or coil and you can give tag name like “start”, “stop” etc.
Please ensure that the tag numbers are true replica of process connections.
Similarly give tag name to coil like “motor”, “Lamp” etc. The final ladder will look like
this.
d. Please note that the tag names are case sensitive and if you are using them in
circuit as bit make sure that the correct tag name appears.
e. Click the Compile button so the ladder will be ready for running. For testing the
logic you need to click on Run. Both sides of the rung will become green and this is
the indication of run mode. Please not that in run mode you can't make changes in
the ladder. For modifications user has to go to development mode.
f. By right clicking on the contact toggle the state of contact.Check the output contact
status.
g. Please remember the ladder contacts or the state of the inputs and outputs are
always in de-energised state. The de-energised is that state wherein the contacts
are in non-active state.
h. You can once again toggle the contact and the output state will change. To add
any contact you will have to go to development mode. Click on the rung and add
contacts.
i. To delete any contact or output right click on the contact and press “delete”, the
contact will be deleted.
j. You can add seven elements in series and 5 elements in parallel.
l. To add element in parallel click on the node near contact where you wish to add
parallel branch. Select the branch and click on the '+' sign to complete the loop. The
screen will appear as shown below.
Objective:-
1. To understand working of DOL starter
2. Develop a ladder program for starting an electrical motor using DOL starter
Working of Direct-On-Line (DOL) starter:
One method of starting electric motors is using direct on line (DOL) or across the line starter.
In this method full line voltage is applied to the motor terminals. This is simplest type of
motor starter. An electrical wiring diagram for single phase DOL starter is shown below.
A DOL motor starter contains fuse and over load relay (OLR) for
protection purpose. The starter can be contain momentary contact or
maintained contact push buttons. The example considered here is
momentary contact push buttons. For starting purpose normally open
(NO) push button is preferred whereas normally closed (NC) push button
is used to stop the motor.
The excessive supply voltage drop causing high inrush current is the
criteria to limit the use of DOL starter. Conveyor motors, water pumps are
the applications where DOL starters are used.
Procedure
Sequence of Events :
1. When Start push button (PB1) is pressed, Motor (M1) has to start.
2. If Start pushbutton (PB1) is released and Stop pushbutton (PB2) is not
pressed, Motor (M1) should remain on.
3. When Stop push button (PB2 is pressed, Motor (M1) has tol stop.
4. If stop push button is released and start is not pressed (released)
motor shouldl remain off.
AS the momentary contact push buttons are used here, the condition of
PB1 is maintained through contact of coil C1. This contact is called as
latching contact.
Procedure:
The same sequence of event can be executed by using latch and unlatch
instruction in the following way.
1. The Latch and unlatch instructions are used for holding the output status.
2. The tag name of latch and unlatch output bit must be same.
3. Once you toggle the input bit for the latch; even if you release it by toggling once
again, the output bit remains latched.
4. To unlatch the output you will have to toggle the input bit in the unlatch rung and
the output will be de-energised.
Execute the following ladder on simulator and observe the output status:
You can develop ladder for a DOL “Direct On Line” starter using these instructions.
You can also develop the logic using start and stop push buttons as explained under
theory tab.
Result:
The ladder program for the DOL Starter has been made on the simulator and the output has
been carefully observed.
EXPERIMENT :09
Aim : To develop an application using On-Delay timer.
Objective:-
1. Study the timing diagram of On Delay Timer
2. Solve the assignment of Ton timer
Theory:
Enable (EN) Bit: - The enable bit indicates the TON instruction is
enabled
Timer-Timing (TT) Bit: -The timing bit indicates that a timing operation
is in process.
Done (DN) Bit: -The done bit changes state whenever the accumulated
value reaches the preset value.
Preset (PRE) Bit: - The preset value specifies the value (1msec units)
which the accumulated value must reach before the instruction sets
the .DN bit.
The figure shows the timing diagram which illustrates the functioning of
all the bits in sequence.
The following example, after running, will illustrate the function of each
bit
Before toggling the Start, all the lamps namely Lamp_1, Lamp_2 and
Lamp_3 are OFF.
After the Start is toggled, Lamp_1 and Lamp_2 are ON. This implies the
Timer_1 is enabled and its timer timing bit is activated. After the delay
i.e. preset value of the timer, Lamp_1 and Lamp_3 are ON and Lamp_2
will be OFF.
Procedure:
In this experiment the on delay timer will be tested for its functionalities using
Simulator. Following bits of the
timer are to be observed.
Initialising bit “ON” in this case.
Enable bit “T_en”
Done bit “T_dn”
Timer timing bit “T_tt”
Preset value needs to be entered by the user.
While configuring the timer thedefault time is 1 mS. Select appropriate preset value
as per the need of the application. The screen shot of the configured timer will
appear like this.
To test the EN, DN, and TT bits;configure the timer by right clicking anywhere on the
timer block. Submit tag and preset value.
Add new rung to test the timer status or to energies the output. You can
also test the cascading of the timer using these bits.
Observe the tag name for timer DN bit. See following screen shot to
observe the output bit status when delay is over.
Observe the bit status in Run mode when input a is toggled again.
Result:
The On-delay timer has been implemented and its timing diagram has been studied
using the output of the simulator.
EXPERIMENT :10
Theory:
In case of PLC various instructions are available which can be used for
computational purpose.
The compute/math instructions evaluate arithmetic operations using an
expression or a specific arithmetic instruction.
Various instructions PLC can support are as follows.
Instruction Description
ADD Add two values
SUB Subtract two values
MUL Multiply two values
DIV Divide two values
MOD Determine the remainder after one value is divided by another
SQR Calculate the square root of a value
NEG Take the opposite sign of a value
ABS Take the absolute value of a value
When these operations are carried out in the PLC, the type should be the
same for source and destination e.g. real, integer etc. You can use mix
data types, but loss of accuracy and rounding error occurs. The
instruction may take more time to execute.
The input and output parameters associated with these instructions are:
Input Parameter Data Type Description
The ADD instruction adds Source A to Source B and places the result in
the Destination.
Condition Action
The SUB instruction subtracts Source B from Source A and places the
result in the Destination.
The MUL instruction multiplies Source A with Source B and places the
result in the Destination.
Condition Action
The DIV instruction divides Source A by Source B and places the result in
the Destination.
First click on simulator tab and open the simulator by clicking on the link.
2. Insert NO contact. Add the ADD block provided in the simulator. The screen
shot will look as follows.
3. Assign tag to NO contact and enter the addresses. Enter values for source A
and B. Observe following screen shot.
4. For executing the instruction switch to run mode. Toggle the input contact and
see the result at output Y as shown below.
Result:
The comutational instructions available in PLC or PLC Ladder Progrmamming have
been studied and their use has been studied.