Industrial Electronics Lab Manual UOC
Industrial Electronics Lab Manual UOC
Industrial Electronics Lab Manual UOC
Experiment # 01
Objective:
Introduction to Programmable Logic Controller (CLO-1)
What is PLC?
It was named “Programmable Logic Controller (PLC)” by NEMA (National Electrical Manufacture
Association) in 1978.
In automated system, PLC is the central part of the process control system. With execution of a program
stored in the program memory, PLC continuously monitor the signal status from the input field devices and
read the external input signal and feedback signals from such as switches, sensors and keypad etc. Based
on the logic implemented in the program, using Microprocessor to execute the calculations of logic,
sequence, timer, counter and formula according to the status and the value of the input devices. PLC will
execute the action with the output device, such as open or close of relay or solenoid, control of AC or DC
motors and other control equipment.
PLC Components:
PLC is an industrial microprocessor system where you have hardware and software especially adapted
according to industrial environment. PLC consists of following components.
1
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
The process of reading the inputs, executing the ladder program and updating the outputs is known as scan
and the time taken during this process is called scan time. The scan cycle is continuous, sequential process
of reading the status of inputs, evaluating the control logic in program and updating the outputs according
to logic as shown in fig. Scan time of a controller shows that how fast a controller reacts to the field inputs
and correctly solve the control logics used in program.
Step 1: First, a PLC checks the status of each input devices that are connected with the PLC inputs that
which input is ON or OFF. Then the status is stored in the memory for used in step 2.
Step 2: After checking the inputs status the PLC execute a program instruction by instruction. The complex
mathematical instructions, formulas and calculation are solved. After execution of program step by step
until the end, all the calculations are stored in the memory for next step.
Step 3: Based on the program and input devices status the output field devices are adjusted. After this, first
scan is completed and the program scans again repeating from step 1. This process is repeated again and
again.
The single scan time of program of PLC controllers typically varies from 0.1ms to Tens of ms depending
on the CPU processing speed and length of the user program. If the scan time increases from the set value,
then the error flag will be set high and program will malfunction.
2
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
Ladder Diagram is a graphical programming language developed in World War 2 by combining different
graphic elements. Ladder logic is used to develop software for programmable logic controllers used in
industrial control applications. They are called “ladder” diagrams because they are constructed in a way
that resembles a ladder with two vertical rails and rungs between them.
At first, it just has basic components, such as a contact NO (Normally Open), NC (Normally Close), output
coil, timer and counters etc, which were used in the control panel. But as PLC controllers are developed it
has more functions, different contacts, latched coils, and application commands, arithmetic instructions and
many more complex commands that traditional power panel don’t have.
The working principle of the traditional ladder diagram and the PLC ladder diagram are similar to each
other, the only difference is that the symbols for the traditional ladder diagram are expressed in the format
that are close to its original component, while those for PLC ladder diagram employ the symbols that are
more explicit when used in the computers and data sheets as shown in the Fig. (a) and Fig (b).
3
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
4
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
Since we frequently meet with concepts “Normally Open” and “Normally Close” in the industrial
environment. Both terms are applied to words such as contacts, inputs; outputs, etc. (for example normally
open contact, normally close contact). Normally open switch will not conduct electricity until the switch is
not pressed. When the switch is pressed, the contacts will meet and they will pass electricity. Similarly, the
normally close switch will conduct electricity until it is not pressed. Because as it name shows that its
contacts are already close so when the switch is pressed the contact will open and the passage of electricity
will stop.
5
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
Example:
Here a doorbell is connected with a NC contact as shown in fig. It means that when the power is ON, the
bell will ring continuously until someone opens NC contact.
Let’s take a common relay operated with 12VDC which have two contacts i.e. NO and NC. Two 24VDC
lamps one Red and other Green are connected with there NO and NC contacts respectively as shown in the
fig. 2-8. As the relay is not activated, the NC contact i.e. Green lamp will glow and the NO contact i.e. Red
lamp remains in OFF state. When the relay is activated the Normally Open (NO) contact will close and Red
lamp will start glowing, and the Normally Close (NC) contact will open and Green lamp will turn OFF.
The concept of “Normally Open” and “Normally Close” can also be applied to sensors, limit switches,
valves and other input devices as well. Like NO/NC input contacts, this concept can also be applied to
output devices i.e. Normally Open Output and Normally Close Output. For example, if the COM & NC
points are used as output, it will remain ON continuously unless the relay is energized. The fig above shows
this. If this relay is energized, then the function will be totally inverted of the above function as shown in
fig below.
6
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
DVP-14SS consists of I/O address, memory areas, data memory, timers and counters areas.
The DVP-14SS series provides 14-I/O points on the CPU unit and the extension units with 16-I/O point
relays or transistors based, analog I/O unit are available. The maximum I/O points can be extended up to
128 points either input or outputs. The power supply unit is independent of the main CPU unit. DVP-14SS
controllers can be seen in the Fig.
• Power LED: When the PLC controller is connected with the 24VDC then the power LED will
glow up. If the LED is not lit, it means that the connection is wrong or the 24VDC terminal is
overloaded.
• Run LED: After the program is transferred to CPU unit and the Error LED is not blinking, then
the program is OK. Now make the RUN/STOP button on the unit to RUN position or by selecting
the RUN option in the Ladder software menu, the Run LED will glow and PLC will start function.
While working always keep the switch in Run position.
• Error LED: if there is any Error in your program or any problem with the power supply then the
Error LED will light up. If the LED blinks continuously, it means that the power supply of PLC is
low or if the LED is lit permanently then there is a problem with your ladder program.
• RUN/STOP button: After ladder program is transferred to CPU unit of PLC and there is no error
in program, then through this button you can run the PLC controller manually. While working
always keep the switch in Run position.
7
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
• Communication Port: (RS232). PLC controller communicates with the Host computer and
Handheld programming console, Programming Terminal through this serial port
• I/O terminals and Indicators: I/O terminals are points for connecting the external input/outputs.
These points are also indicated by their name such that for inputs X0, X1, X2 etc. and for outputs
Y0, Y1, Y2, etc. There is also an LED indicator for each I/O point.
• RS485 communication Connector: RS485 communication is twisted pair communication which
used for the communication between HMI (Human Machine Interface) i.e. PT (Programmable
Terminal) Screen and with other RS485 devices.
• Power Supply Connector: CPU unit of the PLC controller is powered up through this connector.
A 24VDC power supply is connected to this point and then the power LED will be lit.
• Extension Port: This port is used to connect the extension unit of PLC controllers i.e. I/O unit,
analog I/O, etc.
• Nameplate: The nameplate explains the PLC Model No., I/O Power supply specification, Bar code
and Serial No. and Software version.
8
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
The DVP-14SS PLC have 8-Inputs with a common point S/S. The input addresses of delta PLC are
represented by “Xn” where “X” is input and “n” is input number. For example, X0, X1, X2, X3, X4, X5,
X6, and X7 represents the CPU 8-input addresses. The connections of the CPU inputs with switches are
shown in the figure.
The DVP-14SS CPU have 6-Outputs and three common points. The PLC outputs addresses
are represented by “Yn”, where “Y” shows the output and “n” represents its output number
1.e. 0,1…7. The 6-output of CPU will be represented by Y0, Y1, Y2, Y3, Y4, and Y5. If
further outputs are required, then Extension Unit will be used. The connections of external
output devices are shown in figure.
9
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
Memory Structure of the PLC is shown in Table, which have some specified area for I/Os relays, Internal
Relays, Data memory, Timer and Counter Area, and Error Area. These areas are pre-defined by
manufactures. Basic introduction to some internal memory areas:
• Input Relay:
Input relay is the basic storage unit of the memory that corresponds to the external input. Input
signal from outside will decide the logic “0” or “1”. The status of Input and Output relays in the
memory couldn’t be changed by program design or via HPP (Handheld Programmer). X0, X1, X7,
X10, X15, and X20 etc represent the input relays. The “X” represents the input and the decimal
number shows their position or Input number. The contacts of any input can be used unlimitedly in
the ladder program.
• Output Relay:
Output relay is the basic storage unit of the memory that corresponds to external output. Y0, Y1,
Y7, Y10, and Y20 etc represent output relays. The “Y” represents output and the decimal number
shows the output relay number.
• Internal Relay:
The internal relays are not connected directly to the external outputs. These are the auxiliary relays
in the PLC. Its function is the same as the auxiliary points in the control circuits i.e. to monitor
some conditions. The representation of internal relays is “Mn” where “M” represents the internal
relay and “n” shows its number i.e. M0, M5, M10, M25 etc.
10
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
There are some special auxiliary relays, which are predefined and given in the datasheet. These auxiliary
relays have special functions for example,
11
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
These are some important internal relays, which can be used freely in the ladder diagram. Some special
internal relays are Read Only, which cannot be changed, and some special relays can be changed according
to your requirements.
• Timer Area: Timer is used to control a time period. There are coil, contact and timer storage unit in
instruction of timer. When a time delay is required then a timer coil is activated and the time set
value is entered. When the desired time is achieved then the contacts are activated. Each timer has
its base timing period, which is shown in datasheet. Timers have base time 100ms, 10ms, and 1ms.
There are 128 timers from T0~T127. Timer is represented by “Tn” where “T” represent timer and
“n” shows the timer number.
• Counter Area: Counter is used for count. The counter instruction contains coil, contact and counter
storage unit. Before using a counter it is set by an instruction in ladder program. There are 16-bit,
32-bit, and high-speed counter. The counter is represented by “Cn” where “C” is counter and “n”
is counter number. There are 128-counters from C0~C128 and high-speed counter C234~C254.
• Data Register: PLC needs to handle data and operation when controlling each order, timer value and
counter value etc. The data register is used to store data or parameters. It stores 16-bits data as a
word and 32-bits data as a double word. There are some latched data areas, which store data
permanently i.e. it, retains data if the power is failed and some unlatched area, which lose data on
power failure. The data area is given in the PLC datasheet. The data register is represented by “Dn”
where “D” is the data area and “n” shows its location. For example, D0, D1, D2, D100, D500 etc.
After using the basic techniques of the WPL Software now lets read about the basic instructions used in the
Ladder programming. After reading these instruction we will be in position to write some simple Ladder
programs for small control system.
The command or instructions, which are used in the next Module # 6, are:
1 LD Input/Load NO Contact X, Y, M, T, C
12
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
The above-mentioned commands should be read carefully, with their given operand. The operands mean
that which memory areas in the PLC these commands can be used. The operands given are used for:
13
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
• KnX = Means that how many External inputs can be read at one time. If K1 is used then it will read
four consecutive inputs starting from the following address i.e. K1X0 mean that four External
inputs from X0 t0 X3 will be read and if K2X0 then eight consecutive inputs will be read from X0
to X7 and so on.
• KnY = Mean that how many External outputs can be set high at one time. If K1 is used then it will
write to four consecutive outputs starting from the following address i.e. K1Y0 mean that four
External Outputs from Y0 t0 Y3 will be set high or turned ON and if K2Y0 then eight consecutive
outputs will be set high or turned from Y0 to Y7. Similarly, by using KnM the work bits M can be
set.
14
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
Experiment # 02
Objective:
Familiarization with Ladder Logic Programming using WPLSoft in PLC
(CLO-2, CLO-3)
Programming of DVP-14SS PLC Controller:
WPL is a PLC programming tool for the creation, testing and maintenance of programs associated with
Delta’s EX-series, SS-series, EH-series PLCs. It provides facilities to program the PLC I/O devices, On-
line monitoring and changing of data register (D) and internal relays (M).
The DVP-14SS series is connected with Host computer through a serial port RS232 cable. One end of the
cable is connected to the PC serial port (DB9 or DB25) while the other side round pin connector is
connected with the DVP-14SS CPU as shown in the Fig.
• The DVP-14SS training kit comes with a CD, which contains a folder with the WPL software. The
WPL software can be setup in Window 95, Window 98 or Window 2000 etc.
• The minimum system requirements for WPL software are Operating System:
▪ Window 95 or above
1. Insert the CD in the CD-drive and click on the WPL Software folder.
2. Then run the SETUP.EXE then the installation process will start
15
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
3. Then a window will appear, click “Next” button and then give user information i.e. name
and company name.
4. Then click “Next” and browse where you want to install the software and then click
“Next” button.
5. Select the “program folder” and click “Next”.
6. “Start copying file” window will appear and click on “Next” button.
7. Then the setup will be started and files will be copied to the specified folder. After
completing the setup process the “setup complete” window will appear and select the
“Launch the program file” on this it will launch the WPL software and then click
“finish”, it will complete the setup process
Program Execution:
When installation is completed, Double click WPLSoft icon to execute the program. The WPL editor
window will pop up. There are only File, View, Communication, Options and Help in the toolbar when
executing WPLSoft for the first time.
16
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
In this window you will have to give the “Title” of your program, PLC controller “Model or Machine type”,
and give a name to your file in “File Name”. Let’s give our program a Title i.e. say “Test”, PLC model is
“SS” and File name is “Dvp1”. Then click “ok” will open two windows on your screen one for “Ladder
diagram mode” and the second for “Instruction mode”. The “Title” and “File Name” will also appear on
the top of title bar of your screen.
When the above setting is finished, 2 sub windows will pop up. One is Ladder Diagram Mode and the other
is Instruction List Mode. Users can choose their favorable editing mode for programming PLC instructions.
17
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
The PLC status bar shown on the bottom of the window, indicates PLC series, steps used in ladder & the
total steps capacity and the instruction used location in the Window i.e. Row & Column.
• Ladder Mode: PLC controllers are mostly programmed in Ladder programming language,
because it is easy to use and their familiarity to technical personals. In this Lab, we will also use
ladder mode as a programming language. So maximizing the “Ladder Diagram Mode” will use
for ladder diagram and title bar will also show the “Ladder Diagram Mode”.
• Instruction Mode: Those, who are familiar to C-language or BASIC programming language or
have use Assembly Language for programming, can also use “Instruction Mode” for PLC
programming.
Figure shows some icons which can be freely used for the creating ladder, communication (PC to PLC) and
monitoring (Online or Offline) etc. These icons can be accessed from the Main Menu bar.
This icon will bring you to the Instruction Mode window. If someone want to use Instruction
Mode, then this icon can be used or from Menu bar <View>--<Instruction Mode>.
18
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
Clicking on this symbol will open the Ladder Mode Window or this can be also performed from
main menu bar as <View>--<Ladder>.
Clicking on this icon will open a window as shown in the Fig. In this window you can write your
comments or give a name to Inputs (X), Outputs (Y), Internal Relays (M) and Data registers (D) etc. In the
“View/Edit” window there are “*”, “Device” and “Notes” areas, firstly if on the right side of any “X”, ”Y”,
“M”, “D” devices etc. have “*” it mean that it has been used in the present ladder program. “Device” shows
the inputs, outputs, internal relays, and data register etc and “Notes” shows their comments. Once you write
your comments to Inputs, Outputs, Internal relays, Data register, Timer and Counters etc. save these
comments and then comeback to Ladder mode. There is also a second window “Comment used” containing
the special internal registers (M) with their comments and special data registers (D) with their comments.
On the Main Menu <view>--<Device Comments> will also open the same window.
The comments written in the above section can be shown on Ladder with the help of this icon.
Clicking on the icon will show your comments on each “X”, “Y”, “M” and “D” areas etc. in the ladder
program. Again clicking this icon will hide the comments in ladder program. From main menu the
<View>--<Comments Show> will also do the same work.
Clicking on this icon will bring to the Ladder Program to the On-line Monitoring if the PLC is
running. On-line monitoring mean that user will also see the status of I/O devices and internal relays, values
of timer and counters, changing data of Data register etc. When an external input or output device change
from OFF to ON state or the status of internal register changes or the contacts of timer and counter changes
19
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
from Low to High, then it will be shown as green color on ladder program in the on-line monitoring mode
as shown in the fig.4.8. The value of Data registers can be changed during on-line monitoring without
stopping the PLC. The status of only internal relays (M) can be changed by force i.e. “Force ON” and
“Force OFF” in the Online monitoring. By clicking mouse right button in the on-line monitoring, it will
show a small window for changing the Force ON/OFF status and data register value. From the main menu
bar <Communication>---<Ladder diagram monitor start> will also start the on-line monitoring.
This icon will show a window for the monitoring of devices. For example, if you want to monitor
the status of different devices. The double click on the “Device Name”, then a small window will appear
i.e. “Device monitor input” having “Device” and “Device Number” as shown in the fig.4-9. When the
device is ON in ladder software then the “Device status” will be shown in red color on this window. From
Main Menu bar <Communication>---<Device monitor> will go to the device monitor window.
20
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
After writing your Ladder program, compile the program for errors. If there are no errors in the
ladder program, then write it to the PLC controller then click to the “Run” button it will bring a small
window for the confirmation of the PLC. Press “Yes” to operate the CPU and it will start functioning. The
same work can be done from main menu bar as well <Communication>--<PLC Run>.
This icon stops the PLC operation and Input/Output will not function. From menu bar
<Communication>--<PLC Stop> will also stop the PLC operation. The “Stop” will also open a small
Window for the confirmation of the PLC to stop.
The code icon will convert your Ladder to Instructions and will check for errors. So, the compiling
process can be performed by this short icon or from main menu bar as <Compile>--<Ladder Diagram
Instruction> will also do the same job.
After writing ladder diagram and compiling it for errors, press this icon for “Writing to PLC” will
open a small window for communication of PC=>PLC as shown in the Fig. In this window, the
“Communication Mode” can set for “Read from PLC”, “Write in PLC” and “PLC<= =>HPP”. In transfer
setup program is transferred to the memory areas used in the ladder.
21
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
Press this icon for “Reading from PLC” will open a small window for communication of PC<=PLC
as shown in the Fig. In this window, the “Communication Mode” can set for “Read from PLC”, “Write in
PLC” and “PLC<= =>HPP”.
22
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
A simple and quick approach to Program a PLC through WPL Software is in the following steps:
This is a Normally Open (NO) contact or LD command. By clicking this icon a small window will
appear as shown in the figure below. The window gives some explanation about the “Input Command”
such as that it is an “Open Contact” and “Input Relay” if “X” is selected. The Device Name such as “X”,
“Y”, “T” and “C” etc. and Device Number mean it’s Address i.e. “X0”, “Y0” and “T0” etc. will be given.
The selected device possible range will be shown on the window such as X0~X177. The comments about
the device can be given such as for “X0” write “Start Button” mean that it is a start button. The shortcut for
this command is “F1”.
23
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
This is a Normally Close (NC) contact or LDI command and having the same “Device Command”
window given in figure above. But this window will give explanation about the “Close Contact”. The
shortcut for this command is “F2’.
This is a Rising Edge Input contact or LDP command. The same window will appear as shown in
figure above. The shortcut for this command is “F3”.
This is a Falling Edge Input Contact or LDF command. The same window will appear as shown in
figure above. The shortcut for this command is “F4”.
This command is used for the Step Command. Step instruction is a special programming command
used for the ladder programming working in steps. The same window will appear as shown in figure
above. The shortcut is “F5”.
This is used for giving the Application Command such as Input & Output, Timer & Counter, Shift
and Compare commands. The window shown in the figure will appear used for the application command.
The “Function List” will give the list of command. Let us select an “Output Command” then the window
will extended. Select “PLF” from the “Command” then the “API Number” will show “89”. There will be
also “Instruction Hint” which shows the about the instruction. The Device and its Number to which this
command is applicable can be selected from “D” and “Address/Value”. On the bottom of the small window
a small line shows the detail of devices to which this command is applicable are represented by a “*”
symbol. The shortcut for Application Command is “F6”
24
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
This icon is used for the Open Coil Output or OUT command can be also used for this purpose.
The shortcut for the Output Coil is “F7”. By clicking this icon the window shown in the “Device
Command” Figure will appear.
This icon is used for drawing the horizontal line between two devices. The shortcut for the line is
“F8”.
This icon is used for drawing the vertical line between two devices. The shortcut for the line is “F9”.
This is the inverted connection icon. When this is placed between two devices. The behavior of the
output device will change or will invert. The shortcut for invert function is “F11”.
This icon is used for the comparison of the two values. These are the special comparison instructions
as shown in figure below. The shortcut for the comparison command is “F12”.
25
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
Experiment # 03
Objective:
Study of Logic Gates in PLC (CLO-2, CLO-3)
OR Gate:
Gate that generates a logic high output in all states except when all inputs are logic low. The function of an
OR gate is simulated in the electric circuit displayed in Figure. the lamp will be ON when one or both
switches are closed.
Figure displays a two-input OR logic gate symbol, its Boolean expression, and its truth table. The truth
table shows a logic high output for all combinations of inputs except where both A and B are low. When
either input A, B, or both are on, the output is on.
Fig. Boolean expression, gate symbol, and truth table for a two-input OR logic gate.
26
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
Ladder Diagram:
Devices:
Device Function
Program Description:
AND Gate:
Gate that only generates a logic high output when all inputs are logic high. The function of an AND gate is
simulated in the electric circuit displayed in figure. The lamp will be on only when both switches are closed.
27
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
Figure displays a two-input AND logic gate symbol, its Boolean expression, and its truth table. In the truth
table, you can see that there is only one set of inputs that produces a logic high output.
Fig. Boolean expression, gate symbol, and truth table for a two-input AND logic gate.
Ladder Diagram:
Devices:
Device Function
Program Description:
NOT Gate:
Gate that generates a logic high output when all inputs are logic low. The function of a NOT gate is
simulated by the electric circuit displayed in Figure. When the switch is closed, the electric bulb is short
circuited, and it turns off. When the switch is open, electric current flows through the lightbulb, and the
lightbulb turns on. Like the NOT gate, the output is on when the input is off and vice versa. The input is
inverted to generate an output.
28
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
Figure displays the NOT logic gate symbol, its Boolean expression, and its truth table.
Fig. Boolean expression, gate symbol, and truth table for NOT logic gate.
Ladder Diagram:
Devices:
Device Function
Program Description:
29
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
NOR Gate:
Gate that generates a logic high output when all inputs are logic low. An inverted OR. The function of a
NOR logic gate is simulated in the electric circuit displayed in Figure. The lamp will be ON when both
switches are open. The NOR gate takes its name from NOT and OR. Its outputs are the inverse of the OR
gate.
Figure displays a two-input NOR logic gate symbol, its Boolean expression, and its truth table. Notice the
NOR gate can be built by connecting an OR gate in series with a NOT gate. Using the De-Morgan theorem,
you can convert a NOR gate to an AND gate with inverted inputs where (A + B) ′ = A′ · B′.
Fig. Boolean expression, gate symbol, and truth table for a NOR logic gate.
Ladder Diagram:
30
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
Devices:
Device Function
Program Description:
NAND Gate:
Gate that does not generate a logic high output when all inputs are logic low. An inverted AND. The
function of a NAND gate is simulated in the electric circuit displayed in Figure. Notice that the lamp will
be off when both switches are closed. The NAND gate takes its name from NOT and AND. Its outputs are
the inverse of the AND gate.
Figure displays a two-input NAND logic gate symbol, its Boolean expression, and its truth table. Notice
that the NAND gate can be built by connecting an AND gate in series with a NOT gate. Using the De-
Morgan theorem, sometimes also called the Bubble method, you can convert a NAND gate to an OR gate
with inverted inputs where (A · B) ′ = A′ + B′.
31
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
Figure. Boolean expression, gate symbol, and truth table for a NAND logic gate.
Ladder Diagram:
Devices:
Device Function
Program Description:
32
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
XOR Gate:
Gate that generates a logic high output when one input is logic high and the other input is logic low or vice
versa. The function of an XOR (exclusive OR) gate is simulated in the electric circuit displayed in Figure.
The lamp will be on if one switch is open while the other switch is closed.
Figure displays an XOR logic gate symbol, its Boolean expression, and its truth table. Looking at the truth
table, you can see that either inputs A or B (but not both) must be high to produce a high output. One input
must be ON and the other one OFF in order to have the output ON.
Fig. Boolean expression, gate symbol, and truth table for an XOR logic gate.
Ladder Diagram:
33
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
Devices:
Device Function
Program Description:
XNOR gate:
Gate that generates a logic high output when either both inputs are logic high or both inputs are logic low.
The function of an XNOR (exclusive NOR) gate is simulated in the electric circuit displayed in Figure. The
lamp will be on when either both switches are open or closed. The lamp will not be on if only switch A is
activated, or if only switch B is activated.
34
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
Figure displays an XNOR logic gate symbol, its Boolean expression, and its truth table. Notice the XNOR
gate can be built by connecting an XOR gate in series with the NOT gate. When either or both pushbuttons
are pressed or not pressed, the output is ON.
Fig. Boolean expression, gate symbol, and truth table for an XNOR logic gate.
Ladder Diagram:
Devices:
Device Function
Program Description:
35
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
Experiment # 04
Objective:
Study of Timers in PLC (CLO-2, CLO-3)
Timers in PLC Trainer:
Instruction Sheet:
Timer Syntax:
Explanations:
When TMR instruction is executed, the designated coil of the timer will be On and the timer will start to
time. When the set value in the timer is reached (present ≥ set value), the contact will be:
36
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
Types of Timers:
1. On-Delay Timers:
Timer which turns output “on” after a preset time when it is energized.
Timing Diagram:
Example:
To get a TMR of 3 seconds, you can use any of the Timers described above as follows:
Control Purpose:
Enabling the indicator to be ON after a 3 second delay and OFF immediately by the switch.
37
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
Devices:
Program Description:
• When X37 = ON, TMR instruction will be executed. Timer T0 will be ON and start counting for 3
sec. When T0 reaches its st value, the NO (Normally open contact) T0 will be activated and
indicator Y0 will be ON.
• When X0 is OFF, TMR instruction will not be executed. Timer T0 will be OFF and so will NO
contact T0. Therefore, indicator Y0 will be OFF.
2. Off-Delay Timers:
Timer which turns output “off” after a preset time when timer has lost power.
Timing Diagram:
Example:
To get a TMR of 5 seconds, you can use any of the Timers described above as follows:
Control Purpose:
Enabling the indicator ON immediately and OFF after 5 sec delay by the switch.
38
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
Devices:
Program Description:
• X37= ON when the switch turned on. Normally closed contact X37will be activated, and TMR
instruction will not be executed. Coil T0 will be OFF and so will the NC contact T0. Because X37
=ON, the indicator Y0 will be ON and latched.
• X37=OFF when the switch is turned off. The Normally closed contact X37 will not be activated,
which makes TMR instruction executed. Indicator Y1 will be ON by the latched circuit until T0
reaches its set value.
• When timer T1 reaches its set value of 5 seconds, coil T1 will be ON. The NC contact T0 will be
activated, which makes the indicator y0 OFF.
Exercise # 1:
Figure below shows how on-delay timers can be used to produce an on-off cycle timer. The
timer is designed to switch on an output for 5s, then off for 5s, repeating this cycle.
Timing Diagram:
39
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
Ladder Diagram:
Devices:
Program Description:
Exercise # 2:
Design a ladder logic program that could be used to flash a LED on and off at 2Hz. Use switch 1 to start
flashing sequence. The flashing sequence should only occur as long as switch 1 is on.
Ladder Diagram:
40
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
Timing Diagram:
Devices:
Program Description:
Exercise No 3:
41
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
Ladder Diagram:
Devices:
42
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
Program Description:
43
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
Experiment # 05
Objective:
Study of counters in PLC (CLO-2, CLO-3)
Counters in PLC Trainer:
A set of PLC instructions that counts, calculates, or keeps a record of the number of times something
happens. Counter instructions are internal to PLC. Counters simply count and store the number of events
that occurs.
Instruction Sheet:
Counter Syntax:
Explanations:
When the CNT instruction goes from Off to On, the designated counter coil will be driven, and the present
value in the counter will plus 1. When the counting reaches the set value (present value = set value), the
contact will be:
44
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
Devices
X0 Input to counter
C0 General purpose counter
Y0 Output of counter
Program Description:
Devices:
X0 INPUT
Y0 OUTPUT
C115 Retentive Counter 114~127
Y1 Output of Counter
Program Description:
45
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
Exercise # 1:
An indicating light is to go on when a count reaches 5. The light is then to go off when a count of
8 is reached.
Ladder Diagram:
Devices:
Device Function
Program Description:
Exercise # 2:
46
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
Ladder Diagram:
Devices:
Device Function
Program Description:
Exercise # 3:
Once the photoelectric sensor detects 10 products, the robotic arm will begin to pack up. When the action
is completed, the robotic arm and the counter will be reset.
47
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
Ladder Diagram:
Devices:
Device Function
Program Description:
48
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
Exercise # 4:
Ladder Diagram:
Devices:
Device Function
49
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
Program Description:
50
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
Experiment # 06
Objective:
To develop a program for Latching, Direct Online starter, Interlocking, Motor
Reverse and Forward, Star-Delta starter in PLC. (CLO-2, CLO-3)
(A momentary switch) The latching instructions let us use momentary switches and program the plc so that
when we push one the output turns on and when we push another the output turns off. This would be the
function of a latching instruction. The latch instruction is often called a SET.
Control Purpose:
• Turn on the switch, the light will be ON; turn off the switch, the light will be OFF.
Devices:
Device Function
X0 Switch-ON button, X0 will be ON when pressed
X1 Switch-OFF button, X1 will be ON when pressed
Y0 Output Indicator
Latched Circuit
51
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
Program Description:
• In the above programs, when X0 goes from OFF to ON, Y0 will stay in ON state. When X1 goes
from OFF to ON, Y0 will stay in OFF state.
• When X0 and X1 enables at the same time, it will “stop first”, that is, Y0 and the indicator will be
OFF.
One method of starting electric motors is using direct on line (DOL). 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.
The starter can be containing 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.
Ladder Diagram:
52
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
Devices:
Device Function
Program Description:
Interlocking
To interconnect the output circuit in such a way, in which the second output will not start until the first one
run. This kind of output circuit connection is called interlocking.
Interlock Circuit:
53
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
Control Purpose:
• The Entry/Exit of the parking lot is a single lane passage. By controlling the indicators, the program
ensures that only one car can pass through the Entry/Exit so as to prevent car accident between
entering and leaving cars
Devices:
Device Function
X0 Car entering sensor. When a car passes through the sensor, X0 =ON.
X1 Car leaving sensor. When a car passes through the sensor, X1 =ON.
Y0 Entering car indicator (ON means “GO”, OFF means “STOP”)
Y1 Main Contactor coil of motor (ON means “GO”, OFF means “STOP”)
Ladder Diagram:
Program Description:
54
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
The interlock contacts installed in the previous section work fine, but the output will run only as long as
each push button switch is held down. If we wanted to keep the motor running even after the operator takes
his or her hand off the control switch(es), so change the circuit in a couple of different ways:
Let’s see how the approach is implemented since it is commonly used in industry:
55
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
When the “Forward” pushbutton is actuated, Y0 will energize, closing the normally-open auxiliary contact
in parallel with that switch. When the pushbutton is released, the closed Y0 auxiliary contact will maintain
current to the coil of Y0, thus latching the “Forward” circuit in the “on” state. The same sort of thing will
happen when the “Reverse” pushbutton is pressed.
Devices:
Device Function
Ladder Diagram:
56
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
Devices
Device Function
Ladder Diagram:
57
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
Star-Delta Starter:
Star-Delta connection is a type of starting method of 3 phase AC Induction Motor. Normally Starter is used
for smooth starting of a motor. Star-Delta starter starts motor by reducing the initial current. Initially
the motor is connected to star connection. After a time, the motor is connected to delta connection.
Devices:
Device Function
58
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
Ladder Diagram:
Program Description:
59
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
Experiment # 07
Objective:
To study Data Handling (Move, Compare and Arithmetic) instructions in PLC.
(CLO-2, CLO-3)
Data Handling:
Timers, counters, and individual internal relays are all concerned with the handling of individual bits, that
is, single on/off signals.
PLC operations involving blocks of data representing a value; such blocks are called Words. A block of
data is needed if we are to represent numbers rather than just a single on/off input.
Data handling consists of operations involving moving or transferring numeric information stored in one
memory word location to another word in a different location, comparing data values, and carrying out
simple arithmetic operations.
For example:
there might be the need to compare a numeric value with a set value and initiate action if the actual value
is less than the set value.
Data Register:
Each Data Register in Delta PLC can store a Binary Word of 16 bits.
Move Instruction:
60
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
Explanations:
Program Example:
Arithmetic instructions can be used to design to add, Subtract, Multiply and Divide two registers.
ADD D0 D1 D2
D1 Source Register
D2 Destination Register
Operation:
The data contained within source devices (D0, D1) is combined and the total is stored at the specific
destination (D2).
61
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
• Another dialogue box will open where you will select the source and the destination registers
Subtract:
SUB D0 D1 D2
D1 Source Register
D2 Destination Register
Operation:
The data contained within the source device, D1 is subtracted from the contents of source device D0. The
result or remainder of this calculation is stored in the destination device D2.
MUL K D0 D1
62
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
D1 Source Register
D2 Destination Register
Operation:
The contents of the two source devices (D0, D1) are multiplied together and the result is stored at the
destination device (D2).
Program Description
This command is used to multiply two registers; we can also use it to multiply a decimal value with any
register value.
DIV D0 D1 D2
D1 Source Register
D2 Destination Register
63
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
Operation
The primary source (D0) is divided by secondary source (D1). The result is stored in the destination (D2).
The normal rules of algebra apply.
Program Description
This command is used to divide two registers, we can also use it to divide a decimal value with any
register value.
• Another dialogue box will open where you will select the source and the destination registers
Compare Instruction:
Operands:
Program Example:
64
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
Program Description:
Program Description:
65
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
Experiment # 08
Objective:
To study Conditional Jump, Pulse Width Modulation, Master Control Set and
Reset Instructions in PLC (CLO-2, CLO-3)
Conditional Jump
Operands:
Explanation:
When the user does not wish a particular part of PLC program, CJ instruction can be adopted.
Program Example:
Command Syntax: CJ
Exercise:
Device a ladder program to skip the punching by Y0 if the object is bigger. Use Conditional Jump
command to skip the punching operation.
66
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
Ladder Program:
Program Description:
67
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
Operands:
S1: Pulse output width S2: Pulse output period D: Pulse output device (only be specified as Y1)
Explanations:
1. S1 ≤ S2.
2. See the specifications of each model for their range of use.
3. In SS series MPU, PWM instruction can only be used once in the program.
4. Flags: See remarks for more details.
5. Range of S1: (t) 0 ~ 32,767ms.
6. Range of S2: (T) 1 ~ 32,767ms (but S1 ≤ S2).
7. D for SS series MPU: (only be specified as Y1)
8. PWM instruction designates the pulse output width in S1 and pulse output period in S2 and outputs
from output device D.
Program Example:
1. When X1 gets ON, Y1 will generate pulses with the ON time = 1 seconds and OFF time = 0.5 sec.
In other words, duty cycle is 50% and cycle time is 1.5 seconds
𝑃𝑊
2. Duty Cycle, D =
𝑇
Timing Diagram:
68
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
Exercise:
Generate the train of 500 pulses for Y1. (On time 1 second and Cycle time 1.5 seconds)
Ladder Program:
Program Description:
• When X0 gets ON, Y1 will generate pulses with the ON time = 1 seconds and OFF time = 0.5
sec.
• In ladder 9, the falling edge of Y1 will increment D0 every time when the pulse falling edge
comes. When the number of pulses is equivalent to 15, M1 gets TRUE and stops the train of
pulses.
• In ladder 25, falling edge of X0 is used to reset the D0
Explanations:
69
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
1. MC is the main-control start instruction. When the MC instruction is executed, the execution of
instructions between MC and MCR will not be interrupted. When MC instruction is OFF, the motion
of the instructions that between MC and MCR is described as follows:
Timer The counting value is set back to zero, the coil and the contact are both
turned OFF
Accumulative timer The coil is OFF, and the timer value and the contact stay at their present
condition
Counter The coil is OFF, and the counting value and the contact stay at their
present condition
Coils driven up by the All turned OFF
OUT instruction
Devices driven up by Stay at present condition
the SET and RST
instructions
Application All of them are not acted
instructions
2. MCR is the main-control ending instruction that is placed at the end of the main-control program and
there should not be any contact instructions prior to the MCR instruction.
Program Example:
• If X27 is TRUE, the zone from ladder 4 to ladder 14 will be enable and instruction will work as
per the logic.
• If X27 is FALSE, the zone from ladder 4 to ladder 14 will be disabled and all OUT bits will get
FALSE but the SET bit will retain its state.
70
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
Exercise:
There are 3 groups participating in the quiz game: pupils, high school students and professors. If they want
to get the chance of answering the question from the host, they must press the answer button on their table
first. Other groups’ pressing will be invalid if any group gets the chance successfully
• There are 2 answer buttons for the pupil group and professor group and 1 answer button for the
high school student group. In order to give preferential treatment to the pupil group, Y0 will be ON
if any one of X0 or X1 is pressed. However, in order to limit the professor group, Y2 will be ON
when X3 and X4 are pressed at the same time. For the high school student group, Y1 will be ON
when X2 is pressed.
• If the host presses X5 (Reset NC button), Y0, Y1 and Y2 will be OFF.
Devices:
Device Function
71
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
Ladder Diagram:
Program Description:
72
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
Experiment # 08
Objective:
To study Analog Input and Digital Output in PLC (CLO-2, CLO-3)
Analog Input Signals
Analog input modules are used in applications where the field device’s signal is continuous as shown in
figure. Unlike discrete signals, which possess only two states (ON and OFF), analog signals have an infinite
number of states.
Example:
PLCs are discrete systems that only understand 1s and 0s. Therefore, they cannot interpret analog signals
in their continuous form. Analog input interfaces translate continuous analog signals into discrete values
that can be interpreted by PLC processors. These discrete values are subsequently used in the control
program. Table lists some devices that are typically interfaced with analog input modules.
73
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
Analog input modules digitize analog input signals, thereby bringing analog information into the PLC as
shown in the figure. The modules store this multibit information in register locations inside the PLC.
Figure below illustrates the sequence of events that occurs while reading an analog input signal.
The module transforms the analog signal, through an analog-to-digital converter (A/D), into 12
bits of digital information that will be stored in register 1000 after the instruction is executed. After
the PLC reads this information, the control program can reference the register address for
comparisons, arithmetic calculations, etc. The analog value stored in the register will be in either
BCD or binary format.
The contents of register 1000 be after the multibit instruction shown in Figure below is executed. After the
instruction is executed, the contents of register 1000 will be: 0000 1010 1100 1111
74
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
This number corresponds to the digitized value generated by the module. Since the value is represented in
12 bits, the preceding bits are filled with 0s. Note that the value stored in register 1000 is in binary. Its
decimal equivalent, for computational purposes, is 2767.
Field devices that provide an analog output as their signal (analog sensors or transducers) are usually
connected to transmitters, which in turn, send the analog signal to the module. A transducer converts a
field device’s variable (i.e., pressure, temperature, etc.) into a very low-level electrical signal (current or
voltage) that can be amplified by a transmitter and then input into the analog interface as shown in figure.
75
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
Due to the many types of transducers available, analog input modules have several standard electrical input
ratings. Table 7-2 lists the standard current and voltage ratings for analog interfaces. Note that analog
interfaces can be either unipolar (positive voltage only—i.e., 0 to +5 VDC) or bipolar (negative and positive
voltages—i.e., –5 to +5 VDC).
An analog input module transforms an analog input signal via a sensor/transmitter unit into a discrete value
that is readily understandable by man and machine as shown in Figure. This transformed value is the digital
equivalent of the variable analog signal (e.g., pressure in psi).
Resolution:
An analog-to-digital converter (A/D or ADC) performs the signal conversion in an analog input
module. The converter divides, or digitizes, the input signal into many digital counts, which
represent the magnitude of the current or voltage. This division of the input signal is called
resolution. The resolution of the module indicates how many parts the module’s A/D will divide
the input signal into; it is given as a function of how many bits the A/D uses during conversion.
For example:
If an A/D breaks down an input signal using 12 bits or 4096 parts (i.e., 212 = 4096) as shown in
Figure 7-8, it has a 12-bit resolution (i.e., a 12-bit binary number with a value ranging from 0000
76
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
to 4095 decimal will represent the signal). In this case, the manufacturer could then use the
remaining bits (bits 14–17) as status monitoring bits, representing module conditions such as
active, OK, channel operating, etc. An A/D converter transfers its digital-equivalent values to the
processor, which in turn, makes them available for use in register or word locations.
During the control of the process, a signal variable is measured by a sensor and passed to the input module.
The module transforms the signal into discrete value according to the resolution of the A/D convertor.
Delta PLC Analog module provide four input channels per interface. Therefore, they can connect to several
input signals.
Example:
As shown in the figure below, the discrete value is placed in a holding register inside the module which
will transfer the value once the appropriate instruction is executed during the program scan evaluation of
the ladder control program. The Instruction will transfer the numeric analog value into a register specified
by user in the analog input instruction used. This value is stored in the data table under a word location or
register storage location defined by the instruction.
77
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
78
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
• Select Channel input present value, this provides you with selection that which input channel you
want to use for giving input to PLC.
• Check selection box of “Read Register.”
• Click on Preview, then click “Add to list” to generate program codes..
• Click ok.
79
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
Exercise:
Control the temperature using comparison instructions in PLC where outputs are energized until the setpoint
is reached.
The heater turns on when the temperature falls to or below 597 degrees and turns off when the temperature
reaches 603 degrees or more. Compare for both source values for high and low temperature to control the
heater.
Ladder Diagram:
80
Department of Electronics Engineering UET Taxila, Sub-Campus Chakwal
Industrial Electronics Lab Manual (EE-422A)
Devices:
Device Function
Program Description:
81