Implementation of An 8 Floor Control System With A PDF
Implementation of An 8 Floor Control System With A PDF
com
www.ebook777.com
Implementation of an 8 Floor Control System with a PLC
free ebooks ==> www.ebook777.com
Seyedreza Fattahzadeh
free ebooks ==> www.ebook777.com
© 2015 Seyedreza Fattahzadeh
www.plc-doc.com
[email protected]
No part of this book may be reproduced, in any form or by any means, without the written
permission from the author / publisher.
www.ebook777.com
NOTICE TO THE READER
free ebooks ==> www.ebook777.com
All rights reserved. No part of this book may be reproduced, in any form or by any
means, without permission in writing from the publisher.
Every effort has been made to ensure our books are as accurate as possible. However,
there may be mistakes, both typo and in content. This content should be used as a general
guide and not as the solution. The author does not warrant or guarantee any of the
products described herein. Also, the author does not warrant or guarantee any of the
equipment or programs described herein or accept liability for any damages resulting from
their use. The reader is warned that both electricity and the construction of electrical
equipment can be dangerous. It is the responsibility of the reader to use common sense
and safe electrical and mechanical practices.
SIMATIC STEP7, LOGO! Soft Comfort software, SIMATIC S7-300, and LOGO! PLCs
are trademarks of SIEMENS AG Inc.
PanelMaster ® is a registered trademark of Cermate Technologies INC.
EasyView ® is a registered trademark of MKS instruments.
VFD-004M series ® is a registered trademark of Delta Electronics.
free ebooks ==> www.ebook777.com
Please be informed that:
This book contains many images. Since eReaders don’t always display images well,
upon request, I will provide you with the PDF file which contains the complete e-Book,
including the images, if you need an easier-to-read format. To receive a PDF version of
this e-book or any other software which is mentioned in the content of this text, you can
email me the proof of your purchase of the kindle version of the book from Amazon.com
to [email protected]. Upon receipt of that proof, a PDF version will be sent to your
email address.
www.ebook777.com
Table of Contents
Preface
free ebooks ==> www.ebook777.com
About the author
How to use this book
Read me first
Chapter 1
Project scope
Car sliding door mechanism
Schematic diagram of the 7-segment display
Binary-coded decimal
Chapter 2
SIMATIC S7-300 PLC and its wiring
The Voltage Divider circuit
Chapter 3
Recognize position (FC1)
Manual State (FC2)
Auto state
Record all requests (FC3)
Detect direct (FC4)
Detect Service (FC5)
Turn Motors on (FC6)
Change Speed (FC7)
Update some LEDs in auto (FC8)
Exit from Auto (FC9)
Update outputs in every scan (FC10)
Monitoring (FC11)
Initializing (OB100)
Chapter 4
Introduction
Basic wiring
Driver Keypad
Change setting
free ebooks ==> www.ebook777.com
Chapter 5
What is a “Human Machine Interface (HMI)” device?
Programming the PanelMaster display
Programming WinCC
Making a Connection
Designing a monitoring screen
Appendix A
Appendix B
Question and Answers about this project
Conclusion
My e-book product list
www.ebook777.com
Preface
free ebooks ==> www.ebook777.com
The purpose of this manual is to design and implement an eight-floor elevator control
system. This project is an upgraded version of my previous one, which was published
about a year ago: Programming a 4 Floor Elevator with SIMATIC S7-300 and LOGO
Programmable Logic Controllers (PLC).
The five most important features of this version, compared to the previous version are
as follows:
1. The upgraded version control software is more complicated than the previous one,
since it has been prepared for an Elevator System with 8 stops as opposed to that
with 4 stops.
2. Two different car-traveling speeds are being used in this version to ensure smooth
picking and dropping of a passenger.
3. Permanent magnets and a hall sensor are used to detect current location of the car
as opposed to the application of 5 limit switches employed to detect current
position of the Elevator Car.
4. This version has two modes of operations: Automatic and Manual. In Manual
mode, an operator can move the car up/down or open/close the car's door, just by
depressing four related push-buttons.
5. The Control program of the 4 Floor System was prepared using STEP7 SIMATIC
MANAGER software as opposed to the current version, which also comes with a
second control software developed using LogixPro. This second Control Software
allows the developer/programmer to download even a trial version of LogixPro
and use the code to master his/her programming a PLC,the instructions being fully
supported by RSLogix 500 developed for Allen Bradley family of PLCs.
The final aspect of this experiment is to organize the ladder logic intelligently, to make the
troubleshooting easier. Hence the purpose behind developing a manual like this is to make
the learning of programming aspect of PLCs more enjoyable. Learning to understand the
familiar control systems, such as a full functional eight-floor-elevator brings out how and
why latches, timers, limit switches, sensors, and relays are used. Although the programs in
this manual are written for SIMATIC S7-300 PLC Simatic Manager and LogixPro
software to develop the control software, the ideas and program layouts are universal to
any PLC.
free ebooks ==> www.ebook777.com
About the Author
Seyedreza Fattahzadeh holds a Bachelor of Science in Electrical Engineering from
the University of Texas at Arlington. His main expertise is in digital systems, electronics,
and computer engineering.
Seyedreza has extensive experience in the field of programmable controllers. He has
worked for a few industrial manufacturers as a prime part of programmable controller
consulting firm. His industrial experience includes designing and implementing mid-class
automation systems, based on PLC.
Seyedreza has authored several other books on programmable controllers. You can
find more information on these, at the end of this book.
www.ebook777.com
How to use this Book
free ebooks ==> www.ebook777.com
This book details programming a SIMATIC S7-300 PLC as an 8 Floor Elevator
Control System. In other books of mine, I have talked about the basics of Programming
with different models of PLCs. This book has been prepared for those who are already
familiar with the basic PLC instructions, and maybe have already developed some PLC-
based programs for different purposes. Therefore, this text is prepared for those who want
to challenge their PLC programming knowledge to generate even more complex industrial
PLC programs with enhanced features: in this case, preparing a control program for a
SIMATIC S7-300 PLC to control an 8 Floor Elevator System.
The project specification is presented to you. It contains all the aspects including
goals, functionalities, and details required for the development of this controller system to
fulfill the project's typical minimum requirements. Study the project requirements
presented in this text carefully. Your job is to generate the main control program, to fulfill
the project's requirements. Take your time as much as you think it is needed. You can use a
pen and paper, a PLC simulator software, or your own PLC (any brand!) hardware to
develop the control program. Once you have done this, review and compare it with the one
presented in this text. If your solution works right, then you can celebrate the
accomplishment, as you have learnt something new about your level of capability when it
comes to PLC programming. If the solution you came up with, has some problems and
somehow does not function as it is intended to be, then you can compare your solution
against mine. In this case, you know that you did your best, and tried it on your own. You
can use my solution to find out what went wrong with yours. Once you find it out, you can
resolve the issue and make your solution function correctly. And, that is the whole purpose
of this text. It is indeed to motivate you enough, and make you enthusiastic towards
completing a relatively complex PLC program.
The Main Control Program solution is prepared in LDA formats using STEP7
software, developed by SIEMENS. In addition, the schematic of all hardwires used in
project is given. The amount of effort you want to invest in implementing this project, is
completely up to you and depending on your interest. If you wish, you can build your own
controller hardware similar to the one presented in this text, or even tailor it to the one
with more features as you prefer. In either case, just by simulating the presented program
and checking its performance, you can improve your programming knowledge, and
ultimately, this is the whole purpose behind developing the text from my side.
Seyedreza Fattahzadeh
Winter of 2015
free ebooks ==> www.ebook777.com
Read me first – list of different application programs developed for this
project
In the chapter 1, we are going to develop the main circuit program for S7-300 PLC,
which when executed, controls an 8 Floor Elevator System based on a defined project
specification given. It also establishes a communication path with two HMI devices, to
show all related process data on either a PC's monitor or a stand-alone HMI device.
You are assumed to be able to develop a circuit diagram of this project with even extra
features on your own. Just in case, if you wish to have the code I developed for this
project, you only need to email me the proof of your purchase from any online websites
such as eBay, Amazon, etc. to my email address [email protected]. Upon receipt of that
proof, the software will be sent to your email address. The following table shows the
folder and file names that I have used, to develop my circuit programs or the application
programs for HMI or PC based displays devices.
www.ebook777.com
Chapter 1
free ebooks ==> www.ebook777.com
Project Scope of an 8 Floor Elevator Control System
free ebooks ==> www.ebook777.com
www.ebook777.com
Project Scope
free ebooks ==> www.ebook777.com
In this project, we want to develop a PLC program to control an eight floor elevator
with two main modes of operation: Auto and Manual.
In the Manual mode, the operator can move an elevator car up\down or open\close the
elevator car door. All other push buttons available on the keypad, are disabled in Manual
mode. Change of mode from Auto to Manual and vice versa, is done by a small hammer
switch and is indicated with two Green and Red LEDs. In the Auto mode, a Green LED is
turned on and in the Manual mode, the Red one. In Figure 1-2, the Hammer switch and
LEDs are designated with # 1.
In the Auto mode, at the startup time, the car door closes (and it takes about 5 seconds)
and the elevator car is moved to the first floor. PLC saves the last position of the car. Then
for the next runs, the car is not directed to go to the first floor anymore.
The elevator has a main keypad consisting of 21 push buttons, 21LEDs, one Hammer
switch, and a 7-segmnet display to show the floor number. Figure 1-1 displays a very
simplified block diagram of the prototype of 8 Floor Elevator system.
Figure 1-2 displays an exploded view of the main keypad. In figure1-2, when any floor
call button is depressed (designated with # 7 in yellow color), after a delay of about 5
seconds to let any additional key to be pressed, the car door closes (moves to left), the car
travels to the called floor, the elevator car door opens, and it awaits providing a next
pickup service. After completing any service, the car door will open and the control goes
to its standby mode and becomes ready to handle next call service.
Figure 1-1
When any call button related to the group designated with # 6 is pressed, control code
reacts the same way as it does when any call button designated with # 7, but this time code
assumes that the service call is coming from the car internal keypad and therefore shows a
free ebooks ==> www.ebook777.com
image of a human inside the elevator cabin on the HMI display.
Notice that all call buttons have LEDs embedded on the top left. The main purpose of
each LED is to confirm whenever any related button is depressed. Upon depression of any
call button, the related LED turns either on solid or remains blinking till the car reaches
the related floor.
Let's say a call button # 5 (group # 6) is pressed and elevator car is stationed at floor #
1. Since the call button is related to the keypad which is installed inside the car, the control
code assumes that someone is inside the car now and wants to be dropped off at the 1st
floor. Control code executes the following steps:
1. It shuts the car door (after 5 seconds from the time of the call button depression)
2. Green LED is turned on (blinking)
3. Hoist motor is tuned on to move the car upward
4. The Red LED # 1 turns on (solid) related to group 6 and the Red LED #1 on group
# 7 turns on (blinking)
5. Green blinking LED and two other call buttons are turned off after the car gets to
its destination which is 1st floor
6. The 7-segment display # '1', Hoist Motor is turned off and car door is opened.
Figure 1-2
Any of the four push buttons in group # 4 is used to move the elevator car upward or
downward and or move the car sliding door to the left (to close) or to the right (to open) it
www.ebook777.com
respectively (when the system is being operated in Manual mode).
free
In Figure 1-2, the 9 ebooks ==> www.ebook777.com
th push button is called Emergency Button, which is activated
when there is an emergency situation inside the Elevator. For example, if somebody is
trapped inside the elevator, he/she wants to inform others about the occurrence of any fault
in the system. By depressing the Emergency Button momentarily, a horn or blinking light
turns on (usually located outside the system) to ensure that any trapped person will receive
the help. Depressing the same Emergency Button again, turns off the light.
Figure 1-3 displays some field devices installed on the fixture of the prototype
Elevator System. Three limit switches installed on the fixture are EMS_UP, EMS_DOWN
and the 1st floor limit switches whose outputs are connected to PLC at addresses I1.3, I1.2
and I1.1 respectively. Notice that output of Hall sensor is connected to I1.0 of PLC.
Hoist motor is a 3~phase motor whose power terminals are wired and connected to the
output terminals of 1/3phase (@0.4 KW) VFD drive.
Figure 1-3
In Figure 1-3, notice that detection of the current location of the Car of the 'elevator' is
implemented by the application of 16 pieces of permanent magnets and a Hall Effect
free ebooks ==> www.ebook777.com
sensor. Anytime the tip of the sensor is located right across of any N pole, its output is set
to 1 (High), and when it is passing by an S pole, the sensor output is set to (Low). PLC can
detect the current location of the 'elevator car' by counting the number of '1s' or '0s'
coming from the sensor output while the Car is moved either upward or downward.
In Figure 1-3, the outputs of two other limit switches named “EMS_DOWN” and
“EMS_UP” are going to be tied to the PLC input terminals to stop the car movement if it
goes beyond the upper or lower limit, avoid damage to the Hoist motor or elevator fixture.
When the code is executed for the first time (startup case), if the car is not at the first floor
already, it is automatically directed downward and when it hits the 1st Floor limit switch, it
is stopped. The system PLC saves the location of the Car as 1st floor, and based on the
next signals arising from the movement of the sensor over permanent magnets it
determines exact location of the car in next trips.
Figure 1-4 displays the wiring diagram of VFD drive, 7-segment display, Auto/Manual
Hammer switch and 4 push buttons that are housed on the top right side of the Main
keypad. Addresses which are used to connect each of the components specified, to Input
or Output modules of the system PLC are also given.
Figure 1-4
www.ebook777.com
Figure 1-5 displays the detailed drawing of the Elevator fixture. Notice that in Figure
free ebooks ==> www.ebook777.com
1-5 B it is very important to know 'where' to install 1st floor and EMS_DOWN limit
switches, to ensure that the Elevator detects any floor number and Emergency limit
switches correctly.
Figure 1-5
free ebooks ==> www.ebook777.com
Car Sliding door Mechanism
Figure 1-6 displays the schematic diagram of the “car door and a DC motor
controller”. According to the Figure1-6, a few electronic components and two 12 DC
relays are used to construct the controller. The schematic is self-explanatory where two
relays are used to change the polarity of the dc motor, and the transistors are used to drive
the relays. We do need to have a source of 12 V DC power supply to turn on the relays,
but I used a 2 AAA battery holder to energize a small toy DC motor which is used here to
move the car door to left (to close the door) or right (to open the door). Based on the
schematic diagram in Figure 1-6, to turn on the circuit and move the door CW (to close the
door), PLC outputs to green terminals need to be set to '1' and '0'. To revolve the motor in
the opposite direction, 'CCW signal' input terminals need to be set to '1' and '1', causing
the door to move in the opposite direction (to open the door).
The car door can be moved back and forth by a small 3 volt DC motor. Figures 1-7 and
1-8 display the status of the physical door and limit switches with their related addresses,
which are connected to PLC inputs and locations where they are installed to control the
door movement when it is being opened or closed.
To open or close the car sliding door using controller shown in figure 1-7 works
perfectly; however, in this project, I used a small stepper motor and a related controller to
simulate the DC motor's function. You may view the performance of the sliding door
using a stepper motor, by clicking the following link: http://youtu.be/XBWCsl512Lc.
www.ebook777.com
free ebooks ==> www.ebook777.com
Figure 1-6: displays driver schematic to control the car small door
Figure 1-7
free ebooks ==> www.ebook777.com
Figure 1-8
www.ebook777.com
Schematic diagram of the 7-segment display
free ebooks ==> www.ebook777.com
According to the figure 1-9, the input of a 7- segment display is tied in parallel to PLC
output terminals. Assuming that (4 PLC outputs) Q0.2 tied to A, Q0.3 to B, Q0.4 to C and
Q0.5 to D output terminals of the main keypad, to show that the car is located at for
example third floor, the PLC output terminals must be set to the following states:
Q0.2 = A =1 (high), Q0.3 = B =1(high), Q0.4 = C = 0(Low), Q0.5 = D = 0(Low)
Figure 1-9
free ebooks ==> www.ebook777.com
Binary-coded decimal
In computing and electronic systems, binary-coded decimal (BCD) is a class of binary
encodings of decimal numbers where each decimal digit is represented by a fixed number
of “bits”, usually four or eight (in our case, just 4 bits will do).
In byte-oriented systems (i.e. most modern computers), the term uncompressed BCD
usually implies a full byte for each digit (often including a sign), whereas the packed BCD
typically encodes two decimal digits within “a single byte by taking advantage of the fact
that four bits are enough to represent the range 0 to 9 (since our elevator is serving only 8
floors, the four bits will do the job for us). BCD takes advantage of the fact that any one
decimal numeral can be represented by a four-bit pattern. Table 1-1 shows how setting of
input pattern can create a Decimal digit that corresponds to the floor number, which is
related to the current location of the Elevator car.
Table 1-1
Figure 1-10 displays detail push buttons of the Main keypad with their related
addresses, which are connected to PLC input ports.
Figure 1-11 displays detail LED circuit of the Main keypad with their related
addresses, which are connected to PLC output ports. Notice that since a typical bias
voltage of a LED is about 2 to 3 V DC, then each Anode of LED must be connected to
PLC output port using a 1 K Ohm resistor otherwise, 24 V DC voltage of a PLC output
port can easily burn the LED.
www.ebook777.com
free ebooks ==> www.ebook777.com
Figure 1-10
free ebooks ==> www.ebook777.com
Figure 1-11
www.ebook777.com
Chapter 2
free ebooks ==> www.ebook777.com
Presentation of the 8 floor Elevator with SIMATIC S7_300 PLC
free ebooks ==> www.ebook777.com
www.ebook777.com
SIMATIC S7-300 PLC and its wiring
free ebooks ==> www.ebook777.com
In rewriting the 4 floor elevator with STEP7 V.5 software, I used the following
hardware and Software:
1 × PLC SIMATIC S7-300 model CPU 315 – 2DP
2 × Digital Input modules model SM 321 ~ DI 16×DC24 V
Siemens part number 321 – 1BH01-0AA0
2 × Digital Outputs modules model SM 322 ~ DO 16×DC 24 V/0.5 A
Siemens part number 322 – 1BH01-0AA0
Figure 2-1 displays the PLC CPU, two digital input modules and two digital output
modules.
Figure 2-1
Figure 2-2 displays how elevator floor call buttons are connected to the first Digital
Input module #1.
Figure 2-3 displays how elevator car call buttons are connected to the second Digital
Input module # 2.
Figure 2-4 displays how elevator Car call button LEDs and 7-segment display inputs
are connected to the third Digital Output module # 3. All Resistors connected in series
with each LED are 1000 Ohm @ 1 Watt.
Figure 2-5 displays how elevator floor call button LEDs and car door motor are connected
to the screw terminal of the forth Digital Output module
free ebooks ==> www.ebook777.com
Figure 2-2
www.ebook777.com
free ebooks ==> www.ebook777.com
Figure 2-3
free ebooks ==> www.ebook777.com
Figure 2-4
www.ebook777.com
free ebooks ==> www.ebook777.com
Figure 2-5
Remark
The voltage at output terminals of PLC is 24 VDC. In Figure1-6, notice that you need
to use a 5 V DC supply source, to energize the lift motor (to open or close Car door). To
power this 3V DC toy motor, I used a 4.7 Ohm Resistor @ 10 W in series with the supply
source to drop about 2 volts from the main input 5V DC input terminal.
free ebooks ==> www.ebook777.com
The Voltage Divider Circuit
The two-resistor voltage dividers are most often used to supply a voltage, which is
different from that of an available battery or power supply. In application the output
voltage depends upon the resistance of the load it drives. Also, to activate the A, B, C
inputs of the 7-segment display, we need to use a conditioning circuit. We can use a
resistance voltage divider, along with a 5.1 volt Zener diode to clamp 24 V DC to 5.1 volt.
See Figure 2-6 representing the final schematic of voltage conditioning circuit, which is
used in this project.
Figure 2-6
www.ebook777.com
Chapter 3
free ebooks ==> www.ebook777.com
Programming PLC with Step7 software
free ebooks ==> www.ebook777.com
www.ebook777.com
Introduction
free ebooks ==> www.ebook777.com
Before anything, it is necessary to say that we’ve defined the byte MB0 as clock
memory in hardware configuration of CPU. For doing that after defining your hardware,
perform the following steps:
1. Run step7 software.
2. Double-click Hardware.
The HW Config window appears.
3. Double-click on your CPU.
The Properties dialog box of your CPU appears.
4. Click Cycle/Clock Memory tab.
5. Click Clock Memory check box ( clock memory changes to clock memory).
6. In memory text box, type 0.
7. Click OK.
So we will be able to use the bits of this memory for LEDs and lights that should be turned
on in the flickering mode. We are going to write any section of our program in a separated
FC, so that we will be able to understand the whole of the program easier. Also, we
defined symbols for most of the memories, Inputs and Outputs in the program and you can
see all of them in appendix A. The Location of the Step7 program is marked with a blue
box in figures that show each section of the program. In addition, the final point to note is
that the lower bit of the memory MW1 is MB2.0 not MB1.0.
In the following, each section of the program will be presented and analyzed.
free ebooks ==> www.ebook777.com
Recognize position (FC1)
Before PLC dose any work, it needs to recognize the position of the cabin. Therefore,
we use this function to write a program to detect the position of the cabin (Figure 3-1).
www.ebook777.com
free ebooks ==> www.ebook777.com
www.ebook777.com
Manual State (FC2)
free ebooks ==> www.ebook777.com
We can switch between manual and automatic modes with “Auto/Manual” input. If it
was reactive then the system is in manual mode such as Figure 3-6. According to this
figure, we can write the control program of elevator in FC2 when the system works in
manual mode.
www.ebook777.com
Auto state
free ebooks ==> www.ebook777.com
We are going to start writing the auto part of our program with several functions (FC3
to FC9). The auto part is active with “Auto/Manual” input. But by any reason one of two
emergency sensors (“Ems_Up” or “Ems_Down”) change its state and become active,
then the auto part of our program will disable (Figure 3-10)
www.ebook777.com
free ebooks ==> www.ebook777.com
www.ebook777.com
Detect direct (FC4)
free ebooks ==> www.ebook777.com
Now we have to detect the direct of moving cabin the elevator needs it. This part of
our program wrote in FC4 that placed in Network3 after FC3 (Figure 3-13).
The first line in Figure 3-15 represent that when a request was received, a bit memory
(M2.0) change to set active a timer and then after 5s a bit memory (“Out of Timer1”) is
set. The M2.0 and then the timer are active until the all request clear from memory (MB8
in second line). Now we can use the “Out of Timer1” for active the program that its task
is to detect direct of moving in next networks in FC4 and reactive it when this bit is
reactive because there isn’t any request.
According Figure 3-15 if the out of previews network (“Out of Timer1”) is active
then a program to check if cabin need to move down is run.
free ebooks ==> www.ebook777.com
www.ebook777.com
have to place the program of “Need to down” (it is in network2) upper than the program
free ebooks ==> www.ebook777.com
of “Need to up” (it is network3). So now if the both of these bit memory were zero (such
as in the start time of cabins move) the program first checks if the cabin needs to move
down and then if cabin doesn’t need to move down check if cabin needs to move up. The
last point of this section is about this question: when will these two bit memories reset? To
reset these two bit memories suppose that the cabin was in 2nd floor (MB17.1 was set in
memory) and we have a request for first floor (MB8.0 was set). Now the program detects
that the cabin need to move down. So we have to write a program with these two bits to
move cabin down in next FCs and when the position of cabin (MB17.1 change to zero and
MB17.0 change to one) is equal to the passenger request(MB8.0),then the correspond
request in memory (second bit in MB8,MB6 and MB4 for floor 2 – go FC3) reset. Now,
because we don’t need to move down the bit memory “Need to Down” will change to
zero.
free ebooks ==> www.ebook777.com
Detect Service (FC5)
Until now we can control the cabin moving with two bits in the previous section
(“Need to Down” and “Need to Up”) according from request and position of the elevator.
But if the position of elevator arrived to one requested floor the cabin is moving should
stop to give service to passengers and then continue her moving if there are another
requests. So we used FC5 after FC4 in OB1 (Figure 3-17) to write on it a program to
detect available services when cabin arrived at requested floor.
www.ebook777.com
free ebooks ==> www.ebook777.com
www.ebook777.com
Turn Motors on (FC6)
free ebooks ==> www.ebook777.com
Now we have the condition of moving cabin up-down and opening-closing cabins
door in memory with two functions FC5 and FC4. So we’re going to write a program for
active and reactive outputs that turn motors on in FC6 after FC5.
www.ebook777.com
free ebooks ==> www.ebook777.com
www.ebook777.com
Change Speed (FC7)
free ebooks ==> www.ebook777.com
A circuit can be designed that can turn on a motor with two outputs “Motor_Up” and
“Motor_Down” in two direct. In this project we used a driver produced by Delta
Company. So by doing a few settings (that introduced in the next chapter) we can have
two speeds for moving cabin just with two digital outputs that determine speeds. In FC7
We‘re going to write a program to determine two outputs “Slow Speed” and “Fast
Speed”. We want to have Slow Speed until 2 second after start moving and from one floor
is to requested floor. In other times of moving we want to have speed fast. We wrote a
program (Figure 3-25) to do that.
www.ebook777.com
free ebooks ==> www.ebook777.com
www.ebook777.com
Update outputs in every scan (FC10)
free ebooks ==> www.ebook777.com
Such as FC8, we’re going to write a program for LEDs, Lights and etc in FC10. But
FC10 is run every scan (Figure 3-30).
www.ebook777.com
free ebooks ==> www.ebook777.com
In network 3 with each positive pulse from “Cabin Key9_Emergency” switch one of
two bit M2.4 or M21.1 is set according previous state of Emergency lamp (M20.6). If in
network3 we receive a positive pulse and Emergency lamp was flickering (red box in
Network4) M21.1 set one for reactive M20.6 and if lamp wasn’t on, the M2.4 is set to
active lamp in network4.
free ebooks ==> www.ebook777.com
Monitoring (FC11)
In our project we try to store the all states in PLC memory. So now we can use these
memories to make a connection between a monitoring device (such as a panel Master or
WinCC) to show the status of elevator. When the cabin door is absolute open or close we
can understand from two sensors for monitoring device. But how do we understand door is
closing or opening? So we wrote a program in FC11.
www.ebook777.com
Initializing (OB100)
free ebooks ==> www.ebook777.com
In OB100 that run at once time in start running of PLC, we reset MW3, MW5, MW7
that record all passenger requests. Also, we can write other initializing setting here.
________
1Counter UP and Down
VFD_M Driver
www.ebook777.com
free ebooks ==> www.ebook777.com
free ebooks ==> www.ebook777.com
Introduction
With growing industry, the needing of Motor soft starter is increasing. So some soft
starter designed and used in circuits of motors. A motor soft starter used to reduce the load
and torque in the power train and electrical current surge of the motor during startup. This
way reduces the mechanical stress on the motor and shaft. So the system lifespan will
extend. Motor drivers are more complete. They have additional features such as speed
control, voltage and frequency control. Today it’s important for any electrician to learn
working with drivers.
In this project we use a VFD_M driver produced by Delta Company (Figure 4-1).
There is an advice that before using any driver, you can download and read its user
manual from the internet.
www.ebook777.com
Basic wiring
free ebooks ==> www.ebook777.com
A diagram of drives terminal is shown. In this figure, 3 important parts of our project
are indented. In first red box we connect three terminals R/L1, S/L2 and T/L3 to 3-phase
AC power. If you don’t have 3phase power, you can connect a single phase and null to
R/L1 and S/L2. Don’t forget to use fuse for more circuit protection. In second red box, we
connect the AC drive terminals U/T1, V/T2 and W/T3 to the motor terminals. To reverse
direct motor rotation, switch over any of the two motor inputs. The driver can be
controlled by different ways, such as its keypad, AVI or ACI Analog input, its digital input
(M0 to M5), etc. In this project we use its digital input to control driver with PLC that it
will be explained in end of this chapter and before that we need to understand the way of
using keypad for changing some setting.
You can appear any mode by a few pressing mode-key. Then by pressing Enter-Key
you can select it. Now you can change the value of the selected parameter with two key
and . To enter your new value in driver, press Enter-key and then if appear
it's mean your setting was saved successfully and this message
appears if your setting is invalid. To return or exit from the selected mode without any
saving, just press the Mode-key.
By pressing the run-key on keypad if the factory setting of driver hasn’t changed, first
motor turning slowly and after 10-second reached to its speed. To stop motor we need to
press the stop-key and then the motor stopped slowly.
www.ebook777.com
Change setting
free ebooks ==> www.ebook777.com
Consider the driver has its factory setting. In this project we first change the value of
Pr.00 from 00 to 04 (Table 0-2). So we will be able to change the motor speed by the
potentiometer on digital keypad. Now we will be able to find two suitable frequencies for
our two motor speeds with rotating potentiometer.
Table 0-2: Pr.00
In this project we need to control motor from external logical signals. We can use two
terminals M0-M1 by GND terminal to turning motor clockwise and anticlockwise
direction (Table 0-3). But for using these terminals, we must change the parameter P.01
from 00 to 01 (Table 0-4) .So the control of the motor changed from keypad to the its
digital terminals. With this setting the stop key on the keypad is effective too.
Table 0-3: Pr.38
To stop motor quickly we can change the Pr.02 from 00 to 01 (Table 0-5).
Table 0-5: Pr.02
If you want to limit the maximum voltage at the motor output, we should use Pr.05. our
drive model is 230 volt, so we can change this parameter from 0.1 to 255 volts (Table 0-
6).
Table 0-6: Pr.05
Pr.10 and Pr.11 determine the time required for starting and stopping. If we don’t change
these parameters, the motor reached its speed after 10 second and stopped after 10 second.
For quicker, we change them from 10 second to 0.1 second (Table 0-7)
Table 0-7: Pr.10 and Pr.11
www.ebook777.com
free ebooks ==> www.ebook777.com
By above setting, we can turn on driver and use it. And then by several running and
change the frequency with potentiometer, we select two 20hz and 60hz frequency for our
slow and fast speed. Now we have to store these frequencies in driver memory. The driver
can store 7 different speeds on Pr.17 to Pr.23. We store them on two first parameter Pr.17
and Pr.18 (Table 0-8)
Table 0-8: Pr.17 and Pr.18
We can select each of 7 frequencies in Pr.17 to Pr.23 just with 3 bit such as Figure 4-4
www.ebook777.com
Chapter 5
free ebooks ==> www.ebook777.com
Human Machine Interface (HMI)
free ebooks ==> www.ebook777.com
www.ebook777.com
What is a “Human Machine Interface (HMI)” device?
free ebooks ==> www.ebook777.com
Human Machine Interfaces are devices that enable operators to check the present
condition of the operational machine, and if needed, impose changes in the operation of
the machine at hand. For example, HMI Series Air Compressor Control System is a touch
screen-based control system. As a new touch screen human-machine interface, from the
appearance of a concern, easy to use, powerful features and excellent stability make it well
suited for industrial environments. The use of man-machine interface can clearly instruct
and tell the operator the current status of machinery and equipment, allowing operation
becomes simple, vivid, and can reduce operational errors, even if the novice can easily
operate the machinery and equipment. As long as operator gently points, he can enter the
interface he wants. To get information about parameters such as real-time data, tens of
fault records, allowing the compressor to be used more efficient and stable.
Usually, General Operators, simply input the required loading and unloading pressure
can allow air compressor running, easy operation, and fast.
To protect related data security, one can change the parameters, he need to enter a
password to prevent other people to change parameters, resulting in unnecessary air
compressor failures.
To use an HMI device, usually, it has to be programmed before connected to a PLC.
Different HMI manufactures have developed software to suitable for their devices.
For example, one can use WinCC software developed by Siemens AG to program MP
277 8 or 10 inch key or touch models. Other software such as LabVIEW, EasyBuilder
8000, or PanelMaster are also among those could be used to program HMIs. Functionality
of this software is very similar thus, one learns how to work with one, he usually should
be able to use different for the same task. In this chapter, we are going to use PanelMaster
software to program a product name PT070-WST which is a 7 inch HMI device.
We had said that HMI devices are used for control as well as monitoring. But how
does an HMI Device change the inputs of a PLC that are coming from sensors, switches,
… from inside factory? An HMI device can read the value of memory, outputs and inputs
for monitoring and change them except inputs for control. So if we want to have a switch
on HMI device that its operate is similar a switch inside a factory, we must use memory
instead inputs in the PLC program. For example, refer to the program that wrote in
network1 of FC1 (Figure 3-7). Now we want to set “Motor_Down” output from HMI
device such as two inputs Down P.B and UP P.B. So we used two bits M21.5 and
M21.6(Monitoring_Down P.B and Monitoring_UP P.B) respectively two these inputs
(Down P.B and UP P.B) such as Figure 5-1. So if we change Monitoring_Down P.B from
an HMI device, it's similar to change the Down P.B from inside factory.
free ebooks ==> www.ebook777.com
www.ebook777.com
Programming the PanelMaster display
free ebooks ==> www.ebook777.com
We used PMDesigner for Programming our HMI Device. If you want to learn the way
of connecting between the panel master and PLC and other initial information about this
HMI device, you can see www.plcgoods.net or www.plc-doc.com websites.
The first step is about insert an object and changes its setting. So
1. Run the PMDesigner software.
2. Click Object menu.
3. Click an object that you want to use such as Bit Button.
4. Click on a place that you want to insert your object
With this way you’ll be able to insert any objects from the PMDesigner library to your
design. Then:
5. Double-click on your object.
Its properties window with the name of your object appears. You can change its setting on
this window.
You can see an overview of wrote programs in Figure 5-2 that we‘re going to explain each
its part.
www.ebook777.com
(“Monitoring_UP P.B“) memory is set. This key make to move cabin UP like I1.6 (“Up
free ebooks ==> www.ebook777.com
P.B “). So This Bit-Button change the value of “Monitoring_UP P.B” and monitor it.
Now:
9. Click Label tab.
In label tab you can define your suitable texts or pitchers for the Bit-Button such as said
steps for previews Toggle-Switch. We select two 3D buttons from the library (3-D black
button (not pressed) and 3-D green button (pressed)) in the same size and position but
different in their color and shape. So when the value of M21.6 changed the operator see
the change of key shape and color.
The next part is programming floor keys that are in the cabin or in different floors. We just
explain setting of M23.0 (“Monitoring_Cabin Key1“). The operating of this memory like
I2.0 (“cabin Key1“). The settings of other floor keys inside or out of cabin are similar
together. So:
10. Insert a Bit Button.
11. Double click the Bit Button.
12. Click General tab.
13. In Operation box, click Set ON Pulse.
14. Use the Address Type list to select Bit type.
15. In the Write Address text box, type M23.0.
16. Click Monitor ( changes to )
17. Click Monitor Address identical to Write Address ( changes to ).
18. In the Monitor Address text box, type Q1.0 (“Cabin LED1“)
19. Click Label tab.
20. Define your favorite pictures for monitoring.
21. Click OK.
According above settings and a modify our program in PLC, The action of this bit will
be similar I2.0 but this Bit-Button monitor another address (Q1.0) from PLC outputs.
Another section is about showing the position of Elevator. We have the position of the
elevator in MW11 in PLC memory. So
1. Insert “Advanced numeric display” to screen
2. Use the Data Type list to select 16-Bit unsigned integer.
3. Use the Display Type list to select 16-Bit unsigned Decimal.
4. In the Monitor Address text box, type MW12.
Another part is about showing the state of the cabin door. We can use two sensors “Left
Close Sensor” and “Right Open Sensor” to detect the door is absolute close and open. If
you remember we wrote a program in FC11 to detect door is opening or closing (Figure 3-
free ebooks ==> www.ebook777.com
33). Then we can use the state of these sensors and M106.0 to M106.3 in our HMI to show
the state of our door. At first we insert four pictures respectively four door states. All
These pictures are hidden except one of them that show the state of the door. For example:
1. Insert Garage door, closed from the library.
2. Double-Click Garage door, closed.
3. Click Fit to Object ( changes to ).
4. Click Visibility Controlled By Bit ( changes to ).
5. In the Control Bit text box, type I3.0 (”Left Close Sensor“).
6. Change Visible State OFF to ON.
So if the door was absolute close, then the “Left Close Sensor” changes to 1 and then
appears Garage door, closed on Monitor screen.
The settings of indented parts in the Figure 5-4 are similar previous examples. Any by,
you can see their settings in program that given by this document.
www.ebook777.com
Programming WinCC
free ebooks ==> www.ebook777.com
We’ve used WinCC software to monitor Elevators states, such as PanelMaster in the
previous section. In the first step we have to make a connection between WinCC software
and PLC to use the states of memories, inputs and outputs of our PLC. Then we will
explain the program that wrote by WinCC.
free ebooks ==> www.ebook777.com
Making a Connection
To have a connection with PLC, we must define our hardware in WinCC. So:
1. Run SIMATIC WinCC Explorer.
2. Click File.
3. Click Active ( Active changes to Active).
For doing some setting in WinCC we have to do above steps. Now for defining our
hardware:
1. Click Tag Management.
In Tag Management you will see all configured Tags and communication channels. In firs
time You will just see the Internal Tag on your right hand. You can define your local
variables in it. But we want to use PLC states, then we need to make a connecting channel.
So
2. Right click on blank area (Project Window).
3. Click Add New Driver… .
The Add New Driver dialog box appears. In this dialog box You will find the
communication drivers supported by WinCC. In this project we used a Simatic PLC series
300. So:
4. Double-Click SIMATIC S7 Protocol Suite.chn
“SIMATIC S7 Protocol Suite” appears in the WinCC Explorer Project Window.
5. Double-click SIMATIC S7 Protocol Suite
You will see types of connection that you can make it between WinCC and PLC series 300
produced by Siemens company. We use MPI connection. So
6. Double-Click MPI.
7. Right click on blank area.
8. Click New Driver Connection… .
The connection Properties Dialog box appears. Then
9. In the Name text box, type a suitable name (for example simatic300)
10. Click properties.
The “Connection Parameter-MPI” appears, check showed numbers by CPUs setting in
HW configuration that you had done in step7 software
11. Click OK twice time.
Your connecting channel has made. Now WinCC can access to states of inputs, outputs,
and memories of your PLC.
Now you can define your external tags in Wincc from your PLC. For example, we
want to use a bit memory, such as M21.3 in our PLC program. So
www.ebook777.com
1. Double-click simatic300.
free ebooks
2. Right click on blank area. ==> www.ebook777.com
3. Click New Group… .
A Properties of the Tag Group dialog box appears.
4. In the Name text box, type a suitable name such as Memory.
5. Click OK
In above step you can define different groups to sort your tags. For example, you can
define three groups with three name Input, Output, Memory and define each tag in
suitable group. Now:
6. Double-click Memory Group.
7. Right click on blank area.
8. Click New Tag… .
The Tag properties appears.
9. In the Name text box, type a name.
10. Use the Data Type list to define type of your tag. Select Binary Tag.
11. Click select.
12. Define your Data type and Address.
13. Click OK.
Now you can use the state of M21.3 in WinCC software. In a similar way you can use
inputs, outputs and other type of memories. In Appendix B you can see the all tags that
we‘ve defined them in WinCC software.
free ebooks ==> www.ebook777.com
Designing a monitoring screen
Now we‘re going to design monitoring screen to show the states of elevator white WinCC
software. So:
1. Double-Click Graphic Designer
A Graphic Designer Window appears. At first time you won’t see anything in it. But we
designed a monitoring screen such as Figure 5-5.
www.ebook777.com
3. Click properties
free ebooks ==> www.ebook777.com
The object properties dialog box appears. That you can change the setting of this
rectangle.
4. Click effects.
5. Change global color scheme from Yes to No
Now you can change the color of this box
6. Click Colors.
7. Select your favorite color (we selected green).
8. Click miscellaneous
9. Change static parameter of Display from Yes to No
So this object disappears when the program is run.
10. Right-Click on Dynamic parameter of Display.
11. Click Dynamic dialog… .
The Dynamic dialog box appears
12. In Expression/Formula select or type “M-Auto/Manual” Tag
13. In the Data Type, Click Boolean.
Two rows appear In Result of Expression/Formula.
14. Change first row of Display to Yes.
15. Change second row of Display to No.
Now the rectangle appears if the value of “M-Auto/Manual” changed to 1.
Another part is four keys for the operator when elevator is in manual mode (Figure 5-
7).
www.ebook777.com
15. Click OK
16. Click OK free ebooks ==> www.ebook777.com
So now your external tag updates every 250ms on operator screen and it monitors the state
of ‘Cabin_LED 1’. Also, by this circle we can have a floor request to make an order for
PLC program such as I2.0 So
17. Click Events Tab.
18. Right-click on Action of Press Left
Such as the setting of UP Key, we can change the setting set and reset M_Cabin key1
Memory in PLC program that its task is like I2.0.
19. Click the Events Tab.
20. Click Mouse
21. Right-click Action of Press left
A Direct Connection dialog box appears.
22. In Source box, In text Constant box, type 1
23. In Target section, In the Tag box select your target tag (M_Cabin key1)
24. Click OK
25. Again Click Mouse
26. Right-click Action of Release left
27. In Source box, In text Constant box, type 0
28. In Target section, In the Tag box, select your target tag (M_Cabin key1)
29. Click OK
We also want to know the state of the elevator when is move up-down and opens-close
door. Since we use three angles respectively in our program (Figure 5-8).
www.ebook777.com
Appendix A
free ebooks ==> www.ebook777.com
All symbols that defined in Step7 program
1 Recognize_Position FC1 FC
2 Manual FC2 FC
11 Monitoring FC11 FC
www.ebook777.com
37 Right Open Sensor I 3.1 BOOL
free ebooks ==> www.ebook777.com
38 To close door_P.B I 3.2 BOOL
www.ebook777.com
76 Monitoring_CabinKey9_E M 21.7 BOOL
free ebooks ==> www.ebook777.com
77 Monitoring_Cabin Key1 M 23.0 BOOL
www.ebook777.com
115 7Seg_C free ebooks ==>
Q 0.4www.ebook777.com
BOOL
www.ebook777.com
Appendix B
free ebooks ==> www.ebook777.com
All external tags and their symbols are defined in the WinCC program. We define All
Tags in 4 groups in the following tables. For the Inputs group, we select 5 PLC inputs in
our WinCC program.
In Outputs group, we chose the following PLC outputs in Our Wincc program.
In Memory group, we chose the following PLC Memories in Our Wincc program
www.ebook777.com
Questions and Answers related to this project
free ebooks ==> www.ebook777.com
This section of this manual is reserved for you. I would be very happy if you would
like write to me with any questions (hardware or software wise) that you have related to
this well designed industrial project.
I shall answer you question ASAP and also, will include your question in this section of
the manual, as I believe that it might be also somebody else's question, as well.
Thanks for your comments and concerns regarding this design!
free ebooks ==> www.ebook777.com
Conclusion
Now you have the information you need to become a successful PLC programmer.
This is a moment for you to take the information you’ve been given and not be afraid to
put it to use.
The primary thing that keeps people from becoming successful is fear. If you can
overcome this fear then you will succeed and prosper.
All you need to do at this point is to stop putting things off and just do it. Start working
and you will find it becomes easier as you go along.
Once you accomplish any new skill or task, you will realize just how easy it is. That is
when you want to kick yourself for not starting sooner.
So don’t hesitate. Start right now. Start today. Break that cycle of doubt and enjoy your
newfound skills and succeed in exploiting them.
To your success and happiness,
Seyedreza
www.ebook777.com
My e-book product list
free ebookswww.plc-doc.com
==> www.ebook777.com
Hardware, software and more
We would like to introduce our Teach Yourself Consumer PLC books as an excellent
resource for readers who want to learn more about PLCs. So far, we have launched this
groundbreaking new series with four exciting titles:
1. Programming with SIMATIC S7 300/400 Programming Controllers
2. Programming with SIMATIC S7-200 PLCs using STEP 7-Micro/win software
3. Introduction to programming a SIEMENS LOGO! PLC
3. Basics of Programmable Logic Controllers (PLC)
4. Programming Allen-Bradley series of PLCs using RSLogix 500 software compiler
5. Introduction to programming Allen-Bradley series of PLCs (Second Edition)
Design and Implementation of typical end year college projects using a PLC with
youtube.com site links to watch the projects in action:
1. Programming a 4 floor elevator with SIMATIC STEP 7 and LOGO! SoftComfort
http://youtu.be/dqkeHD5WNcc
2. Programming SIEMENS LOGO! PLC as a dyeing machine temperature controller
http://youtu.be/mJfT4z1oCeo
3. Programming a Traffic Light Controller system using SIMATIC S7-300 & HMI
display
http://youtu.be/0ADfFPOzIUE
4. Programming a PLC based car Parking System with SIMATIC S7-300 PLC
http://youtu.be/51oqLRxXcHk
5. Implementing a PLC-based temperature controller with PID algorithm
http://youtu.be/yhSyKObMlgA
6. Implementation of an 8 Floor Elevator Control System with a PLC
http://youtu.be/M3qgxkEIDw8
Design and Implementation of typical end year college projects using AVR
Microcontroller\the Arduino board based controllers with youtube.com site links to
watch the projects in action:
1. Programming a Traffic Light Control system using an Arduino board
http://youtu.be/q0eWsX2kMeU
2. Microcontroller based 4 Floor Elevator System
http://youtu.be/UQbGcntcVP4
3. Analog LED clock with chime, alarm, calendar and temperature display
http://youtu.be/Mi5zAdctp4g
4. Implementing an Arduino based temperature controller with PID algorithm
free ebooks ==> www.ebook777.com
http://youtu.be/i2nxqLs9wBg
5. Simple Arduino based 4 Floor Elevator Project:
http://youtu.be/WU2arv-yghw
6. Simple Arduino based Automated Parking lot System
http://youtu.be/CNt2DIlwrso
Free microcontroller \Arduino based project Downloads from our www.plc-doc.com
or www.plcgoods.net websites:
1. How to control a Stepper motor with an ATmega8 microcontroller
http://youtu.be/XBWCsl512Lc
2. MATLAB/PC and Microcontroller based advanced Line following Robot
http://youtu.be/2Y_qSzKL_2Y
3. 2 Zones microcontroller based weekly digital timer
http://youtu.be/xbIEKI3qqNM
www.ebook777.com
free ebooks ==> www.ebook777.com
free ebooks ==> www.ebook777.com
www.ebook777.com