Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
CONTENTS ............................................................................................................... 1
CONTENTS OF FIGURE ......................................................................................... 3
PREFACE .................................................................................................................. 5
ABSTRACT ............................................................................................................... 6
CHAPTER 1: INTRODUCTION .............................................................................. 7
1.1. Programmable Logic Controller ..................................................................... 7
1.1.1. History of PLCs........................................................................................ 7
1.1.2. Advantages of PLCs ................................................................................. 7
1.2. SCADA ........................................................................................................... 8
1.2.1. Introduction .............................................................................................. 8
1.2.2. HMI .......................................................................................................... 8
1.2.3. Remote Terminal Units (RTU) ................................................................ 8
1.2.4. PLC for SCADA ...................................................................................... 8
CHAPTER 2: GENERATIONAL THEORY ............................................................ 9
2.1. Generation PLC S7-1200 ................................................................................ 9
2.1.1. Introducing the powerful and flexible S7-1200 ....................................... 9
2.1.2. General specifications CPU ................................................................... 10
2.1.3. Sample wiring diagrams for the S7-1200 CPU...................................... 13
2.1.4. Easy to use the powerful programming languages ................................ 14
2.2. Introduction Softwares .................................................................................. 15
2.2.1. Introduction TIA Portal V13 .................................................................. 15
2.2.2. Introduction Wincc................................................................................. 16
2.3. Introduction Factory I/O ............................................................................... 16
2.4. Introduction Microsoft SQL Server .............................................................. 17
2.5. Introduction Visual Studio ............................................................................ 18
CHAPTER 3: ALGORITHM .................................................................................. 20
3.1. Requires control of the system ...................................................................... 20
3.2. General algorithm .......................................................................................... 20
3.3. Parts of algorithm .......................................................................................... 21
1
CHAPTER 4: EXECUTION PROCESS ................................................................. 22
4.1. Design simulation project into Factory I/O................................................... 22
4.2. Design simulation project into Tia Portal ..................................................... 25
4.2.1. Programing: LAD language ................................................................... 25
4.2.2. Program in TIA Portal ............................................................................ 25
4.3. Creation a HMI Scene (WinCC) ................................................................... 27
4.4. Creation a Database in SQL Server .............................................................. 29
CHAPTER 5: RESULT - CONCLUSION .............................................................. 31
5.1. Result ............................................................................................................ 31
5.2. Conclusion ..................................................................................................... 33
5.2. Developing direct .......................................................................................... 33
REFERENCE ........................................................................................................... 34
2
CONTENTS OF FIGURE
Figure 2.1. PLC S7-1200............................................................................................ 9
Figure 2.2. CPU features PLC S7-1200 ................................................................... 10
Figure 2.3. General specifications ............................................................................ 12
Figure 2.4. Digital inputs PLC ................................................................................. 13
Figure 2.5. CPU 1214C AC/DC/Relay .................................................................... 13
Figure 2.6. CPU 1214C DC/DC/ DC ....................................................................... 14
Figure 2.7. The elements of a circuit diagram ......................................................... 14
Figure 2.8. TIA Portal V13 ...................................................................................... 15
Figure 2.9. Packages included in TIA Portal V13 ................................................... 16
Figure 2.10. FACTORY I/O .................................................................................... 17
Figure 2.11. SQL Server 2008 R2 ............................................................................ 17
Figure 2.12. Visual Studio ....................................................................................... 18
Figure 2.13. WEB Homepage .................................................................................. 19
Figure 2.14. Database in web ................................................................................... 19
Figure 3.1. General Algorithm ................................................................................. 20
Figure 3.2. Algorithm ............................................................................................... 21
Figure 4.1. FACTORY I/O Open ............................................................................. 22
Figure 4.2. Drag in FACTORY I/O ......................................................................... 22
Figure 4.3. System in FACTORY I/O ..................................................................... 23
Figure 4.4. Connect with PLC.................................................................................. 23
Figure 4.5. Select PLC Model .................................................................................. 23
Figure 4.5. Configuration ......................................................................................... 24
Figure 4.6. Configration ........................................................................................... 24
Figure 4.7. Connect OK ........................................................................................... 24
Figure 4.8. Define tags ............................................................................................. 24
Figure 4.9. LAD Code .............................................................................................. 25
Figure 4.10. Start Project; ........................................................................................ 25
3
Figure 4.11. Template for S7-1200 .......................................................................... 26
Figure 4.12. Funtion for connect .............................................................................. 26
Figure 4.13. LAD Code ............................................................................................ 27
Figure 4.14. Add HMI .............................................................................................. 27
Figure 4.15. Design HMI Screen for SCADA ......................................................... 28
Figure 4.16. Set up screen ........................................................................................ 28
Figure 4.17. SQL Login ........................................................................................... 29
Figure 4.18. SQL Database ...................................................................................... 29
Figure 4.19. Create Data Table ................................................................................ 30
Figure 4.20. Table of Data ....................................................................................... 30
Figure 5.1. System in Factory I/O ............................................................................ 31
Figure 5.2. HMI Screen ............................................................................................ 31
Figure 5.3. Table of Data ......................................................................................... 32
Figure 5.4. Web for SCADA .................................................................................... 32
4
PREFACE
An industrial PLC and SCADA system is to for the development of automatic control
of machinery. PLC and SCADA system are methods to achieve Automation.
Automation industry has fast growth potentialin a country like Viet Nam, which has
a large industry base.
This report focuses on brief concepts of PLC and SCADA system, their development,
and also mentionspossible applications of these systems. Almost every industry that
has some electrical machinery may need Automation Services.
We really want to thank for my Teacher and IS lab’ members because their guidance
regarding this project and unceasing belief in our capabilities. And we would also
like to thank the department of IS Lab (Intelligent Systems Laboratory) for the
opportunity to conduct this project.
In this report just show the result our project, but the construction of the prior
versions, and conduction experiments all of it we are not reflected in this report.
5
ABSTRACT
Automation of many different processes, such as controlling machines or factory
assembly lines, is done through the use of small computers called a programmable
logic controller (PLC). This is actually a control device that consists of a
programmable microprocessor, and is programmed using a specialized computer
language.
Before, a programmable logic controller would have been programmed in ladder
logic, which is similar to a schematic of relay logic. A modern programmable logic
controller is usually programmed in any one of several languages, ranging from
ladder logic to Basic or C. Typically, the program is written in a development
environment on a personal computer (PC), and then is downloaded onto the
programmable logic controller directly through a cable connection. The program is
stored in the programmable logic controller in non-volatile memory.
The programmable logic controller has made a significant contribution to factory
automation. Earlier automation systems had to use thousands of individual relays
and cam timers, but all of the relays and timers within a factory system can often be
replaced with a single programmable logic controller. Today, programmable logic
controllers deliver a wide range of functionality, including basic relay control,
motion control, process control, and complex networking, as well as being used in
Distributed Control Systems.
There are several different types of interfaces that are used when people need to
interact with the programmable logic controller to configure it or work with it. This
may take the form of simple lights or switches or text displays, or for more
complex systems, a computer of Web interface on a computer running a
Supervisory Control and Data Acquisition (SCADA) system.
Programmable logic controllers were first created to serve the automobile industry,
and the first programmable logic controller project was developed in 1968 for
General Motors to replace hard-wired relay systems with an electronic controller.
6
CHAPTER 1: INTRODUCTION
1.1. Programmable Logic Controller
PLC is an industrial computer control system that continuouslymonitors the state of
input devices and makes decisions based upon a custom program to control
the stateof output devices.Almost any production line, machine function, or process
can be greatly enhanced using this type of controlsystem.
However, the biggest benefit in using a PLC is the ability to change and replicate the
operation orprocess while collecting and communicating vital information.Another
advantage of a PLC system is that it is modular. That is, you can mix and match the
types of inputand Output devices to best suit your application.
1.1.1. History of PLCs
- The first Programmable Logic Controllers were designed and developed by
Modicon as a relay re-placer for GM and Landis.
- These controllers eliminated the need for rewiring and adding additional hardware
for each newconfiguration of logic.
- The new system drastically increased the functionality of the controls while
reducing the cabinetspace that housed the logic.
- The first PLC, model 084, was invented by Dick Morley in 1969.
- The first commercial successful PLC, the 184, was introduced in 1973 and was
designed by MichaelGreenberg.
1.1.2. Advantages of PLCs
PLCs not only are capable of performing the same tasks as hard-wired control, but
are also capable of manymore complex applications. In addition, the PLC program
and electronic communication lines replace muchof the interconnecting wires
required by hard-wired control. Therefore, hard-wiring, though still required
toconnect field devices, is less intensive. This also makes correcting errors and
modifying the applicationeasier.Some of the additional advantages of PLCs are as
follows:
- Smaller physical size than hard-wire solutions.
- Easier and faster to make changes.
- PLCs have integrated diagnostics and override functions.
7
- Diagnostics are centrally available.
- Applications can be immediately documented.
- Applications can be duplicated faster and less expensively.
1.2. SCADA
1.2.1. Introduction
SCADA stands for Supervisory Control And Data Acquisition. Ir refers to an
industrial control system : acomputer system monitoring and controlling a process.
The process can be industrial, infrastructure orfacility based as described below:
- Industrial Process: It includes those of manufacturing, production, power
generation, fabricationand refining and process may be in continuous, batch,
repetitive or discrete modes.
- Infrastructure Process: it may be public or private, and water treatment and
distribution,wastewater collection and treatment, oil and gas pipelines, electrical
power transmission anddistribution, and large communication systems.
- Facility Process: it occur both in public facilities and private ones, including
buildings, airports, shipsand space stations. They monitor and control HVAC, access
and energy consumption.
1.2.2. HMI
A SCADA System usually consists of the follow ing SubSystems: A Human-
Machine Interface (HMI)is the apparatus which presents process data to a human
operator,and through this, the human operator monitors and controls the process.
A supervisory (computer) system, gathering (acquiring) data on the process and
sending commands(control) to the process.
1.2.3. Remote Terminal Units (RTU)
RTU connecting to sensors in the process, converting sensor signals to digitaldata
and sending digital data to the supervisory system.
1.2.4. PLC for SCADA
Programmable Logic Controller used as field devices because they are more
economical, versatile,flexible, and configurable than special-purpose RTUs.
Communication infrastructure connecting the supervisory system to the Remote
Terminal Units.
8
CHAPTER 2: GENERATIONAL THEORY
2.1. Generation PLC S7-1200
2.1.1. Introducing the powerful and flexible S7-1200
The S7-1200 controller provides the flexibility and power to control a wide variety
of devices in support of your automation needs. The compact design, flexible
configuration, and powerful instruction set combine to make S7-1200 a perfect
solution for controlling a wide variety of applications. The CPU combines a
microprocessor, an integrated power supply, input and output circuits, built-in
PROFINET, high-speed motion control I/O, and on-board analog inputs in a compact
housing to create a powerful controller. After you download your program, the CPU
contains the logic required to monitor and control the devices in your application.
The CPU monitors the inputs and changes the outputs according to the logic of your
user program, which can include Boolean logic, counting, timing, complex math
operations, and communications with other intelligent devices. To communicate with
a programming device, the CPU provides a built-in PROFINET port. With the
PROFINET network, the CPU can communicate with HMI panels or another CPU.
To provide security for your application, every S7-1200 CPU provides password
protection that allows you to configure access to the CPU functions.
9
2.1.2. General specifications CPU
The S7-1200 includes the 1211C, 1212C, 1214C, 1215C, 1217C, 1214FC, 1215FC.
Each type of CPU has different characteristics and features, suitable for each client
application.
10
Figure 2.2. CPU features PLC S7-1200
11
Figure 2.3. General specifications
12
Figure 2.4. Digital inputs PLC
13
Figure 2.6. CPU 1214C DC/DC/ DC
You have the option of choosing either the LAD (ladder logic) or FBD (Function
Block Diagram) programming language.
The elements of a circuit diagram (such as normally closed contacts, normally open
contacts, and coils) are linked to form networks.
14
2.2. Introduction Softwares
2.2.1. Introduction TIA Portal V13
The latest release of Siemens Step 7, TIA Portal, is a powerful and tightly integrated
software solution for automation and provides a feature-rich programming
environment for the latest Siemens programmable logic controllers. The TIA Portal
version of Step 7 offers a refined user interface, extended drag-and-drop functionality,
and simple and powerful library management for reusable logic.
The software is designed with user-friendly interface, very convenient for the user
by all integrated in one. All PLCs, HMIs, inverters are configured on the TIA Portal
V13, resulting in consistent programmability, product configuration.
- SIMATIC STEP7 Professional V13 and SIMATIC STEP7 V13 PLCSIM: used to
program and simulate PLC S7-1200, S7-300, S7-400.
15
Figure 2.9. Packages included in TIA Portal V13
Siemen’s WinCC in the Totally Integrated Automation Portal (TIA Portal) is part of
a new and tightly integrated engineering package which offers a consistent
environment for programming and configuration of Human Machine Interface
(HMI) applications. With WinCC, the developer can create a connection between an
operator and the automation equipment including visualization, operator control,
alarm display, archiving process values and alarm history, and management of
process or machine variables.
Depending on the function used, the user can select different packages of WinCC as
one of the options of the product. The basic packages of WinCC fall into two
categories:
WinCC Runtime Package (RT): Contains application functions used to run WinCC
applications such as display, control, status notifications, control values, and reports.
WinCC Complete Package (RC for short): Includes the license to build the
configuration license and run the license.
16
The most common scenario is to use FACTORY I/O as a PLC training platform since
PLC are the most common controllers found in industrial applications. However, it
can also be used with microcontrollers, SoftPLC, Modbus, among many other
technologies.
17
Microsoft markets at least a dozen different editions of Microsoft SQL Server, aimed
at different audiences and for workloads ranging from small single-machine
applications to large Internet-facing applications with many concurrent users.
Use Visual Studio to write code in C++, C#, Visual Basic, JavaScript, TypeScript,
Python, and more, but for the purpose of this overview
18
Figure 2.13. WEB Homepage
19
CHAPTER 3: ALGORITHM
3.1. Requires control of the system
Control by manual:
- Phase-by-step control.
Control by automatic:
20
3.3. Parts of algorithm
21
CHAPTER 4: EXECUTION PROCESS
4.1. Design simulation project into Factory I/O
- Step 1: Opening a Scene: To open a scene choose Open from the File Menu (Ctrl +
O) and select it from the list by Left-clicking.
- Step 2: Creating my scene: Click on File, choose New (Ctrl + N) to create an empty
scene. On the Toolbar, select the Orbit camera - you should use the Orbit camera
when editing. If the Palette is not visible click on the Palette icon.
- Step 3: Choose Heavy Load Parts category from the Palette and Left-click and Drag
a Roller Conveyor (2m) into the scene
22
After taking these items and correctly direct of it flowing required. Finally, we have
finished my clay model:
- Step 4: Controlling With a PLC: Open the Drivers window by clicking on File and
next on Drivers (F4). Alternatively, you may open the Drivers window by Left-
clicking on the current driver displayed on the status bar.
Select Siemens S7-1200/1500 Ethernet driver from the list by Left-clicking on it.
Choose S7-1200 model and fill in the Host field with your PLC's IP address. Proceed
to the next step by clicking on the Back Arrow (or the ESC key).
Press the Connect button to connect to the PLC. A successful connection will be
indicated by a green sign displayed next to the drivers list.
Start mapping tags by dragging and dropping each one onto the intended port. To
remove a tag from a port just drag it back to the list. Once have mapped all tags, set
the simulation to Run Mode and test PLC logic.
24
4.2. Design simulation project into Tia Portal
4.2.1. Programing: LAD language
26
Write program use LAD
28
4.4. Creation a Database in SQL Server
29
Step3: Set up Data Type of parameter in Column Name
Step4: My database connected with Scada and got the value from them
30
CHAPTER 5: RESULT - CONCLUSION
5.1. Result
31
Figure 5.3. Table of Data
32
5.2. Conclusion
The main content of the project is to study and simulate a chain of products by the
height along with the arrangement of the order quantity.At the same time display the
values to observe on the website. Thanks to the direction of the teacher plus the effort
of two members, the group achieved the following results:
- Theoretically:
+ Know how to use the TIA Portal V13 software to program and simulate a PLC
control system;
+ Know how to use Factory I / O software to simulate, connect the Portal to Factory
I /O;
- Practice:
+ Simulation model design on SIMATIC WINCC interface (TIA Portal V13) and
Factory I / O;
+ Create a database that records the parameters that you want to observe during the
operation.
- Optimized simulation;
33
REFERENCE
[1]. Trần Văn Hiếu - “Tự Động Hóa PLC S7 - 1200 Với TIA Portal” - Nhà xuất
bản khoa học và kỹ thuật;
[8]. TS. Nguyễn Văn Thái – SCADA – ĐH SPKT TP. Hồ Chí Minh.
[9]. P.Abinandhan, Rajeev Nayan Prakash & Rabindra Kumar Samad - Study and
Implementation of Programmable Logic controller - Department of Electronics &
Communication Engineering National Institute of Technology, Rourkela
34