Home

Siemens Fitness Equipment TOA portal module 040-020 User's Manual

image

Contents

1. TA Siemens scl_startup m XxX Project Edit View Insert Online Options Tools Window Help Totally Integrated Automation GF O Eb Save projet 2 KR G x Ht BAHAR Go online f Go offline Jo IM IE x J 1 PORTAL Startup gt devicename_statio _001 CPU 315F 2 PN DP gt Program blocks gt calculation_volume_tank FC1 E X Devices Options JE 5 O O a e BH ees AB a HH UGA SZ E o J3 Interface gt Favorites 5 J scl_startup Name Data ype Offset Comment Bf Add new device I1 lt I Input m aia Devices amp networks 2 lt a filling level Real in meters F SE i devicename_station_001 CPU 315F 2 PN 3 lt aperture Real In meter fit Device configuration 4 Add ne Online amp diagnostics 5 lt I Output fet Program blocks 6 lt Ia volume Bool in liters i Add new block 7 a Add ne i Main 081 8 lt l Inout Se calculation_wolurme_tank FC1 a Add ne gt 38 Technology objects d External source files Ca PLC tags a Show all tags Gi Add new tag table gt _ Date and time of day gt String Char essin gt Process image jis IO tll x saneqr E sser gi Sunsa je JF Se Clg f EHH a A ea Interface Name Data type Offset Comment 1 l Input M 2 a filling lewel Feal in meters 2 3 n aperture Real In meter 4 a Add new 2 I Output 6 an1 volume Eool in liters when failure 1 8 I InOut 9 lt Add new t Note To
2. E5 Force table Alarm display Device information Connection information Sa Watch table_1 Eli Program info EA PLC alarrns Text lists gt i Local modules gt f Common data No devices with problems Y Onlin Tm Oper Devicefrnodule Message Details w am uon maat ee an ee e I n na lt ul 4 Portal view 3 Main 081 3 Watch table_1 VY Connected to devicename_station_001 I kJ 3 To specify the values you have to enter a modify value in the Modify value column The values are applied in the CPU by clicking the icon 4 Modify all selected values once and now diameter_tank1 10 0 gt fill level_tank1 7 0 gt A YA Siemens scl_startup Project Edit View Insert Online Options Tools Window Help FE Saveprojet 2X BX NEG FT aM Go online g Go offline J IM ME x L scl_startup gt devicenam _station_001 CPU 315F 2 PN DP gt Watch and force tables gt Watch table_1 Totally Integrated Automation PORT Devices x Eh hn A ZB B i Name Address Display format Monitor value Modify value 7 Comment scl_startup aperture_tankl MD44 Floating point number Ct 10 0 A A a Saree mal filing level_tank SMD40 Floating point number ee 7 0 A ay Devices amp networks dd ne v ie devicename_station_001 HY Device configuration Online amp diagnostics el Program blocks Mi Add new block J Main 081 J ca
3. 5 Supplement the program as specified below YA Siemens scl_startup SCA jec i view s i ions s Window gt 2 Project Edit iew Insert Online Pank Tool Window Totally Integrated Automation GF O Ed Save projet amp X 23 G x Ote A T e a BE g coonline PORTAL amp Sh COD 3 a H l M G e SZ Su0139N4 SU CASE FOR TO oo WHILE OF na IF DO l This function calculates the Volume from a cylindertank 2 7 The input parameters filling level aperture must be noted in meters 3 The output parameter volume is noted in liter 4 For this we use a conversion factor of 1000 6 volume SQR aperture 4 3 14159 filling level 1000 syse ki s neiq E moo le seer lt ul SCE Training Curriculum Page 19 of 30 To be used only at Educational and R amp D Facilities TIA Portal Module 040 020 Edition 03 2013 Unrestricted Siemens AG 2013 All Rights Reserved SCE_EN_040 020_R1209_Startup Programming in High Level Languages with S7 SCL and SIMATIC 87 300 SI E M E N S Industry Sector IA amp DT 6 The program can now be saved fa Save project ng compiled al Y j E Save fol Save project Compile ah TA Siemens scl_startup Project Edit Wiew Insert Online Options Tools Window F Totally Integrated Automation 3p O Hl Save project ae YM amp we x oogt cis H m m i Ee g Go online mo suonongsuj EE FPOR TO Y7HILE Ce Ce f Th
4. Cross references Compile Syntax gt Technology Compiling completed errors 0 warnings 0 4 Portal view Default tag t Main OB1 v The project scl_startup was saved succ Cc Program control operatio 100 7 Check the changes in the Monitoring mode of the calculate_tankcontent block YA Siemens scl_startup Project Edit View Insert Online Options Tools Window Help Totally Integrated Automation POR F hE Save projet amp X L W i Ei BE amp coonline Goofline Jo M A 2 1 Devices Options 22 z ze mge a 1 2 fet J ri O in Se amp Biv ee o BS Ce S RA Ge ek PF a o ja l v Call environment S ns J sel_startup No trigger applied Le Me trigger applied IE Per z a 2 _ Gi Add new device a Devices amp networks ne oF e loon GRANGE J E device e s io DO bd Cm Sevicanane stan Ser l This function calculates the Ea 2 BY Device configuration 2 The input parameters filling Online amp diagnostics 3 The output parameter volume ad a Program blocks 4 For this we use a conversion f 5 Bi Add new block 5 Main 081 6 f 7v Breakpoints calculation _volurne_t IF filling_level gt 0 AND filli gt Result TRUE Se 6 amp oI GC gt Ia Se arpa Rent AE volume SQR aperture 4 3 volume WEE CEE E amp a a gt Ca Technology objects
5. gt 6ES7 331 7KF02 0ABO PS gt PS 307 2A gt 6ES7 307 1BA00 0AA0 TA Siemens scl_startup Project Edit View Insert Online Options Tools Window Help Totally Integrated Automation PORTAL F O Gd Save projet amp gay xX Ht BW oD Be BER SF oonline K Goofin AP M E 3 1 scl_startup gt devicename_station_001 CPU 315F 2 PN DP B Topology view sa Network view Q 100 Pa Devices 5i O F o01 a g j re av J scl_startup li g init Mi Add new device gy Devices amp networks gt in devicename_station_001 CPU 315F 2 PN gt 6 Common data gt En Documentation settings gt iF Languages amp resources gt fa Online access gt ER SIMATIC Card Reader S100 BUl UG syse ki A Properties General gt General VO addresses gt p Communications modules gt Inputs Te gt p FM s neiq E WO addresses Input addresses p gt Jp 10 SENSE gt i Special gt ig Interface modules Start address End address Process image nterrupt OB number Details view wv Information Name Program blocks Device Technology objects External source files PLC taqs PLC data types Watch and force tables Program info Text lists Local modules 4 Portal view si PLC_1 v Project scl_startup created Order no SCE Traini
6. AN SCE Training Curriculum for Integrated Automation Solutions Totally Integrated Automation TIA TIA Portal Module 040 020 Startup Programming in High Level Languages with S7 SCL and SIMATIC S7 300 SCE Training Curriculum Page 1 of 30 To be used only at Educational and R amp D Facilities TIA Portal Module 040 yey Edition i at Unrestricted Siemens AG 2013 All Rights Reserved SCE_EN_040 020_R1209_ Startup Programming in Hig vel Languages with S7 SCL and SIMATIC S7 300 SI E M E N S Industry Sector IA amp DT Suitable SCE trainer packages for these training curriculums SIMATIC controllers SIMATIC S7 300 with CPU 314C 2PN DP Order no 6ES7314 6EH04 4AB3 SIMATIC S7 300 with CPU 314C 2PN DP upgrade Order no 6ES7314 6EH04 4AB4 SIMATIC S7 300 with CPU 315F 2PN DP Order no ES7315 2FH14 4AB1 SIMATIC ET 200S with CPU IM151 8 F PN DP Order no 6ES7151 8FB00 4AB1 SIMATIC STEP 7 software for training SIMATIC STEP 7 Professional V11 Single license Order no 6ES7822 1CC01 4YA5 SIMATIC STEP 7 Professional V11 Classroom license up to 12 users Order no 6ES7822 1AA01 4YA5 SIMATIC STEP 7 Professional V11 Upgrade license up to 12 users Order no 6ES7822 1AA01 4YE5 SIMATIC STEP 7 Professional V11 Student license up to 20 users Order no 6ES7822 1AC01 4YA5 Please note that these trainer packages may be replaced by successor trainer packages An overview of the currently a
7. J zi aperture 10 0 est mode jop Exter source files gt E i rnal source fil filling_level EAE Automatic gt Ca PLC tags a err false err Brea 7 De res i E L gt Dig PLC data types 10 ELSE ajo occima oe are Hexadecimal 4 v EA Watch and force tables ll volume l volume i 5 Bf Add new watch table 12 err true err F oating point m F Force table 13 END_IF ERs Program info b Prograrn info v Call hierarch EA PLC alarms A Anzeigeformat gt Automatisch Text lists gt i Local modules O Dezimal gt fee Common data O Hexadezimal ocume onse s i El Documentation setting O Gleitpunkt gt iP Languages amp resources b No call path available lt mi gt 100 p Ee e AP gt Gap Online access gt Se SIMATIC Card Reader Properties 7iLjinfo Diagnostics lt ut gt Alarm display Device information Connection information No devices with problems 4 Portal view E Default tag t ai Main OB1 Connected to devicename_station_001 Note You can change the display format of the current value by right clicking the value and opening the shortcut menu SCE Training Curriculum Page 30 of 30 To be used only at Educational and R amp D Facilities TIA Portal Module 040 020 Edition 03 2013 Unrestricted Siemens AG 2013 All Rights Reserved SCE_EN_ 040 020 R1209_ Startup Programming in High Level Languages with
8. im gt 4 Portal view ai Main 081 EH Watch table_1 zx Default tag t Hi calculation_ vV Connection to devicename_station_00 ta 2 Expand the Interface parameters of the block as specified above Controller 001 CPU 315F 2 PN DP Program blocks gt calculate_tankcontent Enter parameters YA Siemens scl_startup Project Edit View Insert i Options Tools Window Help Totally Integrated Automation f CO Hl save projet 5 M2 Bo Bi BE GE oonline amp Go otline gy M A 2 PORTAL Devices 3 Sa amp S Ce G Gee SB ta Naa amp 7 Interface gt Favorites suorINysu J sel_startup Name Offset Comment v Basic instructions Mi Add new device Input ies aia Devices amp networks height_max in meters gt Timer operations E devicename_station_001 CPU filling_lewel in meters Counter operations HY Device configuration math fanaa Online amp diagnostics et Programm blocks Ba Add new bloch J Main 081 J calculation_volume_tank gt 38 Technology objects gt External source files d Ca PLC taqs gt Dig PLC data types E Watch and force tables Gi Add new watch table FE Force table aperture in meter nohwny Output Mowe operations err err 1 faulure appears Conversion operations 66 6 2888808088 co InOut Add ne gt d d b volume in liters when failure 1 gt aA Program control operatio gt 0B Word logic operations
9. re mass amp A ajoa ee Gs B Ta Laan l a gt 51 4 o gt amp gt 1 v Favorites J scl_startup Mi Add new device aia Devices amp networks w Block title Main Programm Sweep Cycle v r devicename_station_001 CPU 3 Comment ce configuration Online amp diagnostics Network 1 v a Program blocks Comment li Add new block 2 Main 081 F C140 w Basic instructions 2 calculation_wolurme_tank calculation_volume_tank Name gt 38 Technology objects j EN gt General gt External source files 15 0 height_max gt Bit logic operations gt Cal PLC tags M4D40 Q1 7 gt Timer operations gt ie PLC data types filling level_ err failure_bit gt Counter operations Watch and force tables tank1 filling_level sMD48 gt Z Comparator operatio i Addn atch table MD44 volume volume_tank1 gt Math functions Fz Force table aperture_tank1 aperture ENO Su0133N4 SU Syse kih s aneiq E gt Mowe operations Ebs Program info gt onversion operations EA PLC alarms gt EJ Text lists gt filling level_tank1 IM D40 in meters gt G Word logic operations d i Local modules gt G38 Shift and rotate gt Pr Common data gt Erg Further instructions gt En Documentation settings gt F Languages amp resources a Online access ap SIMATIC Card Reader El Properties jen Info Diagnostics lt Illl gt General
10. Block title Comment Main Program Sweep Cycle Network 1 Comment FC140 calculation _volume_tank EN MD40 fling level_ tanki filling_level RMD44 aperture tank aperture MD4A0 MID44 MD4A8 w filling level_tank1 aperture_tankd Volume _tank4 volume ENO in met in met in liter MD48 slurmme tank ers ers RTAL Options tt Favorites ae Basic instructions Name gt General gt Bit logic operations gt B Timer operations gt Counter operations gt Z Comparator operations gt E Math functions gt Move operations gt BS Conversion operations gt RP Program gt Gy Word logic operations gt E Shift and rotate b Further instructions lt mi wv Extended instructions control operatio Name gt D Languages amp resources gt hg Online access gt D SIMATIC Card Reader gt D Date and tirne of day O String Char O Process image Distributed VO O ProfiEneray Q Properties I Info a Diagnostics O Module parameter assig E Interrupts gt Alarming gt DO Diagnostics gt D Data block control gt C Table gt D Addressing gt D Additional functions General ry Cross references Compile Syntax Compiling completed errors O warnings 0 Path Errors Warnings Time devicename_station_ool 0 Oo 8 57 57 AM 8 57 87 o 0 s AM
11. CPU 815PF 2 PN The input parametera filling level amp aperture must be noted in meters y The output parameter volume is noted in liter Y S c For this we use a conversion factor of 1000 g a Program blocks s WP Add new bloch pan sor ETN m volume t i Main 081 v Basic instruction amp calculation_volurne_tank FC140 Name Descrip gt D Technology objects gt Timer operation a gt Gat External source files gt E Counter operatfons 2 gt Ca PLC tags E Math function Lu gt Di PLC data types ET Aes Form all amp gt Ba Watch and force tables y Get min amp a 2s Program info MAX Get maf 3 LA PLE alarmis Text lists gt i Local modules gt ge Common data b im Decumentation settings gt w Languages amp resources gt lig Online access gt GP SIMATIC Card Reader si i te i i i i o mn S Properties 7i Info FF 2 Diagnostics gt B Move operations General gt BQ Conversion operations gt By Prog a control operatio General g gt D Word logic operations gt Shift and rotate b Additional instructions Information Name calculation volurme tanh Details view Protection Type Fc Attributes y Number 140 Address Language SCL lt gt Extended instructions gt Technology gt Communication 4 Portal view ai Main 081 calculation_ v Project scl_startup_en opened A
12. E m X Devices C A s i ME 2B z OO gt Favorites suoKonsysuy amp dti L scl startup cai acala Gi Add new device o ii a Name amh Devices amp networks This function calculates the Volume from a cylindertank b Timer operations vE devicename_station_001 CPU 2 The input parameters filling level aperture must be noted in meters gt Counter operations fy Device configuration 3 The output parameter volume is noted in liter gt B Math functions Online amp diagnostics 4 For this we use a conversion factor of 1000 gt F Move operations x Program blocks 5 gt 42 Conversion operations I Add new block E E aero amp Main 081 HIF filling_level gt 0 AND filling level lt height_max AND aperture gt 0 THEN gt Ba Program control operatio le a R 8 volume SQR aperture 4 3 14159 illing level 1000 gt DE Word logic operations 2 calculation_volume_tank 9 Jeres Celses gt E Shift and rotate gt G Technology objects 0 ELSE Additional instructions gt External source files volume l gt Ca PLC tags 2 erri true p ig PLC data types 3 END_IF v 2 Watch and force tables E Add new watch table Tee table 100 Hos Program info r EA PLE alarms E Properties ie Info Diagnostics E Text lists General Cross references Compile Syntax p y gt i Local modules d ut stun Description Errors gt Ej Documentation settings gt B Langu
13. VY Connected to devicename_station_001 To be used only at Educational and R amp D Facilities Unrestricted Siemens AG 2013 All Rights Reserved SI E M E N S Industry Sector IA amp DT 2 Since no analog sensor exists and thus no corresponding process value is available we have to specify the values Diameter_tank1 and Fill level_tank1 using the watch table Create a new watch table and enter the two values To see the current values switch Monitoring mode on Controller 001 Watch and force table gt New watch table gt Diameter_tank1 Fill level_tank1 Project Edit View Insert Online Options gels Window Help 36 0 Ed Sav projet amp M 33 XxX HE a a M i 2 A g coonline g amp Go offline A MEA x si Totally Integrated Automation PORT Devices 0O 0O a wb 7 B es Name Address Display format Monitor value Modify value 7 Comment sel_startup a aperture_tank1 hD44 Floating point number LT i Add new device filling lewelt E SMD40 Floating point number Bao l am Devices amp networks 3 Add ne v i devicename_station_001 Ilf Device configuration Online amp diagnostics z Program blocks Bi Add new bloch Main OB1 calculation_volurne gt 8 Technology objects gt External source files x Ca PLC taqs 4 Show all tags Gi Add new tag table 2346 Default tag table 3 gt Da PLC data types v lsa Watch and force tables oe Ec Properties l Diagnostics
14. calculation _volurme _ta Block was successfully compiled o o 8 57 57 AM w Compiling completed error o wninegs 0 o oO 857 59 AM Description Ej gt Program blocks v Details view Address Technology 4 Portal view tartup_en ope To load the program blocks and the device configuration to the CPU first select the Controller 001 gt Program blocks gt 11 CPU 315F 2 PN DP folder and then click the Download to device icon 4 SEA TA Siemens scl_startup Project Edit View Inset Online Tools Window 36 H Save project EL M 33 Project tree ii Devices Vi Q O Options K Sim a Totally Integrated Automation PORTAL Help z 2 ma Go online f Go offline Jo IM A x J 1 Options v Find and replace scl_startup i Add new device am Devices amp network X ir devicename_static BY Device configur Q Online amp diagne PAT rogram blocks gt Gg Technology obje gt External source Ca PLC taqs ig PLC data types EA Watch and force 305 Program info BA PLC alarms Z Text lists gt i Local modules gt t Common data b E Documentation se B Languages amp resol gt gp Online access gt BR SIMATIC Card Reader Load preview Saueigr E Q Compiling before downloading to device Status Target Message Qo devicename_station ubstructures Ready for loading i hidden text ildcard Compile i gular expre 2 document C
15. gt Shift and rotate b Temp A Additional instructions Add ne Return Ret_val aMi oO saneiq E a 205 Prograrn info BA PLC alarms Text lists General Cross references Compile Syntax gt E Local modules F ut Sobel Path Description gt En Documentation settings b iF Languages amp resources gt Online access gt ER SIMATIC Card Reader lt T gt gt Technology Details view gt gt Communication 4 Portal view 23 Overview 54 Default tag t calculation _ v The project scl_startup was saved succ E Properties 3 Info a E Diagnostics SCE Training Curriculum Page 27 of 30 To be used only at Educational and R amp D Facilities TIA Portal Module 040 020 Edition 03 2013 Unrestricted Siemens AG 2013 All Rights Reserved SCE_EN_040 020_R1209_Startup Programming in High Level Languages with S7 SCL and SIMATIC 87 300 SI EM E N S Industry Sector IA amp DT 3 Next expand the program as specified below and check it for syntax errors by compiling it Save the program and load it to the controller Write program gt 2 gt fal save project _ x TA Siemens scl_startup Project Edit View Insert Online Options Tools Window ioe Totally Integrated Automation f A H Save projet 2 X 3 2X HE WB TB BR g oonline K cootline A ME x U PORTAL n_001 CPU 315F 2 PN DP gt Program blocks gt calculation_volume_tank FC140
16. CPU 315F 2 PN DP SCE Training Curriculum Page 5 of 30 To be used only at Educational and R amp D Facilities TIA Portal Module 040 020 Edition 03 2013 Unrestricted Siemens AG 2013 All Rights Reserved SCE_EN_ 040 020 R1209_ Startup Programming in High Level Languages with S7 SCL and SIMATIC S7 300 SI EM E NS Industry Sector IA amp DT 2 Notes on S7 SCL Programming Language S7 SCL Structured Control Language is a high level programming language based on PASCAL which allows structured programming The language corresponds to the SFC Sequential Function Chart language specified in the standard DIN EN 61131 3 IEC 61131 3 In addition to high level programming language elements S7 SCL contains typical elements of the PLC such as inputs outputs timers bit memories block calls etc as language elements It supports the block concept of STEP 7 and allows data blocks to be programmed according to standard as well as using STL LAD and FBD In other words S7 SCL supplements and extends the STEP 7 programming software with its LAD FBD and STL programming languages You do not have to create every function yourself Instead you can used already prepared blocks such as system functions or system function blocks that are present in the operating system of the CPU Blocks that are programmed with S7 SCL can be mixed with STL LAD and FBD This means that a block programmed with S7 SCL can call another block programmed in STL LAD or FBD In
17. Hojeyeo aiempiey E S100 SUNJUG kE gt ig Communications modules Properties General b General gt p Interface modules gt Fail safe gt MPUDP interface x1 Interface networked with PROFINET interface x2 b General Subnet Not networked saueigr E ssel k g Ethernet addresses F parameter Ethernet addresses Time of clay synchro Add new subnet IP protocol b Advanced options Diagnostics address ag mkd IP address Startup S bnet mask 255 255 255 Use IP router gt Interrupts Diagnostics system gt a sram diagnostics PROFINET Cloc gt Web server Operating mode v Information PROFINET device name devicename_station_OOl PLC tags Retentive memory Converted name devicenamexbstationxbOO16200 PLE data types Protection Device number 0 a Watch and force tables Connection resources Program info Overview of addresses Text lists Local modules serfs EE lt l 4 Portal view sh PLCI 6 Additional modules can be added for the hardware catalog on the right We select the signal module DI16 D016 with 16 digital inputs and 16 digital outputs and drag this to slot 4 Hardware catalog gt DI DO gt DI16 DO16 x 24V 0 5A gt 6ES7 323 1BL00 0AA0 VA Siemens scl_startup Project Edit View Insert Online Options Tools Window Help Totally Integrated Automation 3 C amp G Seveprojet X fs Te x St Te TD MA Oo BT g Gooniine W Go offline A OF OF
18. S7 SCL and SIMATIC S7 300
19. turn S7 SCL blocks can also be called in STL LAD and FBD The test functions of S7 SCL allow searching for logical programming errors in an error free compilation SCE Training Curriculum Page 6 of 30 To be used only at Educational and R amp D Facilities TIA Portal Module 040 020 Edition 03 2013 Unrestricted Siemens AG 2013 All Rights Reserved SCE_EN_ 040 020 R1209_ Startup Programming in High Level Languages with S7 SCL and SIMATIC S7 300 SI EM E NS Industry Sector IA amp DT 3 The S7 SCL Development Environment To use and deploy S7 SCL there is a development environment that is oriented to specific features of both S7 SCL and STEP 7 This development environment consists of an editor compiler and a debugger S7 SCL for S7 300 400 Debugger Editor compiler Editor compiler The S7 SCL editor is a text editor with which texts can be edited The central task you use the editor for is to create and edit blocks for STEP 7 programs The syntax of the text you input with the editor is checked thoroughly making error free programming simple Syntax errors are displayed in various colors The editor offers the following options Programming a S7 block in the S7 SCL language Convenient insertion of language elements and block calls using drag and drop operation Direct syntax check during programming Adjustment of the editor to your requirements by for example syntax oriented coloring of the var
20. CL gt manual gt 140 gt Ok Totally Integrated Automation PORTAL Project Edit View Insert Onlin 3 C Eel Save projet S M fs lt Tags User con syse j ka Default tag table v Find and replace Name Data type 35 Retain Visibl s 0 filling leve Real in meters Find saueigh E Show all tags Add new tag table ies Default tag table 3 gt Cli PLC data types Down gt Ba Wateh and force tables ction bloc i 3 up sutines without dedicated memory w Languages amp resources Editing language English United States Reference language English United States More wv Details view gt Additional information Ie Addl new and open Accessible from HMI Visible in HMI d Portal view Th Puc ime Default tag t SCE Training Curriculum Page 17 of 30 To be used only at Educational and R amp D Facilities TIA Portal Module 040 020 Edition 03 2013 Unrestricted Siemens AG 2013 All Rights Reserved SCE_EN_ 040 020 R1209_ Startup Programming in High Level Languages with S7 SCL and SIMATIC S7 300 SI E M E N S Industry Sector IA amp DT 3 The calculate_tankcontent FC140 block opens automatically Enter the Input and output parameters of the block as specified All local tags should also be provided with a sufficiently descriptive comment for better understanding Enlarge interface of block FC140 Enter interface parameters Diagram 0 1
21. IA amp DT 1 Expand the Tag table of the block as specified above Controller 001 CPU 315F 2 PN DP gt PLC tags Default tag table Enter operands TA Siemens scl_startup Project Edit View Insert Online Options Tools Window Help Totally Integrated Automation ax St Ct 4 3 Fi 2 ES oonline g amp Go offline A mee os PORTAL a Tags User constants he System constants 4 Q O z S 2 F ax Default tag table v sel_startup Name Address Retain Visibl Comment E Add new device lt q filling level_tank1 MD40 in meters a Devices amp networks lt aperture_tank1 MD44 in meters v ir devicename_station_001 C 3 J volurne_tank1 MD48 in liters HY Device configuration lt failure_bit Q1 7 was not able to make the calculation Online amp diagnostics 5 Add new Doo O v ia Program blocks Bi Add new bloch J Main 081 amp calculation_volume_ta b Gg Technology objects gt External source files v Ca PLC tags Z Show all tags Gi Add new tag table 34 Default tag table 4 gt Ci PLC data types E Watch and force tables Bi Add n eE E Properties i Info al Diagnostics E Force table Alarm display Device information Connection information S aa All devices offline Y Onlin Ta Oper Device module Message Details s neiq E 205 Program info EA PLC alarms Text lists gt ig Local modules gt 69 Common data rer FO ne ee tn ee then te et em t lt
22. S7 300 are managed in projects Such a project is now created in the portal view gt Create new project gt scl_startup gt Create SEA Totally Integrated Automation Create new project Project name scl_startup Open existing project Path C DATA OO_TIA Projekte Create new project Author SPE Comment Migrate project Creating project Creating project The project C DATA OO_TIA Projekte scl_startup scl_startup ap11 is being created Please wait Welcome Installed software Help User interface language SCE Training Curriculum Page 12 of 30 To be used only at Educational and R amp D Facilities TIA Portal Module 040 020 Edition 03 2013 Unrestricted Siemens AG 2013 All Rights Reserved SCE_EN_ 040 020 R1209_ Startup Programming in High Level Languages with S7 SCL and SIMATIC S7 300 Industry Sector IA amp DT 3 First steps for configuring are suggested We want to start with Configure a device First steps Configure a device TA Siemens scl_startup SEA Totally Integrated Automation First steps Open existing project Project scl_startup was opened successfully Please select the next step Create new project Migrate project Close project Configure a device Welcome Tour First steps Write PLC program Configure an HMI screen Installed software Help User interface language Open the project view gt P
23. Startup Programming in High Level Languages with S7 SCL and SIMATIC 87 300 SI EM E NS Industry Sector IA amp DT 5 4 Expanding the program Next we will check whether faulty information is contained in the input parameters of the calculate_tankcontent block Another value high_max is also passed to the block This indicates the height of the tank The block is now to analyze whether the fill level of the tank is less than zero or greater than the specified tank height It is also to be checked whether the diameter was specified as less than Zero lf there is an error the Boolean output parameter er should return TRUE and the value of the Content parameter should be 1 Expanding the assignment list tag table Address Symbol Data type Comment Q1 7 Error bit BOOL Error unable to perform calculation Expansion of the interface of the function FC140 calculate_tankcontent Type Symbol Data type Comment IN high_max REAL in meters OUT er REAL er 1 there is an error content 1 Function call Representation in FBD FC140 calculate_tankcontent Fill level REAL high_ max REAL Diameter REAL BOOL er REAL content SCE Training Curriculum Page 26 of 30 To be used only at Educational and R amp D Facilities TIA Portal Module 040 020 Edition 03 2013 Unrestricted Siemens AG 2013 All Rights Reserved SCE_EN_040 020_R1209_Startup Programming in High Level Languages with S7 SCL and SIMATIC S7 300 SI E M E N S Industry Sector
24. Y Device configuration Online amp diagnostics v X Network 1 a Program blocks Comment i Add new block J Main 081 WFC140 v Basic instructions J calculation_volume_tank calculation _volume_tank Name b E Technology objects EN Open b Pa General b External source files MD40 fol b a PLC tags filling level_ D tai trl Shift l gt Timer operations b ip PLC data types tank1 filling_level an tan trle Shiftel gt Counter operations X A Watch and force tables YMD44 a tan trlaShiftep tanki gt X Comparator operatio Gi Addn atch table aperture_tank1 4 aperture gt Math functions aaa c Ctrl X L F Force table a hoos W s gt A Move operations 205 Program info n npe ior gt 4B Conversion operations EA PLC alarrns eee mew a a Riagnosiica gt Program aa operatio Text lists General Cross reference X Delete Del gt G Word logic operations gt ig Local modules Compiling completed errors 0 warn Goto gt E Shift and rotate gt uf Common data I Path Cross reference information SHON J gt Eg Further instructions gt E Documentation settings Comment Open and monitor gt E Bit logic operations s neiq v v devicename_station_001 hange call type es amp resources gt L Languages amp resour v Program blocks Update va Online access calculation_volume_ta SR SIMATIC Card Reader gt Inserternptybox Shifters Mgs 0 lt Hl gt ise
25. ages amp resources gt Online access gt SR SIMATIC Card Reader lt Ill gt Technology De 4 Portal view VY The project scl_startup was saved succ s neiq SCE Training Curriculum Page 28 of 30 To be used only at Educational and R amp D Facilities TIA Portal Module 040 020 Edition 03 2013 Unrestricted Siemens AG 2013 All Rights Reserved SCE_EN_ 040 020 R1209_ Startup Programming in High Level Languages with S7 SCL and SIMATIC S7 300 SI E M E N S Industry Sector IA amp DT 4 Because the parameters of the block were changed the call must be updated in OB1 Open OB1 and scroll to the position of the block call Right click to open the shortcut menu and then click Update Controller 001 CPU 315F 2 PN DP Program blocks gt Main OB1 Right mouse button gt Update TA Siemens scl_startup Project Edit View Insert Online Options Tools Window Help Totally Integrated Automation H Saveprojet amp M 33 G x Ht Mt BS m Po BERS oonline amp Go offline A Ree os PORTAL gt devicename_station_001 CPU 315F 2 PN DP gt Program blocks gt Main OB1 mm X Devices a _ foortions 4 OO 2 acts e BSc a lalak C6 Dd amp 2 peg e scl_startup I Add new device l ia 3 ig SUOIPNISU Jevices amp networks c IA ala gia Devices amp networks w Block title Main Prograrn Sweep Cycle v J devicename_station_001 CPU 3 N
26. aining curriculum We would like to thank Michael Dziallas Engineering and all those involved for their support in creating this training curriculum SCE Training Curriculum Page 2 of 30 To be used only at Educational and R amp D Facilities TIA Portal Module 040 020 Edition 03 2013 Unrestricted Siemens AG 2013 All Rights Reserved SCE_EN_040 020_R1209_Startup Programming in High Level Languages with S7 SCL and SIMATIC S7 300 SI E M E N S Industry Sector IA amp DT PAGE 1 PCT CC ae E A E N 4 2 Notes on S7 SCL Programming Language ccccccccccecccseeeseecceeeeeeeeeeseeeceeeeessaeeseeeeeeeeessaeaseeeeeeesessaaageses 6 3 The S7 SCL Development Environment cccccccccssssseeccceeeeceeeeeeceeeeeseeaeeeeeeeeeeeesaeaaeseeeeeesssseaaeeeeeeseesaaas 7 4 Example Task Tank Content ccccccccsssseeccceeeeeeaeeeeceeeeeeeaeeeeeeeeeeeesseaeeeseceeeeeeseeaaseeeeeeessseaaaeeeeeeeessaagasees 8 41 WESCUOUOM Ol TAS sessenta nde AEE Ei reaR buat RE EEA REDE re R ERRE nenna 8 4 2 Assignment list tag TAD Givi cscs ses cccesascencdsaciensquteccsuchnes lt becwvicdneceaasunedetceuencetec oben besdueeseeresncetddeeeesdeschenetacdeexererdl 8 4 3 Program StPUCTULE cccccceecceccsesceeceeseeecceseeecceuseeecsaeeeeseaseeessuaeeesseaeeeeseaseeessageeesseeeeeseseeessaneeessageeesseeeessas 9 4 4 Interface of the block calculate_tankcontent FC140 n nnnnnannnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnsrnrnnnnrresnrrnnnnnennnne 10
27. avoid confusion with the PLC tags it is helpful to write the local tags with small letters SCE Training Curriculum Page 18 of 30 To be used only at Educational and R amp D Facilities TIA Portal Module 040 020 Edition 03 2013 Unrestricted Siemens AG 2013 All Rights Reserved SCE_EN_040 020_R1209_Startup Programming in High Level Languages with S7 SCL and SIMATIC 87 300 SI E M E N S Industry Sector IA amp DT 4 Once the local tags have been declared you can start to create the program shown here The square function SQR is used to square a number for this purpose The number to be squared is enclosed in brackets To insert the function drag it to the position of use in the program Instructions menu on the right gt Basic instructions Mathematical functions gt SQR ry x TA Siemens scl_startup_en Project Edit View Insert Online Options Tools Window Help Totally Integrated Automation PORTAL F O fed Seve project Sh M fs Ts XK 2s Te Db 2 OB A coonline K Gooffline Jp M E x i L p_en gt devicename_station_001 CPU 315F 2 PN DP gt Program blocks gt calculation_volume_tank FC140 mi Xx Devices Options ie aT xt x a a i i lt i O ae ao Blw e Go Cu 3I I s Ah Ga eli e S z butt at l Favorites g sel_s e S sel_startup_en cas awit i CASE 5 B Add new device aa fy Devices amp networks This function calculates the Volume from a cylindertank X i devicename_station 001
28. do Nog Onm SOMO sser E E E E EAEE EEEE E E EEES 11 5 Programming the Tank Content Calculation for SIMATIC S7 300 in S7 SCL ccccceeeeeeeeeeeeeeeeeeeeeeeees 12 5 1 Creating a project and configuring NAFAWALE ccseecccecceeeeeceeeceeeeeeeeeeaaseeeeeseeaseeeessaeeeeeeessaaseeeeesaaaeeeees 12 D2 Ge 11 18 ee By 8 016 12 oe E On nee ee eee 16 Si OI IN eget aes entrees cen E A 23 5 4 TEXD AMONG he POON AW aeicssnctmsasccenaasievervencstsannchabamsesccstuestsretvensaninaasead neni EEES 26 SCE Training Curriculum Page 3 of 30 To be used only at Educational and R amp D Facilities TIA Portal Module 040 020 Edition 03 2013 Unrestricted Siemens AG 2013 All Rights Reserved SCE_EN_040 020_R1209_ Startup Programming in High Level Languages with S7 SCL and SIMATIC S7 300 SI E M E N S Industry Sector IA amp DT 1 Preface The content of the SCE_EN_ 040 020 module is part of the Other Programming Languages training unit and represents a fast entry point for programming the SIMATIC S7 300 with the S7 SCL programming language with the TIA Portal Basics of PLC programming Module 10 Module 20 Plant simulation with SIMIT Module 150 Advanced functions for PLC programming Module 30 Other programming PROFIBUS PROFINET AS intert languages Module 60 Module 70 tia Module 40 MOURN Safety technology Sensor technology Process visualization Drive technology Module 80 Module 110 HMI Module 90 Module 100 Learning object
29. f the content is measured by an analog sensor In the task the value of the fill level should already existed standardized in the meter unit A function FC 140 calculate_tank content is to be programmed in the program The diameter and the fill level in meter unit are the passed parameters Result is the tank content in the liter unit 4 2 Assignment list tag table Because modern programming uses tags and not absolute addresses the global PLC tags must be defined here These global PLC tags are descriptive names with a comment for each input and output used in the program The global PLC tags can then be accessed later during programming via their names These global tags can be used in all blocks anywhere in the program Default tag table Name Data type Address Comment FillLevel_ tank1 REAL MD40 in meters Diameter_tank1 REAL MD44 in meters Content_tank1 REAL MD48 In liters SCE Training Curriculum Page 8 of 30 To be used only at Educational and R amp D Facilities TIA Portal Module 040 020 Edition 03 2013 Unrestricted Siemens AG 2013 All Rights Reserved SCE_EN_ 040 020 R1209_ Startup Programming in High Level Languages with S7 SCL and SIMATIC S7 300 SI EM E NS Industry Sector IA amp DT 4 3 Program structure Program execution is written in what are referred to as blocks The Main OB1 organization block is provided as default This block represents the interface to the CPU operating system and is automatically called and cyclica
30. firrmware V2 6 can be used see eae for safety applications supports PROFIsafe V2 6ES7 315 2FJ14 0AB0 gt fm CPU 317F 2 DP Version v2 6 V Moo gt Project view Opened project C DATA OO_TIA Projekte scl_startup scl_startup SCE Training Curriculum Page 13 of 30 To be used only at Educational and R amp D Facilities TIA Portal Module 040 020 Edition 03 2013 Unrestricted Siemens AG 2013 All Rights Reserved SCE_EN_ 040 020 R1209_ Startup Programming in High Level Languages with S7 SCL and SIMATIC S7 300 SI E M E N S Industry Sector IA amp DT 5 The software now switches automatically to the project view containing the opened hardware configuration in the device view To ensure that the software will access the correct CPU later the ETHERNET address of the CPU has to be set Properties General gt ETHERNET address gt IP address 192 168 0 80 Subnet mask 255 255 255 0 VA Siemens scl_startup Project Edit View Insert Online Options Tools Window Help 3 CX Eel Seve projet Sh M fs x St Ct Te mw 2 BT g oonline W Go offline A OF OF x PORTAL Devices 34 i de evicenarmne station oo Je 5 10 11 sel startup Wi Add new device aia Devices amp networks gt i devicename_station_OO1 CPU 315F 2 PN gt ua Common data gt fe Documentation settings Languages amp resources gt lm Online access gt Sp SIMATIC Card Reader
31. hnology objects b External source files X fa PLC tags a Show all tags Gi Add new tag table 3 Default tag table 3 p ie PLC data types Bare ang torce tables Eg Properties i Info i E Diagnostics Sai 28 Program info Down EA PLC alarms General Userconstants y System constants Find in substructure Find in hidden text Mm Bae amp FF ix Default tag table Name Data type Address Retain Wisibl 5 Comment J filling lewel_tank1 Real WMD In meters aperture_tank1 Real Soll Db In meters 4 volurme_tank Real MBAS In liters SCE Training Curriculum Page 16 of 30 To be used only at Educational and R amp D Facilities TIA Portal Module 040 020 Edition 03 2013 Unrestricted Siemens AG 2013 All Rights Reserved SCE_EN_ 040 020 R1209_ Startup Programming in High Level Languages with S7 SCL and SIMATIC S7 300 SI E M E N S Industry Sector IA amp DT 2 To create the function calculate_tankcontent FC140 select Controller 001 CPU 315F 2 PN DP in the project tree and then Program blocks Then double click Add new block Select Function FC and assign the name calculate_tankcontent Change the programming language to SCL You can change the numbering by switching from automatic to manual Enter the number 140 Click OK to accept your entries Controller 001 CPU 315F 2 PN DP gt Program blocks gt Add new block Function FC gt calculate_tankcontent gt S
32. id new device iF CASE ror TO weHiLe gin Devices amp networks OF D oo i r devicename_station_OO1 Com i 5 oil 1 V This function calculates the Volume from a cylindertank HY Device configuration 2 The input parameters filling level aperture must be no Online amp diagnostics The output parameter volume is noted in liter fs Program blocks d For this we use a conversion factor of 1000 MA Add new block Main 081 tb volume SOR aperture 4 3 14159 filling_level 1000 volume aperture S calculation volume Tilling_ level gt Ga Technology objects gt D External source files v Ca PLC tags Rey Show all tags x Add new tag table es Default tag table 3 gt Cig PLO data types A Watch and force tables MA Add new watch table EG Force table Alarm display Device information Connection information A Watch tablet 5 GU Watch table_ No devices with problems Pao rast fine Ho Program inf Y Onlin Ta Oper Device rnedule Details E3 PLC alarms Text lists gt ig Local modules b at Common data a na ee eres ae lt ir A gt Details view SS w Note When you click d the current values of the tags programmed in this row are displayed SCE Training Curriculum Page 25 of 30 To be used only at Educational and R amp D Facilities TIA Portal Module 040 020 Edition 03 2013 Unrestricted Siemens AG 2013 All Rights Reserved SCE_EN_040 020_R1209_
33. ious language elements Checking of the finished blocks by compiling Display of all errors and warnings that occur during compiling Localizing of the faulty position in the block optionally with description of error and information on debugging Debugger The S7 SCL debugger provides the option of checking how the program runs in the AS and thus finding any possible errors S7 SCL offers two different test modes for this Step by step monitoring Continuous monitoring With Step by step monitoring the logical execution of the program is completed You can execute the program algorithm instruction for instruction and monitor in a result window how the processed tag contents change during the process With Continuous monitoring you can test a group of instructions within a block The values of the tags and parameters are displayed in chronological order during the test run and where possible updated cyclically SCE Training Curriculum Page 7 of 30 To be used only at Educational and R amp D Facilities TIA Portal Module 040 020 Edition 03 2013 Unrestricted Siemens AG 2013 All Rights Reserved SCE_EN_ 040 020 R1209_ Startup Programming in High Level Languages with S7 SCL and SIMATIC S7 300 SI EM E NS Industry Sector IA amp DT 4 Example Task Tank Content 4 1 Description of task Our first program is one to program the calculate the content of tank The tank has the shape of an upright cylinder The fill level o
34. is function calculates the Volume from a cylindertank The input parameters filling level aperture must be noted in meters f The output parameter volume if noted in liter fr For this we 1 volume SOR Compiling configuration 100 Compiling calculation volume _ tank FCT sayer El Properties 3 Info m Diagnostics ompi 0100 Compiling calculation_volume_tank FCT Errors Warnings Time 0 0 11 28 49 AM 1 28 49 AM 26 49 4M 1 Path Description dewicename_station_O01 Program blocks wj calculation_volurme_ta Block wass 4 Portal view wed succ 7 Syntax errors that occur are recognized during compilation and display in the Menu Info Compile Info Compile TA Siemens scl_startup Proypect Edit Wiews Insert i Options Tools window 7 J a A 3 Totally Integrated Automation E gt Ed Save project rh eit pl g Go online PORTAL POR To ew HILE oo oo This function calculates the Volume Crom a cylindertank Y TheE input parameters filling lewwel aperture must He noted in meters J The output parameter volume is noted in liter Yf For this we use a conversion factor of 1000 volume SOR aperture 4 5 149159 8filling lewel 1000 LU 5 Er E m an Compiling completed errors 0 warnings 0 warnings Time E 11 29 21 AM 11 29 21 AM l Path Description dewicename_station_00 r Program blacks calcu
35. ive This module describes the basic functions of the S7 SCL development environment Test functions for eliminating logical programming errors will also be shown Requirements To successfully work through this module the following knowledge is required e Proficiency in working with Windows e Basics of PLC programming with STEP 7 Professional V11 e g modules 020 to 030 e Basic information on programming in high level languages such as Pascal SCE Training Curriculum Page 4 of 30 To be used only at Educational and R amp D Facilities TIA Portal Module 040 020 Edition 03 2013 Unrestricted Siemens AG 2013 All Rights Reserved SCE_EN_ 040 020 R1209_ Startup Programming in High Level Languages with S7 SCL and SIMATIC S7 300 SI EM E NS Industry Sector IA amp DT Required hardware and software 1 PC Pentium 4 1 7 GHz 1 XP 2 Vista GB RAM approx 2 GB of free hard disk space Operating system Windows XP Professional SP3 Windows 7 Professional Windows 7 Enterprise Windows 7 Ultimate Windows 2003 Server R2 Windows Server 2008 Premium SP1 Business SP1 Ultimate SP1 Software STEP 7 Professional V11 SP1 Totally Integrated Automation TIA Portal V11 Ethernet connection between the PC and CPU 315F 2 PN DP SIMATIC S7 300 PLC e g CPU 315F 2PN DP with 16DI 16DO signal module The inputs must be fed out to a control panel 2 STEP 7 Professional 1 PC V11 TIA Portal 3 Ethernet connection 4 7 300 with
36. late_content FC140 YA Siemens scl_startup Project Edit View Insert Online Options Tools Window F Dy Gd save projet 5 X 3 SK MEH Totally Integrated Automation PORT ww w Go offline A R iF x Ca CL A Go online Devices l OoO a gt as Lala 6 C N a a suonnysuj EE scl_startup Bi Add new device ain Devices amp networks 4 ol gt w Block title Main Program Sweep Cycle v i devicename_station_0O01 CPU 315F 2 BY Device co Online amp et Program blocks Ba Add new bloch a Main 081 Se calculation_vwolurne_tank FC140 infiquration diagnostic Comment Network 1 Comment F C140 calculation_volume_tank syse J ki gt Gea Technology EN gt External source files Ca PLC tags a Show all tags Gi Add new tag table 55 Default tag table 3 gt ie PLC data types gt EA Watch and force tables EWS Pro objects MD40 filing lewel_ tank1 filling_lewel bs MIiD48 volume volurne_tank1 ENO MiD44 aperture_tank1 aperture saueaqr E IviD40 in meters IM D44 MD48 w filling level_tank1 aperture_tank1 gram info EA PLC alarms Text lists gt E Local modules gt f Common data gt E Documentation settings gt iF amp resources gt Online ac SURAT OO ed Daada lt 111 gt Details view 4 Portal view in meters volume_tank1 in lite
37. lation_volurme_ta Block was successfully compiled 11 29 21 AM Compiling completed errors 0 warnings 0 q Portal view 23 Overview f php PLCI calculat 7 The project scl_startup was saved succ SCE Training Curriculum Page 20 of 30 To be used only at Educational and R amp D Facilities TIA Portal Module 040 020 Edition 03 2013 Unrestricted Siemens AG 2013 All Rights Reserved SCE_EN_ 040 020 R1209_ Startup Programming in High Level Languages with S7 SCL and SIMATIC S7 300 Industry Sector IA amp DT SIEMENS The function can now be called in the Main OB1 Before we double click to open the Main OB1 block we select FBP as its programming language Main OB1 gt Switch programming language gt FBD 8 YA Siemens scl_startup Project Edit F O H Save projet Be X Project tree Online aa mee mere Totally Integrated Automation P ORTAL Devices O O Suononysu scl_startup _ o ro Ei Add new lt oS Sih Dewices amp networks v iT devicename_station_001 CPU 315F 2 PN AY Device lt Q Online amp gram blocks Bf Add new block Se Main OB1 calc gt OGE Techno Wo Cut gt Externg 32 Copy Da PLC taq t 45 Shoy mA Addl i Defa Delete gt Cre PLC dat Rename gt Ea Watch d Elos Pro WHILE DO device ThHis function calculates the Volume from a cylindertank The input parameters filling level aperture m
38. lculation_volume gt 38 Technology objects gt External source files v Ca PLC tags Z Show all tags Gi Add new tag table E Default tag table 3 gt Dig PLC data types Ea Watch and force tables B Add new watch table S Properties ut l Diagnostics Ez Force table Alarm display Device information Connection information 5 Watch table_1 No devices with problems EWS Program info 4 PLC alarms Z Text lists gt i Local modules gt PT Common data 2 Onlin Ta Oper Device rnodule Message Details Se ut ous ee es one a E me ee J lt Hl gt 4 Portal view ai Main OB1 EE Watch table_1 34 Default tag t vY Connected to devicename_station_001 nea SCE Training Curriculum Page 24 of 30 To be used only at Educational and R amp D Facilities TIA Portal Module 040 020 Edition 03 2013 Unrestricted Siemens AG 2013 All Rights Reserved SCE_EN_ 040 020 R1209_ Startup Programming in High Level Languages with S7 SCL and SIMATIC S7 300 SI E M E N S Industry Sector IA amp DT 4 The program in OB1 can now be checked gt Pr TA Siemens scl_startup Project Edit View Insert Online Options Tools Window Help Totally Integrated Automation fC Ed Save projet SB X 3 3 K Ht Mt BT Bi BER g oonline i Go offline A RE XH PORTAL Devices EKAS ao Se A aoa aH e g as Lanan scl_startup I Add new device 3 tl suon1 su a Device
39. lly processed by this operating system From this organization block additional blocks can be called in turn for structured programming such as the function calculate_tankcontent FC140 This function is used to break an overall task down into subtasks These can then be solved more easily and tested in their functionality Structure of the tank content sample task Main organization block OB1 Block called cyclically by the operating system Here is the call of the function calculate_tankcontent Function calculate_tankcontent Network 1 Call calculate_tankcont FC140 Comment The actual program is contained in this example Is called by Main OB1 15 0 height_max Mi D40 filling level_ tank1 filling_level i D44 aperture_tank1 aperture SCE Training Curriculum Page 9 of 30 To be used only at Educational and R amp D Facilities TIA Portal Module 040 020 Edition 03 2013 Unrestricted Siemens AG 2013 All Rights Reserved SCE_EN_ 040 020 R1209_ Startup Programming in High Level Languages with S7 SCL and SIMATIC S7 300 SI EM E NS Industry Sector IA amp DT 4 4 Interface of the block calculate_tankcontent FC140 The interface of the block must be declared before the program can be written In the interface declaration the local tags Known only in this block are defined The tags or interface parameters are divided into two groups e Block parameters that form the block i
40. m are as follows Interface of the function FC140 calculate_tankcontent Type Name Data type Comment IN Fill level REAL in meters IN Diameter REAL in meters OUT Content REAL in liters The function call in a block programmed in FBD appears as follows Function call Representation in FBD FC140 calculate_tankcontent Fill level REAL Diameter REAL REAL content 4 5 Note on solution The formula for calculating the volume of an upright cylinder is used to solve the task The conversion factor 1000 is used to calculate the result in liters 2 d diameter V ez h gt content e 3 14159 e fill level e 1000 4 4 SCE Training Curriculum Page 11 of 30 To be used only at Educational and R amp D Facilities TIA Portal Module 040 020 Edition 03 2013 Unrestricted Siemens AG 2013 All Rights Reserved SCE_EN_ 040 020 R1209_ Startup Programming in High Level Languages with S7 SCL and SIMATIC S7 300 SI E M E N S Industry Sector IA amp DT 5 Programming the Tank Content Calculation for SIMATIC S7 300 in S7 SCL The following steps enable you to create a project for SIMATIC S7 300 and to program the solution for the task 5 1 Creating a project and configuring hardware TA Siemens gt Project view The central tool is the Totally Integrated Automation Portal which is opened here with a double click TIA Portal V11 pr 1A a TIA Portal 11 Programs for SIMATIC
41. ng Curriculum Page 15 of 30 To be used only at Educational and R amp D Facilities TIA Portal Module 040 020 Edition 03 2013 Unrestricted Siemens AG 2013 All Rights Reserved SCE_EN_040 020_R1209_Startup Programming in High Level Languages with S7 SCL and SIMATIC 87 300 SI E M E N S Industry Sector IA amp DT 5 2 Creating a program 1 Open the Default tag table and enter the operands with their name and data type Controller 001 CPU315F 2 PN DP gt PLC tags Default tag table Enter operands TA Siemens scl_startup U X jec it View Ins i ions s Wi i Project Edit View Inset Online pasy Tools Window Help Totally Integrated Automation FT H Save projet amp X 3 5x 9i WB a Bi BER g oonline K Go offline A Ree oa ORTAL scl_startup gt devicename_station_001 CPU 315F 2 PN DP gt PLCtags gt Default tag table 3 U mg xX Devices a Tags a User constants he System constants Options se B 5 O O 3 j y gt 7 ix a S Default tag table v Find and replace v sel_startup Name Address Retain Visibl Acces Comment A i Add new device lt filling level_tank1 MD40 M inmeters Find Wu an Devices amp networks 2 lt aperture_tank1 MD44 m m in meters gt X ir devicename_station_001 CPU 315F 2 PN 3 J volume_tank1 MD48 4 Me inliters Saan j m it Device configuration Add new O Online amp diagnostics D Match case gt a Program blocks gt 3 Tec
42. nterface for the call in the program Type Designation Function Available in iii EEE input Parameters whose values are Functions function blocks and some PESE p read by the block types of organization blocks Output Parameters whose values are Output parameters Functions and function blocks Return written by the block A parameter whose value is read by the block when it is called and In out parameters InOut is written back by the block to Functions and function blocks the same parameter after it is processed e Local data that is used for saving intermediate results Type Designation Function Available in Tags that are used to store temporary intermediate results Functions function blocks and Temporary local data is retained organization blocks for one cycle only Temporary local data Temp Tags that are used for saving static intermediate results in the instance data block Static data Static local data Static is retained until it is overwritten Function blocks which may be after several cycles SCE Training Curriculum Page 10 of 30 To be used only at Educational and R amp D Facilities TIA Portal Module 040 020 Edition 03 2013 Unrestricted Siemens AG 2013 All Rights Reserved SCE_EN_ 040 020 R1209_ Startup Programming in High Level Languages with S7 SCL and SIMATIC S7 300 SI EM E NS Industry Sector IA amp DT The interface parameters for the calculate_tankcontent FC140 block used in our sample progra
43. ols Cf O H Save projet SL X 35 X HE CHE Window Help a Th m fu m fA g Go online gt Go offline A IR IR Projecttree M4 scl_startup gt devicename_station_001 CPU 315F 2 PN DP gt Program blocks gt dain OB1 Devices SEIA Totally Integrated Automation PORTAL U EX 400 v scl_startup rs i Add new device ee mm Devices amp networks v fg devicename_st BY Device configur Online amp diagno v m Program bloc Gi Add new bloch Main 081 E calculatio singin gt E Technology obje tanki gt m External source gt Ca PLC taqs gt Di PLC data types gt A Watch and force 30 Program info EA PLC alarms Text lists gt ig Local modules RA Comment 00 wMD44 aperture_tank1 axes amp Aime a lalki ed ol gt 47 FC140 calculation_volume_tank 00 MD48 volume_tank1 suoipnysuj H saueiqr E ES Properties b wt Common data b E Documentation se gt F Languages amp reso gt m Online access gt 5 SIMATIC Card Reader Alarm display s m gt 4 Portal view SCE Training Curriculum Device information Connection information No devices with problems Y Onlin Ta Oper Device module Message Details Page 23 of 30 TIA Portal Module 040 020 Edition 03 2013 SCE_EN_040 020_R1209_ Startup Programming in High Level Languages with S7 SCL and SIMATIC S7 300
44. ompiling configuration Check consistency current position tion Cancel lages amp resources Finish gt Details view 4 Portal view i Scanning for devices completed for int Note During downloading the project is automatically recompiled and checked for errors To be used only at Educational and R amp D Facilities Unrestricted Siemens AG 2013 All Rights Reserved SCE Training Curriculum Page 22 of 30 TIA Portal Module 040 020 Edition 03 2013 SCE_EN_040 020_R1209_ Startup Programming in High Level Languages with S7 SCL and SIMATIC S7 300 SIEMENS Industry Sector IA amp DT 12 An overview for checking the steps to be executed is shown before the download process starts Click Load to start loading the program Load Load preview Q Check betore loading status Target devicename_station Simulated module Step modules Software 5 3 Test program Message Ready for loading The download willbe executed to a simulated PLE All modules will be stopped for downloading to device Download software to device Action Stop all Consistent download Refresh Cancel 1 Clicking the icon Monitoring on off allows you to monitor the state of the simulated input and output tags on the calculate_tankcontent block gt TA Siemens scl_startup Project Edit View Insert Online Options To
45. roject view Opened project CADATA O0_TIA Projekte scl_startup scl_startup 4 The next step is Add new device with the Device name Controller 001 Choose the CPU 315F 2 PN DP with the appropriate order number from the catalog gt Add new device gt Controller 001 gt PLC SIMATIC S7 300 CPU CPU 315F 2 PN DP gt 6ES7 315 2FH13 OABO V2 6 add YA Siemens scl_startup OA Totally Integrated Automation Add new device Devices amp Show all devices Device name networks Control 001 Add new device gt ig SIMATIC 57 1200 v i SIMATIC 57 300 Lig cru gt ig CPU 312 gt lig CPU 312C gt ig CPU 313C i CPU 315F 2 PN DP gt Lag CPU 313C 2 DP Configure networks gt F CPU 3130 2 PtP gt ig cPU 314 Order no 6ES7 315 2FH13 04B0 gt i CPU 314 2 DP gt ig CPU 3140 2 PNIDP gt ig CPU 314 2 PtP Description gt ig CPU 315 2 DP ba Work memory 256 KB 0 1 ms 1000 instructions gt ig CPU 315 2 PN DP el y tra a _ PROFINET connection 7 Communication gt Lg CPU 317 2 DP loadable FBs FCs PROFINET 10 Controller gt ig CPU 317 2 PN DP supports RT PROFINET interface and 1 port gt im CPU 319 3 PN DP PROFINET CBA PROFINET CBA Proxy TCP IP a no transport protocol combined MPIDP connection gt fg CPU 315F 2 DP MPI or DP master or DP slave multi tier jg CPU 315F 2 PN DP configuration up to 32 modules constant DP bus SRE EEE cycle time routing
46. rs cess Info a Po i The programming language of the sele Diagnostics E Properties jen are Z Deun eo i I Main 087 To be used only at Educational and R amp D Facilities Page 21 of 30 Unrestricted Siemens AG 2013 All Rights Reserved SCE Training Curriculum TIA Portal Module 040 020 Edition 03 2013 SCE_EN_040 020_R1209_ Startup Programming in High Level Languages with S7 SCL and SIMATIC S7 300 SIEMENS Industry Sector IA amp DT p 10 The button SH 378 project is used to resave the project gt H Save project VA Siemens scl_startup_en Project Edit View Insert Online Options 36 Al save project Gh M fe Te a QS Cs Devices Tools Window Help ori fo 2 fA cooniine w amp Go offline scl_startup_en gt devicename_station_OO1 CPU 315F 2 PN DP Ar x g gt Program blocks gt Main OB1 J scl_startup_en Bi Add new device siha Devices amp networks E devicename_station_9071 CPU 315F 2 PN OY Device Online amp diagnostics v st Program blocks aa Add new bloch Main 081 J calculation _volume_tank FC140 gt GR Technology objects gt Ga External source files b Ca PLC tags gt Di PLE data types gt GR watch and force tables 265 Program info EJ PLE alarrns E Text lists gt T Local modules gt we Common data gt Documentation settings configuration o E gt Be ae e bo 4 a gt 4
47. rt output trle Shifts gt Technology 4 Portal view 3m Defaulttagt f Main g Properties VY The project scl_startup was saved succ KA Insert network Shift F2 5 The old and the new interface will now be displayed Click OK to confirm Ok Interface update Old imntertaze Hew interface oF 7140 cabculation_ volume tank cabculation_volume tank ee En oh DAO 77 gt heigqht_max filling lewel_ WDA tanki filing_lewel filling ewel oll De wolume tanki filling_lewel aperture tank aperture ENO T Deel wolume aperture _tankl aperture ENO ESIE E SCE Training Curriculum Page 29 of 30 To be used only at Educational and R amp D Facilities TIA Portal Module 040 020 Edition 03 2013 Unrestricted Siemens AG 2013 All Rights Reserved SCE_EN_040 020_R1209_Startup Programming in High Level Languages with S7 SCL and SIMATIC 87 300 SI E M E N S Industry Sector IA amp DT 6 Complete the values at the input parameter high_max and output parameter er as specified below Compile save and load the program to the controller e l Add other parameters gt Sal Save project _ I _ Ph TA Siemens scl_startup Project Edit View Insert i Options Tools Window Help Totally Integrated Automation 7 O H Save projet amp X 53 a x 94 a m Bi S A g Goonline amp Go offline A RA BE H PORTAL Devices Options i O
48. s amp networks X EJ devicename_station_001 HY Device configuration YECA Online amp diagnostics calculation _volume_tank z Program blocks B Add new block J Main 081 7 0 HMD40 filling level_ gt 38 Technology objects tanki 549778 3 gt External source files 9 m 10 0 bMD48 v Da PLC tags AMD44 volurme_tank1 Show all tags aperture_tank I Add new tag table Y pe eine 55 Default tag table 3 gt Ce PLC data types gt 100 X A Watch and force tables info G AA Diagnostics Fo Force table Alarm display Device information Connection information 55 Watch table_1 205 Program info EA PLC alarrns Z Text lists gt p Local modules gt 69 Common data a Dit et enthus ar lt i gt 4 Portal view 3 Main 081 ez Watch table_1 E Default tag t Y Connected to devicename_station_001 Comment busa jc J calculation_volurne s neiq E No devices with problems Onlin Tm Oper Device module Message Details 5 The values of the individual tags can be monitored in the SCL editor To do this switch Monitoring mode on gt ie YVA Siemens scl_startup Project Edit view Insert Online Options Tools Window Help Totally Integrated Automation 3 CO Eel Save projet B M 13 G x St Hs Te m Mea Oe TA a coot 5 Go offline A m e x of PORTAL Devices iOO ee er Be e Go Ce I Se J sel startup No trigger applied ma Ac
49. ust be The output parameter volume is noted in liter For this we use a conversion factor of 1000 noted in meters onfiquration diagnostic volume SOR aperture 4 3 14159 filling level i1000 gt Open syse J kij Ill Paste Sauesqr E Compile ad to online grar Downlo device EA PLC ala Go Text list g gt i Local r gt fee commen gt Em aera gt ir Language gt fab Online acces gt 8 SIMATIC Card ffline Compare 1 00 Shift Fs gt ah Sor Info yin meee Syntax Cross reference information P bent g rope mies l Assignment list Call structure pral a Cross references Compile Cross references 3 E TE TE ea EEEE 2 completed errors 0 warnings 0 Know how protection Description tation_001 S amp S Print Ctrl P E gt Print preview Eos Properties Alt Enter lt il BEA Ee lt lt m CSA lurne_ta ccessfully compiled compiling completed errors 0 warnings 0 The project scl_startup was saved succ The calculate_tankcontent FC140 function can then be moved into Network 1 of the Main OB1 block using a drag and drop operation The interface parameters of the calculate_tankcontent FC140 function have to be connected to the global PLC tags as shown here Don t forget to document the networks in the Main OB1 block gt Main OB1 gt Program blocks calcu
50. vailable SCE packages is provided under siemens com sce tp Advanced training Please get in touch with your regional SCE contact for information on regional Siemens SCE advanced training siemens com sce contact Additional information regarding SCE siemens com sce Information regarding usage This SCE training curriculum for the end to end automation solution Totally Integrated Automation TIA was prepared for the program Siemens Automation Cooperates with Education SCE specifically for educational purposes for public educational institutions and R amp D facilities Siemens AG does not make any guarantee regarding its contents This document may only be used for initial training on Siemens products systems That is it may be copied in whole or in part and handed out to participants for use within the context of their education Distribution and reproduction of this curriculums and disclosure of its contents are permitted within public education and further education institutions for educational purposes Any exceptions require written consent from the Siemens AG contact person Mr Roland Scheuerer roland scheuerer siemens com Offenders will be liable for damages All rights reserved including those relating to translation and in particular those rights created as a result of a patent being granted or utility model being registered Use for industry customers is expressly prohibited We do not consent to any commercial use of the tr
51. x S PORTAL Devices G Topology view afa Network view oO devieenamn oo 2s jaf E 5 10 W ad sel startup a Ade new device afa Devices amp networks gt i devicename_station_OO1 CPU 315F 2 PN gt Common data gt E Documentation settings gt D Languages amp resources gt Om Online access gt SP SIMATIC Card Reader ojezes arempiey E sysej g s100 auu E gt a A amp Properties gt i Ao General gt General a VO addresses Sauer E Input addresses b Interface modules Start address QB Interface rn e Ene lel Process image terrupt OB nurni Output addresses Start address w Details view add Process image v Information Device Technology objects External source files PLC tags PLC data types Watch and force tables Program info Text lists Local modules Order no ttl 4 Portal view Project scl_startup created SCE Training Curriculum Page 14 of 30 To be used only at Educational and R amp D Facilities TIA Portal Module 040 020 Edition 03 2013 Unrestricted Siemens AG 2013 All Rights Reserved SCE_EN_ 040 020 R1209_ Startup Programming in High Level Languages with S7 SCL and SIMATIC S7 300 SI E M E N S Industry Sector IA amp DT 7 We also select the Al8x12Bit signal module with 8 analog input and the PS307 2A power supply module and drag these to the respective slots 5 and 1 Hardware catalog Al gt Alg x 12Bit

Download Pdf Manuals

image

Related Search

Related Contents

P3PC-1942  Manuel d`utilisation  Transition Networks CFMFF1314-220 network media converter  NEC Software Utility Installation Guide  Iwill Slot 1 WS133 Motherboard  Editorial Système d`information : Maximiser le retour sur  communication and processing JiveX DICOM Viewer User Manual  使用上の情報  Mode d`emploi  安全データシート - ユシロ化学工業  

Copyright © All rights reserved.
Failed to retrieve file