Академический Документы
Профессиональный Документы
Культура Документы
Experiment # 01
Objective
Introduction to Programmable Logic Controller
Input
Devices
CPU
The principle operation of CPU is to accept (reads) input data from sensing devices, executes the user
program from memory and sends appropriate commands to control devices.
Programming Device
The Programming device is used to enter the required program into the memory of the processor. The
program is developed in the device and then transferred to the memory unit of the PLC.
Input/Output Modules
Input/output modules are where the CPU receives information from external devices and communicates
information to external devices. Input devices are (e.g. start and stop pushbuttons, sensors, limit switch,
selector switch) and output devices are (e.g. lights, solenoid valve, relays, buzzer, fan).
1
Industrial Electronics
Delta PLC
Analog Inputs
Digital Inputs
2
Industrial Electronics
Sr # Name Remarks
Power Supply Module
1. DVP-PS01
2. DVP-14SS
3. DVP-SP16 x 2
3
Industrial Electronics
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.
4
Industrial Electronics
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 timer 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 represents 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
5
Industrial Electronics
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.
Some special data registers are:
D1000 is watchdog timer value. Watchdog timer is used if the scan time of your ladder
program increases from the value set in this data register.
D1001 shows the PLC model number and memory capacity.
D1004 shows the error flag number.
D1010 shows the current scan time.
D1061 shows the detailed error codes.
Some of the special data registers are Read only, which cannot be changed, and some special register can
be changed according to your requirements.
Ladder logic uses graphic symbols similar to relay schematic circuit diagrams. The structure behind
ladder logic is based on the electrical ladder diagrams that were used with relay logic. These diagrams
documented how connections between devices were made on relay panels; they are called “ladder”
diagrams because they are constructed in a way that resembles a ladder with two vertical rails and rungs
between them. The positive power rail (on the left) flows to the negative power rail (on the right) through
the physical devices connected on the rung. The example below shows a ladder diagram with
pushbuttons (PB), control relays (CR), a motor (M) and a light (L).
Ladder logic was designed to have the same look and feel as relay logic diagrams, but with ladder logic,
the physical contacts and coils are replaced with memory bits. Let’s take a look at figure 8.
6
Industrial Electronics
For this program, the relay logic’s ladder diagram is duplicated with ladder logic; no more hard-wired
logic, but memory locations instead. Some of these memory locations are used internally and others are
used with external inputs and outputs. To monitor and control real world devices, they will need to be
wired to I/O modules.
For this particular Delta PLC Trainer, these inputs and outputs are assigned to X and Y memory addresses
like the X0 seen with PB1. This normally open contact’s state is read from the input on the I/O module
where the physical pushbutton is connected. On the other hand, each Y bit will have an output device
wired to it as seen with the light controlled by Y1. All of the other locations are assigned to internal bits
that we can use as needed.
Before starting to execute the logic, the CPU reads the physical inputs tied to the I/O modules to update
their status in the CPU’s memory table. Then, starting at the top left of the program, the CPU works its
way down the rail executing each rung or sub rung from left to right. So if PB1 is pressed, the CPU will
turn ON CR1. Since CR1 has changed states, in rung 3 the CPU will activate CR3. CR3’s normally-
closed state is used in rung 4, so the CPU will then turn OFF L1.
Even though we still refer to coils and contacts in ladder logic, remember that they are memory
representations, not actual devices. Once the CPU reaches the last rung it will update the real world
outputs, then loop back and run it all again. This process will continue as long as the CPU is powered and
in the RUN mode.
7
Industrial Electronics
Output Coil
If any left-to-right path of inputs passes power, output energized.
WPLSoft is a program editor of Delta DVP series PLC for WINDOWS computers. In addition to general
PLC programming and WINDOWS editing functions (e.g. Cut, paste, copy, multi-window display, etc.),
WPLSoft also provides various comment editing as well as other special functions (e.g. register editing
and settings, file accessing and saving, contacts monitoring and setting, etc.).
Program Execution
When installation is completed, Double click WPLSoft icon to execute the program. The WPL editor
window will pop up, as shown below. There are only File, View, Communication, Options and Help in
the toolbar when executing WPLSoft for the first time.
8
Industrial Electronics
Then the “Machine type setting” window will appear as show in fig 6.
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
9
Industrial Electronics
model is “SS-series” 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” as shown in the fig. 7. The “Title”
and “File Name” will also appear on the top of title bar of your screen.
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 manual, 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: But some people, 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.
Fig.8 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.
Figure 8: Icons
10
Industrial Electronics
Now let’s discuss the some important symbols used in the Ladder programming. The Fig. 9 shows some
important ladder symbols.
Figure 9
This is a Normally Open (NO) contact or LD command. By clicking this icon a small window
will appear as shown in the fig. 9. 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”.
This is a Normally Close (NC) contact or LDI command and having the same “Device Command”
window given. But this window will give explanation about the “Close Contact”. The shortcut for
this command is “F2’.
11
Industrial Electronics
This is a Rising Edge Input contact or LDP command. The shortcut for this command is “F3”.
This is a Falling Edge Input Contact or LDF command. 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 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 fig. 4-13 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 “OPI” and “Device Number”. 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”
12