You are on page 1of 96

ITC

1/1

www.siemens.com/simatic-pcs7

ITC

2/1

ITC

3/1

PCS 7 - The Process Control System for Totally Integrated Automation TIA As the process control system in the company-wide automation network called Totally Integrated Automation, SIMATIC PCS 7 uses selected standard hardware and software components from the TIA building block system. Its uniform data management, communication and configuration offer an open platform for modern, future-oriented and economical automation solutions in all sectors of the process industry, production industry and hybrid industry (mixture of continuous/batch processes and d di discrete t production, d ti e.g. i in th the glass l or pharmaceuticals h ti l i industries). d ti ) Within the TIA network, SIMATIC PCS 7 not only handles standard process engineering tasks, it can also automate secondary processes (e.g. filling, packaging) or input/output logistics (e.g. material flows, storage) for a production location. By linking the automation level to the IT world, the process data become available th throughout h t the th company for f the th evaluation, l ti planning, l i coordination di ti and d optimization ti i ti of operational sequences, production processes and commercial processes.

ITC

4/1

Basic structure of a PCS 7 plant The modular architecture of SIMATIC PCS 7 is based on selected hardware and software components from the standard range of SIMATIC programs. The SIMATIC PCS 7 process control system can be seamlessly incorporated into the companywide information network using interfaces based on international industrial standards for data exchange such as Ethernet, TCP/IP, OPC or @aGlance.

ITC

5/1

Process Control Combination of Automation engineering + HMI + Communication Automation System AS + Operator Station OS + Bus * Configuration centralized in the Engineering System ES, which contains libraries tools and AS/OS blocks. libraries, blocks

ITC

6/1

-SIMATIC Process Control System 7 based on the SIMATIC S7-400 CPUs. -Other controllers (S7-200 & S7-300 .etc) can be integrated in PCS7 but not parameterized.

ITC

7/1

Overview Select SIMATIC S7-400 components can be combined in the automation systems of the SIMATIC PCS 7 process control system. The following characteristics make the SIMATIC S7-400 predestined for use as a SIMATIC PCS 7 automation system: modular and fan-free design, high degree of expansion capability and robust design, design simple or redundant design, comprehensive communications capabilities, integral system functions and simple connection of central or distributed I/Os. Various automation systems are available with a price/performance ratio which can be tailored to your system requirements. All automation systems are equipped with an onboard PROFIBUS DP field-bus connection. Additional PROFIBUS communication modules can be fitted if required. Design The automation systems are delivered as preassembled and tested complete systems without surcharge, and are mostly comprised of: Racks with 9 or 18 slots, which can be physically separate in the case of redundant systems Standard CPU 414-3, 416-2, 416-3 or 417-4 as well as the redundant CPU 414-4H or 417-4H
8/1

ITC

ITC

9/1

ITC

10/1

SIMATIC PCS7 BOX extends the product spectrum of SIMATIC PCS7 by adding a cost-effective entrance-level product that unites SIMATIC PCS7 functionality for automation, operation, visualization and engineering in one compact PC system. In conjunction with the distributed I/Os on the PROFIBUS, SIMATIC PCS7 BOX represents a complete SIMATIC PCS7 process control system.

ITC

11/1

ITC

12/1

Engineering Toolset 1-Hardware Configuration 2- Libraries (for modules, blocks,.) 3- CFC Continues Function Chart for function diagram 4- SFC Sequiatial Function Chart for process control 5- Graphic Designer 6- Faceplate Designer 7- SCL Structured Control Language for customized function block using (codes) commands AWL file 8- Simatic Batch for Batch process 9- Simatic Route Control for route selections 10- F-System (yellow code) Fail safe system 11- PDM Process Device Manager -From 1 to 4 is used for AS logic programming -5 5&6i is used df for SCADA (M (Monitor it & C Control) t l) -From 1 to 6 is a standard SW package rest is special ones

ITC

13/1

ITC

14/1

ITC

15/1

ITC

16/1

Block Libraries Depending on whether V4 (old project, old CPU) or V5 (new project, new CPU) is used, use the File Manager in the SIMATIC Manager to hide the libraries you are not using. It can be advantageous to create a separate library for each project in the same project directory. In the first instance, keep the blocks there that will then be used in the project. If you upgrade the software at a later date, you can first try to import to a copy of this library before using the blocks in projects. Create C t P Project j t U th Use the SIMATIC Manager M t to create t the th new project. j t The Manager handles all of the data generated during configuration. Resources The resources include the stations in the project (with their hardware), the S7 programs (with blocks in the user programs, chart containers containing blocks imported via CFC), networks, as well as the OS. Hardware Within the project, the AS hardware components (CPU, CP, and I/O modules) d l ) must tb be configured fi di in accordance d with ith th the h hardware d structure. t t Thi This configuration is loaded into the station and sets parameters for the modules. Plant Hierarchy A hierarchy (with a maximum of five levels) is used to display the system to be configured in the project. The hierarchy corresponds to the AKZ system (comparable to a directory tree). Assign Resources One AS and one OS can be assigned to each hierarchy l level. l Th The subordinate b di t l levels l can i inherit h it th the assignment. i t CFC and d SFC charts, h t OS displays, reports and documents belonging to the assigned AS/OS are inserted in the last level (as leaves on the branch). Software AS-specific or OS-specific tools are used to configure the software as needed. From the AS, you double-click the object in the plant hierarchy to start the software.

ITC

17/1

Info Flow Sensors, transducers, and DP process signal converters record process information. The AS processes this information and uses the same path to pass it on to the actuator. In parallel, commands are sent from the OS to the AS. AS information is displayed graphically on the OS. ET 200M The IM 153-1 interface module converts the process signal converter (I/O module) information into message frames for and from the AS. DP bus The bus (PROFIBUS DP) transports the message frames between the AS (DP master interface) and the ET 200M interfaces. AS (S7 417-4) The DP master interface reads in the telegrams in the AS. The driver blocks convert and process the message frames into process values. That is, open-loop control algorithms and closed-loop control algorithms convert the frames into commands and send the commands back to the distributed I/Os the same way. At the same time, the values are monitored. When specified events t occur, messages are sent t to t the th OS. OS System Bus The system bus can be MPI (Multi-Point-Interface), PROFIBUS or the industrial Ethernet. The system bus serves to communicate between the AS-OS, AS-AS, as well as the ES with the above mentioned nodes used for configuring and startup purposes. OS (WinCC) Data coming from the AS - embedded in process mimics - is displayed graphically hi ll as measured d values l with ith a ti time-based b d sequence, and d as messages with ith classification. The plant operator's commands are passed on the relevant AS and the response information displayed. The configuration and startup steps shown on the following pages are based on this procedure.

ITC

18/1

ES Software The system should be configured with a uniform, plantoriented approach. This is why the components shown in the slide above were expanded and coordinated with each other. The optional package expands the SIMATIC Manager and makes it possible to carry out the described task. System Orientation The optional process control components provide the PCS project planning engineer with an environment in which process automation tasks, operating and monitoring tasks, communication between the components, and dd documentation t ti can b be carried i d out ti in a system-oriented t i t d manner. Si Since th the various SIMATIC components are managed in a system-related measuring pointoriented hierarchy (project planning engineer assigns AS objects, OS objects and documents to a specific system component), configuration, startup and maintenance become significantly more efficient. Import/export Interfaces to other configuration tools are provided. This is how PCS engineering fits into the whole process engineering/production engineering approach. Division of Work Work is divided when a project is handled on various networked PCS. Project work can be divided into several secondary projects on nonnetworked PCs. The divided work is then combined into one project.

ITC

19/1

Vertical Integration The available software, database management and communication allow vertical integration in all components and levels of the TIA product range.

ITC

20/1

Horizontal Integration material to end product storage possible.

All the components in all phases from make horizontal integration

ITC

21/1

ITC

22/1

ITC

23/1

ITC

24/1

ITC

25/1

ITC

26/1

ITC

27/1

ITC

28/1

ITC

29/1

ITC

30/1

ITC

31/1

ITC

32/1

ITC

33/1

www.siemens.com/simatic-pcs7

ITC

34/1

1. Open the SIMATIC Manager 2. If the wizard does not start automatically, select the menu command File > 'New Project' Wizard.... The PCS 7 "New Project" wizard opens. 3. In step 1(4) "Introduction", activate the option "Multiproject with project and master data library" this option is activated as the default setting. 4 Click the "Next" button 4. button. Note: Click on the "Preview>>" button to display a preview of your current stage of configuration. This preview corresponds to the appearance of the project in the SIMATIC Manager .

ITC

35/1

5. In Step 2(4) "Which PLC will you use in your project?", select the CPU type you are using in your project, for example a CPU 417-4. Below the list, you will see detailed information on the selected CPU. When you make your selection here, you should compare the type number and order number printed on the front panel of your CPU with the type number and order number displayed in the list. 6. Click the "Next" button. 7. In step 3(4) "Which objects will be used in the project ?", make the following settings: - In the list box "Number of levels", select the entry "4". - In the "AS objects" section, ensure that the check boxes "CFC chart" and "SFC chart" are activated. - Under OS objects, activate the "PCS 7 OS" check box. The "Single "Single-user ser s system" stem" option is a automatically tomaticall activated. acti ated 8. Click the "Next" button.

ITC

36/1

9. In step 4(4), enter the project name PCS7_ITC in the "Directory name" box and confirm the storage location. 10. Click on the "Finish" (Make) button. The dialog box "Message Number Assignment Selection" opens when the project is created and the check box "Assign unique message numbers CPU wide is activated." 11 Accept the current settings and click the "OK" 11. OK button. button The project is now created with these settings.

ITC

37/1

Once you have opened your project in the SIMATIC Manager, you can activate various views: Select the menu command View > [Name of the desired view] in the SIMATIC Manager: - Component view - Plant view - Process object view (mainly for HW operation) (mainly for hierarchy of the system) (mainly for data data, msg msg, pics pics, duplicate duplicate operations)

If you have already opened several projects, select the menu command Window > [Name of the project (name of the view)]. You can display all the 3 view by the menu command Window > Arrange > [type of arrangement].

ITC

38/1

In the component view: 1. Go to the tree structure and select the folder PCS7_ITC_MP/ PCS7_ITC_Prj/SIMATIC 400(1)". 2. Mark the "Hardware" object in the detail window and select the menu command Edit > Open Object. HW Config is opened and the hardware structure of your system is displayed. Note If the hardware catalog is not displayed, select the menu command View > Catalog. The hardware catalog opens and the "PCS7_V61" profile is active.

ITC

39/1

3. Select the following CP from the catalog: "SIMATIC 400/ CP-400/Industrial Ethernet/ CP 443-1/ 6GK7 443-1EX11-0XE0/V2.0" or "..../ V2.3" and drag it to slot 5 of the rack. The "Properties - Ethernet Interface" dialog box opens. 4 Activate the "Set MAC address/use ISO protocol" option. 4. option 5. In the "MAC address" box, enter the MAC address printed on the front of the CP. 6. Deactivate the "IP protocol is used" option. This deactivates all the associated input boxes. boxes 7. Click the "New" button to create a new network connection. The CPU will communicate with the ES via this network connection. The "Properties - New Subnet Industrial Ethernet" dialog box opens.

ITC

40/1

8. Apply all your selections and click the "OK" button. The "Ethernet(1)" entry is entered in the "Subnet list box and is already selected. 9. Click the "OK" button to enter your settings. The dialog is closed.

ITC

41/1

10.Open the properties of the MPI in the CPU, choose its properties then assign it to a MPI-Subnet and give it an MPI address. This is only for trying the program without AS (controller) using the PLCSim connected to the WinCC (SCADA) 11. Select the menu command Station > Save and Compile. 12 Close HW Config 12. Config.

ITC

42/1

11. Select the following CP from the catalog: "SIMATIC 400/ CP-400/PROFIBUS/ CP 443-5 Ext./ 6GK7 443-5DX04-0XE0 and drag it to slot 6 of the rack. The "Properties - PROFIBUS Interface CP 443-5 Ext" dialog box opens. 12. Assign it to a PROFIBUS-Subnet and give it the same address like the switch in the CP CP.

ITC

43/1

13. Select the following CP from the catalog: "SIMATIC 400/ CP-400/PROFIBUS/ CP 443-5 Ext./ 6GK7 443-5DX04-0XE0 and drag it to slot 6 of the rack. The "Properties - PROFIBUS Interface IM 153-2" dialog box opens. 14. Assign same address like the switch in the IM.

ITC

44/1

15. Select the IM signal modules from the catalog (DI, DO, AI, AO, etc), see next slide 16. Select the menu command Station > Save and Compile. 17. Close HW Config.

ITC

45/1

In the component view 1. Select the object PCS7_ITC_MP/ PCS7_ITC_Prj/ SIMATIC PC Station(1)" in the tree. 2. Select the menu command Edit > Rename. (or right click on the PC station > Rename) 3. Enter the name of the local computer as it appears in the network and press the Enter key. The icon of the PC station is labeled with a yellow arrow in the component Note If the PC station is not labeled with a yellow arrow, press the "F5" key. This refreshes the screen display.

ITC

46/1

1. Select the folder PCS7_ITC_MP/ PCS7_ITC_Prj/ [Name of the PC station]". 2. Mark the "Configuration" object in the detail window and select the menu command Edit > Open Object. HW Config opens and the components of the OS are displayed. HW Config is opened with the settings you made during configuration of the PLC: - The hardware catalog is open. - The "PCS7 "PCS7_V61" V61" profile is active active. 3. Select the following CP from the catalog: "SIMATIC PC-Station/CP-Profibus/CP 5611/SW V6.0 SP5.... and drag it to slot 2 of the rack. The "Properties dialog box opens, close it. 4- Double click the CP 5611, Choose MPI in the interface type. 5 Click on properties to assign the CP5611 to the MPI network giving it the address 5defined in the PG\PC Interface.

ITC

47/1

1. Open the SIMATIC Manager. Select the PC station (from the component view) and the select the menu command PLC > Configure. The "Configure" dialog opens. 2. Select the required target computer in the "Available Computers" list. Click the "Configure" button. The "Configure: <Selected Station>" dialog opens. 3. To perform the remote configuration and finalize it, follow the instructions provided by the online help for the dialog section "Configure: < Selected Station>". Result: The configuration data are transferred to the PC station. You have to download the network settings to this PC station to activate the network connections.

ITC

48/1

1. In the tree, select the object PCS7_ITC_MP/PCS7_ITC_Prj/[Name of you local computer]/ WinCC Application". 2. Mark the "Connections" entry in the detail window and select the menu command Edit > Open Object. Net Pro opens. 3. Select the object "WinCC Application" for the SIMATIC PC station. An empty list is displayed in the lower detail window. You need to enter the required connection in this list. 4. To do this, mark the first line in the lower detail window and select the menu command Insert > New Connection . The "Insert New Connection" dialog opens.

ITC

49/1

5. Select the CPU you are using in your project in the tree. This is the communication partner of the OS, i.e. the OS receives data from this automation system. 6. In the drop-down list "Type", select the entry "S7 Connection" and activate the check box "Display properties before inserting". 7. Click the "OK" button. The "Properties S7 Connection" dialog opens and the "General" tab is active.

ITC

50/1

8. Select the connection partner for the connection between the CPU and OS as shown in the slide. 9. Click the "OK" button. The new connection is shown in the list. This new connection is displayed if you select the CPU for the PLC. 10. Select the menu command Network > Save and Compile 10 Compile. The "Save and Compile" dialog box opens. 11. Activate the "Compile and check everything" option in the dialog and click on the "OK" button. When compiling is completed, the "Outputs for consistency check" message window opens. 12. When the compiling was completed without error, close the window. If any errors are shown, correct them using the error messages and perform the compiling again. 13. Choose the PC station in the NetPro and in the menu command > PLC > Download selected stations.

ITC

51/1

In this course we are working with PLC-Sim as our AS 1- From the SIMATIC Manager menu > Options > Simulation modules to activate the AS simulator. 2- Turn the simulator into Run_P. 3- Back to the NetPro and in the menu command > PLC > Download selected stations. Now we have configured the AS & OS with their network connections.

ITC

52/1

The plant hierarchy that normally abbreviates to PH, mirrors the hierarchical structure of your plant: Plant, unit, function etc. The PH allows you to make a lot of different settings and the most important of these are described below. Number of hierarchy levels: Your plant structure influences the number of hierarchy levels. As a rule of thumb, the more complex the plant structure the higher the number of hierarchy levels you require to reflect your plant structure. Hierarchy folders with the default names are created when you work with the wizard. Selecting the hierarchy level(s) that contribute to the name of the plant designation (also known as higher level designation): The higher level designation abbreviated to HID is used at many points in the PCS 7 project, for example, messages occurring during the process mode and tags contain this HID. This enables you to quickly determine the association of a message or tag to a specific plant unit. s a rule of thumb, the more hierarchy levels used to specify the HID and the longer each individual part is, is the longer and less easily recognizable the entire HID becomes. Deriving the picture tree from the PH: The process pictures are arranged in a certain hierarchy: This allows you to change from an overview picture to a lower level picture showing only part of the overview picture but with far greater detail. You can derive the tree of the process pictures from the plant hierarchy so that they conform to the plant hierarchy hierarchy.

ITC

53/1

1. Select the "color_gs_MP/color_gs_Prj" hierarchy level in the tree structure. 2. Select the menu command Options > Plant Hierarchy > Settings. The "Customize Plant Hierarchy" dialog box opens where you can set all the options for the Plant Hierarchy. 3. Enter the value "4" in the "Number of hierarchy levels" box. This means that a maximum of 4 hierarchy levels are permitted. 4. For hierarchy levels 1 to 4, enter the value "10" in the "Max. number of characters" field. This limits the plant designation to 10 characters per hierarchy level. 5. Activate the "Include in designation" check box for the levels 1 and 2. 6. Activate the "OS area" option button for level 2. 7. Activate the "Base picture hierarchy on the plant hierarchy" check box. 8. Click the "OK" button to enter your settings. The message "You have changed the "Included in HID" property. Do you also want the changes to apply to existing hierarchy folders?" is displayed. 9. Click on the "Yes" button in the dialog. This enters all your settings.

ITC

54/1

1. Rename the highest hierarchy folder to plant and delete all (units & functions in it). 2. Start inserting hierarchy folders like shown in the slide.

ITC

55/1

1. In each hierarchy folder insert an CFC & Picture. 2. Rename the CFC to the hierarchy name. 3. Right click on the picture, choose Object Properties and select to derive the block icons for the symbols in the picture to be taken from the CFC blocks while compiling. compiling Repeat the above steps for all hierarchy folder.

ITC

56/1

ITC

57/1

www.siemens.com/simatic-pcs7

ITC

58/1

What is CFC? CFC (Continuous Function Chart) is a graphic editor that can be used in conjunction with the STEP 7 software package. It is used to create the entire software structure of the CPU from ready-made blocks (or user defined blocks). When working with the editor, you place blocks on function charts, assign parameters to them, and interconnect them. Interconnecting means, for example, that values are transferred from one output to one or more inputs during communication between the blocks.

ITC

59/1

Generating Module Drivers The module drivers in PCS 7 are special blocks for diagnostics and signaling errors that occur during the signal processing. With the "Generate Module Drivers" function, you can include these blocks in your charts automatically if the following conditions are met: The hardware is configured with HW Config and the technological functions are configured in CFC CFC.

ITC

60/1

The following slides is an example for SCL, target is to create reactor block 1- In SM > component view > project master library > sources > right click > insert > SCL 2- In symbol table define reactor as FB600 3- open the SCL file then copy & paste the next code then compile to generate the reactor FB

ITC

61/1

FUNCTION_BLOCK Reactor(* Simulation block with feedback signals for PCS 7 course only *) (* Block Attributes *) TITLE ='REAC'; VERSION:'5.0'; //KNOW HOW PROTECT if no comment //KNOW_HOW_PROTECT AUTHOR:Siemens; FAMILY:Training; NAME:PLANT; (* Variable Declaration *) ( ) VAR_IN_OUT V1_OP_CL: V2_OP_CL: V3_OP_CL: M1_ON_OF: RS_COOL : SET_HOT : V_RESET : END_VAR BOOL; BOOL; ; BOOL; BOOL; BOOL; BOOL; BOOL; ; //Filling1 //Filling2 g //Filling3 //Mixer motor //Container empty and cold //Container full and warm //Valves closed, , motor off

ITC

62/1

VAR_INPUT V1_FLOW: V2_FLOW: V3_FLOW: CFV: V HOT FL: V_HOT_FL: TMP_ENV: TMP_HOT: T_LAG_SH: T_LAG_IN: REAL := 100.0; REAL := 100.0; REAL := 100.0; REAL : := 0.0; 0 0; REAL := 20.0; REAL := 120.0; REAL := 10.0; REAL := 30.0; //Flow V1 0..100% //Flow V2 //Flow V3 //Flow heating 0 0..100% 100% //Environment temperature //Heating medium temperature //T_PT1-Shell[s] //T_PT2-Inside[s] full reactor //Sampling time[s]

REAL := 0.002;

//Correction factor valves

SAMPLE T: REAL := SAMPLE_T: : 1.0; END_VAR VAR_OUTPUT OVERFLOW: TMP_SHEL: FB_V1_CL : FB_V2_CL : FB_V3_CL :

BOOL := FALSE; REAL := 20.0; Bool := 1; ; Bool := 1; Bool := 1;

//Overflow //Fill level in % //Internal temp

LEVEL{S7_m_c:= 'true'} : TMP_INT {S7_m_c:= 'true'} : FB_V1_OP {S7_m_c:= 'true'} : FB_V2_OP {S7_m_c:= 'true'} : FB_V3_OP _ _ { {S7_m_c:= _ _ 'true'} }:

REAL := 0.0; //Shell temp

REAL := 20.0; Bool := 0; Bool := 0; Bool := 0;

//Valve1 closed //Valve1 opened //Valve2 open //Valve3 open p //Motor ON/OFF //Valve2 closed //Valve3 closed

MOTOR_ON_OFF {S7_m_c:= 'true'} : BOOL := 0; END_VAR

ITC

63/1

VAR STATE1 : STATE2 : STATE3 : STATE_M : NIV: TMP SH IN: TMP_SH_IN: TMP_IN_IN: TMP_IN1: TMP_IN2: bool := FALSE; //State //State_AuxiliaryCells AuxiliaryCells bool := 0; bool := 0; bool := 0; REAL := 0.0; REAL := : 20; REAL := 20; REAL := 20; REAL := 20; //State_AuxiliaryCells //State_AuxiliaryCells //State_AuxiliaryCells //Fill level auxiliary cells //Shell temp temp_Auxiliary Auxiliary cell //Inside temp_Auxiliary cells

TMP_SH_HILF: REAL := 20; T LAG IN HILF:REAL : T_LAG_IN_HILF:REAL := 0.0; EXP_SHEL: EXP_IN: TIME1 : TIME2 : TIME3 : REAL := 1.0; REAL := 1.0; real := 0.0; real := 0.0; real := 0.0; ;

TIME_MOTOR : real := 0.0; END_VAR BEGIN // Cold reset; IF RS_COOL THEN RS_COOL:=FALSE; LEVEL:=0.0; TMP_SHEL:=TMP_ENV; TMP_INT:=TMP_ENV; TMP_IN1:=TMP_ENV; TMP_IN2:=TMP_ENV; END_IF;

ITC

64/1

//Warm set; IF SET_HOT SET HOT THEN SET_HOT:=FALSE; LEVEL:=100.0; TMP_SHEL:=TMP_HOT; TMP IN1:=TMP TMP_IN1: TMP_HOT; HOT; TMP_IN2:=TMP_HOT; TMP_INT:=TMP_HOT; END_IF; // Valve and motor reset; IF V_RESET THEN V_RESET := FALSE; V1_OP_CL := FALSE; V2_OP_CL := FALSE; ; V3_OP_CL := FALSE; M1_ON_OF := FALSE; FB_V1_CL := TRUE; FB_V1_OP := FALSE; FB_V2_CL := TRUE; ; FB_V2_OP := FALSE; FB_V3_CL := TRUE; FB_V3_OP := FALSE; STATE1 := 0; STATE2 := 0; STATE3 := 0; STATE_M := 0; END_IF; //Valve1 closed //Valve1 opened //Valve2 closed //Valve2 open //Valve3 closed //Valve3 open

ITC

65/1

// Valve and motor feedback signals; IF V1_OP_CL V1 OP CL <> STATE1 THEN TIME1 := TIME1 + SAMPLE_T; END_IF; IF V2_OP_CL <> STATE2 THEN TIME2 := TIME2 + SAMPLE_T; END_IF; IF V3_OP_CL <> STATE3 THEN TIME3 : := TIME3 + SAMPLE_T; SAMPLE T; END_IF; IF M1_ON_OF <> STATE_M THEN TIME_MOTOR := TIME_MOTOR + SAMPLE_T; END_IF; ; IF (TIME1 >= 4 ) AND (V1_OP_CL = 1) THEN FB_V1_OP := 1; FB_V1_CL := 0; STATE1:= 1; ; TIME1 :=0; ELSIF (TIME1 >= 4 ) AND (V1_OP_CL = 0) THEN FB_V1_OP := 0; FB_V1_CL _ _ := 1; STATE1:= 0; TIME1 :=0; END_IF;

ITC

66/1

IF (TIME2 >= 4 ) AND (V2_OP_CL = 1) THEN FB V2 OP := 1; FB_V2_OP FB_V2_CL := 0; STATE2:= 1; TIME2 :=0; ELSIF (TIME2 >= 4 ) AND (V2_OP_CL = 0) THEN FB_V2_OP := 0; FB_V2_CL := 1; STATE2:= 0; TIME2 :=0; END IF; END_IF; IF (TIME3 >= 4 ) AND (V3_OP_CL = 1) THEN FB_V3_OP := 1; FB_V3_CL := 0; STATE3:= 1; ; TIME3 :=0; ELSIF (TIME3 >= 4 ) AND (V3_OP_CL = 0) THEN FB_V3_OP := 0; FB_V3_CL := 1; ; STATE3:= 0; TIME3 :=0; END_IF; IF (TIME_MOTOR >= 4 ) AND (M1_ON_OF = 1) THEN MOTOR_ON_OFF := 1; STATE_M:= 1; TIME_MOTOR :=0; ELSIF (TIME_MOTOR >= 2 ) AND (M1_ON_OF = 0) THEN

ITC

67/1

MOTOR_ON_OFF := 0; STATE M:= 0; STATE_M:= TIME_MOTOR :=0; END_IF; // Calculate filling level; NIV:=LEVEL; IF V1_OP_CL V1 OP CL THEN NIV:=NIV + V1_FLOW*CFV; END_IF; IF V2_OP_CL THEN NIV:=NIV + V2_FLOW*CFV; END_IF; IF V3_OP_CL THEN NIV:=NIV - V3_FLOW*CFV; ; END_IF; IF NIV>100.0 THEN OVERFLOW:=TRUE; NIV:=100.0; ; ELSE OVERFLOW:=FALSE; IF NIV<0.0 THEN NIV:=0.0; END_IF; END_IF; LEVEL:=NIV; //Temperature response

ITC

68/1

//Shell temp via PT1 TMP_SH_IN:= (TMP_HOT-TMP_ENV)*V_HOT_FL/100.0 + TMP_ENV; EXP_SHEL:=1.0/EXP(1.0*SAMPLE_T/T_LAG_SH); TMP_SHEL:=TMP_SH_IN+(TMP_SHEL-TMP_SH_IN)*EXP_SHEL; //Internal temp via PT2 T_LAG_IN_HILF:=(T_LAG_IN/SAMPLE_T)*(LEVEL+10.0)/110.0; EXP_IN:=1.0/EXP(1.0/T_LAG_IN_HILF); TMP_IN1:=TMP_SHEL+(TMP_IN1-TMP_SHEL)*EXP_IN; TMP_IN2:=TMP_IN1+(TMP_IN2-TMP_IN1)*EXP_IN; TMP INT:=TMP TMP_INT: TMP_IN2; IN2; END_FUNCTION_BLOCK;

ITC

69/1

ITC

70/1

In the HW-Config we can edit the symbols for each I/O card located in the ET200 station

ITC

71/1

ITC

72/1

1- From the Plant view > ReacA > Create NK111 CFC & open it 2- From the PCS 7 library > drag & drop 2 CH_DI (for open close feedback), one CH_DO (for control output) & one VALVE (for the valve control) + one OR block for Control System Fault 3- Interconnect the blocks as shown in the slide to test valve of raw material 1 in tank A 4 For the Value 4Value of the channel drivers, drivers right click > Interconnect to address > choose the associated address 5- Rename the blocks as shown in the slide by double clicking each block

ITC

73/1

1- From the Plant view > ReacA > Create NP111 CFC & open it 2- From the PCS 7 library > drag & drop one CH_DI (for running feedback), one CH_DO (for control output) & one MOTOR (for the motor control) + one OR block for Control System Fault 3- Interconnect the blocks as shown in the slide to test mixer motor in tank A 4- For the Value of the channel drivers, right click > Interconnect to address > choose the associated address 5- Rename the blocks as shown in the slide by double clicking each block

Try download then discuss the I/Os of the valve & motor to understand their operation.

ITC

74/1

1- From the Plant view > ReacA > Open ReacA CFC 2- From the project master data library > drag & drop FB600 Reactor) 3- Open NK111 CFC 4- Connect FB open & close SIM_I in the NK111 CFC to FB_V1_OP & FB_V1_CL in the ReacA CFC 5- Connect output from CO value in the NK111 CFC to V1_OP_CL in the ReacA CFC 6- In the NK111 CFC, enable the simulation (SIM_ON) in the two FB blocks by double click it and write 1 Hint Add an AND AND block after the value value of the CO CO block connecting its output to the Reactor V1_OP_CL This is to help in IEA (Import Export Assistant) in next sildes

ITC

75/1

ITC

76/1

www.siemens.com/simatic-pcs7

ITC

77/1

Creating/Editing Import Files with the IEA File Editor IEA File Editor The Import/Export Assistant (IEA) works with import/export files with a fixed format. A plant planning tool such as SIGRAPH EMR supports this format. To be able to create or edit import files even if you do not have a plant planning tool available, an IEA data editor is installed with Import/Export Assistant, that keeps exactly to the rules governing the structure of the import file. The IEA Editor "s7jieaEx.exe" is a separate application, in other words it can also be used outside the PCS 7 installation. It can be copied and made available to plant planners. Situations for using the Editor (based on the example of a "process tag" / "model") model ) The IEA File Editor is intended for the following situations: You have created a process tag type/model and created the import file with the IEA. With this import file, you want to create replicas of the model or process tags. The number of rows in the import file must be increased according to the number of replicas/process tags you want to create (for example by copying and editing). Y have You h created t d a process t tag type/model t / d l and d created t d th the import i t file fil with ith th the IEA IEA. You want to change this model, for example by including further I/Os and need to extend the import file by adding these columns. You do not have a tool for creating an import file and want to use the IEA File Editor as a planning tool to structure the columns, column groups and rows of the import file and the corresponding values.

ITC

78/1

Introduction Using the wizard for process tag types, the process tag type is copied from the master data library to the specified target projects as a process tag and the corresponding data is then imported. This is based on an import file. Depending on the entries in the import file, you can create any number of process tags in one import action. As a result of the import, a process tag of this process tag type is created in the target project for every row of the import file according to the specified hierarchy path in the plant hierarchy. Sources for Process Tag Types You can store the following in the master data library: Standardized process tag types from the control system library PCS 7 Library, for example for motors, valves, PID controllers etc. User created process tag types User-created t pes from CFC charts Process Tag Types Process tag types are a very good function when you use numerous process tags of the same type in a project. A CFC chart forms the basis of a process tag type. When you use process tag types types, you do not have to create a CFC chart for each individual process tag. You can create a type of base CFC chart with all of the generally used parameters and then duplicate this chart using the import/export functions. In a way, you are creating an instance of a process tag type. With the import/export function, you enter the required custom parameters for each process

ITC

79/1

Requirement A CFC chart has been created in the project or in the master data library that contains the automation functions, parameters, and messages of the process tag to be implemented according to a specified process tag description. Procedure 1 Select the intended CFC chart in the SIMATIC Manager (any view). 1view) 2- Select the menu command Options > Process Tags > Create/Modify Process Tag Type... Result: The wizard is started and the "Introduction" page is displayed. The current master data library is displayed. 3- Click the "Next" button. Res lt The dialog for cop Result: copying ing the chart to the master data library librar as a process tag type opens. 4- Confirm the dialog box with OK. Result: The wizard changes to the "Which I/Os do you want to assign to the process tag type?"

ITC

80/1

5- In the left-hand window "I/Os in the chart of the process tag type", select the flagged I/O for "Parameter" and "Signal". (By double-clicking or selecting and clicking the "Arrow" button). Result: The flagged I/O is adopted and displayed bold. 6- In the right-hand window "I/O points for parameters/signals", you can edit the selected flagged I/Os. The "Parameter/Signal" columns can be edited (using a drop-down list b ) box), "Process tag interface" and "Category" (using a drop-down list box). The drop-down list box appears when you click the input field. 7- In the left-hand window, "I/Os in the chart of the process tag type", select the messages of the relevant blocks. All the messages are displayed in the "I/O points for messages" window. 8 Check 8Ch k th the selection l ti and d click li k on th the "N "Next" t" b button tt and d th then "Fi "Finish". i h" Result: The new process tag type is stored in the master data library. The CFC chart that was the origin of the process tag type is located in the S7 program and can continue to be used there or, if it is no longer required, can be deleted.

ITC

81/1

ITC

82/1

Create a file for process tags

ITC

83/1

ITC

84/1

Automatic Creation of a Number of Process Tags Requirement To create process tags from process tag types, the relevant process tag types must have an import file assigned to them.

ITC

85/1

ITC

86/1

ITC

87/1

Target To create valves (NK112, NK113, NK121, NK122, NK123, NK131, NK132, NK133) from the template file created from NK111 1- Select each row, Find & Replace - NK111 with NK1xy - ReacA with Reacx - V1 with Vx (x=1,2,3 & y=1,2,3) (x=A,B,C) (x=1,2,3)

ITC

88/1

ITC

89/1

Automatic Creation of a Number of Process Tags Procedure 1- Select the required hierarchy folder, project node or process tag library (hierarchy folder in the master data library) or the process tag type. 2- Select the menu command Options > Process Tags > Import... Result: The import dialog opens opens. After starting the function, the wizard searches for the process tag types and corresponding import files (in all hierarchy subfolders as well) and displays them. The import function will include all listed import files. 3- If you do not want to import certain files, you can select them and remove them from the list with the "Remove" button. With the "Other File" button, you can browse for a different import file and select it instead of the selected file. 4- Start the actual import with the "Next" button followed by "Finish". Result: Depending on the options selected, the complete list of import activities or only the errors that occurred are displayed in the log window. Th log The l i is saved di in a l log fil file and d th the name and d path th of f th the fil file are di displayed l db below l the log window. You can modify this setting with the "Browse" button.

ITC

90/1

Now we can have 8 new valves, 3 valves in each reactor of the three reactors. Exercise: Create pump motor in ReacA (NP111), Using IEA create motor template as a process tag to be used in creating the motors in the other reactors.

ITC

91/1

www.siemens.com/simatic-pcs7

ITC

92/1

What is SFC? SFC (Sequential Function Chart) is a sequential control system partitioned to ensure step-by-step execution with control passing from one state to the next state dependent on conditions. With a sequential control system, basic automation functions, for example CFC charts are controlled based on state changes and can be selectively processed. You create SFC charts in the SFC Editor.

ITC

93/1

What are Sequence Path Elements? An SFC chart consists of 1 to 8 and an SFC type of 1 to 32 sequencers each with a sequence of sequence path elements. These elements include the following: . Step . Transition And below a sequence (can be freely positioned): . Text The remaining elements are structures made up of different elements: . Sequence . Simultaneous sequence . Alternative sequence . Loop . Jump

ITC

94/1

Operating State Logic for SFC (SFC-OSL) The current operating state of the SFC-OSL can be changed by the following events: . Commands (Start, Resume, Hold, ...) in the "MANUAL" or "AUTO" modes. . External signals (inputs of the SFC, commands from another SFC, ...). . Internal signals (commands from own sequencers, from the test mode or SFC Visualization). Visualization) . Implicit state change.

ITC

95/1

In ReacA, Create a SFC chart named ReacA. Use the SFC elements to apply the following functions 1- Change all valves + mixer motor to automatic 2- Close the raw material valves NK111 & NK112 then open drain valve NK113 3- When tank level < 10 % close the drain valve 4- open the 2 raw material valves till tank level reaches 90 % close them 5- Start the mixer motor NP111 for 20 sec then stop it & open the tank drain NK113 6- When level < 10% close the valve

ITC

96/1