Академический Документы
Профессиональный Документы
Культура Документы
Programming
Convergence
Jeff Brown
Siemens
Sales Specialist Automation
Booth 813
Topics
Programming Methodologies
• Traditional Approach
• More Advanced Structured Programming/Object Based
• Most Advanced SDK C++ Integration
Digital Factory
Siemens Organizational Structure
9 Divisions are working
Customer
Go-to-market
Healthcare
Power Wind Energy Building Mobility Digital Process Financial
Divisions
PG WP
Power Generation Services
PS EM BT MO DF PD HC SFS
Management Level
Operator Level
Automation
SIMATIC WinCC
SCADA System
PCS 7 SCADA
Control Level
TIA PORTAL
SIMATIC SIMATIC SINUMERIK SIMOTION Engineering
Controllers HMI CNC Motion Control
Framework for
Automation Tasks
Field Level SIMATIC NET
Industrial
Communication
SIMATIC IDENT SIMATIC Distributed SINAMICS
Motor Control Industrial I/O Drive Systems
Identification
Example Systems For Manufacturing
SIMATIC S7 is and will be the innovative and future-proof Controller system of Siemens Industry
Industry 4.0 represents the next paradigm shift in manufacturing…
and brings huge potential for those whom embrace the concepts
Based on the introduction Based on mass pro- Based on the use of … driven by Digitalization, •• 30-50% improved
of mechanical production duction achieved by electronics and IT to Integration and enhanced Humans, devices and systems
equipment driven
by water and steam
division of labor concept
and the use of electrical
further automate
production (automation)
Flexibility efficiency
are connected along the entire
power energy (electrification) value chain
• All relevant information is
• 20-25%
available inless resource
real-time – across
consumption
suppliers, manufacturers and
customers
• Value chain can constantly
1784: First mechanical loom 1870: First conveyor belt,
Cincinnati slaughterhouse,
1969: First programmable
logic controller (PLC) • 30%
optimizehigher revenues
with respect to different
1908: Ford T-Model Modicon 084,
criteria,
McKinsey,e.g.,
2015cost, resources,
customer needs
Time
1800 1900 2000 2025
Systems Engineering Approach
• Real automation systems involve a lot of Real automation projects require teamwork to succeed
equipment • Multiple specialists working together
ƒ PLCs and distributed I/O • Under a Project manager to organize the effort
ƒ CNC and motion controls • In a coordinated effort
• To deliver an integrated solution
ƒ HMI panels and computers
ƒ Motors and drives
ƒ Safety systems
ƒ Computers
ƒ Communications networks
• Real automation projects require extensive
engineering
ƒ PLC programming HMI configuration and programming
ƒ Drive system parameterization and engineering
ƒ Network design and integration
ƒ Integration of OEM machines into the process
Systems Engineering Approach
Step 1 – Defining the System Architecture
Factors influencing the system architecture:
ƒ In many cases, this Project may consist of many, many files in multiple
directories on an engineering station, especially if there are multiple
manufacturers supplying equipment.
Systems Engineering Approach
Step 3 - Configuring and Testing PLC System Components
ƒ Configure and parameterize the PLC
» CPU
» I/O modules
» I/O networks
» communications cards
» any special function modules
ƒ Programs can contain main sections, start-up routines, error response routines, time-
based routines, process-initiated routines, and hardware fault routines, all of which need
to be organized logically.
ƒ Programs can be further broken down based on control zones within the machine,
individual function within a zone, and so on.
ƒ Accuracy of documentation is vital for ongoing maintenance and for effective engineering
support.
ƒ Managing different revisions of program changes, HMI changes, and other changes is equally as
challenging.
ƒ While this is the “final step,” it is the most important step to the end user.
Totally Integrated Automation –
Discover efficiencies with the TIA Portal
STEP 7 V14 Safety V14 WinCC V14 Startdrive V14 Simocode V14
Task Cards –
HW Catalog
Inspector
Window
Status Bar
TIA Portal
Overview of the functional scope of the products
SIMATIC STEP 7 SIMATIC WinCC SINAMICS Startdrive
Programming languages
Machine-level operator control and monitoring Drive configuration,
ƒ LAD, FBD, SCL, STL*), S7-GRAPH*)
SCADA applications commissioning, diagnostics
Option STEP 7 Safety
Professional
Professional
Startdrive
S7-1500 PC single user G120D
Advanced
S7-300 / S7-400 Comfort Panels
G120P
Comfort
and x77 (without micro),
ET 200 CPU, (incl. Failsafe) mobile
Basic
Basic
Communication
ƒ PROFIBUS, PROFINET, network topology, (AS-i, IO-Link, but only SIMATIC products)
Shared functions
ƒ System diagnostics, import/export to/from Excel, undo, … *) Only in Professional for S7-300/400/1500/WinAC
Automation Of Engineering Tasks
Own Import /
Fully automatic program export
Export/Import functionality
execution of EXE XML
• Exporting, modifying actions
and importing project data
Simple operator
control with own
user interface
T
TIA Portal options
Openness: Standardized exchange between Electro-CAD and
Automation
Electrical CAD tools TIA Portal V14 SP1
PLC_1 HWCN + IO
PLC_2
Export/import
Export/import
XML file
IO-
XML file
Device_1 ƒ Article number
ƒ Article description
AML file ƒ Network connections
ƒ Configured firmware version
ƒ Tag table
Customer benefits
Live demonstration
TIA Portal options
Openness: Automatic generation of projects, software and
hardware Customer benefits
Project generator
ƒ Generation of the
complete automation
DLL
Project for Machine A project with TIA Portal
openness (hardware &
TIA openness
TIA Portal software)
01.11.2017
Page 23 DF FA AS E&C-PRM
TIA Portal V14
Generating instead of programming
Conveyor 1
Conveyor 2
Automated Conveyor 3
Engineering Drive
generation
Generate
PLC/HMI
Programming manually
Manual
Engineering
SiVArc Simatic Visualization Architect
T
TIA Portal V14
What´s SiVArc?
Si V Arc
SIMATIC Visualization Architect
T
TIA Portal V14
SiVArc - Example
Transparent operation with TIA Portal
Diagnostics management
Diagnostics
management
Increased
availability of
machines and
production plants
… reduce
production
Immediately detect errors in the automation system outages
… through integrated system diagnostics across all system USP
components
Efficient diagnostics of process malfunctions
USP
NEWEfficient
… with the standardized
diagnostics of process malfunctions
machine
… through and Trace
integrated plantordiagnostics SIMATIC ProDiag USP
… standardized machine and plant diagnostics ProDiag
NEW
Ensuring Uptime with Integrated systems diagnostics
Display
Simple configuring
without programming
Webserver
Consistent
diagnostics
TIA Portal V14
SIMATIC ProDiag - Functionality
Analysis of errors in the
manufacturing process – ProDiag
• Efficient diagnostics of process disturbances --
using standardized machine
and plant diagnostics ProDiag PLC code
• Integrated – automatic generation viewer
Automatic
of monitoring systems and visualization code generation
• Eliminate faults and errors quickly – detailed
information about fault/error location, fault/error cause Auto
and information about troubleshooting update
Configure alarm Visualization
• Auto Update – monitoring systems are
independent of the user program
J
Machine and plant diagnostics with SIMATIC ProDiag
… analysis of errors in the manufacturing process
Fast identification of errors
… display of the faulty operands directly
in the message with symbol and
commentary
"Feedback-free"
… define supervisions independently
of the user program
Always "up-to-date"
… automatic synchronization of the
HMI devices – also after changes
in the user program
Machine and plant diagnostics with SIMATIC ProDiag
… full integration into TIA Portal
DB FB
"independent" PLC Data Function
... of language editors / program code Tag Table block block
"comprehensive"
… also for safety and
know-protected blocks NEW
"consistent"
... Integration in cross-reference
functions with permanent data
consistency
Machine and plant diagnostics with SIMATIC ProDiag
… project-specific specification of the most important settings
"efficient" NEW
… one-off specification of the
alarm structure
"intelligent"
… alarm texts are derived automatically
from the texts existing in the project
"international"
… complete foreign-language handling
of the TIA Portal is available
Machine and plant diagnostics with SIMATIC ProDiag
… automatic update of the operating stations
"interruption-free"
... HMI devices do not have to exit the
runtime mode in case of changes
"time-saving"
… much easier maintenance work
Auto
update
"seamless"
… system guarantees data consistency
Traditional Automation Programming Capabilities
Tasks
Criteria -Create PLC
- Easily Setup Configure -Name I/O
Inputs and Outputs -Program Ladder
- Relay Ladder Logic -Create HMI
Implementation -Create Buttons with Tags
- Hmi Integration
Program Ladder Logic
Add HMI and Logic
Simulate And Test PLC and HMI
More Advanced Programming
Recipe A
Recipe B Pump
Main Main Main
Mixer
Outlet
Outlet
Here, individual functions with fixed Individual functions are created with
All instructions are parameters, whereby each call can be
found in one block, usually addresses are found in individual
blocks, which are called from the made with different addresses. These
in the Main Routine [OB 1]
Main routine [OB 1] one after the functions are thereby reusable, vastly
other. shortening development and commissioning
times and reducing program size and
complexity.
More Advanced Programming
S7 Program Blocks at a Glance
Operating System
Cycle
Time
Process
Error
Legend:
OB = Organization Block
FB = Function Block
FC = Function
DB = Data Block
More Advanced Programming
Anatomy of a “Function”
Local variables
referred to as Local Variable Definition
“formal
parameters”
User program code
That operates on the Output
Input Parameters
Parameters “Local Variables” and calculates
one or more output values
A
125 Add A to B
Put results C Answer = 141
B
16 Into C
More Advanced Programming
Adding Functions (FCs) to the Project
More Advanced Programming
Developing a Function
Block
Interface
Code
Section
More Advanced Programming
Assigning Parameters to Code Blocks
More Advanced Programming
Calling Functions in the Program
More Advanced Programming
Overview of Data Blocks
Function DB20
FC20
Double-click
Add new block
Select
Data Block
Data Block as
Block Type
More Advanced Programming
Data Block Element Properties
• Global data blocks contain “data items” for use anywhere in
the program. As such, they require the following Properties:
FB 1 FB 1
“Motor “Motor DB 2
Logic” Logic” “My Logic Data 2”
FB 1 FB 1 DB 3
“Motor “Motor “My Logic Data 3”
Logic” Logic”
DB 4
“My Logic Data 4”
More Advanced Programming
PLC User Defined Data Types
Most Advanced Programming - SIMATIC ODK 1500S
Why should C++ be used for real time applications?
Model-based • Direct use of automatically generated C++ source code for control tasks
software development: • Utilization as black box, preferably without manual rework
Exporting control
codes über C++
Cross-platform programming
• Re-utilization of central functions on several platforms, even in
“Non-PLC-systems”
• Programming with C++ more efficient than with SCL in certain cases
Most Advanced Programming SIMATIC ODK 1500S
Execution of C/C++-Code with a S7-1500 Controller
Controller Execution of functions in loadable libraries at runtime
Windows Real-time
ODK dll OB ODK so Real-time: SO (shared object)
application application • algorithm, closed loop controller, …
FB Load S7-1500 CPU 1518(F)-4 PN/DP ODK
• Real-time: Eclipse
SIMATIC Target 1500S • Windows: Visual Studio
(optional)
Execution of
ODK application binaries
Runtime
• Engineering Efficiency
• Automate Hardware Config
• Automate PLC Code Generation
• Automate HMI/SCADA Generation
• Simulate PLC/HMI
Diagnostics
• Built Into Systems
• Auto Generate Alarms/Diagnostics