Date:30.09.2014 File:PRO2 13D.1 SIMATIC S7 Siemens AG 1999. All rights reserved. Information and Training Center Knowledge for Automation Инжинеринговые.

Презентация:



Advertisements
Похожие презентации
Date: File:GRAPH_03e.1 SIMATIC S7 Siemens AG All rights reserved. SITRAIN Training for Automation and Drives Programming Steps and Transitions.
Advertisements

Date: File:GRAPH_04e.1 SIMATIC S7 Siemens AG All rights reserved. SITRAIN Training for Automation and Drives Debug and Start-Up.
Date: File:GRAPH_02e.1 SIMATIC S7 Siemens AG All rights reserved. SITRAIN Training for Automation and Drives Project Planning and Configuration.
Date: File:GRAPH_06e.1 SIMATIC S7 Siemens AG All rights reserved. SITRAIN Training for Automation and Drives Event-Dependent Actions and.
Date: File:GRAPH_04e.1 SIMATIC S7 Siemens AG All rights reserved. SITRAIN Training for Automation and Drives Отладка и пуск.
Date: File:GRAPH_02e.1 SIMATIC S7 Siemens AG All rights reserved. SITRAIN Training for Automation and Drives Project Planning and Configuration.
Date: File:GRAPH_08e.1 SIMATIC S7 Siemens AG All rights reserved. SITRAIN Training for Automation and Drives Diagnostics.
Date: File:GRAPH_05e.1 SIMATIC S7 Siemens AG All rights reserved. SITRAIN Training for Automation and Drives Documentation and ASCII Archives.
© 2009 Avaya Inc. All rights reserved.1 Chapter Two, Voic Pro Components Module Two – Actions, Variables & Conditions.
© 2005 Cisco Systems, Inc. All rights reserved. BGP v Route Selection Using Policy Controls Applying Route-Maps as BGP Filters.
Date: File:GRAPH_07e.1 SIMATIC S7 Siemens AG All rights reserved. SITRAIN Training for Automation and Drives Auto EnableAuto FInPos Motor.
Loader Design Options Linkage Editors Dynamic Linking Bootstrap Loaders.
Date: File:GRAPH_05e.1 SIMATIC S7 Siemens AG All rights reserved. SITRAIN Training for Automation and Drives Документирование и архивы.
© 2006 Cisco Systems, Inc. All rights reserved. ICND v Completing ISDN Calls Configuring ISDN BRI and PRI.
Date: File:GRAPH_01e.1 SIMATIC S7 Siemens AG All rights reserved. SITRAIN Training for Automation and Drives Introduction.
Lecture # Computer Architecture Computer Architecture = ISA + MO ISA stands for instruction set architecture is a logical view of computer system.
UNIT 2. Introduction to Computer Programming. COM E 211: Basic Computer Programming UNIT 2. Introduction to Computer Programming Algorithm & Flowcharting.
© 2002, Cisco Systems, Inc. All rights reserved. AWLF 3.0Module 7-1 © 2002, Cisco Systems, Inc. All rights reserved.
Structured Error Handling in the ABL Sarah Marshall QA Architect, OpenEdge Session 128.
© 2006 Cisco Systems, Inc. All rights reserved. HIPS v Administering Events and Generating Reports Managing Events.
Транксрипт:

Date: File:PRO2_13D.1 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Инжинеринговые пакеты для S7/M7 SCL CFCSFC S7-GRAPH HIGRAPH

Date: File:PRO2_13D.2 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Инжинеринговые пакеты для S7/M7 SCL CFCSFC S7-GRAPH HIGRAPH

Date: File:PRO2_13D.3 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Программный пакет S7- GRAPH S1 S2 T1 T2 S4 T3 S6 T4 T5 S5 S7-GRAPH: инструмент для программирования последовательностей l Совместимость с IEC l Разработан для требований промышленности l Графическое представление процесса через шаги и переходы l Шаги содержат действия l Переходы проверяют возможность попасть на следующий шаг С S7-GRAPH Вы можете оптимизировать следующие стадии в проекте автоматизации : l Планирование, конфигурирование l Программирование l Отладку l Запуск l Обслуживание, диагностику

Date: File:PRO2_13D.4 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Структура программы последовательной системы управления S1 Step 1 S2 Step 2 T1 Переход 1 MotorLimit switch Условия, разрешающие шаг Переход 2 Input 1Input 2 Условия, разрешающие шаг Step 1 Действие Step 2 Действие

Date: File:PRO2_13D.5 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Создание FB, реализующего последовательность

Date: File:PRO2_13D.6 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Представления последовательности Обзор Одна страница Один шаг

Date: File:PRO2_13D.7 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation S1 Элементы последовательности S2 T1 T2 S4 T3 Начальный шаг Переход S5S6 T4 T5 Окончание последовательности Открытие альтернативного ответвления Открытие параллельного ответвления Закрытие альтернативного ответвления Закрытие параллельного ответвления Последовательность 1 S7 S8 T6 T7 S9 T9 Последовательность 2 S8 T9 Переход на шаг 8

Date: File:PRO2_13D.8 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Программирование действий (акций) S20 T20 N"Forward" L1 SQ 4.3 DM3.0 T#4s "Interlock"Interlock ( ) "Supervision"Supervision ( ) "Input 1""Input 2" Step-enabling conditions

Date: File:PRO2_13D.9 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Блок акций с простыми инструкциями l N = Назначение Не-сохраняя l S = Установить (Сохранить) l D = Задержка время, назначать не-сохраняемую задержку времени T l L = Ограничение времени, назначение не-сохраняемого на ограниченного времени l CALL = Вызов блока Action_block _1 NM1.1 SM1.2 RM1.3 DM1.4 T#1H2M3S LM1.5 T#4MS CALLFC1 Стандартные акции в шаге

Date: File:PRO2_13D.10 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Action block with conditional instructions Conditions l An action identified with a "C" (Condition) is only executed if the interlock condition for the step is true ("C" = 1). l An interlock error exists if the condition is zero. The action subject to the condition C is then not executed. The step is marked and the error message "Error" is issued. Action_block _2 NCM1.1 SCM1.2 RCM1.3 DCM1.4 T#1H2M3S LCM1.5 T#4MS CALLCFB5.DB3 Actions Dependent on an Interlock

Date: File:PRO2_13D.11 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Action block with event-driven instructions The action is executed once in the cycle in which the event occurs l A1 = Acknowledge l L1 = Interlock error coming l L0 = Interlock error going l S1 = Step activated l S0 = Step deactivated l V1 = Supervision error coming l V0 = Supervision error going Action_block _3 A1 NM1.1 L1 NM1.2 L0NM1.3 S1NM1.4 S0NM2.4 V1NM2.5 V0NM2.6 Actions Triggered by an Event

Date: File:PRO2_13D.12 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Checking Conditions in Transitions, Interlocks and Supervisions S3 Step 3 T3 Valves_on "Valve_1""Valve_2" CMP ==I Step before the transition Transition number Transition name NO contact NC contact Compare box LAD branch, open LAD branch, closed MW0 MW2

Date: File:PRO2_13D.13 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Permanent Instructions Permanent instructions before the sequencer Permanent instructions after the sequencer "Limit switch" "EMER_OFF" ( ) "Brake closed" "Controller enable" ( ) 1 2 "Valve_2open" 3 CALL FC1 INIT:=(BOOL)(IN) "Safety door closed" ( ) 1 "Feed enable" "Pushbutton" Permanent conditions Permanent block call 2 3 CALL FC1 INIT:=(BOOL)(IN) Permanent conditions Permanent block call CALL FC5 TEMP:=(INT)(IN) PRESS:=(INT)(IN) RESULT:=(INT)(OUT)

Date: File:PRO2_13D.14 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Creating an Executable Block S1 Step 1 S2 Step 2 "Motor""Limit switch" Step-enabling conditions "Input 1""Input 2" Step-enabling conditions Save sequencer as executable S7 block in Blocks FB17 Save sequencer as S7-GRAPH source in SO S7-GRAPH source

Date: File:PRO2_13D.15 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Integrating an FB Call in OB1 Two forms of block call l Minimum call parameters (default) 1 input parameter for controlling the sequencer l Standard call parameters 12 input parameters for controlling the sequencer 7 output parameters for displaying operating states l Maximum parameter set 17 input parameters for controlling the sequencer 12 output parameters for display Standard parameter set Minimum parameter set

Date: File:PRO2_13D.16 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Activating the Debugging Functions Procedure l Download sequencer FB and instance DB Use the menu commands PLC -> Download to download the sequencer FB and the instance DB to the PLC l Select instance DB: Select the instance DB you want to use for the test by choosing the menu commands Debug -> Test Environment l Start the "Monitor" function: Select the desired section of the sequential control system. The status information will be given for the part currently visible in the open window. Activate the menu command Debug -> Monitor (checkmark) l Exit the "Monitor" function: Deactivate the menu command Debug -> Monitor

Date: File:PRO2_13D.17 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation The S7- HiGraph Software Package Position cam switch Index in Index out Tighten/loosen counter bearing Workpiece Turn left Turn right Motor Index Counter bearing Motor Coordinator S7-HiGraph: Tool for programming with state diagrams l Machine is divided up into function units l State diagrams are created for each function unit l States contain actions l State diagrams communicate by means of messages You can optimize the following phases in an automation project with S7-HiGraph: l Planning, configuring l Programming and debugging l Startup l Maintenance, diagnostics l Supports reusability

Date: File:PRO2_13D.18 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Principle of the State Diagram Method Example: Rotary table for milling machine l Function units (FUs) Motor Index Counter bearing l State diagrams One diagram for each FU One coordinating diagram Position cam switch Index in Index out Tighten/loosen counter bearing Workpiece Turn left Turn right Motor Index Counter bearing Motor Coordinator

Date: File:PRO2_13D.19 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Elements of a State Diagram States 0,1,... l Represented by circles l Static states l Dynamic states l Always one active state l Actions are assigned to the states Transitions l Represented by arrows l Transition conditions and actions are assigned to the transitions

Date: File:PRO2_13D.20 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Example: State Diagrams for an Elevator Controller Motor Diagram for door on 2nd floor Diagram for door on 1st floor Diagram for door on ground floor State diagram for the elevator 2nd floor 1st floor Ground floor Elevator with doors

Date: File:PRO2_13D.21 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Creating a State Diagram

Date: File:PRO2_13D.22 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation The HiGraph User Interface 1 2 3

Date: File:PRO2_13D.23 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Inserting States and Transitions 1

Date: File:PRO2_13D.24 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Programming Actions

Date: File:PRO2_13D.25 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Programming Transitions

Date: File:PRO2_13D.26 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Programming Permanent Instructions

Date: File:PRO2_13D.27 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Programming Graph Groups

Date: File:PRO2_13D.28 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Assigning Actual Parameters Selected instance

Date: File:PRO2_13D.29 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Message Exchange between State Diagrams State diagram for elevator Interface declaration for elevator Entry action for state 2 A To_floor_2; S Door_2_opn; NameData typeMessage Door_2_opn boolout A Door_opn Transition condition for t 01 State diagram for door Interface declaration for door NameData typeMessage Door_opnboolin Door_2_opn/Door_opn

Date: File:PRO2_13D.30 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Assigning Actual Values for Messages Selected instance

Date: File:PRO2_13D.31 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Saving and Compiling Establish execution sequence l Menu: Edit -> Execute Order Compile l Menu: File -> Compile Integrate in OB1 l Assign parameter INIT_SD FC Graph group DB Data of graph group Index Counter bearing Coordinator Motor

Date: File:PRO2_13D.32 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Debug Functions in S7-HiGraph

Date: File:PRO2_13D.33 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Programming in the S7- SCL High-Level Language FUNCTION_BLOCK Integrator VAR_INPUT Init: BOOL; // Reset output value x : REAL; // Input value Ta : TIME; // Sampling time in ms Ti : TIME;// Integration time in ms ulim: REAL;// Output value upper limit llim: REAL; // Output value lower limit END_VAR VAR_OUTPUT y : REAL:= 0.0;// Initialize output value with 0 END_VAR BEGIN IF TIME_TO_DINT(Ti) = 0 THEN // Division by ? OK := FALSE; y := 0.0; RETURN; END_IF; IF Init THEN y:= 0.0; ELSE y := y+TIME_TO_DINT(Ta)*x/TIME_TO_DINT(Ti); IF y > ulim THEN y := ulim; END_IF; IF y < llim THEN y := llim; END_IF; END_IF; END_FUNCTION_BLOCK S7-SCL: High-level language for writing PLC programs l Compatible with IEC Text (ST=Structured Text)) l Certified to PLCopen Base Level l Contains all the typical elements of a high-level language, such as operators, expressions, control statements l PLC functions are integrated (e.g. I/O access, timers, counters...) Advantages: l Well structured, easy-to-read programs l For high-level language users l For complex algorithms, large amounts of data

Date: File:PRO2_13D.34 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Structure of an SCL Source File.... FUNCTION_BLOCK FB10 END_FUNCTION_BLOCK Declaration part Statement part Attributes

Date: File:PRO2_13D.35 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation The Declaration Part of a Block Declaration part Begin ( * Statement part *) FUNCTION_BLOCK fb_name END_FUNCTION_BLOCK Attributes CONST CONSTANT:=5; P_Part:=0.8; END_CONST VAR Val1,Val2,Val3 :INT; END_VAR

Date: File:PRO2_13D.36 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation The Statement Part of a Block Declaration part Begin ( * Statement part *) FUNCTION_BLOCK fb_name END_FUNCTION_BLOCK Attributes Begin // Example of a value assignment Measured value:=0 ; // Example of a // control statement IF I1.1 THEN N:=0; SUM:=0.0; ELSIF START = TRUE THEN N:=N+1; SUM:=SUM + IN; ELSE OK:=FALSE; END_IF; // Example of a subroutine call FB11.DB22(Pass:=10);

Date: File:PRO2_13D.37 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Expressions, Operators and Operands in S7-SCL Expressions l Mathematical expressions ((3+CONST_INT) * (VAR_INT ** 37) / 3.14) l Comparison expressionsA >=9 l Logical expressions(n >5) AND (n < 20) Operators l Assignment operator:= l Mathematical operators*, /, MOD, DIV, +, -, ** l Comparison operators, =, = l Logical operatorsNOT, AND or &, XOR, OR OPERANDS l Constants30. 0, FACTOR, 'SIEMENS' l Extended variablesStatus, IB5, DB10.DW5, Motor.Current, FC12(A:=On) l Expressions in (...)((3+CONST_INT) * (VAR_INT ** 37))

Date: File:PRO2_13D.38 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Statements in S7-SCL Value assignments l Example: A := B + C; Control statements l IF statementIF E1.1 THEN... ELSIF... ELSE... END_IF l CASE statementCASE SELECTOR OF 1:...; 2:... ELSE:... END_CASE l FOR statementFOR INDEX := 1 TO 49 BY 2 DO... END_FOR l WHILE statementWHILE INDEX

Date: File:PRO2_13D.39 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Value Assignments in S7-SCL Local variables l Elementary data type COUNTER := (5 + RUNVAR) * 2; l Structures Complete structureSTRUCT_1 := STRUCT_2; ComponentsSTRUCT_1.COMP3 := STRUCT_2.COMP1; l Array Complete arrayARRAY_1 := ARRAY_2; ComponentsARRAY_1[I] := ARRAY_2 [J]; Global variables l CPU memory areas Absolute accessVALUE := IW10; Symbolic VALUE := INPUT;// "Input" in symbol table IndexedVALUE := IW[INDEX]; l Data blocks Absolute accessVALUE := DB11.DW5; SymbolicVALUE := MOTOR.CURRENT;// MOTOR and CURRENT IndexedVALUE := MOTOR.DW[Index];// must be in the symbol table Via input parametersVALUE := I_PAR.DW[Index];// I_PAR is decl. as VAR_IN

Date: File:PRO2_13D.40 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation The IF Statement in S7-SCL Syntax IF THEN [ELSIF THEN ]//optional. [ELSE ]//optional END_IF Example IF INPUT_OK THEN N := 0; SUM := 0.0; OK := FALSE;// Set OK flag to FALSE ELSIF START_OK THEN N := N + 1; SUM := SUM + IN; ELSE OK := FALSE; END_IF;

Date: File:PRO2_13D.41 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation The WHILE Statement in S7-SCL Syntax WHILE DO END_WHILE Example FUNCTION_BLOCK SEARCH// SEARCH is declared in the symbol table VAR INDEX: INT; KEYWORD: ARRAY[1..50] OF STRING; END_VAR BEGIN INDEX := 1; WHILE INDEX 'KEY' DO INDEX := INDEX + 2; END_WHILE; END_FUNCTION_BLOCK

Date: File:PRO2_13D.42 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Calling Function Blocks Calling with instance DB l Absolute call FB10.DB20(X1 := 5, X2 := IW12,...);(*Call FB10 with instance data block DB20 *) l Symbolic call DRIVE.ON(X1 =5, X2 := IW12,...);(*DRIVE and ON are declared in the symbol table *) Calling as a multiple instance l Call using identifier VAR MOTOR: FB10; END_VAR BEGIN. (*Calling as a multiple instance MOTOR(X1 := 5, X2 := IW12,...);is only possible within other function blocks *)

Date: File:PRO2_13D.43 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation The "OK" Flag for Error Evaluation Global bit for error detection (Copied to the BR bit at the end of the block) Example: // Set OK variable to TRUE to enable // a check to be made to see whether // the following actions are performed // correctly OK := TRUE; SUM := SUM + IN; IF OK THEN// Addition was performed correctly... ELSE// Overflow in addition... END_IF;

Date: File:PRO2_13D.44 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Compiling an SCL Source File

Date: File:PRO2_13D.45 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Continuous Monitoring

Date: File:PRO2_13D.46 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Setting and Editing Breakpoints

Date: File:PRO2_13D.47 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation CFC for SIMATIC S7 and SIMATIC M7 CFC (Continuous Function Chart): Graphical tool for writing PLC programs l You position the blocks on a drawing sheet and interconnect them l Interconnections are possible: -between I/O fields -to blocks in other charts l Margin bar for management of sources and destinations Advantages l Programming for process engineers l Speeds up writing, debugging and startup

Date: File:PRO2_13D.48 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation CFC Chart Automatic routing Margin bar

Date: File:PRO2_13D.49 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation CFC Objects Block-granular definition of operation attributes Default values for inputs/outputs Block types Block instances Basic instructions Global addresses Global DBs I/O signals M, C, T Instance name Type name

Date: File:PRO2_13D.50 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Configuring CFC Applications instead of Programming 1. Insert blocks 2. Assign parameters to blocks and interconnect them 3. Adapt operation attributes 4. Compile/Download 5. Debug 6. Finished Programm übersetzen

Date: File:PRO2_13D.51 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Integral Test and Debugging Functions Monitor variable M7 oscilloscope Parameterize variable M7: Start, Stop and Continue Application, Reset, Set Breakpoints, Single-step mode

Date: File:PRO2_13D.52 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Configuring Sequential Control Systems with S7- SFC S7-SFC: Tool for programming sequencers l Designed for the requirements of process automation l Compatible with IEC l Steps assign values to the blocks in the CFC l Transitions check the step-enabling conditions l Syntax checked during writing Direct link with CFC l Transfer of values by Drag&Drop l Cross references Visualization in WinCC

Date: File:PRO2_13D.53 SIMATIC S7 Siemens AG All rights reserved. Information and Training Center Knowledge for Automation Cooperation between CFC/SFC and SCL CFC Action configuration with SCL Cooperation between CFC/SFC SFC