0% found this document useful (0 votes)
90 views38 pages

Lab Manual: MCT-334L Industrial Automation

This document provides a list of experiments for an Industrial Automation lab manual. The experiments cover topics like introductions to industrial automation, PLC software, ladder logic programming, timers, counters, and designing ladder diagrams for various automation applications. The first experiment gives an overview of industrial automation and Programmable Logic Controllers (PLCs), including their history, components, and how they work. The remaining experiments involve hands-on programming and design of PLC systems for applications such as traffic control, tank filling/draining, and bottling plants.

Uploaded by

Ahmed Ch
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
90 views38 pages

Lab Manual: MCT-334L Industrial Automation

This document provides a list of experiments for an Industrial Automation lab manual. The experiments cover topics like introductions to industrial automation, PLC software, ladder logic programming, timers, counters, and designing ladder diagrams for various automation applications. The first experiment gives an overview of industrial automation and Programmable Logic Controllers (PLCs), including their history, components, and how they work. The remaining experiments involve hands-on programming and design of PLC systems for applications such as traffic control, tank filling/draining, and bottling plants.

Uploaded by

Ahmed Ch
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 38

LAB MANUAL

MCT-334L Industrial Automation

Department of Mechanical, Mechatronics & Manufacturing Engineering


B.Sc. Mechatronics & Control Engineering Program
University of Engineering & Technology Lahore (Faisalabad Campus)
INDUSTRIAL AUTOMATION LABORATORY

LIST OF EXPERIMENTS

EXP. NO. EXPERIMENT TITLE

1 Introduction to Industrial Automation and PLCs

2 Orientation to PLC Software (Fatek)

Introduction to:
 Memory Structure
3
 Ladder Logic Programming Elements
 PLC Programming

Use of advanced Instructions:


 Comparison Instructions
4
 Mathematics (Addition, Subtraction, Comparison etc.)
 Data Handling

5 Introduction to Set, Reset Coils and Latching

6 Introduction to Timers

7 Introduction to Counters

8 Design Ladder Diagram for Traffic Module

9 Design Ladder Diagram for Tank Filling / Draining Control Module

10 Design Ladder Diagram for Vehicle Parking Module

11 Design Ladder Diagram for Bottling Plant Module

12 Design Ladder Diagram for Apple Packing Module

13 Design Ladder Diagram for Tank Level and Pump Control Module

14 Connecting Real Sensors and Actuators with PLC


Lab No. 01
Introduction to Industrial Automation and PLCs
Name: _____________________________

Registration # _______________________

Date: _______________________

Objective:
 To become familiar with Industrial Automation & PLCs.

Introduction:
Industrial Automation:

Automation takes a step further mechanization that uses a particular machinery mechanism aided
human operators for performing a task. Mechanization is the manual operation of a task using powered
machinery that depends on human decision making. Automation replaces the human involvement with
the use of logical programming commands and powerful machineries.

Industrial Automation is the replacement with computers and machines to that of human thinking.
The word Automation gives the meaning ‘self dictating’ or ‘a mechanism moves by itself’ that derived
from the Greek words ‘Auto’ and ‘Matos’ where ‘auto’ means self while ‘Matos’ means moving. In a
brief, industrial automation can be defined as the use of set technologies and automatic control devices
that results the automatic operation and control of industrial processes without significant human
intervention and achieving superior performance than manual control. These automation devices
include PLCs, PCs, PACs, etc. and technologies include various industrial communication systems.

Advantages of Automation System:


 To increase productivity
 To provide optimum cost of operation
 To improve product quality
 To reduce routine checks
 To raise the level of safety
Types of Industrial Automation Systems:
1) Fixed or Hard Automation:

This type of automation is employed to perform


fixed and repetitive operations in order to achieve
high production rates. It uses special purpose or
dedicated equipment to automate the fixed sequence
assembling or processing operations. Once it is
employed, it is relatively hard to change or vary the
product design. Therefore, it is inflexible in
providing product variety, but increases the
efficiency with higher production rate and reduces
unit cost.
Fig 1.1: Fixed Automation

2) Programmable Automation

In this automation, a specific class of product


changes and also assembling or processing
operations can be changed with the modification of
control program in the automated equipment. This
automation is best suited for batch production
process where product volume is medium to high.
But in this, it is hard to change and reconfigure the
system for a new product or sequence of operations.
Therefore, new product or reconfigure of sequence
of operations requires a long setup.

Fig 1.2: Programmable Automation

3) Flexible or Soft Automation

This automation system provides the automatic


control equipment that offers a great flexibility for
making changes in the product design. These
changes can be performed quickly through the
commands given in the form of codes by the human
operators. This automation allows the manufacturers
to produce multiple products with different ranges
as a combined combination process rather than
separate. Some of the examples of this automation
system are automatic guided vehicles, automobiles,
and multipurpose CNC machines.

Fig 1.3: Flexible Automation


PLCs:
Programmable Logic Controllers (PLCs) are small industrial computers with modular components
designed to automate customized control processes. PLCs are often used in factories and industrial
plants to control motors, pumps, lights, fans, circuit breakers and other machinery. To understand the
purpose of PLCs better, let’s look at a brief history of PLCs.

History:
Industrial automation began long before PLCs. In the early to mid-1900s, automation was usually done
using complicated electromechanical relay circuits. However, the amount of relays, wires and space
needed to create even simple automation was problematic. Thousands of relays could be necessary to
automate a simple factory process and if something in the logical circuit needed to be changed then it
will be very difficult.

In 1968 the first programmable logic controller came along to replace complicated relay circuitry in
industrial plants. The PLC was designed to be easily programmable by plant engineers and technicians
that were already familiar with relay logic and control schematics. Since the beginning PLCs have
been programmable using ladder logic which was designed to mimic control circuit schematics. The
ladder diagrams look like control circuits where power is flowing from left to right through closed
contacts to energize a relay coil.

Fig 1.4: Ladder Logic Example

As we can see in Fig 1.4 ladder logic looks like simple control circuit schematics where input sources
like switches, push-buttons, proximity sensors, etc. are shown on the left and output sources are shown
on the right. The ability to program complicated automated processes with an intuitive interface like
ladder logic made the transition from relay logic to PLCs much simpler for many in the industry.

Although, the first PLCs were very limited in their memory and speed capabilities, they quickly
improved over the years. The presence of PLCs helped simplify the design and implementation of
industrial automation.

Working of PLC:
A programmable logic controller is a specialized computer used to control machines and processes. It
therefore shares common terms with typical PCs like central processing unit, memory, software and
communications. Unlike a personal computer though the PLC is designed to survive in a rugged
industrial atmosphere and to be very flexible in how it interfaces with inputs and outputs to the real
world.

The components that make a PLC work can be divided into three core areas.
1) The power supply and rack
2) The central processing unit (CPU)
3) The input/output (I/O) section
PLCs come in many shapes and sizes. They can be so small as to fit in your shirt pocket while more
involved controls systems require large PLC racks. Smaller PLCs (a.k.a. “bricks”) are typically
designed with fixed I/O points. For our consideration, we’ll look at the more modular rack based
systems. It’s called “modular” because the rack can accept many different types of I/O modules that
simply slide into the rack and plug in.

Fig 1.5: PLC


1) The Power Supply and Rack

The rack is the component that holds everything together. Depending on the needs of the control
system it can be ordered in different sizes to hold more modules. Like a human spine the rack has a
backplane at the rear which allows the cards to communicate with the CPU. The power supply plugs
into the rack as well and supplies a regulated DC power to other modules that plug into the rack. The
most popular power supplies work with 120 VAC or 24 VDC sources.
2) The CPU:

The brain of the whole PLC is the CPU module. This module
typically lives in the slot beside the power supply. The CPU
consists of a microprocessor, memory chip and other integrated
circuits to control logic, monitoring and communications. The
CPU has different operating modes. In programming mode, it
accepts the downloaded logic from a PC. The CPU is then placed
in run mode so that it can execute the program and operate the
process.

Since a PLC is a dedicated controller it will only process this one


program over and over again. One cycle through the program is
called a scan time and involves reading the inputs from the other
modules, executing the logic based on these inputs and then
updated the outputs accordingly. The scan time happens very
quickly (in the range of 1/1000th of a second). The memory in
the CPU stores the program while also holding the status of the
I/O and providing a means to store values.
Fig 1.6: CPU Cycle
3) I/O System:

Inputs:

Input devices can consist of digital or analog devices. A digital input card handles discrete devices
which give a signal that is either on or off such as a pushbutton, limit switch, sensors or selector
switches. An analog input card converts a voltage or current (e.g. a signal that can be anywhere from
0 to 20mA) into a digitally equivalent number that can be understood by the CPU. Examples of analog
devices are pressure transducers, flow meters and thermocouples for temperature readings.

Outputs:

Output devices can also consist of digital or analog types. A digital output card either turns a device
on or off such as lights, LEDs, small motors, and relays. An analog output card will convert a digital
number sent by the CPU to its real world voltage or current. Typical outputs signals can range from
0-10 VDC or 4-20mA and are used to drive mass flow controllers, pressure regulators and position
controls.

Programming a PLC:
In these modern times a PC with specially dedicated software from the PLC manufacturer is used to
program a PLC. The most widely used form of programming is called ladder logic. Ladder logic uses
symbols, instead of words, to emulate the real world relay logic control, which is a relic from the PLC's
history. These symbols are interconnected by lines to indicate the flow of current through relay like
contacts and coils. Over the years the number of symbols has increased to provide a high level of
functionality.
The completed program looks like a ladder but in actuality it represents an electrical circuit. The left
and right rails indicate the positive and ground of a power supply. The rungs represent the wiring
between the different components which in the case of a PLC are all in the virtual world of the CPU. So
if you can understand how basic electrical circuits work then you can understand ladder logic.

In this simplest of examples, a digital input (like a button connected to the first position on the card)
when it is pressed turns on an output which energizes an indicator light.

Fig 1.7: Ladder Logic


The completed program is downloaded from the PC to the PLC using a special cable that’s connected
to the front of the CPU. The CPU is then put into run mode so that it can start scanning the logic and
controlling the outputs.

Conclusion:
Lab No. 02
Orientation to PLC Software (Fatek)
Name: _____________________________

Registration # _______________________

Date: _______________________

Objective:
 To become familiar with FATEK WinProladder Software.
 To implement Logic Gates (AND, OR, NOT, NAND, NOR, XOR, XNOR) using Ladder logic
in FATEK PLC.

Equipment and Components:

 FATEK FBS 14 MA
 FATEK WinProladder Software
 PC
Introduction:
FATEK FBS-14-MA PLC:
The FATEK FBS Series PLC is a new generation of micro PLC
equipped with excellent functions comparable to medium or
large PLC, with up to five communication ports. The maximum
I/O numbers are 256 points for Digital Input (DI) and Digital
Output (DO), 64 words for Numeric Input (NI) and Numeric
Output (NO). The Main Units of FBS are available in three
types: MA (Economy Type), MC (High-Performance Type),
and MN (High-Speed NC Type). With the combination of I/O
point ranges from 10 to 60, a total of 17 models are available.
Fifteen DI/DO and 19 NI/NO models are available for
Expansion Units/Modules. With interface options in RS232,
RS485, USB, Ethernet, CANopen, Zigbee and GSM, the
communication peripherals are available with 15 boards and
modules. FATEK FBS 14 MA indicates economy type PLC
having 14 in/out ports, 8 inputs and 6 outputs ports.
Fig 2.1: FATEK FBS-14-MA
FATEK WinProladder Software:
It provides the connection for PLC and PC with varieties. Among the connections, there are hardware
connection, Modem connection and Internet connection. For every different connection, WinProladder
provide a session name to associate the setting of the communication parameters, such as port no.,
baud rate, IP address etc. With this feature can alleviate the user from the burden of the memorizing.
It provides the on-line program editing capability. After modify the ladder program can send the RUN
command immediately without to re-download the program to PLC. With this feature can reduce the
application development time dramatically comparing with other PLC without this feature.

Fig 2.2: WinProladder Operational Window

(Functions toolbar) is the collection of functions included in the applications software, presented in
different categories. When the user selects any of the categories in the above function’s toolbar, a list
of additional selectable functions will be displayed for the user to select.

(Tools bar) In the process of the design of a project, it is often convenient to provide a toolbar with
the most commonly used functions included in it for the user to directly select, which can prove to be
much faster and more convenient that having to find the function through the functions toolbar.

(Component tray) allows the user to easily select the components and command functions that they
need to use without having to search for what they want through the functions toolbar, which is faster
and more convenient.

(Status bar) displays information on the status of the current application, such as whether the
application is connected, whether it is in execution or has been disconnected, and the current location
of the cursor, etc., allowing the user to know the status of the current application at all times.
Logic Gates:

i) Not Gate:
In this logic gate, the output is high if the input is
low and vice versa. The symbol and truth table for
this gate are shown.

ii) OR Gate:
In this Logic gate, the output is high if one of the
input is high. If both the inputs are low, then the
output is low. The symbol and truth table are
shown.

iii) AND Gate:


In this Logic gate, the output is high if either one
of the input is high. If both the inputs are low, then
the output is low.

iv) NAND Gate:


In NAND gate the output is low only if all its inputs are
high otherwise output will be high. Its output is
complement of an AND gate. The symbol and truth table
for this gate are shown.

v) NOR Gate:
In this Logic gate, the output is low if one of the input
is high. If both the inputs are low, then the output is
high. The symbol and truth table for this gate are shown

vi) XOR Gate:


In XOR gate output is high when the one input is high
and other is low otherwise the output will be low.

vii) XNOR Gate:


In XOR gate output is low when the one input is high and
other is low otherwise the output will be high.
Procedure:
 Run WinProladder software.
 Select [File]  [New Project] from the function toolbar, the [New Project] window appeared, as
is shown in Fig 2.3.
 Enter “EXAMPLE1” into the [Project Name] field.
 Click on the Edit button to enter the PLC model type selection screen and selected FBs14MA
model type.

Fig 2.3: New Project Window

 Click ok button, and the following screen will appear:

Fig 2.4: Working Window


 Then create ladder logic using a contact (label X0) for fan button and a coil (Label Y0) for fan:

Fig 2.5: Ladder Logic

 Then select [PLC]  [Simulation] from the function toolbar.


 Then selected [PLC]  from the function toolbar.
 Then turn ON the Fan button (X0) and insert the PLC simulation below:

Fig 2.6: Simulation of Ladder Logic

 Then add an output Light (Y1) in ladder logic to indicate the switching of Fan. If the fan is ON,
the light should be ON and vice versa. Insert the PLC simulation below:

Fig 2.7: Ladder Logic

 Then select [PLC]  [Simulation] from the function toolbar.


 Then selected [PLC]  from the function toolbar.
 Then turn ON the Fan button (X0) and insert the PLC simulation below:

Fig 2.8: Simulation of Ladder Logic


 Create Ladder Logic for NOT gate, verify all the outputs using different inputs & insert the PLC
simulation below:

Fig 2.9: Ladder Logic for NOT Gate

 Create Ladder Logic for OR gate, verify all the outputs using different inputs & insert the PLC
simulation below:

Fig 2.10: Ladder Logic for OR Gate

 Create Ladder Logic for NOR gate, verify all the outputs using different inputs & insert the PLC
simulation below:

Fig 2.11: Ladder Logic for NOR Gate

 Create Ladder Logic for AND gate, verify all the outputs using different inputs & insert the PLC
simulation below:

Fig 2.12: Ladder Logic for AND Gate

 Create Ladder Logic for NAND gate, verify all the outputs using different inputs & insert the PLC
simulation below:

Fig 2.13: Ladder Logic for NAND Gate


 Create Ladder Logic for XOR gate, verify all the outputs using different inputs & insert the PLC
simulation below:

Fig 2.14: Ladder Logic for XOR Gate

 Create Ladder Logic for XNOR gate, verify all the outputs using different inputs & insert the PLC
simulation below:

Fig 2.15: Ladder Logic for XNOR Gate

Conclusion:
Lab No. 03
Introduction to Memory Structure, Ladder Logic
Programming Elements & PLC Programming
Lab No. 04
Use of advanced Instructions:
Comparison Instructions, Mathematics (Addition, Subtraction,
Comparison etc.) & Data Handling
Name: _____________________________

Registration # _______________________

Date: _______________________

Objective:
 To become familiar about memory elements.
 To perform various arithmetic operations using memory elements.
 To become familiar with use of comparators in PLCs.
Equipment and Components:

 FATEK FBS 14 MA
 FATEK WinProladder Software
 PC
Introduction:
Registers in PLC:
In a PLC there are several registers. Each data register can store a binary word of usually 8 or 16 bits.
The number of bits determines the size of the number that can be stored. The binary system uses only
two symbols, 0 and 1. Thus we might have the 4-bit number 1111.

Arithmetic function in PLC:


Almost all PLCs have simple ladder diagram Arithmetic operations as add (ADD), subtract (SUB),
divide(DIV), multiply(MUL), square root(SQRT), average(MEAN), Negation(NEG) &
Absolute(ABS).
Some arithmetic operations used in WinProladder are described below and shown in Fig 4.1.

Fig 4.1: Arithmetic Function


Addition (+):
Performs the addition of the data specified at Sa and Sb and writes the results to a specified register D
when the add control input "EN" =1 or from 0 to 1(P instruction). If the result of addition is equal to 0
then set FO0 to 1. If carry occurs (the result exceeds 32767 or 2147483647) then set FO1 to 1. If
borrow occurs (adding negative numbers resulting in a sum less than -32768 or -2147483648), then
set the FO2 to 1. All the FO statuses are retained until this instruction is executed again and overwritten
by a new result.

Fig 4.2: Addition Block

Subtraction (-):
Performs the subtraction of the data specified at Sa and Sb and writes the results to a specified register
D when the subtract control input "EN" =1 or from 0 to 1(P instruction). If the result of subtraction is
equal to 0 then set FO0 to 1. If carry occurs (subtracting a negative number from a positive number
and the result exceeds 32767 or 2147483647), then set FO1 to 1. If borrow occurs (subtracting a
positive number from a negative number and the resulted difference is less than -32768 or -
2147483648), then set FO2 to 1. All the FO statuses are retained until this instruction is executed again
and overwritten by a new result.

Fig 4.3: Subtraction Block


Multiplication (*):
Performs the multiplication of the data specified at Sa and Sb and writes the results to a specified
register D when the multiplication control input "EN" =1 or from 0 to 1(P instruction). If the product
of multiplication is equal to 0 then set FO0 to 1. If the product is a negative, then set FO1 to 1.

Fig 4.4: Multiplication Block

Division (/):
Performs the division of the data specified at Sa and Sb and writes the quotient and remainder to
registers specified by register D when the division control input "EN" =1 or from 0 to 1 (P instruction).
If the quotient of division is equal to 0 then set FO0 to 1. If the divisor Sb=0 then set the error flag
FO1 to 1 without executing the instruction.

Fig 4.5: Division Block

Increment (+1):
Adds 1 to the register D when the increment control input "EN" =1 or from 0 to 1 (P instruction). If
the value of D is already at the upper limit of positive number 32767 or 2147483647, adding one to
this value will change it to the lower limit of negative number -32768 or -2147483648. At the same
time, the overflow flag FO0 (OVF) is set to 1.

Fig 4.6: Increment Block


Decrement (-1):
Subtracts 1 from the register D when the decrement control input "EN" =1 or from 0 to 1 (P
instruction). If the value of D is already at the lower limit of negative number -32768 or -2147483648,
subtracting one from this value will change it to the upper limit of positive number 32767 or
2147483647. At the same time, the underflow flag FO0 (UDF) is set to 1.

Fig 4.7: Decrement Block

Average (MEAN):
When operation control "EN" = 1 or from 0 to 1(P instruction), add the N successive 16-bit or 32-bit
(D instruction) numerical values starting from S, and then divided by N. Store this mean value
(rounding off numbers after the decimal point) in the register specified by D. While the N value is
derived from the content of the register, if the N value is not between 2 and 256, then the N range error
"ERR" will be set to 1, and do not execute the operation.

Fig 4.8: Average Block

Square root (SQRT):


When operation control "EN" = 1 or from 0 to 1(P instruction), take the square root (rounding off
numbers after the decimal point) of the data specified by the S field, and store the result into the register
specified by While the S value is derived from the content of the register, if the value is negative, then
the S value error flag "ERR" will be set to 1, and do not execute the operation.

Fig 4.9: Square Root Block


Negation (NEG):
When operation control "EN" = 1 or from 0 to 1(P instruction), negate (i.e. calculate 2's complement)
the value of the content of the register specified by D, and store it back in the original D register. If the
value of the content of D is negative, then the negation operation will make it positive.

Fig 4.10: Negation Block

Absolute (ABS):
When operation control "EN" = 1 or from 0 to 1(P instruction), calculate the absolute value of the
content of the register specified by D, and write it back into the original D register.

Fig 4.11: Absolute Block

Comparator function in PLC:


Comparator is a device for comparing
something measurable with a reference or
standard. Some of the most often used
instructions in PLC programming
are comparator operations. A bit has only two
possible values of one or zero, true or false and
based on these limited values We can easily
demand the desired command for a PLC output.
Some Comparator operations used in
WinProladder are described below and shown in
Fig 4.12. Fig 4.12: Comparator Function
Comparison (CMP):

Compares the data of Sa and Sb when the compare control input "EN" =1 or from 0 to 1(P instruction).
If the data of Sa is equal to Sb, then set FO0 to 1. If the data of Sa>Sb, then set FO1 to 1. If the data of
Sa<Sb, then set FO2 to 1. If the data of Sa < Sb, then set the FO2 to 1.

Fig 4.13: Comparison Block


Zone Compare (ZNCMP):

When operation control "EN" = 1 or from 0 to 1 (P instruction), compares S with upper limit SU and
lower limit SL. If S is between the upper limit and the lower limit (SL≦S≦SU), then set the inside
zone flag "INZ" to 1. If the value of S is greater than the upper limit SU, then set the higher than upper
limit flag "S>U" to 1. If the value of S is smaller than the lower limit SL, then set the lower than lower
limit flag” S<L" as 1. The upper limit SU should be greater than the lower limit SL. If SU<SL, then
the limit value error flag "ERR" will set to 1, and this instruction will not carry out.

Fig 4.14: Zone Compare Block


Procedure:
 First run WinProladder software.
 Select [File]  [New Project] from the function toolbar, the [New Project] window will appear.
 Enter project name into the [Project Name] field.
 Then click on the Edit button to enter the PLC model type selection screen and select FBs14MA
model type. Click ok button, and the working screen will appear.
 Apply increment operation on two registers D0 and D1 and insert the PLC simulation below:
 Assign value 4 at D0 and 2 at D1.

Fig 4.15: Increment Function

 Apply the sum operation on D0 & D1 and store their sum in D21 and insert the PLC simulation
below:

Fig 4.16: Sum Function

 Apply the subtraction operation on D0 & D1 and store their sum in D22 and insert the PLC
simulation below:

Fig 4.17: Subtract Function

 Apply the multiplication operation on D0 & D1 and store their sum in D100 and insert the PLC
simulation below:

Fig 4.18: Multiplication Function


 Apply the division operation on D0 & D1 and store their sum in D23 and insert the PLC simulation
below:

Fig 4.19: Division Function


 Apply the mean operation on D0 & D1 and store their sum in D24 and insert the PLC simulation
below:

Fig 4.20: Mean Function


 Apply the square root function on D0 & D1 and store their sum in D25 and insert the PLC
simulation below:

Fig 4.21: Square Root Function


 Apply the negative function on D0 and store their sum in D26 and insert the PLC simulation below:

Fig 4.22: Negate Function


 Apply the absolute function on D0 and store their sum in D27 and insert the PLC simulation below:

Fig 4.23: Absolute Function


 Apply Comparator operation on D0 & D1 and insert the PLC simulation below:

Fig 4.24: Comparator Function

 Apply Zone Compare operation on D0. Set the upper limit of zone to 10 and lower limit 2. Insert
the PLC simulation below:

Fig 4.25: Zone Compare Function


 Setup Master reset to reset the stored values in all registers and insert the PLC simulation below:

Fig 4.26: Master Reset

Conclusion:
Lab No. 05

Set, Reset coils and Latching


Name: _____________________________
Registration # _______________________
Date: _______________________
Objective:
 To familiarize with the concept of Latching.
 To familiarize with the concept of Set and Reset Coils.

Equipment and Components:


 FATEK FBS 14 MA
 FATEK WinProladder Software
 PC
Introduction:
Set Coil ( )
A set coil separates the coil from the action or condition that energized the coil. Once energized, a set
coil's result is no longer dependent on the action that energized it. A set coil stays energized (latched)
until its condition is reset (unlatched) by a reset coil.

Reset Coil ( )
A reset coil turns a set coil OFF (unlatches), when the preceding net conditions are ON, allowing
power flow to reach the reset coil from the net. Once a set coil is turned ON, it stays
ON, independent of the original set condition, until a reset coil linked to the same address resets
(unlatches) the coil condition

Latching:
In electronics, a latch is a kind of bistable multivibrator, an electronic circuit that has two stable states
and can be used to store state information. The circuit can be made to change state by signals applied
to one or more control inputs and will have one or two outputs. It is the basic storage element in
sequential logic. Latches are fundamental building blocks of digital electronics systems used in
computers, communications, and many other types of systems. Simple Latching circuit is Shown in
Fig4.1.

Fig 5.1: Latching Circuit


Task # 01: Develop the Logic for following sequence:

Switch 1 Switch 2 X Y
ON OFF SET RESET
OFF ON RESET SET
Procedure:

 First, run WinProladder software. Then create a Ladder Logic for the logic given above:
 Picked two contacts X1 (for switch 1) & X2(for switch2), connect them with set and rest coils (Y0
/ Output X).
 Then connect (Y0 / Output X) with set and rest coils (Y1 / Output Y).
 Then turn ON Switch1 and turn OFF Switch 2 and observe the Output X and Output Y.
 Insert the PLC simulation below:

Fig 5.2: Switch1 ON and Switch 2 OFF

 Then turn off Switch1 and turn on Switch 2 and observe the Output X and Output Y.
 Insert the PLC simulation below:

Fig 5.3: Switch1 OFF and Switch 2 ON


Task # 02: To use single switch to develop following logic:

Switch Output
ON X SET
OFF Y SET
ON X RESET
OFF Y RESET
Procedure:

 Picked a contact X0 (for Input switch) and connect it with set and rest coils of (Output X and
Output Y).
 Then turn ON Switch1 and observe the Output X.
 Insert the PLC simulation below:

Fig 5.4: Switch1 ON and Output X SET

 Then turn OFF Switch1 and observe the Output Y.


 Insert the PLC simulation below:

Fig 5.5: Switch1 OFF and Output Y SET


 Then turn ON Switch1 and observe the Output X.
 Insert the PLC simulation below:

Fig 5.6: Switch1 ON and Output X RESET

 Then turn OFF Switch1 and observe the Output Y.

Fig 5.7: Switch1 OFF and Output Y RESET

Task # 03: To latch an output without using SET or RESET coils.


Procedure:

 Pick contacts M0 (for set) and M12 (for reset), connect them with Output M11.
 Use output M11 to latch the circuit.
 Then turn ON set button and observe the Output.
 Then turn OFF set button and observe the Output.
 Insert the PLC simulation below:
 Reset the Logic.

Fig 5.8: Latching Circuit


Task # 04: What happens if we energize the SET and RESET coils at the same time?
Procedure:

 Picked contact M20 (for input) and connect it with set coil and rest coils (M22).
 Then turn ON the input to energize the SET and RESET coils at the same time, and observe
which coil dominates.
 Insert the PLC simulation below:

Fig 5.9: Energizing the SET and RESET Coils at the Same Time

Task # 05: To make a Latch circuit using pulse operated switches.


Procedure:

 Pick pulse operated switches M31 (for set) and M32 (for reset), connect them with Output M40
(SET and RESET Coils).
 Use output M40 (SET coil) to latch the circuit.
 Then give a pulse using set button and observe the Output.
 What happens if pulse using the Rest button is given.

Fig 5.10: Latching Circuit

Conclusion:
Lab No. 06
Introduction to Timers
Name: _____________________________
Registration # _______________________
Date: _______________________
Objective:
 To familiarize with the function of timers
Equipment and Components:

 FATEK FBS 14 MA
 FATEK WinProladder Software
 PC
Introduction:
Timers:
PLC timers are instructions that provide the same functions as on-delay and off-delay mechanical and
electronic timing relays. A PLC timer provides a preset delay to the control actions. In general, there
are three types of PLC timer delays, ON-delay timer, OFF-delay timer and retentive timer on. The
terms represented in the timer block in the PLC are a Preset value which means the delay period of the
timer, an Accumulated value which is the current delay of the timer. A timer begins the counting on
time-based intervals and continues until the accumulated value equals the preset value. When the
accumulated value equals the preset time the output will be energized. Then the timer sets the output.

Fig 6.1: Function Block of Timer (TUP)

Description of Timer function Block:

The total number of timers is 256 (T0~T255) with three different time bases, 0.01S, 0.1S and 1S. The
default number and allocation of timers is shown as below (Can be adjusted according to user’s actual
requirements by the “Configuration” function):
T0~T49:0.01S timer(default as 0.00~327.67S)
T50~T199:0.1S timer(default as 0.0~3276.7S)
T200~T255:1S timer(default as 0~32767S)
Task # 01: There is a transfer line of canned food. The inductive proximity switch is used to detect
the movement of cans. If cans become jam, the movement stops. Since the cans will not be passing the
detection point. The timer will time out. The output of the timer will either trigger an alarm or stop the
machine until system is corrected.

Procedure:

 First, run WinProladder software. Then create Ladder Logic.


 Picked a contact M0 (for input), connect it with timer (having value of 5sec) and Output M10.
 When input M0 is on (cans are passing) the timer will off.
 When input M0 will off (cans become jam) the timer will turn on, insert PLC simulation in Fig
6.3.
 After 5sec timer will turn on the output M10 to trigger an alarm, insert PLC simulation in Fig 6.4.

Fig 6.2: When Input is ON

Fig 6.3: When Input is Off and Timer Turned On but No Output

Fig 6.4: Output Turned on after 5sec

Task # 02: Fluorescent light (Y5) for the garage door opener is attached. Every time the garage
door(X5) is opened the light is ‘ON’. After the garage door is closed the light remains ‘ON’ for 5
seconds while driver walks to the house from the car.

Procedure:

 Picked a contact M1 (for input), connect it with reset M12 and output M11 and latched it with
M11.
 Use the timer with the inverse of input M1. At the output of timer, connect reset (M12).
 When input M1 is turned on (door is open) output M11 (light) will be turned on.
 Insert the PLC simulation in Fig 6.5.
 When input M1 is turned off (door is closed) output M11 (light) will remained turned on and timer
will also have turned on.
 Insert the PLC simulation in Fig 6.6.
 After 5sec timer will reset the output M11 and output M11 (light) will off.
 Insert the PLC simulation in Fig 6.7.

Fig 6.5: When Input is ON, Output is ON

Fig 6.6: Input is Off Output and Timer are ON

Fig 6.7: After 5sec Output is Turned Off

Task # 03: Consider a program that could be used to flash a light on and off as long as there is some
output from a sensor. Thus we might have both timer T0 and timer T1 both set for 5 seconds. When
the output from a sensor occurs then timer T0 starts and switches on after 5s. This closes the timer T0
contacts and starts timer T1. This switches on after 5s and in doing so, switches off timer T0. In so
doing it switches off itself. The lamp is only on when timer T0 is on and so we have a program to flash
the lamp on and off as long as there is an output from a sensor.

Procedure:
 Picked a contact M100 (for input), connect it M31(Timer T21 output), Timer (T20) and output
M30.
 Connect Output M30 with another timer T21 whose output is M31.
 When input is off there will be no output. Insert the PLC simulation in Fig 6.8.
 When the input (M100) from a sensor occurs then timer T20 starts. Insert the PLC simulation in
Fig 6.9.
 After 5s turn on the light at output M30. Insert the PLC simulation in Fig 6.10.
 Then timer T22 starts. Insert the PLC simulation in Fig 6.11.
 After 5sec it turns off timer T21. In so doing it switches off itself and the cycle repeats until input
remain turned on. Insert the PLC simulation in Fig 6.12.
 The lamp is only on when timer T21 is on and so we have a program to flash the lamp on and off
as long as there is an input from a sensor.

Fig 6.8: When Input is Off Output is Off

Fig 6.9: When Input is ON Timer T20 is ON

Fig 6.10: When Input is ON Output is ON and Timer T21 is ON


Fig 6.11: When Input is ON Output is Off due to Timer T21’s Output

Conclusion:
Lab No. 07

Introduction to Counters
Name: _____________________________
Registration # _______________________
Date: _______________________
Objective:
 To familiarize with the function of Counters.
Equipment and Components:
 FATEK FBS 14 MA
 FATEK WinProladder Software
 PC
Introduction:
Counters:
Counter is a device which stores (and sometimes displays) the number of times a particular event or
process has occurred, often in relationship to a clock signal. Counters are used in digital electronics
for counting purpose, they can count specific event happening in the circuit. For example, in
UP counter a counter increases count for every rising edge of clock. Not only counting, a counter can
follow the certain sequence based on our design like any random sequence 0,1,3,2…. They can also
be designed with the help of flip flops.

Fig 7.1: Counter Function Block (CUP)

Description of Counter Function Block:

 There are total 200 16-Bit counters (C0~C199). There are total 56 32-Bitcounters (C200~C255).
 When "CLR" is at 1, all of the contact Cn, FO0 (CUP), and CV value of the counter CV are cleared
to 0 and the counter stops counting.
 When "CLR" is at 0, the counter is allowed to count up. The Counter counts up every time the
clock "CK" changes from 0 to 1 (adds 1 to the CV) until the cumulative current value is equal to
or greater than the preset value (CV>=PV), the counter "Count-Up" and the contact status of the
counter Cn and FO0 (CUP) changes to 1. If the input status of clock continues to change, even the
cumulative current value is equal and greater than the preset value, the CV value will still
accumulate until it reaches the up limit at 32767 or 2147483647.
Task # 01: Write a code to turn ON a light after 6 events and turn it OFF after 10 seconds. Events
may be treated as two normally open switches.

Procedure:

 First, run WinProladder software. Then create a Ladder Logic.


 Pick contact X0 (for input), connect it with counter C0 (having preset value 6) and Output Y0.
 Connect output Y0 with a timer T0 (having time 10sec), then connect output(Y1) of timer T0 with
the CLR of the counter C0 to reset the counter.
 When turn on and off the input 4 times the counter counted 4 but there is no output on Y0. Insert
the PLC simulation in Fig 8.2.
 Then turn on and off the input until counter counted 6, output Y0 turns on and timer T0 also turns
on. Insert the PLC simulation in Fig 8.3.
 After 10 sec timer T0 resets the counter C0 and outputY0 is tuned OFF. Insert the PLC simulation
in Fig 8.4.

Fig 7.2: When Counter value is 4 and there is No Output.

Fig 7.3: When Counter value is 6 and Output is Turned ON

Fig 7.4: After 10 sec Timer Resets the Counter and Output is Turned OFF
Task # 02: Design a ladder logic diagram that will use counter element as one UP/Down counter to
keep track of the cars in a certain parking plaza. If the number of cars exceeds a certain value (say 15)
“CAR LOT FULL” light should light up.

Procedure:

 Picked contact X1 (for input as UP when a car is entered), connect it with counter C1 (having
preset value 15) and Output Y5.
 Connect output Y3 with CLR of counter C1 to reset the counter.
 Connected a pulse switch Y100 (for down when a car leaves) and connect it with a decrement
arithmetic function and give it the address of counter to decrease the value of counter).
 Turn on and off the input 13 times (which means 13 cars entered) the counter counted 13 but there
is no output on Y5. Insert the PLC simulation in Fig 8.5.
 Turned on and off the input until counter counted 15 (which means 15 cars entered), output Y5
was turned ON to indicate that the “CAR LOT FULL”. Insert the PLC simulation in as Fig 8.6.
 Create a pulse input on Y100 (which means 1 car is out) the decrement operator decrease the value
of counter C1 to 14 and outputY0 is tuned OFF. Insert the PLC simulation in Fig 8.7.

Fig 7.5: When Counter value is 13 and there is No Output.

Fig 7.6: When Counter value is 15 and Output is Turned ON


Fig 7.7: When Counter value is 14 and Output is Turned OFF

Conclusion:

You might also like