96
ITC 1/1

PCS7

Embed Size (px)

DESCRIPTION

Siemens PCS7

Citation preview

Page 1: PCS7

ITC 1/1

Page 2: PCS7

www.siemens.com/simatic-pcs7

ITC 2/1

Page 3: PCS7

ITC 3/1

Page 4: PCS7

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

d di t d ti i th l h ti l i d t i )processes and discrete production, e.g. in the glass or pharmaceuticals industries). 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 h t th f th l ti l i di ti d ti i tithroughout the company for the evaluation, planning, coordination and optimization of operational sequences, production processes and commercial processes.

ITC 4/1

Page 5: PCS7

Basic structure of a PCS 7 plantThe 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 company-wide information network using interfaces based on international industrial standards for data exchange such as Ethernet, TCP/IP, OPC or @aGlance.

ITC 5/1

Page 6: PCS7

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 blockslibraries, tools and AS/OS blocks.

ITC 6/1

Page 7: PCS7

-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

Page 8: PCS7

OverviewSelect 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• high degree of expansion capability and robust 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 canVarious 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.DesignThe automation systems are delivered as preassembled and tested complete

ITC 8/1

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• 24 V DC or 120/230 V AC power supply incl. backup battery (batteries)

Page 9: PCS7

ITC 9/1

Page 10: PCS7

ITC 10/1

Page 11: PCS7

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

Page 12: PCS7

ITC 12/1

Page 13: PCS7

Engineering Toolset

1-Hardware Configuration2- Libraries (for modules, blocks,….)3- CFC “Continues Function Chart” for function diagram4- SFC “Sequiatial Function Chart” for process control5- Graphic Designer6- Faceplate Designer7- SCL “Structured Control Language” for customized function block using (codes) commands AWL file8- Simatic Batch for Batch process9- Simatic Route Control for route selections10- F-System (yellow code) Fail safe system11- PDM “Process Device Manager”

-From 1 to 4 is used for “AS” logic programming5 & 6 i d f SCADA (M it & C t l)

ITC 13/1

-5 & 6 is used for SCADA (Monitor & Control)-From 1 to 6 is a standard SW package rest is special ones

Page 14: PCS7

ITC 14/1

Page 15: PCS7

ITC 15/1

Page 16: PCS7

ITC 16/1

Page 17: PCS7

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.C t P j t U th SIMATIC M t t th j tCreate Project Use the SIMATIC Manager to create the new project. 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

d l ) t b fi d i d ith th h d t t Thimodules) must be configured in accordance with the hardware structure. 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 l Th b di t l l i h it th i t CFC d SFC h t OS

ITC 17/1

level. The subordinate levels can inherit the assignment. CFC and SFC charts, 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.

Page 18: PCS7

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

t t t th OSevents occur, messages are sent to the 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

hi ll d l ith ti b d d ith

ITC 18/1

graphically as measured values with a time-based sequence, and as messages with 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.

Page 19: PCS7

ES Software The system should be configured with a uniform, plant-oriented 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,

d d t ti b i d t i t i t d Si thand documentation can be carried out in a system-oriented manner. Since the various SIMATIC components are managed in a system-related measuring point-oriented 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 engineeringengineering 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 non-

networked PCs. The divided work is then combined into one project.

ITC 19/1

Page 20: PCS7

Vertical IntegrationThe available software, database management and communication

allow vertical integration in all components and levels of the TIA product range.

ITC 20/1

Page 21: PCS7

Horizontal Integration All the components in all phases – from material to end product storage – make horizontal integration possible.

ITC 21/1

Page 22: PCS7

ITC 22/1

Page 23: PCS7

ITC 23/1

Page 24: PCS7

ITC 24/1

Page 25: PCS7

ITC 25/1

Page 26: PCS7

ITC 26/1

Page 27: PCS7

ITC 27/1

Page 28: PCS7

ITC 28/1

Page 29: PCS7

ITC 29/1

Page 30: PCS7

ITC 30/1

Page 31: PCS7

ITC 31/1

Page 32: PCS7

ITC 32/1

Page 33: PCS7

ITC 33/1

Page 34: PCS7

www.siemens.com/simatic-pcs7

ITC 34/1

Page 35: PCS7

1. Open the SIMATIC Manager2. 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" button4. Click the "Next" button.

Note: Click on the "Preview>>" button to display a preview of your current stage ofconfiguration. This preview corresponds to the appearance of the project in theSIMATIC Manager .

ITC 35/1

Page 36: PCS7

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 ser s stem" option is a tomaticall acti atedThe "Single-user system" option is automatically activated.8. Click the "Next" button.

ITC 36/1

Page 37: PCS7

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" button11. Accept the current settings and click the OK button.

The project is now created with these settings.

ITC 37/1

Page 38: PCS7

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 (mainly for HW operation)- Plant view (mainly for hierarchy of the system)

Process object view (mainly for data msg pics duplicate operations)- Process object view (mainly for data, msg, pics, 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

Page 39: PCS7

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.NoteNoteIf 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

Page 40: PCS7

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" option4. Activate the "Set MAC address/use ISO protocol" 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 boxesThis deactivates all the associated input boxes.

7. Click the "New" button to create a new network connection. The CPU willcommunicate with the ES via this network connection.The "Properties - New Subnet Industrial Ethernet" dialog box opens.

ITC 40/1

Page 41: PCS7

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

Page 42: PCS7

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 Config12. Close HW Config.

ITC 42/1

Page 43: PCS7

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 CPthe CP.

ITC 43/1

Page 44: PCS7

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

Page 45: PCS7

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

Page 46: PCS7

In the component view1. 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

NoteIf the PC station is not labeled with a yellow arrow, press the "F5" key. Thisrefreshes the screen display.

ITC 46/1

Page 47: PCS7

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 V61" profile is active- The "PCS7_V61" profile is 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 address5 Click on properties to assign the CP5611 to the MPI network giving it the address defined in the PG\PC Interface.

ITC 47/1

Page 48: PCS7

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

Page 49: PCS7

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

Page 50: PCS7

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

Page 51: PCS7

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 The "Save and10. Select the menu command Network > Save and 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

Download selected stations.

Page 52: PCS7

In this course we are working with PLC-Sim as our AS1- 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

Page 53: PCS7

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 the longer and less easily recognizable the entire HIDeach individual part 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 tochange 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

ITC 53/1

pictures from the plant hierarchy so that they conform to the plant hierarchy.

Page 54: PCS7

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 theoptions 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 ofcharacters" 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 alsowant the changes to apply to existing hierarchy folders?" is displayed.9. Click on the "Yes" button in the dialog.

ITC 54/1

This enters all your settings.

Page 55: PCS7

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

Page 56: PCS7

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 compilingcompiling.

Repeat the above steps for all hierarchy folder.

ITC 56/1

Page 57: PCS7

ITC 57/1

Page 58: PCS7

www.siemens.com/simatic-pcs7

ITC 58/1

Page 59: PCS7

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, andinterconnect them. Interconnecting means, for example, that values are transferred from one output toone or more inputs during communication between the blocks.

ITC 59/1

Page 60: PCS7

Generating Module DriversThe 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 andthe technological functions are configured in CFCthe technological functions are configured in CFC.

ITC 60/1

Page 61: PCS7

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 > SCL2- In symbol table define reactor as FB6003- open the SCL file then copy & paste the next code then compile to generate the reactor FBreactor FB

ITC 61/1

Page 62: PCS7

FUNCTION_BLOCK Reactor(* Simulation block with feedback signalsfor PCS 7 course only *)

(* Block Attributes *)

TITLE ='REAC';VERSION:'5.0';//KNOW HOW PROTECT if no comment//KNOW_HOW_PROTECT if no commentAUTHOR:Siemens;FAMILY:Training;NAME:PLANT;

(* Variable Declaration *)( Variable Declaration )

VAR_IN_OUT

V1_OP_CL: BOOL; //Filling1V2 OP CL: BOOL; //Filling2_ _ ; gV3_OP_CL: BOOL; //Filling3M1_ON_OF: BOOL; //Mixer motorRS_COOL : BOOL; //Container empty and coldSET_HOT : BOOL; //Container full and warmV RESET : BOOL; //Valves closed, motor off_ ; ,

END_VAR

ITC 62/1

Page 63: PCS7

VAR_INPUT

V1_FLOW: REAL := 100.0; //Flow V1 0..100%V2_FLOW: REAL := 100.0; //Flow V2V3_FLOW: REAL := 100.0; //Flow V3CFV: REAL := 0.002; //Correction factor valvesV HOT FL: REAL := 0 0; //Flow heating 0 100%V_HOT_FL: REAL : 0.0; //Flow heating 0..100%TMP_ENV: REAL := 20.0; //Environment temperatureTMP_HOT: REAL := 120.0; //Heating medium temperatureT_LAG_SH: REAL := 10.0; //T_PT1-Shell[s]T_LAG_IN: REAL := 30.0; //T_PT2-Inside[s] full reactorSAMPLE T: REAL := 1.0; //Sampling time[s]SAMPLE_T: REAL : 1.0; //Sampling time[s]

END_VAR

VAR_OUTPUT

OVERFLOW: BOOL := FALSE; //OverflowLEVEL{S7_m_c:= 'true'} : REAL := 0.0; //Fill level in %TMP_SHEL: REAL := 20.0; //Shell tempTMP_INT {S7_m_c:= 'true'} : REAL := 20.0; //Internal tempFB V1 CL : Bool := 1; //Valve1 closed_ _ ;FB_V1_OP {S7_m_c:= 'true'} : Bool := 0; //Valve1 openedFB_V2_CL : Bool := 1; //Valve2 closedFB_V2_OP {S7_m_c:= 'true'} : Bool := 0; //Valve2 openFB_V3_CL : Bool := 1; //Valve3 closedFB_V3_OP {S7_m_c:= 'true'} : Bool := 0; //Valve3 open_ _ { _ _ } pMOTOR_ON_OFF {S7_m_c:= 'true'} : BOOL := 0; //Motor ON/OFF

END_VAR

ITC 63/1

Page 64: PCS7

VAR

STATE1 : bool := FALSE; //State AuxiliaryCellsSTATE1 : bool := FALSE; //State_AuxiliaryCellsSTATE2 : bool := 0; //State_AuxiliaryCellsSTATE3 : bool := 0; //State_AuxiliaryCellsSTATE_M : bool := 0; //State_AuxiliaryCellsNIV: REAL := 0.0; //Fill level auxiliary cellsTMP SH IN: REAL := 20; //Shell temp Auxiliary cellTMP_SH_IN: REAL : 20; //Shell temp_Auxiliary cellTMP_IN_IN: REAL := 20; //Inside temp_Auxiliary cellsTMP_IN1: REAL := 20; TMP_IN2: REAL := 20;TMP_SH_HILF: REAL := 20;T LAG IN HILF:REAL := 0.0;T_LAG_IN_HILF:REAL : 0.0;EXP_SHEL: REAL := 1.0;EXP_IN: REAL := 1.0;TIME1 : real := 0.0;TIME2 : real := 0.0;TIME3 : real := 0.0;;TIME_MOTOR : real := 0.0;

END_VARBEGIN

// Cold reset;IF RS_COOLTHENRS_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

Page 65: PCS7

//Warm set;IF SET HOTIF SET_HOTTHENSET_HOT:=FALSE;LEVEL:=100.0;TMP_SHEL:=TMP_HOT;TMP IN1:=TMP HOT;TMP_IN1: TMP_HOT;TMP_IN2:=TMP_HOT;TMP_INT:=TMP_HOT;END_IF;

// Valve and motor reset;// Valve and motor reset;IF V_RESET THENV_RESET := FALSE;V1_OP_CL := FALSE; V2 OP CL := FALSE; _ _ ;V3_OP_CL := FALSE; M1_ON_OF := FALSE; FB_V1_CL := TRUE; //Valve1 closedFB_V1_OP := FALSE; //Valve1 openedFB V2 CL := TRUE; //Valve2 closed_ _ ;FB_V2_OP := FALSE; //Valve2 openFB_V3_CL := TRUE; //Valve3 closedFB_V3_OP := FALSE; //Valve3 open

STATE1 := 0;STATE2 := 0;STATE3 := 0;STATE_M := 0;END_IF;

ITC 65/1

Page 66: PCS7

// Valve and motor feedback signals;

IF V1 OP CL <> STATE1IF V1_OP_CL <> STATE1THEN

TIME1 := TIME1 + SAMPLE_T;END_IF;IF V2_OP_CL <> STATE2THENTHEN

TIME2 := TIME2 + SAMPLE_T;END_IF;IF V3_OP_CL <> STATE3THEN

TIME3 := TIME3 + SAMPLE T;TIME3 : TIME3 SAMPLE_T;END_IF;IF M1_ON_OF <> STATE_MTHEN

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

Page 67: PCS7

IF (TIME2 >= 4 ) AND (V2_OP_CL = 1)THEN

FB V2 OP := 1;FB_V2_OP := 1;FB_V2_CL := 0;STATE2:= 1;TIME2 :=0;

ELSIF (TIME2 >= 4 ) AND (V2_OP_CL = 0)THENTHEN

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

Page 68: PCS7

MOTOR_ON_OFF := 0;STATE M:= 0;STATE_M:= 0;TIME_MOTOR :=0;

END_IF;// Calculate filling level;NIV:=LEVEL;IF V1 OP CLIF V1_OP_CLTHENNIV:=NIV + V1_FLOW*CFV;END_IF;IF V2_OP_CLTHENTHENNIV:=NIV + V2_FLOW*CFV;END_IF;IF V3_OP_CLTHENNIV:=NIV - V3 FLOW*CFV;_ ;END_IF;IF NIV>100.0THENOVERFLOW:=TRUE;NIV:=100.0;;

ELSEOVERFLOW:=FALSE;IF NIV<0.0THENNIV:=0.0;

END_IF;END_IF;LEVEL:=NIV;//Temperature response

ITC 68/1

Page 69: PCS7

//Shell temp via PT1//Shell temp via PT1TMP_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//Internal temp via PT2T_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 IN2;TMP_INT: TMP_IN2;END_FUNCTION_BLOCK;

ITC 69/1

Page 70: PCS7

ITC 70/1

Page 71: PCS7

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

ITC 71/1

Page 72: PCS7

ITC 72/1

Page 73: PCS7

1- From the Plant view > ReacA > Create NK111 CFC & open it2- 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 Fault3- Interconnect the blocks as shown in the slide to test valve of raw material 1 in tank A4- For the “Value” of the channel drivers right click > Interconnect to address >4 For the Value of the channel drivers, right click > Interconnect to address > choose the associated address5- Rename the blocks as shown in the slide by double clicking each block

ITC 73/1

Page 74: PCS7

1- From the Plant view > ReacA > Create NP111 CFC & open it2- 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 Fault3- Interconnect the blocks as shown in the slide to test mixer motor in tank A4- For the “Value” of the channel drivers, right click > Interconnect to address > choose the associated addresschoose the associated address5- 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

Page 75: PCS7

1- From the Plant view > ReacA > Open ReacA CFC2- From the project master data library > drag & drop FB600 Reactor)3- Open NK111 CFC4- Connect FB open & close “SIM_I” in the NK111 CFC to FB_V1_OP & FB_V1_CL in the ReacA CFC5- Connect output from CO “value” in the NK111 CFC to V1_OP_CL in the ReacA CFCCFC6- 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” block after the “value” of the “CO” block connecting its output to theAdd an AND block after the value of the 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

Page 76: PCS7

ITC 76/1

Page 77: PCS7

www.siemens.com/simatic-pcs7

ITC 77/1

Page 78: PCS7

Creating/Editing Import Files with the IEA File EditorIEA File EditorThe 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 h t d t t / d l d t d th i t fil ith th IEA

ITC 78/1

You have created a process tag type/model and created the import file with the 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.Y t t i t fil ith t fil ( i ) B i

Page 79: PCS7

IntroductionUsing 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 TypesYou 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 t pes from CFC chartsUser-created process tag types from CFC charts

Process Tag TypesProcess tag types are a very good function when you use numerous process tagsof the same type in a project. A CFC chart forms the basis of a process tag type.When you use process tag types you do not have to create a CFC chart for each

ITC 79/1

When you use process tag types, you do not have to create a CFC chart for eachindividual process tag. You can create a type of base CFC chart with all of thegenerally used parameters and then duplicate this chart using the import/exportfunctions. In a way, you are creating an instance of a process tag type. With theimport/export function, you enter the required custom parameters for each processtag to be generated

Page 80: PCS7

RequirementA 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.

Procedure1 Select the intended CFC chart in the SIMATIC Manager (any view)1- Select the intended CFC chart in the SIMATIC Manager (any view).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 ing the chart to the master data librar as aResult: The dialog for copying the chart to the master data library 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

Page 81: PCS7

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 Ch k th l ti d li k th "N t" b tt d th "Fi i h"8- Check the selection and click on the "Next" button and then "Finish".

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

Page 82: PCS7

ITC 82/1

Page 83: PCS7

Create a file for process tags

ITC 83/1

Page 84: PCS7

ITC 84/1

Page 85: PCS7

Automatic Creation of a Number of Process Tags

RequirementTo create process tags from process tag types, the relevant process tag types must have an import file assigned to them.

ITC 85/1

Page 86: PCS7

ITC 86/1

Page 87: PCS7

ITC 87/1

Page 88: PCS7

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 (x=1,2,3 & y=1,2,3)- ReacA with Reacx (x=A,B,C)- V1 with Vx (x=1,2,3)

ITC 88/1

Page 89: PCS7

ITC 89/1

Page 90: PCS7

Automatic Creation of a Number of Process Tags

Procedure1- 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 opensResult: The import dialog 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 selectedcan 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 l i d i l fil d th d th f th fil di l d b l

ITC 90/1

The log is saved in a log file and the name and path of the file are displayed below the log window. You can modify this setting with the "Browse" button.

Page 91: PCS7

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

Page 92: PCS7

www.siemens.com/simatic-pcs7

ITC 92/1

Page 93: PCS7

What is SFC?

SFC (Sequential Function Chart) is a sequential control system partitioned toensure step-by-step execution with control passing from one state to the next statedependent on conditions. With a sequential control system, basic automationfunctions, for example CFC charts are controlled based on state changes and canbe selectively processed. You create SFC charts in the SFC Editor.

ITC 93/1

Page 94: PCS7

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

ITC 94/1

Page 95: PCS7

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

Page 96: PCS7

In ReacA, Create a SFC chart named ReacA. Use the SFC elements to apply the following functions

1- Change all valves + mixer motor to automatic2- Close the raw material valves NK111 & NK112 then open drain valve NK1133- When tank level < 10 % close the drain valve4- open the 2 raw material valves till tank level reaches 90 % close them5- Start the mixer motor NP111 for 20 sec then stop it & open the tank drain NK1136- When level < 10% close the valve

ITC 96/1