Step 7 Basic v11 Sp2 Enus En-Us
Step 7 Basic v11 Sp2 Enus En-Us
1 2 3 4 5 6 7 8 9 10 11 12
SIMATIC
Migrating projects
First steps Introduction to the TIA Portal Editing projects Editing devices and networks Programming the PLC Visualizing processes (Basic) Using technology functions Using online and diagnostics functions
12/2011
Qualified Personnel
The product/system described in this documentation may be operated only by personnel qualified for the specific task in accordance with the relevant documentation, in particular its warning notices and safety instructions. Qualified personnel are those who, based on their training and experience, are capable of identifying risks and avoiding potential hazards when working with these products/systems.
Trademarks
All names identified by are registered trademarks of Siemens AG. The remaining trademarks in this publication may be trademarks whose use by third parties for their own purposes could violate the rights of the owner.
Disclaimer of Liability
We have reviewed the contents of this publication to ensure consistency with the hardware and software described. Since variance cannot be precluded entirely, we cannot guarantee full consistency. However, the information in this publication is reviewed regularly and any necessary corrections are included in subsequent editions.
Table of contents
1 System overview of STEP 7 and WinCC....................................................................................................23 1.1 1.2 1.3 2 2.1 2.1.1 2.1.2 2.1.3 2.2 2.2.1 2.2.2 2.2.2.1 2.2.2.2 2.2.2.3 2.2.2.4 2.2.2.5 2.2.2.6 2.2.2.7 2.2.2.8 2.2.3 2.2.3.1 2.2.3.2 2.2.3.3 2.2.3.4 2.2.4 2.2.4.1 2.3 2.3.1 2.3.2 2.3.3 2.3.4 2.3.4.1 2.3.4.2 2.3.4.3 2.3.4.4 2.3.4.5 2.3.4.6 2.3.4.7 2.3.5 2.3.6 2.3.6.1 2.3.6.2 Scaling of STEP 7 and WinCC....................................................................................................23 Options for STEP 7 Engineering System....................................................................................24 Options for WinCC Engineering and Runtime systems...............................................................24 General notes..............................................................................................................................27 General notes..............................................................................................................................27 Notes on the installation..............................................................................................................31 Use of communications processors.............................................................................................32 STEP 7 Basic..............................................................................................................................33 Notes on use...............................................................................................................................33 Editing devices and networks......................................................................................................34 General information on devices and networks............................................................................34 Use of modules on the S7-1200..................................................................................................35 Replacing the ET 200S pulse generator and positioning modules..............................................35 Setting flow control for CM 1241 (RS232)...................................................................................36 Removing and plugging Ethernet modules..................................................................................36 Notes on online and diagnostics..................................................................................................37 Compiling the hardware of a pulse generator..............................................................................37 Particular aspects at the CP 1242-7 - Telecontrol interface........................................................37 Programming a PLC....................................................................................................................38 General notes on PLC programming...........................................................................................38 SCL..............................................................................................................................................39 Instructions..................................................................................................................................39 Testing the user program............................................................................................................40 Technological functions...............................................................................................................41 Notes on technological functions.................................................................................................41 WinCC Readme...........................................................................................................................42 Security information.....................................................................................................................42 Notes on use...............................................................................................................................42 Migration......................................................................................................................................45 Engineering System....................................................................................................................46 Screens and Screen Objects.......................................................................................................46 Tags and connections.................................................................................................................50 Alarm system and alarm displays................................................................................................51 System functions.........................................................................................................................52 Recipes........................................................................................................................................52 User administration......................................................................................................................52 Communication............................................................................................................................52 Compiling and loading.................................................................................................................55 Runtime.......................................................................................................................................58 Notes on operation in Runtime....................................................................................................58 Notes on operation of panels in Runtime....................................................................................58
Readme......................................................................................................................................................27
Table of contents
2.3.7 2.3.7.1 3 3.1 3.1.1 3.1.2 3.1.2.1 3.1.3 3.1.3.1 3.1.3.2 3.2 3.3 3.4 3.5 3.6 3.7 3.8 3.9 3.10 3.10.1 3.10.2 3.10.3 4 4.1 4.2 4.2.1 4.2.2 4.2.3 4.3 4.4 4.5 4.6 4.6.1 4.6.1.1 4.6.1.2 4.6.1.3 4.6.1.4 4.6.2 4.6.2.1 4.6.2.2 4.6.2.3 4.6.2.4 4.6.2.5
HMI devices.................................................................................................................................59 Notes on HMI devices.................................................................................................................59 System requirements for installation...........................................................................................63 Notes on the system requirements..............................................................................................63 System requirements STEP 7 Basic...........................................................................................64 Software and hardware requirements STEP 7............................................................................64 System requirement for WinCC Basic.........................................................................................65 Software and hardware requirements.........................................................................................65 Licenses and Powerpacks...........................................................................................................68 Licenses......................................................................................................................................73 Installation log..............................................................................................................................74 Starting installation......................................................................................................................75 Installing Support Packages........................................................................................................77 Displaying the installed software.................................................................................................78 Modifying or updating installed products.....................................................................................79 Repairing installed products........................................................................................................81 Starting to uninstall......................................................................................................................82 Installing and uninstalling the migration tool................................................................................84 System requirements...................................................................................................................84 Installing the migration tool..........................................................................................................84 Uninstalling the migration tool.....................................................................................................85 Migrating projects........................................................................................................................87 Preparing projects with the migration tool...................................................................................88 Migrating projects with the migration tool....................................................................................88 Calling the migration tool.............................................................................................................90 Creating a migration file...............................................................................................................90 Migrating projects........................................................................................................................91 Displaying the history of the migration.........................................................................................92 Displaying the log file of the migration.........................................................................................92 Migrating WinCC flexible projects (Basic)...................................................................................93 Basics (WinCC flexible)...............................................................................................................93 Migration (WinCC flexible)...........................................................................................................93 Basics on migration (WinCC flexible)..........................................................................................94 Projects from Migrating WinCC flexible projects (WinCC flexible)..............................................96 Compiling and loading a migrated project (WinCC flexible)........................................................98 Migrating engineering data (WinCC flexible)..............................................................................99 Supported HMI devices (WinCC flexible)....................................................................................99 Object support during migration (WinCC flexible).....................................................................100 Changes of values of object properties by the migration (WinCC flexible)................................102 Migration tags (WinCC flexible).................................................................................................103 Migration of alarm classes and alarm groups (WinCC flexible).................................................104
Installation..................................................................................................................................................63
Migrating projects.......................................................................................................................................87
Table of contents
4.6.2.6 4.6.2.7 4.6.3 4.6.3.1 4.6.3.2 4.6.3.3 4.6.4 4.6.4.1 4.6.4.2 4.6.5 4.6.5.1 4.6.5.2 4.6.5.3 4.6.5.4 4.6.5.5 4.6.5.6 4.6.5.7 4.6.5.8 4.6.5.9 4.7 4.7.1 4.7.2 4.7.3 4.7.4 4.7.5 4.7.6 5 6 5.1 6.1 6.1.1 6.1.1.1 6.1.1.2 6.1.1.3 6.1.1.4 6.1.1.5 6.1.2 6.1.2.1 6.1.2.2 6.1.2.3 6.1.2.4 6.1.2.5 6.1.2.6 6.1.2.7 6.1.2.8 6.1.2.9 6.1.2.10 6.1.3 6.1.3.1 6.1.3.2
Migration of language-dependent contents (WinCC flexible)....................................................106 Migrating libraries (WinCC flexible)...........................................................................................109 Migrating runtime data (WinCC flexible)....................................................................................110 Migrating runtime data (WinCC flexible)....................................................................................110 Backing up recipe data and user administration (WinCC flexible).............................................110 Restoring recipe data and user administration (WinCC flexible)...............................................111 Migrating integrated projects (WinCC flexible)..........................................................................112 Migrating integrated projects (WinCC flexible)..........................................................................112 Migrating an integrated project (WinCC flexible).......................................................................113 Reference (WinCC flexible).......................................................................................................115 Migration of data types (WinCC flexible)...................................................................................115 Migrating data types of Allen-Bradley DF1 (WinCC flexible).....................................................117 Migrating data types of Allen-Bradley Ethernet IP (WinCC flexible)..........................................117 Migrating data types of Mitsubishi FX (WinCC flexible).............................................................118 Migrating data types of Modicon Modbus (WinCC flexible).......................................................118 Migrating data types of Modicon Modbus TCP/IP (WinCC flexible)..........................................119 Migrating data types of Omron Hostlink/Multilink (WinCC flexible)...........................................119 Migrating data types of SIMATIC S7 200 (WinCC flexible).......................................................120 Migrating data types of SIMATIC S7 300/400 (WinCC flexible)................................................120 Post-editing integrated projects.................................................................................................123 Migrating an integrated project..................................................................................................123 Post-editing integrated projects.................................................................................................125 Converting unspecified CPUs into specified CPUs...................................................................126 Creating an integrated HMI connection.....................................................................................128 Re-linking HMI tags...................................................................................................................130 Deleting an unspecified connection...........................................................................................131 Getting Started Documentation.................................................................................................133 User interface and operation.....................................................................................................135 Starting, setting and exiting the TIA Portal...............................................................................135 Starting and exiting the TIA Portal.............................................................................................135 Overview of the program settings..............................................................................................135 Overview of the script and text editor settings...........................................................................137 Overview of the print settings....................................................................................................138 Changing the settings................................................................................................................139 Layout of the user interface.......................................................................................................139 Views.........................................................................................................................................139 Portal view.................................................................................................................................139 Project view...............................................................................................................................141 Project navigation......................................................................................................................143 Work area..................................................................................................................................146 Inspector window.......................................................................................................................154 Task cards.................................................................................................................................156 Details view...............................................................................................................................158 Overview window.......................................................................................................................159 User interface layout..................................................................................................................162 Keyboard shortcuts....................................................................................................................166 Keyboard shortcuts for project editing.......................................................................................166 Keyboard shortcuts for windows................................................................................................167
Table of contents
6.1.3.3 6.1.3.4 6.1.3.5 6.1.3.6 6.1.4 6.1.4.1 6.1.4.2 6.2 6.2.1 6.2.2 6.2.3 6.2.4 6.2.5 6.2.6 6.2.7 6.2.8 7 7.1 7.2 7.2.1 7.2.2 7.2.3 7.2.4 7.2.5 7.2.6 7.2.7 7.2.7.1 7.2.7.2 7.2.7.3 7.2.7.4 7.2.7.5 7.2.7.6 7.2.7.7 7.3 7.3.1 7.3.1.1 7.3.1.2 7.3.2 7.3.2.1 7.3.3 7.3.3.1 7.3.3.2 7.3.4 7.3.4.1 7.3.4.2 7.3.4.3 7.3.4.4 7.3.4.5 7.3.4.6 7.3.4.7
Keyboard shortcuts in the project tree.......................................................................................167 Keyboard shortcuts in tables.....................................................................................................167 Keyboard shortcuts for text editing............................................................................................168 Using the on-screen keyboard...................................................................................................169 Special features specific to the operating system.....................................................................169 Influence of user rights..............................................................................................................169 Expanding user rights................................................................................................................170 Help on the information system.................................................................................................171 General remarks on the information system..............................................................................171 Opening the Help system..........................................................................................................174 Searching the Help system for keywords..................................................................................175 Full-text searches......................................................................................................................175 Using favorites...........................................................................................................................176 Printing help topics....................................................................................................................177 Disabling the automatic display of tooltip cascades..................................................................177 Safety Guidelines......................................................................................................................178 The basics of projects................................................................................................................181 Creating and managing projects................................................................................................182 Creating a new project...............................................................................................................182 Opening projects.......................................................................................................................182 Displaying properties of the project...........................................................................................183 Saving projects..........................................................................................................................184 Closing projects.........................................................................................................................185 Deleting projects........................................................................................................................185 Working with multi-language projects........................................................................................186 Project text basics.....................................................................................................................186 Select project languages...........................................................................................................187 Setting the editing language......................................................................................................188 Translating texts directly............................................................................................................188 Translating texts using reference texts......................................................................................189 Exporting and importing project texts........................................................................................190 Application examples for multilanguage projects......................................................................192 Editing project data....................................................................................................................193 Compiling and loading project data...........................................................................................193 Compiling project data...............................................................................................................193 Downloading project data..........................................................................................................195 Comparing project data.............................................................................................................200 Basics of project data comparison.............................................................................................200 Protecting project data...............................................................................................................201 Protection concept for project data............................................................................................201 Revoking access rights for devices...........................................................................................202 Printing project contents............................................................................................................202 Documentation settings.............................................................................................................202 Printout of project contents........................................................................................................203 Changing the print settings........................................................................................................204 Specifying the print layout.........................................................................................................205 Entering document information..................................................................................................206 Managing cover pages and frames...........................................................................................207 Designing cover pages and frames...........................................................................................210
Editing projects.........................................................................................................................................181
Table of contents
7.3.4.8 7.3.4.9 7.4 7.4.1 7.4.2 7.4.3 7.5 7.5.1 7.5.2 7.6 7.6.1 7.6.2 7.6.3 7.6.4 7.7 7.7.1 7.7.2 7.7.3 7.7.4 7.8 7.8.1 7.8.2 7.8.3 7.8.4 7.8.4.1 7.8.4.2 7.8.4.3 7.8.4.4 7.8.4.5 7.8.4.6 7.8.4.7 7.8.5 7.8.5.1 7.8.5.2 7.8.5.3 7.8.5.4 7.8.5.5 7.8.5.6 7.8.5.7 7.8.5.8 7.8.5.9 7.8.5.10 7.8.5.11 7.8.5.12 7.8.5.13 7.8.5.14 7.9 7.9.1 7.10
Displaying print preview.............................................................................................................216 Printing project data...................................................................................................................219 Undoing and redoing actions.....................................................................................................221 Basics of undoing and redoing actions......................................................................................221 Undoing an action......................................................................................................................223 Redoing an action......................................................................................................................224 Finding and replacing in projects...............................................................................................225 Information on the search function............................................................................................225 Search and replace...................................................................................................................225 Working with text lists................................................................................................................227 Text lists....................................................................................................................................227 Creating user-defined text lists..................................................................................................228 Editing user-defined text lists.....................................................................................................229 Editing system-defined text lists................................................................................................230 Using memory cards..................................................................................................................231 Basics about memory cards......................................................................................................231 Adding a user-defined card reader............................................................................................231 Accessing memory cards..........................................................................................................232 Displaying properties of memory cards.....................................................................................232 Using libraries............................................................................................................................233 Library basics............................................................................................................................233 "Libraries" task card...................................................................................................................235 Using the elements and parts view............................................................................................237 Working with the project library.................................................................................................238 Project library basics.................................................................................................................238 Creating folders in the project library.........................................................................................238 Adding elements to the project library.......................................................................................239 Using elements of the project library.........................................................................................241 Editing elements of a project library..........................................................................................243 Removing elements from the project library..............................................................................245 Filtering the view........................................................................................................................246 Working with global libraries......................................................................................................246 Global library basics..................................................................................................................246 Creating a new global library.....................................................................................................247 Opening a global library.............................................................................................................248 Displaying properties of global libraries.....................................................................................249 Saving a global library...............................................................................................................250 Closing a global library..............................................................................................................252 Deleting a global library.............................................................................................................252 Creating folders in the global libraries.......................................................................................253 Adding elements to a global library...........................................................................................254 Using elements of a global library.............................................................................................256 Editing elements of a global library............................................................................................259 Removing elements from a global library..................................................................................261 Using a supplied global library...................................................................................................262 Filtering the view........................................................................................................................263 Using cross-references..............................................................................................................264 Using cross-references..............................................................................................................264 Simulating devices.....................................................................................................................264
Table of contents
7.10.1 7.10.2 8 8.1 8.1.1 8.1.1.1 8.1.1.2 8.1.1.3 8.1.1.4 8.1.1.5 8.1.1.6 8.1.1.7 8.1.1.8 8.1.1.9 8.1.1.10 8.1.1.11 8.1.1.12 8.1.2 8.1.2.1 8.1.2.2 8.1.3 8.1.3.1 8.1.3.2 8.1.3.3 8.1.4 8.1.4.1 8.1.4.2 8.1.4.3 8.1.4.4 8.1.4.5 8.1.4.6 8.1.5 8.1.5.1 8.1.5.2 8.1.5.3 8.1.5.4 8.1.5.5 8.1.5.6 8.1.5.7 8.1.5.8 8.1.5.9 8.1.5.10 8.1.5.11 8.1.5.12 8.1.5.13 8.1.6 8.1.6.1 8.1.6.2 8.1.6.3 8.1.6.4 8.1.6.5
Simulation of devices.................................................................................................................264 Starting the simulation...............................................................................................................265 Configuring devices and networks.............................................................................................267 Hardware and network editor....................................................................................................267 Overview of hardware and network editor.................................................................................267 Network view.............................................................................................................................269 Device view...............................................................................................................................271 Topology view............................................................................................................................274 Printing hardware and network configurations..........................................................................276 Activating the page break preview for printout..........................................................................277 Changing the print options.........................................................................................................278 Inspector window ......................................................................................................................278 Hardware catalog .....................................................................................................................280 Information on hardware components.......................................................................................281 Enabling product support...........................................................................................................282 Keyboard action in the hardware and network editor................................................................283 Configuring devices...................................................................................................................284 Basics........................................................................................................................................284 Configuring individual devices...................................................................................................293 Configure networks....................................................................................................................307 Networking devices...................................................................................................................307 Communication via connections................................................................................................325 Displaying and configuring topology..........................................................................................376 Creating configurations..............................................................................................................391 Configurations for automation systems.....................................................................................391 Configurations for PROFIBUS DP.............................................................................................423 Configurations for PROFINET IO..............................................................................................445 Bus coupling with PN/PN coupler..............................................................................................473 Configurations using external tools...........................................................................................474 Loading a configuration.............................................................................................................476 System diagnostics with 'Report System Errors'.......................................................................478 Introduction to system diagnostics with 'Report System Errors'................................................478 Basics of system diagnostics.....................................................................................................479 Components supported.............................................................................................................480 Diagnostics blocks for reporting system errors..........................................................................480 Properties of the blocks.............................................................................................................481 Supported error OBs.................................................................................................................481 Overview of the status DBs.......................................................................................................483 Diagnostics status DB...............................................................................................................483 PROFINET IO DB......................................................................................................................487 PROFIBUS DP DB....................................................................................................................489 Displaying settings of system diagnostics.................................................................................491 Basic settings............................................................................................................................491 Advanced settings.....................................................................................................................494 Displaying alarms......................................................................................................................497 Overview of the alarm display...................................................................................................497 Archive view..............................................................................................................................498 Layout of the alarms in the archive view...................................................................................498 Receiving alarms.......................................................................................................................498 Export archive............................................................................................................................499
Table of contents
8.1.6.6 8.1.6.7 8.1.6.8 8.1.6.9 8.1.6.10 8.1.6.11 8.1.6.12 8.1.7 8.1.7.1 8.1.7.2 8.2 8.2.1 8.2.1.1 8.2.1.2 8.2.1.3 8.2.1.4 8.2.1.5 8.2.1.6 8.2.1.7 8.2.1.8 8.2.2 8.2.2.1 8.2.2.2 8.2.2.3 9 9.1 9.1.1 9.1.1.1 9.1.1.2 9.1.1.3 9.1.1.4 9.1.1.5 9.1.1.6 9.1.2 9.1.2.1 9.1.2.2 9.1.2.3 9.1.2.4 9.1.2.5 9.1.2.6 9.1.2.7 9.1.2.8 9.1.3 9.1.3.1 9.1.3.2 9.1.3.3 9.1.4 9.1.4.1 9.1.4.2 9.1.4.3 9.1.4.4
Clear archive.............................................................................................................................499 "Active alarms" view..................................................................................................................499 Layout of the alarms in the "Active alarms" view.......................................................................500 Status of the alarms...................................................................................................................500 Acknowledging alarms...............................................................................................................500 Ignoring alarms..........................................................................................................................501 Keyboard commands in the alarm display.................................................................................502 Additional information on configurations....................................................................................502 Functional description of S7-1200 CPUs...................................................................................502 Distributed I/O............................................................................................................................561 Device and network diagnostics................................................................................................590 Hardware diagnostics................................................................................................................590 Overview of hardware diagnostics.............................................................................................590 Showing non-editable and current values of configurable module properties...........................598 Showing the current values of dynamic modules properties.....................................................602 Checking a module for defects..................................................................................................605 Changing the properties of a module or the programming device / PC....................................610 Diagnostics in STOP mode.......................................................................................................618 Online accesses in the Online and Diagnostics view................................................................621 Checking PROFIBUS DP subnets for faults..............................................................................624 Connection diagnostics.............................................................................................................627 Overview of connection diagnostics..........................................................................................627 Displaying the connection status using icons............................................................................628 Detailed connection diagnostics................................................................................................629 Creating a user program............................................................................................................633 Programming basics..................................................................................................................633 Operating system and user program.........................................................................................633 Blocks in the user program........................................................................................................634 Block calls..................................................................................................................................641 Operands in instructions............................................................................................................654 Data types.................................................................................................................................677 Program flow control..................................................................................................................753 Declaring PLC tags....................................................................................................................758 Overview of PLC tag tables.......................................................................................................758 Structure of the PLC tag tables.................................................................................................759 Creating and managing PLC tag tables.....................................................................................760 Declaring PLC tags....................................................................................................................762 Declaring symbolic constants....................................................................................................768 Editing properties.......................................................................................................................770 Monitoring of PLC tags..............................................................................................................772 Editing PLC tag tables...............................................................................................................773 Creating and managing blocks..................................................................................................777 Creating blocks..........................................................................................................................777 Specifying block properties........................................................................................................786 Managing blocks........................................................................................................................792 Programming blocks..................................................................................................................796 Program editor...........................................................................................................................796 Programming code blocks.........................................................................................................807 Programming data blocks..........................................................................................................946 Programming PLC data types...................................................................................................967
Table of contents
9.1.4.5 9.1.5 9.1.5.1 9.1.5.2 9.1.5.3 9.1.5.4 9.1.5.5 9.1.6 9.1.6.1 9.1.6.2 9.1.7 9.1.7.1 9.1.7.2 9.1.7.3 9.1.7.4 9.1.7.5 9.1.7.6 9.1.7.7 9.2 9.2.1 9.2.2 9.2.2.1 9.2.2.2 9.2.2.3 9.2.2.4 9.2.2.5 9.2.2.6 9.2.2.7 9.2.2.8 9.2.2.9 9.2.2.10 9.2.3 9.2.3.1 9.2.3.2 9.2.3.3 9.2.3.4 9.2.3.5 9.2.3.6 9.2.3.7 9.2.4 9.2.4.1 9.2.4.2 9.2.4.3 9.2.4.4 9.2.4.5 9.2.4.6 9.2.4.7 9.2.5 9.2.5.1 9.2.5.2 9.2.5.3 9.2.5.4
Using external source files........................................................................................................977 Comparing project data.............................................................................................................981 Basics of comparing project data..............................................................................................981 Carrying out an online/offline comparison.................................................................................985 Carrying out offline/offline comparisons....................................................................................986 Using the comparison editor .....................................................................................................988 Performing detailed block comparisons.....................................................................................994 Compiling and downloading blocks.........................................................................................1000 Compiling blocks.....................................................................................................................1000 Downloading blocks.................................................................................................................1004 Protecting blocks.....................................................................................................................1013 Protecting blocks.....................................................................................................................1013 Setting up and removing block copy protection.......................................................................1015 Setting up block know-how protection.....................................................................................1016 Opening know-how protected blocks.......................................................................................1017 Printing know-how protected blocks........................................................................................1017 Changing a password..............................................................................................................1019 Removing block know-how protection.....................................................................................1019 Displaying program information...............................................................................................1020 Overview of available program information.............................................................................1020 Displaying an assignment list..................................................................................................1021 Introduction to the assignment list...........................................................................................1021 Layout of the assignment list...................................................................................................1022 Symbols in the assignment list................................................................................................1023 Displaying an assignment list..................................................................................................1024 Setting the view options for the assignment list.......................................................................1025 Filter options in the assignment list.........................................................................................1026 Defining filters for assignment list............................................................................................1026 Filtering an assignment list......................................................................................................1027 Defining retentive memory areas for bit memories..................................................................1028 Enabling the display of retentive bit memories........................................................................1029 Displaying the call structure.....................................................................................................1029 Introduction to the call structure..............................................................................................1029 Symbols in the call structure....................................................................................................1031 Layout of the call structure......................................................................................................1032 Displaying the call structure.....................................................................................................1033 Setting the view options for the call structure..........................................................................1033 Introducing the consistency check in the call structure...........................................................1034 Checking block consistency in the call structure.....................................................................1035 Displaying the dependency structure......................................................................................1035 Introduction to the dependency structure................................................................................1035 Layout of the dependency structure........................................................................................1037 Symbols in the dependency structure.....................................................................................1037 Displaying the dependency structure......................................................................................1038 Setting the view options for the dependency structure............................................................1039 Introducing the consistency check in the dependency structure.............................................1039 Checking block consistency in the dependency structure.......................................................1040 Displaying CPU resources.......................................................................................................1041 Introducing resources..............................................................................................................1041 Layout of the "Resources" tab.................................................................................................1043 Displaying resources...............................................................................................................1044 Selecting the maximum load memory available......................................................................1044
10
Table of contents
9.3 9.3.1 9.3.2 9.3.3 9.3.4 9.4 9.4.1 9.4.2 9.4.2.1 9.4.3 9.4.3.1 9.4.3.2 9.4.3.3 9.4.3.4 9.4.3.5 9.4.3.6 9.4.3.7 9.4.3.8 9.4.4 9.4.4.1 9.4.4.2 9.4.4.3 9.4.4.4 9.4.4.5 9.4.4.6 9.4.4.7 9.4.4.8 9.4.4.9 9.4.4.10 9.5 9.5.1 9.5.2 9.5.3 9.5.4 9.5.5 9.5.6 9.5.7 9.5.8 9.5.8.1 9.5.8.2 9.5.8.3 9.5.8.4 9.5.8.5 9.5.8.6 9.5.8.7 9.5.8.8 9.5.8.9 9.5.8.10 9.5.8.11 9.5.8.12 9.5.8.13
Displaying cross-references....................................................................................................1045 General information about cross references...........................................................................1045 Structure of the cross-reference list.........................................................................................1045 Displaying the cross-reference list...........................................................................................1047 Displaying cross-references in the Inspector window..............................................................1048 Testing the user program........................................................................................................1049 Basics of testing the user program..........................................................................................1049 Testing with program status....................................................................................................1050 Testing the program................................................................................................................1050 Testing with the watch table....................................................................................................1055 Introduction to testing with the watch table..............................................................................1055 Layout of the watch table.........................................................................................................1056 Basic mode and expanded mode in the watch table...............................................................1057 Icons in the watch table...........................................................................................................1057 Creating and editing watch tables...........................................................................................1059 Entering tags in the watch table..............................................................................................1061 Monitoring tags in the watch table...........................................................................................1066 Modifying tags in the watch table............................................................................................1070 Testing with the force table......................................................................................................1077 Introduction for testing with the force table..............................................................................1077 Safety precautions when forcing tags......................................................................................1078 Layout of the force table..........................................................................................................1079 Basic mode and expanded mode in the force table................................................................1080 Icons in the force table............................................................................................................1081 Open and edit force table........................................................................................................1082 Entering tags in the force table................................................................................................1083 Monitoring tags in the force table............................................................................................1088 Forcing tags in the force table.................................................................................................1091 Stop forcing tags......................................................................................................................1098 Configuring alarms..................................................................................................................1100 Introduction to alarm configuration..........................................................................................1100 Assigning alarm numbers........................................................................................................1100 Components of an alarm.........................................................................................................1101 Available alarm blocks.............................................................................................................1101 Alarm type and alarms.............................................................................................................1103 Formal parameters, alarm data types and alarm blocks.........................................................1104 Layout of the alarm editor........................................................................................................1105 Creating and editing alarms.....................................................................................................1106 Creating PLC alarms...............................................................................................................1106 Edit PLC alarms in the alarm editor.........................................................................................1107 Edit PLC alarms in the program editor....................................................................................1107 Deleting PLC alarms................................................................................................................1108 Creating and editing an alarm type..........................................................................................1108 Creating and editing an instance DB.......................................................................................1108 Creating user diagnostic messages........................................................................................1109 Editing user diagnostic alarms.................................................................................................1109 Deleting user diagnostic messages.........................................................................................1110 Entering texts...........................................................................................................................1110 Locking texts............................................................................................................................1111 Locking attributes....................................................................................................................1111 Insert associated values in alarms..........................................................................................1112
11
Table of contents
9.5.8.14 9.5.8.15 9.5.8.16 9.5.9 9.5.9.1 9.5.9.2 9.5.9.3 9.5.9.4 9.5.10 9.5.10.1 9.5.10.2 9.6 9.6.1 9.6.1.1 9.6.1.2 9.6.1.3 9.6.1.4 9.7 9.7.1 9.7.1.1 9.7.1.2 9.7.1.3 9.7.1.4 9.7.2 9.7.2.1 9.7.2.2 9.7.2.3 9.7.2.4 9.8 9.8.1 9.8.1.1 9.8.1.2 9.8.2 9.8.2.1 9.8.2.2 9.8.2.3 9.8.3 9.8.3.1 9.8.3.2 9.8.3.3 9.8.3.4 9.8.3.5 9.8.3.6 9.8.3.7 9.8.3.8 9.8.4 9.8.4.1 9.8.4.2 9.8.4.3 9.8.5 9.8.5.1
Structure of associated values................................................................................................1112 Examples of associated values...............................................................................................1113 Deleting associated values......................................................................................................1114 Text lists for alarms.................................................................................................................1114 Basics of alarm text lists..........................................................................................................1114 Editing text lists for alarms.......................................................................................................1115 Integrating texts from text lists in alarms.................................................................................1115 Example of integrating texts from text lists in alarms..............................................................1116 Alarm classes..........................................................................................................................1116 Creating alarm classes............................................................................................................1116 Editing alarm classes...............................................................................................................1117 Using global project functions..................................................................................................1118 Importing and exporting...........................................................................................................1118 Basics for importing and exporting..........................................................................................1118 Format of the export file...........................................................................................................1118 Exporting PLC tags..................................................................................................................1119 Importing PLC tags..................................................................................................................1120 Programming examples...........................................................................................................1121 LAD programming examples...................................................................................................1121 Example of controlling a conveyor belt ...................................................................................1121 Example of detecting the direction of a conveyor belt.............................................................1122 Example of detecting the fill level of a storage area ...............................................................1123 Example of controlling room temperature................................................................................1126 FBD programming examples...................................................................................................1128 Example of controlling a conveyor belt ...................................................................................1128 Example of detecting the direction of a conveyor belt.............................................................1130 Example of detecting the fill level of a storage area ...............................................................1131 Example of controlling room temperature................................................................................1134 References..............................................................................................................................1136 General parameters of the instructions...................................................................................1136 Meaning of the parameters REQ, RET_VAL and BUSY with asynchronous instructions.......1136 Evaluating errors with output parameter RET_VAL.................................................................1138 Simple instructions..................................................................................................................1142 LAD..........................................................................................................................................1142 FBD.........................................................................................................................................1298 SCL..........................................................................................................................................1460 Extended instructions..............................................................................................................1568 Date and time-of-day...............................................................................................................1568 String + Char...........................................................................................................................1578 Distributed I/O..........................................................................................................................1597 Interrupts.................................................................................................................................1625 Diagnostics..............................................................................................................................1641 Pulse........................................................................................................................................1650 Data logging............................................................................................................................1652 Data block functions................................................................................................................1661 Technology..............................................................................................................................1665 PID Control..............................................................................................................................1665 Motion Control.........................................................................................................................1709 High-speed counters...............................................................................................................1741 Communication........................................................................................................................1743 Communications processor.....................................................................................................1743
12
Table of contents
Visualizing processes (Basic).................................................................................................................1851 10.1 Creating screens.....................................................................................................................1851 10.1.1 Basics......................................................................................................................................1851 10.1.1.1 Screen basics .........................................................................................................................1851 10.1.1.2 Availability of screens for specific HMI devices.......................................................................1852 10.1.1.3 Basics......................................................................................................................................1854 10.1.1.4 Working with screens..............................................................................................................1857 10.1.1.5 Working with Templates..........................................................................................................1860 10.1.2 Working with objects................................................................................................................1865 10.1.2.1 Overview of objects.................................................................................................................1865 10.1.2.2 Options for Editing Objects......................................................................................................1868 10.1.2.3 Inserting an object...................................................................................................................1869 10.1.2.4 Deleting an Object ..................................................................................................................1871 10.1.2.5 Positioning an object...............................................................................................................1872 10.1.2.6 Resizing an object...................................................................................................................1873 10.1.2.7 Selecting multiple objects........................................................................................................1874 10.1.2.8 Aligning objects.......................................................................................................................1876 10.1.2.9 Moving an object forward or backward....................................................................................1878 10.1.2.10 Show objects outside the screen area...............................................................................1879 10.1.2.11 Rotating objects..................................................................................................................1880 10.1.2.12 Flipping objects..................................................................................................................1881 10.1.2.13 Designing an object............................................................................................................1882 10.1.2.14 Inserting multiple objects of the same type (stamping tool)...............................................1882 10.1.2.15 Repositioning and resizing multiple objects.......................................................................1884 10.1.2.16 External graphics................................................................................................................1884 10.1.2.17 Managing external graphics...............................................................................................1885 10.1.2.18 Storing an external image in the graphics library...............................................................1887 10.1.2.19 Working with object groups................................................................................................1889 10.1.2.20 Configuring the keyboard access.......................................................................................1895 10.1.2.21 Examples............................................................................................................................1898 10.1.3 Working with text lists and graphics lists.................................................................................1901 10.1.3.1 Working with text lists..............................................................................................................1901 10.1.3.2 Working with graphics lists......................................................................................................1908 10.1.4 Dynamizing screens................................................................................................................1916 10.1.4.1 Basics on dynamization...........................................................................................................1916 10.1.4.2 Dynamization in the inspector window....................................................................................1916 10.1.4.3 Dynamization with animations.................................................................................................1918 10.1.4.4 Dynamize with system functions.............................................................................................1927 10.1.5 Working with function keys......................................................................................................1929 10.1.5.1 Working with function keys .....................................................................................................1929 10.1.5.2 Assigning function keys globally..............................................................................................1931 10.1.5.3 Local assignment of function keys...........................................................................................1933 10.1.5.4 Assigning a function key to a function.....................................................................................1934 10.1.5.5 Assigning operator authorization for a function key.................................................................1935 10.1.5.6 Assigning a function key to a graphic......................................................................................1937 10.1.5.7 Example: Using function keys for screen navigation...............................................................1939 10.1.6 Working with layers.................................................................................................................1941
13
Table of contents
10.1.6.1 Basics on working with layers..................................................................................................1941 10.1.6.2 Moving objects between layers...............................................................................................1942 10.1.6.3 Setting the active layer............................................................................................................1942 10.1.6.4 Show and hide layers..............................................................................................................1943 10.1.6.5 Renaming layers......................................................................................................................1945 10.1.7 Working with libraries..............................................................................................................1946 10.1.7.1 Basics on libraries...................................................................................................................1946 10.1.7.2 Copy templates and types.......................................................................................................1947 10.1.7.3 Libraries in WinCC...................................................................................................................1948 10.1.7.4 Displaying library objects.........................................................................................................1950 10.1.7.5 Managing library objects..........................................................................................................1953 10.1.7.6 Storing an object in a library....................................................................................................1954 10.1.7.7 Inserting a library object..........................................................................................................1955 10.1.7.8 Creating a global library...........................................................................................................1955 10.1.7.9 Saving a global library.............................................................................................................1956 10.1.7.10 Opening a global library.....................................................................................................1957 10.1.8 Display and operating objects.................................................................................................1958 10.1.8.1 Device-Specific Nature of the Objects.....................................................................................1958 10.1.8.2 Objects....................................................................................................................................1959 10.1.9 Configuring screen navigation.................................................................................................1986 10.1.9.1 Basics for screen navigation....................................................................................................1986 10.1.9.2 Assign button with screen change...........................................................................................1987 10.1.9.3 Assign screen change to function key.....................................................................................1988 10.2 10.2.1 10.2.1.1 10.2.1.2 10.2.1.3 10.2.1.4 10.2.1.5 10.2.2 10.2.2.1 10.2.2.2 10.2.2.3 10.2.3 10.2.3.1 10.2.3.2 10.2.3.3 10.2.4 10.2.4.1 10.2.5 10.2.5.1 10.2.5.2 10.3 10.3.1 10.3.1.1 10.3.1.2 10.3.1.3 10.3.1.4 10.3.1.5 10.3.1.6 Working with Tags...................................................................................................................1989 Basics......................................................................................................................................1989 Basics of tags..........................................................................................................................1989 Overview of HMI tag tables.....................................................................................................1990 External tags............................................................................................................................1991 Addressing external tags.........................................................................................................1992 Internal tags.............................................................................................................................1994 Working with tags....................................................................................................................1995 Creating tags...........................................................................................................................1995 Editing tags..............................................................................................................................2000 Configuring tags......................................................................................................................2005 Working with arrays.................................................................................................................2022 Basics on arrays......................................................................................................................2022 Creating array tags..................................................................................................................2024 Examples of arrays..................................................................................................................2025 Working with cycles.................................................................................................................2025 Cycle basics............................................................................................................................2025 Displaying tags........................................................................................................................2026 Outputting tag values in screens.............................................................................................2026 Configuring trend displays for values from the PLC................................................................2027 Working with alarms................................................................................................................2028 Basics......................................................................................................................................2028 Alarm system in WinCC...........................................................................................................2028 Alarm types..............................................................................................................................2029 Alarm states ............................................................................................................................2031 Alarm classes..........................................................................................................................2033 Acknowledgment.....................................................................................................................2034 Alarm groups...........................................................................................................................2036
14
Table of contents
10.3.1.7 10.3.2 10.3.2.1 10.3.2.2 10.3.2.3 10.3.2.4 10.3.3 10.3.3.1 10.3.3.2 10.3.3.3 10.3.3.4 10.3.4 10.3.4.1 10.3.4.2 10.4 10.4.1 10.4.1.1 10.4.1.2 10.4.1.3 10.4.1.4 10.4.1.5 10.4.1.6 10.4.2 10.4.2.1 10.4.3 10.4.3.1 10.4.3.2 10.4.4 10.4.4.1 10.4.4.2 10.4.4.3 10.4.5 10.4.5.1 10.4.6 10.4.6.1 10.5 10.5.1 10.5.2 10.5.3 10.5.3.1 10.5.3.2 10.5.3.3 10.5.3.4 10.5.3.5 10.5.4 10.5.4.1 10.5.4.2 10.5.4.3 10.5.4.4 10.5.5 10.5.5.1
Alarm number..........................................................................................................................2037 Working with alarms................................................................................................................2037 Alarm components and properties...........................................................................................2037 Configuring alarms..................................................................................................................2039 Configuring alarm output.........................................................................................................2051 Acknowledging alarms.............................................................................................................2058 Operating alarms in Runtime...................................................................................................2061 Alarms in Runtime...................................................................................................................2061 Simple alarm view, simple alarm window in runtime ..............................................................2063 Alarm indicator in Runtime......................................................................................................2064 Acknowledging alarms.............................................................................................................2065 Reference................................................................................................................................2066 System functions for alarms....................................................................................................2066 System events.........................................................................................................................2066 Working with recipes...............................................................................................................2088 Basics......................................................................................................................................2088 Definition and applications.......................................................................................................2088 Examples for using recipes.....................................................................................................2090 Structure of recipes.................................................................................................................2090 Displaying recipes...................................................................................................................2091 Flow of data for recipes...........................................................................................................2092 Synchronization of recipe data records with the PLC..............................................................2093 Elements and basic settings....................................................................................................2094 "Recipes" editor.......................................................................................................................2094 Displaying and editing recipes in Runtime...............................................................................2097 Simple recipe view...................................................................................................................2097 Behavior of the recipe view in Runtime...................................................................................2098 Configuring recipes..................................................................................................................2099 General configuration procedure ............................................................................................2099 Creating and Editing Recipes..................................................................................................2100 Configuring the display of recipes...........................................................................................2108 Using recipes in Runtime.........................................................................................................2111 Using the simple recipe view...................................................................................................2111 Example...................................................................................................................................2117 Example of creating a recipe...................................................................................................2117 Configuring user administration...............................................................................................2119 Field of application of the user administration.........................................................................2119 Form of the user administration...............................................................................................2119 Basics......................................................................................................................................2120 Users.......................................................................................................................................2120 Users work area......................................................................................................................2121 User groups.............................................................................................................................2122 User groups work area............................................................................................................2122 Settings for the user administration.........................................................................................2123 Setting up the user administration...........................................................................................2125 Basics on user administration..................................................................................................2125 Administering users for Runtime.............................................................................................2126 Managing users in Runtime.....................................................................................................2133 Configuring access protection.................................................................................................2140 Reference................................................................................................................................2141 Objects with access protection................................................................................................2141
15
Table of contents
10.5.5.2 10.5.6 10.5.6.1 10.5.6.2 10.5.6.3 10.6 10.6.1 10.6.1.1 10.6.1.2 10.6.2 10.6.2.1 10.6.2.2 10.6.2.3 10.6.2.4 10.6.2.5 10.6.3 10.6.3.1 10.6.4 10.6.4.1 10.6.4.2 10.7 10.7.1 10.7.2 10.7.3 10.7.3.1 10.7.3.2 10.7.3.3 10.7.3.4 10.7.4 10.7.4.1 10.8 10.8.1 10.8.1.1 10.8.1.2 10.8.1.3 10.8.1.4 10.8.1.5 10.8.2 10.8.2.1 10.8.2.2 10.8.3 10.8.3.1 10.8.3.2 10.8.4 10.8.4.1 10.8.5 10.8.5.1 10.8.5.2 10.8.5.3 10.8.5.4 10.8.5.5
Default user groups and authorizations...................................................................................2141 Examples.................................................................................................................................2142 Example: Configuring a button with logon dialog box.............................................................2142 Example: Logging the logon and logoff events.......................................................................2143 Example of user management.................................................................................................2144 Working with system functions................................................................................................2151 Basics......................................................................................................................................2151 System functions.....................................................................................................................2151 Use of system functions .........................................................................................................2153 Working with function lists.......................................................................................................2153 Basic of the functions list.........................................................................................................2153 Properties of a function list......................................................................................................2154 Configuring a function list........................................................................................................2155 Editing a function list................................................................................................................2157 Executing a function list in Runtime ........................................................................................2158 Example...................................................................................................................................2158 Changing the operating mode on the HMI device with the current display.............................2158 Reference................................................................................................................................2161 Function list.............................................................................................................................2161 Events......................................................................................................................................2219 Planning tasks.........................................................................................................................2234 Field of application of the Scheduler.......................................................................................2234 Working with tasks and triggers...............................................................................................2236 Basics......................................................................................................................................2237 Work area of the "Scheduler" editor........................................................................................2237 Function list.............................................................................................................................2238 Triggers...................................................................................................................................2238 Planning tasks with event triggers...........................................................................................2239 Examples.................................................................................................................................2241 Example: Update user following change of user.....................................................................2241 Communicating with PLCs......................................................................................................2243 Basics of communication.........................................................................................................2243 Communication between devices............................................................................................2243 Devices and networks in the automation system....................................................................2244 Data exchange using tags.......................................................................................................2249 Data exchange using area pointers.........................................................................................2250 Communication drivers............................................................................................................2250 Networks and connections......................................................................................................2251 SIMATIC communication networks.........................................................................................2251 Configuring networks and connections....................................................................................2255 Data exchange........................................................................................................................2263 Data exchange using tags.......................................................................................................2263 Data exchange using area pointers.........................................................................................2269 Device dependency.................................................................................................................2275 Basic Panel..............................................................................................................................2275 Communicating with SIMATIC S7 1200..................................................................................2279 Communication with SIMATIC S7 1200..................................................................................2279 Communication via PROFINET...............................................................................................2280 Communication via PROFIBUS...............................................................................................2292 Data exchange .......................................................................................................................2300 Performance features of communication.................................................................................2318
16
Table of contents
10.8.5.6 10.8.6 10.8.6.1 10.8.6.2 10.8.6.3 10.8.6.4 10.8.6.5 10.8.6.6 10.8.6.7 10.8.7 10.8.7.1 10.8.7.2 10.8.7.3 10.8.7.4 10.8.7.5 10.8.8 10.8.8.1 10.8.8.2 10.8.8.3 10.8.8.4 10.9 10.9.1 10.9.2 10.9.2.1 10.9.2.2 10.9.2.3 10.9.2.4 10.9.2.5 10.9.2.6 10.9.3 10.9.3.1 10.9.3.2 10.9.3.3 10.9.3.4 10.9.4 10.9.4.1 10.9.4.2 10.9.4.3 10.9.4.4 10.9.4.5 10.9.4.6 10.9.4.7 10.9.4.8 10.9.5 10.9.5.1 10.9.5.2 10.9.5.3 10.9.6 10.9.6.1 10.9.6.2 10.10
Creating connections in the "Connections" editor...................................................................2320 Communicating with SIMATIC S7 300/400.............................................................................2328 Communication with SIMATIC S7 300/400.............................................................................2328 Communication via PROFINET...............................................................................................2329 Communication via PROFIBUS...............................................................................................2342 Communication via MPI...........................................................................................................2350 Data exchange........................................................................................................................2357 Performance features of communication.................................................................................2374 Creating connections in the "Connections" editor...................................................................2375 Communicating with SIMATIC S7 200....................................................................................2387 Communication with SIMATIC S7 200....................................................................................2387 Creating a connection to SIMATIC S7 200..............................................................................2387 Parameters for the connection................................................................................................2389 Data exchange .......................................................................................................................2396 Performance features of communication.................................................................................2413 Communication with other PLCs.............................................................................................2414 Communication with other PLCs.............................................................................................2414 Distinctive features when configuring......................................................................................2415 Communication drivers............................................................................................................2415 Data exchange using area pointers.........................................................................................2521 Using global functions.............................................................................................................2535 HMI device wizard basics........................................................................................................2535 Importing and exporting project data.......................................................................................2536 Importing and exporting project data.......................................................................................2536 Importing and exporting recipes..............................................................................................2538 Importing and exporting alarms...............................................................................................2541 Importing and exporting tags...................................................................................................2549 Importing and exporting text lists.............................................................................................2554 Importing and exporting project texts......................................................................................2559 Using cross-references............................................................................................................2562 General information about cross references...........................................................................2562 Displaying the cross-reference list...........................................................................................2562 Structure of the cross-reference list.........................................................................................2563 Displaying cross-references in the Inspector window..............................................................2564 Managing languages...............................................................................................................2566 Languages in WinCC...............................................................................................................2566 Language settings in the operating system.............................................................................2567 Operating system settings for Asian languages......................................................................2568 Setting project languages........................................................................................................2569 Creating one project in multiple languages.............................................................................2572 Using language-specific graphics............................................................................................2580 Languages in runtime..............................................................................................................2584 Example of multilingual configuration......................................................................................2591 Replacing devices...................................................................................................................2594 Basics......................................................................................................................................2594 Device-specific functions.........................................................................................................2595 Adjusting screens to the new device.......................................................................................2598 Copying between devices and editors.....................................................................................2602 Basics......................................................................................................................................2602 Copying and pasting................................................................................................................2604 Compiling and loading.............................................................................................................2608
17
Table of contents
10.10.1 Compiling and loading projects...............................................................................................2608 10.10.1.1 Overview of compiling and loading projects.......................................................................2608 10.10.1.2 Compiling a project.............................................................................................................2609 10.10.1.3 Loading projects.................................................................................................................2610 10.10.1.4 Runtime start......................................................................................................................2613 10.10.2 Simulating projects..................................................................................................................2614 10.10.2.1 Simulation basics...............................................................................................................2614 10.10.2.2 Simulating a project............................................................................................................2616 10.10.2.3 Working with the tag simulator...........................................................................................2618 10.10.3 Servicing the HMI device.........................................................................................................2620 10.10.3.1 ProSave..............................................................................................................................2620 10.10.3.2 Backup of HMI data............................................................................................................2620 10.10.3.3 Backing up and restoring data of the HMI device...............................................................2621 10.10.3.4 Updating the operating system...........................................................................................2622 10.10.3.5 Updating the HMI device operating system........................................................................2623 10.10.4 Reference................................................................................................................................2625 10.10.4.1 Error messages during loading of projects.........................................................................2625 10.10.4.2 Adapting the project for another HMI device......................................................................2626 10.10.4.3 Establishing a connection to the HMI device......................................................................2628 10.11 Operating in Runtime...............................................................................................................2629 10.11.1 Basics......................................................................................................................................2629 10.11.1.1 Overview............................................................................................................................2629 10.11.1.2 Tags in Runtime.................................................................................................................2630 10.11.1.3 System functions in Runtime..............................................................................................2630 10.11.2 Commissioning projects..........................................................................................................2631 10.11.2.1 Settings in the Runtime software .......................................................................................2631 10.11.2.2 Loading projects.................................................................................................................2632 10.11.2.3 Starting Runtime on the Engineering Station.....................................................................2633 10.11.2.4 Starting Runtime on the HMI device...................................................................................2634 10.11.2.5 Testing a project.................................................................................................................2634 10.11.2.6 Closing a project.................................................................................................................2635 10.11.2.7 Backing up and restoring data of the HMI device...............................................................2636 10.11.3 Languages in runtime..............................................................................................................2637 10.11.3.1 Languages in runtime.........................................................................................................2637 10.11.3.2 Setting a runtime language................................................................................................2637 10.11.3.3 Setting the font for a runtime language..............................................................................2638 10.11.3.4 Configuring language switching.........................................................................................2639 10.11.3.5 Specific features of Asian and Eastern languages in runtime............................................2640 10.11.4 Operating projects...................................................................................................................2641 10.11.4.1 Basics.................................................................................................................................2641 10.11.4.2 Operating objects...............................................................................................................2648 10.11.4.3 Project security...................................................................................................................2661 10.11.4.4 Operating alarms................................................................................................................2668 10.11.4.5 Operating recipes...............................................................................................................2675 10.12 Performance features..............................................................................................................2685 10.12.1 Engineering system.................................................................................................................2685 10.12.2 Basic Panel..............................................................................................................................2687 10.12.3 General technical data.............................................................................................................2691 10.12.3.1 Recommended printers......................................................................................................2691 10.12.3.2 Memory requirements of recipes for Basic Panels.............................................................2691 10.13 Migration to WinCC V11..........................................................................................................2692
18
Table of contents
10.13.1 Overview of migration to WinCC V11......................................................................................2692 10.13.2 Libraries...................................................................................................................................2693 10.13.3 Screens and templates............................................................................................................2695 11 Using technology functions.....................................................................................................................2697 11.1 11.1.1 11.1.1.1 11.1.1.2 11.1.1.3 11.1.1.4 11.1.1.5 11.1.1.6 11.1.1.7 11.1.1.8 11.1.2 11.1.2.1 11.1.2.2 11.1.2.3 11.1.2.4 11.1.2.5 11.1.2.6 11.1.2.7 11.1.2.8 11.1.3 11.1.3.1 11.1.3.2 PID control...............................................................................................................................2697 Principles for control................................................................................................................2697 Controlled system and actuators.............................................................................................2697 Controlled systems..................................................................................................................2698 Characteristic values of the control section.............................................................................2700 Pulse controller........................................................................................................................2702 Response to setpoint changes and disturbances....................................................................2706 Control Response at Different Feedback Structures...............................................................2707 Selection of the controller structure for specified controlled systems......................................2715 PID parameter settings............................................................................................................2716 Configuring a software controller.............................................................................................2716 Steps for the configuration of a software controller.................................................................2716 Add technology objects...........................................................................................................2717 Configure technology objects..................................................................................................2718 Call instruction in the user program.........................................................................................2719 Commissioning software controller..........................................................................................2720 Loading to CPU.......................................................................................................................2721 Save optimized PID parameter in the project..........................................................................2721 Display instance DB of a technology object............................................................................2722 PID control...............................................................................................................................2722 Using PID_Compact................................................................................................................2722 Using PID_3Step.....................................................................................................................2741
11.2 Motion Control.........................................................................................................................2761 11.2.1 Using S7-1200 Motion Control................................................................................................2761 11.2.1.1 Introduction..............................................................................................................................2761 11.2.1.2 Basics for working with S7-1200 Motion Control.....................................................................2764 11.2.1.3 Guidelines on use of motion control........................................................................................2771 11.2.1.4 Overview of versions...............................................................................................................2771 11.2.1.5 Techology object axis..............................................................................................................2774 11.2.1.6 Technology object command table..........................................................................................2802 11.2.1.7 Download to CPU....................................................................................................................2819 11.2.1.8 Commissioning the axis - Axis control panel...........................................................................2821 11.2.1.9 Programming...........................................................................................................................2823 11.2.1.10 Axis - Diagnostics...............................................................................................................2839 11.2.1.11 Working with watch tables..................................................................................................2842 11.2.1.12 Appendix............................................................................................................................2843 12 Using online and diagnostics functions..................................................................................................2891 12.1 12.2 12.3 12.4 12.5 12.6 General information about online mode..................................................................................2891 View in online mode................................................................................................................2893 Online access..........................................................................................................................2894 Displaying accessible devices.................................................................................................2896 Opening the properties of an interface....................................................................................2898 Establishing and canceling an online connection....................................................................2898
19
Table of contents
12.7 12.8 12.9 12.10 12.10.1 12.10.2 12.10.3 12.10.4 12.10.5 12.10.6 12.10.7 12.11 12.11.1 12.11.2 12.11.3 12.11.4 12.11.5 12.11.6
Connecting online with several devices...................................................................................2900 Basics of assigning parameters for the PG/PC interface........................................................2901 Adding interfaces.....................................................................................................................2901 Setting parameters for the Ethernet interface..........................................................................2902 Setting parameters for the Industrial Ethernet interface..........................................................2902 Displaying operating system parameters................................................................................2903 Connecting the PG/PC interface to a subnet...........................................................................2904 Setting parameters for the Ethernet interface..........................................................................2904 Assigning a temporary IP address...........................................................................................2905 Managing temporary IP addresses..........................................................................................2905 Resetting the TCP/IP configuration.........................................................................................2906 Setting parameters for the MPI and PROFIBUS interfaces.....................................................2907 Setting parameters for the MPI and PROFIBUS interfaces.....................................................2907 Setting MPI or PROFIBUS interface parameters automatically..............................................2908 Setting parameters for the MPI interface.................................................................................2908 Setting parameters for the PROFIBUS interface.....................................................................2910 Overview of the bus parameters for PROFIBUS.....................................................................2913 Resetting the MPI or PROFIBUS configuration.......................................................................2914
12.12 Establishing a remote connection with TeleService................................................................2915 12.12.1 Basics of working with TeleService.........................................................................................2915 12.12.1.1 Introduction to TeleService.................................................................................................2915 12.12.1.2 TeleService functionality....................................................................................................2916 12.12.1.3 Telephone book at TeleService..........................................................................................2916 12.12.2 Telephone networks and modems..........................................................................................2917 12.12.2.1 Supported telephone networks and modems.....................................................................2917 12.12.2.2 Installing the local modem..................................................................................................2918 12.12.2.3 Connecting and configuring the remote modem................................................................2919 12.12.2.4 Initialization string requirements.........................................................................................2920 12.12.3 Using a TS adapter to establish a remote connection.............................................................2920 12.12.3.1 Basics of using a TS adapter.............................................................................................2920 12.12.3.2 Installing TS adapter software............................................................................................2922 12.12.3.3 TS adapter MPI..................................................................................................................2922 12.12.3.4 TS adapter IE.....................................................................................................................2929 12.12.4 Access protection for TeleService and the TS Adapter...........................................................2934 12.12.4.1 Access protection information............................................................................................2934 12.12.4.2 TeleService callback options..............................................................................................2935 12.12.4.3 Levels of protection............................................................................................................2935 12.12.4.4 Setting up access protection and callback number for the TS adapter..............................2936 12.12.4.5 Complete a callback in TeleService...................................................................................2937 12.12.5 Establishing a remote connection to a remote plant................................................................2939 12.12.5.1 Establishing a remote connection......................................................................................2939 12.12.5.2 Terminating a remote connection.......................................................................................2940 12.12.5.3 Checklist for troubleshooting the modem...........................................................................2940 12.12.6 Working with the phone book..................................................................................................2941 12.12.6.1 Basics on working with the phone book.............................................................................2941 12.12.6.2 Structure of the phone book...............................................................................................2942 12.12.6.3 Symbols in the phone book................................................................................................2943 12.12.6.4 Manage phone book...........................................................................................................2943 12.12.7 CPU controlled TeleService remote connections ...................................................................2945
20
Table of contents
12.12.7.1 Overview of CPU controlled remote connections...............................................................2945 12.12.7.2 Establishing a connection from and to remote systens (PG-AS-remote coupling).............2946 12.12.7.3 Data exchange between remote systems (AS-AS-remote coupling).................................2948 12.12.7.4 Send SMS from a system...................................................................................................2950 12.12.7.5 Send an email from a system.............................................................................................2951 12.12.8 Troubleshooting.......................................................................................................................2953 12.12.8.1 General information on troubleshooting.............................................................................2953 12.12.8.2 Recording a log file for the modem....................................................................................2953 12.12.8.3 Remote connection to the TS adapter is not established...................................................2954 12.12.8.4 Remote connection from the TS adapter is not established...............................................2955 12.12.8.5 Modem connection is interrupted.......................................................................................2956 12.12.8.6 Modem alarms....................................................................................................................2957 Index.......................................................................................................................................................2959
21
STEP 7
STEP 7 (TIA Portal) is the engineering software for configuring the SIMATIC S7-1200, S7-300/400, and WinAC controller families. STEP 7 (TIA Portal) is available in 2 editions, depending on the configurable controller families: STEP 7 Basic for configuring the S7-1200 STEP 7 Professional for configuring S7-1200, S7-300/400, and WinAC
23
System overview of STEP 7 and WinCC 1.3 Options for WinCC Engineering and Runtime systems
WinCC
WinCC (TIA Portal) is an engineering software for configuring SIMATIC Panels, SIMATIC Industrial PCs, and Standard PCs with the WinCC Runtime Advanced or the SCADA System WinCC Runtime Professional visualization software. WinCC (TIA Portal) is available in 4 editions, depending on the configurable operator control systems: WinCC Basic for configuring Basic Panels WinCC Basic is included with every STEP 7 Basic and STEP 7 Professional product. WinCC Comfort for configuring all panels (including Comfort Panels, Mobile Panels) WinCC Advanced for configuring all panels and PCs with the WinCC Runtime Advanced visualization software WinCC Runtime Advanced is a visualization software for PC-based single-station systems. WinCC Runtime Advanced can be purchased with licenses for 128, 512, 2k, 4k as well as 8k PowerTags (tags with a process interface). WinCC Professional for configuring panels and PCs with WinCC Runtime Advanced or SCADA System WinCC Runtime Professional WinCC Runtime Professional is a SCADA system for structuring a configuration ranging from single-station systems to multi-station systems including standard clients or web clients. WinCC Runtime Professional can be purchased with licenses for 128, 512, 2k, 4k, 8k, 64k, 102400, 153600 as well as 262144 PowerTags (tags with a process interface). With WinCC (TIA Portal), it is also possible to configure a SINUMERIK PC with WinCC Runtime Advanced or WinCC Runtime Professional and HMI devices with SINUMERIK HMI Pro sl RT or SINUMERIK Operate WinCC RT Basic.
1.2
1.3
24
System overview of STEP 7 and WinCC 1.3 Options for WinCC Engineering and Runtime systems
25
Readme
2.1
2.1.1
2
The information in this readme file supersedes statements made in other documents. Read the following notes carefully because they include important information for installation and use. Read these notes prior to installation.
General notes
General notes
Security settings
In order to operate the software packages in the TIA Portal, port 4410 for TCP must be entered as an exception in the Windows firewall during installation.
Notes on handling
If a project in the list of projects last used is located on a network drive that is not connected, you may experience delays when opening the "Project" menu. When you insert a CPU, you may need to wait for some time if the project editor is open at the same time. This generally takes longer when you insert the first CPU in a newly created project. To be able to continue working more quickly, you should close the project editor before inserting a CPU. The message "Application is not responding" may appear in Windows 7 with functions that take a long time to run (loading the CPU for example). If this occurs, wait until the function has correctly finished. If you have installed a Microsoft mouse with IntelliPoint, you may find that it superimposes components over the buttons of the title bar. If this is the case, uninstall the IntelliPoint software from Microsoft. Enabling the "Virtual Desktop" options with NVIDIA graphics cards can cause problems. In this case, disable the "nView virtual desktop manager" of your NVIDIA graphics driver.
27
Note on SD cards
The SD cards have been formatted and initialized by Siemens for use with S7-1200 modules. This format must not be overwritten otherwise the card will no longer be accepted by the S7-1200 modules. Formatting with Windows tools is therefore not permitted.
28
29
Screen display
After long periods of work, it can happen in the case of certain computer configurations with Windows XP that parts of the TIA Portal interface are no longer updated. Reducing the graphic hardware acceleration can correct this problem. You can find the setting for this by clicking on the desktop and selecting "Properties > Settings > Advanced > Troubleshoot > Slider Hardware acceleration" by means of the right mouse button. In this dialog, move the slider "Hardware acceleration" gradually to the left and apply this setting until the contents of the screen are displayed correctly again.
Tablet PCs
For the TIA Portal V11, tablet PCs are only released with the operating system Windows 7, not with Windows XP.
SQL Server
During the installation of the SQL Server 2005 or the SQL Server 2005 Express, an error can occur if the product SQL Server 2008 is already installed on your system. In order to be able to use both varieties of the SQL Server in parallel, the SQL Server 2005 must be installed before the SQL Server 2008. To do this, follow these steps: 1. Remove the SQL Server 2008 version, without deleting the databases. 2. Install WinCC. The SQL Server 2005 is hereby installed and set up on your system. 3. Install the SQL Server 2008 again. Now you can continue to use the databases already created in the SQL Server 2008.
30
2.1.2
Contents
Installation of STEP 7 Basic V11 and STEP 7 Professional V11 under Windows XP with Turkish Regional and Language Options
Installation of STEP 7 Basic V11 and STEP 7 Professional V11 under Windows XP may be cancelled, if the regional and language options are set to Turkish. In this case change the regional and language options from Turkish to English or German. 1. Open the Control Panel under Windows with one of the following commands: "Start > Control Panel" (Start menu under Windows XP) "Start > Settings > Control Panel" (classic start menu) 2. Open the "Regional and Language Options". 3. Select the "Regional Options" tab. 4. Under "Standards and formats" select "German" or "English" in the drop-down list. 5. Click "Apply" and confirm with OK. 6. Restart your PC for the setting to become active. Now you can continue with the installation of STEP 7 Basic V11 and STEP 7 Professional V11. 7. After installation, you can revert the regional and language settings (as described in steps 1 to 4) to Turkish.
31
Removing
In rare cases removal of the program can cause the computer to freeze, even when a full version of SQL Server 2005 is installed. In this occurs, disconnect the computer from the network to continue the removal process.
Installation of the SIMATIC USB driver under Windows server 2003 R2 StdE SP2
An operating system message relating to the SIMATIC USB driver is issued on the operating system Windows Server 2003 R2 StdE SP2. This message must be acknowledged with "Yes" as soon as possible after the message has been issued. The message may be in the background and therefore may not be immediately visible. After a certain period of time, the setup continues with the next component. The SIMATIC USB drivers are then not installed and cannot be used.
2.1.3
Contents
32
See also
Service & Support (http://support.automation.siemens.com/WW/view/en/12660737)
2.2
2.2.1
Contents
STEP 7 Basic
Notes on use
33
Online operation
The simultaneous online operation of STEP 7 V5.5 or earlier and STEP 7 Basic V11 has not been approved.
2.2.2
2.2.2.1 Contents
34
2.2.2.2 Contents
Diagnostics repeater 6ES7 972-0AB01-0XA0 1 Count 24 V 1 Count 5 V 1 Step 5 V 2 pulses 1 SI 1 SI Modbus 1 SSI 1 Pos Universal SIWAREX
ET 200M
SIWAREX
2.2.2.3 Contents
35
2.2.2.4 Contents
2.2.2.5 Contents
36
2.2.2.6 Contents
Assigning an IP address
If an IP address is assigned directly to a PLC via the diagnostics and online function with "Functions > Assigning an IP address", this IP address will be set permanently and retained even after a restart or power failure.
2.2.2.7 Contents
2.2.2.8 Contents
37
2.2.3
2.2.3.1 Contents
Programming a PLC
General notes on PLC programming
38
2.2.3.2 Contents
SCL
MUX: Multiplexing
As of V11 SP2 parameter numbering of the MUX instruction no longer begins with IN0 but with IN1. If you want to import the MUX instruction from a source of a previous version of the TIA portal, please correct the calls by increasing the parameter numbers of each call by 1.
2.2.3.3 Contents
Instructions
MODBUS library
The instruction "MB_SLAVE" was updated in STEP 7 V10.5 SP2.
39
Using instructions with parameters of type VARIANT in logic blocks with different access types (S7-1200)
Logic blocks (FBs/FCs) and data blocks (DBs) can be created with different access types ("standard" and "optimized"). In logic blocks, you can call any instructions. Certain instructions (for example, "WRIT_DBL" and "READ_DBL") use pointers of type VARIANT at input and output parameters to address data blocks. Ensure that you do not use these instructions in programs in which logic blocks of different access types are called reciprocally. This could cause the following to occur: A structure from a standard data block is directly or indirectly passed to an optimized logic block, which forwards this structure directly or indirectly to one of the blocks mentioned above. The reverse scenario, whereby a structure from an optimized logic block is directly or indirectly passed to a standard data block, which forwards this structure directly or indirectly to one of the blocks mentioned above.
2.2.3.4
40
2.2.4
2.2.4.1
Technological functions
Notes on technological functions
PID_Compact V1.0
PID_Compact V1.0 is out of date. A CPU with firmware V2.0 is required as of PID_Compact V1.1. Update the CPU firmware and select a newer version from the Task Card "Instructions".
41
2.3
2.3.1
WinCC Readme
Security information
2.3.2
Contents
Notes on use
42
Device replacement
After an HMI device has been replaced, you should check the appearance of the configured screens. Changing the size of the display may result in changes to the position and appearance of screen objects, e.g. recipe view and alarm view.
43
44
2.3.3
Contents
Migration
Information that could not be included in the online help. Note The most efficient way to locate scripting errors in the course of the initial test run after migration is to use an installed Script Debugger and the diagnostics controls.
The display names of the alarm classes can be changed as necessary after migration.
45
Progress bar
As long as the progress bar still shows a value of 100 %, the software is still busy running remaining tasks such as the closing of references. The software will not respond to user input while this status is given.
2.3.4
2.3.4.1 Contents
Engineering System
Screens and Screen Objects
46
Event names in case of alarms in the "Info" tab of the Inspector window
In some alarms of the Inspector window the event names in the "Info" tab will deviate from the names in the "Properties" tab.
Name in the "Properties" tab of the Inspector window Cleared Loaded Enable Change When a dialog is opened When a dialog is closed User change Screen change Disable Press Outgoing Incoming Name in the "Info" tab of the Inspector window ClearScreen GenerateScreen Activate Change ONMODALBEGIN ONMODALEND PASSWORD SCREEN Deactivate Press Going Coming
47
Faceplates
Faceplates cannot be rotated or mirrored.
48
I/O field with "decimal" display format and format pattern without "s" prefix
You have linked a process tag to an I/O field. The I/O field is assigned the "decimal" display format. You may select a signed or an unsigned display format. A "Display format" setting without "s", e.g. "999" has the following effects: 1. You cannot set negative values using the I/O field in Runtime. 2. If the tag assumes a negative value, the I/O field generates a two's complement and a corrupted positive value is output.
49
2.3.4.2 Contents
Tag names
HMI tag names may not start with the character @.
Runtime Advanced and Panels: Importing array elements and structure elements
Array tags and structure tags are always imported in full with all elements. The elements of the array tags and structure tags are not filled further during import. A new tag is created if the name of a tag corresponds to the name of an array or structure element in the import file.
50
2.3.4.3 Contents
51
2.3.4.4 Contents
System functions
2.3.4.5 Contents
Recipes
2.3.4.6 Contents
User administration
2.3.4.7 Content
Communication
Opening projects in WinCC V11 (no service pack) with communication via Modicon Modbus RTU, Modicon TCPIP, Allen Bradley DF1
The following HMI devices are affected: OP 77A TP177 A Basic Panel
52
53
54
2.3.5
Contents
55
56
57
2.3.6
2.3.6.1 Contents
Runtime
Notes on operation in Runtime
Information that could not be included in the online help. CAUTION Ethernet communication In Ethernet-based communication, end users themselves are responsible for the security of their data network. The proper functioning of the device cannot be guaranteed in all circumstances; targeted attacks, for example, can lead to overload of the device.
2.3.6.2 Contents
58
2.3.7
2.3.7.1 Contents
HMI devices
Notes on HMI devices
Information that could not be included in the online help. If the PC goes into standby or hibernate mode while the transfer is in progress, the panel status after interruption of the transfer is not defined.
59
KP400 Basic, TP1500 Comfort, KP1500 Comfort, TP1900 Comfort, TP2200 Comfort
The devices are already described in the online help, but cannot yet be configured in WinCC. To be able to configure these devices, you have to install the HSP that will be released soon.
Mobile Panels V2
If you use Mobile Panels V2 in a project, it is not possible to open the project with WinCC V11 SP1. This affects projects with the following devices: Mobile Panel 277F IWLAN (RFID Tag) Mobile Panel 277F IWLAN V2 Mobile Panel 277 IWLAN V2
60
61
Installation
3.1
3.1.1
See also
Licenses (Page 73) Starting installation (Page 75) Displaying the installed software (Page 78) Modifying or updating installed products (Page 79) Repairing installed products (Page 81) Starting to uninstall (Page 82)
63
3.1.2
3.1.2.1
* For more detailed information on operating systems, refer to the help on Microsoft Windows or the Microsoft homepage.
Recommended hardware
The following table shows the recommended hardware for the operation of STEP 7.
Hardware Computer Processor RAM Hard disk Monitor Optical drive Requirement SIMATIC FIELD PG M2 PREMIUM (or similar PC) 2.2 GHZ CORE 2 DUO (T7500) 1X2GB DDR2 RAM 250GB S-ATA HDD 15" SXGA+ DISPLAY (1400 X 1050) DL MULTISTANDARD DVD RW
64
3.1.3
3.1.3.1
Introduction
Specific requirements for the operating system and software configuration must be met for the installation. Note WinCC is generally authorized for use in a domain or workgroup. However, be aware that domain group policies and restrictions of the domain may hinder the installation. If this happens, remove the computer from the from the domain prior to installing Microsoft Message Queuing, Microsoft SQL Server 2005 and WinCC. Log onto the computer in question locally with administrative rights. Then perform the installation. After successful installation, you can enter the WinCC computer back into the domain. If the domain group policies and restrictions of the domain do not impede the installation, the computer need not be removed from the domain during the installation. Be aware that domain group policies and restrictions of the domain may also hinder operation. If you cannot avoid these restrictions, run the WinCC computer in a workgroup. Consult with the domain administrator if needed.
Installation requirements
The following table shows the minimum software and hardware requirements that have to be met for installation of the "SIMATIC WinCC Professional" software package:
Hardware/software Processor type RAM Free hard disk space Requirement Pentium M, 1.6 GHz or similar 2 GB 2 GB on system drive "C:"
65
* For more detailed information on operating systems, refer to the help on Microsoft Windows or the Microsoft homepage.
66
Recommended hardware
The following table shows the recommended hardware for the operation of SIMATIC WinCC.
Hardware Computer Processor RAM Hard disk Monitor Optical drive Requirement SIMATIC FIELD PG M2 PREMIUM 2.2 GHZ CORE 2 DUO (T7500) 1X2GB DDR2 RAM 250GB S-ATA HDD 15" SXGA+ DISPLAY (1400 X 1050) DL MULTISTANDARD DVD RW
67
See also
Licensing of WinCC Engineering System (Page 68)
3.1.3.2
68
See also
Software and hardware requirements (Page 65) Licensing of HMI devices (Page 69) Working with license keys (Page 71)
License key
To be able to license non-PC-based HMI devices with license keys, you require the "SIMATIC HMI License Manager Panel Plug-in" add-on.
69
Data backup
CAUTION Destruction of license keys on non-PC-based HMI devices Installed license keys and authorizations are destroyed by the backup/restore processes on the HMI devices listed below. 270 series 370 series Carry out the following before beginning restoring: Use the Automation License Manager and ProSave to check whether license keys are installed on the HMI device. Remove any license keys present on the HMI device. After restoring has been carried out, re-install the license keys on the HMI device.
Non-licensed mode
Runtime add-ons can also be used without a license without restriction. An alert for nonlicensed mode is presented every 10 minutes by a window requiring acknowledgment.
See also
Licensing of WinCC Engineering System (Page 68)
70
Data backup
Remove the license keys on the HMI device when backing up data on the HMI device and when creating a backup during device replacement. You use the Automation License Manager to back up license keys of a HMI device to the storage area of the license key. CAUTION Destruction of license keys on non-PC-based HMI devices Installed license keys are destroyed by backup/restore processes on the HMI devices listed below. 270 series 370 series Carry out the following before beginning restoring: Use the Automation License Manager and ProSave to check whether license keys are on the HMI device. Remove any license keys present on the HMI device. After restoring has been carried out, re-install the license keys on the HMI device.
71
Read the description of Automation License Manager ("Start > Simatic Automation > Documentation"). Observe all warnings and notices. The license key storage location on PC-based HMI devices and on non-PC-based HMI devices where Automation License Manager is used may contain multiple license keys. This capability means you can store multiple licenses of the same type at one location. Save all license keys of the HMI device to the same storage location. CAUTION Always keep the original storage location of the license keys.
Defective license
A license is defective in the following cases: If the license key is no longer accessible at the storage area. If the license key disappears during its transfer to the destination drive. You can use the Automation License Manager to repair the defective license. Use the "Restore" function or the "Restore Wizard" of the Automation License Manager for this purpose. Contact
72
See also
Licensing of WinCC Engineering System (Page 68)
3.2
Licenses
Availability of licenses
The licenses for the products of the TIA Portal are usually supplied on the installation data medium and installed automatically by the Automation Licence Manager during the installation process of the TIA Portal. If you remove the TIA Portal, the corresponding licenses are also removed automatically. Licenses still required should be secured.
73
Note For additional information on how to manage your licenses with the Automation License Manager , refer to the documentation supplied with the Automation License Manager .
See also
Notes on the system requirements (Page 63) Starting installation (Page 75) Displaying the installed software (Page 78) Modifying or updating installed products (Page 79) Repairing installed products (Page 81) Starting to uninstall (Page 82) Installation log (Page 74)
3.3
Installation log
74
See also
Licenses (Page 73) Starting installation (Page 75) Installing Support Packages (Page 77) Displaying the installed software (Page 78) Modifying or updating installed products (Page 79) Repairing installed products (Page 81) Starting to uninstall (Page 82)
3.4
Starting installation
Introduction
Software packages are installed automatically by the setup program. The setup program starts once the installation medium has been inserted in the drive.
Requirement
Hardware and software of the programming device or PC meet the system requirements. You have administrator privileges on your computer. All running programs are closed.
75
Procedure
To install the software packages, follow these steps: 1. Insert the installation medium in the relevant drive. The setup program starts automatically unless you have disabled Autostart on the programming device or PC. 2. If the setup program does not start up automatically, start it manually by double-clicking the "Start.exe" file. The dialog for selecting the setup language opens. 3. Choose the language in which you want the setup program dialogs to be displayed. 4. To read the information on the product and installation, click the "Read Notes" or "Installation Notes" button. The help file containing the notes opens. 5. Once you have read the notes, close the help file and click the "Next" button. The dialog for selecting the product languages opens. 6. Select the languages for the product user interface, and click the "Next" button. Note "English" is always installed as the basic product language. The dialog for selecting the product configuration opens. 7. Select the products you want to install: If you wish to install the program in a minimal configuration, click on the "Minimal" button. If you wish to install the program in a typical configuration, click on the "Typical" button. If you wish to personally select the products to be installed, click on the "User-defined" button. Then select the check boxes for the products you wish to install. 8. If you want to create a shortcut on the desktop, select the "Create desktop shortcut" check box. 9. Click the "Browse" button if you want to change the target directory for the installation. Note that the length of the installation path must not exceed 89 characters. 10.Click the "Next" button. The dialog for the license terms opens. 11.To continue the installation, read and accept all license agreements and click "Next". If changes to the security and permissions settings are required in order to install the TIA Portal, the security settings dialog opens. 12.To continue the installation, accept the changes to the security and permissions settings, and click the "Next" button. The next dialog displays an overview of the installation settings. 13.Check the selected installation settings. If you want to make any changes, click the "Back" button until you reach the point in the dialog where you want to make changes. Once you have completed the desired changes, return to the overview by clicking on "Next".
76
Result
The TIA Portal along with the products and licenses you have ordered and the Automation License Manager have been installed on your computer.
See also
Installation log (Page 74) Notes on the system requirements (Page 63) Licenses (Page 73) Displaying the installed software (Page 78) Modifying or updating installed products (Page 79) Repairing installed products (Page 81) Starting to uninstall (Page 82)
3.5
77
Procedure
To install a Support Package, follow these steps: 1. Click "Support packages" in the "Options" menu. The "Detailed information" dialog opens. A table lists all support packages from the directory that you selected as the storage location for support packages in the settings. 2. If you want to install a support package that is not in the list, you have the following options: If the support package is already on your computer, you can add it to the list by selecting "Add from the file system". If you add a support package from the "Service & Support" page on the Internet, first you download it by selecting "Download from the Internet". Then you can add it from the file system. 3. Select the support package that you want to install. 4. Click "Install." 5. Close and then restart the TIA Portal.
See also
Installation log (Page 74)
3.6
Procedure
To display an overview of the software installed, follow these steps: 1. Click "Installed software" in the "Help" menu. The "Installed software" dialog opens. You will see the installed software products in the dialog. Expand the entries to see which version is installed in each case. 2. If you would like to display additional information on the installed automation software, click the link on the "Detailed information about installed software" dialog. The "Detailed information" dialog opens. 3. Chose the topic you want more information about in the area navigation.
78
See also
Notes on the system requirements (Page 63) Licenses (Page 73) Starting installation (Page 75) Modifying or updating installed products (Page 79) Repairing installed products (Page 81) Starting to uninstall (Page 82) Installation log (Page 74)
3.7
Requirement
Hardware and software of the programming device or PC meet the system requirements. You have administrator privileges on your computer. All running programs are closed.
Procedure
To modify or update installed products, follow these steps: 1. Insert the installation medium in the relevant drive. The setup program starts automatically unless you have disabled Autostart on the programming device or PC. 2. If the setup program does not start up automatically, start it manually by double-clicking the "Start.exe" file. The dialog for selecting the setup language opens. 3. Choose the language in which you want the setup program dialogs to be displayed. 4. To read the information on the product and installation, click the "Read Notes" or "Installation Notes" button. The help file containing the notes opens. 5. Once you have read the notes, close the help file and click the "Next" button. The dialog for selecting the installation variant opens. 6. Select the "Modify/Upgrade" option button and click the "Next" button. The dialog for selecting the product languages opens.
79
Result
The existing installation has been modified on your computer.
80
See also
Notes on the system requirements (Page 63) Licenses (Page 73) Starting installation (Page 75) Displaying the installed software (Page 78) Repairing installed products (Page 81) Starting to uninstall (Page 82) Installation log (Page 74)
3.8
Requirement
Hardware and software of the programming device or PC meet the system requirements. You have administrator privileges on your computer. All running programs are closed.
Procedure
To repair installed products, follow these steps: 1. Insert the installation medium in the relevant drive. The setup program starts automatically unless you have disabled Autostart on the programming device or PC. 2. If the setup program does not start up automatically, start it manually by double-clicking the "Start.exe" file. The dialog for selecting the setup language opens. 3. Choose the language in which you want the setup program dialogs to be displayed. 4. To read the information on the product and installation, click the "Read Notes" or "Installation Notes" button. The help file containing the notes opens. 5. Once you have read the notes, close the help file and click the "Next" button. The dialog for selecting the installation variant opens. 6. Select the "Repair" option button, and click the "Next" button. The next dialog displays an overview of the installation settings.
81
Result
The installed products have been reinstalled.
See also
Notes on the system requirements (Page 63) Licenses (Page 73) Starting installation (Page 75) Displaying the installed software (Page 78) Modifying or updating installed products (Page 79) Starting to uninstall (Page 82) Installation log (Page 74)
3.9
Starting to uninstall
Introduction
Software packages are removed automatically by the setup program. Once started, the setup program guides you step-by-step through the entire removal procedure. You have two options for removing: Removing selected components via the Control Panel Removing a product using the installation medium Note The Automation License Manager will not be removed automatically when you remove the software packages, because it is used for the administration of several license keys for products supplied by Siemens AG.
82
83
See also
Installation log (Page 74) Notes on the system requirements (Page 63) Licenses (Page 73) Starting installation (Page 75) Displaying the installed software (Page 78) Modifying or updating installed products (Page 79) Repairing installed products (Page 81)
3.10
3.10.1
3.10.2
84
Procedure
To install the migration tool, proceed as follows: 1. Download the installation file from the Service & Support area on the Siemens website. 2. Run the downloaded file. The setup program for the migration tool will open. 3. First, select the language in which the setup should be displayed and click the "Next" button. The page for selecting the software language is displayed. 4. Since the migration tool is provided exclusively in English, you cannot choose any other language for the installation. Therefore, click "Next" to proceed to the next step. The page for selecting the product is displayed. 5. The migration tool consists solely of a software component. Therefore, the migration tool is already selected. To create a Desktop icon for starting the migration tool, select the check box "Create Desktop icon". Then click the "Next" button. The page for confirming the licensing terms is shown. 6. Click on an entry in the list of license terms to read the selected license term. If you agree with all license terms, select the check box "I accept the terms of the displayed license agreement". Then click the "Next" button. An overview of the installation is displayed. 7. Click the "Install" button. The installation is performed with the displayed settings.
3.10.3
Procedure
To remove the migration tool, follow these steps: 1. Open the Control Panel. 2. Double click on "Add or Remove Programs" in the Control Panel. The "Add or Remove Programs" dialog opens. 3. Select the "TIA Portal Migration Tool V11" entry in the "Add or Remove Programs" dialog, and click the "Remove" button. A confirmation prompt appears. 4. Click the "Uninstall" button to confirm this prompt. The migration tool will be removed.
85
Migrating projects
4.1 Migrating projects
87
See also
Displaying the log file of the migration (Page 92) Scaling of STEP 7 and WinCC (Page 23)
4.2
4.2.1
88
See also
Migrating projects (Page 87) Migrating projects (Page 91) Calling the migration tool (Page 90) Creating a migration file (Page 90)
89
4.2.2
See also
Creating a migration file (Page 90)
4.2.3
Requirement
The suitable, original software with a valid license is installed for all configurations used in the initial project. The initial project is not provided with access protection. The initial project must be consistent, otherwise problem-free migration cannot be assured.
Procedure
To create the migration file, follow these steps: 1. Choose the path of the source file for the migration in the "Storage Location (Path)" field. 2. Select the check box "Exclude hardware configuration" to migrate the software only. 3. Choose the path and the file name for the migration file in the "Intermediate file". 4. Click the "Migrate" button.
Result:
A migration file is created. Finally, copy this file to the target system and migrate this file in the TIA Portal.
90
See also
Migrating projects (Page 91) Calling the migration tool (Page 90) Migrating projects with the migration tool (Page 88)
4.3
Migrating projects
Requirement
There is already a converted file in the format AM11 available or the original software with a valid license is installed for all the configurations in the initial project. The initial project is not provided with access protection. The initial project must be consistent, otherwise problem-free migration cannot be assured. Read the additional information on the requirements in the help for the respective products installed. Note System hibernation during the migration While a migration is running, the system should not be changed to the standby or hibernate mode. Otherwise the migration will be aborted.
Procedure
To migrate a project, follow these steps: 1. Select the "Migrate project" command in the "Project" menu. The "Migrate project" dialog opens. 2. Specify the path and the file name for the project to be migrated in the "Source path" field. Choose either a project in the AM11 migration format or in the format of the initial project. 3. Select the check box "Exclude hardware configuration" to migrate the software only. If you have selected a migration file that was created using the migration tool, the check box is disabled. In this case, you must specify if you wish to exclude the hardware configuration of the migration before the conversion with the migration tool . 4. Choose a name for the new project in the "Project name" box. 5. Choose a path in the "Target path" box where the new project will be created. 6. Enter your name or the name of another person responsible for the project in the "Author" field. 7. Enter a comment in the "Comment" box, if you require one. 8. Click "Migrate".
91
Result
The initial project is converted. The system outputs a message when the migration is complete. From here, you can directly open a log for the migration. The newly created project then opens in the project view. The migration log is also displayed in the Inspector window.
See also
Post-editing integrated projects (Page 125) Migrating projects with the migration tool (Page 88) Creating a migration file (Page 90)
4.4
Procedure
To display the migration in an overview table, follow these steps: 1. Select the open project in the project tree. 2. Select "Properties" in the shortcut menu of the project. The dialog with the properties of the project opens. 3. Select the "Project history" group in the area navigation. The overview table is displayed.
See also
Displaying properties of the project (Page 183)
4.5
92
Procedure
To display the log file of the migration, follow these steps: 1. Select the open project in the project tree. 2. Select "Properties" in the shortcut menu of the project. The dialog with the properties of the project opens. 3. Select the "Project history" group in the area navigation. The overview table is displayed. 4. Click on the link to the log file in the "Log file" column. The log file is displayed in the Microsoft Internet Explorer.
See also
Migrating projects (Page 87)
4.6
4.6.1
4.6.1.1
Introduction
You can continue to use projects in WinCC from WinCC flexible. The following version of WinCC flexible is supported: WinCC flexible 2008 SP2 The following sections describe the operating devices that are supported and the required conditions for a successful migration. Projects from ProTool and from earlier versions of WinCC flexible cannot be migrated directly to WinCC. If you wish to continue to use such projects in WinCC, you must first migrate them to a supported version of WinCC flexible.
93
See also
Object support during migration (WinCC flexible) (Page 100) Projects from Migrating WinCC flexible projects (WinCC flexible) (Page 96) Compiling and loading a migrated project (WinCC flexible) (Page 98) Migrating runtime data (WinCC flexible) (Page 110) Migrating integrated projects (WinCC flexible) (Page 112) Supported HMI devices (WinCC flexible) (Page 99) Migration of data types (WinCC flexible) (Page 115)
4.6.1.2
Introduction
During migration, the project data from a WinCC flexible project are converted to the new format of WinCC. The data will not be evaluated to see if they are consistent in the project you want to migrate. If errors or warnings are output in a source project during compilation, these will not be resolved as part of the migration. This means you should be able to compile the project without errors prior to migration. Note the scope of a project during migration. The features of WinCC apply for migration. See Engineering system (Page 2685) for additional information.
Example:
In WinCC flexible, tags located in different folders may have the same name. In WinCC, the tag name must be unique on the configured HMI device. This means tags with the same name from different folders will be renamed during migration. Tags are renamed as follows:
Before migration Folder_1/Tag_1 Folder_1/Tag_2 Folder_2/Tag_1 Folder_2/Tag_2 After migration Folder_1/Tag_1 Folder_1/Tag_2 Folder_2/Tag_1#Mig1 Folder_2/Tag_2#Mig1
94
Affected objects
The following objects are renamed if necessary: Screens Screen objects Recipes Tags
Cancelling migration
The migration is cancelled in the following cases: If the project to be migrated is opened in the engineering system or in Runtime. If not enough memory space is available on the hard disk to create a a copy for migration of the project. If the migration cannot address the project database due to problems with the installed SQLServer. If the migration cannot address the project database due to missing user authorization. If you select the "*.hmi" file for the migration in an integrated project. You must select the "*.s7" file for the migration in an integrated project. If the project was created with a version not supported by the migration.
See also
Engineering system (Page 2685)
95
4.6.1.3
Introduction
When you migrate a project, data from a WinCC flexible project is loaded into a new project for WinCC. A new project is therefore created automatically for project migration. You cannot migrate to an existing project. The migration can be started in both the Portal view and the Project view. You should only migrate a project in a newly started TIA portal. Information on the migration of integrated project can be found in the Chapter Migrating integrated projects (WinCC flexible) (Page 112). If you only want to save the project in migration format, you can use the migration tool. See Basics on migration (WinCC flexible) for additional information.
Requirement
A project from WinCC flexible is available. The project is not open in WinCC flexible.
96
Procedure
Migrate a project in the Portal view as follows: 1. Select the action "Start > Migrate Project".
2. In the "Source path" box, navigate to the project you want to migrate.
3. Select the WinCC flexible project file "*.hmi". 4. Change the information for the project to be created, if necessary. For example, change the project name or project path. The data to be migrated is created in the new project. 5. Click "Migrate". A new project is created and migration of the data is started: The Project view opens. The progress of the migration is shown in a migration window. Warnings and errors about the migration process are displayed in the Inspector window under "Info > General". All information about the migration is saved in a log file. The project is saved and a message displayed upon completion of the migration. The message contains a link that you can use to open the log.
97
See also
Migrating integrated projects (WinCC flexible) (Page 112)
4.6.1.4
98
4.6.2
4.6.2.1
Introduction
Note that WinCC only supports the following HMI device types when migrating projects from WinCC flexible: KTP400 Basic mono PN KTP400 Basic mono PN Portrait KTP600 Basic DP KTP600 Basic DP Portrait KTP600 Basic PN KTP600 Basic PN Portrait KTP600 Basic mono PN KTP600 Basic mono PN Portrait KTP1000 Basic DP KTP1000 Basic PN TP1500 Basic PN WinCC only supports the functions provided by these HMI device types. If your WinCC flexible project contains an HMI device that is not supported by WinCC, then the migration process will abort. To migrate the project, you must change the HMI device in WinCC flexible to a HMI device type supported by WinCC. There may be some functions in a WinCC flexible project that are not supported by a Basic Panel, for example, because the device type has been switched. These unsupported functions are not migrated.
99
See also
Object support during migration (WinCC flexible) (Page 100) Migration (WinCC flexible) (Page 93) Migration of alarm classes and alarm groups (WinCC flexible) (Page 104) Migration of language-dependent contents (WinCC flexible) (Page 106) Migrating libraries (WinCC flexible) (Page 109) Migration tags (WinCC flexible) (Page 103) Changes of values of object properties by the migration (WinCC flexible) (Page 102)
4.6.2.2
Introduction
When migrating projects from WinCC flexible, all configuration data involving an HMI device supported by WinCC will be migrated. Basically, all object types and functions that are available and can be mapped to the new project environment will be fully migrated. Some global object types are not migrated, for example, dictionaries and global libraries.
100
101
See also
Supported HMI devices (WinCC flexible) (Page 99) Changes of values of object properties by the migration (WinCC flexible) (Page 102)
4.6.2.3
Introduction
The standardization of object properties from WinCC V7 and WinCC flexible requires changes to the object properties during the migration process. The migration calculates the changes in such a way that the representation of the objects after migration is the same as prior to migration. Changes made during migration result in different units of measurements and values in the configuration for some object properties.
102
See also
Supported HMI devices (WinCC flexible) (Page 99) Object support during migration (WinCC flexible) (Page 100)
4.6.2.4
Introduction
You need to make some special considerations when migrating tags. The following aspects should be distinguished: Migrating data types of tags Migrating internal tags Migrating external tags Tag names
Migrating tags
Tags are always fully migrated. Only the data type names and tag names may change due to migration.
See also
Basics on migration (WinCC flexible) (Page 94) Migration of data types (WinCC flexible) (Page 115) Supported HMI devices (WinCC flexible) (Page 99)
103
4.6.2.5
The names of the alarm classes can be changed as necessary after migration.
Also note: When migrating alarm groups that supposedly have the same group name, the migration adapts the name. This occurs, for example, when a group name contains a space at the end of the name. The migration deletes all existing spaces at the end of names. If two groups obtained the same group names due to this deletion, the migration adds the suffix "# Mign" to the group name of the following alarm groups, where "n" stands for a sequential number.
104
The names of the alarm classes can be changed as necessary after migration.
105
See also
Supported HMI devices (WinCC flexible) (Page 99)
4.6.2.6
Introduction
WinCC offers the same options for configuring projects in different languages as those available in WinCC flexible. All languages supported by WinCC are included in the migration of a project.
106
107
Unsupported languages
The migration of language-dependent content depends on whether or not WinCC supports the respective language. If a project only contains project languages not supported by WinCC, the project will not be migrated. If a project contains supported and unsupported project languages, only the supported languages will be migrated. The editing language and reference language are set to a supported language. The following languages are not supported by WinCC: Arabic Hebrew Dhivehi Gujarati Kannada
108
See also
Supported HMI devices (WinCC flexible) (Page 99)
4.6.2.7
Introduction
You need to consider two different cases when migrating from libraries: 1. Migrating a project library 2. Migrating a global library
See also
Supported HMI devices (WinCC flexible) (Page 99)
109
4.6.3
4.6.3.1
Introduction
When migrating a project, only the configuration data will be migrated. The runtime data are not affected. You need to update the runtime data following migration. The runtime data consists of the following: Runtime project The runtime project contains the compiled project data. Recipe data and user administration The recipe data and user administration are data that can be changed in runtime.
See also
Migration (WinCC flexible) (Page 93) Backing up recipe data and user administration (WinCC flexible) (Page 110) Restoring recipe data and user administration (WinCC flexible) (Page 111)
4.6.3.2
Introduction
To continue using the recipe data and user administration in a migrated project, you first need to back up this data from the HMI device. Then load the data into the migrated WinCC project. Use ProSave to back up the data.
Requirement
The WinCC flexible project is running on the HMI device in Runtime. The HMI device is connected to a PC on which ProSave is installed.
110
Procedure
Proceed as follows to back up the recipe data and user administration: 1. Start ProSave. 2. Select the device type and the connection parameters in the "General" tab. 3. Open the "Backup" tab. 4. Select the "Recipes from the device memory" entry in the "Data type" box. Do not select "Complete backup" because otherwise you will not be able to select separately when restoring the recipe data. 5. Navigate to the desired location in the "Save as" box and click "Start Backup". The recipe data are saved. 6. Select "User administration" in the "Data type" box and click "Start Backup". The user administration is saved. For additional information refer to the online help for ProSave.
Alternative procedure
ProSave is automatically installed with WinCC flexible. The entire functional range of ProSave is available on the configuration PC within WinCC flexible via the menu command "Project > Transfer". Alternatively, you can back up the recipe data and user administration via the ProSave integrated in WinCC flexible. Start WinCC flexible and select the menu command "Project > Transfer > Backup". Back up the recipe data and user administration as described in steps 4-6.
See also
Migrating runtime data (WinCC flexible) (Page 110) Restoring recipe data and user administration (WinCC flexible) (Page 111)
4.6.3.3
Introduction
To continue using saved recipe data and user administration after the migration, you first need to compile the migrated project and load it to the HMI device. You can then transfer the saved data to the HMI device. Use ProSave to restore the data.
Requirement
The migrated project has been transferred to the HMI device and is running in runtime. The HMI device is connected to a PC on which ProSave is installed.
111
Procedure
Proceed as follows to load the saved recipe data and user administration to the HMI device: 1. Start ProSave. 2. Select the device type and the connection parameters in the "General" tab. 3. Open the "Restore" tab. 4. Navigate to the location of the saved recipe data in the "Opening..." box and select the file. 5. Click "Start Restore". The recipe data will be transferred to the HMI device.. 6. Repeat steps 4-5 to restore the user administration. The user administration will be transferred to the HMI device. For additional information refer to the online help for ProSave.
Alternative procedure
ProSave is automatically installed with WinCC. The entire functional range of ProSave is available on the configuration PC within WinCC flexible via the menu command "Project > Transfer". You can also restore the recipe data and user administration via the ProSave integrated in WinCC. Start WinCC and select the menu command "Online > Device maintenance > Restore". Restore the recipe data and user administration as described in steps 4-6.
See also
Migrating runtime data (WinCC flexible) (Page 110) Backing up recipe data and user administration (WinCC flexible) (Page 110)
4.6.4
4.6.4.1
Introduction
The controllers and HMI devices contained in a project integrated in STEP 7 are linked together by the configuration. The configuration data of WinCC flexible and STEP 7 are also connected. When an integrated project is migrated, the complete project will be migrated with components from WinCC flexible and STEP 7. The connections remain intact.
112
See also
Basics on migration (WinCC flexible) (Page 94)
4.6.4.2
Introduction
When migrating an integrated project, the components from both the WinCC flexible project and the STEP 7 project will be migrated. This means you need to select the project file with the file extension "*.s7p" for migration. During migration, the data is copied from the existing project and migrated to a new project. You cannot migrate to an existing project. The migration can be started in both the Portal view and the Project view. You should only migrate a project in a newly started TIA portal. If you only want to save the project in migration format, you can use the migration tool. See Basics on migration (WinCC flexible) (Page 94) for additional information.
Requirement
STEP 7 V5.4 SP5 or STEP 7 V5.5 and all add-on packages used are installed. STEP 7 and all add-on packages used are installed. The TIA portal is newly started. No project is open in WinCC.
113
Procedure
Proceed as follows to migrate an integrated project in the Portal view: 1. Select the action "Start > Migrate Project".
2. In the "Source path" box, navigate to the project you want to migrate.
3. Select the "*.s7p" project file. 4. Change the information for the project to be created, if necessary. For example, change the project name or project path. The data to be migrated is created in the new project.
114
See also
Basics on migration (WinCC flexible) (Page 94)
4.6.5
4.6.5.1
Introduction
To harmonize the data types used by controllers and HMI systems, some types of internal HMI tags are renamed. The naming takes place in accordance with IEC conventions. Because only the names change, there are no changes to the internal tags for the configuration. The following table describes the mapping of data types from WinCC flexible to the data types in WinCC.
115
See also
Migration (WinCC flexible) (Page 93) Migrating data types of Allen-Bradley DF1 (WinCC flexible) (Page 117) Migrating data types of Allen-Bradley Ethernet IP (WinCC flexible) (Page 117) Migrating data types of Mitsubishi FX (WinCC flexible) (Page 118) Migrating data types of Modicon Modbus (WinCC flexible) (Page 118) Migrating data types of Modicon Modbus TCP/IP (WinCC flexible) (Page 119) Migrating data types of Omron Hostlink/Multilink (WinCC flexible) (Page 119) Migrating data types of SIMATIC S7 200 (WinCC flexible) (Page 120) Migrating data types of SIMATIC S7 300/400 (WinCC flexible) (Page 120)
116
4.6.5.2
See also
Migration of data types (WinCC flexible) (Page 115)
4.6.5.3
See also
Migration of data types (WinCC flexible) (Page 115)
117
4.6.5.4
See also
Migration of data types (WinCC flexible) (Page 115)
4.6.5.5
118
See also
Migration of data types (WinCC flexible) (Page 115)
4.6.5.6
See also
Migration of data types (WinCC flexible) (Page 115)
4.6.5.7
119
See also
Migration of data types (WinCC flexible) (Page 115)
4.6.5.8
See also
Migration of data types (WinCC flexible) (Page 115)
4.6.5.9
120
121
WinCC
Tag Counter_Actual_Value Counter_Setpoint_Value Counter_Setpoint_Value#2 S7 data type Counter Word Word Address %C10 %DB10.%DB W200 %MW20 Coding <Standard> SimaticBCDCounter SimaticBCDCounter Comment BCD coded counter value BCD coded counter value BCD coded counter value
122
WinCC
Tag Timer_Actual_Value Timer_Setpoint_Value Timer_Setpoint_Value#2 S7 data type Timer S5Time S5Time Address %T10 %DB10.%DBW200 %MW20 Comment BCD coded timer value BCD coded timer value BCD coded timer value
See also
Migration of data types (WinCC flexible) (Page 115)
4.7
4.7.1
Introduction
When an integrated project is migrated, the complete project will be migrated with components from Wind and STEP 7. Configured connections between control and visualization remain intact.
123
Unsupported objects
The following components are not supported for migration: STEP 7 multiproject A STEP 7 multiproject cannot be migrated. Migration will be canceled. Central Archive Server - CAS If a CAS is part of an integrated project, then the migration will be carried out but the CAS data will not be migrated.
124
See also
Post-editing integrated projects (Page 125)
4.7.2
Procedure
The original CPU 317-2 PN/DP was replaced with an unspecified CPU during migration. The link between the CPU and HMI device is also unspecified and must be renewed.
To continue to use an integrated project after the migration, follow these steps: 1. Convert the unspecified devices into suitable devices again. 2. Restore the integrated HMI connection between the HMI device and the PLC. 3. Connect all HMI tags to the newly created integrated connection. 4. Restore the connection between HMI tags and PLC tags. 5. Delete the non-integrated HMI connection.
125
See also
Converting unspecified CPUs into specified CPUs (Page 126) Creating an integrated HMI connection (Page 128) Re-linking HMI tags (Page 130) Deleting an unspecified connection (Page 131)
4.7.3
126
3. Under "New device" in the tree structure, select the module with which you want to replace the unspecified CPU. (Area 1) "Compatibility information" provides you with information on the extent to which the selected CPU is compatible with the configuration in source project. (Area 2) 4. Click "OK". 5. Perform the above-described steps for all unspecified CPUs.
See also
Creating an integrated HMI connection (Page 128)
127
4.7.4
Procedure
To create a connection graphically, follow these steps: 1. On the toolbar, click the "Connections" icon. This activates connection mode.
2. Select the connection type "HMI connection" in the adjacent drop-down list. The network view highlights in color all CPUs and HMI devices that can be used for an HMI connection. 3. You can now have the connection path automatically determined, or explicitly select a connection path via specific interfaces: Allow connection path to be automatically determined Select the source CPU for a connection. Drag the mouse to the target components. Confirm the connection endpoint with another mouse click. Alternatively: While holding down the shift button, select the target components and with the right mouse button select the "Add new connection" command. Selecting an explicit connection path from interface to interface Click on the subnet interface in the device for which you want to create a connection. Hold down the mouse button, drag the cursor to the relevant interface in the target device and then release the mouse button.
128
Result
The following figure shows the state after the integrated connection has been created:
An integrated HMI connection is created and highlighted in the network view. The connection is shown in the connection table of the components. The connection can be edited in the connection properties.
See also
Re-linking HMI tags (Page 130)
129
4.7.5
Procedure
To re-link HMI tags, follow these steps: 1. In the project tree, navigate to the HMI tags and double-click the relevant tag table to show this in the work area. The tag table opens.
2. Click the " ... " button in the "Connection" column. A dialog box for selecting the connection opens. 3. Select the newly established HMI connection.
4. Click the "" button to apply the selected connection. 5. On the toolbar, click the "Re-connect PLC tag" button.
130
See also
Deleting an unspecified connection (Page 131)
4.7.6
Procedure
To delete unspecified connections, follow these steps: 1. In the project tree, open the HMI device and double-click the "Connections" entry. The connection table opens.
2. Select the row with the old connection in the table. 3. Select the "Delete" command in the shortcut menu of the connection line. 4. Perform the above-described steps for all unspecified connections of the source project.
131
First steps
5.1 Getting Started Documentation
5
The Getting Started documentation is available to help you begin using the TIA portal. The Getting Started documentation contains instructions which show you, step-by-step how to create a project in the TIA portal and give you the chance to get a quick overview of all the possibilities the TIA portal offers you.
Contents
The Getting Started documents describe the creation of a single, continuous project that is extended with each chapter. You start with simple basic functions, and use more complex ones as you continue with the creation of the project. In addition to the step-by-step instructions, the Getting Started documents also give you background information that explains the functions used and illustrate how they relate to each other.
Target audience
The Getting Started documents are intended for beginners, but are also useful for users migrating from a previous version of SIMATIC STEP 7 and WinCC.
Download
The documentation is available, free of charge at the Service&Support (https:// support.automation.siemens.com) portal in PDF form. You can download the documents here: STEP 7 Basic (http://support.automation.siemens.com/WW/view/en/40263542/0/en) STEP 7 Professional (http://support.automation.siemens.com/WW/view/en/ 28919804/133300)
133
6.1.1.2 Overview
The following table shows the application settings that you can make:
135
136
See also
Starting and exiting the TIA Portal (Page 135) Resetting the user interface layout (Page 165) Changing the settings (Page 139)
6.1.1.3 Overview
The following table shows the available settings for script and text editors:
Group Font Font colors Setting Font type and size Color settings Description Sets the font type and size for the text in text editors. You can choose the colors for individual text elements from the respective drop-down lists in the text editors. Optional settings are available for the following text elements: Text Keywords Comments Translatable comments Instructions Scripts Standard functions System functions Constant strings Constant tags Tags Object models Formal parameters Reset to default Tabs Tab width Use tabs Use spaces Indent Indention at start of paragraph Resets all font colors in editors to their factory settings. Sets the width of tabs. Enables the use of tabs. Specifies use of space characters instead of tabs. Specifies whether the start of a new paragraph is to be indented. The following selection options are available: None No indentation is used at the beginning of a paragraph in editors. Block The first line of a paragraph in the editors is automatically indented. Smart The program code is detected and the paragraphs are automatically indented to improve readability of the syntax.
137
See also
Changing the settings (Page 139)
6.1.1.4 Overview
See also
Changing the settings (Page 139)
138
6.1.1.5 Procedure
To change the settings, proceed as follows: 1. Select the "Settings" command in the "Options" menu. The "Settings" window is displayed in the work area. 2. Select the "General" group in the area navigation to change the settings described in the previous sections. Or click on one of the other entries in area navigation to make settings for your installed products. 3. Change the settings.
Result
The change will be adopted immediately, there is no need to save it explicitly.
See also
Overview of the program settings (Page 135) Overview of the script and text editor settings (Page 137) Overview of the print settings (Page 138)
6.1.2
6.1.2.1 Views
Two different views are available for your automation project: The portal view is a task-oriented view of the project tasks. The project view is a view of the components of the project, as well as the relevant work areas and editors. You can change over between the two views using a link.
6.1.2.2
Portal view
139
Portals
Portals for different tasks Actions for the selected portal Selection panel for the selected action Change to the project view Display of the project that is currently open
The portals provide the basic functions for the individual task areas. The portals that are provided in the portal view depends on the products that have been installed.
140
See also
Project navigation (Page 143) Basics of the work area (Page 146) Inspector window (Page 154) Basics on task cards (Page 156) Details view (Page 158)
6.1.2.3
Project view
141
Title bar Menu bar Toolbar Project tree (Page 143) Work area (Page 146) Task cards (Page 156) Details view (Page 158) Inspector window (Page 154) Changing to the Portal view (Page 139) Editor bar Status bar with progress display
142
Title bar
The name of the project is displayed in the title bar.
Menu bar
The menu bar contains all the commands that you require for your work.
Toolbar
The toolbar provides you with buttons for commands you will use frequently. This gives you faster access to these commands.
Editor bar
The Editor bar displays the open editors. If you have opened a lot of editors, they are shown grouped together. You can use the Editor bar to change quickly between the open elements.
6.1.2.4
Project navigation
143
144
Title bar
Common data Document information Languages & resources Online access SIMATIC Card Reader
The title bar of the project tree has a button for automatically and manually collapsing the project tree. Once it is collapsed manually, the button is "Reduced" to the left-hand margin. It changes from an arrow pointing left to one that is pointing right, and can now be used to reopen the project tree. You can use the "Reduce automatically" button collapse to project tree automatically when you do not need it. See also: Maximizing and minimizing the work area (Page 148)
Toolbar
You can do the following tasks in the toolbar of the project tree: Create a new user folder; for example, in order to group blocks in the "Program blocks" folder. Navigate forward to the source of a link and back to the link itself. There are two buttons for links in the project tree. You can use these to navigate from the link to the source and back. Show an overview of the selected object in the work area. When the overview is displayed, the lower-level objects and actions of the elements in the project tree are hidden.
Project
You will find all the objects and actions related to the project in the "Project" folder, e.g.: Devices Languages & resources Online access
Device
There is a separate folder for each device in the project, which has an internal project name. Objects and actions belonging to the device are arranged inside this folder.
Common data
This folder contains data that you can use across more than one device, such as common message classes, scripts and text lists.
145
Document information
In this folder, you can specify the layout for project documentation to be printed at a later point.
Online access
This folder contains all the interfaces of the programming device / PC, even if they are not used for communication with a module.
See also
Portal view (Page 139) Project view (Page 141) Basics of the work area (Page 146) Inspector window (Page 154) Basics on task cards (Page 156) Details view (Page 158)
6.1.2.5
Work area
146
Title bar of left-hand editor Work area of left-hand editor Title bar of right-hand editor Work area of right-hand editor
147
See also
Maximizing and minimizing the work area (Page 148) Splitting the work area (Page 150) Floating the work area elements (Page 150) Using grouped elements of the work area (Page 151) Minimizing and maximizing elements of the work area (Page 153) Switching between the elements in the work area (Page 153) Saving a layout of editors and tables (Page 164) Save user interface layout (Page 162)
148
See also
Basics of the work area (Page 146) Splitting the work area (Page 150) Floating the work area elements (Page 150) Using grouped elements of the work area (Page 151) Minimizing and maximizing elements of the work area (Page 153) Switching between the elements in the work area (Page 153) Saving a layout of editors and tables (Page 164)
149
Procedure
To split the work area vertically or horizontally, follow these steps: 1. In the "Window" menu, select the "Split editor space vertically" or "Split editor space horizontally" command. The element you have clicked and the next element in the Editor bar will be displayed either next to one another or one above the other. Note If no elements are open in the work area, the "Split editor space vertically" and "Split editor space horizontally" functions will not be available.
See also
Basics of the work area (Page 146) Maximizing and minimizing the work area (Page 148) Floating the work area elements (Page 150) Using grouped elements of the work area (Page 151) Minimizing and maximizing elements of the work area (Page 153) Switching between the elements in the work area (Page 153) Saving a layout of editors and tables (Page 164)
150
See also
Basics of the work area (Page 146) Maximizing and minimizing the work area (Page 148) Splitting the work area (Page 150) Using grouped elements of the work area (Page 151) Minimizing and maximizing elements of the work area (Page 153) Switching between the elements in the work area (Page 153) Saving a layout of editors and tables (Page 164)
151
See also
Basics of the work area (Page 146) Maximizing and minimizing the work area (Page 148) Splitting the work area (Page 150) Floating the work area elements (Page 150) Minimizing and maximizing elements of the work area (Page 153) Switching between the elements in the work area (Page 153) Saving a layout of editors and tables (Page 164)
152
See also
Basics of the work area (Page 146) Maximizing and minimizing the work area (Page 148) Splitting the work area (Page 150) Floating the work area elements (Page 150) Using grouped elements of the work area (Page 151) Switching between the elements in the work area (Page 153) Saving a layout of editors and tables (Page 164)
153
See also
Basics of the work area (Page 146) Maximizing and minimizing the work area (Page 148) Splitting the work area (Page 150) Floating the work area elements (Page 150) Using grouped elements of the work area (Page 151) Minimizing and maximizing elements of the work area (Page 153) Saving a layout of editors and tables (Page 164)
6.1.2.6
Inspector window
4 5
154
"Properties" tab "Info" tab "Diagnostics" tab Navigation within the tabs: Area navigation within the "Properties" tab Lower-level tabs in the "Info" and "Diagnostics" tabs
"Properties" tab
This tab displays the properties of the object selected. You can change editable properties here.
"Info" tab
This tab displays additional information on the object selected, as well as alarms on the actions executed (such as compiling).
"Diagnostics" tab
This tab provides information on system diagnostics events, configured alarm events, and connection diagnostics.
155
See also
Project navigation (Page 143) Basics of the work area (Page 146) Portal view (Page 139) Project view (Page 141) Basics on task cards (Page 156) Details view (Page 158)
6.1.2.7
Task cards
156
See also
Task cards closed "Libraries" task card open "Project library" pane open "Global libraries" pane closed
Changing the pane mode (Page 158) Project navigation (Page 143) Basics of the work area (Page 146) Inspector window (Page 154) Portal view (Page 139) Project view (Page 141) Details view (Page 158)
157
Procedure
To change the pane mode, follow these steps: 1. Click the "Change pane mode" button above the panes inside a task card.
See also
Basics on task cards (Page 156)
6.1.2.8
Details view
158
Title bar
The arrow for closing the details view is located in the title bar of the details view. After it has closed, the direction in which the arrow is pointing changes from left to right. It can now be used to reopen the details view.
Objects
The displayed content varies depending on the selected object. You can move the content of objects from the details view to the required location using drag-and-drop.
See also
Project navigation (Page 143) Basics of the work area (Page 146) Inspector window (Page 154) Basics on task cards (Page 156) Portal view (Page 139) Project view (Page 141)
6.1.2.9
Overview window
159
Overview window Switch to the Details view Switch to the List view Switch to the Icon view Move to higher level Split the overview window in two. Either the right or left half of the overview window is synchronized. Clicking again cancels the split. Contents of the object selected in the project tree.
160
See also
Comparing objects (Page 161) Showing or hiding additional columns (Page 161)
Comparing objects
You can display the contents of two folders or objects side by side in the Overview window. The Overview window is split in half and you can display different contents on the left and right sides. In addition, you can use a drag-and-drop operation to move objects between the split windows. Thus, for example, you can move contents from one window to the other.
Procedure
To split the Overview window in half or cancel the split, follow these steps: 1. In the toolbar, click on the "Synchronize left side" or "Synchronize right side" icon to split the overview window. Either the left or the right side of the overview window synchronized with the contents of the selected object in the project tree. 2. To cancel the split, click again on the previously selected icon.
See also
Overview window (Page 159)
161
Procedure
To show or hide additional table columns, follow these steps: 1. Right-click the title bar of the table. 2. Select the "Show/Hide" command in the shortcut menu, and select the columns you want to display.
See also
Overview window (Page 159)
6.1.2.10
Save user interface layout Options for saving the user interface layout
When you make a change to the user interface, this is retained even after a restart of the TIA portal. A change to the user interface layout includes, for example, moving a window or adjusting the size of an editor. In addition to the automatic saving of the user interface layout, you have the option of saving certain layouts: Saving the window layout You can save the layouts of the windows and editors of the TIA portal manually and restore these at a later time. It is possible to call five window layouts using a key combination. Use this function, for example, if you are work with a notebook which you connect to an external monitor when necessary. You can create a window layout for mobile use on the notebook display and another layout for when you work at the office with an external monitor. Save the layout within editors With some editors, you can adjust the display. You can, for example, adjust the width of tables or show or hide individual table columns.
See also
Save window layout (Page 162) Load window layout (Page 163) Managing window layouts (Page 164) Saving a layout of editors and tables (Page 164) Resetting the user interface layout (Page 165) Basics of the work area (Page 146)
162
Procedure
To save a window layout, follow these steps: 1. Arrange all windows in the way in which you want to save them. 2. In the "Window" menu, select the "Save window layout as" command. The "Save window layout" dialog box appears. 3. Enter a name for the window layout in the "Name" field. 4. Enter a description of the window layout in the "Description" field in order to be able to identify the window layout more easily later. 5. Click "Save".
Result
The new window layout is saved in the last position after the existing saved window layouts. The first five window layouts can be called using a key combination.
See also
Save user interface layout (Page 162)
163
See also
Save user interface layout (Page 162)
Procedure
To manage the existing window layouts, follow these steps: 1. In the "Window" menu, select the "Manage window layouts" command. The "Manage window layouts" dialog box appears. 2. Select the window layout which you want to modify. 3. Click the "Up" or "Down" symbol to move the window layout up or down. 4. Click the "Delete" symbol to delete the selected window layout. 5. Click "OK". The selected window layout is activated.
See also
Save user interface layout (Page 162)
164
Procedure
To save the layout of editors and tables in the work area, follow these steps: 1. Adapt the editor or table according to your requirements. 2. Click the "Remember Layout" button in the editor or table.
Result
The layout is saved. When you reopen the editor or table, this layout will be used.
See also
Basics of the work area (Page 146) Maximizing and minimizing the work area (Page 148) Splitting the work area (Page 150) Floating the work area elements (Page 150) Using grouped elements of the work area (Page 151) Minimizing and maximizing elements of the work area (Page 153) Switching between the elements in the work area (Page 153) Save user interface layout (Page 162)
Procedure
To reset the user interface settings to the factory settings, follow these steps: 1. Select the "Settings" command in the "Options" menu. The "Settings" window is displayed in the work area. 2. Select the "General" group in the area navigation. 3. Click the "Reset to default" button under "Layout > Reset layout".
Result
The default settings for the user interface are restored.
165
See also
Overview of the program settings (Page 135) Save user interface layout (Page 162)
6.1.3
6.1.3.1
Keyboard shortcuts
Keyboard shortcuts for project editing
Editing a project
Function Open a project Close a project Save a project Save a project under a different name Print project Compile a project Undo last action Redo last action Key combination <Ctrl+O> <Ctrl+W> <Ctrl+S> <Ctrl+Shift+S> <Ctrl+P> <Ctrl+B> <Ctrl+Z> <Ctrl+Y> Menu command Project > Open Project > Close Project > Save Project > Save as Project > Print Edit > Compile Edit > Undo Edit > Redo
166
6.1.3.2
6.1.3.3
6.1.3.4
167
Navigate in tables
Function Go to the next cell Go to the next editable cell on the right Go to the next editable cell on the left Move a screen upwards Move a screen downwards Go to the first cell in the row Go to the last cell in the row Go to the first cell in the table Go to the last cell in the table Go to the top cell in the column Go to the bottom cell in the column Key combination <Arrow keys> <Tab> <Shift+Tab> <PgUp> <PgDn> <Home> <End> <Ctrl+Home> <Ctrl+End> <Ctrl+up arrow> <Ctrl+down arrow>
Switch to insert or overwrite mode Exit edit mode Delete Delete characters
168
6.1.3.6
Introduction
When working with the TIA portal, you also have the Microsoft on-screen keyboard available.
6.1.4
6.1.4.1
169
Note A box being grayed out does not necessarily mean a lack of rights. You should also check the additional information in the tooltip cascades to find out the conditions for editing the box.
6.1.4.2
170
6.2
6.2.1
171
Help
The Help system describes concepts, instructions and functions. It also contains reference information and examples. The help opens in a separate window. A navigation pane appears on the left side of the help window. You can also hide the navigation pane to make room on the screen. The navigation pane provides you with the following functions: Table of contents Search in the index Full text search of the entire Help Favorites
Roll-out
Certain text boxes offer information that rolls out and helps you to enter valid parameters and values. The roll-out informs you about permissible value ranges and data types of the text boxes. The following figure shows a roll-out (yellow) and a roll-out error message (red), which indicates an invalid value:
172
Tooltip
Interface elements offer you a tooltip for easier identification. Tooltips, which have an arrow icon on the left, contain additional information in tooltip cascades. If you position the mouse pointer briefly over the tooltip or click the arrow icon, this information is displayed. The automatic display of tooltip cascades can be disabled. If additional information is contained in the Help system, a link appears to the corresponding Help topic in the cascade. If you click on the link, the corresponding topic opens in Help. The following figure shows a tooltip with opened cascade:
173
See also
Disabling the automatic display of tooltip cascades (Page 177)
6.2.2
174
6.2.3
6.2.4
Full-text searches
Full-text searches
To search the entire text for specific words, follow these steps: 1. Click the "Show/hide table of contents" button in the help toolbar to display the table of contents. The table of contents is displayed and the "Index", "Search" and "Favorites" tabs are visible. 2. Open the "Search" tab. 3. Type in your search term in the text box. 4. Refine your search if necessary using additional criteria: Select "Search previous results" to start an additional search operation of your last search results only. Select "Search for similar words" to find words that differ only slightly from your search term. Select "Search titles only" to obtain only results that contain your search term in the title. The contents of the Help topics are ignored during the search.
175
6.2.5
Using favorites
Using favorites
You can save individual help topics as favorites. This saves you searching for the help topic a second time.
Saving favorites:
To save a page as a favorite, follow these steps: 1. Open the help topic or the chapter you want to save as a favorite. 2. Click the "Show/hide table of contents" button in the help toolbar to display the table of contents. The table of contents is displayed and the "Index", "Search" and "Favorites" tabs are visible. 3. Open the "Favorites" tab. 4. Click the "Add" button. The help topic or chapter is saved as a favorite and is available the next time you open the help system.
Calling up favorites:
To call up a page from the favorites, follow these steps: 1. Click the "Show/hide table of contents" button in the help toolbar to display the table of contents. The table of contents is displayed and the "Index", "Search" and "Favorites" tabs are visible. 2. Open the "Favorites" tab.
176
Deleting favorites
To delete an entry from the favorites, proceed as follows: 1. Click the "Show/hide table of contents" button in the help toolbar to display the table of contents. The table of contents is displayed and the "Index", "Search" and "Favorites" tabs are visible. 2. Open the "Favorites" tab. 3. Select the topic you want to remove from the list. 4. Click the "Remove" button.
6.2.6
Printing information
You can either print all the contents of the Help system or individual topics only.
Procedure
To select the topics you would like to print, follow these steps: 1. Click the "Display printing dialog" button. The table of contents opens in a separate window. 2. Select the check boxes for the folders and help topics to be printed in the "Print help topics" dialog. 3. Click the "Print" button to print the selected information. The "Print" dialog opens. 4. Select the printer on which you want print the help topics. 5. Click "Properties" if you want to make additional printer settings. 6. Confirm your entries with "OK". The help topics are printed out on the selected printer.
6.2.7
177
Procedure
To disable the automatic display of tooltip cascades, follow these steps: 1. In the "Options" menu, select the "Settings" command. 2. Select the "General" group in the area navigation. 3. Disable the "Open cascade automatically in tooltips" check box in the "General settings". If you want to display a tooltip cascade manually, click on the arrow icon within the tooltip.
See also
General remarks on the information system (Page 171)
6.2.8
Safety Guidelines
Safety guidelines
This Help manual contains you have to observe in order to ensure your personal safety, as well as to prevent damage to property. The notices referring to your personal safety are highlighted in the manual by a safety alert symbol, notices referring only to property damage have no safety alert symbol. These notices shown below are graded according to the degree of danger. DANGER indicates that death or severe personal injury will result if proper precautions are not taken. WARNING indicates that death or severe personal injury may result if proper precautions are not taken. CAUTION with a safety alert symbol, indicates that minor personal injury can result if proper precautions are not taken. CAUTION without a safety alert symbol, indicates that property damage can result if proper precautions are not taken. NOTICE indicates that an unintended result or situation can occur if the corresponding information is not taken into account.
178
Qualified Personnel
The device/system may only be set up and used in conjunction with this documentation. Commissioning and operation of a device/system may only be performed by qualified personnel. Within the context of the safety notes in this documentation qualified persons are defined as persons who are authorized to commission, ground and label devices, systems and circuits in accordance with established safety practices and standards.
Prescribed Usage
Note the following: WARNING This device may only be used for the applications described in the catalog or the technical description and only in connection with devices or components from other manufacturers which have been approved or recommended by Siemens. Correct, reliable operation of the product requires proper transport, storage, positioning and assembly as well as careful operation and maintenance.
Trademarks
All names identified by are registered trademarks of the Siemens AG. The remaining trademarks in this publication may be trademarks whose use by third parties for their own purposes could violate the rights of the owner.
Disclaimer of Liability
We have reviewed the contents of this publication to ensure consistency with the hardware and software described. Since variance cannot be precluded entirely, we cannot guarantee full consistency. However, the information in this publication is reviewed regularly and any necessary corrections are included in subsequent editions.
179
Editing projects
7.1 The basics of projects
Introduction
Projects are used to organize the storage of data and programs resulting from the creation of an automation solution. The data that makes up a project includes the following: Configuration data on the hardware structure and parameter assignment data for modules Project engineering data for communication over networks Project engineering data for the devices
Project hierarchy
Data is stored in a project in the form of objects. Within the project, the objects are arranged in a tree structure (project hierarchy). The project hierarchy is based on the devices and stations along with the configuration data and programs belonging to them. Common data of the project and online access, for example, are also displayed in the project tree.
See also
Creating a new project (Page 182) Opening projects (Page 182) Saving projects (Page 184) Deleting projects (Page 185)
181
7.2
7.2.1
Procedure
To create a new project, follow these steps: 1. Select the "New" command in the "Project" menu. The "Create a new project" dialog opens. 2. Enter your project name and path or accept the proposed settings. 3. Click the "Create" button.
Result
The new project is created and displayed in the project tree.
See also
The basics of projects (Page 181) Opening projects (Page 182) Saving projects (Page 184) Deleting projects (Page 185)
7.2.2
Procedure
Opening projects
To open an existing project, follow these steps: 1. Select the "Open" command in the "Project" menu. The "Open project" dialog opens and includes the list of most recently used projects. 2. Select a project from the list and click "Open". 3. If the project you require is not included in the list, click the "Browse" button. Navigate to the desired project folder, and open the project file. Projects of the TIA Portal V11 have the extension ".ap11", while older projects from the TIA Portal V10 have the extension "ap10".
Result
The project opens in the project view.
182
Notes on compatibility
When you open a project that was created with an older version of the TIA Portal, the project is converted automatically to the current file format and saved as a new project. The designation "_V11" is added to the file name of the new project. If you want to open a project from a newer version, this is possible if the following conditions are met: The project was created with a different version of the TIA Portal V11, for example, a version with an installed service pack. The project does not contain any data that is incompatible with the current installation. If the project to be opened contains data that was created with optional software, but the corresponding software product is not installed, the following cases can occur: Software components are missing, but none of them are essential: A dialog appears listing the missing software components. After the project is opened, its properties are displayed. You now have the opportunity to install the missing products. All the devices contained in the project are available even if you do not install the missing products. However, you can only work with the devices that are supported by the currently installed software. If devices are not supported because software is missing, they are marked with the following symbol in the project tree: At least one software package is required in order to open the project: A dialog appears listing the missing software components. The essential package(s) are marked. The project can only be opened if you install the missing components.
See also
The basics of projects (Page 181) Creating a new project (Page 182) Saving projects (Page 184) Deleting projects (Page 185)
7.2.3
183
Procedure
To display the project properties, follow these steps: 1. Select the open project in the project tree. 2. Select "Properties" in the shortcut menu of the project. The dialog with the properties of the project opens. 3. Select the project properties in the area navigation that you want to have displayed.
7.2.4
Saving projects
You can save the project at any time either under the same or a different name. You can even save a project when it still contains elements with errors.
Saving a project
To save a project, follow these steps: 1. Select the "Save" command in the "Project" menu. All changes to the project are saved under the current project name.
Project Save as
To save a project under another name, follow these steps: 1. Select the "Save as" command in the "Project" menu. The "Save current project as" dialog opens. 2. Select the project folder in the "Save in" box. 3. Enter the new project name in the "File name" box. 4. Confirm your entry with "Save". The project is saved under the new name and opened.
See also
The basics of projects (Page 181) Creating a new project (Page 182) Opening projects (Page 182) Deleting projects (Page 185)
184
7.2.5
Procedure
Closing projects
To close a project, follow these steps: 1. Select the "Close" command in the "Project" menu. If you have made changes to the project since the last time you saved it, a message is displayed. 2. Decide whether or not you want to save the changes.
7.2.6
Deleting projects
NOTICE When you delete a project, the entire project data is removed from the storage medium.
Requirements
The project you want to delete is not open.
Procedure
Follow the steps below to delete an existing project: 1. Select the "Delete project" command in the "Project" menu. The "Delete project" dialog opens and includes the list of most recently used projects. 2. Select a project from the list. If the project you require is not included in the list, click the "Browse" button. Navigate to the required project folder, and open the project file with the extension ".ap11". 3. Click the "Delete" button. 4. Click "Yes" to confirm. This starts the deletion of the project.
Result
The entire project folder is deleted from the file system.
See also
The basics of projects (Page 181) Creating a new project (Page 182) Opening projects (Page 182) Saving projects (Page 184)
185
7.2.7
7.2.7.1
Project language
Project languages are all languages in which a project will later be used. Based on the editing language, all the texts can be translated to the various project languages. You specify the languages that will be available in the project tree under "Languages & Resources > Project languages".
Editing language
Every project has an editing language. When you enter texts, these are always created in the editing language. You should therefore make sure that the editing language set is the language in which you enter the texts. This avoids problems if you translate the texts later. The editing language does not depend on the language of the user interface. You could, for example, set English as the user interface language, but use Italian as the editing language. If you enter texts, these will be created in this case in the project language "Italian", although the user interface of the TIA Portal displays English. You set the editing language in the project tree under "Languages & Resources > Project languages > Editing language".
186
Translating texts
There are three ways of translating texts. Translating texts directly You can enter the translations for the individual project languages directly in the "Project texts" table. You will find this in the project tree under "Languages & Resources > Project texts". Translating texts using reference texts You can change the editing language for shorter texts. All the text cells are filled again with the default values and can be filled in the current language. As orientation, you can display what you last entered in the box in the reference language. To do this, select the "Tasks" task card and open the "Languages & resources". Exporting texts and translating them externally With larger volumes of text, you can export the texts to an Office Open XML file and translate them with a normal table calculation program. You then import the translated texts again into the TIA Portal. Note Using Asian project languages East Asian project languages are only displayed correctly in Windows XP, if the option "Install files for East Asian languages" is selected on the Languages tab of Regional and Language Options in the Control Panel of Windows XP Professional.
See also
Overview of the program settings (Page 135) Changing the settings (Page 139) Application examples for multilanguage projects (Page 192)
7.2.7.2
187
Requirement
You are in the project view. A project is open.
Procedure
To select the project languages, follow these steps: 1. Click on the arrow symbol to the left of "Languages & Resources" in the project tree. The elements below this are displayed. 2. Double-click on "Project languages". In the work area, you will see a list of languages that you can select. 3. Select the required languages.
Result
All texts can be displayed in the activated languages if there is already a translation for these languages.
7.2.7.3
Requirement
You are in the project view. A project is open.
Procedure
To change the editing language, follow these steps: 1. Click on the arrow symbol to the left of "Languages & Resources" in the project tree. The lower-level elements are displayed. 2. Double-click on "Project languages". The possible settings for the project languages are displayed in the work area. 3. Select the editing language in "General > Editing language".
7.2.7.4
188
Requirement
You are in the project view. A project is open. You have selected at least one further project language.
Procedure
To translate individual texts, follow these steps: 1. Click on the arrow symbol to the left of "Languages & Resources" in the project tree. The elements below this are displayed. 2. Double-click "Project texts". A list with the user texts in the project is displayed in the work area. 3. Click on "System texts" if you you want to edit the list of system texts rather than the user texts. 4. You can improve the clarity of the lists if you have a lot of texts. To group identical texts and to translate them all at once, click the "Switch on/off grouping" button in the toolbar. To hide texts that do not have a translation, click the "Filter for empty texts on/off" button in the toolbar. To further limit the displayed project texts to certain devices, select the devices for which you want to display project texts in the drop-down list. 5. Enter the translation of the project texts in the relevant column. Note If there is no translation for a text in a particular language, the English text is displayed.
7.2.7.5
Introduction
After changing the editing language, all texts are shown in input boxes in the new editing language. If there is not yet a translation available for the newly set language, the input boxes are empty or filled with default values. If you enter text in an input box, this is saved in the current editing language. Following this, the texts exist in two project languages for this input field, in the previous editing language and in the current editing language. This makes it possible to create texts in several project languages.
189
Requirement
There is at least one translation into a different project language for an input field.
Procedure
To display the translation of an input cell in a reference language, follow these steps: 1. In the "Tasks" task card, select the "Languages & Resources" pane. 2. Select a reference language from the "Reference language" drop-down list.
Result
The reference language is preset. If you click in a text box, translations that already exist in other project languages are shown in the "Tasks > Languages & Resources" task card.
See also
Application examples for multilanguage projects (Page 192)
7.2.7.6
190
191
See also
Application examples for multilanguage projects (Page 192)
7.2.7.7
Introduction
Let us assume you are working in a team with colleagues some of whom speak English, some French and some German. You have created a project with the TIA Portal and have already created a functioning configuration. To allow your other colleagues to be able to keep track of the project, you would like all devices being used to have comments in English and German. First, you would like to enter the comments in German. Following this, to save time and costs, you want to have the texts translated into English in a spreadsheet program by an external translation office. In addition to this, you also want a single comment for a particular device in French so that your French-speaking colleague can continue working on this device. The section below describes an example of how you can achieve this with the tools of the TIA Portal.
192
See also
Project text basics (Page 186) Exporting and importing project texts (Page 190) Translating texts using reference texts (Page 189)
7.3
7.3.1
7.3.1.1
193
See also
Compiling project data (Page 194)
Procedure
To compile project data, follow these steps: 1. In the project tree, right-click on the device for which you want to compile the project data. 2. Select the option you require in "Compile" submenu of the shortcut menu. Note Note that the options available to you depend on the selected device. The project data is compiled. You can check whether or not the compilation was successful in the Inspector window with "Info > Compile".
See also
General information on compiling project data (Page 193)
194
7.3.1.2
See also
Downloading project data to a device (Page 196) Loading project data to an accessible device (Page 197) Downloading project data to a memory card (Page 198) Uploading project data from a device (Page 198)
195
Requirement
The project data is consistent. Each device to which you want to download is accessible via an online access.
Procedure
To download the project data to the selected devices, follow these steps: 1. Select one or more devices systems in the project tree. 2. Right-click on a selected element. The shortcut menu opens. 3. Select the option you require in the shortcut menu of the "Download to device" submenu. Note Note that the options available to you depend on the selected device. When necessary, the project data is compiled. If you had previously established an online connection, the "Load preview" dialog opens. This dialog displays messages and proposes actions necessary for downloading. If you had not previously established an online connection, the "Extended download to device" dialog opens, and you must first select the interfaces via which you want to establish the online connection to the device. See also: Establishing and canceling an online connection (Page 2898) 4. Check the messages in the "Load preview" dialog, and select the actions in the "Action" column, if necessary. NOTICE Performing the proposed actions while the plant is in operation can cause serious bodily injury and property damage in the event of malfunctions or program errors. Make sure that no dangerous situations can arise before you start the actions! As soon as loading becomes possible, the "Load" button is enabled. 5. Click the "Load" button. 6. The loading operation is performed. The "Load results" dialog then opens. In this dialog, you can check whether or not the loading operation was successful and take any further action that may be necessary. 7. Click the "Finish" button.
196
Result
The selected project data was downloaded to the devices.
See also
General information on loading (Page 195) Loading project data to an accessible device (Page 197) Downloading project data to a memory card (Page 198) Uploading project data from a device (Page 198)
Requirement
The accessible devices are displayed. See also: Displaying accessible devices (Page 2896)
Procedure
To load project data to an accessible device, follow these steps: 1. In the project tree, drag the folder containing your device to the accessible device. The "Load preview" dialog opens. This dialog displays messages and proposes actions necessary for downloading. 2. Check the messages, and select the actions in the "Action" column, if necessary. NOTICE Performing the proposed actions while the plant is in operation can cause serious bodily injury and property damage in the event of malfunctions or program errors. Make sure that no dangerous situations can arise before you start the actions! 3. As soon as loading becomes possible, the "Load" button is enabled. 4. Click the "Load" button. The loading operation is performed. The "Load results" dialog then opens. In this dialog, you can check whether or not the loading operation was successful and take any further action that may be necessary. 5. Click the "Finish" button.
197
See also
General information on loading (Page 195) Downloading project data to a device (Page 196) Downloading project data to a memory card (Page 198) Uploading project data from a device (Page 198)
Procedure
To download project data to a memory card, follow these steps: 1. Use a drag-and-drop operation in the project tree to take the project data you want to download and move it to the memory card. The "Load preview" dialog opens. This dialog displays messages and proposes actions necessary for downloading. 2. Check the messages, and select the actions in the "Action" column, if necessary. As soon as loading becomes possible, the "Load" button is enabled. 3. Click the "Load" button. The loading operation is performed. The "Load results" dialog then opens. In this dialog, you can check whether or not the loading operation was successful and take any further action that may be necessary. 4. Click the "Finish" button.
See also
General information on loading (Page 195) Downloading project data to a device (Page 196) Loading project data to an accessible device (Page 197) Uploading project data from a device (Page 198)
198
Requirement
A project is open. The hardware configuration and software to be downloaded have to be compatible with the TIA Portal. If the data on the device was created with a previous program version or with a different configuration software, please make sure they are compatible.
199
See also
General information on loading (Page 195) Downloading project data to a device (Page 196) Loading project data to an accessible device (Page 197) Downloading project data to a memory card (Page 198)
7.3.2
7.3.2.1 Function
You have the option of comparing project data of the same type in order to determine possible discrepancies. For example, you can compare a hardware configuration with another hardware configuration. A simple online-online comparison is already performed when you establish an online connection. During this process, comparable objects in the project tree are marked with icons that represent the result of the comparison. Beyond this marking, you can use the comparison editor to compare project data and have detailed information displayed. You can also select actions for non-identical objects in the comparison editor. In addition to the online-offline comparison, there is also an offline-offline comparison available. This allows you to compare project data of two devices within one project or from different projects. Which project data you can compare depends on the products installed.
200
Comparison icons
The result of the comparison is indicated by means of icons. The following table shows the relevant icons and their meaning:
Icon Meaning Folder contains objects whose online and offline versions differ Comparison result is not known Online and offline versions of the object are identical Online and offline versions of the object are different Object only exists offline Object only exists online
7.3.3
7.3.3.1
Introduction
You can protect your project data from unauthorized access. These include, for example: Access protection for devices Copy and display protection of objects Restrictions for printouts of know-how-protected objects Note that every protection mechanism is not available for all objects. How to protect specific objects is described in the online help of the product.
201
See also
Printing project data (Page 219)
7.3.3.2
Requirement
A protection level has been set for the device. A protected function for the device has been enabled by entering the password.
Procedure
To revoke the access rights for the device, follow these steps: 1. Select the device for which you want to revoke access rights in the project tree. 2. Select the "Delete access rights" command in the "Online" menu.
Result
The access rights are revoked, and starting from now the user will be prompted to enter the password again to execute a password-protected function on the device. The function can only be executed if the correct password is entered. If the device has an online connection, it will be disconnected.
See also
Protection concept for project data (Page 201)
7.3.4
7.3.4.1
Introduction
Once a project is created, the contents can be printed in an easy-to-read format. You may print the entire project or individual objects within the project. A well-structured printout is helpful when editing the project or performing service work. The printout can also be used for your customer presentations or as full system documentation. You can prepare the project in the form of standardized circuit manuals and print it in a uniform layout. You can limit the scope of the printout. You have the option to print to the entire project, individual objects along with their properties, or a compact overview of the project. In addition, you can print the contents of an open editor.
202
See also
Creating a frame (Page 208) Creating a cover page (Page 209) Editing cover pages and frames (Page 210) Entering document information (Page 206)
7.3.4.2
203
Scope of printout
To be able to print, at least one printable element has to be selected. If a selected object is printed, all subordinate objects are also printed. For example, if a device is selected in the project tree, all of its data is also printed. When table contents are printed, all lines in the table in which a cell is selected are printed. In order to print one or more table columns, the desired columns must be selected. If no individual cells or columns are selected, the entire table is printed.
See also
Printing project data (Page 219)
7.3.4.3
204
In this case, the printout has the following appearance: Object A Property 1: Value A1 Property 2: Value A2 Object B Property 1: Value B1 Property 2: Value B2
Procedure
To change the print settings, follow these steps: 1. Select the "Settings" command in the "Options" menu. The "Settings" window is displayed in the work area. 2. Select the "General" group. 3. Select the desired default settings in the "Print settings" area. The changes are applied immediately and are retained for all projects, even after the TIA Portal is closed.
See also
Overview of the print settings (Page 138)
7.3.4.4
205
7.3.4.5
206
Procedure
To add metadata, follow these steps: 1. To create new document information, double-click "Add new document information" under "Documentation information > Document information" in the project tree. The new document information is created and opened immediately. 2. Enter a name for the set in the "Name" field. 3. Fill in the individual fields with the metadata for the project.
7.3.4.6
Uses of frames
You can embed the regular pages of your plant documentation inside a consistently uniform page frame. The frame can contain placeholders for project metadata, which is stored in the document information. It can also contain graphic elements that you design yourself. You can create your own frames or rely on ready-made page frames. You can adapt a readymade page frame and then store it again as a new frame. Like cover pages, frames can be saved in global libraries where they are available for use across projects. Frames are designed for use on right printed pages only.
207
See also
Library basics (Page 233) "Libraries" task card (Page 235) Global library basics (Page 246) Designing cover pages and frames (Page 210) Using ready-made frames and cover pages (Page 209)
Creating a frame
You can create any number of frames for each project. The frames are stored in the project tree below the "Documentation information > Frames" group. You can assign a frame to all document information. When you select document information for printing, its associated frame is used.
Procedure
To create a new frame, follow these steps: 1. Double-click the entry "Add new frame" below the "Documentation information > Frames" group in the project tree. The "Add new frame" dialog opens. 2. Enter a name for the frame in the "Name" field. 3. Choose the paper size from the "Paper type" drop-down list. 4. Choose whether the page is to be created in portrait or landscape format in the "Orientation" drop-down list. Click the "Add" button.
Result
A new frame is created. The frame is then opened automatically in the documentation editor where it can be edited.
See also
Editing cover pages and frames (Page 210) Creating a cover page (Page 209)
208
Procedure
To create a new cover page, follow these steps: 1. Double-click the entry "Add new cover page" below the "Documentation information > Cover pages" group in the project tree. The "Add new cover page" dialog box opens. 2. Enter a name for the cover page in the "Name" field. 3. Choose the paper size from the "Paper type" drop-down list. 4. Choose whether the page is to be created in portrait or landscape format in the "Orientation" drop-down list. Click the "Add" button.
Result
A new cover page is created. The cover page is then opened automatically in the documentation editor where it can be edited.
See also
Editing cover pages and frames (Page 210) Creating a frame (Page 208)
Procedure
To create and edit the ready-made frames and cover pages, follow these steps: 1. Open the "Global libraries" pane in the "Libraries" task card. 2. In the "Templates" folder, open the "Cover Pages" or "Frames" folder.
209
See also
Using cover pages and frames (Page 207) Editing cover pages and frames (Page 210)
7.3.4.7
Procedure
To edit a cover page or a frame in the documentation editor, follow these steps: 1. In the project tree, double-click on the entry for an existing cover page or frame under the "Documentation information > Frames " or "Documentation information > Cover pages" group. The documentation editor opens. 2. Design the cover page or frame as desired. 3. Close the documentation editor. The changes to the cover page or frame are applied automatically.
See also
Creating a cover page (Page 209) Creating a frame (Page 208) General operation of the documentation editor (Page 211)
210
211
Toolbar The toolbar provides the following tools (from left to right): Insert background image Inserts a background image into the template or cover page. Arrow tool Enables object selection. Navigation tool Allows shifting of the partial page. Zoom-in button Magnifies the page display incrementally. Zoom-out button Reduces the page display incrementally. Selecting a zoom factor Adapts the page size to the area selected with the lasso zoom tool. Dynamic zoom Adapts the page width to the work area. Work area You can design the cover page or frame in the work area. "Toolbox" task card The "Toolbox" task card contains various types of placeholders that you can use on the cover sheet or frame. The placeholders can be placed in the work place using a drag-and-drop operation. Properties in the Inspector window You can display and modify the properties of the currently selected object in the "Properties" tab of the Inspector window. For example, you can modify the properties of the page, format text, specify the position of objects on the page, etc.
212
213
See also
Editing cover pages and frames (Page 210) Inserting a background image (Page 214) Specifying the print area (Page 214) Inserting placeholders for metadata (Page 215)
Requirement
The background image must be in EMF or PDF format. A cover page is open in the documentation editor.
Procedure
To insert a background image, follow these steps: 1. Click the "Add background image" button. The "Open" dialog box opens. 2. Select the background image in the file system. 3. Click the "Open" button. The background image is inserted in its original size at the top left page margin.
See also
Creating a cover page (Page 209) General operation of the documentation editor (Page 211)
214
Requirement
A frame is open in the documentation editor.
Procedure
To define an area for the printed contents, follow these steps: 1. Click on the slightly darker area within the page display in the documentation editor to select the area for the print content. This opens the properties of the area to be printed in the Inspector window. 2. Enter the position of the print area on the X and Y axes in the Inspector window. 3. Specify the width and height of the print area in cm in the Inspector window. Alternatively, you can change the width and position of the print area in the graphic display of the page. To do so, use the mouse to drag the margins of the print area until the desired size and position are achieved.
See also
Creating a frame (Page 208) General operation of the documentation editor (Page 211)
Types of placeholders
The following types of placeholders are available to you: Text field The text field stands as a placeholder for a text element from a document information. In the properties of the text field, you set which text from a document information should be automatically inserted during printing. Field for date and time A date and time is inserted instead of the placeholder when printing. This can be the date of creation or the point in time when the last change was made to the project. In the properties of the Inspector window, you specify which date or time is printed. Page number The correct page number is automatically applied when printing.
215
Requirement
An cover page or frame is open in the documentation editor.
Procedure
To insert placeholders for metadata on the cover sheet or in a frame, follow these steps: 1. Drag a field from the "Toolbox > Elements" task card to the work area of the documentation editor. The placeholder is inserted. The placeholder properties are shown in the Inspector window and can be edited there. 2. Select the metadata to be inserted during printing from the "Text" drop-down list in the Inspector window under "Properties > General > Text box". Alternatively, you have the option of entering free text or selecting an image depending on the type of placeholder. 3. In the Inspector window under "Properties > General > Position and size", specify the position of the placeholder on the X and Y axis and enter the width and height of the text box in cm. You specify the sequence of the objects in the "Z-Order" field, if these overlap. The smaller the value, the further down an object is located. 4. In the Inspector window, go to "Properties > View" and select the font formatting and the orientation of the text as well as the alignment of the text. You cannot make this setting for images.
See also
General operation of the documentation editor (Page 211)
7.3.4.8
216
Procedure
To create a print preview and to set the scope of the later printout, follow these steps: 1. Select the "Print preview" command in the "Project" menu. The "Print preview" dialog opens. 2. Select the frame layout you want to use for the printout. In the "Document information" drop-down list, select the documentation information you want to use later for the printout. Select the "Print cover page" check box to print the cover page, which is specified in the selected document information. Select the "Print table of contents" check box to add a table of contents to the printout. The check boxes for printing the cover page and the table of contents can only be selected if you have started the printout in the project tree. 3. Under "Print objects/area", select what is to be printed. The selection is only possible if you have started the printout from an editor that supports this function. Choose "All" to print out the entire content of the editor. Choose "Selection" to print only the objects currently selected in the editor. 4. Select the print scope under "Properties". Choose "All" to print all configuration data of the selected objects. Choose "Visible" to print the information of an editor that is currently visible on the screen. This option can only be chosen if you have started the printout from an editor that supports this function. Choose "Compact" to print out an abbreviated version of the project data. 5. Click "Preview" to generate the preview. A print preview is created in the work area. Note Wait time for extensive documents It can take several minutes to generate the print preview in the case of very extensive projects. You can continue working normally in the meantime on systems with adequate resources. The progress of the print preview is shown in the status bar.
See also
Operation within the print preview (Page 218)
217
Operation within the print preview Functions within the print preview
The print preview shows an exact image of the subsequent printout. You can use the buttons in the toolbar to modify the print preview display. The following functions are available (from left to right): Navigation mode Allows shifting of the partial page. To change the partial page with the navigation tool, select the arrow button in the toolbar. Then, click anywhere on the page and hold the mouse button down while moving the page to the desired position. Zoom function "Zoom in" and "Zoom out" Magnifies or reduces the page display. To zoom in or zoom out the display incrementally, select the corresponding button. Then click on the page in order to magnify (zoom in) or reduce (zoom out) the page incrementally. To zoom in on a particular area, select the "Lasso zoom" button and use the mouse to drag an outline around the area you want to focus on. To select an area to focus on, select the button "Zoom in / zoom out with rectangle". With the mouse, drag a border around the area to focus on it. To zoom dynamically through the page, select the button "Zoom in / zoom out dynamically". With pressed mouse button, scroll down over the page to zoom in. Scroll up to zoom out. Percentage value in the drop-down list Specifies the display size of the page in percent. Enter a percentage value or select a percentage value from the drop-down list. Alternatively, choose the the "Fit to page" option from the drop-down list to adapt the page size to the work area. Or, choose "Fit to width" to adapt the page width to the work area.
218
See also
Creating a print preview (Page 216)
7.3.4.9
Requirement
At least one printer is configured. The objects to be printed are not protected. If printing is restricted by access protection, you must temporarily cancel the password protection in order to release the objects for printing. Otherwise, protected objects will not be included in the printout.
219
220
Result
The project data is prepared in the background for printing and then printed on the selected printer. The status bar shows the progress of the print operation. You can continue working normally while data is being prepared for printing. The print results and any errors or warnings are listed in the Inspector window under "Info" at the conclusion of the print job.
See also
Protection concept for project data (Page 201) Revoking access rights for devices (Page 202) Printout of project contents (Page 203) Designing cover pages and frames (Page 210)
7.4
7.4.1
Function
You can undo performed actions at any time. For this purpose, every action you perform is saved in an action stack. When undoing actions, the stack is processed from top to bottom. In other words, if you undo an action that lies further down in the stack, all actions located above it in the stack will also be undone automatically. You can redo previously undone actions until you execute a new action. Once you execute a new action, it is no longer possible to redo previously undone actions.
221
In this example, you cannot undo actions 1 to 3 because the project was saved. You can undo actions 4 to 10 in the order indicated by the direction of the arrow. In other words, you must undo action 10 first. Once you have undone action 8, you cannot then undo action 5. You must first undo actions 7 and 6. As the final step in the sequence, you can then undo action 4. You also have the option of undoing several actions in a single step by undoing an action located further down in the action stack. All actions located above it in the stack will be undone automatically. The same principle also applies to redoing of actions.
222
See also
Undoing an action (Page 223) Redoing an action (Page 224)
7.4.2
Undoing an action
The following options are available for undoing actions: Undoing the last action only Only the last action performed is undone. Undoing as many actions as required Multiple actions in the action stack are undone in a single step.
See also
Basics of undoing and redoing actions (Page 221) Redoing an action (Page 224)
223
7.4.3
Redoing an action
You have the option of redoing an action that has been undone, so that you can return to the status present before "Undo" was performed. However, this is only possible until you perform a new action. The following options are available for redoing actions: Redoing the last undone action only Only the last undone action is redone. Redoing as many undone actions as required Multiple undone actions in the action stack are redone in a single step.
See also
Basics of undoing and redoing actions (Page 221) Undoing an action (Page 223)
224
7.5
7.5.1
See also
Search and replace (Page 225)
7.5.2
Using Find
The "Find and replace" function enables you to search for or replace texts in an editor.
225
Start search
Follow these steps to start the "Find and replace" function: 1. Select the "Find and replace" command in the "Edit" menu or open the "Find and replace" pane in the "Tasks" task card. The "Find and replace" pane opens. 2. Enter a term in the "Find" drop-down list. As an alternative, you can select the most recent search key from the drop-down list. 3. Select the options desired for the search. 4. Using the option buttons, select the starting point for the search and the search direction. Select "Whole document" if you want to search through the entire editor regardless of the current selection, Select "From current position" if you want to start the search at the current selection. Select "Selection" if you only want to search within the current selection. Select "Down" to search through the editor from top to bottom or from left to right. Select "Up" to search through the editor from bottom to top or from right to left. 5. Click "Find". The first hit is marked in the editor. 6. Click "Find" again to display the next hit. The next hit is marked in the editor. Repeat this process, as necessary, until you reach the last hit.
226
See also
Information on the search function (Page 225)
7.6
7.6.1
Introduction
You can manage texts to be referenced in alarms centrally. All the texts are stored in text lists. Each text list has a unique name with which you can call up its content. A range of values is assigned to each text in a text list. If a value from a range of values occurs, the corresponding text is called up. All the texts can be translated to all project languages. Here, you have two options available: You can enter the translation of the texts in a list. You will find the list in the project tree under "Languages & Resources > Project texts". You can export all texts to a file in Office Open XML format and enter the translation in a spreadsheet program. The translations can then be imported again. The texts are translated into the other project languages within the framework of the project texts. In the text lists editor, you only have to manage the assignment of individual texts to a text list. Each device in the project has its own text lists. For this reason, these lists are arranged under the devices in the project tree. In addition, there are text lists that apply to all devices. These can be found in the project tree under "Common data > Text lists".
227
See also
Exporting and importing project texts (Page 190)
7.6.2
228
Requirement
You are in the project view. A project is open. The project includes a least one device.
Procedure
To create user-defined text lists, follow these steps: 1. Click on the arrow to the left of a device in the project tree. The elements arranged below the device are displayed. 2. Double-click on "Text lists". All the text lists assigned to the device are displayed in the work area listed in a table. 3. Double-click on the first free row in the table. A new user-defined text list is created. 4. Enter a name for your new text list in the "Name" column. 5. From the drop-down list in the "Selection" column, select whether you want to specify the value ranges in decimal, binary or in bits. Depending on the device, there may be further options available at this point. 6. Enter a comment in the "Comment" column. A new user-defined text list has been created and you can now enter the value ranges and texts.
7.6.3
Requirement
You are in the project view. A project is open. The project includes a least one device.
229
7.6.4
Requirement
You are in the project view. A project is open. The project includes a least one device.
230
7.7
7.7.1
Introduction
Memory cards are plug-in cards that come in a variety of types and can be used for a variety of purposes. Depending on the device type or device family, memory cards can be used for purposes, such as: Load memory of a CPU Storage medium for projects, firmware backups, or any other files Storage medium for performing a firmware update Storage medium for the PROFINET device name For information regarding the technical variants of the respective memory cards and general information on their handling, refer to the respective documentation for the device. For information on handling memory cards in the TIA Portal, refer to the online help under keyword "Memory Card". CAUTION Do not use memory cards for non-SIMATIC-related purposes, and do not use third-party devices or Windows tools to format them. This will irrevocably overwrite the internal structure of the memory card, rendering it unusable for SIMATIC devices!
See also
Adding a user-defined card reader (Page 231) Accessing memory cards (Page 232) Displaying properties of memory cards (Page 232)
7.7.2
Introduction
If your card reader is not detected automatically, you can add it manually.
Requirement
The project view is open.
231
Procedure
To add a card reader, follow these steps: 1. Open the project tree. 2. Select "SIMATIC Card Reader > Add user-defined Card Reader" in the "Project" menu. The "Add user-defined Card Reader" dialog opens. 3. In the drop-down list box, select the path for the card reader. 4. Confirm your entries with "OK".
See also
Basics about memory cards (Page 231) Accessing memory cards (Page 232) Displaying properties of memory cards (Page 232)
7.7.3
Requirement
A memory card is inserted in the card reader. The project view is open.
Procedure
To access memory cards, follow these steps: 1. Open the project tree. 2. Select "SIMATIC Card Reader > Show SIMATIC Card Reader" in the "Project" menu. The "SIMATIC Card Reader" folder is displayed in the project tree. 3. Open the "SIMATIC Card Reader" folder. You can now access the memory card.
See also
Basics about memory cards (Page 231) Adding a user-defined card reader (Page 231) Displaying properties of memory cards (Page 232)
7.7.4
232
Requirement
A memory card is inserted in the card reader. The project view is open.
Procedure
To display the properties of a memory card, follow these steps: 1. Right-click on the memory card for which you want to display the properties. 2. Select the "Properties" command in the shortcut menu. The "Memory Card <name of the memory card>" dialog opens. The properties are displayed in this dialog.
See also
Basics about memory cards (Page 231) Adding a user-defined card reader (Page 231) Accessing memory cards (Page 232)
7.8
7.8.1
Using libraries
Library basics
Introduction
You can store objects you want to use more than once in libraries. It is possible to reuse the stored objects throughout a project or across projects. This means you can, for example, create block templates for use in different projects and adapt them to the particular requirements of your automation task.
233
Library types
Depending on the task, you can use one of the following library types: Project library Each project has its own library. Here, you store the objects you want to use more than once in the project. This project library is always opened, saved, and closed together with the current project. Global libraries You can also create other libraries in addition to the project library. Here, you store the objects you want to use in more than one project. You can create, change, save, and transfer these global libraries independent of projects. In the global libraries area, you will also find libraries that ship with the software. These include off-the-peg functions and function blocks that you can use within your project. You cannot modify the supplied libraries.
Library objects
Libraries can accommodate a large number of objects. These include, for example: Functions (FCs) Function blocks (FBs) Data blocks (DBs) Devices PLC data types Watch and force tables Process screens Faceplates For objects with know-how protection, this protection is also retained after the object is inserted into a library.
Use types
You can use the library elements as either a copy template or a type. You can use copy templates to generate copies of the library element that are independent of one another. Copy templates are marked with a black triangle in the "Libraries" task card. You can derive and use instances from types. These instances are tied to their respective type, and changes to one instance also change all other instances. Types are marked with a green triangle in the "Libraries" task card. Note Please note the following: The use as a type is not available for every object. You can only create types in the project library.
234
See also
Project library basics (Page 238) Global library basics (Page 246) "Libraries" task card (Page 235)
7.8.2
235
"Project library" pane
"Project library" pane "Global libraries" pane "Elements" pane "Parts" pane "Types" folder "Master copies" folder
In this pane, you can store the objects that you want to use more than once in the project.
236
"Elements" pane
In this pane, you can display the elements of a library.
"Parts" pane
In this pane, you can display the contents of the library elements.
"Types" folder
In this directory, you can create types of your objects in the project library and insert them as instances. You cannot create types in a global library. You can copy a type in the project library and paste it into the "Types" folder of a global library.
See also
Library basics (Page 233) Working with the project library (Page 238) Working with global libraries (Page 246) Using the elements and parts view (Page 237)
7.8.3
Introduction
When you open the "Libraries" task card the first time, the "Project library" and "Global libraries" panes are opened and the "Parts" pane is closed. You need to open the "Elements" pane explicitly. The elements view shows the elements of the selected library. You can select one of the following views:
237
Requirement
The "Libraries" task card is displayed.
Procedure
To use the elements and parts view, follow these steps: 1. Click "Open or close the element view" in the "Project library" or "Global libraries" pane.
See also
Library basics (Page 233) "Libraries" task card (Page 235) Working with the project library (Page 238) Working with global libraries (Page 246)
7.8.4
7.8.4.1 Function
In the project library, you can store the elements that you want to use more than once in the project. The project library is generated and saved automatically with the project.
See also
Library basics (Page 233)
7.8.4.2
Requirement
The "Libraries" task card is displayed.
238
Procedure
To create a new folder, follow these steps: 1. Right-click any folder within the project library. 2. Select "Add folder" from the shortcut menu. A new folder is created. 3. Enter a name for the new folder.
See also
Project library basics (Page 238) Adding elements to the project library (Page 239) Using elements of the project library (Page 241) Editing elements of a project library (Page 243) Removing elements from the project library (Page 245) Filtering the view (Page 246)
7.8.4.3
Procedure
To add a new copy template to the project library, follow these steps: 1. Open the project library in the "Project library" pane of the "Libraries" task card. 2. Select the element you want to add as a copy template to the project library, and use a drag-and-drop operation to move it to the "Master copies" folder or any of its subfolders in the project library. Release the left mouse button when a small plus symbol appears below the mouse pointer.
Result
The element is inserted into the project library as a copy template. You can generate copies from this template and use them anywhere in the TIA Portal where it is permissible.
239
See also
Library basics (Page 233) Project library basics (Page 238) Adding types to the project library (Page 240)
Procedure
To add a new type to the project library, follow these steps: 1. Open the project library in the "Project library" pane of the "Libraries" task card. 2. Right-click the "Types" folder or any of its subfolders. 3. Select the "Add new type" command in the shortcut menu. The dialog for generating types opens. Note If your installed products do not contain any objects from which types can be generated, the "Add new type" command is not available. Use master copies in this case. 4. In the dialog, choose the element from which you want to generate a type. 5. Specify all other necessary data. 6. Click "OK".
Result
A new type is generated and inserted into the project library. You can generate instances from this type and use them anywhere in the TIA Portal where it is permissible. The instances are tied to the type, i.e., changes to one instance are passed on to the other instances.
See also
Library basics (Page 233) Project library basics (Page 238) Adding master copies to the project library (Page 239)
240
7.8.4.4
Requirement
The "Libraries" task card is displayed.
Procedure
To generate and use a copy from a copy template, follow these steps: 1. Open the "Master copies" folder or any of its subfolders in the project library so that you looking at the master copy from which you want to generate a copy. 2. Use a drag-and-drop operation to move the copy template from the project library to the location where you want to use it. If you are not permitted to insert it at this location, the mouse pointer changes to a circle with a slash. A copy based on the copy template is inserted. If there is already an element with the same name at this location, the "Paste" dialog opens. In this dialog, you can decide whether to replace the existing element or to insert the copy with a different name. Note The "Paste" dialog is not displayed for all elements. The elements for which the dialog is available depends on the installed products.
Or: 1. Open the element view. 2. Use a drag-and-drop operation to move the copy template from the "Elements" pane to the location where you want to use it. If you are not permitted to insert it at this location, the mouse pointer changes to a circle with a slash. A copy based on the copy template is inserted. If there is already an element with the same name at this location, the "Paste" dialog opens. In this dialog, you can decide whether to replace the existing element or to insert the copy with a different name. Note The "Paste" dialog is not displayed for all elements. The elements for which the dialog is available depends on the installed products.
Result
A copy is generated from the copy template and inserted at the location where you want to use it. You can create any number of copies from a copy template.
241
See also
Library basics (Page 233) Project library basics (Page 238) Using types (Page 242) Using the elements and parts view (Page 237)
Using types
You use the types you inserted into the project library in order to generate instances of elements and insert them in the TIA Portal, where permissible. The instances are generated and used in a single operation.
Requirement
The "Libraries" task card is displayed.
Procedure
To generate and use an instance from a type, follow these steps: 1. Open the "Types" folder or any of its subfolders in the project library so that you looking at the type from which you want to generate an instance. 2. Use a drag-and-drop operation to move the type from the project library to the location where you want to use it. If you are not permitted to insert it at this location, the mouse pointer changes to a circle with a slash. The type is inserted as an instance. If there is already an element with the same name at this location, the "Paste" dialog opens. In this dialog, you can decide whether to replace the existing element or to insert the instance with a different name. Note The "Paste" dialog is not displayed for all elements. The elements for which the dialog is available depends on the installed products. Or: 1. Open the element view. 2. Use a drag-and-drop operation to move the type from the "Elements" pane to the location where you want to use it. If you are not permitted to insert it at this location, the mouse pointer changes to a circle with a slash. The type is inserted as an instance. If there is already an element with the same name at this location, the "Paste" dialog opens. In this dialog, you can decide whether to replace the existing element or to insert the instance with a different name. Note The "Paste" dialog is not displayed for all elements. The elements for which the dialog is available depends on the installed products.
242
Result
An instance is generated from the type and inserted at the location where you want to use it. You can create any number of instances from a type. The instances are tied to the type, i.e., changes to one instance are passed on to the other instances.
See also
Library basics (Page 233) Project library basics (Page 238) Using master copies (Page 241)
7.8.4.5
Requirement
The "Libraries" task card is displayed.
Copying elements
To copy a library element, follow these steps: 1. Right-click on the library element you want to copy. 2. Select the "Copy" command in the shortcut menu.
Cutting elements
To cut a library element, follow these steps: 1. Right-click on the library element you want to cut. 2. Select the "Cut" command in the shortcut menu.
243
Note You can only paste previously cut library elements into the same library. In so doing, you can only paste master copies into the "Master copies" folder or any of its subfolders. Likewise, you can only paste types into the "Types" folder or any of its subfolders.
Pasting elements
To paste a library element, follow these steps: 1. Copy a library element. 2. Right-click the library where you want to paste the element. 3. Select the "Paste" command in the shortcut menu.
Moving elements
To move a library element, follow these steps: 1. Select the library element you want to move. 2. Use a drag-and-drop operation to move the library element to the folder where you want to insert the element. Note Note the following: When you move an element from one library to another, the element is copied and not moved. You cannot move master copies into a type folder or a type into a master copies folder.
Renaming elements
To rename a library element, follow these steps: 1. Right-click the element you want to rename. 2. Select the "Rename" command in the shortcut menu. 3. Enter the new name.
244
See also
Library basics (Page 233) Project library basics (Page 238) Creating folders in the project library (Page 238) Adding elements to the project library (Page 239) Using elements of the project library (Page 241) Removing elements from the project library (Page 245) Filtering the view (Page 246)
7.8.4.6
Requirements
The "Libraries" task card is displayed.
Procedure
To remove an element from the project library, follow these steps: 1. In the "Project library" pane, maximize the folder containing the element you want to remove. 2. Right-click the element. 3. Select the "Delete" command in the shortcut menu. Or: 1. Open the element view. 2. Right-click the element you want to remove in the "Elements" pane. 3. Select the "Delete" command in the shortcut menu.
See also
Library basics (Page 233) Project library basics (Page 238) Creating folders in the project library (Page 238) Adding elements to the project library (Page 239) Using elements of the project library (Page 241) Editing elements of a project library (Page 243) Filtering the view (Page 246)
245
7.8.4.7
Requirement
The "Libraries" task card is displayed.
Procedure
To filter the view, follow these steps: 1. Open either the "Project library" pane or "Global libraries" pane. 2. In the drop-down list, select the object type for which you want to display the library elements.
Result
Only the library elements that are available for the object type are displayed. You can set the filter to "All" at any time to revert to an unfiltered view.
See also
Library basics (Page 233) Project library basics (Page 238) Creating folders in the project library (Page 238) Adding elements to the project library (Page 239) Using elements of the project library (Page 241) Editing elements of a project library (Page 243) Removing elements from the project library (Page 245)
7.8.5
7.8.5.1 Function
You can store elements that you want to reuse in other projects in global libraries. You must create global libraries explicitly. Depending on the products installed, global libraries supplied by Siemens are also installed. You can use, but not change, the elements of these libraries.
246
See also
Library basics (Page 233)
7.8.5.2
Requirement
The "Libraries" task card is displayed.
Procedure
To create a new global library, follow these steps: 1. Click "Create new global library" in the toolbar of the "Global libraries" pane or select the menu command "Options > Global libraries > Create new library". The "Create new global library" dialog opens. 2. Specify the name and the storage location for the new global library. 3. Confirm your entries with "Create".
Result
The new global library is generated and inserted into the "Global libraries" pane. A folder with the name of the global library is created in the file system at the storage location of the global library. This actual library file is given the file name extension ".al11".
247
See also
Library basics (Page 233) Global library basics (Page 246) Opening a global library (Page 248) Displaying properties of global libraries (Page 249) Saving a global library (Page 250) Closing a global library (Page 252) Deleting a global library (Page 252) Creating folders in the global libraries (Page 253) Editing elements of a global library (Page 259) Removing elements from a global library (Page 261) Adding elements to a global library (Page 254) Using elements of a global library (Page 256) Using a supplied global library (Page 262) Filtering the view (Page 263)
7.8.5.3
Requirement
The "Libraries" task card is displayed.
Procedure
To open a global library, follow these steps: 1. Click "Open global library" in the toolbar of the "Global libraries" pane or select the menu command "Options > Global libraries > Open library". The "Open global library" dialog box is displayed. 2. Select the global library you want to open. Library files are identified by the file name extension ".al11".
248
See also
Library basics (Page 233) Global library basics (Page 246) Creating a new global library (Page 247) Displaying properties of global libraries (Page 249) Saving a global library (Page 250) Closing a global library (Page 252) Deleting a global library (Page 252) Creating folders in the global libraries (Page 253) Adding elements to a global library (Page 254) Using elements of a global library (Page 256) Editing elements of a global library (Page 259) Removing elements from a global library (Page 261) Using a supplied global library (Page 262) Filtering the view (Page 263)
7.8.5.4
249
Requirement
The "Libraries" task card is displayed.
Procedure
To display the properties of a global library, follow these steps: 1. Right-click the global library whose properties you want to display. 2. Select the "Properties" command in the shortcut menu. A dialog containing the properties of the global libraries opens. 3. Select the properties in the area navigation that you want to have displayed.
See also
Opening a global library (Page 248) Library basics (Page 233) Global library basics (Page 246) Creating a new global library (Page 247) Saving a global library (Page 250) Closing a global library (Page 252) Deleting a global library (Page 252) Creating folders in the global libraries (Page 253) Adding elements to a global library (Page 254) Using elements of a global library (Page 256) Editing elements of a global library (Page 259) Removing elements from a global library (Page 261) Using a supplied global library (Page 262) Filtering the view (Page 263)
7.8.5.5
250
Requirement
The "Libraries" task card is displayed. The global library is not write protected.
Saving changes
To save a global library, follow these steps: 1. Right-click on the global library you want to save. 2. Select the "Save library" command in the shortcut menu.
See also
Library basics (Page 233) Global library basics (Page 246) Creating a new global library (Page 247) Opening a global library (Page 248) Displaying properties of global libraries (Page 249) Closing a global library (Page 252) Deleting a global library (Page 252) Creating folders in the global libraries (Page 253) Adding elements to a global library (Page 254) Using elements of a global library (Page 256) Editing elements of a global library (Page 259) Removing elements from a global library (Page 261) Using a supplied global library (Page 262) Filtering the view (Page 263)
251
7.8.5.6
Requirement
The "Libraries" task card is displayed.
Procedure
To close a global library, follow these steps: 1. Right-click on the global library you want to close. 2. Select the "Close library" command in the shortcut menu. 3. If you make changes to the global library, a dialog box opens where you can choose whether you want to save the changes to the global library. Click "Yes" or "No", depending on whether or not you would like to save your changes. The global library is closed.
See also
Creating a new global library (Page 247) Opening a global library (Page 248) Displaying properties of global libraries (Page 249) Saving a global library (Page 250) Library basics (Page 233) Global library basics (Page 246) Deleting a global library (Page 252) Creating folders in the global libraries (Page 253) Adding elements to a global library (Page 254) Using elements of a global library (Page 256) Editing elements of a global library (Page 259) Removing elements from a global library (Page 261) Using a supplied global library (Page 262) Filtering the view (Page 263)
7.8.5.7
252
Requirements
The "Libraries" task card is displayed.
Procedure
To delete a global library, follow these steps: 1. Right-click the global library you want to delete. 2. Select the "Delete" command in the shortcut menu. 3. Click "Yes" to confirm.
Result
The global library is removed from the "Global libraries" pane and deleted from the file system.
See also
Library basics (Page 233) Global library basics (Page 246) Creating a new global library (Page 247) Opening a global library (Page 248) Displaying properties of global libraries (Page 249) Saving a global library (Page 250) Closing a global library (Page 252) Creating folders in the global libraries (Page 253) Adding elements to a global library (Page 254) Using elements of a global library (Page 256) Editing elements of a global library (Page 259) Removing elements from a global library (Page 261) Using a supplied global library (Page 262) Filtering the view (Page 263)
7.8.5.8
Requirements
The "Libraries" task card is displayed. The global library is not write protected.
253
Procedure
To create a new folder, follow these steps: 1. Right-click any folder within the global library. 2. Select "Add folder" from the shortcut menu. A new folder is created. 3. Enter a name for the new folder.
See also
Global library basics (Page 246) Library basics (Page 233) Creating a new global library (Page 247) Opening a global library (Page 248) Displaying properties of global libraries (Page 249) Saving a global library (Page 250) Closing a global library (Page 252) Deleting a global library (Page 252) Adding elements to a global library (Page 254) Using elements of a global library (Page 256) Editing elements of a global library (Page 259) Removing elements from a global library (Page 261) Using a supplied global library (Page 262) Filtering the view (Page 263)
7.8.5.9
254
Procedure
To add a new copy template to a global library, follow these steps: 1. In the Global libraries" pane of the "Libraries" task card, open the global library to which you want to add the copy template. 2. Select the element you want to add as a master copy to the global library, and use a dragand-drop operation to move it to the "Master copies" folder or any of its subfolders in the global library. Release the left mouse button when a small plus symbol appears below the mouse pointer.
Result
The element is inserted into the global library as a copy template. You can generate copies from this template and use them anywhere in the TIA Portal where it is permissible.
See also
Library basics (Page 233) Global library basics (Page 246) Adding types to a global library (Page 255)
Requirement
The "Libraries" task card is displayed. A type is available in the project library.
Procedure
To add a type to a global library, follow these steps: 1. Open the project library in the "Project library" pane of the "Libraries" task card. 2. Right-click the type which you want to paste into the global library. 3. In the shortcut menu, select "Copy". 4. Right-click the type which you want to paste into the global library. 5. In the shortcut menu, select "Paste".
Result
The type is inserted in the global library. You can generate instances from this type and use them anywhere in the TIA Portal where it is permissible. The instances are tied to the type, i.e., changes to one instance are passed on to the other instances.
255
See also
Library basics (Page 233) Global library basics (Page 246) Adding master copies to a global library (Page 254)
7.8.5.10
Requirements
The "Libraries" task card is displayed.
Procedure
To generate and use a copy from a copy template, follow these steps: 1. Open the "Master copies" folder or any of its subfolders in the global library so that you looking at the master copy from which you want to generate a copy. 2. Use a drag-and-drop operation to move the copy template from the global library to the location where you want to use it. If you are not permitted to insert it at this location, the mouse pointer changes to a circle with a slash. A copy based on the copy template is inserted. If there is already an element with the same name at this location, the "Paste" dialog opens. In this dialog, you can decide whether to replace the existing element or to insert the copy with a different name. Note The "Paste" dialog is not displayed for all elements. The elements for which the dialog is available depends on the installed products. Or:
256
Result
A copy is generated from the copy template and inserted at the location where you want to use it. You can create any number of copies from a copy template.
See also
Library basics (Page 233) Global library basics (Page 246) Using types (Page 257) Using the elements and parts view (Page 237)
Using types
You use the types you inserted into a global library in order to generate instances of elements and insert them in the TIA Portal, where permissible. The instances are generated and used in a single operation.
Requirements
The "Libraries" task card is displayed.
257
Procedure
To generate and use an instance from a type, follow these steps: 1. Open the "Types" folder or any of its subfolders in the global library so that you looking at the type from which you want to generate an instance. 2. Use a drag-and-drop operation to move the type from the global library to the location where you want to use it. If you are not permitted to insert it at this location, the mouse pointer changes to a circle with a slash. The type is inserted as an instance. If there is already an element with the same name at this location, the "Paste" dialog opens. In this dialog, you can decide whether to replace the existing element or to insert the instance with a different name. Note The "Paste" dialog is not displayed for all elements. The elements for which the dialog is available depends on the installed products. Or: 1. Open the element view. 2. Use a drag-and-drop operation to move the type from the "Elements" pane to the location where you want to use it. If you are not permitted to insert it at this location, the mouse pointer changes to a circle with a slash. The type is inserted as an instance. If there is already an element with the same name at this location, the "Paste" dialog opens. In this dialog, you can decide whether to replace the existing element or to insert the instance with a different name. Note The "Paste" dialog is not displayed for all elements. The elements for which the dialog is available depends on the installed products.
Result
An instance is generated from the type and inserted at the location where you want to use it. You can create any number of instances from a type. The instances are tied to the type, i.e., changes to one instance are passed on to the other instances.
See also
Library basics (Page 233) Global library basics (Page 246) Using master copies (Page 256) Using the elements and parts view (Page 237)
258
7.8.5.11
Requirements
The "Libraries" task card is displayed. The global library is not write protected.
Copying elements
To copy a library element, follow these steps: 1. Right-click on the library element you want to copy. 2. Select the "Copy" command in the shortcut menu.
Cutting elements
To cut a library element, follow these steps: 1. Right-click on the library element you want to cut. 2. Select the "Cut" command in the shortcut menu. Note You can only paste previously cut library elements into the same library. In so doing, you can only paste master copies into the "Master copies" folder or any of its subfolders. Likewise, you can only paste types into the "Types" folder or any of its subfolders.
Pasting elements
To paste a library element, follow these steps: 1. Copy a library element. 2. Right-click the library where you want to paste the element. 3. Select the "Paste" command in the shortcut menu.
259
Moving elements
To move a library element within a library, follow these steps: 1. Select the library element you want to move. 2. Drag the library element to the library where you want to insert the element. Note When you move an element from one library to another, the element is copied and not moved.
Renaming elements
To rename a library element, follow these steps: 1. Right-click the element you want to rename. 2. Select the "Rename" command in the shortcut menu. 3. Enter the new name.
See also
Library basics (Page 233) Global library basics (Page 246) Creating a new global library (Page 247) Opening a global library (Page 248) Displaying properties of global libraries (Page 249) Saving a global library (Page 250) Closing a global library (Page 252) Deleting a global library (Page 252) Creating folders in the global libraries (Page 253) Adding elements to a global library (Page 254) Using elements of a global library (Page 256) Removing elements from a global library (Page 261) Using a supplied global library (Page 262) Filtering the view (Page 263)
260
7.8.5.12
Requirements
The "Libraries" task card is displayed. The global library is not write protected.
Procedure
To remove an element from a global library, follow these steps: 1. In the "Global libraries" pane, maximize the folder containing the element you want to remove. 2. Right-click the element. 3. Select the "Delete" command in the shortcut menu. Or: 1. Open the element view. 2. Right-click the element you want to remove in the "Elements" pane. 3. Select the "Delete" command in the shortcut menu.
See also
Library basics (Page 233) Global library basics (Page 246) Creating a new global library (Page 247) Opening a global library (Page 248) Displaying properties of global libraries (Page 249) Saving a global library (Page 250) Closing a global library (Page 252) Deleting a global library (Page 252) Creating folders in the global libraries (Page 253) Adding elements to a global library (Page 254) Using elements of a global library (Page 256) Editing elements of a global library (Page 259) Using a supplied global library (Page 262) Filtering the view (Page 263)
261
7.8.5.13
Requirement
The "Libraries" task card is displayed.
Procedure
To use an element from a supplied global library in your project, follow these steps: 1. Open the relevant library so that you can see the elements of the library. 2. Drag the element from the "Global libraries" pane and drop it on the location where you want to use it. If you are not permitted to insert it at this location, the mouse pointer changes to a circle with a slash. Or: 1. Open the element view. 2. Use a drag-and-drop operation to move the element from the "Parts" pane to the location where you want to use it. If you are not permitted to insert it at this location, the mouse pointer changes to a circle with a slash.
See also
Library basics (Page 233) Global library basics (Page 246) Creating a new global library (Page 247) Opening a global library (Page 248) Displaying properties of global libraries (Page 249) Saving a global library (Page 250) Closing a global library (Page 252) Deleting a global library (Page 252) Creating folders in the global libraries (Page 253) Adding elements to a global library (Page 254) Using elements of a global library (Page 256) Editing elements of a global library (Page 259) Removing elements from a global library (Page 261) Filtering the view (Page 263)
262
7.8.5.14
Requirement
The "Libraries" task card is displayed.
Procedure
To filter the view, follow these steps: 1. Open either the "Project library" pane or "Global libraries" pane. 2. In the drop-down list, select the object type for which you want to display the library elements.
Result
Only the library elements that are available for the object type are displayed. You can set the filter to "All" at any time to revert to an unfiltered view.
See also
Library basics (Page 233) Global library basics (Page 246) Creating a new global library (Page 247) Opening a global library (Page 248) Displaying properties of global libraries (Page 249) Saving a global library (Page 250) Closing a global library (Page 252) Deleting a global library (Page 252) Creating folders in the global libraries (Page 253) Adding elements to a global library (Page 254) Using elements of a global library (Page 256) Editing elements of a global library (Page 259) Removing elements from a global library (Page 261) Using a supplied global library (Page 262)
263
7.9
7.9.1
Using cross-references
Using cross-references
Introduction to cross-references
The cross-reference list provides an overview of the use of objects within the project. You can see which objects are interdependent and where the individual objects are located. Crossreferences are therefore part of the project documentation. You can also jump directly to the point of use of an object. Which objects you can display and localize in the cross-reference list depends on the installed products.
7.10
7.10.1
Simulating devices
Simulation of devices
Introduction
You can use the TIA Portal to run and test the hardware and software of the project in a simulated environment. The simulation is performed directly on the programming device or PC. No additional hardware is required. The simulation software provides a graphical user interface for monitoring and changing the configuration. It differs according to the currently selected device.
See also
Starting the simulation (Page 265)
264
7.10.2
Procedure
To start the simulation software, follow these steps: 1. Select the device you want to simulate, for example, in the project tree. 2. Select the "Simulation > Start" command in the "Online" menu. This calls the simulation software.
See also
Simulation of devices (Page 264)
265
267
Device view (Page 271), network view (Page 269), topology view (Page 274) Inspector window (Page 278) Hardware catalog (Page 280)
The hardware and network editor provides you with three views of your project. You can switch between these three views at any time depending on whether you want to produce and edit individual devices and modules, entire networks and device configurations or the topological structure of your project. The inspector window contains information on the object currently marked. Here you can change the settings for the object marked. Drag the devices and modules you need for your automation system from the hardware catalog to the network, device ot topology view.
268
8.1.1.2
Network view
Introduction
The network view is one of three working areas of the hardware and network editor. You undertake the following tasks here: Configuring and assign device parameters Networking devices with one another
Structure
The following diagram shows the components of the network view:
Changeover switch: device view / network view / topology view Toolbar of network view Graphic area of network view Overview navigation Table area of network view
You can use your mouse to change the spacing between the graphic and table areas of the network view. To do this, click on the upper edge of the table view and expand or contract this by moving the mouse with the mouse button held down. You can use the two small arrow keys to minimize, maximize or select the latest table structure of the table view with just one click.
269
Toolbar
The toolbar provides the following functions:
Symbol Meaning Mode to network devices. Mode to create connections. You can define the connection type using the drop-down list. Mode to create relations. Show interface addresses. Adjust the zoom setting. You can select the zoom setting or enter it directly in the drop-down list. You can also zoom in or zoom out the view in steps using the zoom symbol or draw a frame around an area to be zoomed in. Show page breaks Enables page break preview. Dotted lines will be displayed at the positions where the pages will break when printed. Remember layout Saves the current table view. The layout, width and visibility of columns in the table view is stored.
Graphic area
The graphic area of the network view displays any network-related devices, networks, connections and relations. In this area, you add devices from the hardware catalog, connect them with each other via their interfaces and configure the communication settings.
Overview navigation
Click in the overview navigation to obtain an overview of the created objects in the graphic area. By holding down the mouse button, you can quickly navigate to the desired objects and display them in the graphic area.
Table area
The table area of the network view includes various tables for the devices, connections and communication settings present: Network overview Connections I/O communication You can use the shortcut menu of the title bar of the table to adjust the tabular display.
270
See also
Adding a device to the hardware configuration (Page 295) Layout of the user interface (Page 139) Determination of online status and display using symbols (Page 592) Networking devices in the network view (Page 308) Tabular network overview (Page 311)
8.1.1.3
Device view
Introduction
The device view is one of three working areas of the hardware and network editor. You undertake the following tasks here: Configuring and assign device parameters Configuring and assign module parameters
271
Structure
The following diagram shows the components of the device view:
Changeover switch: device view / network view / topology view Toolbar of device view Graphic area of the device view Overview navigation Table area of device view
You can use your mouse to change the spacing between the graphic and table areas of the device view. To do this, click on the upper edge of the table view and expand or contract this by moving the mouse with the mouse button held down. You can use the two small arrow keys to minimize, maximize or select the latest table structure of the table view with just one click.
Toolbar
The toolbar provides the following functions:
Symbol Meaning Switches to the network view. Note: The device view can switch between the existing devices using the drop-down list. Show the area of unplugged modules.
272
Graphic area
The graphic area of the device view displays hardware components and if necessary the associated modules that are assigned to each other via one or more racks. In the case of devices with racks, you have the option of installing additional hardware objects from the hardware catalog into the slots on the racks.
Overview navigation
Click in the overview navigation to obtain an overview of the created objects in the graphic area. By holding down the mouse button, you can quickly navigate to the desired objects and display them in the graphic area.
Table area
The table area of the device view gives you an overview of the modules used and the most important technical and organizational data. You can use the shortcut menu of the title bar of the table to adjust the tabular display.
See also
Working with racks (Page 288) Network view (Page 269) Area for unplugged modules (Page 292) Inserting a module into a rack (Page 297) Objects in the device view (Page 290) Layout of the user interface (Page 139) Determination of online status and display using symbols (Page 592)
273
8.1.1.4
Topology view
Introduction
The topology view is one of three working areas of the hardware and network editor. You undertake the following tasks here: Displaying the Ethernet topology Configuring the Ethernet topology Identify and minimize differences between the desired and actual topology
Structure
The following figure provides an overview of the topology view.
Changeover switch: device view / network view / topology view Topology view toolbar Graphic area of the topology view Overview navigation Table area of the topology view
You can use your mouse to change the spacing between the graphic and table areas of the topology view. To do this, click on the upper edge of the table view and expand or contract this by moving the mouse with the mouse button held down. You can use the two small arrow keys to minimize, maximize or select the latest table structure of the table view with just one click.
274
Toolbar
The toolbar provides the following functions:
Symbol Meaning Adjusting the zoom setting. You can select the zoom setting via the drop-down list or enter it directly. You can also zoom in or zoom out the view in steps using the zoom symbol or draw a frame around an area to be zoomed in. Show page breaks Enables page break preview. Dotted lines will be displayed at the positions where the pages will break when printed. Remember layout Saves the current table view. The layout, width and visibility of columns in the table view is stored.
Graphic area
The graphic area of the topology view displays Ethernet modules with their appropriate ports and port connections. Here you can add additional hardware objects with Ethernet interfaces. See: Adding a device to the hardware configuration (Page 295)
Overview navigation
Click in the overview navigation to obtain an overview of the created objects in the graphic area. By holding down the mouse button, you can quickly navigate to the desired objects and display them in the graphic area.
Table area
This displays the Ethernet or PROFINET modules with their appropriate ports and port connections in a table. This table corresponds to the network overview table in the network view. You can use the shortcut menu of the title bar of the table to adjust the tabular display.
See also
Layout of the user interface (Page 139) Determination of online status and display using symbols (Page 592)
275
8.1.1.5
In this case, the printout has the following appearance: Object A Property 1: Value A1 Property 2: Value A2 Object B Property 1: Value B1
276
See also
Changing the print options (Page 278) Documentation settings (Page 202) Creating a print preview (Page 216) Printing project data (Page 219) Activating the page break preview for printout (Page 277)
8.1.1.6
Procedure
Proceed as follows to activate the page break preview: 1. Select the graphic area of the corresponding view. 2. Click on the "Show page break" symbol in the toolbar of the graphic editor. Dashed lines are displayed within the graphic editor at the location a page break is later made.
277
8.1.1.7
Procedure
To change the scope of the printout, proceed as follows: 1. In the "Options" menu, select the "Settings" command. 2. In the area navigation, open the "Print settings" parameter group under "General". 3. Scroll to the "Hardware configuration" group. 4. Select or clear the "Active graphic view" check box, depending on whether you want to print the graphics of the network and device view as well. 5. Select or clear the "Active table" check box, depending on whether you want to print the table for the editor as well.
See also
Printing hardware and network configurations (Page 276)
8.1.1.8
Inspector window
The properties and parameters shown for the object selected can be edited in the inspector window.
278
Structure
The inspector window consists of the following components:
Switch between various information and work areas Navigation between various pieces of information and parameters Display showing the selected information and parameters
Function
The information and parameters in the inspector window are split into different types of information: Properties Info Diagnostics To display the corresponding information and parameters, click in the area you want. The "Properties" area is the most important one for configuring an automation system. This area is displayed by default. The left pane of the inspector window is used for area navigation. Information and parameters are arranged there in groups. If you click on the arrow symbol to the left of the group name, you can expand the group if sub-groups are available. If you select a group or sub-group, the corresponding information and parameters are displayed in the right pane of the inspector window and can be edited there too.
See also
Editing properties and parameters (Page 303) Overview of hardware and network editor (Page 267)
279
8.1.1.9
Hardware catalog
The "Hardware catalog" task card gives you easy access to a wide range of hardware components.
Structure
The "Hardware catalog" task card consists of the following panes:
"Catalog" pane, search and filter function "Catalog" pane, component selection "Information" pane
280
Component selection
The component selection in the "Catalog" pane contains the installed hardware components in a tree structure. You can move the devices or modules you want from the catalog to the graphic work area of the device or network view. Installed hardware components without a license are grayed out. You cannot use non-licensed hardware components. Hardware components belonging to various components groups thematically are partially implemented as linked objects. When you click on such linked hardware components, a catalog tree opens in which you can find the appropriate hardware components.
Information
The "Information" pane contains detailed information on the object selected from the catalog: Schematic representation Name Version number Order number Brief description
See also
Browsing the hardware catalog (Page 287) Overview of hardware and network editor (Page 267) Information on hardware components (Page 281)
8.1.1.10
281
FAQs
Here, you have access to "Frequently Asked Questions" (FAQs). You can view various entries on hardware and software questions. Using a detailed search mask, you can filter the required topics.
Manuals
Here, you have access to the manuals of the various hardware components. This is particularly useful if the configuration, addressing or parameter assignment you are planning requires more detailed knowledge of the hardware you are using.
See also
Hardware catalog (Page 280) Enabling product support (Page 282)
8.1.1.11
282
Requirement
The software must have access to the Internet.
Procedure
To enable the Service & Support function, proceed as follows: 1. In the "Options" menu, select the "Settings" command. 2. Open the "Hardware configuration" group in the area navigation. 3. Select the "Via Internet" check box.
Result
You can now access product support, FAQs and manuals from the hardware catalog via the shortcut menu for the module.
See also
Information on hardware components (Page 281)
8.1.1.12
Selected objects
Function Select object Move object Copy object Paste object Key combination Mouse click <Ctrl+X>, then <Ctrl+V> <Ctrl+C> <Ctrl+V> Comments Copy selected object to move and then paste in new position Copy selected object to clipboard Paste object from clipboard to selection
283
8.1.2
8.1.2.1
Configuring devices
Basics
Configuring
"Configuring" is understood to mean arranging, setting and networking devices and modules within the device or network view. Racks are represented symbolically. Just like "real" racks, they allow you to plug in a defined number of modules. An address is automatically assigned to each module. The addresses can be subsequently modified. When the automation system is started, the CPU compares the setpoint configuration produced by the software with the system's actual configuration. Possible errors can be detected and reported straight away.
Assigning parameters
"Assigning parameters" is understood to mean setting the properties of the components used. Hardware components and settings for the exchange of data are assigned: Properties of modules with selectable parameters Settings for data exchange between components The parameters are loaded into the CPU and transferred to the corresponding modules when the CPU starts up. Modules can be replaced with ease since the parameters set are automatically loaded into the new module during startup.
284
See also
Changing properties of the modules (Page 522)
285
See also
Opening projects (Page 182)
Consistency
Some slot rules depend on how the environment is configured. This means that you can sometimes plug modules into the rack although this would result in inconsistencies at the current time. If you change the configuration, for example by selecting different modules or module parameter settings, you can make the configuration consistent again.
286
Context filter
You can use the "Filter" option of the hardware catalog to restrict the number of displayed hardware components and the number of hardware components that can be found by searching. If you select the filter, only those components are displayed that can be selected currently in the hardware catalog. If the do not select the filter, the entire hardware catalog is displayed. If you switch between the various views, the view of the filter objects is adapted to the current context.
Search options
You can use the search function to search for specific entries in the hardware catalog. Note the following rules when entering search terms: No distinction is made between upper and lower case text. Dashes and blanks are ignored during the search. The search function considers parts of a search term. Several search terms must be separated by a space
287
See also
Hardware catalog (Page 280) Information on hardware components (Page 281)
288
Creating a rack
If you insert a device in the network view, a station and a rack suitable for the device selected are created automatically. The rack and slots available are displayed in the device view. The number of slots available again depends on the type of device used.
Rack structure
A rack always contains the device that has been inserted in the network view. The device is permanently assigned a slot which will depend on the type of device in question. There are additional slots on the right of the device and, if necessary, on left of the device; slot numbers are located above slots in which devices are plugged. A corresponding short description is displayed above the plugged devices and modules. You show or hide this short description via the toolbar under "View" with the command "Display module titles" or the corresponding symbol in the toolbar of the device view (Page 271).
Symbol Meaning Show module titles
When modules are selected in the hardware catalog, all the slots permitted for this module are marked. This allows you to see immediately the slot into which the selected module can be inserted. In the following screenshot, a signal module has been selected in the hardware catalog for a partially filled S7-1200 rack:
Since slots 101-103 are reserved for communications modules, only the other free slots are shown as available slots. You can expand and collapse the front group of slots using an arrow symbol above the expandable slot. When the group of slots is collapsed, the first and last of the group's slot numbers are displayed. The following figure shows the expanded slot group:
289
Groups of slots into which modules have already been plugged cannot be collapsed.
290
In the upper part, you can see the graphic view showing how the rack is occupied by various modules in slots 1 to 3 as well as 101. In the lower part you can see a tabular representation of the rack in the device overview. Each line in the device overview represents one slot. The key information for each slot is displayed in the various columns:
Column Module Slot I address Q address Type Order no. Firmware Comments Meaning Name of module, can be edited in any way Slot number Input address area, can be edited in any way Output address area, can be edited in any way Catalog name of module Module order number Firmware version of module Optional comments
See also
Device view (Page 271)
291
You open the area of unplugged modules with the respective symbol in the toolbar of the device view (Page 271).
Symbol Meaning Open area of unplugged modules
Note To free up slots, move modules from your configuration into the storage area and plug the modules you want from the storage area into the freed up slots. You can use this approach to temporarily move modules that have already been parameterized out of the configuration without deleting them.
292
8.1.2.2
Requirement
The hardware catalog is open. You must be in the network view.
Procedure
To select a CPU from the hardware catalog, proceed as follows: 1. In the hardware catalog navigate to the folder with the desired CPUs. 2. Open the folder with the desired CPU type; you will see all order numbers for the selected CPU type.
293
4. Set up the CPU and a rack. You have the following options: Use drag-and-drop to drag the CPU from the hardware catalog into network view. Use Copy & Paste to copy the CPU to the network view. Double-click the CPU entry in the hardware catalog.
See also
Browsing the hardware catalog (Page 287) Adding a device to the hardware configuration (Page 295) Inserting a module into a rack (Page 297) Working with racks (Page 288) Creating an unspecified CPU (Page 296) Information on hardware components (Page 281)
294
295
You have now placed the device in the network view or in the topology view. The displayed rectangle (in other words "Station") symbolizes the plugged device together with its rack and any lower-level modules. Double-click on the device or station to open the device view and view the new rack and inserted device. In the next steps, you can configure the device in the device view and equip the rack with modules.
See also
Network view (Page 269) Creating an unspecified CPU (Page 296) Information on hardware components (Page 281) Topology view (Page 274)
296
See also
Selecting a CPU (Page 293) Adding a device to the hardware configuration (Page 295)
297
Equipping a rack
Arrange the modules on a rack according to the applicable slot rules. After a module has been inserted in a rack with an already inserted CPU, the address areas are checked automatically so that addresses are not assigned twice. After it has been inserted, each module then has one valid address range. To do so, DP slaves and IO devices must be networked with a CPU via the corresponding DP master or IO system.
Requirements
You are in the device view. The hardware catalog is open.
298
Inserting module
You can also drag modules and drop them between modules that have already been inserted. To do this, drag a module above and between the two existing modules while holding down the mouse button.
A mouse pointer appears. When you release the mouse button, all modules plugged to the right of the pointer are moved one slot to the right. Any redundant modules are moved to the area of unplugged modules. The new module is plugged at the point of the freed up slot.
See also
Device view (Page 271) Area for unplugged modules (Page 292) Information on hardware components (Page 281) General slot rules (Page 286)
Rules
CPUs or modules from the rack and from the area of unplugged modules can be deleted. When a rack is deleted in the device view the plugged hardware components are moved to the area of unplugged modules.
299
Procedure
Proceed as follows to delete a hardware component: 1. Select the hardware components you want to delete. Network view: Select devices or network relevant hardware components in the graphic view or in the network view. Device view: In the graphic view or device overview, select racks or modules in racks or in the area of unplugged components. Topology view: Select devices or hardware components with Ethernet interfaces in the graphic view or in the topology view. Project tree: Select devices or individual hardware components from the tree structure. 2. Select "Delete" from the shortcut menu or press <Del>. If the "Delete" menu item is unavailable, your selection contains at least one component that cannot be deleted. The selected hardware components are deleted. Note Deleting hardware components may result in inconsistencies in the project, for example infringement of slot rules. Inconsistencies are reported during the consistency check. Correct the inconsistencies by taking appropriate action, for example, make sure that slot rules are kept to.
See also
Keyboard action in the hardware and network editor (Page 283)
Rules
Single objects as well as several objects can be copied at the same time. Modules inserted in the rack and in the area of unplugged modules can be copied. You can only copy devices and modules to free and valid slots in keeping with the slot rules. Racks with a CPU inserted cannot be copied individually, but only as complete units along with all inserted hardware components.
300
Procedure
Proceed as follows to copy a hardware component: 1. Select the hardware components you want to copy. Device view: Select the module in a rack or put it in the area of unplugged modules. Network view: Select the station or the relevant hardware component from the network view. Project tree: Select the station or module. 2. Select "Copy" from the shortcut menu or press <Ctrl+C>. If the "Copy" menu item is unavailable, your selection contains at least one component that cannot be copied. 3. Select the location at which the content of the clipboard is to be pasted. Device view: Select a free slot in the rack or area of unplugged modules. Network view: Select a station where you want to insert devices or modules or move the mouse pointer to a free location in the network view to paste a copied station or a hardware component relevant to the network view. 4. Select "Paste" from the shortcut menu or press <Ctrl+V>. If the "Paste" menu item is unavailable, the clipboard is empty or contains at least one component that cannot be pasted at this point. The selected object is pasted at the chosen point. Once you have selected a station where you want to insert a module in the network view, the module is inserted in the first free and valid slot. If no free, valid slots are available, the object is inserted in the area of unplugged modules. Note You can also copy a module from one device to another: To do so, copy a module in the hardware and network editor, select a different device in the network view or the drop down list of the device view and insert the module. You can insert the copied object directly in a slot or place it in the area of unplugged modules in the device view. If you add the copied object in the network view of a device or a station, it will be inserted in the first available slot. If there is no slot available for the object, it is automatically placed in the area of unplugged modules (Page 292). Note You can use <Ctrl> and drag-and-drop to directly copy a selected hardware component.
See also
Keyboard action in the hardware and network editor (Page 283)
301
Rules
You can move devices and modules from the rack and the area for unplugged modules taking the slot rules into consideration. CPs can be moved in the network view. The CP is plugged in a free and valid slot in the target device. If there are no free slots available, the CP to be inserted is moved to the area for unplugged modules. In the network view, CPU and slave head modules can be moved between the devices; depending on CPU type also within the rack. Note Moved CPs are disconnected from their network but keep their network parameters and address. If you reconnect the CP to the network and its address has been assigned, use a dialog to assign a new unique address to the CP.
Procedure
Proceed as follows to move a hardware component: 1. Select the hardware component you want to move. Device view: Select the module in a rack or put it in the area of unplugged modules. Network view: Select the hardware component of relevance to the network view. 2. Select "Cut" from the shortcut menu or press <Ctrl+X>. If the "Cut" menu item is unavailable, your selection contains at least one component that cannot be cut. 3. Select the location to which the cut object is to be moved. Device view: Select a free slot in the rack or area of unplugged modules. Network view: Select a station where you want to insert devices or modules. 4. Select "Paste" from the shortcut menu or press <Ctrl+V>. If the "Paste" menu item is unavailable, the clipboard is empty or contains at least one component that cannot be pasted at this point. The selected hardware component is moved to the target. If the hardware component being moved is a networked object, it is disconnected from the network. Note You can use drag-and-drop to directly move a selected hardware component.
302
See also
Keyboard action in the hardware and network editor (Page 283)
Rules
You can only replace hardware components if they support module replacement and if the two components are compatible.
Procedure
To replace one module with another, proceed as follows: 1. Select the module you want to replace. 2. Open the shortcut menu: If the "Replace device" entry is enabled, the module can be replaced. If the "Replace device" entry is disabled, a module cannot be replaced. 3. Click on "Replace device" in the shortcut menu. ### The "Replace device" dialog box appears. 4. Under "New device" in the tree structure, select the module with which you want to replace your current module. 5. Click "OK". The existing module is replaced by the new one. As an alternative, you can take a module by dragging it from the hardware catalog to the module you are replacing. If the module can be replaced by the selected module, this is indicated by the mouse pointer symbol.
303
Requirements
You are in the device view. Note You can also edit properties and parameters in the network view. In the graphic network view, you have access to the network-related hardware components and the station. You can access modules and hardware components not displayed in the graphic network view using the table network view.
Procedure
To change the properties and parameters of the hardware components, proceed as follows: 1. In the graphic view, select the CPU, module, rack or interface you want to edit. 2. Edit the settings for the selected object: Use the table view to edit addresses and names, for example. In the Inspector window additional setting possibilities are available in "Properties". Note that modules can only be fully parameterized if they are assigned to a CPU. Therefore, PROFIBUS or PROFINET interfaces modules must first be networked with the CPU or a centrally inserted communication module so that they form a master system or IO system. Only then is it possible, for example, to edit the addresses of the distributed components that are inserted.
304
Selection of a module Editing option for addresses in the device overview Selection options in the inspector window Editing option for addresses in the inspector window
See also
Inspector window (Page 278)
305
Requirements
You have created a device configuration. You have installed an update or an optional package at a later date. As a result of this installation, the module version of at least one module type was updated in the hardware catalog, whereby the new version is incompatible with the previous version. You have used such modules in your device configuration and want to use the modified or added properties.
Procedure
Perform the following step for each affected module type. 1. Select the affected module in the device view. 2. In the Inspector window, go to "Properties > General > Catalog Information". Click the "Update module version" button there. 3. In the query that then appears, specify whether you want to update the module version only for the selected module or for all modules of this type in the current project.
Result
The selected modules are replaced by the same modules with updated module version in the the current project.
306
8.1.3
8.1.3.1
Configure networks
Networking devices
Network configuration
The following steps are necessary when configuring networks: Connect devices to subnet Specify the properties/parameters for each subnet Specify the device properties for every networked module Download configuration data to the devices to supply interfaces with the settings resulting from the network configuration Document the network configuration For Open User Communication, creating and configuring a subnet is supported by the assignment of connection parameters.
307
Networking options
In the project, you can create and network devices with components capable of communication. The following basic options are available for networking the devices: You link the interfaces of the components capable of communication with one another. A new subnet is created suitable for the type of interface. You connect the interface of the devices capable of communication with a new or existing subnet. You create an Open User Communication connection. When you assign parameters to the connection for Open User Communication, a subnet is created automatically between the communication partners. You use the graphic connection configuration to configure connections; missing networks are hereby recognized and are created either automatically or via dialog. Due to the different tasks of the devices or the span of the plant, you may need to use several subnets. These subnets are managed in a project.
308
309
5. Now release the left mouse button or press it again (depending on previous action). Result: The interface and selected subnet are now connected. Consistent address parameters are set automatically for the interface.
310
Requirements
The subnet with which you want to connect an interface has already been created. If the subnet has not yet been created, change to the network view and make the settings required for networking.
311
312
Consequences
Depending on the version, a distinction should be made between: Canceling a network connection for an interface The configured parameters for the interface remain unchanged. Assigning a network connection to another subnet If the addresses in the assigned subnet are not unique, in other words, they already exist, they will be changed automatically to make them unique.
313
2. Select the "Disconnect from subnet" command in the shortcut menu of the interface. The network connection is deleted, the interface addresses are, however, not changed. Configured connections are retained; however these connections are marked red in the connection table because they are not networked. Specified connections remain specified.
See also
Networking devices in the network view (Page 308)
314
315
PROFIBUS network configuration PROFIBUS addresses Rules for the network configuration
All the devices in a subnet must have a different PROFIBUS address. Only when all the modules in a subnet have different addresses and your actual structure matches that of the network configuration produced, should you load the settings across the network. You can connect devices to the PROFIBUS subnet that communicate via configured connections or that belong to a PROFIBUS DP master system. You can find more information on configuring a DP master system in the following sections.
Requirements
The 121xC CPU is PROFIBUS compatible as of firmware version 2.0.
See also
What you need to know about PROFIBUS bus parameters (Page 317)
316
What you need to know about PROFIBUS bus parameters Matching parameters to one another
The PROFIBUS subnet will only function without problem if the parameters for the bus profile are matched to one another. You should therefore only change the default values if you are familiar with how to configure the bus profile for PROFIBUS. Note It may be possible for the bus parameters to be adjusted depending on the bus profile. If the bus parameters cannot be adjusted, they are grayed out. The offline values of the bus parameters are always shown even if you are online and linked to the target system. The parameters shown apply to the entire PROFIBUS subnet and are briefly explained below.
317
If you want to create a customized bus profile, we recommend the following settings: Minimum target rotation time (Ttr) = 5000 x HSA (highest PROFIBUS address) Minimum response monitoring (watchdog) = 6250 x HSA
Recalculating
You can use the "Recalculate" button to recalculate the parameters.
See also
PROFIBUS addresses (Page 316) Description of the bus parameters (Page 318)
Max. Tsdr Min. Tsdr Tset Tqui GAP factor Retry limit Tslot
318
Ttr typical
Response monitoring
See also
What you need to know about PROFIBUS bus parameters (Page 317)
319
Meaning of profiles
Profile DP Meaning Select the "DP" bus profile when the only devices connected to the PROFIBUS subnet are those which satisfy the requirements of standard EN 50170 Volume 2/3, Part 8-2 PROFIBUS. The bus parameter setting is optimized on these devices. This includes devices with DP master and DP slave interfaces of the SIMATIC S7 and distributed I/Os of other manufacturers. Standard Compared to the "DP" profile, the "Standard" profile also offers scope for devices of another project or devices which have not been configured here to be taken into account when calculating the bus parameters. The bus parameters are then calculated following a simple, non-optimized algorithm. Select the "Universal (DP/FMS)" bus profile when individual devices on the PROFIBUS subnet use the PROFIBUS-FMS service. This includes the following devices for example: CP 343-5 (SIMATIC S7) PROFIBUS-FMS devices of other manufacturers As with the "Standard" profile, this profile allows you to take other devices into account when calculating the bus parameters. Customized The PROFIBUS subnet will only function without problem if the parameters for the bus profile are matched to one another. Select the "Customized" profile when none of the usual profiles "match" a PROFIBUS device and you need to adapt the bus parameters to your special structure. Information on this can be found in the documentation for the PROFIBUS device. You should only change the default values if you are familiar with how to configure the bus profile for PROFIBUS. Not all combinations that can be theoretically set can be used even with this bus profile. The PROFIBUS standard specifies several parameter limits that depend on other parameters. For example, a responder must not respond (Min Tsdr) before the initiator can receive the message frame (Trdy). These standard specifications are also checked in the "Customized" profile. Tip: The bus parameters last valid on the PROFIBUS subnet are always automatically set as customized. For example, if the "DP" bus profile was valid for the subnet, then the bus parameters for "DP" are set in the "Customized" bus profile. The parameters can be modified on this basis. The monitoring times are not automatically recalculated so that you do not put at risk the consistency of set values, for example with configurations in other configuration tools without realizing that you have done so. You can also have the Ttr monitoring times and target rotation time calculated on the basis of parameters you have set: Click here on the "Recalculate" button.
Universal (DP/FMS)
Note Both mono-master mode and multi-master mode are possible with all PROFIBUS profiles.
320
What you need to know about PROFIBUS line configuration Cable configuration and bus parameters
Information regarding the cable configuration can be taken into consideration when calculating the bus parameters. For this purpose, you must select the "Consider cable configuration" check box in the properties for the PROFIBUS subnet. The remaining information then depends on the type of cable used; the following settings are available: Copper cable Fiber-optic cable/optical ring
321
PROFIBUS communication load Communication load - allowing for additional network stations
The bus parameters depend on the volume of communication between the active network nodes. There are differences between cyclic communication (DP) and connection-based, acyclic communication (S7 communication, Send/Receive (FDL), FMS). Unlike DP, the volume and size of communication tasks (communication load) depends on the user program. For this reason, the communication load cannot always be calculated automatically. To calculate the bus times you can define a network configuration in the "Additional network stations" parameter group that differs from the network configuration.
322
IP address
The IP parameters are visible if the module capable of communication supports the TCP/IP protocol. This is usually the case for all Ethernet modules. The IP address consists of 4 decimal figures in the range of 0 to 255. The decimal figures are separated from one another by a dot. Example: 140.80.0.2 The IP address consists of: Address of the (sub) net Address of the node (generally also called host or network node)
Subnet mask
The subnet mask splits these two addresses. It determines which part of the IP address addresses the network and which part of the IP address addresses the node. The set bits of the subnet mask determine the network part of the IP address. Example: Subnet mask: 255.255.0.0 = 11111111.11111111.00000000.00000000 In the example given for the above IP address, the subnet mask shown here has the following meaning: The first 2 bytes of the IP address identify the subnet - i.e. 140.80. The last two bytes address the node, thus 0.2. It is generally true that: The network address results from AND linking the IP address and subnet mask. The device address results from AND NOT linking the IP address and subnet mask.
Note Range of values for the first decimal point A value of between 224 and 255 is also possible for the first decimal number of the IP address (address class D etc). This is, however, not recommended because there is no address check for these values.
323
Result: All nodes with addresses between 129.80.001.xxx and 129.80.127.xxx are on one subnet, all nodes with addresses between 129.80.128.xxx and 129.80.255.xxx are on another subnet.
Router
The task of the routers is to connect the subnets. If an IP datagram is to be sent to another network, it first has to be conveyed to a router. To make this possible, you have to enter the address of the router for each node in the subnet. The IP address of a node in the subnet and the address of the router may only differ at the points at which there is a "0" in the subnet mask.
324
8.1.3.2
325
S7 connections
In the case of S7 connections via the PN interface, one connection resource per S7 connection is assigned for the endpoint for the S7-1200 CPU. One connection resource is also required for the connection partner. You can find an overview of available and assigned connection resources for selected S7-1200 CPU in the Inspector window at "Properties > Connection Resources"
326
327
Benefits
The information shown in these views are always up-to-date in terms of the current user actions. This means: The connection table displays all connections created. If you have selected a connection in the connection table: When connection mode is enabled, the connection path is highlighted in the network view. The "Properties" tab in the Inspector window displays the parameters of this connection.
328
Specifying a connection
If both partners for the connection type selected are networked on the same network, use the graphic or interactive selection of both communication partners to create a fully specified connection. This connection is entered automatically in the connection table of the S7-1200 CPU. A local connection name is assigned for this connection. The following schematic shows a configured connection with a networked device:
329
This step activates the connection mode: You can now select the connection type you want. You will see this from the following: The devices that can be used for the connection type selected in your project are colorhighlighted in the network view. 2. Hold down the mouse button and drag the mouse pointer from the device from which the connection will originate to the device at which the connection ends.
3. Release the mouse button over the destination device to create the connection between the two devices.
Result
A specified connection is created. The connection path is highlighted. The connection is entered in the connection table.
330
Procedure
Proceed as follows to interactively create a connection: 1. Select the "Add new connection" command in the shortcut menu of a connection partner for which you want to create a connection. The "Create new connection" dialog appears. 2. Select the partner endpoint. In the right pane of the dialog, a possible connection path fitting the selected endpoint is displayed, if available. Incomplete paths, for example, for a non-specified CPU, are marked by an exclamation mark on a red background. 3. To accept the configured connection and to configure additional connections to other endpoints, click "Add". To close the dialog, click "OK".
Working in the network view Highlighting connection path and partner in the network view
To display the connection partners for all or certain connection types in the network view, proceed as follows: 1. Click the "Connections" button.
2. Select the S7-CPU for which you want to display the connection partners in the network view and then select the "Highlight connection partners" command in the shortcut menu. 3. Select "All connection partners" in the following menu. The local device and the CPUs of the target devices are selected. The local connection partner shows an arrow pointing right and the remote connection partners show an arrow pointing left. 4. To open a list with information on the target devices, click the arrow of the local device. This additional function is useful in complex network configurations in which some devices are not visible.
331
Note You can display one of the connection partners which cannot be seen in the current display range of the network view. Click on the communication partner in the list that appears. Result: The display is moved such that the connection partner becomes visible.
332
Deleting connections
You can delete configured connections via the network view or the connection table. In the network view you can delete a highlighted connection. In the connection table you can delete one or more connections.
Procedure
To delete a connection, proceed as follows: 1. Select the connection to be deleted: In the network view: Select the connection to be deleted. In the connection table: Select the rows of the connections to be deleted (multiple selection possible). 2. Open the shortcut menu with a right mouse click. 3. Select the "Delete" command. The selected connection will be completely deleted.
333
Copying a project
When you copy a project all configured connections will also be copied. No settings whatsoever are required for the copied connections because the connections remain consistent.
Copying devices
If you copy devices for which connections have been configured, the connections are copied as well. To complete the connection path, you must still finalize the networking. An S7-1200 CPU with a V.10 firmware is merely a server for connections and has no connection configuration itself. Consequently, no connections are copied along with it when an S7-1200 CPU with a V1.0 firmware is copied.
Remedies
To assign a closed connection path to an existing open connection path, expand the device configuration in such a way that the interfaces required for the connection type are available for both partners. At "Properties > General > Interface" in the Inspector window, you can use the "Find connection path" button to create a connection to an existing partner.
334
Local ID
The local ID of the module from which the connection is viewed is displayed here (local partner). You can change the local ID. You may need to do this if you have already programmed communication function blocks, and you want to use the local ID specified in those function blocks for the connection.
Address details
Displaying address details of the S7 connection. With an unspecified partner, the values for the rack and slot can be changed. All other values are obtained from the current configuration and cannot be changed.
335
336
HMI connections
For HMI connections via the integrated PN interface, one connection resource for the endpoint per HMI connection is occupied for the HMI device. One connection resource is also required for the connection partner (PLC).
337
338
Benefits
The information shown in these views are always up-to-date in terms of the current user actions. This means: The connection table displays all connections created. If you have selected a connection in the connection table: You will graphically see the connection path in the network view. The "Properties" tab in the Inspector window displays the parameters of this connection.
339
Specifying a connection
If both partners for the connection type selected are networked on the same network, use the graphic or interactive selection of both communication partners to create a fully specified connection. This connection is entered automatically into the connection table of the HMI device. A local connection name is assigned for this connection. The following schematic shows a configured connection with a networked device:
340
The connection mode for the connection type you have selected is then activated. You will see this from the following: The devices that can be used for the connection type selected in your project are colorhighlighted in the network view. 2. Hold down the mouse button and drag the mouse pointer from the device from which the connection will originate to the device at which the connection ends.
3. Release the mouse button over the destination device to create the connection between the two devices.
Result
A specified connection is created. The connection path is highlighted. The connection is entered in the connection table.
341
Procedure
Proceed as follows to interactively create a connection: 1. Select the "Create new connection" command in the shortcut menu of a connection partner for which you want to create a connection. The "Create new connection" dialog is opened. 2. Select the partner endpoint. In the right pane of the dialog, a possible connection path fitting the selected endpoint is displayed, if available. Incomplete paths, for example, for a non-specified CPU, are marked by an exclamation mark on a red background. 3. To close the dialog, click "OK". To accept the configured connection and to configure additional connections to other endpoints, click "Apply".
Working in the network view Highlighting connection path and partner in the network view
To display the connection partners for all or certain connection types in the network view, proceed as follows: 1. Click the "Connections" button.
2. Select the "Highlight connection partners" command in the shortcut menu for the HMI device whose connection partners you want to display in the network view. 3. Select "All connection partners" in the following menu. The local device and the CPUs of the target devices are selected. The local connection partner shows an arrow pointing right and the remote connection partners show an arrow pointing left. 4. To open a list with information on the target devices, click the arrow of the local device. This additional function is useful in complex network configurations in which some devices are not visible.
Note You can display one of the connection partners which cannot be seen in the current display range of the network view. Click on the communication partner in the list that appears. Result: The display is moved such that the connection partner becomes visible.
342
See also
Creating a new connection graphically (Page 340)
343
Deleting connections
You can delete configured connections via the network view or the connection table. In the network view you can delete a highlighted connection. In the connection table you can delete one or more connections.
Procedure
To delete a connection, proceed as follows: 1. Select the connection to be deleted: In the network view: Select the connection to be deleted. In the connection table: Select the rows of the connections to be deleted (multiple selection possible). 2. Open the shortcut menu with a right mouse click. 3. Select the "Delete" command. The selected connection will be completely deleted.
Copying a project
When you copy a project all configured connections will also be copied. No settings whatsoever are required for the copied connections because the connections remain consistent.
Copying devices
If you copy devices for which connections have been configured (HMI devices), the connections are copied as well. To complete the connection path, you must still finalize the networking.
344
Remedies
If the connection cannot be repaired by opening the connection properties, changing them or undoing them in the configuration, then it may be necessary to delete the connection and recreate it.
345
Address details
Displaying address details of the HMI connection. With an unspecified partner, the values for the rack and slot can be changed. All other values are obtained from the current configuration and cannot be changed.
Miscellaneous
Display of the access points for the online connection between HMI device and connection partner.
346
Connection establishment
For Open User Communication, instructions for establishing and terminating the connection must exist for both communications partners. One communications partner sends its data using TSEND, TUSEND or TSEND_C while the other communications partner receives the data using TRCV, TURCV or TRCV_C. One of the communications partners starts the connection establishment as the active partner. The other communications partner reacts by starting its connection establishment as the passive partner. If both communication partners have initiated their connection establishment, the communication connection is fully established.
347
See also
Principle of operation of connection-oriented protocols (Page 357)
348
349
350
Communication instruction for TCON, TSEND_C or TRCV_C "Configuration" tab in the "Properties" tab Area navigation of the "Configuration" tab General properties of the connection parameters Address details of the connection parameters (for selected connection DBs)
"Configuration" tab
Enter the desired connection parameters in the "Configuration" tab. The area navigation of the "Configuration" tab includes the "Connection parameters" group. This group contains the connection parameter assignment. Here, you can enter the parameters for the connections and the address details with system support. Here, you also connect the CONNECT (TCON, TSEND_C, TRCV_C) or ID (TCON, TSEND, TRCV, TUSEND, TURCV) block parameters of the selected communication instructions. When all the required parameters are assigned, a check mark is set in front of the "Connection parameters" group in the area navigation. NOTICE The connection configuration does not check whether the connection IDs and port numbers (TCP, UDP) or TSAPs (ISO-on-TCP) are unique. When you configure Open User Communication, you should, therefore, make sure that the parameter settings are unique within a device.
See also
Parameters of communication connections (Page 359)
351
352
See also
Parameters of communication connections (Page 359) Assignment of port numbers (Page 361) TSAP structure (Page 363) Examples of TSAP assignment (Page 365) Ability to read back connection description parameters (Page 362) Creating and assigning parameters to connections (Page 354)
Requirements
Your project must contain at least one S7-CPU. The program editor is open. A network is available.
Procedure
To insert the extended instructions for Open User Communication, proceed as follows: 1. Open the task card, pane and folder "Instructions > Communication > Open User Communication". 2. Drag one of the following instructions to a network: TSEND_C TRCV_C TCON The "Call options" dialog opens. 3. Edit the properties of the instance DB in the "Call properties" dialog. You have the following options: Change the default name. Select the "Manual" check box to assign your own number. 4. Click "OK" to complete your entry.
Result
A corresponding instance DB is created for the inserted instruction TSEND_C, TRCV_C or TCON.
353
See also
Creating and assigning parameters to connections (Page 354)
Requirement
A CPU exists with a TCON, TSEND_C or TRCV_C communication instruction.
Procedure
To create a connection for Open User Communication, proceed as follows: 1. Select a TCON, TSEND_C or TRCV_C block of Open User Communication in the program editor. 2. Open the "Properties > Configuration" tab in the inspector window. 3. Select the "Connection parameters" group. Until you select a connection partner, only the empty drop-down list for the partner end point is enabled. All other input options are disabled. The connection parameters already known are displayed: Name of the local end point Interface of the local end point IP address of the local end point 4. In the drop-down list box of the partner end point, select a connection partner. You can select an unspecified device or a CPU in the project as the communications partner. Certain connection parameters are then entered automatically. The following parameters are set: Interface of the partner end point Interface of the partner end point IP address of the partner end point If the connection partners are networked, the name of the subnet is displayed.
354
355
See also
Description of the connection parameters (Page 351) Starting connection parameter assignment (Page 353) TSAP structure (Page 363) Assignment of port numbers (Page 361) Parameters of communication connections (Page 359)
Requirement
You have created an Open User Communication connection.
Procedure
To delete a connection, proceed as follows: 1. Select a communications partner for Open User Communication in the project tree. 2. Open the "Program blocks" folder below the selected communications partner. 3. Select the "Delete" command from the shortcut menu of the data block with the connection parameter assignment.
356
Note If you are not certain which block to delete, open the extended instruction TCON, TSEND_C or TRCV_C. You will find the name of the data block as the CONNECT input parameter or in the connection parameter assignment as the "Connection data" parameter. If you only delete the instance DBs of the extended instructions TCON, TSEND_C or TRCV_C, the assigned connections are not deleted as well. Note If the connection DB is used by other blocks of the extended instructions, then the corresponding calls, their instance DBs and the combination blocks TSEND_C and TRCV_C are also deleted from the block folder, provided they are not used elsewhere. This action prevents the program from being inconsistent.
Result
You have deleted the connection. Note Insert an extended instruction TCON, TSEND_C or TRCV_C again to reference an existing connection description with the TCON_Param structure via the "Connection data" parameter.
357
Characteristics of TCP
During data transmission via a TCP connection, no information about the length or about the start and end of a message is transmitted. This does not pose a problem during sending because the sender knows the amount of data to be transmitted. However, the receiver has no means of recognizing where one message in the data stream ends and the next one begins. It is therefore recommended that the number bytes to be received (parameter LEN, instruction TRCV/TRCV_C) be assigned the same value as the number of bytes to be sent (parameter LEN, instruction TSEND/TSEND_C). If the length of the sent data and the length of the expected data do not match, the following will occur: Length of data to be received (parameter LEN, instruction TRCV/TRCV_C) greater than length of data to be sent (parameter LEN, instruction TSEND/TSEND_C): TRCV/TRCV_C copies the received data to the specified receive area (parameter DATA) only after the assigned length is reached. When the assigned length is reached, data of the subsequent job are already being received. As a result, the receive area contains data from two different send jobs. If you do not know the exact length of the first message, you are unable to recognize the end of the first message and the start of the second message. Length of data to be received (parameter LEN, instruction TRCV/TRCV_C) less than length of data to be sent (parameter LEN, instruction TSEND/TSEND_C): TRCV/TRCV_C copies the number of bytes you specified in the LEN parameter to the receive data area (parameter DATA). Then, it sets the NDR status parameter to TRUE (job completed successfully) and assigns RCVD_LEN (amount of data actually received) the value of LEN. With each subsequent call, you receive a further block of the sent data.
Characteristics of ISO-on-TCP
During data transmission via an ISO-on-TCP connection, information regarding the length and the end of a message is also supplied. If the length of the sent data and the length of the expected data do not match, the following will occur: Length of data to be received (parameter LEN, instruction TRCV/TRCV_C) greater than length of data to be sent (parameter LEN, instruction TSEND/TSEND_C): TRCV/TRCV_C copies all the sent data to the receive data area (parameter DATA). Then, it sets the NDR status parameter to TRUE (job completed successfully) and assigns RCVD_LEN (amount of data actually received) the length of the data sent. Length of data to be received (parameter LEN, instruction TRCV/TRCV_C) less than length of data to be sent (parameter LEN, instruction TSEND/TSEND_C): TRCV/TRCV_C does not copy any data to the receive data area (parameter DATA), but instead supplies the following error information: ERROR=1, STATUS=W#16#8088 (destination buffer too small).
Characteristics of UDP
Information on the length and the end of a message is also supplied during data transmission via a UDP connection. If the length of the sent data and the length of the expected data do not match, the following will occur:
358
See also
Basics of Open User Communication (Page 346)
0 1 block_length 2 3 id
359
rem_staddr
TCP and ISO-on-TCP only: IP address of the partner end point, for example for 192.168.002.003: rem_staddr[1] = 192 rem_staddr[2] = 168 rem_staddr[3] = 002 rem_staddr[4] = 003 rem_staddr[5-6]= irrelevant
360
spare
W#16#0000
Reserved.
See also
Principle of operation of connection-oriented protocols (Page 357) Description of the connection parameters (Page 351) Ability to read back connection description parameters (Page 362) Overview of connection parameter assignment (Page 348) TSAP structure (Page 363) Assignment of port numbers (Page 361)
361
* These ports are used by TSEND_C and TRCV_C with the TCP and UDP connection types. ** These ports are blocked depending on the function scope of the utilized S7-1200 CPU. The documentation of the respective CPUs provides the assignment of these ports.
See also
Description of the connection parameters (Page 351) Creating and assigning parameters to connections (Page 354)
Ability to read back connection description parameters Changing parameter values in the connection description
The connection description for exactly one connection of the Open User Communication is entered from the connection parameter assignment in the connection description DB. You can change the parameter values of the connection description DB outside of the connection parameter assignment in the user program. The structure of the connection description cannot be changed. Connection description DBs containing values you changed subsequently can be read back from the connection parameter assignment. Under "Properties > Configuration > Connection parameters", the Inspector window displays only the connection parameters stored in the connection description DB. The connection parameter assignment does not support nested entries of connection descriptions in DB types that can only be found via offset referencing (for example, Global-DB).
362
See also
Parameters of communication connections (Page 359) Description of the connection parameters (Page 351)
Structure of TSAPs
You must comply with certain rules when assigning TSAPs. A TSAP must contain a certain number of bytes, which are able to be displayed and entered as hexadecimal values (TSAPID) or as ASCII characters (ASCII-TSAP):
Entries or changes of the TSAP-ID or the ASCII-TSAP in the corresponding entry fields always take effect in the other display format as well.
363
In addition to the rules for length and structure of TSAPs, you must also ensure the uniqueness of the TSAP-ID. The assigned TSAPs are not automatically unique.
*A recognized CPU is normally inserted on rack 0 in slot 1. For this reason, hex value 01 is valid for the second place of the TSAP-ID with extension. If the connection partner is an
364
See also
Examples of TSAP assignment (Page 365) Description of the connection parameters (Page 351) Creating and assigning parameters to connections (Page 354)
365
You can change the values in the entry fields of the TSAP-ID and the ASCII-TSAP at any time. The entry field of the TSAP-ID shows the complete TSAP stored in the data block of the connection description. The TSAP-ID with TSAP extension, which is limited to 16 characters, is not displayed in the "TSAP (ASCII)" entry field because the character E0 does not represent a valid character for the ASCII-TSAP. If the displayed TSAP-ID is a valid ASCII-TSAP, it is displayed in the "TSAP (ASCII)" entry field. Changes in the entry fields for TSAP-ID and ASCII-TSAP affect the other field.
Once you have exited the entry field of the TSAP-ID, a check is performed automatically to determine whether the first character of the TSAP-ID is a valid ASCII character. Since the character "E0" now present in the TSAP-ID is not a valid character for the ASCII-TSAP, the "TSAP (ASCII)" entry field no longer displays an ASCII-TSAP. If a valid ASCII character is used, the check for compliance with the length specification of 2 to 16 characters follows.
366
After the entry field is exited, a message is output because the TSAP-ID is neither a valid ASCIITSAP (this would have to have a hex value in the range from 20 to 7E as the first value) or a valid TSAP-ID (this would have to have the identifier "E0" as the first value).
When you exit the entry field, the TSAP-ID is recognized as a valid ASCII-TSAP and the resulting ASCII-TSAP "ISOonTCP-1" is written to the "TSAP (ASCII)" entry field.
See also
TSAP structure (Page 363) Description of the connection parameters (Page 351)
Communication via PUT and GET instructions Basic information on communication via the PUT/GET instruction Basic information on PUT/GET instructions
Use PUT and GET instructions to exchange data between two CPUs via an S7 connection. The GET instruction is used to read data from a partner CPU. The PUT instruction is used to control the writing of tags by the communication partner via the user program. Apart from the PUT and GET instructions, no additional communication functions are provided for reading and writing tags. To simplify the use of the two instructions, specify all required parameters for the connection and all block parameters in the Inspector window of the program editor.
367
Requirement
To be able to use the PUT and GET instructions, the following requirements must be satisfied: At least one S7-300/400/1200 CPU must be created in the project. Firmware 2.0 or higher must be installed on the S7-1200 CPU. If you have not yet created a second CPU in the project, you can initially establish the connection to an unspecified partner. An S7 connection must exist between the two CPUs. If you have not yet established a connection between two CPUs, a connection is automatically established during the configuration of the instructions. For both instructions, an instance data block is required in which all data used by the instruction is stored. The instance data block is created automatically as soon as you drag a PUT or GET instruction to a network in the program editor. For the correct execution of the program, it is essential that the instance data blocks are not changed; consequently, these data blocks are know-how protected. You only have read access to the instance data blocks.
See also
Overview of connection parameter assignment (Page 368) Assigning parameters to start request (Page 373) PUT: Set parameters for write and send area (Page 374) GET: Set parameters for read and memory area (Page 375)
368
"Configuration" tab
Communication instruction for PUT or GET "Configuration" tab in the "Properties" tab Area navigation of the "Configuration" tab General properties of the connection parameters
Enter the desired connection parameters in the "Configuration" tab. The area navigation of the "Configuration" tab includes the "Connection parameters" group. This group contains the connection parameter assignment. Here, you can enter the parameters for the connections using system functions. When all the required parameters are assigned, a check mark is set behind the "Connection parameters" group in the area navigation.
369
See also
Assigning parameters to start request (Page 373) PUT: Set parameters for write and send area (Page 374) GET: Set parameters for read and memory area (Page 375)
Connection name
370
Procedure
To insert PUT/GET instructions, follow these steps: 1. Open the "Instructions" task card in the "Communication > S7 Communication" folder. 2. Drag a PUT or GET instruction to a network. The "Call options" dialog opens. 3. Optional: Edit the properties of the instance DB in the "Call properties" dialog. You have the following options: Change the default name. Select the "Manual" check box to assign your own number. 4. Click "OK".
Result
A corresponding instance data block is created for the inserted PUT or GET instruction. For S7-300/400 CPUs, a function block is created additionally in the program resources. When PUT or GET instruction is selected, you will see the "Configuration" tab under "Properties" in the inspector window. The "Connection parameters" group in area navigation contains the connection parameter assignment that you can now make.
See also
Creating and assigning parameters to connections (Page 371) Deleting connections (Page 372)
371
Requirement
A CPU exists with a PUT or GET communication instruction.
Procedure
To configure an S7 connection using PUT/GET instructions, follow these steps: 1. In the program editor, select the call of the PUT or GET instruction. 2. Open the "Properties > Configuration" tab in the inspector window. 3. Select the "Connection parameters" group. Until you select a connection partner, only the empty drop-down list for the partner end point is enabled. All other input options are disabled. The connection parameters already known are displayed: Name of the local end point Interface of the local end point IP address of the local end point 4. In the drop-down list box of the partner end point, select a connection partner. You can select an unspecified device or a CPU in the project as the communications partner. The following parameters are automatically entered as soon as you have selected the connection partner: Interface of the partner end point Interface of the partner end point. If several interfaces are available, you can change the interface as required. Interface type of the partner end point Subnet name of both end points IP address of the partner end point Name of the connection which is used for the communication. If no connection exists yet, it is automatically established. 5. If required, change the connection name in the "Connection name" input box. If you want to create a new connection or edit an existing connection, click on the "Create new connection" icon. Note The PUT and GET instructions between two communication partners can only run if both the hardware configuration and the program part for the partner end point have been loaded into the hardware. To achieve fully functional communication, make sure that you load not only the connection description of the local CPU on the device but also that of the partner CPU as well.
Deleting connections
A connection which was automatically created during the insertion of a PUT or GET instruction appears in the connection table of the network view like every standard connection. As a result, it can be deleted in the connection table.
STEP 7 Basic V11.0 SP2 System Manual, 12/2011,
372
Procedure
To delete a connection, follow these steps: 1. Open the connection table in the network view. 2. In the connection table, select the connection that you want to delete. 3. To do this, right-click the connection and select the "Delete" command from the shortcut menu.
Result
The connection is deleted. The PUT or GET instruction and the associated instance data blocks are retained and must be manually deleted if necessary. To continue using the PUT or GET instruction, you must configure the connection again in the inspector window of the program editor, since all connection parameters were also deleted when the connection was deleted. In this case, specify a new communication partner and a suitable connection.
Requirement
The program editor is open. You have already inserted a PUT or GET instruction. A connection has been established between two communication partners.
Procedure
To define the REQ control parameter, follow these steps: 1. Select the PUT or GET instruction in the program editor. 2. Open the "Configuration" tab in the inspector window. 3. Select the "Block parameter assignment" entry in the area navigation. 4. In the "REQ" field, select a tag of the "BOOL" data type to initialize the execution of the instruction. Alternatively, you can also interconnect a previous instruction in the program editor.
373
See also
PUT: Set parameters for write and send area (Page 374) GET: Set parameters for read and memory area (Page 375)
Requirement
The program editor is open. You have already inserted a PUT instruction. A connection has been established between two communication partners.
Procedure
To specify the read and the memory area for the instruction, follow these steps: 1. Select the PUT instruction in the program editor. 2. Open the "Configuration" tab in the inspector window. 3. Select the "Block parameter assignment" entry in the area navigation. 4. In the "In/Outputs > Write area (ADDR_1) > Start" field, select a "REMOTE" data type pointer to the area of the partner CPU which is to be written. Only absolute addressing is permitted. Example: P#DB10.DBX5.0 Byte 10 5. In the "Length" field, enter the length of the write area and select the data type of the memory area from the drop-down list. 6. In the "In/Outputs > Send area (SD_1) > Start" field, select a pointer to the area in the local CPU which contains the data to be sent. 7. In the Length field, enter the length of the memory area to be read and select the data type from the drop-down list. Only the data types BOOL (for a bit array, "0" must be used as address and an integer multiple of byte must be used as length), BYTE, CHAR, WORD, INT, DWORD, DINT, REAL, COUNTER, TIMER are permitted. If the VARIANT pointer accesses a DB, the DB must always be specified (for example: P#DB10.DBX5.0 Byte 10).
See also
GET: Set parameters for read and memory area (Page 375)
374
Requirement
The program editor is open. You have already inserted a GET instruction. A connection has been established between two communication partners.
Procedure
To specify the read and the memory area for the instruction, follow these steps: 1. Select the GET instruction in the program editor. 2. Open the "Configuration" tab in the inspector window. 3. Select the "Block parameter assignment" entry in the area navigation. 4. In the "In/Outputs > Read area (ADDR_1) > Start" field, select a "REMOTE" data type pointer to the area of the partner CPU which is to be read. Only absolute addressing is permitted. Example: P#DB10.DBX5.0 Byte 10 5. In the "Length" field, enter the length of the read area and select the data type of the memory area from the drop-down list. 6. In the "In/Outputs > Memory area (RD_1) > Start" field, select a pointer to the area in the local CPU in which the read data is to be stored. 7. In the Length field, enter the length of the memory area and select the data type from the drop-down list. Only the data types BOOL (for a bit array, "0" must be used as address and an integer multiple of byte must be used as length), BYTE, CHAR, WORD, INT, DWORD, DINT, REAL, COUNTER, TIMER are permitted.
See also
PUT: Set parameters for write and send area (Page 374)
375
8.1.3.3
376
Which functions are there in the graphic view and which functions are there in the table view?
Displaying the Ethernet topology
Function Displaying all the PROFINET devices and passive Ethernet components of the project along with their ports Display interconnections between the ports (including type of medium) Displaying corresponding logical networks Displaying properties of the cables between the ports Display diagnostic information of all ports Graphic view yes yes no no yes Table view yes yes yes yes yes
Identifying and minimizing differences between the desired and actual topology
Function Running an offline/online comparison of Ethernet modules, ports and port interconnections Adopting existing online topology information in the offline project Graphic view no no Table view yes yes
Procedure
To start the topology view of your project, follow these steps: 1. Click on the "Topology view" tab. Or:
377
Result
The graphic view of the topology view is started. If you opened the topology view using the shortcut menu, the selected component remains selected after the change of view.
Displaying topology Displaying the graphic view of the configured topology What is shown?
The graphic view of the configured topology shows the following: Configured PROFINET devices and passive Ethernet components along with their ports Configured stations with non-Ethernet components if there is at least one Ethernet component in the station Configured interconnections between the ports
Type of display
The way in which the graphic view of the topology view and the network view are displayed is very similar: Compared with the device view, components are shown in a simplified form. The interconnections between ports are shown as horizontal and vertical lines. These are dashed when an interconnection between a tool changer port and its possible partner ports is involved.
378
Type of display
As the name implies, the table view of the topology view consists of a table, the topology overview table. It is structured like the network overview table. It consists of the following columns: Device / port This is the most important column of the table. The entries in this column have a hierarchical structure with the PROFINET ports being the last element in the hierarchy. You can expand and collapse the hierarchical entries. For a CPU, for example, an entry consists of the following elements: Station name Device name Name of the PROFINET interface Names of the ports Note: All the other columns only have entries in the rows containing the port names. Type (as default, this column is not displayed) Shows what type of station, device or interface the table row relates to or whether it belongs to a port. Order no. (as default, this column is not displayed) Order no. of device Subnet (as default, this column is not displayed) Configured subnet to which the interface belongs Master / IO system (as default, this column is not displayed) Shows whether or not the interface belongs to a PROFIBUS DP master system or a PROFINET IO system. Device address (as default, this column is not displayed) Configured address of the interface in the subnet Partner station Name of the station that contains the partner port
379
Displaying the diagnostics status of ports and cables in the graphic view Requirements
The graphic view of the topology view is open.
Procedure
To determine the diagnostics status of the port, follow these steps: 1. Go online with the required component or components.
Result
The following icons are displayed: The corresponding diagnostics icon is displayed for each device. If there is an error in at least one lower-level component, the diagnostics icon "Error in lowerlevel component" is also displayed in the left-hand lower corner of the diagnostics icon. The corresponding diagnostics icon is displayed for each port. Every cable between two ports that are online has the color that matches its diagnostics status. You will find the possible diagnostics icons for ports and the color coding of Ethernet cables in the description of hardware diagnostics. See: Determination of online status and display using symbols (Page 592)
380
Showing the diagnostics status of hardware components in the table view Requirement
The table view of the topology view is open.
Procedure
To obtain the diagnostics status of hardware components of the topology overview table, follow these steps: 1. Go online with the required components.
Result
The following icons are displayed at the left-hand edge of the topology overview table in each row that belongs to the component involved: The diagnostics icon belonging to the hardware component is displayed. If the hardware component has lower-level components and if there is an error in at least one of the lower-level components, the diagnostics icon "Error in lower-level component" is also displayed in the left-hand lower corner of the diagnostics icon of the hardware component. For the possible diagnostics icons for hardware components, refer to the description of hardware diagnostics. See: Determination of online status and display using symbols (Page 592) Note The display of the diagnostics status of hardware components in the topology overview table and the network overview table is identical.
381
Procedure
To find the differences between the configured and the actual topology, follow these steps: 1. Click the "Compare offline/online" button in the toolbar of the topology overview.
Result
The "Partner station", "Partner interface" and "Cable data" columns in the topology overview table are removed. Two additional groups of columns are added to the right-hand side of the table and these are initially empty: On the far right, columns for the topology to be identified online are added. Between the columns for the offline and the online topology, the "Status", "Action" and "Description" columns are added to show the result of the offline/online comparison. Note As default, the "Description" column is not displayed. The following buttons are enabled in the toolbar of the table:
Button Name Update Synchronize Meaning The detection of the existing online topology is started again. Adopt the port interconnections identified online in the project (Page 389) Adopt the devices identified online in the project (Page 390)
After the actual topology has been identified, the added columns are filled. This is discussed in more detail in the following section. Note A difference between offline and online view is displayed for that port connected with the PG/ PC which is only available online. This is because the PG/PC cannot be configured offline.
382
"Action" The possible actions are shown here in the form of icons. The following icons are possible:
Icon Meaning No action possible Adopt the interconnection found online
Configuring topology Interconnecting ports Overview Interconnecting ports in the topology view
In the topology view, you have the following options for interconnecting ports: in the graphic view (Page 384) in the graphic view of a tool changer (Page 385) in the table view (Page 385)
383
What effects does the interconnection of ports have on the network view?
Note In the properties of a subnet in the network view, you can specify that when a port interconnection is created between two devices that are not networked, this subnet is used. When you create an interconnection between two ports, the following effects are possible in the network view: If the corresponding interfaces are not networked: If you have specified a default subnet, this is used. Otherwise a new subnet is created to connect the two interfaces. If one (and only one) of the two interfaces involved is networked: The non-networked interface is connected to the same subnet as the already networked interface. In all other cases: The corresponding interfaces are not connected to a logical subnet.
384
Interconnecting ports in the table view Which actions are possible with port interconnections in the table view?
The following actions are possible with port interconnections in the table view: Create new port interconnection Modify existing port interconnection Delete existing port interconnection
Requirement
The row with the port whose interconnection you want to create, modify or delete is visible in the topology overview.
Procedure
To create the interconnection of a port for the first time, to modify it or delete it, follow these steps: 1. Move the mouse pointer to the "Partner port" column in the row of the source port. 2. Click on the drop-down list there. 3. Select the required partner port (when creating a new interconnection or changing the port interconnection) or the "Not interconnected" entry (when deleting a port interconnection).
Result
The required action is performed. The new partner port (after creating or modifying a port interconnection) is displayed in the "Partner port" column otherwise the "Select port" entry (after deleting a port interconnection).
Interconnecting a port with more than one partner port in the graphic view Requirement
You have assigned parameters to a port of a PROFINET device with the "Alternative partners" property and have specified the possible partner ports. The graphic view of the topology view is open.
385
Procedure
1. Interconnect this port (called source port below) with one of the partner ports you have specified (called target port below). 2. Interconnect the source port with an additional target port. You can do this in several ways: Drag the mouse pointer from an already interconnected partner port to a target port. Drag the mouse pointer from an interconnection that has already been created to a target port. Drag the mouse pointer from a target port to an already interconnected partner port. Drag the mouse pointer from a target port to an already created interconnection. 3. If necessary, repeat the step above one or more times.
Result
An interconnection is created between the source port and the alternative partner ports. This is indicated by a dashed line.
Interconnecting a port with more than one partner port in the table view Which actions are possible with port interconnections to multiple partner ports in the table view?
When working with a tool changer, the following actions can be performed with port interconnections to multiple partner ports in the table view: Create new port interconnection Modify existing port interconnection Delete existing port interconnection
Requirement
You have assigned parameters to a port of a PROFINET device with the "Alternative partners" property and have specified the possible partner ports. The row with the port whose interconnection you want to create, modify or delete is visible in the topology overview.
Procedure
To create the interconnection of a port to one or more partner ports for the first time, to modify it or delete it, follow these steps: 1. Move the mouse pointer to the "Partner port" column in the row of the source port. 2. Click on the drop-down list there. 3. Select the required partner port (when creating a new interconnection or changing the port interconnection) or the "Not interconnected" entry (when deleting a port interconnection).
386
Result
The required action is performed: If you are creating an interconnection, a new row is inserted in the topology overview table. The new partner port is displayed there in the "Partner port" column. If you make a change, the new partner port is displayed in the "Partner port" column. If you are deleting, the row with the previous port interconnection is deleted. Note With a tool changer, there are normally several rows for a port with port interconnections to several partner ports. The last row is always an empty row. The first row can be edited, all other rows are read-only.
Renaming stations, devices, interfaces or ports Rename a station, a device, an interface or a port Requirement
The table view of the configured topology is open.
Procedure
To rename a station, a device, an interface or a port, proceed as follows: 1. Click twice in the relevant field of the topology overview table (the second click starts the editing mode). 2. Enter the new name and then press the ENTER key (this closes editing mode).
Result
The object is renamed.
387
Automatic assignment
A device identified online is automatically assigned to a configured device if the following properties of the two devices match up: Device name Order number Number of ports The following section describes the situations that can occur and what action you can take: Identical port interconnections This is the ideal situation. No action is necessary here.
"Action" column Meaning No action
There are interconnections for the identified and configured device, there are however differences. The following actions are possible: If it is possible to adopt the online configuration
"Action" column Meaning Adopt online interconnection (Page 389) No action
388
The interconnection only exists in the configuration. The following actions are possible:
"Action" column Meaning Adopt the online interconnection (Page 389), in other words, the interconnection in the configuration will be deleted No action
No automatic assignment
In the following situations, no automatic assignment is possible: No device can be identified online to match a configured device. In this case the corresponding columns in the "Online topology" area of the topology overview table are empty. In this case, you should add the already configured device to your system or delete the configured device from the configuration. A device identified online cannot be assigned to any configured device. In this case the corresponding columns in the "Offline topology" area of the topology overview table are empty. In this case, you can adopt the device identified online in the project (Page 390).
389
Procedure
To adopt one more port interconnections identified online in the project manually, follow these steps: 1. Select the value "Adopt" in the "Action" column for a port of a configured device to which a device identified online was assigned. 2. Repeat the step if necessary for other ports of the same configured device. 3. Repeat the steps up to now if necessary for other configured devices to which devices identified online were assigned and for which there are differences relating to the interconnection. 4. Click the "Synchronize" button.
Result
The port interconnections identified online and the cable information for the corresponding devices are adopted in the project. Successful adoption is indicated by the diagnostics icon "Identical topology information" for each port. Note If other port interconnections are recognized for a device identified online and these differ from those that exist in the project, adopting these in the project means that the port interconnections that were previously in the project are replaced by those identified online. If no port interconnections are detected for a device identified online, adopting in the project means that all the port interconnections of this device are deleted in the project.
Procedure
To adopt one more devices identified online in the project manually, follow these steps: 1. For a configured device without an online partner, move the mouse pointer to the "Device/ port" column of the online topology. 2. Select the device you want to assign to the configured device from the drop-down list of this box. 3. Repeat the previous steps if necessary for other configured devices without an online partner.
390
Result
The selected device that was identified online is moved up from the end of the table. Following this, it is in the row of the configured device to which you have just assigned it.
8.1.4
8.1.4.1
Creating configurations
Configurations for automation systems
I/O address
I/O addresses are required to read inputs and/or set outputs in the user program. Input and output addresses are assigned automatically when inserting modules in the rack. The address of the first channel is the start address of a module. The addresses of the other channels are derived from this start address. The address end is derived from the modulespecific address length.
391
The hardware ID is assigned automatically when components are inserted in the device or network view and in the constants table of the PLC tags. A name is also assigned automatically for the hardware ID. These entries in the constants table of the PLC tags cannot be changed either.
See also
Specifying input and output addresses (Page 392) Assigning addresses to a location in the program (Page 393) Introduction to loading a configuration (Page 476)
Requirement
You are in the device view.
Procedure
To change the preset address range proceed as follows: 1. In the device view, click on the module for which you want to set the start address. 2. Go to "I/O addresses" in "Properties" in the inspector window. 3. Under "Start address" enter the required start address. 4. Press <Return> or click on any object to accept a modified value. If you have entered an invalid address, a message indicating the next available address is displayed. Note You can also change the addresses directly in the device overview.
392
See also
Editing properties and parameters (Page 303)
Requirement
The device view of the hardware and network editor as well as the instruction window of the program editor must be opened and arranged one below the other.
Procedure
Proceed as follows to assign addresses of modules and locations in the program: 1. In the device view, navigate to the module with the desired I/O channel. 2. Use the zoom function to specify a magnification of at least 200%: At a magnification level of 200% and higher, the labels of the individual address channels are displayed and can be edited.
393
The module address or tag will be assigned to the location in the program, or the address or tag in the program will be assigned to a module I/O channel.
394
Requirement
The hardware catalog is open. The S7-1200 CPU has a free slot for the signal board.
You have now inserted a signal board in the slot of the CPU. If you are in the network view, you can also drag a signal board to a device. If the CPU has a an empty slot for a signal board, the signal board is inserted automatically into this slot.
395
Configurations for Web server What you need to know about web servers Introduction
The web server allows you to monitor the CPU via the Internet or the intranet of your company. This permits evaluation and diagnostics over long distances. Messages and status information are visualized on HTML pages.
Web browser
You need a web browser that supports HTML 1.1 to access the HTML pages of the CPU. The following web browsers, for example, are suitable for communication with the CPU: Internet Explorer (version 6.0 and higher) Mozilla Firefox (V1.5 and higher) Opera (version 9.0 and higher) Netscape Navigator (version 8.1 and higher)
396
User Pages User pages (if custom web pages have been configured and loaded)
Requirements
The web server must be started. The web server only starts when it has been activated in the properties of the CPU in the "Web server" section. Note the following: The web pages are normally transmitted via an non-secure connection and are not secured against hacker attacks. If you want to transfer the web pages in encrypted form to the browser, use the URL https://, followed by the IP address of the CPU.
Logon
No logon is required to access the standard web pages read-only. To execute certain actions, such as changing the operating state of the CPU or for write access, the user must be logged on as "admin". The logon input boxes are on the top left of each standard web page.
397
If you log on as "admin", you must enter the user name and password there. Name: admin. Password: configured CPU password (for password-protected CPU).
See also
Access for HTTPS (Page 398)
398
399
Creating and loading custom web pages What you need to know about custom web pages Concept
The concept of custom web pages allows you to access freely-designed web pages of the CPU from a web browser. The web server of the CPU provides this function. You are not dependent on special tools for the design and functionality of the custom web pages. You can adapt the pages in the layout with CSS, provide dynamic content with JavaScript or use any framework to produce web pages. The totality of files processed by the web server is also referred to as the "web application".
Initialization
Custom web pages are "packaged" in data blocks for processing by the CPU. You must generate appropriate data blocks from the source data (HTML files, images, JavaScript files, etc.) during configuration to be able to download the web application into the CPU. The Web Control DB has a special role (default: DB 333). It contains status and control information as well as links to additional data blocks with coded web pages. Data blocks that contain coded web pages are termed "Fragment DBs".
400
Synchronization
If the user program is to exchange data with the user-defined web pages, the WWW (SFC 99) instruction must be used in the cyclic program section. Examples of interaction between user program and web page: Check received data Assemble and send back data to the web browser making the request In this case, the status information must be able to be evaluated and control information must be transmitted to the web server, for example, to release a requested web page.
401
Programming a web application (using suitable tools when required and AWP commands for dynamic pages when applicable). The web application is comprised of single source files, for example, *.html, *.gif, *.js, etc. Using STEP 7: Generate the data blocks (Web Control DB and fragment DBs) from source files. The DBs contain meta information and the complete web application, including the images and the dynamic and static parts of the web application. The DBs are stored under "System blocks" in the project tree. Call the "WWW" instruction in the user program. This instruction initializes the web server of the CPU for a web application. If required, complete final programming for interaction between the web server and user program Downloading the blocks to the CPU. Call the web page in the browser. The web pages of the CPU are called by entering the IP address of the CPU.
Additional information
You can find additional information and examples relating to the S7-1200 web server on the Internet (http://support.automation.siemens.com/WW/view/en/36932465).
402
Rules
The tool must be able to directly edit the HTML code so that the AWP command can be inserted into the HTML page. Only the AWP commands are parsed in the CPU and, for example, replaced by values from the user program/process image of the CPU. Files containing AWP commands must be coded in UTF-8. In the metadata of the HTML page, therefore, set the attribute charset to UTF-8 and save the file UTF-8 coded. Files containing AWP commands must not contain the following sequence: ]]> Files containing AWP commands must not contain the following sequence outside of the "Tag-read ranges" (:=<Tag name>:): := Tip: Replace the first character of a prohibited sequence with its character coding; for the colon, for example, :. A small example for a custom web page should make clear the basic design.
Requirements
The CPU must have a web server and the web server of the CPU must be activated. To be able to access PLC tags with write access as a user, you must be logged on as "admin". For the example below, PLC tags must be defined for those PLC tags that are to be shown on the web page. This is shown here for the first tab used, "Tank_below_max".
403
AWP commands
The interface between a freely-programmable web application for a CPU that has a web server and the CPU data is declared by the AWP command (Automation Web Programming). To develop web applications you are only subject to the restrictions of the web browser. In one of the programming languages of STEP 7, control with the user program which CPU data is displayed at what time in the web browser of the viewer. Use AWP commands, which you comment within the HTML files, to declare data to be used for intentional interaction between the web application and the user program. AWP commands are inserted as HTML comments with a special syntax into HTML files; they declare the following features: Read PLC tags Write PLC tag Read special tags Write special tags Define enum types Assign tags to enum types Defining fragments Import fragments
404
See also
Reading tags (Page 405) Writing tags (Page 407) Special tags (Page 408)
Reading tags
Custom web pages can read PLC tags. The PLC tag must be specified by a PLC tag name. These OUT variables (direction of output as viewed from the controller) are inserted at any location within the HTML text with the syntax described in the following.
Syntax
:=<varname>: These references are replaced when the web server is in operation by the current values of the PLC tag in each case. <varname> can be a simple, global CPU tag but also a complete tag path to a structure element.
405
If the PLC tag name contains the character : (colon) or \ (backslash), this character must be designated with the escape sequence \: or \\ as standard character of the PLC tag name.
PLC tag "abc:de" "abc\de" PLC tag in HTML code :="abc\:de": :="abc\\de":
Special characters "<, &, >" Display problems can occur if these characters are contained in the tag name (for example, "a<b"). Avoid expressions such as :="a<b": in the HTML page. To prevent display problems from occurring, use e.g. an AWP command with a use expression according to the pattern depicted below. The use attribute defines the PLC tag with the problematic character, the name attribute defines the name without problematic character, as it is used in the HTML page.
PLC tag "a<b" PLC tag in HTML code <!AWP _Out_Variable Name=simplename Use='"a<b"' --> ... :=simplename:
See also
AWP commands (Page 404)
406
Writing tags
Custom web pages can write data into the CPU. This requires an AWP command that identifies the PLC tag to be written. The PLC tag must also be specified by a PLC tag name. The IN tags (direction of input as viewed from the controller) are placed on the browser page. This can be done, for example, in a form. The tags are either set in the HTTP header (by cookie or POST method) or in the URL (GET method) by the browser and are then written by the web server into the respective PLC tag.
Syntax
To allow the IN tags to be written to the CPU, the tags must first be defined by an explicit AWP instruction: <!-- AWP_In_Variable Name='<PLC_Varname1>' Name='<PLC_Varname2>' Name='<PLC_Varname3>' --> Several tags can be defined in an instruction - such as that shown above. The specific PLC tag name is hereby written in double quotation marks; for example <PLC_Varname1> = "myVar". In cases where the name of the tag that you use for the web application is not identical to the name of the PLC tag, the "Use" parameter can be used to assign to a PLC tag. <!-- AWP_In_Variable Name=<Webapp_Varname> Use=<PLC_Varname>
Example
The "AWP_In_Variable" AWP command is indispensable when handling forms. <form method='post' action='/awp/appl/x.html'> <p> <input name='"var1"' type='text'> <input value='set' name='Button1' type='submit'> </p> </form> In the form defined above, the HTTP request method "post" is used to transfer the tag "var1" to the web server. The user places the "var1" tag in the form field. The tag 'Button1' has the value 'set', but is not required for the CPU. To allow the "var1" tag to be written to the CPU, the following instruction must be included in the same fragment: <!-- AWP_In_Variable Name='"var1"' --> Since PLC tags are enclosed in double quotation marks ("), the name in the AWP command must be enclosed in single quotation marks (') or in masked quotation marks (\"). To avoid the numerous escape sequences, we recommend the use of single quotation marks. <!-- AWP_In_Variable Name="Info".par1 --> <!-- AWP_In_Variable Name="\"Info".par1\"" -->
407
See also
Requirements for web access (Page 397) AWP commands (Page 404)
Special tags
Special tags are mainly HTTP tags set in the definition of the World Wide Web Consortium (W3C) . Special tags are also used for cookies and server tags. The AWP command to read and write special tags differ only in that they have additional parameters than the AWP command used to read and write normal tags.
Use the AWP command "AWP_Out_Variable" to specify which PLC tags are to be transferred in the HTTP header to the web browser. Basic structure:
408
Parameter description
Name: Type and name of special tag Use (optional parameter): In cases where the name of the special tag is not identical to the name of the PLC tag, parameter "Use" can be used to assign to a PLC tag. Example:
The AWP command "AWP_In_Variable" is used to define which special tags are to be evaluated in the user program of the CPU. Basic structure:
Parameter description: Name: Type and name of special tag Use (optional parameter): In cases where the name of the special tag is not identical to the name of the PLC tag, the parameter Use can be used to assign to a PLC tag.
409
Examples:
The tag name in the HTTP header is replaced by the PLC tag name specified by Use . The cookie is written to the PLC tag "info".language .
The tag name in the HTTP header is replaced by the PLC tag name specified by Use. The cookie is written to the PLC tag "info".language .
See also
AWP commands (Page 404)
Creating enums
Enter an AWP command using the following syntax at the start of the HTML file: <!-- AWP_Enum_Def Name="<Name of the enum type>" Values='0:"<Text_1>", 1:"<Text_2>", ... , x:"<Text_x>"' --> For example, for German values to be saved as an HTML file in the "de" folder of the HTML directory:
For example, for English values, to be saved as an HTML file in the "en" folder of the HTML directory:
410
Assigning enums
Tags are assigned from the user program to the individual enum texts using a special AWP command:
<VarName> is thereby the symbolic name from the user program and <EnumTypeName> is the previously set name of the enum type. Note In each fragment in which enum texts are referenced by a PLC tag, this PLC tag must be assigned by the appropriate AWP command of the enum type name.
Example
Enum type "state" is defined with values "0" and "1". "0" means "off", "1" means "on":
The following code is contained in the HTML code of the web page to be output:
Depending on the value of the "operating state" tag, the result displayed is no longer "0" or "1", but "off" or "on".
411
Defining fragments
The start of a fragment is specified by this command. A fragment runs to the start of the next fragment or to the end of the file. <Name> Indicates the name of the fragment. The name must start with a letter [a-zA-Z] or an underscore ( _ ). Letters, underscores or numbers [0-9] can follow after this first character. <Type> Indicates the type of the fragment. "manual" The user program is informed of the request for a fragment; the web page to be returned can be changed by the user program. "automatic" The page is automatically processed (default). <id> A numeric ID can be stipulated for the fragment. If no ID is assigned, the fragment is automatically assigned an ID. For manual pages (<Type>=manual) , the fragment can be addressed in the user program of the CPU by this ID. Note Keep the ID low because the highest ID influences the size of the Web Control DB. The input document is completely divided into fragments by the "AWP_Start_Fragment" command. "AWP_End_Fragment" is therefore unnecessary. Without a start fragment command, a file is mapped as a fragment; the fragment name is derived from the file name. If a file is divided into several fragments (by "AWP_Start_Fragment"), the file must begin with the "AWP_Start_Fragment" command.
Importing fragments
You can declare a fragment in an HTML page and import this fragment into other web pages.
Example
A company logo is to be displayed on all web pages of a web application. There is only one instance of the HTML code for the fragment that displays the company logo. You can import the fragment as often and into as many HTML files as required.
Syntax
412
Example
HTML code within a web page that declares a fragment:
Example
HTML code within another web page that imports the declared fragment:
Procedure
To create data blocks from the source files for custom web pages in STEP 7, proceed as follows: 1. Select the CPU, for example, in the device configuration. 2. Select the properties for custom web pages in the inspector window under "Properties > General > Web server". 3. As "HTML source", select the folder that contains the source files for the web application. 4. Enter the HTMP page to be opened on starting the web application as the start HTML page. 5. Enter a name for the application if required. 6. You can supplement a range of file name extensions as "Files with dynamic content" if necessary. Only enter those file name extensions that also contain AWP commands. 7. The number for the Web Control DB and for the fragment DB start number can be kept as long as they are not already being used by your user program.
413
Web Control DB
The Web Control DB (DB 333 by default) is created by STEP 7 and contains information on the structure of user pages, the status of communication and any errors that occur. Additional fragment DBs are also created as well as the Web Control DB. These fragment DBs (there may also only be one fragment DB) are referenced in the Web Control DB. The fragment DBs contain the web pages and media data coded in fragments, for example, images. The content of the fragment DB cannot be changed by the user program. It is created automatically and is only for data management. The status and control tags of the Web Control DB are accessed via symbols. The following lists the tags of the Web Control DB required for status evaluation and to control interaction.
414
415
"WEB-Control_DB".requesttab[x].repeat
"WEB-Control_DB".requesttab[x].abort "WEB-Control_DB".requesttab[x].finish
Example:
The tag for the DB is: "WEB-Control_DB". Whether errors have occurred during initialization of the web application can be determined by requesting bit "WEBControl_DB".commandstate.error in the user program. If an error has occurred you can analyze it using the "WEBControl_DB".commandstate.last_error value.
Fragment type
To react to the received data in the user program the "manual" fragment type must be used for the fragment writing the data (for "manual pages"): <!-- AWP_Start_Fragment Name="testfrag" ID="1" Type="manual" --> The values are always transferred to the web server of the CPU for automatic and manual pages in the same way: Example: <form method="POST" action=""> <p> <input type="submit" value="Set new value"> <input type="text" name='"Velocity"' size="20"> </p> </form>
416
417
In cases where a request has been made, this program section writes the fragment ID in the #frag_index tag and the request no. (value range 1-4) in the #req_index tag. Using the information from this, the information transferred in the request can now be processed separately for each fragment ID in the program (for example, plausibility check). Once processing of the request has been completed by the program, the request must be answered and the appropriate entry is once more reset under"requesttab" of the Web Control DB (for example, DB 333). A simple programming example for replying to requests:
418
Principle sequence of a browser request with interaction from the user program
The following figure shows the simplified, principle sequence of the web browser request on the effects of Web Control DB content and the actions required from the user program until the processed web page is returned (response).
Displaying custom web pages in the browser Display web pages in browser
Web pages are called from the standard web pages of the web browser.
419
Requirements
The language-dependent HTML; pages must be stored in a folder structure containing folders with the respective language abbreviations:
420
421
422
See also
Overview of point-to-point communication (Page 535) General information on high-speed counters (Page 530) Configuring PID Compact (Page 2723) Configuring PID_3Step (Page 2742) Motion functionality of the CPU S7-1200 (Page 2761)
8.1.4.2
423
Additional information
Observe additional information on the scope of functions in the manuals of the respective device.
DP slaves within the hardware catalog DP slaves within the hardware catalog
You will find the DP slaves in the "Distributed I/O" folder of the hardware catalog. Compact and modular DP slaves are located there: Compact DP slaves Modules with integrated digital/analog inputs and outputs, for example, ET 200L Modular DP slaves (Interface modules with S7 modules assigned, for example, ET 200M The available DP master and the desired functionality will determine which DP slaves can be used.
424
Configurations involving PROFIBUS DP Configurations involving basic DP slaves Communication between DP master and DP slave
In the case of a configuration involving simple DP slaves, data is exchanged between the DP master and simple DP slaves, i.e. with I/O modules via the DP master. The DP master polls each of the configured DP slaves in its polling list within the DP master system in succession, sending the output data to the slaves and receiving the input data back from the slaves.
Mono-master system
The configuration with only one DP master is also described as mono-master system. A single DP master with its associated DP slaves is connected to a physical PROFIBUS DP subnet.
425
Requirements
DP master and DP slaves are placed in the network view.
426
4. Select the shortcut menu "Assign to new master" and select the corresponding DP interface for the DP master in the subsequent dialog.
5. The DP slaves are automatically networked with the DP master and combine with it to form a DP master system. Note When a DP master system is highlighted, you can double-click on a DP slave in the hardware catalog and thereby quickly add additional DP slaves. This will result in the DP slave being added to the highlighted DP master system automatically.
427
DP master
You can use any of the following devices as a DP master: CM 12435
Requirements
You must be in the network view. The hardware catalog is open.
Procedure
To create a DP master system, follow these steps: 1. Select a DP master from the hardware catalog. 2. Pull the DP master onto the free area within the network view. 3. Right-click on the DP master's DP interface. 4. Select "Create master system" from the shortcut menu. A DP master system with one DP master will be created as a single node. If you connect a DP slave's DP interface to that of the DP master, the DP slave will be added to the master system.
Assuming that you have already placed both a DP master and a DP slave within the network view, you can drag-and-drop to connect the two and thereby create a DP master system. To do so, follow these steps:
428
There are various ways of removing the highlighting from a DP master system:
429
Requirements
You must be in the network view. There has to be a DP master system with one DP master and at least one DP slave.
430
DP slaves
For configuration purposes, DP slaves are broken down into the following categories: Compact DP slaves (Modules with integrated digital/analog inputs and outputs, for example, ET 200L) Modular DP slaves (interface modules with S5 or S7 modules assigned, for example ET 200M) Intelligent DP slaves (I slaves) (CM 12425 or ET 200S with IM 151-7 CPU)
431
Rules
Your DP master system should only contain one DP master, but it may contain one or or more DP slaves. You may only configure as many DP slaves in a DP master system as are permitted for the specific DP master. Note When configuring the DP master system, remember to observe the DP master technical data (max. number of nodes, max. number of slots, max. quantity of user data). User data restrictions may possibly prevent you from being able to use the maximum number of nodes that is theoretically possible.
Requirements
You must be in the network view. A DP master system must have been created.
432
Configuring a DP slave
To configure a DP slave, follow these steps: 1. Switch to the DP slave's device view. 2. Select the module you want. 3. Configure the DP slave in the Inspector window.
433
Applications
Configurations involving intelligent DP slaves: I slave <> DP master data exchange Direct DP slave > I slave data exchange
Procedure
To add an I slave to a DP master system, follow these steps: 1. Drag two devices with PROFIBUS DP interface for configuration as DP master and I slave from the hardware catalog to the network view. 2. Draw a connecting line between the DP interfaces of both devices. This way you connect the I slave with a DP master in a DP master system. Result: You have now set up a DP master system with one DP master and one I slave.
434
Configuring the transfer area for data with DP slaves of the S7-1200
With CM 12425, the transfer area for the cyclic PROFIBUS data exchange is configured as transfer area in the parameter group "PROFIBUS interface > Mode > I Slave Communication".
Configuring DP slaves as distributed I/O devices Configuring an ET 200S Slot rules for configuring an ET 200S
The following rules apply when configuring an ET 200S: Do not leave any gaps when inserting the ET 200S modules. Slot 1: only for PM-E or PM-D Power Modules. To the left of an Electronics Module (EM): an EM or a Power Module (PM-E or PM-D) only. To the left of Motor Starter (MS): an MS, a PM-D, PM-D Fx (1..x..4) Power Module or a PMX Power Module only.
435
Configuring the AI TC: Selection of the reference junction used Configuring of the AI RTD: Activation of the reference junction Specifying the slot and channel of the AI RTD
436
Additional information
For additional information on the various types and uses of ET 200S modules, please refer to the operating instructions and the manual titled "ET 200S Distributed I/O System". For additional information on analog value processing, please see the documentation for the ET 200S distributed I/O system.
Requirements
You are in the device view. An ET 200S, for example an IM 151-1, must be present. A pair of digital electronics modules, for example 2DI AC120V ST, must be inserted into the slots.
437
Packing addresses
To pack addressed, follow these steps: 1. Select the electronics modules whose addresses are to be packed. The following options are available for selecting multiple electronics modules: Press and hold down <Shift> or <Ctrl> while clicking the relevant electronics modules. Click off the rack and select the required electronics modules by drawing round them with the mouse. 2. Click "Pack addresses" in the shortcut menu for the selected electronics modules. The address areas for inputs, outputs and motor starters are packed separately. The packed addresses will be displayed in the I address and Q address columns of the device overview.
Unpacking addresses
To unpack addressed, follow these steps: 1. Select one or more electronics modules with packed addresses. 2. Click "Unpack addresses" in the shortcut menu for the selected electronics modules. The packing groups of the selected electronics modules will be disbanded and the packed addresses for the relevant electronics modules unpacked. The packing group will also be disbanded and the packed addresses unpacked in the following cases: if you delete electronics modules from a packing group, move electronics modules out of a packing group or insert electronics modules on a free slot within a packing group. The start addresses of the unpacked electronics modules will be assigned to the next available byte addresses in each case.
438
Requirements
ET 200S interface module IM 151-1 STANDARD (6ES7 151-1AA03-0AB0 or higher) IM 151-1 FO STANDARD (6ES7 151-1AB02-0AB0 or higher) Power module with option handling PM-E DC24..48V PM-E DC24..48V/AC24..230V
439
Procedure
To activate option handling, follow these steps: 1. Select the IM 151-1 in the device view and enable it in "Option handling" check box under "Properties > General > Option handling" in the inspector window. 2. Select the numbered check boxes for the slots that are initially to accommodate the reserve modules prior to the future electronics modules. 3. Select the power module in the device view and enable it in the "Option handling" check box under "Properties > Addresses" in the inspector window. Reserve the necessary address space for the control and check-back interface in the process image output (PIQ) and process image input (PII). The assembled reserve modules can be replaced with the configured modules at a later date without having to modify the configuration. Note The addresses for these interfaces are reserved as soon as you activate option handling on the power module. The "Option handling" function must also be activated on the DP slave (IM 151-1 STANDARD Interface Module). If it is not activated, the addresses reserved for the control and check-back interface will be released again. Note that activating and deactivating the option handling function repeatedly can change the address of the control and check-back interface. Option handling may be activated for one PM-E DC24..48V or one PM-E DC24..48V/ AC24..230V Power Module only.
Additional information
For additional information on the assignment and significance of bytes within the process image, option handling with PROFIBUS and the use of reserve modules, please refer to the documentation for the ET 200S distributed I/O system.
440
Requirement
You must be in network view. A DP master with DPV1 functionality must be available. A master-slave connection must be established with PROFIBUS.
441
Procedure
To switch the DP slave over to DPV1, follow these steps: 1. Select the DP slave. 2. Under "Properties > Module parameters" in the Inspector window, select "DPV1" mode from the "DP interrupt mode" drop-down list. or 1. Select the DP master. 2. In the I/O communications table, select the row with the connection between the DP master and the desired DP slave. 3. Under "Properties > Module parameters" in the Inspector window, select "DPV1" mode from the "DP interrupt mode" drop-down list.
Special characteristics
The parameters are subject to interdependencies, which are outlined below:
Parameter Operation when target configuration does not match actual configuration Diagnostics interrupt (OB 82) Insert/remove interrupt (OB 83) DPV0 mode Fully available DPV1 mode Fully available
Fully available Fully available Only available when addresses are not packed. "Startup when target configuration does not match actual configuration" is activated automatically along with an insert/remove interrupt.
442
Using GSD files GSD revisions What you need to know about GSD revisions
The properties of DP slaves are made available to configuration tools by means of GSD files. Functional enhancements in the area of the distributed I/O will have an effect on the GSD specification, for example, they will require the definition of new keywords. This results in the versioning of the specification. In the case of GSD files, the version of the specification on which a GSD file is based is called a "GSD revision". From GSD revision 1, the GSD revision must be included as a keyword "GSD_revision" in GSD files. GSD files without this keyword will therefore be interpreted by configuration tools as GSD revision "0". GSD files can be interpreted up to GSD revision 5. This means that DP slaves that support the following functions, for example, will be supported: Diagnostic alarms for interrupt blocks Isochronous mode and constant bus cycle time SYNC/FREEZE Clock synchronization for DP slaves
443
Requirement
The hardware and network editor is closed. You have access to the required GSD files in a directory on the hard disk.
Procedure
To install a GSD file, proceed as follows: 1. In the "Options" menu, select the "Install device master data files" command. 2. In the "Install device master data files" dialog box, choose the folder in which you want to save the GSD files. 3. Choose one or more files from the list of displayed GSD files. 4. Click on the "Install" button. 5. To create a log file for the installation, click on the "Save log file" button. Any problems during the installation can be tracked down using the log file. You will find the new DP slave installed by means of the GSD file in a new folder in the hardware catalog. Note Installation of GSD file cannot be undone.
Requirements
You have installed a DP slave using a GSD file. You have inserted the head module in the network view in the usual manner. The device overview opens in the device view. The hardware catalog is open.
Procedure
To add the modules of a GSD-based DP slave, proceed as follows: 1. In the hardware catalog, navigate to the modules of the GSD-based DP slave. GSD-based DP slaves, also referred to as DP standard slaves, can be found in the "Other field devices" folder of the hardware catalog. 2. Select the desired module.
444
Preset configuration
For modules with an adjustable preset configuration, you can change this configuration in the inspector window under "Properties > Preset configuration".
8.1.4.3
What you need to know about PROFINET IO What is PROFINET IO? PROFINET IO
PROFINET is an Ethernet-based automation standard of PROFIBUS Nutzerorganisation e.V. (PNO) which defines a manufacturer-neutral communication, automation and engineering model.
Objective
The objective of PROFINET is: Integrated communication via field bus and Ethernet Open, distributed automation Use of open standards
Architecture
The PROFIBUS User Organisation e.V. (PNO) has designated the following aspects for PROFINET architecture: Communication between controllers as components within distributed systems. Communication between field devices, such as I/O devices and drives.
445
Implementation by Siemens
The demand for "Communication between controllers as components within distributed systems" is implemented by "Component Based Automation" (CBA). Component Based Automation is used to create a distributed automation solution based on prefabricated components and partial solutions. The demand for "Communication between field devices" is implemented by Siemens with "PROFINET IO". Just as with PROFIBUS DP, the complete configuration and programming of the components involved is possible using the Totally Integrated Automation Portal. The following sections deal with the configuration of communication between field devices using PROFINET IO.
446
PROFINET devices PROFINET device with proxy functions (for example, IE/PB link) PROFIBUS devices
PROFINET device with proxy functions used as proxy for a PROFIBUS device
The PROFINET device with proxy functions is the proxy for a PROFIBUS device on the Ethernet. Proxy functionality allows a PROFIBUS device that can communicate with all devices on the PROFINET and not just with its master. Using PROFINET, existing PROFIBUS systems can easily be integrated into PROFINET communication using the proxy functions. If, for instance, you connect a PROFIBUS device via an IE/PB link to PROFINET, the IE/PB link acts as a proxy for the PROFIBUS components to establish communication via PROFINET.
447
Restrictions
The following restrictions apply to DP slaves configured as described above on the PROFIBUS subnet of an IE/PB link: No pluggable IE/PB link No pluggable DP/PA link No pluggable Y link Not CiR-compliant No pluggable redundant slaves No isochronous transmission / constant bus cycle time can be configured SYNC/FREEZE instructions ("DPSYC_FR") of a CPU on the the Ethernet subnet for DP slaves behind the IE/PB-Link are not supported.
448
Special feature
If several IWLAN/PB links are located within a segment, they have to share the bandwidth that is available for wireless transmission. This leads to a lengthening of the update time for these devices.
Example
In the following example there are two IO devices (IWLAN/PB link) with a segment. If no more than a maximum of two IWLAN/PB links are present in a IWLAN segment at the same time, enter a "2".
Segment 1 Segment 2
449
Configure PROFINET IO Addressing PROFINET devices Assigning addresses and names to PROFINET devices
In this chapter you will learn which address and naming conventions are valid for the PROFINET devices.
IP addresses
All PROFINET devices work with the TCP/IP protocol and therefore require an IP address for Ethernet operation. You can set the IP addresses in the module properties. If the network is part of an existing company Ethernet network, ask your network administrator for this data. The IP addresses of the IO devices are assigned automatically, usually at CPU startup.
Device names
Before an IO device can be addressed by an IO controller, it must have a device name. This procedure was chosen for PROFINET because names are easier to administer than complex IP addresses. Both the IO controller as well as IO devices have a device name. The device name is automatically derived from the name configured for the device (CPU, CP or IM): The PROFINET device name is made up of the name of the device (for example, the CPU), the name of the interface (only with multiple PROFINET interfaces) and optionally the name of the IO system: <CPU name>.<Name of the interface>.<IO system name> You cannot change this name directly. You change the PROFINET device name indirectly, by changing the name of the affected CPU, CP or IM in the general properties of the module. This PROFINET device name is also displayed, for example, in the list of accessible devices. A "converted name" is generated from the PROFINET device name. This is the device name that is actually loaded into the device. The PROFINET device name is only converted if it does not comply to the rules of IEC 61158-6-10. You cannot change this name directly either.
450
device-1.machine-1.plant-1.vendor If you assign this name, to a CPU for example, STEP 7 will not convert it.
Device number
In addition to the device name, a device number is also automatically assigned when an IO device is plugged in. You can change this number.
See also
Assigning the device name and IP address (Page 451) Retentivity of IP address parameters and device names (Page 458)
Assigning the device name and IP address Assigning an IP address and subnet mask for an IO controller the first time
There are various options for this: During the configuration of PROFINET interface, you have to set the following: IP address is set in the project. IP address is set using a different method.
451
Option: Set IP address in the project: Assign online via MPI/PROFIBUS interface
Option "Use different method to obtain IP address" Assign online Assign via user program Higher-level IO controller (only with I devices)
Assigning device names for IO devices when the "Device replacement without removable media/PG" option is enabled
For IO devices where the "Device replacement without removable media/PG" option is activated, it is not necessary to assign the device name in the case of a device replacement.
452
Assigning a device name and address for an IO device (exception in the case device exchange without media change/PG)
The following graphic illustrates the process for assigning the device name and address.
Each device receives a name; STEP 7 automatically assigns an IP address. STEP 7 generates a PROFINET device name from the name. This is then assigned to an IP device online (MAC address) and is written into the device. The configuration is downloaded to the IO controller. The IO controller assigns the appropriate IP address to the IO device with the assigned PROFINET device name during startup.
A device name is assigned to each IO device. You can change the name and IP address manually. You have two options for downloading configured data to the PROFINET IO device:
453
Requirement for additional procedures when assigning IP address and device name
If the IO device, as described above, should not obtain the IP address or device name from the IO controller, proceed as follows: 1. Select device or network view. 2. Open the properties for the respective PROFINET device. 3. Select the "Use different method to obtain IP address" option or "Different method for obtaining device name" option.
Rules
If the "Different method for obtaining IP address / device name" option is used in a PROFINET device, note the following: The subnet part of the IP address of the IO device must match the subnet part of the IP address of the IO controller. The corresponding PROFINET device cannot be used as a router.
454
See also
Calling the name assignment function from the project tree or via the "Online" menu (Page 617)
Requirements
You must be in the network view. A CPU 1214C (V2.0 or higher) must be available in the network view. An IM 151-3PN is available. The PROFINET interfaces of both modules are networked.
Procedure
To assign the names, follow these steps: 1. Select the CPU. Make sure that you have selected only the CPU and not the complete device! 2. Assign the name "myController" in the Inspector window, under "General".
3. Select the IM. Make sure that you have selected only the IM and not the complete device ET200S! 4. Assign the name "Device_1" in the Inspector window, under "General". 5. Right-click on the PROFINET IO system and select the "Properties" command.
455
7. You can find the automatically generated PROFINET device names at the selected device in the Inspector window, at "PROFINET interface".
The PROFINET device name corresponds to the name of the module (with the name of the IO system as extension) with the difference that only lower case text is used.
456
Requirements
The programming device has a card reader for memory cards. The IO device must support the assignment of the device name via memory card. The station and its PROFINET IO system is configured.
Procedure
To store a device name on a memory card, follow these steps: 1. Insert the memory card into the card reader. 2. Select the IO device whose device name is to be assigned by the memory card. 3. Select the "Card reader > Save Device Name to Memory Card" command in the "Project" menu. If the memory card is not empty, a message will be issued informing you of this and you will have the option to delete the card.
457
Recommendation
If possible, use the "Set IP address in project" and specify an appropriate IP address. In this case, the IP address is assigned retentively.
458
Procedure
To create a PROFINET IO system, proceed as follows: 1. Use drag-and-drop to pull an IO controller from the hardware catalog (for example, CPU 1214C) into the free area of the network view. The IO controller is created in the project. 2. Use drag-and-drop to move an IO device from the hardware catalog (for example, ET 200S) into the free area of the network view. 3. Click on the PROFINET interface of the IO controller or the IO device. 4. Hold down the mouse button and draw a connecting line between this selected interface and that of the partner device. A subnet with an IO system between the IO controller and the IO device is created. 5. If required, adapt the properties of the Ethernet subnet or the IO controller (for example, IP address) under "Properties" in the inspector window.
459
2. Select the "Disconnect from IO system" shortcut menu command. The IO device that was assigned to this IO system is then no longer assigned to it.
You can create a new IO systems and can assign each of the non-assigned IO devices to an IO controller.
460
Requirements
IO controller and IO devices are placed in the network view.
461
5. The IO devices are automatically networked with the IO controller and combine with it to form an IO system. Note When an IO system is highlighted, you can double-click on an IO device in the hardware catalog and thereby quickly add additional IO devices. Result: The IO device is automatically added to the highlighted IO system.
Interconnecting ports
If an IO device is assigned to an IO controller, this does not yet specify that the ports are connected to each other. Although a port interconnection is not required to use the PROFINET functions, it does however offer the following advantages: A setpoint topology is assigned with the port interconnection. Based on an online-offline comparison, it is possible to conduct a setpoint-actual comparison with all devices that support this function. Only with IRT communication: If a port interconnection is configured, STEP 7 can determine the required bandwidth more precisely. As a rule, this leads to a higher performance. Make sure that no invalid ring structures occur through the interconnection of ports. Port interconnection is only advisable for devices that support the topology configuration.
462
Setting the send clock Shortest possible update interval for send clock
The send clock indicates the time between two consecutive communication cycles. It is the shortest possible transmission interval in data exchange. The update times are calculated as multiples of the send clock cycle.
Procedure
To set the send clock, proceed as follows: 1. Select the PROFINET IO controller in the device or network view. 2. Change the value for "Shortest possible update interval for send clock" in the properties of the PROFINET interface under "PROFINET Interface > Advanced options > Realtime settings > IO communication". The send clock is valid for all PROFINET devices at the IO system. If the synchronization role is set to a value other than "Unsynchronized", you can only set the send clock in the sync domain, in other words, centrally at the PROFINET IO system.
463
464
Calculated bandwidth for cyclic IO data Calculated bandwidth for cyclic IO data
Adherence to the maximum available bandwidth for cyclic IO data is monitored by the system. The maximum bandwidth depends on the send clock cycle. If the send clock cycle is greater than or equal to 1 ms, the maximum bandwidth is 0.5 ms. If the send clock cycle is shorter, the maximum available bandwidth is also reduced. The bandwidth actually required for cyclic IO data is determined by the system based on the number of configured IO devices and IO modules. Furthermore, the required bandwidth depends on the update time that is used. In general, the calculated bandwidth increases in the following cases: There is a greater number of IO devices There is a greater number of IO modules The update times are shorter.
465
Setting port options Setting the port options Changing connection settings for the PROFINET IO port
You can change the network settings for the PROFINET IO port as required. By default, the settings are made automatically. In normal situations, this guarantees problem-free communication.
"Monitor" option
This option is used to activate or deactivate the port diagnostics. Examples of port diagnostics: The link status is monitored, in other words, the diagnostics are generated during link-down and the system reserve is monitored in the case of fiber optic ports.
466
467
Enable boundaries
"Boundaries" are limits for transmission of certain Ethernet frames. The following boundaries can be set at a port: "End of discovery of accessible devices" No forwarding of DCP frames to identify accessible devices. Devices downstream from this port cannot be reached by the project tree under "Accessible devices". Devices downstream from this port cannot be reached by the CPU. "End of topology discovery" LLDP frames (Link Layer Discovery Protocol) are not forwarded for topology detection. "End of sync domain" No forwarding of sync frames transmitted to synchronize nodes within a sync domain. If you operate, for example, a PROFINET device with more than two ports in a ring, you should prevent the sync frame from being fed into the ring by setting a sync boundary (at the ports not inside the ring). Additional example: If you want to use several sync domains, configure a sync domain boundary for the port connected to a PROFINET device from the other sync domain.
468
Restrictions
The following restrictions must be observed: The individual check boxes can only be used if the port supports the function in question. If a partner port has been determined for the port, the following check boxes cannot be used: "End of discovery of accessible devices" "End of topology discovery" If autonegotiation is disabled, none of the check boxes can be used.
Enabling device replacement without exchangeable medium Replacing an IO device without exchangeable medium
Replacement of IO devices is frequently required in automation systems. The IO devices are generally assigned a device name by either inserting an exchangeable medium or via the programming device. The CPU identifies the IO device by using these device names. Replacing an IO device can be done without inserting an exchangeable medium (e.g. memory card) or without the programming device, under certain circumstances. For this purpose the Ethernet mechanism analyzes the relationship between the individual IO devices and the IO controller. From these relationships which are stored in the IO controller, the IO controller recognizes which IO device was replaced and assigns a device name to the new device.
Requirements
A port interconnection is already configured. The affected IO devices in the automation system must support device replacement without exchangeable medium. If the individual IO devices in the automation system do not support device replacement without exchangeable medium, a corresponding message is output for the IO device. Note Use only new IO devices as replacements or restore configured IO devices to their delivery state.
Procedure
In order to enable the replacement of an IO device without exchangeable medium, proceed as follows: 1. In the device, select the device or network view of the PROFINET interface in the corresponding IO controller. 2. In the interface properties under "Advanced settings > Interface options", select the "Allow device replacement without exchangeable medium"
469
See also
Components with the the device replacement without exchangeable medium function (http:// support.automation.siemens.com/WW/view/en/36752540)
Using GSDML files GSD files for IO devices Basic information on GSD files of IO devices
The properties of PROFINET IO devices are not stored in a keyword-based text file (as for PROFIBUS DP slaves), but in an XML file whose structure and rules are determined by a GSDML scheme. The language used to describe the GSD files is GSDML (Generic Station Description Markup Language). It is determined by the GSDML scheme. The following sections therefore refer to GSDML files. A GSDML scheme contains validation rules that allow it, for example, to check the syntax of a GSDML file. GSDML schemes (as scheme files) are acquired by IO device manufacturers from PROFIBUS International. Functional enhancements in the area of PROFINET IO will have an effect on the GSDML specification and the corresponding scheme. A new version of the specification and of the scheme is created by the functional enhancement.
470
Requirements
The hardware and network editor is closed. You have access to the required GSDML files in a directory on the hard disk.
Procedure
To install a GSDML file, follow these steps: 1. In the "Options" menu, select the "Install device master data files" command. 2. In the "Install device master data files" dialog box, choose the folder in which you want to save the GSDML files. 3. Choose one or more files from the list of displayed GSD- and GSDML files. 4. Click on the "Install" button. 5. To create a log file for the installation, click on the "Save log file" button. Any problems during the installation can be tracked down using the log file. You will find the new IO devices installed by means of the GSDML files in a new folder in the hardware catalog. Note You cannot undo the installation of an GSDML file.
471
Changing the version of a GSDML file Changing the revision of a GSD file
You can change the revision of a GSD file for an IO device: Only for the current IO device All suitable IO devices within the IO system All suitable IO devices within the complete project First, all existing GSD files for the current IO device are shown. The only difference between the GSD files shown is their revision status. The currently used GSD file is highlighted.
Requirements
The I/O data is the same for all IO devices whose revision is to be changed. The order number has not changed. The number of submodules is identical. The configuration data has not changed. There must be no module or submodule in a slot that is invalid after the new GSD file has been created.
Procedure
To change the revision of one or more IO devices, proceed as follows: 1. Select the IO device whose GSD file revision is to be changed. 2. Click on the "Change revision" button under "General> Catalog information" in the properties of the IO device. The "Change revision" dialog box opens. 3. Select the GSD revision you want to use in the "Available revisions" table. 4. Under "Use selected revision for", select the devices whose version are to be changed: Only for the current IO device For all suitable IO devices in the IO system For all suitable IO devices in the project 5. Click the "Apply" button.
472
8.1.4.4
Figure 8-1
Additional information
For additional information on "PN/PN couplers", refer to Service & Support on the Internet (http://support.automation.siemens.com/WW/view/en/44319532).
473
8.1.4.5
Requirements
The call interface of the tool complies with the TCI specification. Parameters and commands are forwarded to the distributed device via this call interface.
474
See also
Example of a device tool (Page 475)
Requirements
You have configured the corresponding DP slave or the corresponding IO device.
Starting S7-PCT
For a ET 200S with 4SI IO-Link, for example, follow these steps: 1. Select the module in the device view. 2. Select "Edit > Start device tool" from the shortcut menu. The tool starts and you can configure the ports. Alternatively, you can also start from the device view (see next section). For a ET 200eco PN with 4IOL+8DI+4DO, follow these steps: 1. Select the module in the device view. 2. Arrange the areas in the work area in such a way that the device overview is visible (is located between device view and Inspector window). 3. Select the row with the IO link in the device overview. 4. Select "Edit > Start device tool" from the shortcut menu.
475
See also
Integrating S7-external tools (Page 474)
8.1.4.6
Loading a configuration
See also
Uploading project data from a device (Page 198) General information on loading (Page 195) Downloading a configuration to a device (Page 476) Downloading project data to a device (Page 196) Downloading a configuration to the PG/PC (Page 477) Special features during startup (Page 507)
476
WARNING Load only in STOP mode After loading, you may experience unexpected behaviors on the machine or in the process if the parameter settings are incorrect. The CPU must be set to STOP mode for the download operation to rule out possible damage to equipment or personal injury.
See also
General information on loading (Page 195) Downloading project data to a device (Page 196) Loading project data to an accessible device (Page 197)
Requirements
The original hardware configuration must be created in TIA-Portal V11. The opened project is in offline mode.
Scope of download
The following list presents an exact overview of the parts of the configuration that are transferred: Device parameters All set parameters of the module are transferred. PROFIBUS master systems and all PROFIBUS-relevant settings A DP master system and all connected slaves are inserted into the project. The respective settings remain unchanged. If a suitable PROFIBUS subnet has already been created, the downloaded modules are connected to the PROFIBUS interface at the existing subnet.
477
See also
Uploading project data from a device (Page 198) General information on loading (Page 195)
8.1.5
8.1.5.1
Introduction
When a system error occurs, hardware components and devices of other manufacturers (slaves whose properties are set by the GSD files) can trigger organization block calls. Example: If a wire breaks, a module with diagnostics capability can call OB 82.
478
8.1.5.2
Recommended procedure
Make the settings for reporting system errors and the structure of the alarms. Specify which diagnostics blocks will be created. Configure the OBs, Status DBs, as well as the PLC in STOP. Generate the blocks and download the configuration to apply the changes. You will find detailed information in the sections below. Note If you use system diagnostics, the system response of the plant may change if an error occurs. For example, the CPU may not change to "STOP" mode as it would without system diagnostics. Make sure that all protective mechanisms of the plant are working properly.
479
8.1.5.3
Components supported
The following components are supported: S7-300 CPUs S7-400 CPUs S7-400 power supply modules PN/PN Coupler DP/DP Coupler IE/PB-Link AS-i CP ET 200S ET 200M ET 200eco ET 200R ET 200Pro ET 200L Diagnostics repeater GSD-based slaves GSDML-based slaves ET 200iSP IO-Link Software CPUs
8.1.5.4
480
See also
Properties of the blocks (Page 481)
8.1.5.5
Diagnostics blocks
The created diagnostics blocks (FB with assigned instance DB and one or more global DBs and an FC) evaluate the local data of the error OB and read any additional diagnostics information from the hardware component that triggered the error. They have the following properties: Created in RSE language (report system errors) (also applies to the blocks listed above) Know-how protected (also applies to the blocks listed above) Delay incoming interrupts during runtime
Status DBs
The status DBs act as the interface for the diagnostics blocks and allow diagnostics events to be displayed graphically on an HMI device or a Web server.
See also
Settings for system diagnostics blocks (Page 493)
8.1.5.6
481
482
See also
Settings for OB configuration (Page 494)
8.1.5.7
8.1.5.8
Diagnostics status DB
483
Name Directory D_Version D_pGlobalState D_pQuery D_pComponent D_pError D_pState D_pAlarm D_pSubComponent GlobalState G_EventCount G_StartReporting Query Q_ClientID_User
Data type WORD WORD WORD WORD WORD WORD WORD WORD
Description Version supported by system diagnostics Byte offset to the start of the "GlobalState" section Byte offset to the start of the "Query" section Byte offset to the start of the "Component" section Byte offset to the start of the "Error" section Byte offset to the start of the "State" section Byte offset to the start of the "Alarm" section Byte offset to the start of the "Subcomponent" section ID of the last event (counter) Startup evaluation active ID of the client; here, please use a value between 1 and 255. Make sure that different clients use different IDs. ID of the client (internal) With/without status of the lower-level components (slower) AS-i master returns AS-i slave interrupts Reserved Reserved Reserved Reserved Reserved Reserved Start query
Q_ClientID_Intern Q_WithSubComponent Q_SubComponentAlarm Q_Reserved2 Q_Reserved3 Q_Reserved4 Q_Reserved5 Q_Reserved6 Q_Reserved7 Q_Start
DWORD BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL
484
2.1
E_Reserved
+40 0 1 2.0 2.1 2.2 2.3 2.4 2.5 2.6 2.7 3.0 3.1 3.2 3.3 3.4 3.5 3.6 3.7 4 8 12 16
State S_Hierarchy S_Periphery S_SupFault S_NotAvailable S_Faulty S_MoreErrors S_Maintenance1 S_Maintenance2 S_Deactivated S_Reserved2 S_SubFault S_SubMaintenance1 S_SubMaintenance2 S_SubDeactivated S_Reserved4 S_Reserved5 S_Reserved6 S_Reserved7 S_TIAMS S_TIAMSChannelExist S_TIAMSChannelOK S_ChannelCount BYTE BYTE BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL DWORD DWORD DWORD WORD Reserved Reserved The component cannot be reached The component does not exist The component is faulty, the "Alarm" section is not empty There are more errors than system diagnostics can store A maintenance request is pending A maintenance demand is pending The component was deactivated *) Reserved A subcomponent is faulty A maintenance request is pending for a subcomponent A maintenance demand is pending for a subcomponent A subcomponent is deactivated Reserved Reserved Reserved Reserved Maintenance state of the component Maintenance state: Configured channels Maintenance state: Faulty channels Number of channels; valid only when Q_WithSubComponent is set
485
*) If the component was deactivated, the index of the requested/actual error is not changed and "E_LastError" is set to "true". The tag area of the alarm is also not filled in. **) The list of subcomponents is valid only when Q_WithSubComponent is set. The ARRAY has a status byte for each configured component. For a master, the ARRAY contains the status of the configured stations sorted in ascending order according to the station ID. For a station, the ARRAY contains the status of the configured slots sorted in ascending order according to slot number. This field can contain a maximum of 4096 entries (for an IO system): only the actual maximum size is displayed. The status byte for each lower-level component is defined as follows: Bit 0 = SubFault: the component cannot be reached Bit 1 = Fault: the component is not available or faulty Bit 2 = Maintenance1: the component has reported a need for maintenance Bit 3 = Maintenance2: the component has reported a need for maintenance Bit 4 = Deactivated: the component was deactivated Bit 5 = SubFault: a subcomponent is faulty Bit 6 = SubMaintenance1: the component has reported a need for maintenance Bit 7 = SubMaintenance2: a subcomponent has reported a need for maintenance
486
8.1.5.9
PROFINET IO DB
487
OK 00
faulty 01
failed 10
not configured 11
Status Coding
488
8.1.5.10
PROFIBUS DP DB
"Manual" mode
In this mode, all errors of the selected station are displayed one after the other.
"Automatic" mode
In this mode, the errors of all configured stations are displayed one after the other.
489
8 10 11
MODULE_NO CHANNEL_NO CHANNEL_TYPE CHANNEL_ERROR_CODE CHANNEL_ERROR_INFO_1 CHANNEL_ERROR_INFO_2 DIAG_COUNTER DIAG_OVERFLOW BUSY DIAG_DAT_NORM
BYTE BYTE BYTE BYTE DWORD DWORD BYTE BOOL BOOL BYTE [1 to 244] DWORD [1 to 4] DWORD [1 to 4] DWORD [1 to 4] DWORD [1 to 4] DWORD [1 to 4] DWORD [1 to 4] BYTE [1 to 126] DWORD DWORD DWORD WORD WORD
1176 - 1191 CONFIG_SLAVES 1192 - 1207 EXIST_SLAVES 1208 - 1223 FAILED_SLAVES 1224 - 1239 FAULTY_SLAVES 1240 - 1255 AFFECT_SLAVES 1256 - 1271 AFFECT_SLAVES_MEM 1272 - 1397 DIAG_CNT 1404 1408 1412 1416 1418 ERROR_CAT HELP_CAT ERROR_NO MAP_ERRORNO MAP_HELPNO
490
BOOL [1 to 32] True if at least one station of the PROFIBUS master system (1 to 32) has failed BOOL [1 to 32] True if at least one station of the PROFIBUS master system (1 to 32) is faulty
8.1.5.11
Requirement
You are in the "Properties" area of the Inspector window of the required PLC.
Procedure
To display and edit the settings for system diagnostics, follow these steps: 1. Click "System diagnostics" in the area navigation of the Inspector window. In the right-hand part of the Inspector window, you can display and edit the various settings.
8.1.5.12
Basic settings
General settings
Here, you can decide which options will be enabled when the diagnostic block executes.
NOTICE If you disable this option, no diagnostics data is read out in the Web server and diagnostics viewer either even if the option is enabled there. If you disable this option on a PLC on which it was previously enabled, all the diagnostic data is deleted the next time you compile the hardware configuration.
Send alarms
This option is enabled by default. The diagnostics block then sends alarms as a reaction to system errors.
491
Alarming component
Select the component (for example module or rack) for which you want to configure the alarm text.
See also
Adapting event text/info text (Page 492)
See also
Settings for configuring alarms (Page 492) Working with text lists (Page 227) Working with multi-language projects (Page 186)
Attributes
The default alarm attributes "Priority", "Group ID" and "Display class" and the options "Logging" and "With acknowledgement" can be set separately for each individual reporting component. You will find more detailed information on the alarm attributes in the description of "Configuring alarms".
492
You can, however, assign different numbers and/or names for these blocks as long as they are not already being used.
Status DBs
Enable the required status DB to read out the current system status of configured components via this data block. The following status DBs are set as defaults:
Block Diagnostics status DB PROFINET IO DB PROFIBUS DP DB Name RSE_DIAGNOSTIC_STATUS_ DB RSE_PROFINET_IO_DB RSE_PROFIBUS_DP_DB Number 127 126 125
You can, however, assign different names and/or number for these blocks as long as they are not already being used. If the "Enable Web server on this module" functionality is enabled in the properties of the CPU, the diagnostics status DB must be enabled. As default, DB 127 is generated if the CPU supports the Web server and if this is enabled in the properties of the CPU. Note The status DBs "PROFINET IO DB" and "PROFIBUS DP DB" only have limited diagnostics functionality. It is therefore preferable to use the "diagnostics status DB".
493
8.1.5.13
Advanced settings
See also
Supported error OBs (Page 481)
494
Subcomponent error
Note In "Startup" mode, the PLC does not change to STOP regardless of the settings you made.
See also
Assignment of error classes to system errors (Page 495)
495
496
Failure AS-i slave PROFIBUS/central channel error AS-i slave PROFINET module Failure
* The CPU does not change to STOP mode. Note In "startup" mode, the CPU does not change to STOP.
See also
Settings for "PLC in STOP" (Page 494)
8.1.6
8.1.6.1
Displaying alarms
Overview of the alarm display
The "Alarm display" function can be used to output asynchronous alarms of diagnostics events and user-defined diagnostics alarms as well a alarms from ALARM instructions. From the alarm display, you can also start the alarm editor with the "Edit alarm" shortcut menu command and then create user diagnostic alarms.
Icons
The following table shows the icons and their functions:
Icon Function Shows the alarms located in the archive. Archive view Shows the currently active (pending) alarms. Alarms that must be acknowledged are shown in bold characters. Ignores the arrival of alarms, These alarms are neither shown in the window nor stored in the archive. Confirms the selected alarm as read. Alarms requiring acknowledgment are shown in bold characters. Deletes all alarms in the archive. Clear archive
Active alarms
Ignore
Acknowledge
497
Export archive
8.1.6.2
Archive view
In the archive view, alarms are displayed and archived according to the time they appear. You can set the size of the archive (between 200 and 3000 alarms) with the menu command "Options > Settings > Online & Diagnostics". If the selected archive size is exceeded, the oldest alarm it contains is deleted. Alarms that must be acknowledged are displayed in bold characters and can be acknowledged with the context menu command "Acknowledge alarm(s)". The archive is constantly updated and does not need to be saved explicitly.
8.1.6.3
Table structure
All attributes of the alarms can be shown as columns. You can show or hide individual columns as well as modify the width and order of the columns. These settings are saved when the project is closed. The alarms can be displayed in one or more rows. In the single row display, only the first row of the multiple-row alarm data is displayed. The alarms either require acknowledgement or do not require acknowledgment. The alarms requiring acknowledgment that have not yet been acknowledged are highlighted in bold print and can be acknowledged either context-sensitive with the button in the toolbar or with the shortcut menu command "Acknowledge alarm(s)".
8.1.6.4
Receiving alarms
To allow alarms to be displayed, you must first set the receipt of alarms for each CPU.
498
Procedure
Toe receive alarms, follow these steps: 1. Double-click on the "Online & Diagnostics" folder of the relevant CPU in project navigation. 2. Click the "Settings" group in area navigation. 3. Select the option "Receive alarms". Or: 1. Select the "Online & Diagnostics" folder of the relevant CPU in project navigation. 2. Open the "Online" menu and select "Receive alarms". Or: 1. Select the relevant CPU in the device or network view. 2. Select the "Receive alarms" command in the context menu. Or: 1. Select the CPU in project navigation. 2. Select the "Receive alarms" command in the context menu.
8.1.6.5
Export archive
To archive alarms, you can export the archive. Follow these steps: 1. Go to the archive view. 2. Click the "Export archive" button. 3. In the dialog that opens, select the path to export the archive.
Result
The archive is saved as an xml file at the location you selected.
8.1.6.6
Clear archive
The archive is organized as a ring buffer, in other words, when it is full, the oldest alarms are deleted from the archive. With the "Clear archive" button, you can delete the entire archive.
Procedure
To clear the archive, follow these steps: 1. Click the "Clear archive" button in the toolbar of the alarm display.
8.1.6.7
499
8.1.6.8
Table structure
All attributes of the alarms can be shown as columns. You can show or hide individual columns as well as modify the width and order of the columns. These settings are saved when the project is closed. The alarms can be displayed in one or more rows. In the single row display, only the first row of the multiple-row alarm data is displayed. The alarms either require acknowledgement or do not require acknowledgment. The alarms requiring acknowledgment that have not yet been acknowledged are highlighted in bold print and can be acknowledged either context-sensitive with the button in the toolbar or with the shortcut menu command "Acknowledge alarm(s)".
8.1.6.9
8.1.6.10
Acknowledging alarms
Alarms that must be acknowledged are shown in bold characters.
500
Procedure
To acknowledge an alarm, follow these steps: 1. Select the required alarm or alarms from the table. 2. Click the "Acknowledge" button. Note You can select more than one alarm to acknowledge at the same time. To do this, hold down the <Ctrl> key and then select the alarms you want to acknowledge.
Result
The selected alarm was acknowledged and is then shown in normal characters. Note In the "Active alarms" view, acknowledged alarms that have already gone are no longer displayed.
8.1.6.11
Ignoring alarms
Ignoring alarms
To ignore alarms, follow these steps: 1. Click the "Ignore" button. The icon is shown on a gray background.
Result
From this point onwards, all alarms will be ignored. A message is created in the archive view indicating that the display of alarms and events is disabled.
Result
All alarms, in other words, even the alarms currently pending on the CPU while the "Ignore alarms" function was active, are displayed again from this point onwards. A message is created in the archive view indicating that the display of alarms and events is enabled again.
501
8.1.6.12
Alarm display
Function Select all alarms Acknowledge all selected alarms Shortcut keys Ctrl+A Ctrl+Q
8.1.7
8.1.7.1
502
See also
STOP mode (Page 508) RUN mode (Page 508)
The following table shows the conditions under which the operating modes will change:
No. Operating mode transition STOP STOP STARTUP Conditions After you turn on the power supply, the CPU is in "STOP" mode. It then determines the required type of startup and changes to the next operating mode. If the hardware configuration and the program blocks are consistent, the CPU changes to "STARTUP" mode in the following situations: The CPU is set to "RUN" from the programming device. After automatic triggering of a STARTUP operating mode by "POWER-ON". STARTUP STOP The CPU returns to the "STOP" mode in the following situations: An error is detected during startup. The CPU is set to "STOP" from the programming device. A STOP command is executed in the STARTUP OB.
503
Special characteristics
Note the following points regarding the "STARTUP" mode: The startup OBs are executed. All startup OBs you have programmed are executed, regardless of the selected startup mode. No time-based program execution can be performed. Interrupt controlled program execution limited to: OB 82 (diagnostics interrupt) The outputs on the modules are disabled. The process image is not updated; direct I/O access to inputs is possible.
504
See also
Editing properties and parameters (Page 303) Principles of the operating modes of S7-CPUs (Page 502) Organization blocks for startup (Page 547) Warm restart (Page 505)
See also
Retentive memory areas (Page 513)
505
Sequence
The following figure shows the activities of the CPU in "STOP", "STARTUP", and "RUN" modes. You can use the following measures to specify the state of the I/O outputs in the first cycle of the user program: Use assignable output modules to be able to output substitute values or to retain the last value. Set default values for outputs in startup OBs. During the startup, all interrupt events are entered in a queue so that they can be processed later during RUN mode. In RUN mode, hardware interrupts can be processed at any time.
506
Special features during startup Response when expected and actual configurations do not match
The expected configuration is represented by the engineering configuration loaded on the CPU. The actual configuration is the actual configuration of the automation system. If the expected configuration and actual configuration differ, the CPU nevertheless initially changes to RUN.
Canceling a STARTUP
If errors occur during startup, the startup is canceled and the CPU remains in "STOP" mode. Under the following conditions, a startup will not be performed or will be canceled: If an invalid SD card is inserted. If no hardware configuration has been downloaded.
STEP 7 Basic V11.0 SP2 System Manual, 12/2011,
507
See also
Overview of the CPU properties (Page 523)
See also
Principles of the operating modes of S7-CPUs (Page 502) Events and OBs (Page 516)
508
See also
Principles of the operating modes of S7-CPUs (Page 502)
Memory areas Things you should know about memory cards How the memory card functions
The SIMATIC Memory Card for a S7-1200 is an SD memory card preformatted by Siemens for the CPU user program. You may only delete files and folders. If you format the memory card with Windows, for example with a commercially available card reader, you make the memory card unusable as a storage medium for a S7-CPU.
509
510
See also
Replacing a hardware component (Page 303)
See also
Using memory cards (Page 231)
511
Bit memory
See also
Diagnostics buffer (Page 515) Basic principles of process images (Page 513) Access to the I/O addresses (Page 516)
512
See also
Warm restart (Page 505)
513
Special characteristics
You have the option of accessing inputs or outputs directly using direct I/O access. If an instruction accesses an output directly and the output address is located in the process image output, the process image of the relevant output is updated. If an instruction accesses an output directly and the output address is not located in the process image output, the process image of the relevant output is not updated.
Update QW10 in the I/O output area with the value from MW0.
See also
Start address of a module (Page 515) Access to the I/O addresses (Page 516) Startup activities (Page 506)
514
See also
Basic information on the diagnostics buffer (Page 618)
515
This could be necessary, for example, during execution of a time time-sensitive program which also has to control the outputs within the same cycle.
516
1, >= 200 >= 1 100, >= 200 >= 200 >= 200 >= 200
82 80
The following table describes events which do not trigger an OB start, including the corresponding reaction of the operating system. The table is sorted based on event priority.
Event class Insert/remove distributed I/O modules (PROFINET or PROFIBUS) I/O access error during process image update Programming error Event Insert/remove a module Event priority 21 21 System reaction STOP RUN
I/O access error during process image update 22 Programming error in a block for which you use system reactions provided by the operating system (note: the error handling routine in the block program is executed if you activated local error handling). 23
Ignore RUN
I/O access error in a block for which you use 24 system reactions provided by the operating system (note: the error handling routine in the block program is executed if you activated local error handling). 27
RUN
Maximum cycle time exceeded Maximum cycle time exceeded twice twice
STOP
517
OB start information
Certain OBs have start information, while others do not. This is explained in greater detail in the description of the relevant OB.
See also
Event-based program execution (Page 518)
518
Figure 8-2
Program sequence
519
Notes on queues
Every priority class (OBs of the same priority to be called) is assigned a separate queue. The size of those queues is set by default. Any new event leading to the overflow of a queue is discarded and therefore lost. A "time error interrupt event" is generated simultaneously. Information identifying the OB that caused the error is included in the start information of the time error interrupt OB (OB 80). A corresponding reaction such as an alarm trigger can be programmed in the time error interrupt OB.
520
A hardware interrupt-triggering event such as a rising edge at the input calls the OB to which it is assigned. If a new event occurs that triggers a hardware interrupt while the OB is executing, this event is entered in a queue. The new event that triggers a hardware interrupt starts the hardware interrupt OB assigned to the event.
521
Setting the operating behavior Changing properties of the modules Default settings
When they leave the factory, all hardware components with parameters have default settings suitable for standard applications. These default values allow the hardware components to be used immediately without making any additional settings. You can, however, modify the behavior and the properties of the hardware components to suit the requirements and circumstances of your application. Hardware components with settable parameters include, for example, communications modules and several analog and digital modules.
522
Requirement
You have already arranged the hardware components for which you want to change properties on a rack.
Procedure
To change the properties and parameters of the hardware components, follow these steps: 1. In the device or network view, select the hardware component or interface that you want to edit. 2. Edit the settings for the selected object: For example in the device view you can edit addresses and names. In the Inspector window additional setting possibilities are available. You do not need to confirm your entries, the changed values will be applied immediately.
See also
Editing properties and parameters (Page 303) Introduction to loading a configuration (Page 476)
523
524
Protection and password for read/ Setting options for the level of protection (Page 546) write access
525
Communications load Maximum allocation of the cycle for communication (as a percentage) I/O addresses overview -
Tabular representation of all addresses used by the CPU for integrated inputs/outputs as well as for the inserted modules. Addresses that are not used by any module are represented as gaps. The view can be filtered according to: Input addresses Output addresses Address gaps
See also
Specifying input and output addresses (Page 392) Configuring high-speed counters (Page 533) Setting options for the level of protection (Page 546) Cycle time and maximum cycle time (Page 527) Cycle loading by communications (Page 528) Assigning parameters to hardware interrupt OBs (Page 555) Principles of the STARTUP mode (Page 504) Access to the I/O addresses (Page 516) Using clock memory (Page 544) Addressing modules (Page 391) Special features during startup (Page 507)
526
In the current cycle, the cyclic OB used here (e.g. OB 1) will be interrupted by a time error (e.g. OB 80) Following the cyclic OB, the next cycle OB 201 is processed.
527
The formula does not take into account the effect of asynchronous events such as hardware interrupts or cyclic interrupts on the cycle time. If the cycle time is extended due to communication processes, more asynchronous events may occur within the cycle time of the cyclic organization block. This extends the cycle still further. The extension depends on how many events occur and how long it takes to process them.
528
Recommendations
Increase this value only if the CPU is used primarily for communication purposes and the user program is not time critical. In all other situations you should only reduce this value.
Time-of-day format
The clock always shows the time of day with a resolution of 1 millisecond and the date including the day of the week. The time adjustment for daylight-saving time is also taken into account.
529
Setting and reading the time of day Setting and reading the time with instructions
You can set, start and read the time of day and date on the CPU clock with the following instructions in the user program: Set the time of day: "WR_SYS_T" Read the time of day "WR_SYS_T" Read local time "RD_LOC_T" Write local time "WRLT_DTL"
Manual setting
You can also read and set the time of day manually in the online and diagnostics view under "Functions > Set time of day".
530
How it works
The first of several default values is loaded on the high-speed counter. The required outputs are enabled for the time during which the current value of the counter is lower than the default value. The counter is set up so that an interrupt occurs if the current value of the counter is equal to the default value or when the counter is reset. If the current value is equal to the default value and an interrupt event results, a new default value is loaded and the next signal state is set for the outputs. If an interrupt event occurs because the counter is reset, the first default value and the first signal states of the outputs are set and the cycle repeated. Since the interrupts occur much less frequently than the high-speed counter counts, a precise control of the fast operations can be implemented with only a slight influence on the overall cycle of the automation system. Since you can assign specific interrupt programs to interrupts, each new default can be loaded in a separate interrupt program allowing simple control of the state. Note You can also process all interrupt events in a single interrupt program.
See also
Configuring high-speed counters (Page 533) Interdependency of the counter mode and counter inputs (Page 532)
531
Interdependency of the counter mode and counter inputs General information on counter mode and counter inputs
You can assign not only the counter modes and counter inputs to the high-speed counters but also functions such as clock pulse generator, direction control, and reset. The following rules apply: An input cannot be used for two different functions. If an input is not required by the current counter mode of the defined high-speed counter, it can be used other purposes. If, for example, you set HSC1 to counter mode 1, in which inputs I0.0 and I0.3 are required, you can use I0.1 for edge interrupts or for HSC2. If, for example, you set HSC1 and HSC5, inputs I0.0 (HSC1) and I1.0 (HSC5) are always used with the counting and frequency counter modes. As a result, these two inputs are not available for any other functions when counters are operated. You have additional inputs available if you use a digital signal board.
532
HSC1 and HSC2 support the motion axis count mode for the PTO1 and PTO2 pulse generators: For PTO1, HSC1 evaluates the Q0.0 outputs for the number of pulses. For PTO2, HSC2 evaluates the Q0.2 outputs for the number of pulses. Q0.1 is used as the output for the motion direction.
* HSC3 can only be used for CPU 1211 without a reset input ** HSC5 can be also be used for CPU 1211/12 if a DI2/DO2 signal board is used
See also
General information on high-speed counters (Page 530) Configuring high-speed counters (Page 533)
Procedure
To configure a high-speed counter, follow these steps: 1. Select an S7-1200 CPU in the device or network view. 2. Click on the required high-speed counter under "Properties > High-speed counter" in the Inspector window: CPU 1211C: HSC1 to HSC3 (also HSC5 with a DI2/DO2 signal board) CPU 1212C: HSC1 to HSC4 (also HSC5 with a DI2/DO2 signal board) CPU 1214C: HSC1 to HSC6
533
534
Result
You have now adapted the parameters of the high-speed counter to the requirements of your project.
See also
General information on high-speed counters (Page 530) Interdependency of the counter mode and counter inputs (Page 532)
535
See also
Configuring a communications port (Page 536)
Using RS-232 and RS-485 communications modules Communications modules with RS-232 and RS-485 interfaces
In an S7-1200 CPU, you can use two different communications modules: RS-232 communications module RS-485 communications module The communications modules can be connected to the S7-1200 CPU via the I/O channel on the left. You can plug in up to three different modules.
536
Requirement
A communications module is already plugged in. You are in the device view.
Procedure
To configure the communications port, proceed as follows: 1. Select the interface in the graphic representation in the device view. The properties of the interface are displayed in the Inspector window. 2. Select the "Port configuration" group in the area navigation of the Inspector window. The settings of the port are displayed. 3. From the "Transmission speed" drop-down list, select the speed for the data transmission. With user-programmed communication, remember the influence of the transmission speed on the changeover time. 4. From the "Parity" drop-down list, select the type of detection of bad information words. 5. Using the "Data bits" drop-down list, decide whether a character consists of eight or seven bits. 6. From the "Stop bit" drop-down list, select how many bits will identify the end of a transmitted word. 7. From the "Flow control" drop-down list, select the method for ensuring a trouble-free data stream between sender and receiver. This parameter can only be set for the RS-232 interface. Enter a HEX value in the "XON character" box that will cause the transmission of the message to be continued when it is detected. This parameter can only be set for software-controlled data flow control. Enter a HEX value in the "XOFF character" box that will cause the transmission of the message to be suspended for the set wait time. This parameter can only be set for software-controlled data flow control. 8. In the "Wait time" box, enter a wait time in ms that must be kept to after the end of the message before the next transmission can start.
537
Note You can configure the interface in the network view as well. To do so, you must first select the communication module in the tabular network view and then select the interface in the Inspector window. Then you can continue as described above.
See also
Setting data flow control (Page 538)
538
See also
Configuring a communications port (Page 536)
539
See also
User-programmed communication with RS-232 devices (Page 540) Making the settings for sending (Page 542) Specifying the start of the message (Page 542) Specifying the end of the message (Page 543)
User-programmed communication with RS-232 devices RS-232/PIP multi-master cable and user-programmed communication with RS-232 devices
Using the RS-232/PIP multi-master cable and user-programmed communication, you can connect a wide variety of RS-232-compliant devices to the communications modules of the S7-1200. The cable must, however, be set to the "PIP/user-programmed communication" mode.
540
The cable returns to receive mode when the RS-232 send line is idle for a certain time that is defined as the changeover time of the cable. The set transmission speed influences the changeover time as shown in the table.
541
See also
Configuration of message transfer (Page 539) Making the settings for sending (Page 542) Specifying the start of the message (Page 542) Specifying the end of the message (Page 543)
See also
Specifying the start of the message (Page 542) Specifying the end of the message (Page 543) User-programmed communication with RS-232 devices (Page 540)
Specifying the start of the message Recognizing the start of the message
To signal to the receiver when the transfer of a message is completed and when the next message transfer starts, criteria must be specified in the transmission protocol to identify the end and start of a message. If a criterion is met that indicates the start of a message, the receiver starts searching the data stream for criteria that mean the end of the message. There are two different methods for identifying the start of a message:
542
See also
Making the settings for sending (Page 542) User-programmed communication with RS-232 devices (Page 540)
Specifying the end of the message Recognizing the end of the message
To signal to the receiver when the transfer of a message is completed and when the next message transfer starts, criteria must be specified in the transmission protocol to identify the end and start of a message. In total, there are six different methods of recognizing the end of a message and these can all be logically linked in any way. The following table shows the various possible setting options:
Parameter Recognize end of message by message timeout Recognize end of message by reply timeout Definition The end of a message is recognized automatically when a selected maximum duration for a message is exceeded. Values from 0 to 65535 ms can be set. The end of a message is recognized when there is no reply within a set time after transferring data. Values from 0 to 65535 ms can be set.
543
See also
Making the settings for sending (Page 542) User-programmed communication with RS-232 devices (Page 540)
544
Benefits
You can use clock memory, for example, to activate flashing indicator lamps or to initiate periodically recurring operations such as recording of actual values.
Available frequencies
Each bit of the clock bit memory byte is assigned a frequency. The following table shows the assignment:
Bit of the clock memory byte Period (s) Frequency (Hz) 7 2.0 0.5 6 1.6 0.625 5 1.0 1 4 0.8 1.25 3 0.5 2 2 0.4 2.5 1 0.2 5 0 0.1 10
Note Clock memory runs asynchronously to the CPU cycle, i.e. the status of the clock memory can change several times during a long cycle. The selected memory byte cannot be used for intermediate storage of data.
Benefits
You can use system memory in the user program, for example to run program segments in only the first program cycle after start-up. Two system memory bits are constant 1 or constant 0.
545
Note The selected memory byte cannot be used for intermediate storage of data.
546
Start information
A startup OB has the following start information:
Tag LostRetentive LostRTC Data type BOOL BOOL Description = 1, if retentive data storage areas have been lost = 1, if realtime clock has been lost
547
See also
Events and OBs (Page 516)
548
Start information
Cycle OBs have no start information.
See also
Events and OBs (Page 516)
Organization blocks for interrupt-driven program execution Organization blocks for time-delay interrupts Description
A time-delay interrupt OB is started after a configurable time delay of the operating system. The delay time starts after the SRT_DINT instruction is called. You can use up to four time-delay interrupt OBs or cyclic OBs (OB numbers >= 123) in your program. If, for example, you are already using two cyclic interrupt OBs, you can insert a maximum of two further time-delay interrupt OBs in your program. You can use the CAN_DINT instruction to prevent the execution of a time-delay interrupt that has not yet started.
549
Start information
Time delay interrupt OBs have no start information.
See also
Events and OBs (Page 516)
Note The execution time of each cyclic interrupt OB must be noticeably smaller than its time base. If a cyclic interrupt OB has not been completely executed but execution is again pending because the cycle clock has expired, the time error interrupt OB is started. The cyclic interrupt that caused the error is executed later or discarded.
550
Start information
Cyclic interrupt OBs have no start information.
See also
Assigning parameters to cyclic interrupt OBs (Page 556) Events and OBs (Page 516)
551
Start information
Hardware interrupt OBs have no start information.
See also
Assigning parameters to hardware interrupt OBs (Page 555) Events and OBs (Page 516)
552
Start information
The time error interrupt OB has the following start information:
Tag fault_id Data type BYTE Description 0x01: Maximum cycle time exceeded 0x02: Called OB is still being executed 0x07: Queue overflow 0x09: Interrupt loss due to high interrupt load csg_OBnr csg_prio OB_ANY UINT Number of the OB being executed at the time of the error Priority of the OB being executed at the time of the error
See also
Events and OBs (Page 516)
Start information
The diagnostic error interrupt OB has the following start information:
Tag IO_state laddr Channel multi_error Data type WORD HW_ANY UINT BOOL Description Contains the I/O status of the diagnosticscapable module. HW-ID Channel number = 1, if there is more than one error
553
IO_state tag
The following table shows the possible I/O states that the IO_state tag can contain:
IO_state Bit 0 Description Configuration correct: = 1, if the configuration is correct = 0, if the configuration is no longer correct Bit 4 Error: = 1, if an error is present, e.g., a wire break = 0, if the error is no longer present Bit 5 Configuration not correct: = 1, if the configuration is not correct = 0, if the configuration is correct again Bit 6 I/O cannot be accessed: = 1, if an I/O access error has occurred In this case, laddr contains the hardware identifier of the I/O with the access error. = 0, if the I/O can be accessed again
See also
Events and OBs (Page 516)
Overview
You can assign parameters to the properties for the following organization blocks: Hardware interrupt OBs Cyclic interrupt OBs
See also
Assigning parameters to hardware interrupt OBs (Page 555) Assigning parameters to cyclic interrupt OBs (Page 556)
554
Procedure
To assign parameters for the hardware interrupt OB, follow these steps: 1. Double-click the "Devices & Networks" command in the project tree. The hardware and network editor opens in the network view. 2. Change to the device view. 3. If the Inspector window closed in the device view, select the "Inspector window" check box in the "View" menu. The Inspector window opens. 4. Click the "Properties" tab. 5. In the device view, select the module for which you want to a assign a hardware interrupt. 6. Select the corresponding event. 7. Enter an event name. 8. Select an existing hardware interrupt OB from the "Hardware interrupt" drop-down list. Note If you have not previously created any hardware interrupt OB, you can click "Add new block" in the drop-down list. See also: Auto-Hotspot 9. If you want to assign further hardware interrupts, repeat steps 5 to 8.
See also
Basics of block parameters (Page 554) Organization blocks for hardware interrupts (Page 551) Events and OBs (Page 516)
555
Procedure
To enter a scan time and a phase shift for a cyclic interrupt OB, proceed as follows: 1. Open the "Program blocks" folder in the project tree. 2. Right-click on an existing cyclic interrupt OB. 3. Select the "Properties" command in the shortcut menu. The "<Name of the cyclic interrupt OB>" dialog box opens. 4. Click the "Cyclic interrupt" group in the area navigation. The text boxes for the scan time and the phase shift are displayed. 5. Enter the scan time and the phase shift. 6. Confirm your entries with "OK".
See also
Basics of block parameters (Page 554) Organization blocks for cyclic interrupts (Page 550)
556
557
Functions (FCs)
Numerical name FC 2 (1) FC 4
(1) (1)
Symbolic name CONCAT DELETE FIND INSERT LEFT LEN LIMIT MAX MID MIN REPLACE RIGHT ENCO SEL DECO LED IM_DATA DeviceStates ModuleStates USS_PORT USS_RPM USS_WPM
FC 11 FC 20 FC 22 FC 25 FC 27
FC 17 (1)
(1)
FC 21 (1)
(1) (1)
FC 26 (1)
(1)
FC 31 (1) FC 32 (1) FC 36 (1) FC 36 FC 37 FC 800 FC 801 FC 802 FC 803 FC 1070 FC 1072 FC 1073
(1) (1)
MC7+ instruction
558
Symbolic name CTU CTD CTUD TP TON TOF START_OB RDREC WRREC RALRM T_CONFIG TDIAG TRESET PORT_CFG SEND_CFG RCV_CFG SEND_PTP RCV_PTP SGN_GET SGN_SET RCV_RST CTRL_HSC CTRL_PWM DataLogCreate DataLogOpen DateLogWrite DataLogClear DataLogClose DataLogDelete DataLogNewFile
SFB 27 SFB 52 SFB 53 SFB 54 SFB 105 SFB 106 SFB 107 SFB 110 SFB 111 SFB 112 SFB 113 SFB 114 SFB 115 SFB 116 SFB 117 SFB 120 SFB 122 SFB 140 SFB 141 SFB 142 SFB 143 SFB 144 SFB 145 SFB 146
559
560
8.1.7.2
Distributed I/O
Distributed I/O systems SIMATIC ET 200 - The right solution for all applications
SIMATIC ET 200 provides the most varied range of distributed I/O systems. Solutions for use in the control cabinet Solutions without control cabinet directly at the machine Additionally, there are also components that can be used in explosive areas. SIMATIC ET 200 systems for construction without a control cabinet are contained in robust, glass-fibre reinforced plastic casing and are therefore shock-resistant, resistant to dirt and watertight. Their modular design allows the ET 200 systems to be easily scaled and expanded in small steps. Fully-integrated auxiliary modules lower costs and also provide a wide range of possible applications. There are several combination possibilities available: Digital and analog I/OS Intelligent modules with CPU functions, Safety technology, Pneumatics, Frequency converters Various technology modules. Communication via PROFIBUS and PROFINET, uniform engineering, clear diagnostic possibilities as well as optimal connection to SIMATIC controller and HMI devices vouch for the unique consistency provided by Totally Integrated Automation. The following table provides an overview of I/O devices for use in the control cabinet:
I/O device ET 200S Properties Highly modular design with multiple conductor connections Multifunctional due to a wide range of modules Use in explosive areas (Zone 2) ET 200S COMPACT Highly modular design with multiple conductor connections Multifunctional due to a wide range of modules Use in explosive areas (Zone 2) Integrated DE/DA
561
The following table provides an overview of I/O devices for use without a control cabinet:
I/O device ET 200pro Properties Modular design with compact housing Easy assembly Multifunctional due to a wide range of modules High level of availability due to plugging and unplugging in operation and permanent wiring Comprehensive diagnostics ET 200eco PN Cost-efficient, space-saving block I/OS Digital modules up to 16 channels (also configurable) Analog modules, IO-link master and load voltage distributor PROFINET connection with 2-port switch in each module Can be flexibly distributed via PROFINET in line or star shape directly within the plant ET 200eco Cost-effective digital block I/OS Flexible connection possibilities Failsafe modules High level of plant availability ET 200R Specially for use on robots Assembled directly on the chassis Resistant to weld spatter due to robust metal housing
562
See also
Documentation on ET 200L (http://support.automation.siemens.com/WW/view/de/1142908/0/ en) Documentation on ET 200S (http://support.automation.siemens.com/WW/view/en/1144348) Documentation on ET 200M (http://support.automation.siemens.com/WW/view/de/1142798/0/ en) Documentation on ET 200pro (http://support.automation.siemens.com/WW/view/de/ 21210852/0/en) Documentation on ET 200iSP (http://support.automation.siemens.com/WW/view/de/ 28930789/0/en) Documentation on ET 200R (http://support.automation.siemens.com/WW/view/de/ 11966255/0/en) Documentation on ET 200eco PN (http://support.automation.siemens.com/WW/view/de/ 29999018/0/en) Documentation on ET 200eco (http://support.automation.siemens.com/WW/view/de/ 12403834/0/en)
Area of application
The ET 200iSP distributed I/O station can be operated in potentially explosive atmospheres characterized by gas and dust:
Approval ATEX IECEx ET 200iSP Station* Zone 1, Zone 21 Zone 2, Zone 22 Inputs and outputs up to Zone 0, Zone 20 ** up to Zone 0, Zone 20 **
* In combination with an appropriate enclosure ** for electronic module 2 DO Relay UC60V/2A: up to Zone 1, Zone 21
The ET 200iSP distributed I/O station can, of course, also be used in the safety area. You can insert almost any combination of ET 200iSP I/O modules directly next to the interface module that transfers the data to the DP master. This means you can adapt the configuration to suit your on-site requirements.
563
DP master
All ET 200iSP modules support communication with DP masters that are compliant with IEC 61784-1:2002 Ed1 CP 3/1 and operate with "DP" transmission protocol (DP stands for distributed peripherals or distributed I/O).
See also
Documentation on ET 200iSP (http://support.automation.siemens.com/WW/view/de/ 28930789/0/en)
Requirements
The HART field device must support the assigned number of IEEE tags.
564
See also
Documentation on ET 200iSP (http://support.automation.siemens.com/WW/view/de/ 28930789/0/en)
565
Assigning parameters to reference junctions for thermocouples Compensation of the reference junction temperature
There are various ways of obtaining the reference junction temperature in order to get an absolute temperature value from the temperature difference between the reference junction and the measuring point.
Table 8-1 Compensation of the reference junction temperature Explanation You record not only the temperature of the measurement point. The temperature of the reference junction (transition from Cu line to thermocouple line) also affects the thermoelectromotive force. The measured value then includes an error. You can record the reference junction temperature using a resistance thermometer (Pt100 Climatic Range). If parameterized accordingly, this temperature value is distributed to the 4 AI TC modules in the ET 200iSP where it is offset against the temperature value obtained at the measuring location. Number of reference junctions: 2 Reference junction parameters None
Option No compensation
Use of a Pt100 Climatic Range resistance thermometer to record the reference junction temperature (best method)
The parameter assignment of the IM 152 and the 4 AI TC must be coordinated: 4 AI RTD assigned parameters for Pt100 climatic range in correct slot; 4 AI TC: Reference junction : "yes"; select reference junction number "1" or "2" IM 152-1:Assignment of the reference junction to a slot with 4 AI RTD; channel selection;
Internal compensation 4 AI TC
The TC sensor module (temperature sensor) is mounted onto the terminals of terminal module EM 4 AI TC. The temperature sensor reports the temperature of the terminals to the 4 AI TC. This value is then calculated together with the measured value from the channel of the electronic module.
566
IM 152
4 AI TC 4 AI TC
See also
Documentation on ET 200iSP (http://support.automation.siemens.com/WW/view/de/ 28930789/0/en)
Principle of operation
A modified input signal is assigned a time stamp and stored in a buffer (data record). If time stamped signals exists or a data record is full, a hardware interrupt is generated to the DP master. The buffer is evaluated with "Read data record". Special messages are generated for events that influence the time stamping (communication with the DP master interrupted, frame failure of time master, ...).
567
Parameter Assignment
With the parameter assignment you define which IM 152 user data will be monitored. For the time stamping these are digital inputs that are monitoring for signal changes.
Parameter Time stamping Setting disabled enabled Edge evaluation incoming event rising edge falling edge Description Activate the time staming for the channels of the electronics module 8 DI NAMUR. Determine the type of signal change that will be time-stamped.
See also
Principle of operation (Page 568) Configuring counters (Page 571) Assigning parameters to counters (Page 574)
568
569
See also
Count properties (Page 568)
570
571
572
Assignment of the process image input (PII) Assignment is identical to configuration 0..1: "Counter", channel 2..7: "DI". Assignment of the process image output (PIQ) Assignment is identical to configuration 0..1: "Counter", channel 2..7: "DI".
See also
Count properties (Page 568)
573
See also
Count properties (Page 568)
See also
Principle of operation (Page 575) Configuring frequency meters (Page 575) Assigning parameters for the frequency meters (Page 577)
574
See also
Frequency measurement properties (Page 574)
575
Assignment of the process image output (PIQ): The PIQ is not assigned.
See also
Frequency measurement properties (Page 574)
576
Assigning parameters for the frequency meters Parameters for frequency meter
Only those parameters that are relevant for the frequency meters are explained below. These are part of the parameters of electronic module 8 DI NAMUR.
Table 8-6 Parameter Sensor type frequency inputs Parameters for the frequency meters Setting Channel disabled NAMUR sensor Single contact, no load resistance Measuring window (GATE) 50 ms 200 ms 1s Select the required measuring window for channel 0 or 1. To achieve the highest possible accuracy when metering frequencies, remember the following rules: High frequencies (> 4 kHz): Set a low measuring window (50 ms) Variable/medium frequencies: set medium measuring window (200 ms) Low frequencies (< 1 kHz): Set a high measuring window (1 s) Description Select the sensor for the relevant frequency meter for channel 0 or 1.
See also
Frequency measurement properties (Page 574)
577
Field of application
The fields of application of the ET 200eco PN are derived from its special properties. A robust design and degree of protection IP 65/66 or IP 67 make the ET 200eco PN distributed I/O device suitable in particular for use in rugged industrial environments. The compact design of the ET 200eco PN is particularly favorable for applications in confined areas. The easy handling of ET 200eco PN facilitates efficient commissioning and maintenance.
Properties
The ET 200eco PN has the following properties: Integrated switch with 2 ports Supported Ethernet services: ping arp Network diagnostics (SNMP) LLDP Interrupts Diagnostics interrupts Maintenance interrupts Port diagnostics Isochronous real-time communication Prioritized startup Device replacement without programming device Media redundancy Connection to intelligent sensors/actuators via IO link master interface module.
IO Controller
The ET 200eco PN can communicate with all IO Controllers that conform to IEC 61158. ET 200eco PN can be configured on a CPU with advanced diagnostics.
See also
Documentation on ET 200eco PN (http://support.automation.siemens.com/WW/view/en/ 29999018)
578
Temperature unit
Specify the unit of the temperature measurement here.
Measuring range
With this parameter, you set the measuring range of the selected measurement type.
579
Smoothing
Smoothing of the analog values produces a stable analog signal for further processing. The smoothing of analog values is useful when handling wanted signals (measured values) with a slow rate of change, for example, temperature measurements. The measured values are smoothed by digital filtering. To achieve smoothing, the device generates a mean value from a specified number of converted (digitized) analog values. You assign a maximum of four levels for the smoothing (none, weak, medium, strong). The level determines the number of module cycles, from which the mean value is generated. The stronger the smoothing, the more stable the smoothed analog value and the longer it takes until the smoothed analog value is applied following a signal change (see the example below). The figure below shows the number of cycles a module requires to apply the smoothed analog value at almost 100% after a step response, based on the smoothing function settings. The figure applies to all signal changes at the analog input. The smoothing value defines the number of cycles a module requires to reach 63% of the end value of the changed signal.
Diagnostics, wire break
When this parameter is enabled, the Wire break diagnostics event is generated when a wire break is detected. Observe the rules outlined below to handle a wire break in the 1 to 5 V and 4 to 20 mA measuring ranges:
580
Explanation Diagnostics, wire break Measured value after leaving the underrange Diagnostic message Lower limit value undershot
Wire break
8000H
Measuring range limits for wire break detection and measuring range undershoot detection:
Diagnostics, underflow
If you enable this parameter, the Underflow diagnostics event is generated when the measured value reaches the underflow range.
Diagnostics, overflow
If you enable this parameter, the Overflow diagnostics event is generated when the measured value reaches the overflow range.
581
Type of output
With this parameter, you set the output type, for example, voltage. For any unused channels, select the disabled setting. For a disabled channel, the conversion time and integration time of the channel = 0 s, and the cycle time is optimized.
Output range
With this parameter, you set the output range of the selected output type.
Diagnostics, overload
If you enable this parameter, the diagnostics event is generated in the event of an overload.
582
Substitute values
With this parameter, you enter a substitute value that the module is to output in CPU-STOP mode. The substitute value must be in the nominal range, overrange, or underrange.
See also
Changeover contact (Page 583) Technological parameters (Page 584)
Changeover contact
A changeover contact is an auxiliary switch with only one moving switch element with one close setting each for closed and open switching device. Remember the following rule: Always connect a normally open contact to the "even" channel Always connect a normally closed contact to the "odd" channel. The tolerated switchover time between the two channels is fixed at 300 ms. If the result of the check is negative, then the module identifies the value status of the normally open channel as "invalid" the module generates a diagnostic entry for the normally open channel triggers a diagnostic interrupt (if diagnostic interrupts have been enabled)
583
See also
Documentation on modules for process automation (http://support.automation.siemens.com/ WW/view/de/7215812/0/en)
See also
Documentation on modules for process automation (http://support.automation.siemens.com/ WW/view/de/7215812/0/en)
584
Message frame
The message frame number and the operating mode of the module are only displayed and cannot be modified.
Application ID
You indicate the saved parameters in the frequency converter as a whole with the application ID. Enter an application ID from the value range 0 to 65535. During startup (or pull/plug), this ID is compared with the application ID stored on the converter. Converters that work with identical applications are usually also identically parameterized and should be identified with the same application ID. Converters with the same application ID may be exchanged between each other. Copying of the complete parameterization of a converter to another converter, for example, via an MMC, is only accepted, if both have the same application ID. Converters that work with different applications and are parameterized differently must be identified by different application IDs. This prevents a converter with unsuitable parameterization from starting on an incorrect slot, i.e. on the wrong application. This also prevents the parameterization that is saved in the converter from being accidently overwritten with any parameteriation that is stored on an MMC.
See also
Documentation for the frequency converter (http://support.automation.siemens.com/WW/view/ en/26291825/0/en)
585
See also
Sensor type (Page 586) Switching hysteresis (Page 587) Time function,time value (Page 588)
Sensor type
This parameter is used to set the sensor type per channel: Reflex sensor or Diffuse sensor or De-activated
586
Diffuse sensor
Table 8-7 Transmitter Receiver Diffuse sensor Object Circuit state 0: no object detected, i.e. the object is not in the beam. The receiver does not see any light. Circuit state 1: object detected, i.e. the object is in the beam. The receiver does not see any light.
Diffuse sensor
Transmitter Receiver
Reflex sensor
Table 8-8 Transmitter Receiver Reflex sensor Object Circuit state 0: no object detected, i.e. the object is not in the beam. The receiver sees light. Circuit state 1: object detected, i.e. the object is in the beam. The receiver does not see any light.
Reflex sensor
Transmitter Receiver
Switching hysteresis
Faults with the diffuse sensor or in the production process can result in signal wobbles. The measured value then changes the switching threshold by 100 % (object detected - object not detected). You can prevent this switching threshold wobble using the switching hysteresis parameter. This will ensure a stable output signal on the sensor. You can assigned parameters to 5 %/10 %/20 %/50 % for switching hysteresis.
Prerequisites
You can only set the switching hysteresis parameter for diffuse sensors with background fadeout.
587
Operating principle
Figure 8-3
588
Operating principle
Figure 8-4
589
8.2
8.2.1
8.2.1.1
590
See also
Basics on task cards (Page 156) Inspector window (Page 154)
Determination of which of the devices that are connected online are defective Overview of the defective devices
In the "Diagnostics > Device Info" area of the Inspector window you will obtain an overview of the defective devices that are or were connected online. The "Diagnostics> Device Info" area of the Inspector window consists of the following elements: Header line with the number of defective devices Table with detailed information on each defective device If you originate the establishment of an online connection to a device which is not reachable or reports one or more faults or is not in RUN mode, it will rank as defective.
591
See also
Determination of online status and display using symbols (Page 592)
Determination of online status and display using symbols Determining diagnostics status online and displaying using icons
When the online connection to a device is established, the diagnostics status of the device and, if applicable, its subordinate components will be determined. The operating mode of the device is also determined, where applicable. The following is a description of the symbols that are displayed in a specific view. Device view The associated diagnostics icon is displayed for every hardware component (except the signal board on the CPU). For hardware components with subordinate components, an "Error in subordinate component" diagnostics icon will also be displayed in the hardware component diagnostics icon if an error is present in at least one subordinate component. For hardware components with their own operating mode, the operating mode icon will also be displayed to the left of or above the diagnostics icon. Device overview The associated diagnostics icon is displayed for every hardware component. For hardware components with subordinate components, an "Error in subordinate component" diagnostics icon will also be displayed in the bottom right corner of the hardware component diagnostics icon if an error is present in at least one subordinate component. Network view The associated diagnostics icon is displayed for every device. If an error is present in at least one subordinate component, then the "Error in subordinate component" diagnostics icon will also be displayed in the bottom right corner of the diagnostics icon.
592
593
Note Some modules, for example the FM 450-1, are only indicated as having a problem in the case of an error if you have enabled the diagnostics interrupt when setting the module properties.
594
Note If both a comparison icon and the "Error in subordinate component" diagnostics icon are to be displayed at the bottom right in the device view, the following rule applies: The diagnostics icon for the subordinate hardware component has a higher priority than the comparison icon. This means that a comparison icon is only displayed if the subordinate hardware components have no faults.
Note If forcing is active on a CPU, a red F will be displayed on a pink background at the bottom right of the operating mode icon.
595
Start online and diagnostics view Overview of possible ways of starting the Online and Diagnostics view
You can start the Online and Diagnostics view of a module to be diagnosed at the following locations: Overview Project tree Device view Device overview Network view Network overview Topology view In the following, examples are used to show how to proceed.
Requirement
The project with the module to be diagnosed is open. Note This requirement does not apply if you call the online and diagnostics view from the project tree after you have identified the accessible devices.
Procedure
To start the online and diagnostics view of a module, follow these steps: 1. In the project tree, open the respective device folder. 2. Double click on "Online & Diagnostics". Or:
596
Result
The online and diagnostics view of the module to be diagnosed will be started. If an online connection to the associated CPU had previously been created, the header bar of the Online and Diagnostics view will now have an orange background. Note If no online connection exists when the online and diagnostics view is started, no online information is displayed and the display fields remain empty.
597
See also
View in online mode (Page 2893)
Activation of the "Online Tools" task card Activation of the "Online Tools" task card
You can activate this task card as follows: 1. Start the online and diagnostics view. 2. Click on the "Online Tools" task card. Or: 1. Start the device view. 2. Click on the "Online Tools" task card. Or: 1. Start the network view. 2. Click on the "Online Tools" task card.
8.2.1.2
Showing general properties and system-relevant information for a module Where do I find the information I need?
The general properties and system-relevant information for a module can be found in the "General" group in the "Diagnostics" folder in the online and diagnostics view of the module to be diagnosed.
"Module" area
This area shows the following data of the module: Short designation, for example, CPU 1214C DC/DC/DC Order no.
598
599
Structure of the "Cycle time" group in the "Diagnostics" folder of the Online and Diagnostics view
The "Cycle time" group consists of the following areas: Cycle time diagram (graphical display of the assigned and measured cycle times) Cycle time configured (display of the assigned cycle times as absolute values) Cycle times measured (display of the measured cycle times as absolute values)
Structure of the "Cycle time" pane of the "Online Tools" task card
The "Cycle time" pane displays the cycle time diagram and below it the measured cycle times as absolute values.
Show interfaces and interface properties of a module Where do I find the information I need?
The interfaces and interface properties of a module can be found in the "Diagnostics" folder in the Online and Diagnostics view of the module to be diagnosed in the following group: PROFINET interface
600
IP setting time: Time stamp of the last change to the IP address directly through the Ethernet connection of the module
"Ports" area
This area shows the following data for the module:
601
Status
If you select a line in the port table, additional help information will be provided for the corresponding port.
8.2.1.3
Structure of the "Cycle time" group in the "Diagnostics" folder of the Online and Diagnostics view
The "Cycle time" group consists of the following areas: Cycle time diagram (graphical display of the assigned and measured cycle times) Cycle time configured (display of the assigned cycle times as absolute values) Cycle times measured (display of the measured cycle times as absolute values)
Structure of the "Cycle time" pane of the "Online Tools" task card
The "Cycle time" pane displays the cycle time diagram and below it the measured cycle times as absolute values.
602
Showing the current status of the LEDs of a CPU Where do I find the information I need?
The current status of the LEDs of a CPU can be found in the display area of the "CPU control panel" pane of the "Online tools" task card.
603
Display area of the "CPU control panel" pane of the "Online Tools" task card
This area contains the following displays: Station name and CPU type (short designation) RUN / STOP (corresponds to the "RUN / STOP" LED of the CPU) ERROR (corresponds to the "ERROR" LED on the CPU) MAINT (corresponds to the "MAINT" LED on the CPU)
Showing fill levels of all types of memory on a CPU Where do I find the information I need?
The fill levels of all types of memory on a CPU can be found on the following two pages: In the display area of the "Memory" group in the "Diagnostics" folder in the online and diagnostics view of the module to be diagnosed. In the "Memory" pane display area of the "Online Tools" task card
Display area of the "Memory" group in the "Diagnostics" folder of the online and diagnostics view
This area contains the current memory utilization of the respective module and details of the individual memory areas. The memory utilization is shown both as a bar diagram and as a numerical value (percentage). The following memory utilizations are shown: Load memory If no memory card is inserted, the internal load memory is displayed. If a memory card is inserted, the operating system only uses the inserted load memory as the load memory. This is displayed here. Work memory Retentive memory
Display area of the "Memory" pane of the "Online Tools" task card
This area contains the current memory utilization of the module. The available memory is shown both as a bar diagram and as a numerical value (percentage). The numerical value is rounded to an integer value. Note If a memory area is utilized to less than 1%, the available portion of this memory area is shown as "99%". The following memory utilizations are shown:
604
See also
Load memory (Page 511) Work memory (Page 511) Retentive memory areas (Page 513)
8.2.1.4
Determining the diagnostic status of a module Where is the diagnostics status of a module displayed?
The diagnostic status of a module is displayed in the "Diagnostic status" group in the "Diagnostics" folder in the online and diagnostics view of the module to be diagnosed. The "Diagnostics status" group consists of the following areas: Status Standard diagnostics (for S7-300 and S7-400 only for non-CPU modules)
"Status" area
The following status information is displayed in this area: Status of the module as viewed by the CPU, for example: Module available and OK. Module defective. If the module experiences a fault and you have enabled the diagnostic error interrupt during configuration, the "Module defective" status is displayed. Module configured, but not available. Detected differences between the configured and the inserted module. Provided it can be ascertained, the order number will be displayed for the set and actual type. The scope of the displayed information depends on the selected module.
605
Reading out the diagnostics buffer of a CPU Where do you read out the diagnostics buffer of a CPU?
You read out the diagnostics buffer of a CPU in the "Diagnostics buffer" group in the "Diagnostics" folder in the Online and Diagnostics view.
Diagnostics buffer
The diagnostics buffer is used as a log file for the diagnostics events that occurred on the CPU and the modules assigned to it. These are entered in the order of their occurrence, with the latest event shown at the top.
"Events" area
The "Events" area consists of the following elements: Check box "CPU time stamp takes into account local PG/PC time" Event table "Freeze display" or "Cancel freeze" button
606
Check box "CPU time stamp takes into account local PG/PC time"
If you have not activated the check box, the diagnostics buffer entries are shown with the module time. If you have activated the check box, the diagnostics buffer entries are shown with the time given by the following formula: Displayed time = module time + time zone offset on your programming device / PC This requires the module time to be identical to UTC. You should use this setting if you wish to see the times of the diagnostics buffer entries for the module expressed in the local time of your programming device / PC. Selecting or clearing the check box immediately changes the times displayed for the diagnostics buffer entries. Note If you use the "WR_SYS_T" instruction in your program or if you set the real-time clock of the CPU using an HMI device instead of using UTC, we recommend that you clear the "CPU time stamp takes into account local PG/PC time" check box. In this case, the module time is the sole time of concern.
Event table
The following information is displayed in the table for each diagnostics event: Sequential number of the entry The first entry contains the latest event. Date and time of the diagnostics event If no date and time are shown, the module has no integral clock. Short name of the event and, if applicable, the reaction of the CPU Note If an individual parameter of a text cannot be determined, the character string "###" is shown in its place. If no display text is yet available for new modules or new events, the numbers of the events and the individual parameters are stated as hexadecimal values. Icon for information related to incoming/outgoing status The following table shows the available icons and their respective meaning.
607
For S7-1200 CPUs only: Icon for the severity of the event The following table shows the available icons and their respective meaning.
Icon Meaning No maintenance and/or no fault Maintenance required Maintenance demanded Error
You can change the order of the columns, adjust the column widths, and remove and add individual columns in the event table. Sorting is possible, but only by the sequential numbers.
608
609
"Settings" area
The "Settings" area consists of the following elements: "Display events" list "Apply settings as default" button "Output event information in hexadecimal format" check box
See also
Basic information on the diagnostics buffer (Page 618)
8.2.1.5
610
Procedure
To change the mode of the CPU, follow these steps: 1. Enable the "Online tools" task card of the CPU. 2. Click the "RUN" button in the "CPU control panel" pane if you want to change the CPU to RUN mode or the "STOP" button if you want to change the CPU to STOP mode. Note The only button active is the one that can be selected in the current operating mode of the CPU. 3. Acknowledge the confirmation prompt with "OK". Or: 1. Open the "Online" menu. 2. Choose the "Start CPU" menu command if you want to set the CPU to RUN mode and "Stop CPU" if you want to set the CPU to STOP mode. Note The only button that is active is the one that can be chosen in the current operating mode of the CPU. 3. Acknowledge the confirmation prompt with "OK". Or: 1. Click the "Start CPU" button in the toolbar if you want to set the CPU to RUN mode and the "Stop CPU" button if you want to set the CPU to STOP mode. Note The only button that is active is the one that can be chosen in the current operating mode of the CPU. 2. Acknowledge the confirmation prompt with "OK".
Result
The CPU will be switched to the required operating mode.
611
Procedure
To perform a memory reset on a CPU, follow these steps: 1. Enable the "Online Tools" task card of the CPU. 2. Click the "MRES" button in the "CPU control panel" pane. 3. Acknowledge the confirmation prompt with "OK".
Result
The CPU is switched to STOP mode, if necessary, and the memory reset is performed on the CPU.
See also
Basics of a memory reset (Page 509)
Determining and setting the time of day on a CPU Where do I find the functions I need?
You determine and change the time of day on a CPU in the "Set time of day" group in the "Functions" folder of the Online and Diagnostics view. This requires an online connection.
612
Structure of the area for reading out and setting the time of day
This area consists of the following parts: Programming device / PC time Here the time zone setting, the current date and the current time setting of your programming device / PC are displayed. Module time Here the date and time values currently read from the module (for example the CPU), are converted to local time and date and displayed. If the "Take from PG/PC" check box is selected, when you click the "Apply" button, the date and the PG/PC time converted to UTC are transferred to the module. If the "Take from PG/PC" check box is not selected, you can assign the date and time for the integrated clock of the module. After clicking the "Apply" button, the date and the time recalculated to UTC time are transferred to the module.
Requirement
The Ethernet LAN connection must already be established. The Ethernet interface of your programming device or PC must be accessible. The IO device that is to be assigned an IP address must be in the same IP band as the programming device or PC.
613
Result
The IP address will be assigned to the IO device.
614
Procedure
To reset a CPU to the factory settings, follow these steps: 1. Open the Online and Diagnostics view of the CPU. 2. Select the "Reset to factory settings" group from the "Functions" folder. Note The MAC address is not displayed for S7-1200 CPUs. 3. Select the "Retain IP address" check box if you want to retain the IP address or the "Delete IP address" if you want to delete the IP address. Note The two check boxes mentioned are only available if the module to be reset is able to choose whether to retain or delete the IP address. 4. Click the "Reset" button. 5. Acknowledge the confirmation prompt with "OK".
Result
The module is switched to STOP mode, if necessary, and the factory settings are then reset. This means: The work memory and the internal load memory and all operand areas are deleted. All parameters are reset to their defaults. The diagnostics buffer is cleared. The time of day is reset. The IP address is retained or deleted depending on the setting you make.
615
Assigning a PROFINET device name Basic information on assigning a name to a PROFINET IO device Device name
Before an IO device can be addressed by an IO controller, it must have a device name. This procedure was chosen for PROFINET because names are easier to handle than complex IP addresses. Assigning a device name to a PROFINET IO device is comparable to setting the PROFIBUS address for a DP slave. An IO device has no device name in its delivery state. For an IO controller to address an IO device, it must first be assigned a device name using the programming device or PC. It is now ready to transfer the configuration information including the IP address during startup or exchange user data in cyclic operation.
616
See also
Calling the name assignment function from the project tree or via the "Online" menu (Page 617) Calling the name assignment function from within the project context (Page 617)
Calling the name assignment function from the project tree or via the "Online" menu Requirement
You have opened the Online and Diagnostics view of the PROFINET IO device from the project tree or with the "Online" menu.
Procedure
1. Open the "Functions" folder and the "Assign name" group inside this folder. The "Type" field displays the module type of the PROFINET IO device. 2. Enter the required device name in the "PROFINET device name" input box. 3. Optional: Click the "Flash LED" button on the left of the graphic to run an LED flash test for the PROFINET IO device. In this way you verify that you are naming the desired IO device. Note The LED flash test is not supported by all PROFINET IO devices. 4. Click "Assign name".
Result
The entered name is assigned to the PROFINET IO device.
Calling the name assignment function from within the project context Requirement
An online connection to the PROFINET IO device is not required. You have opened the Online and Diagnostics view of the PROFINET IO device from within the project context. The PROFINET IO device can be accessed using at least one PG/PC.
617
Procedure
1. Open the "Functions" folder and the "Assign name" group inside this folder. The "PROFINET device name" drop-down list displays the current name in the offline project, and the "Type" box shows the module type of the PROFINET IO device. 2. Choose a different name from the drop-down list, if necessary. Note In steps 3 to 5, you determine the IO devices that are present in the PROFINET subnet. 3. In the "PG/PC interface for assignment" drop-down list, select the PG/PC interface you want to use to establish the online connection. 4. Optional: Use the three check boxes to make a selection from all IO devices available online. 5. Click the icon for determining the IO devices present in the PROFINET subnet. The table is then updated. 6. Select the desired IO device in the table. 7. Optional: Click the "Flash LED" button to run an LED flash test for the PROFINET IO device. In this way you verify that you are naming the desired IO device. Note The LED flash test is not supported by all PROFINET IO devices. 8. Click "Assign name".
Result
The selected name is assigned to the PROFINET IO device.
8.2.1.6
618
See also
Resetting a CPU to the factory settings (Page 615) Determining the cause of a STOP of a CPU (Page 620) Determining and setting the time of day on a CPU (Page 612) Parameterizing the clock (Page 530)
619
Procedure
To find out the reason why a CPU changed to STOP, follow these steps: 1. Open the online and diagnostics view of the CPU. 2. Select the "Diagnostics buffer" group from the "Diagnostics" folder. 3. Evaluate the events occurring prior to the transition to STOP mode. Use this to obtain a picture of the possible causes or to zero in on or specify in more detail the possible causes (depending on the error type). Read the detailed information about the events carefully and use the "Help on event" button to obtain additional information and possible causes of individual entries.
Result
You were able to zero in on or determine in more detail the cause of the CPU STOP. Note If the analysis does not enable you to overcome the problem, contact Customer Support. In this case, use the "Save as" button to back up the content of the diagnostics data to a text file and submit it to Customer Support.
See also
Reading out the diagnostics buffer of a CPU (Page 606)
620
8.2.1.7
Procedure
1. Open the Online and Diagnostics view for the device whose online connection status you want to display. 2. Select the "Online access" group. Note The "Online access" group exists only for CPUs. However, if you have opened the Online and Diagnostics view using the "Show/update accessible devices" function, it will not be displayed.
Result
The status of the online connection is displayed in the "Status" area both graphically and in text form.
Procedure
1. Open the Online and Diagnostics view of the device to which you want to establish an online connection. 2. Choose the "Online access" group and the "Online access" area within this group. Note The "Online access" group exists only for CPUs. However, if you have opened the Online and Diagnostics view using the "Show/update accessible devices" function, it will not be displayed.
621
Result
The online connection to the desired device will be established.
See also
Establishing and canceling an online connection (Page 2898)
622
Procedure
1. Open the Online and Diagnostics view of the device for which you want to disconnect the online connection. 2. Choose the "Online access" group and the "Online access" area within this group. Note The "Online access" group exists only for CPUs. However, if you have opened the Online and Diagnostics view using the "Show/update accessible devices" function, it will not be displayed. 3. Click the "Go offline" button.
Result
The online connection to the desired device will be disconnected.
See also
Establishing and canceling an online connection (Page 2898)
Performing the flash test for a device with an online connection Requirement
There is currently an online connection to the relevant device.
Procedure
1. Open the Online and Diagnostics view of the device for which you want to perform a flash test. 2. Choose the "Online access" group and the "Status" area within this group. Note The "Online access" group exists only for CPUs. However, if you have opened the Online and Diagnostics view using the "Show/update accessible devices" function, it will not be displayed. 3. Click the "LED Flash test" button.
623
Result
On an S7-1200 CPU, the RUN/STOP, ERROR and MAINT LEDs flash. On an S7-300 or S7-400 CPU, the FRCE LED flashes. Note The flash test cannot be performed when the FORCE function is active.
8.2.1.8
624
See also
Displaying the status of the segment diagnostics using icons (Page 625) Displaying the status of the segment diagnostics using graphics and text (Page 625)
Displaying the status of the segment diagnostics using icons Where do I find the information I need?
The icons for the status of the segment diagnostics are available: In the expanded "Segment diagnostics" folder in the navigation pane of the Online and Diagnostics view of the relevant diagnostic repeater. The diagnostics icon associated with the segment will be displayed behind the segment designation. It must be noted here that line errors will be displayed for the DP2 and DP3 segments only. The DP1 and programming device segments do not display errors in the form of a diagnostics icon; rather, they signal only a few bus errors.
Diagnostics icons
The following table shows the available icons and their meaning.
Icon Meaning Segment is error-free Segment contains errors Segment is deactivated
Displaying the status of the segment diagnostics using graphics and text Where is the status of the segment diagnostics displayed with graphics and text?
The status of the segment diagnostics will be displayed using graphics and text in the "DP1", "DP2", "DP3", and "PG" groups of the "Segment diagnostics" folder in the Online and Diagnostics view of the relevant diagnostic repeater.
625
In this example, the diagnostic repeater has the PROFIBUS address 2, and a line error has occurred between the devices with PROFIBUS addresses 16 and 17. This line error is located 25 m from device 16, 4 m from device 17, and 72 m from the diagnostic repeater.
"Error" field
The error is explained in plain text in this field.
"Resolution" field
Here, you will find actions for resolving the error.
626
8.2.2
8.2.2.1 Basics
Connection diagnostics
Overview of connection diagnostics
Connection diagnostics, as described below, refers to the diagnostics of communication connections. The connection diagnostics is started each time an online connection is established to a module (CPU or CP) that participates in one or more communication services. The connection status is updated automatically in the background. In the case of one-way connections, an online connection must exist to the communication partner that has established the communication connection. On connections configured at both ends, a distinction between the following two situations must be made: If there is an online connection to only one connection endpoint, only the part of the connection belonging to this connection endpoint can be diagnosed. If there is an online connection to both connection endpoints, both parts of the connection (and therefore the entire connection) can be diagnosed.
627
8.2.2.2
628
8.2.2.3
How do I open the "Diagnostics > Connection information" area of the Inspector window?
The following options are available for opening the "Connection information" tab of the Inspector window. Select the line of the relevant connection in the connection table. Click the "Diagnostics" and "Connection information" tabs one after the other in the Inspector window. Double-click the diagnostics icon of the relevant connection in the connection table. This step takes you to the programming editor for a S7 communication instruction or open user communication instruction. Double-click the diagnostics icon of the instruction (3 squares back-to-back at an angle in green, yellow, red).
Structure or the "Diagnostics > Connection information" area of the Inspector window
Requirements: the content of the "Connection information" tab has been filled, and an online connection to at least one end point of the relevant connection has been established. If a module has been selected (network view), the tab will contain the following group: Connection resources (for S7-1200 only) If a connection has been selected (connection table), it will contain the following groups: Connection details Address details of the connection (for S7-1200 only)
629
630
Determining the address details of a connection Where do I determine the address details of a connection?
The address details of a connection are obtained in the "Address details for connection" group. This group is located in the "Diagnostics > Connection information" area of the Inspector window.
For which CPUs is the "Address details for connection" group available?
The "Address details for connection" group of the "Connection information" tab is available for S7-1200 CPUs only.
631
See also
User program (Page 633)
633
See also
Operating system (Page 633)
9.1.1.2
Structured programming
Complex automation tasks can be more easily handled and managed by dividing them into smaller sub-tasks that correspond to the technological functions of the process or that can be reused. These sub-tasks are represented in the user program by blocks. Each block is then an independent section of the user program.
634
Instance data blocks (Page 639) Global data blocks (Page 638)
635
See also
Creating organization blocks (Page 777)
Application
A function contains a program that is executed when the function is called by another logic block. Functions can be used, for example, for the following purposes: To return function values to the calling block, e.g. for mathematical functions To execute technological functions, e.g. individual controls using bit logic operations A function can also be called several times at different points in a program. As a result, they simplify programming of frequently recurring functions.
636
See also
Creating functions and function blocks (Page 778)
Application
Function blocks contain subroutines that are always executed when a function block is called by another logic block. A function block can also be called several times at different points in a program. As a result, they simplify programming of frequently recurring functions.
Access modes
S7-1200 offers to different access options for the instance data blocks, which can be assigned to a function block when this is called: Data blocks with optimized access Data blocks with optimized access have no fixed defined structure. The declaration elements contain only one symbolic name in the declaration, no fixed addressing within the block. Data blocks with standard access (compatible with S7-300/400) Data blocks with standard access have a fixed structure. The declaration elements contain both a symbolic name in the declaration and a fixed address within the block. Note To avoid errors when working with function blocks, refer to the section "Auto-Hotspot".
637
See also
Creating functions and function blocks (Page 778) Multi-instances (Page 644) Instance data blocks (Page 639) Basics of block access (Page 640)
638
Access modes
S7-1200 offer two different access options for global data blocks: Data blocks with optimized access Data blocks with optimized access have no fixed defined structure. The declaration elements contain only one symbolic name in the declaration, no fixed addressing within the block. Data blocks with standard access Data blocks with standard access have a fixed structure. The declaration elements contain both a symbolic name in the declaration and a fixed address within the block.
See also
Creating data blocks (Page 779) Basics of block access (Page 640)
Access modes
S7-1200 offers to different access options for the instance data blocks, which can be assigned to a function block when this is called: Data blocks with optimized access Data blocks with optimized access have no fixed defined structure. The declaration elements contain only one symbolic name in the declaration, no fixed addressing within the block. Data blocks with standard access Data blocks with standard access have a fixed structure. The declaration elements contain both a symbolic name in the declaration and a fixed address within the block. See also: Auto-Hotspot
See also
Creating data blocks (Page 779) Basics of block access (Page 640)
639
640
9.1.1.3
Block calls
Parameter transfer
When a block is called, you must assign values to the parameters in the block interface. By providing input parameters you specify the data with which the block is executed. By providing the output parameters you specify where the execution results are saved.
See also
Call hierarchy (Page 642) Principles for single instances and multi-instances (Page 642)
641
See also
Principles for single instances and multi-instances (Page 642) Principles of block calls (Page 641)
Call function blocks as single or multi-instances Principles for single instances and multi-instances Use of single instances and multi-instances
Function blocks (FBs) store their data in instance data blocks. Instance data blocks store the values of the block parameters and the static local data of the function blocks. You can assign instance data blocks as follows:
642
See also
Principles of block calls (Page 641) Multi-instances (Page 644) Single instances (Page 643) Call hierarchy (Page 642)
643
See also
Principles for single instances and multi-instances (Page 642) Multi-instances (Page 644)
Multi-instances Definition
Multi-instances enable a called function block to store its data in the instance data block of the calling function block. This allows you to concentrate the instance data in one instance data block and thus make better use of the number of instance data blocks available.
One instance data block for the instances of different function blocks
The following figure shows how multiple different function blocks store their data in a calling block. The FB_Workpiece calls the following on after the other: FB_Grid, FB_Punch and
644
The function block FB_Motors calls three instances of the FB_Motor. The instances are "Motor_1", "Motor_2" and "Motor_3". Each call uses different instance data. However, all instance data are located in a single instance data block, DB_MotorData.
645
See also
Principles for single instances and multi-instances (Page 642) Single instances (Page 643)
See also
Parameter assignment to function blocks (Page 648) Parameter assignment to functions (Page 647) General rules for assigning parameters (Page 647)
646
General rules for assigning parameters Rules for supplying block parameters with values
When you call a block with block parameters, assign actual parameters to its formal parameters. The following rules apply: Either a variable or a constant can be specified as an actual parameter. The actual parameter must be of the same data type as the formal parameter. You can transfer structures as parameters. If a block has an input parameter of the STRUCT type, you must transfer as actual parameter a STRUCT with identical structure. You can also transfer individual elements of an STRUCT as actual parameter if the element corresponds to the data type of the formal parameter. You can transfer ARRAYs as parameters. If a block has an input parameter of ARRAY type, you must transfer as actual parameter an ARRAY with identical structure. You can also transfer individual elements of an ARRAY as actual parameter if the element corresponds to the data type of the formal parameter. You can transfer variables that have a PLC data type as parameters. If the parameter is declared as the PLC data type in the variable declaration, you must transfer a data type that has the same data element structure. However, an element of a PLC data type can be assigned to a parameter when a block is called, provided that the element of the PLC data type matches the data type of the parameter.
See also
Parameter assignment to function blocks (Page 648) Parameter assignment to functions (Page 647) Block parameters (Page 646)
Function Value
Functions normally calculate a function value. This function value can be returned to the calling block via the RET_VAL output parameter. For this, the RET_VAL output parameter must be declared in the interface of the function. RET_VAL is always the first output parameter of a function. All data types are permitted for the RET_VAL parameter except ARRAY and STRUCT, as well as parameter types TIMER and COUNTER. In the SCL programming language functions can be call directly in an expression. The result of the expression is then formed with the calculated function value. Therefore, the data type ANY is also not permitted in SCL for the function value.
647
See also
Parameter assignment to function blocks (Page 648) Block parameters (Page 646) General rules for assigning parameters (Page 647) Calling functions (Page 930) Examples for calling functions in SCL (Page 933)
648
See also
Block parameters (Page 646) General rules for assigning parameters (Page 647) Parameter assignment to functions (Page 647)
See also
Calling a function by another function (Page 650) Calling a function by a function block (Page 651) Calling a function block by a function (Page 652) Calling a function block by another function block (Page 653)
649
Calling a function by another function Permissible data types for the call of a function by another function
You can forward the formal parameters of the calling function to the formal parameters of the called function. The following figure shows the formal parameters of the function FC_10, which are forwarded to the formal parameters of the function FC_12:
Specific rules apply to the forwarding of formal parameters. The following table shows the rules that apply when one function calls another function:
Calling FC Called FC Input -> Input Output -> Output In-out -> Input In-out -> In-out In-out -> Output Elementary data types S7-300/400 S7-1200 S7-300/400 S7-1200 S7-300/400 S7-1200 S7-300/400 S7-1200 S7-300/400 S7-1200 S7-1200 S7-1200 S7-1200 S7-1200 Structured data types S7-1200 Parameter types -
See also
Basic information on forwarding block parameters (Page 649)
650
Calling a function by a function block Permissible data types for the call of a function by a function block
You can forward the formal parameters of the calling function block to the formal parameters of the called function. The following figure shows the formal parameters of the function block FB_10, which are forwarded to the formal parameters of the function FC_12:
Specific rules apply to the forwarding of formal parameters. The following table shows the rules that apply when a function block calls a function:
Calling FB Called FC Input -> Input Output -> Output In-out -> Input In-out -> Output In-out -> In-out Elementary data types S7-300/400 S7-1200 S7-300/400 S7-1200 S7-300/400 S7-1200 S7-300/400 S7-1200 S7-300/400 S7-1200 S7-1200 S7-1200 Structured data types S7-300/400 S7-1200 S7-300/400 S7-1200 S7-1200 Parameter types -
See also
Basic information on forwarding block parameters (Page 649)
651
Calling a function block by a function Permissible data types for the call of a function block by a function
You can assign the formal parameters of the calling function to the formal parameters of the called function block. The following figure shows the formal parameters of the function FC_10, which are forwarded to the formal parameters of the function block FB_12:
Specific rules apply to the forwarding of formal parameters. The following table shows the rules that apply when a function calls a function block:
Calling FC Called FB Input -> Input Output -> Output In-out -> Out In-out -> Input In-out -> In-out Elementary data types S7-300/400 S7-1200 S7-300/400 S7-1200 S7-300/400 S7-1200 S7-300/400 S7-1200 S7-300/400 S7-1200 S7-1200 S7-1200 S7-1200 S7-1200 Structured data types S7-1200 Parameter types S7-300/400
See also
Basic information on forwarding block parameters (Page 649)
652
Calling a function block by another function block Permissible data types for the call of a function block by another function block
You can forward the formal parameters of the calling function block to the formal parameters of the called function block. The following figure shows the formal parameters of the function block FB_10, which are forwarded to the formal parameters of the function block FB_12:
Specific rules apply to the forwarding of formal parameters. The following table shows the rules that apply when one function block calls another function block:
Calling FB Called FB Input -> Input Output -> Output In-out -> Input In-out -> Out In-out -> In-out Elementary data types S7-300/400 S7-1200 S7-300/400 S7-1200 S7-300/400 S7-1200 S7-300/400 S7-1200 S7-300/400 S7-1200 S7-1200 S7-1200 Structured data types S7-300/400 S7-1200 S7-300/400 S7-1200 S7-1200 Parameter types S7-300/400
See also
Basic information on forwarding block parameters (Page 649)
653
9.1.1.4
Operands in instructions
See also
Displaying symbolic and absolute addresses (Page 827) Basics of block access (Page 640)
654
Declaring Variables
You can define variables with different scopes for your program: PLC tags that apply in all areas of the CPU DB variables in global data block that can be used by all blocks throughout the CPU. DB tags in instance data blocks that are predominantly used within the block in which they are declared. The following table shows the difference between the variable types:
PLC tags Range of application Are valid throughout the entire CPU. Can be used by all blocks on the CPU. The name is unique within the CPU. Permissible characters Letters, numbers, special characters Variables in instance DBs Are predominantly used in the block in which they are defined. The name is unique within the instance DB. Letters, numbers, special characters Variables in global DBs Can be used by all blocks on the CPU. The name is unique within the global DB. Letters, numbers, special characters Reserved keywords are not permitted. Static data
Quotation marks are not permitted. Reserved keywords are not permitted. Reserved keywords are not permitted. I/O signals (I, IB, IW, ID, Q, QB, QW, QD) Bit memory (M, MB, MW, MD)
Use
Block parameters (input, output and in-out parameters), Static data of a block Temporary local data of a block
Location of definition
Block interface
See also
Reserved key words (Page 656) Basic information about operands (Page 654) Displaying symbolic and absolute addresses (Page 827) Valid names of PLC tags (Page 762) Permissible addresses and data types of PLC tags (Page 763)
655
Constants Definition
A constant defines an unchangeable data value. Constants can be read by various program elements during the execution of the program but cannot be overwritten. A change of the constant value during the program's execution can lead to syntax or runtime errors.
Elements of Constants
A constant consists of the following elements: Name (in the case of symbolic constants) Valid characters in the constant name are letters, number and special characters; invalid characters are quotation marks and reserved keywords. Data type Constant value The input format and the value range of the constant depend on the data type of the constant.
More information
For more information on data types of constants and their input formats and value ranges, refer to the "Data types" section under "See also".
See also
Rules for symbolic constants (Page 768) Enter constants (Page 676) Declaring constants (Page 769)
656
AUTHOR
AUTHOR
AW AX B BEGIN
QW QX B BEGIN
657
DIW DIX DO
DIW DIX DO
DT DWORD E EB ED ELSE ELSIF EN ENO END_CASE END_DATA_BLOCK END_FOR END_FUNCTION END_FUNCTION_BLOCK END_IF END_ORGANIZATION_BLOCK END_REPEAT
DT DWORD I IB ID ELSE ELSIF EN ENO END_CASE END_DATA_BLOCK END_FOR END_FUNCTION END_FUNCTION_BLOCK END_IF END_ORGANIZATION_BLOCK END_REPEAT
658
FAMILY
FAMILY
KNOW_HOW_PROTECT
KNOW_HOW_PROTECT
659
READ_ONLY
READ_ONLY
REAL REPEAT RET_VAL RETURN S5T S5TIME S7_ SDB SFB SFC STRING STRUCT
REAL REPEAT RET_VAL RETURN S5T S5TIME S7_ SDB SFB SFC STRING STRUCT
660
TYPE UDT UNLINKED UNTIL UO VAR VAR_IN_OUT VAR_INPUT VAR_OUTPUT VAR_TEMP VERSION VOID WHILE WORD XOR Z $_<any character>
TYPE UDT UNLINKED UNTIL AO VAR VAR_IN_OUT VAR_INPUT VAR_OUTPUT VAR_TEMP VERSION VOID WHILE WORD XOR C $_
661
Examples
The following examples show applications of symbolic and absolute addressing:
Addressing Q1.0 I16.4 IW4 "Motor" "Value" Explanation Absolute address: Output 1.0 Absolute address: Input 16.4 Absolute address: Input word 4 Symbolic address "Motor" Symbolic address "Value"
See also: Permissible addresses and data types of PLC tags (Page 763)
See also
Displaying symbolic and absolute addresses (Page 827) Accessing I/O devices (Page 662)
662
Syntax
<Operand>:P
Example
The following example shows applications of I/O access identifiers:
Addressing "Motor" "Motor":P "Switch" "Switch":P Description //Addresses the variable "Motor" in the process input image. //Addresses the variable "Motor" peripheral inputs (PI). in the memory area of the
//Addresses the variable "Switch" in the process output image. //Addresses the variable "Switch" in the memory area of the peripheral outputs (PQ).
See also
Addressing global variables (Page 661)
Addressing variables in data blocks Addressing variables in global data blocks Description
Variables in global data blocks can be addressed in symbolic or absolute form. For symbolic addressing, you use the name of the data block and the name of the variable, separated by a dot. The name of the data block is enclosed in quotation marks. For absolute addressing, you use the number of the data block and the absolute address of the variables in the data block, separated by a dot. Note Variables in blocks with optimized access can only be addressed in symbolic form.
663
Syntax
"<DBname>".VariableName <DBnummer>.absoluteAddress The following table show the possible absolute addresses of variables in data blocks:
Data type BOOL BYTE, CHAR, SINT, USINT WORD, INT, UINT DWORD, DINT, UDINT, REAL, TIME Absolute address DBn.DBXx.y DBn.DBBy DBn. DBWy DBn.DBDy Example DB1.DBX1.0 DB1.DBB1 DB1.DBW1 DB1.DBD1 Description Data bit 1.0 in DB1 Data bit 1 in DB1 Data word 1 in DB1 Data double word 1 in DB1
Example
The following examples show the addressing of variables in global data blocks:
Description Symbolic addressing of the "Value" variable in the "Motor" global data block. Absolute addressing of the "DBX1.0" tags in the "DB1" global data block.
See also
Addressing structured variables (Page 665) Addressing individual bits of a variable (Page 666) Basics of indirect addressing (Page 669) Addressing instance data (Page 664)
664
Syntax
Use the following syntax for addressing variables in instance data blocks: #<VariableName> #<Multi-instanceName.VariableName>
Examples
The following examples show the addressing of variables in instance data blocks:
Addressing #Value #On #Multi.On Description Addressing the "Value" variable in the instance data block. Addressing the "On" variable within the multi-instance block Addressing the "On" variable of the multi-instance block from the calling block
See also
Addressing variables in global data blocks (Page 663) Addressing structured variables (Page 665) Addressing individual bits of a variable (Page 666) Basics of indirect addressing (Page 669)
665
Example:
The following examples show the addressing of structured data type variables:
Addressing Motor.Value_1x3[2] Motor.Value_2x4[2,4] Motor.Value_4x7[2,4,1,3] Batch_1.Temperature Values.Temperature Description Addressing of a one-dimensional array Addressing of a two-dimensional array Addressing of a four-dimensional array Addressing of the element "Temperature" in the structure "Batch_1" Addressing of the element "Temperature" in the PLC data type "Values"
See also
Basics of indirect addressing (Page 669)
Syntax
The following syntax is used for addressing: <Tag>.X<Bit number> <Tag>.B<Byte number> <Tag>.W<Word number> The syntax has the following components:
666
Examples
The following examples show the addressing of individual bits:
Addressing "Engine".Motor.X0 "Engine".Motor.X7 Description "Motor" is a tag of the BYTE data type in the global data block "Engine". X0 addresses the first bit, X7 the eighth bit within "Motor". "Engine".Speed.B0 "Engine".Speed.B1 "Speed" is a tag of the WORD data type in the global data block "Engine". B0 addresses the first bit, B1 the second byte within "Speed". "Engine".Fuel.W0 "Engine".Fuel.W1 "FUEL" is a tag of the DWORD data type in the global data block "Engine". W0 addresses the first word, W1 the second word within "Fuel".
Rules
The following general rules are valid for tag overlaying: LAD and FBD support overlaying in S7 -1200. SCL supports overlaying in all CPU families.
667
* Structured data types consist of several data elements, e.g. ARRAY or STRUCT.
Declaration
To overlay a tag, declare an additional tag directly after the tag that is to be overlaid and identify it with the keyword "AT".
668
Example
The following figure shows the declaration of an overlaid tag in the interface of a FB:
When a block is called with the shown tag declaration, the "MyByte" tag is assigned. Within the block there are now two options for interpreting the data: as a byte As one-dimensional ARRAY of BOOL
See also
Declaring higher-level tags (Page 954)
669
See also
Indirect addressing in SCL (Page 672) Indirect addressing in STL (Page 675) Indirect addressing via pointer (Page 670) Indirect indexing of ARRAY components (Page 671)
Example
The following example shows an indirect addressing with an area-internal pointer:
Addressing in STL L P#10.0 T MD20 L MW [MD20] .... L MD [MD20] .... Description // Load pointer (P#10.0) in accumulator 1 // Transfer pointer to the operand MD20 // Load MW10 in accumulator 1 // Any program // Load MD10 in accumulator 1 // Any program
670
The pointer P#10.0 is transferred to the operand MD20. If the operand MD20 in square brackets is programmed, this will be replaced in runtime by the address that is contained in the pointer.
See also
Basics of indirect addressing (Page 669)
Syntax
The following syntax is used for the indirect indexing of a ARRAY: "<Data block>".<ARRAY>["i"] // one-dimensional ARRAY "<Data block>".<ARRAY>["i"] // one-dimensional ARRAY of STRUCT "<Data block>".<ARRAY>["i"] // multidimensional ARRAY "<Data block>".<ARRAY>["i"] // multidimensional ARRAY of STRUCT The syntax has the following components:
Part Data block ARRAY i, j a Description Name of the data block in which the ARRAY is located Tag of the ARRAY data type PLC tags of the integer data type that are used as pointers Additional partial tag of the structure
Examples
The following examples show the indirect indexing of an ARRAY component using SCL as an example. MOTOR is a one-dimensional ARRAY_of_INT with three rows. VALUES is a PLC tag of the "Integer" data type.
Addressing in SCL MOTOR[2] := VALUES; Description (* direct addressing: Assignment of VALUES to the second row of the ARRAY MOTOR*)
671
The following example shows the indirect indexing of an ARRAY component as an example of LAD. ARRAY is a three-dimensional ARRAY. "Tag_1", "Tag_2" and "Tag_3" are PLC tags of the "Integer" data type. Depending on their values, one of the ARRAY components will be copied to the "MyTarget" tag.
More information
For more information on the ARRAY data type, refer to "See also".
See also
Basics of indirect addressing (Page 669) Addressing structured variables (Page 665)
672
Syntax
The following syntax is used for the indirect indexing of data operands in SCL: Addressing of a global tag: Operand ID (Byte tag) Operand ID (Byte tag.Bit tag) Addressing of a DB tag: MyDB(Byte tag) MyDB(Byte tag.Bit tag) Addressing a data block WORD_TO_BLOCK_DB(Index).Operand ID (Address)
Examples
The following examples show indirect addressing using SCL in S7-300/400:
Addressing in SCL (*Depending on the value of the runtime tag i, an input word will be set to 0.*) #i:=2 FOR #i := 2 TO 8 DO EW(#i) := 0 END_FOR; ;
Addressing in SCL (*Depending on the value of the runtime tag i, a word in MyDB will be set to 0.*) #i:=2 FOR #i := 2 TO 8 DO MyDB.DW(#i) := 0 END_FOR; ;
673
Addressing in SCL (*indirect addressing using the WORD_TO_BLOCK_DB conversion function: Global tag "Address index" of WORD data type is used as the number of the DB. The data element within the DB is also specified via an index*) M0.0:=WORD_TO_BLOCK_DB("Adressindex").DX(#i.#y); MW0:=WORD_TO_BLOCK_DB("Adressindex").DW(#y);
See also
Basics of indirect addressing (Page 669) Indirect addressing in STL (Page 675) Addressing structured variables (Page 665)
See also
Indirect addressing in STL (Page 675)
674
Memory-indirect addressing
In the case of memory-indirect addressing, you store the address in a PLC variable. Double words from the operand ranges Data (DBD and DID), bit memory (MD) and local data (LD) are available for storing the address. The following example shows applications of memory-indirect addressing:
Addressing in STL U E [MD 2] = DIX [DBD 2] Description // Execute an AND logic operation with the input bit. The address is located in the memory double word MD2. // Assign the signal state of the RLO bit to the instance data bit. The address is located in the data double word DBD. // Load the input byte in ACCU 1. The address is located in the instance double word DID4. // Open the data block. The number of the data block is located in the local data word LW2.
675
// Load pointer (P#M10.0) in address register 1 // Add content of address register 1 (P#M10.0) to pointer P#2.0 // Load content of memory word "MW12" into accumulator 1 // Load pointer (P#A10.0) in address register 1 // Add content of address register 1 (P#A10.0) to pointer P#2.0 // Load content of output word QW12.0 into accumulator 1
See also
Basics of indirect addressing (Page 669) Indirect addressing in SCL (Page 672) Addressing structured variables (Page 665) Basic information about address registers (Page 674)
Syntax
Enter a value: <Value> Input of a symbolic constant name from the PLC tag table: "<Name>"
Example
The following examples show the use of constants:
Addressing 4 FALSE "Name" "Offset" Description Value entry for a constant of Integer type Value entry for a constant of Bool type Symbolic constants from the PLC variable table Symbolic constants from the PLC variable table
676
More information
For more information on data types of constants and their input formats and value ranges, refer to the "Data types" section under "See also".
See also
Constants (Page 656) Declaring constants (Page 769)
9.1.1.5
Data types
Binary numbers BOOL (Page 680) Bit strings BYTE (Page 681) WORD (Page 681) DWORD (Page 682) Table 9-2 Integers SINT (Page 683) INT (Page 684) DINT (Page 686) USINT (Page 684) UINT (Page 685) UDINT (Page 687) Integers
S7-300/400 X X -
S7-1200 X X X X X X
677
Floating-point numbers REAL (Page 687) LREAL (Page 688) Table 9-4 Timers TIME (Page 689) S5TIME (Page 690) Table 9-5 Date and time Timers
S7-300/400 X X
S7-1200 X -
Date and time DATE (Page 691) TIME_OF_DAY (TOD) (Page 692) DT (DATE_AND_TIME) (Page 692) DTL (Page 693) Table 9-6 Character CHAR (Page 695) STRING (Page 695) Table 9-7 Array ARRAY [.] OF <type> (Page 697) Table 9-8 Structures STRUCT (Page 699) Table 9-9 Pointer POINTER (Page 700) ANY (Page 701) VARIANT (Page 703) Table 9-10 Parameter types Pointer Structures Array Character
S7-300/400 X X X -
S7-1200 X X X
S7-300/400 X X
S7-1200 X X
S7-300/400 X
S7-1200 X
S7-300/400 X
S7-1200 X
S7-300/400 X X -
S7-1200 X
S7-300/400 X X
S7-1200 -
678
PLC data types PLC data type (Page 705) Table 9-12 System data types
System data types IEC_TIMER (Page 706) IEC_SCOUNTER (Page 706) IEC_USCOUNTER (Page 706) IEC_COUNTER (Page 706) IEC_UCOUNTER (Page 706) IEC_DCOUNTER (Page 706) IEC_UDCOUNTER (Page 706) ERROR_STRUCT (Page 706) NREF (Page 706) CREF (Page 706) FBTREF (Page 706) VREF (Page 706) STARTINFO (Page 706) SSL_HEADER (Page 706) CONDITIONS (Page 706) TADDR_Param (Page 706) TCON_Param (Page 706)
1) 2)
S7-300/400 X1) X X X 2)
S7-1200 X X X X X X X X X X X X X X X
For S7-300/400 CPUs, the data type is represented by TP, TON and TOF. For S7-300/400 CPUs, the data type is represented by CTU, CTD and CTUD. Hardware data types S7-300/400 S7-1200 X X X X X
Table 9-13
Hardware data types REMOTE (Page 708) HW_ANY (Page 708) HW_DEVICE (Page 708) HW_IO (Page 708) HW_SUBMODULE (Page 708)
679
Note Depending on the CPU version, the actually valid data types can deviate slightly from the table.
680
See also
Overview of the valid data types (Page 677)
See also
Overview of the valid data types (Page 677) Implicit conversion of BYTE (Page 714) Explicit conversion of BYTE (Page 730) Overview of data type conversion (Page 710)
WORD Description
An operand of the data type WORD is a bit string of 16 bits. The following table shows the properties of the data type WORD:
681
See also
Overview of the valid data types (Page 677) Implicit conversion of WORD (Page 715) Overview of data type conversion (Page 710) Explicit conversion of WORD (Page 731)
DWORD Description
An operand of the data type DWORD is a bit string of 32 bits. The following table shows the properties of the data type DWORD:
Length (bits) 32 Format Unsigned integers Binary numbers Value range 0 to 4294967295 2#0 to 2#11111111111111111111 111111111111 8#0 to 8#37777777777 DW#16#0000_0000 to DW#16#FFFF_FFFF, 16#0000_0000 to 16#FFFF_FFFF Examples of value input 15793935 2#111100001111111100001111
See also
Overview of the valid data types (Page 677) Implicit conversion of DWORD (Page 716) Overview of data type conversion (Page 710) Explicit conversion of DWORD (Page 732)
682
Example
The following figure shows the integer +44 as a binary number:
See also
Overview of the valid data types (Page 677) Implicit conversion of SINT (Page 717) Explicit conversion of SINT (Page 734)
683
Example
The following figure shows the integer 78 as a binary number:
See also
Overview of the valid data types (Page 677) Implicit conversion of USINT (Page 718) Explicit conversion of USINT (Page 736)
684
Example
The following figure shows the integer +44 as a binary number:
See also
Overview of the valid data types (Page 677) Implicit conversion of INT (Page 719) Explicit conversion of INT (Page 738)
685
Example
The following figure shows the integer 44 as a binary number:
See also
Overview of the valid data types (Page 677) Implicit conversion of UINT (Page 720) Explicit conversion of UINT (Page 740)
See also
Overview of the valid data types (Page 677) Implicit conversion of DINT (Page 721) Explicit conversion of DINT (Page 742)
686
See also
Overview of the valid data types (Page 677) Implicit conversion of UDINT (Page 722) Explicit conversion of UDINT (Page 744)
687
The following table shows the properties of the REAL data type:
Length (bits) 32 Format Floating-point numbers to IEEE 754 standard Floating-point numbers Value range -3.402823e+38 to -1.175 495e-38 0 +1.175 495e-38 to +3.402823e+38 1.0 Examples of value input 1.0e-5
See also
Overview of the valid data types (Page 677) Implicit conversion of REAL (Page 723) Explicit conversion of REAL (Page 745)
LREAL Description
Operands of the LREAL data type have a length of 64 bits and are used to represent floatingpoint numbers. An operand of the LREAL data type consists of the following three components: Sign: The sign is determined by the signal state of bit 63. The bit 63 assumes the value "0" (positive) or "1" (negative). 11-bit exponents to base 2: The exponent is increased by a constant (base, +1023), so that it has a value range of 0 to 2047. 52-bit mantissa: Only the fraction part of the mantissa is shown. The integer part of the mantissa is always 1 with normalized floating-point numbers and is not stored. The following figure shows the structure of the LREAL data type:
688
The following table shows the properties of the LREAL data type:
Length (bits) 64 Format Floating-point numbers to IEEE 754 standard Floating-point numbers Value range -1.7976931348623158e+308 to -2.2250738585072014e-308 0 +2.2250738585072014e-308 to +1.7976931348623158e+308 Examples of value input 1.0e-5
1.0
See also
Overview of the valid data types (Page 677) Explicit conversion of LREAL (Page 746)
It is not necessary to specify all time units. So for instance T#5h10s is valid. If only one unit is specified, the absolute value of days, hours, and minutes must not exceed the high or low
689
See also
Overview of the valid data types (Page 677) Implicit conversion of TIME (Page 724) Explicit conversion of TIME (Page 747)
The following table shows the time basis coding for S5TIME:
Time basis 10 ms 100 ms 1s 10 s Binary code for time basis 00 01 10 11
When you use the S5TIME data type with timers, you must observe limit values for the range and the resolution of time values. The table below specifies the range associated with each resolution:
Resolution 0.01 s 0.1 s 1s 10 s Range 10 ms to 9 s 990 ms 100 ms to 1 m 39 s 900 ms 1 s to 16 m 39 s 10 s to 2 h 46 m 30 s
690
Example
The following figure shows the content of the time operands for a time value of 127 and a time basis of 1 s:
See also
Overview of the valid data types (Page 677)
691
See also
Overview of the valid data types (Page 677) Implicit conversion of DATE (Page 727) Explicit conversion of DATE (Page 748)
The specification of hours, minutes and seconds is required. The specification of milliseconds is optional.
See also
Overview of the valid data types (Page 677) Implicit conversion of TOD (Page 726) Explicit conversion of TOD (Page 749)
692
Month Day Hour Minute Second The two most significant digits of MSEC The least significant digit of MSEC Weekday
BCD#0 to BCD#12 BCD#1 to BCD# 31 BCD#0 to BCD#23 BCD#0 to BCD#59 BCD#0 to BCD#59 BCD#0 to BCD#999 BCD#0 to BCD#9 BCD#1 to BCD#7 BCD#1 = Sunday ... BCD#7 = Saturday
1) 2) 3)
MSB: Most significant bit LSB: Least significant bit Fixed point number
See also
Overview of the valid data types (Page 677)
DTL Description
An operand of the DTL data type has a length of 12 bytes and saves information on date and time in a predefined structure.
693
The structure of the DTL data type consists of several components each of which can contain a different data type and range of values. The data type of a specified value must match the data type of the corresponding components. The following table shows the structure components of a DTL data type and its properties:
Byte 0 1 2 3 4 Month Day Weekday USINT USINT USINT 1 to 12 1 to 31 1(Sunday) to 7(Saturday) The weekday is not considered in the value entry. 5 6 7 8 9 10 11 Hour Minute Second Nanoseconds USINT USINT USINT UDINT 0 to 23 0 to 59 0 to 59 0 to 999999999 Component Year Data type UINT Value range 1970 to 2553
See also
Overview of the valid data types (Page 677) Explicit conversion of DTL (Page 750)
694
See also
Overview of the valid data types (Page 677) Implicit conversion of CHAR (Page 728) Explicit conversion of CHAR (Page 751)
STRING Description
An operand of the STRING data type saves several characters in a character string that can consist of up to 254 characters. In a character string, all characters of the ASCII code are permitted. The characters are specified in single quotation marks. The following table shows the properties of a STRING tag:
Length (bytes) n+2* Format ASCII character string incl. special characters Value range 0 to 254 characters Example of value input 'Name'
* An operand of the STRING data type occupies two bytes more than the specified maximum length in the memory.
A character string can also contain special characters. The alignment symbol $ is used to identify control characters, dollar character and single quotation marks. The following table shows examples for the notation of special characters:
695
The maximum length of the character string can be specified during the declaration of an operand using square brackets after the keyword STRING (for example, STRING[4]). If the information on maximum length is omitted, the standard length of 254 characters is set for the respective operand. If the actual length of a specified character string is shorter than the declared maximum length, the remaining character spaces remain undefined. Only occupied character spaces are considered in the value processing. Note For S7-300/400 CPUs, please note: If a temporary tag of the STRING data type was defined, you must describe the BYTE "Max. length of string" with the defined length before you use the tags in the user program.
Example
The example below shows the byte sequence if the STRING[4] data type is specified with output value 'AB':
See also
Overview of the valid data types (Page 677) Explicit conversion of STRING (Page 752)
696
Example
The following example shows how operands of the ARRAY data type can be declared:
Name Time-of-day Character Declaration ARRAY[-5..5] of INT ARRAY[1..2, 3..4] of CHAR Comment One-dimensional field with 20 components One-dimensional field with 11 components Two-dimensional field with 4 components
See also
Overview of the valid data types (Page 677)
697
The following figure shows the structure of the declared ARRAY variable:
698
The index of the first field component is in this case [1,1,1,1,1,1] and the index of the last component is [3,2,3,4,3,4]. Intermediate values are accessed by entering the corresponding value for each dimension.
A STRUCT variable STRUCT starts with one byte with even address and occupies the memory up to the next word limit.
Example
The following figure shows an example of the structure of a STRUCT variable:
699
See also
Overview of the valid data types (Page 677)
Types of pointer
Depending on the information, you can declare the following three types of pointer with the POINTER parameter type: Area-internal pointers: Area-internal pointers contain information on the address of a variable. Cross-area pointers: Cross-area pointers contain information on the memory area and the address of a variable. DB pointer: You can use a DB pointer to point to a data block variable. A DB pointer also contains a data block number in addition to the memory area and the address of a variable. The following table shows the formats for the declaration of various pointer types:
700
You can enter a parameter of the POINTER type without prefix (P#). You entry is then automatically converted to the pointer format.
Memory areas
The following table shows the hexadecimal codes of the memory areas for the POINTER parameter type:
Hexadecimal code B#16#80 B#16#81: B#16#82 B#16#83 B#16#84 B#16#85 B#16#86 B#16#87 Memory area P E A M DBX DIX L V Description I/Os Memory area of inputs Memory area of outputs Memory area of bit memory Data block Instance data block Local data Previous local data
See also
Basics of indirect addressing (Page 669)
ANY Description
An ANY type parameter points to the start of a data area and specifies its length. An ANY pointer occupies 10 bytes of memory and may contain the following information: Data type: Data type of the elements of the data area Repetition factor Number of elements of the data area DB number Data block that contains the declaration of data area elements. Memory area: Memory area of the CPU that stores the data area elements. Start address of the data in the format "byte.bit" Data area start identified by the ANY pointer.
701
An ANY pointer cannot identify structures. It can only be assigned to local variables. The following table shows the formats for the declaration of an ANY pointer:
Format P#DataBlock.MemoryArea DataAddress Type Number P#MemoryArea DataAddress Type Number Example of value input P#DB 11.DBX 20.0 INT 10 P#M 20.0 BYTE 10 P#E 1.0 BOOL 1 Description Area with 10 words in the global DB 11 starting with DBB 20.0 Area with 10 bytes starting with MB 20.0 Input I 1.0
702
See also
Basics of indirect addressing (Page 669)
VARIANT Description
A parameter of the VARIANT type is a pointer that can point to tags of different data types. The VARIANT pointer can recognize structures and point to individual structure components. An operand of the VARIANT data type occupies no space in the memory. Note You can only point to a complete data block if it was originally derived from a user-defined data type (UDT). The following table shows the properties of the VARIANT pointer:
703
NameDataBlock.NameOperand.Com MyDB.StructVariable.FirstComponent ponent Absolute Operand DataBlockNumber.Operand Type Length (valid only for blocks with standard access) %MW10 P#DB10.DBX10.0 INT 12
See also
Basics of indirect addressing (Page 669)
704
See also
Overview of the valid data types (Page 677) Basics of PLC data types (Page 967)
See also
Addressing structured variables (Page 665)
705
706
CONDITIONS
52
707
See also
Overview of the valid data types (Page 677)
708
709
See also
Overview of the valid data types (Page 677)
Data type conversion Data type conversion Overview of data type conversion Introduction
If you link several operands in an instruction, you must make sure that the data types are compatible. This applies also for assignments or for supplying block parameters. If the operands are not the same data type, a conversion has to be carried out. There are two options for the conversion: Implicit conversion The conversion take place automatically when the instruction is executed. Explicit conversion You use an explicit conversion instruction before the actual instruction is executed.
710
Implicit conversion
An implicit conversion is executed automatically if the data types of the operands are compatible. This compatibility test can be carried out according to criteria that are more or less strict: With IEC check If IEC check is set the following rules are applied: The implicit conversion of bit strings into other data types is not possible. An operand of the WORD data type, for example, cannot be specified at a parameter if the INT data type is expected at this parameter. The bit length of the source data type must not exceed the bit length of the destination data type. An operand of the WORD data type, for example, cannot be specified at a parameter if the BYTE data type is expected at this parameter. Without IEC check (default setting) If IEC check is not set the following rules are applied: The implicit conversion of bit strings into other data types is possible. An operand of the WORD data type, for example, can be specified at a parameter if the INT data type is expected at this parameter. The implicit conversion of bit strings into floating-point numbers is not possible. An operand of the WORD data type, for example, cannot be specified at a parameter if the REAL data type is expected at this parameter. The implicit conversion of bit strings into the TIME, TOD, DATE and CHAR data types is only possible if the bit length is identical. An operand of the WORD data type, for example, cannot be specified at a parameter if the DATE data type is expected at this parameter. The bit length of the source data type must not exceed the bit length of the destination data type. An operand of the DINT data type, for example, cannot be specified at a parameter if the INT data type is expected at this parameter. At in/out parameters, the bit length of a specified operand must match the programmed bit length of the respective parameter. In the implicit conversion of data types with a smaller bit length to data types with greater bit length (for example, from BYTE to INT) the parameters of the conversion boxes are identified with a gray symbol. For more information about the setting of the IEC check and the implicit conversion, refer to "See also".
Explicit conversion
If the operands are not compatible and an implicit conversion is therefore not possible, you can use an explicit conversion instruction. You can find the conversion instructions in the "Instructions" task card. A possible overflow is displayed at the ENO enable output. An overflow is created, for example, if the value of the source data type is greater than the value of the target data type. For more information about explicit conversion, refer to "See also".
711
The "Block" function block expects a tag of the INT data type at the "IN_INT" input parameter. Therefore, the value of the "IN_DINT" tag must first be converted from DINT to INT. If the value of the "IN_DINT" tag is within the permitted value range of the INT data type, the conversion takes place. Otherwise, an overflow is signaled. A conversion still takes place even in case of an overflow, but the values are cut off and the enable output ENO is set to "0".
See also
Setting and canceling the IEC check (Page 712)
712
See also
BOOL (bit) (Page 680)
713
Explanation No implicit conversion The bit pattern of the source value is transferred unchanged rightjustified to the destination data type.
No implicit conversion
The bit pattern of the source value is transferred unchanged to the destination data type.
See also
BYTE (byte) (Page 681) Setting and canceling the IEC check (Page 712) Overview of data type conversion (Page 710) Explicit conversion of BYTE (Page 730)
714
Explanation No implicit conversion The bit pattern of the source value is transferred unchanged rightjustified to the destination data type. No implicit conversion The bit pattern of the source value is transferred unchanged rightjustified to the destination data type.
No implicit conversion
The bit pattern of the source value is transferred unchanged to the destination data type. No implicit conversion
See also
WORD (Page 681) Setting and canceling the IEC check (Page 712) Overview of data type conversion (Page 710) Explicit conversion of WORD (Page 731)
715
The bit pattern of the source value is transferred unchanged to the destination data type. No implicit conversion The bit pattern of the source value is transferred unchanged to the destination data type. No implicit conversion The bit pattern of the source value is transferred unchanged to the destination data type. No implicit conversion
See also
DWORD (Page 682) Setting and canceling the IEC check (Page 712) Overview of data type conversion (Page 710) Explicit conversion of DWORD (Page 732)
716
Explanation No implicit conversion The bit pattern of the source value is transferred unchanged to the destination data type. No implicit conversion
The bit pattern of the source value is transferred unchanged rightjustified to the destination data type. No implicit conversion The bit pattern of the source value is transferred unchanged rightjustified to the destination data type. No implicit conversion The value is converted to the format of the destination data type. (The value "-1", for example, is converted to the value "-1.0".) No implicit conversion
See also
SINT (8-bit integers) (Page 683) Setting and canceling the IEC check (Page 712) Overview of data type conversion (Page 710) Explicit conversion of SINT (Page 734)
717
See also
USINT (8-bit integers) (Page 684) Setting and canceling the IEC check (Page 712) Overview of data type conversion (Page 710) Explicit conversion of USINT (Page 736)
718
Explanation No implicit conversion The bit pattern of the source value is transferred unchanged to the destination data type. No implicit conversion
x1)
The bit pattern of the source value is transferred unchanged rightjustified to the destination data type. No implicit conversion The value is converted to the format of the destination data type. (The value "-1", for example, is converted to the value "-1.0".) No implicit conversion
See also
INT (16-bit integers) (Page 684) Setting and canceling the IEC check (Page 712) Overview of data type conversion (Page 710) Explicit conversion of INT (Page 738)
719
See also
UINT (16-bit integers) (Page 685) Setting and canceling the IEC check (Page 712) Overview of data type conversion (Page 710) Explicit conversion of UINT (Page 740)
720
Explanation No implicit conversion The bit pattern of the source value is transferred unchanged to the destination data type. No implicit conversion
x2) x1) x x -
The value is converted to the format of the destination data type. (The value "-1", for example, is converted to the value "-1.0".) The bit pattern of the source value is transferred unchanged to the destination data type. No implicit conversion
See also
DINT (32-bit integers) (Page 686) Setting and canceling the IEC check (Page 712) Overview of data type conversion (Page 710) Explicit conversion of DINT (Page 742)
721
See also
UDINT (32-bit integers) (Page 687) Setting and canceling the IEC check (Page 712) Overview of data type conversion (Page 710) Explicit conversion of UDINT (Page 744)
722
See also
REAL (Page 687) Setting and canceling the IEC check (Page 712) Overview of data type conversion (Page 710) Explicit conversion of REAL (Page 745)
723
See also
Explicit conversion of LREAL (Page 746)
The bit pattern of the source value is transferred unchanged to the destination data type. The result of the conversion shows the duration in milliseconds. No implicit conversion
UDINT REAL LREAL DTL TOD DATE STRING CHAR x: Conversion possible -: Conversion not possible
724
See also
TIME (IEC time) (Page 689) Setting and canceling the IEC check (Page 712) Overview of data type conversion (Page 710) Explicit conversion of TIME (Page 747)
Date and time Implicit conversion of DTL Options for implicit conversion
The implicit conversion of DTL data type is not possible.
See also
Explicit conversion of DTL (Page 750)
725
The bit pattern of the source value is transferred unchanged to the destination data type. The result of the conversion corresponds to the number of milliseconds since the start of day (0:00 hrs). No implicit conversion
REAL LREAL TIME DTL DATE STRING CHAR x: Conversion possible -: Conversion not possible
See also
TIME_OF_DAY (TOD) (Page 692) Setting and canceling the IEC check (Page 712) Overview of data type conversion (Page 710) Explicit conversion of TOD (Page 749)
726
The bit pattern of the source value is transferred unchanged to the destination data type. The result of the conversion corresponds to the number of days since 01-01-1990. No implicit conversion
DINT UDINT REAL LREAL TIME DTL TOD STRING CHAR x: Conversion possible -: Conversion not possible
See also
DATE (Page 691) Setting and canceling the IEC check (Page 712) Overview of data type conversion (Page 710) Explicit conversion of DATE (Page 748)
727
See also
CHAR (character) (Page 695) Setting and canceling the IEC check (Page 712) Overview of data type conversion (Page 710) Explicit conversion of CHAR (Page 751)
728
See also
Explicit conversion of STRING (Page 752)
Explicit conversion Binary numbers Explicit conversion of BOOL Options for explicit conversion in LAD, FBD, STL and GRAPH
The explicit conversion of the BOOL data type is not possible.
The bit pattern of the source value CONVERT is transferred unchanged rightjustified to the destination data type. BOOL_TO_INT BOOL_TO_DINT -
729
See also
BOOL (bit) (Page 680)
Conversion x x x x x x x x x -
Description The lowest bit is transferred into the destination data type. The bit pattern of the source value is transferred unchanged right-justified to the destination data type.
No explicit conversion
Bit strings (BYTE, WORD, DWORD) are interpreted as unsigned integer with the same bit length. The BYTE data type is interpreted as USINT, WORD as UINT, and DWORD as UDINT.
2)
730
See also
BYTE (byte) (Page 681) Implicit conversion of BYTE (Page 714) Overview of data type conversion (Page 710)
Destination BOOL
2)
Conversion x x
Explanation The lowest bit is transferred into the destination data type. The bit pattern of the source value is transferred unchanged right-justified to the destination data type.
BYTE1) DWORD SINT USINT INT UINT DINT UDINT REAL LREAL TIME DTL TOD DATE STRING CHAR BLOCK_DB
1)
x x x x x x x x
No explicit conversion
The bit pattern of WORD is interpreted as a data block number. This conversion is only possible in data blocks with standard access. No explicit conversion
WORD_TO_BLOCK_DB
WORD_BCD BCD
INT INT
Bit strings (BYTE, WORD, DWORD) are interpreted as unsigned integer with the same bit length. The BYTE data type is interpreted as USINT, WORD as UINT, and DWORD as UDINT. Applies to SCL only
2)
731
See also
WORD (Page 681) Implicit conversion of WORD (Page 715) Overview of data type conversion (Page 710)
Destination BOOL
2)
Conversion x x
Explanation The lowest bit is transferred into the destination data type. The bit pattern of the source value is transferred unchanged right-justified to the destination data type.
x x x x x x x x2)
The bit pattern of the source value is transferred unchanged to the destination data type. No explicit conversion -
LREAL TIME DTL TOD DATE STRING CHAR DWORD_BCD BCD DINT DINT
732
See also
DWORD (Page 682) Implicit conversion of DWORD (Page 716) Overview of data type conversion (Page 710)
733
CHAR1)
CONVERT
x: Conversion possible - : Conversion not possible Bit strings (BYTE, WORD, DWORD) and the CHAR data type are interpreted as unsigned integer with the same bit length. The BYTE data type is interpreted as USINT, WORD as UINT, and DWORD as UDINT. The CHAR data type is interpreted as USINT.
1) 2)
734
See also
SINT (8-bit integers) (Page 683) Implicit conversion of SINT (Page 717) Overview of data type conversion (Page 710)
735
736
x x x x
DWORD1)
x x x x x x
The value is converted into the format of the destination data type (the value "1", for example, is converted with "Convert" instruction into the value "1.0"). The result of the conversion depends on the mode of functioning of the instruction used.
CONVERT, NORM_X
No explicit conversion
The value is converted into a character string. S_CONV, VAL_STRG, If the permitted length of the character string CONVERT2) is violated, the enable output ENO is set to "0". The bit pattern of the source value is transferred unchanged to the destination data type. CONVERT
CHAR1)
Bit strings (BYTE, WORD, DWORD) and the CHAR data type are interpreted as unsigned integer with the same bit length. The BYTE data type is interpreted as USINT, WORD as UINT, and DWORD as UDINT. The CHAR data type is interpreted as USINT.
2)
See also
USINT (8-bit integers) (Page 684) Implicit conversion of USINT (Page 718) Overview of data type conversion (Page 710)
737
x -
CONVERT -
Bit strings (BYTE, WORD, DWORD) and the CHAR data type are interpreted as unsigned integer with the same bit length. The BYTE data type is interpreted as USINT, WORD as UINT, and DWORD as UDINT. The CHAR data type is interpreted as USINT. Applies to SCL only
2)
738
See also
INT (16-bit integers) (Page 684) Implicit conversion of INT (Page 719) Overview of data type conversion (Page 710)
739
x x x x
STRING
The value is converted into a character string. S_CONV, VAL_STRG, If the length of the character string is violated, CONVERT2) the enable output ENO is set to "0". The bit pattern of the source value is transferred unchanged to the destination data type. If an overflow occurs, the enable output ENO is set to "0". CONVERT
CHAR1)
Bit strings (BYTE, WORD, DWORD) and the CHAR data type are interpreted as unsigned integer with the same bit length. The BYTE data type is interpreted as USINT, WORD as UINT, and DWORD as UDINT. The CHAR data type is interpreted as USINT.
2)
740
See also
UINT (16-bit integers) (Page 685) Implicit conversion of UINT (Page 720) Overview of data type conversion (Page 710)
741
742
The value is converted into a character string. S_CONV, VAL_STRG, The character string is shown preceded by a CONVERT2) sign. If the length of the character string is violated, the enable output ENO is set to "0". The bit pattern of the source value is transferred unchanged to the destination data type. No explicit conversion CONVERT
CHAR1)
Bit strings (BYTE, WORD, DWORD) and the CHAR data type are interpreted as unsigned integer with the same bit length. The BYTE data type is interpreted as USINT, WORD as UINT, and DWORD as UDINT. The CHAR data type is interpreted as USINT.
1) 2)
See also
DINT (32-bit integers) (Page 686) Implicit conversion of DINT (Page 721) Overview of data type conversion (Page 710)
743
REAL LREAL
x x
DATE STRING
The value is converted into a character string. S_CONV, VAL_STRG, If the length of the character string is violated, CONVERT2) the enable output ENO is set to "0". The bit pattern of the source value is transferred unchanged to the destination data type. CONVERT
CHAR1)
Bit strings (BYTE, WORD, DWORD) and the CHAR data type are interpreted as unsigned integer with the same bit length. The BYTE data type is interpreted as USINT, WORD as UINT, and DWORD as UDINT. The CHAR data type is interpreted as USINT.
2)
744
See also
UDINT (32-bit integers) (Page 687) Implicit conversion of UDINT (Page 722) Overview of data type conversion (Page 710)
SINT USINT INT UINT DINT UDINT LREAL TIME DTL TOD DATE STRING
x x x x x x x x
CONVERT, ROUND, CEIL, The value is converted into the destination FLOOR, TRUNC, NORM_X, data type. The result of the conversion SCALE_X depends on the instruction used. If the permitted value range of the destination data type is violated during the conversion or if the converted value is an invalid floating-point number, the enable output ENO is set to "0". The value is converted into the destination data type. No explicit conversion -
The value is converted into a character string. S_CONV, VAL_STRG, If the length of the character string is violated CONVERT1) or if the value to be converted is an invalid floating-point number, the enable output ENO is set to "0". No explicit conversion -
745
See also
REAL (Page 687) Implicit conversion of REAL (Page 723) Overview of data type conversion (Page 710)
The value is converted into a character S_CONV, VAL_STRG, CONVERT1) string. If the length of the character string is violated or if the value to be converted is an invalid floating-point number, the enable output ENO is set to "0". No explicit conversion -
746
See also
LREAL (Page 688) Overview of data type conversion (Page 710)
UDINT REAL LREAL DTL TOD DATE STRING CHAR x: Conversion possible
747
See also
TIME (IEC time) (Page 689) Implicit conversion of TIME (Page 724) Overview of data type conversion (Page 710)
Clock and calendar Explicit conversion of DATE Options for explicit conversion
The DATE data type cannot be explicitly converted.
See also
DATE (Page 691) Implicit conversion of DATE (Page 727) Overview of data type conversion (Page 710)
748
REAL LREAL TIME DTL DATE STRING CHAR x: Conversion possible -: Conversion not possible
1)
See also
TIME_OF_DAY (TOD) (Page 692) Implicit conversion of TOD (Page 726) Overview of data type conversion (Page 710)
749
DATE
See also
DTL (Page 693) Overview of data type conversion (Page 710)
750
See also
CHAR (character) (Page 695) Implicit conversion of CHAR (Page 728) Overview of data type conversion (Page 710)
751
The first character of the string is transferred to the destination data type. If the string is empty, then the value "0" will be written in the destination data type.
S_CONV, CONVERT1)
See also
STRING (Page 695) Overview of data type conversion (Page 710)
752
Additional conversion functions Additional explicit conversion functions Additional options for explicit conversion in SCL
The following table shows the additional options and instructions for explicit conversion into SCL:
Source WORD BLOCK_DB Destination BLOCK_DB WORD Description The bit pattern of WORD is interpreted as a data block number. The data block number is interpreted as a bit pattern of WORD. Mnemonics of the instruction WORD_TO_BLOCK_DB BLOCK_DB_TO_WORD
9.1.1.6
753
See also
Example of the use of the EN/ENO mechanism in LAD (Page 755) Example of the simulation of the EN/ENO mechanism in STL (Page 757) Example of the use of the EN/ENO mechanism in FBD (Page 755) Example of the use of the EN/ENO mechanism in SCL (Page 756)
754
After the normally open contact, the RLO contains the previous result of logic operation: If "TagIn" signal is "0", the addition is not executed. EN and ENO both lead to the signal state "0". If "TagIn" signal is "1", EN is also "1" and the addition is executed. If no errors occur during the processing of the instruction, the output ENO also has the signal state "1" and the output ""TagOut"" is set.
See also
Basics of the EN/ENO mechanism (Page 753) ADD: Add (Page 1201)
If "TagIn" signal is "1", EN is also "1" and the addition is executed. If no errors occur during the processing of the instruction, the output ENO also has the signal state "1" and the output ""TagOut"" is set. If "TagIn" signal is "0", the addition is not executed. EN and ENO both lead to the signal state "0".
755
See also
Basics of the EN/ENO mechanism (Page 753)
Example of the use of the EN/ENO mechanism in SCL Example of the EN/ENO mechanism for basic instructions
To use the EN/ENO mechanism for instructions in SCL, you have to activate the block property "Set ENO automatically". The following example shows the use of the enable output ENO for the "a/b" instruction.
SCL "MyoutputREAL" :=a/b; IF ENO THEN "MyOutputBool":=1; ELSE "MyOutputBool":=0; END_IF;
If MyTag1 is not greater than MyTag2 the block call is not processed. EN and ENO both lead to the signal state "0". If MyTag1 is greater than MyTag2, EN has signal "1" and the block call is executed. If all instructions within MyFB are executed error-free, MyOutputBool has signal "1".
See also
Basics of the EN/ENO mechanism (Page 753)
756
The query of the operand "U" Tag_Input_1"" provides the result of the preceding logic operation (RLO). The instruction "Jump at RLO = 0 and save RLO (SPBNB)" saves the RLO to the BR. The instruction "Jump if RLO = 0 and save RL0" also evaluates the RLO and executes one of the following actions depending on the evaluation: If the RLO is "0", the processing of the program is continued at the jump label "MyLABEL" with the query of the BR. The addition is not executed. Assign the current RLO to the operand "Tag_Output". If the RLO is "1", the addition is executed. A query of the overflow bit (OV) shows if an error occurred during the addition. The query result is saved in the BR. The operation "CLR" resets the RLO to "0". The BR is then queried for "1" and AND'd with the current RLO. The result is assigned to the operand "Tag_Output". The signal state of the BR and of the operand "Tag_Output" shows if the addition was carried out with any error
See also
Basics of the EN/ENO mechanism (Page 753)
757
9.1.2
9.1.2.1
Introduction
PLC tag tables contain the definitions of the PLC tags and symbolic constants that are valid throughout the CPU. A PLC tag table is created automatically for each CPU used in the project. You can create additional tag tables and use these to sort and group tags and constants. In the project tree there is a "PLC tags" folder for each CPU of the project. The following tables are included: "All tags" table Standard tag table Optional: Other user-defined tag tables
All tags
The "All tags" table gives an overview of all PLC tags, user constants and system constants of the CPU. This table cannot be deleted or moved.
See also
Structure of the PLC tag tables (Page 759) Using tags within the program (Page 654) Constants (Page 656)
758
9.1.2.2
Introduction
Each PLC tag table contains a tab for tags and a tab for user constants. The default tag table and the "All tags" table also have a "System constants" tab.
The following table shows the meaning of the individual columns. The number of columns shown may vary. You can show or hide the columns as required.
Column Description Symbol you can click on to drag-and-drop a tag to a program for use as an operand. Name Data type Address Retain Unique name for the constants throughout the CPU. Data type of the tags. Tag address. Marks the tag as retentive. The values of retentive tags are retained even after the power supply is switched off. Accessible from HMI Visible in HMI Monitor value Shows whether HMI can access this tag during runtime. Shows whether the tag is visible by default in the operand selection of HMI. Current data value in the CPU. This column only appears if an online connection is available and you select the "Monitor" button. Tag table Comment Shows which tag table includes the tag declaration. This column is only available in the "All tags" table. Comments to document the tags.
759
The following table shows the meaning of the individual columns. You can show or hide the columns as required.
Column Description Symbol you can click to move a tag into a network via a drag-anddrop operation for use as an operand. Name Data type Value Tag table Comment Unique name for the constants throughout the CPU. Data type of the constants Value of the constants Shows which tag table includes the constant declaration. This column is only available in the "All tags" table. Comments to document the tags.
See also
Using tags within the program (Page 654) Constants (Page 656) Overview of PLC tag tables (Page 758) Show and hide table columns (Page 775) Keyboard shortcuts in tables (Page 167)
9.1.2.3
760
Requirement
The project view is open.
Procedure
To created a new PLC tag table, follow these steps: 1. Open the "PLC tags" folder under the CPU in the project tree. 2. Double-click the "Add new tag table" entry. A new PLC tag table with the standard name "TagTable_x" is opened. 3. Select the PLC tag table in the project tree. 4. Select the "Rename" command in the shortcut menu. 5. Type in a name that is unique throughout the CPU.
Result
A new PLC tag table is created. You can now declare tag and constants in this table.
See also
Overview of PLC tag tables (Page 758) Structure of the PLC tag tables (Page 759) Importing and exporting (Page 1118)
Requirement
Multiple user-defined tag tables are contained in the "PLC tags" folder of the CPU.
Procedure
To gather multiple PLC tag tables into a group, follow these steps: 1. Select the "PLC tags" folder under the CPU in the project tree. 2. Select the "Insert > Group" menu command. A new group with the standard name "Group_x" is inserted. 3. Select the newly inserted group in the project tree. 4. Select the "Rename" command in the shortcut menu. 5. Assign the new group a unique name throughout the CPU. 6. Drag to the new group the tables you want to group together.
761
Result
The tag tables are gathered in the new group.
See also
Overview of PLC tag tables (Page 758) Structure of the PLC tag tables (Page 759)
Result
The PLC tag table associated with the CPU opens. You can declare the required tags and constants.
See also
Overview of PLC tag tables (Page 758) Structure of the PLC tag tables (Page 759)
9.1.2.4
Rules for PLC tags Valid names of PLC tags Permissible characters
The following rules apply to the use of names for PLC tags: Letters, numbers, special characters are permitted. Quotation marks are not permitted.
762
See also
Using tags within the program (Page 654) Permissible addresses and data types of PLC tags (Page 763) Reserved key words (Page 656)
Operand areas
The following table shows the possible operand areas. The available data types depend on the CPU you use:
Operand area Internationa German l mnemonics mnemonics I IB IW E EB EW Input bit Input byte Input word BOOL BYTE, CHAR, SINT, USINT WORD, INT, UINT, DATE, S5TIME I x.y E x.y IB x EB y IW x EW y 0..1022 0..65534 0..1023 0..65535 Description Data type Format Address area: S7-1200 S7-300/400
0.0..1023.7
0.0..65535.7
763
0..1020
0..65532
QD
AD
Output double word Memory bit Memory bit Memory byte Memory word
M M MB MW
M M MB MW
MD
MD
Memory double word Time function (for S7-300/400 only) Counter function (for S7-300/400 only)
MD x
0..8188
0..65532
Tn
0..65535
Counter
Zn Cn
0..65535
Addresses
The following table shows the possible addresses of tags:
Data type BOOL Address Tags with BOOL data type are addressed with a byte number and a bit number. The numbering of the bytes begins for each operand area at 0. The numbering of the bits goes from 0 to 7. Tags with BYTE, CHAR, SINT, and USINT data type are addressed with a byte number. Example A 1.0
MB 1
764
Mnemonics used
The addresses that you enter in the PLC tag table are automatically adapted to the set mnemonics.
See also
Setting the mnemonics (Page 826) Using tags within the program (Page 654) Valid names of PLC tags (Page 762) Overview of the valid data types (Page 677)
Entering a PLC tag declaration Declaring tags in the PLC tag table Requirements
The "Tags" tab of the PLC tag table is open.
Procedure
To define PLC tags, follow these steps: 1. Enter a tag name in the "Name" column. 2. Enter the required data type in the "Data type" column. You will be supported by autocompletion during input. An address corresponding to the data type is automatically appended. 3. Optional: Click on the arrow key in the "Address" column and enter an operand identifier, an operand type, an address and a bit number in the dialog which then opens. 4. Optional: Enter a comment in the "Comments" column. 5. Repeat steps 1 to 4 for all the tags you require. See also: Permissible addresses and data types of PLC tags (Page 763)
765
Syntax check
A syntax check is performed automatically after each entry, and any errors found are displayed in red. You do not have to correct these errors immediately - you can continue editing and make any corrections later. As long as the tag declaration contains syntax errors and the tag is used in the program, you will not be able to compile the program.
See also
Importing and exporting (Page 1118) Valid names of PLC tags (Page 762) Declaring PLC tags in the program editor (Page 766) Structure of the PLC tag tables (Page 759) Keyboard shortcuts in tables (Page 167)
Procedure
To declare operands as global PLC tags, follow these steps: 1. Insert an instruction in your program. The "<???>", "<??.?>" or "..." strings represent operand placeholders. 2. Replace an operand placeholder with the name of the PLC tag to be created. 3. Select the tag name. If you want to declare multiple PLC tags, select the names of all the tags to be declared. 4. Select the "Define tag" command in the shortcut menu. The "Define tag" dialog box opens. This dialog displays a declaration table in which the name of the tag is already entered. 5. Click the arrow key in the "Section" column and select one of the following entries: Global Memory Global Input Global Output 6. In the other columns, enter the address, data type, and comments. See also: Permissible addresses and data types of PLC tags (Page 763) 7. If the CPU contains multiple PLC tag tables, you can use an entry in the "PLC tag table" column to indicate in which table the tag is to be inserted. If you make no entry in the column, the new tag will be inserted in the default tag table. 8. Click the "Define" button to complete your entry.
766
Result
The tag declaration is written to the PLC tag table and is valid for all blocks in the CPU.
See also
Valid names of PLC tags (Page 762) Keyboard shortcuts in tables (Page 167) Declaring tags in the PLC tag table (Page 765)
Setting the retentivity of PLC tags Retentive behavior of PLC tags Retentive memory areas for PLC tags
To prevent data loss in the event of power failure, you can define a part of the CPU's system memory as retentive. Values of PLC tags that tile in the retentive memory area are preserved even when the power supply is switched off. You specify the exact width of the retentive memory area in the PLC tag table.
See also
Setting the retentive behavior of PLC tags (Page 767)
Requirement
The "PLC tags" tab of the PLC tag table is open.
767
Procedure
To define the width of the retentive memory area for PLC tags, follow these steps: 1. On the toolbar, click the "Retain" button. The "Retain memory" dialog will open. 2. Specify the width of the retentive memory area by entering the number of memory bytes in the input field. 3. Click the "OK" button.
Result
The width if the retentive memory area is defined. In the "Retain" column of the tag table a check mark is automatically set for all tags that are located within the retentive memory area.
See also
Retentive behavior of PLC tags (Page 767) Keyboard shortcuts in tables (Page 167)
9.1.2.5
768
Permitted values
You can select any value from the value range of the specified data type as constant value. For information on the value ranges, refer to the "Data types" chapter. See also: Auto-Hotspot
See also
Constants (Page 656) Declaring constants (Page 769)
Procedure
To declare constants, follow these steps: 1. Open a PLC tag table. 2. Open the "User constants" tab. The constants table opens. 3. Enter a constant name in the "Name" column. 4. Enter the required data type in the "Data type" column. You will be supported by autocompletion during input. 5. Enter a constant value in the "Value" column; this constant value must be valid for the selected data type. 6. If you want, enter comments on the constants in the "Comments" column. The entry of a comment is optional. 7. If you want to declare additional constants, place the cursor in the next row and repeat steps 3 to 6.
Syntax check
A syntax check is performed automatically after each entry, and any errors found are displayed in red. You do not have to correct these errors immediately - you can continue editing and make any corrections later. As long as the tag declaration contains syntax errors and the constant is used in the program, you will not be able to compile the program.
769
See also
Opening the PLC tag table (Page 762) Inserting a table row in the PLC tag table (Page 773) Structure of the PLC tag tables (Page 759) Rules for symbolic constants (Page 768) Keyboard shortcuts in tables (Page 167)
9.1.2.6
Editing properties
See also
Editing the properties of PLC tags (Page 770)
Editing the properties of PLC tags Editing properties in a PLC tag table
To edit the properties of one or more tags, follow these steps: 1. In the project tree, double-click the PLC tag table that contains the tags. The PLC tag table opens. 2. Change the entries in the columns.
770
See also
Properties of PLC tags (Page 770)
771
See also
Keyboard shortcuts in tables (Page 167)
9.1.2.7
Requirements
An online connection to the CPU is available.
Procedure
To monitor the data values, proceed as follows: 1. Open a PLC tag table. 2. Start monitoring by clicking the "Monitor all" button. The additional "Monitor value" column is displayed in the table. This shows the current data values. 3. End the monitoring by clicking the "Monitor all" button again.
772
Note You also have the option of copying PLC tags to a monitor or force table so that you can monitor, control or force them in the table.
See also
Structure of the PLC tag tables (Page 759) Copying entries in the PLC tag table (Page 773)
9.1.2.8
Result
A new row is inserted above the selected row.
See also
Keyboard shortcuts in tables (Page 167)
Procedure
To copy a tag, follow these steps: 1. Select the tags you want to copy. You can also select several tags by clicking on them one after the other while holding down the <Ctrl> key or by pressing and holding down <Shift> and clicking on the first and last tag. 2. Select "Copy" in the shortcut menu. 3. Position the insertion pointer at the location where you want to insert the tags. 4. Select "Paste" in the shortcut menu.
STEP 7 Basic V11.0 SP2 System Manual, 12/2011,
773
Result
The tag is copied to the destination. If there is a name conflict, a number is automatically appended to the tag name. For example, "Tag" becomes "Tag(1)". All other properties of the tag remain unchanged.
See also
Keyboard shortcuts in tables (Page 167)
See also
Keyboard shortcuts in tables (Page 167)
Procedure
To sort the table rows, follow these steps: 1. Select the column by which you want to sort. 2. Click the column header. The column will be sorted in order of increasing values. An up arrow shows the sort sequence.
774
See also
Keyboard shortcuts in tables (Page 167)
Procedure
To automatically fill in successive cells, follow these steps: 1. Select the cells to be loaded. 2. Click the "Fill" symbol in the bottom right corner of the cell. The mouse pointer is transformed into a crosshair. 3. Keep the mouse button pressed and drag the mouse pointer downwards over the cells that you want to fill in automatically. 4. Release the mouse button. The cells are filled in automatically. If entries are already present in the cells that are to be automatically updated, a dialog appears in which you can indicate whether you want to overwrite the existing entries or whether you want to insert new rows for the new tags.
See also
Keyboard shortcuts in tables (Page 167)
Procedure
To show or hide table columns, follow these steps: 1. Click a column header. 2. In the shortcut menu, select the "Show/hide columns" command. The selection of available columns is displayed.
775
See also
Keyboard shortcuts in tables (Page 167)
Requirement
A PLC tag table and an external editor are opened.
Procedure
To export and import individual PLC tags, follow these steps: 1. Select one or more PLC tags. 2. Select "Copy" in the shortcut menu. 3. Switch to the external editor and paste the copied tags. 4. Edit the tags as required. 5. Copy the tags in the external editor. 6. Switch back to the PLC tag table. 7. Select "Paste" in the shortcut menu. Note You also have the option of export or importing PLC tags as mass data. See also: Importing and exporting (Page 1118)
776
9.1.3
9.1.3.1
See also
Creating functions and function blocks (Page 778) Creating data blocks (Page 779) Creating organization blocks (Page 777) Using blocks from libraries (Page 781)
777
Procedure
To create an organization block, follow these steps: 1. Double-click the "Add new block" command. The "Add new block" dialog box opens. 2. Click the "Organization block (OB)" button. 3. Select the type of new organization block. 4. Enter a name for the new organization block. 5. Enter the properties of the new organization block. 6. To enter additional properties for the new organization block, click "Additional information". An area with further input fields is displayed. 7. Enter all the properties you require. 8. Activate the "Add new and open" check box if the organization block does not open as soon as it is created. 9. Confirm your entries with "OK".
Result
The new organization block is created. You can find the organization block in the project tree in the "Program blocks" folder. You can assign additional parameters to some organization blocks in the inspector window or device view after they have been created. The organization block description will state whether the newly created organization block has additional parameters.
See also
Organization blocks (OB) (Page 636) Block folder (Page 777) Creating functions and function blocks (Page 778) Creating data blocks (Page 779) Using blocks from libraries (Page 781) Entering a block title (Page 784) Entering a block comment (Page 785)
778
Procedure
To create a function (FC) or a function block (FB), follow these steps: 1. Double-click the "Add new block" command. The "Add new block" dialog box opens. 2. Click the "Function block (FB)" or "Function (FC)" button. 3. Enter a name for the new block. 4. Enter the properties of the new block. 5. To enter additional properties for the new block, click "Additional information". An area with further input fields is displayed. 6. Enter all the properties you require. 7. Activate the "Add new and open" check box if the block does not open as soon as it is created. 8. Confirm your entries with "OK".
Result
The new block is created. You can find the block in the project tree in the "Program blocks" folder.
See also
Function blocks (FB) (Page 637) Functions (FCs) (Page 636) Basics of block access (Page 640) Block folder (Page 777) Creating organization blocks (Page 777) Creating data blocks (Page 779) Using blocks from libraries (Page 781) Entering a block title (Page 784) Entering a block comment (Page 785)
779
Procedure
To create a data block, follow these steps: 1. Double-click the "Add new block" command. The "Add new block" dialog box opens. 2. Click the "Data block (DB)" button. 3. Select the type of the data block. You have the following options available to you: To create a global data block, select the list entry "Global DB". To create an instance data block, select the function block to which you want to assign the instance data block from the list. The list contains only the function blocks that were previously created for the CPU. To create a data block based on a PLC data type, select the PLC data type from the list. The list contains only the PLC data types that were previously created for the CPU. To create a data block based on a system data type, select the system data type from the list. The list contains only those system data types that have already been inserted to program blocks in the CPU. 4. Enter a name for the data block. 5. Enter the properties of the new data block. Select whether you want to assign the block number manually or automatically. Enter a number if you decide to use manual assignment. Select the type of the block access (for S7-1200 only). 6. To enter additional properties of the new data block, click "Additional information". An area with further input fields is displayed. 7. Enter all the properties you require. 8. Activate the "Add new and open" check box if the block does not open as soon as it is created. 9. Confirm your entry with "OK".
Result
The new data block is created. You can find the data block in the project tree in the "Program blocks" folder.
780
See also
Global data blocks (DB) (Page 638) Instance data blocks (Page 639) Block folder (Page 777) Creating organization blocks (Page 777) Creating functions and function blocks (Page 778) Using blocks from libraries (Page 781) Basics of block access (Page 640) System data types (Page 706)
Requirement
The "Libraries" task card is displayed. No write protection is set for global libraries.
See also
Using libraries (Page 233)
781
Copying and pasting blocks Basics of copying and pasting blocks Function
You can also create new blocks by copying existing blocks and pasting the copy. Observe the following principles when using this method: You can copy organization blocks (OBs), functions (FCs), function blocks (FBs), and global data blocks (DBs) without restriction. You can copy instance data blocks only for the same function block, since the assignment to the function block cannot be changed afterwards. However, the assignment is canceled if you copy the instance data block to a different CPU. If a function block with the same number exists there, the instance data block will be assigned to this function block. If you copy the instance data block together with the function block into the other CPU, the instance data block is assigned to the copy of the function block.
Copying data
With paste, all the block data is copied and forwarded to the copy. This data includes: Block interface tags All networks Comments in all existing compilations Messages defined in the block The entire program code of the copied block including the call instructions contained in the block. However, called blocks and their associated instance data blocks are not copied.
782
NOTICE Number conflicts may occur, if the pasted block has the same block number as an existing block. The block number is not automatically changed during pasting. This double number may have an effect on block calls. When you copy blocks you should therefore check the block number carefully and correct duplicate block numbers manually or using the block properties.
See also
Copying blocks (Page 783) Pasting blocks (Page 783)
Procedure
To copy a block, follow these steps: 1. Right-click the block that you want to copy. 2. Select "Copy" in the shortcut menu.
Result
A copy of the block is now on the clipboard and can be pasted either into the same CPU or into another one.
See also
Basics of copying and pasting blocks (Page 782) Pasting blocks (Page 783)
783
Procedure
To paste a copied block and its data into a CPU, follow these steps: 1. In the project tree, open the folder structure for the CPU into which you want to paste the copied block. Note Please note that you can only paste the copied block into a CPU which supports the block programming language and type. 2. Right-click on the "Program blocks" folder. 3. Select "Paste" in the shortcut menu. If you are pasting the block into the same CPU as the original block, "_<consecutive number>" will be appended to the name of the copy. If you are pasting the block into a different CPU where a block of the same name already exists, the "Paste" dialog box opens. Select the required option and confirm with "OK".
See also
Basics of copying and pasting blocks (Page 782) Copying blocks (Page 783)
Requirement
A code block is available.
784
See also
Creating organization blocks (Page 777) Creating functions and function blocks (Page 778) Entering a block comment (Page 785)
Requirement
A code block is available.
785
See also
Creating organization blocks (Page 777) Creating functions and function blocks (Page 778) Entering a block title (Page 784)
9.1.3.2
See also
Overview of block properties (Page 787) Block time stamps (Page 789) Displaying and editing block properties (Page 791) Setting the mnemonics (Page 826)
786
787
Create minimized DB
Skip steps
Acknowledgment required for supervision errors Permanent processing of all interlocks in manual mode Lock operating mode selection Data block write-protected in the device Only store in load memory
Triggers
Triggers
788
See also
Basics of block properties (Page 786) Block time stamps (Page 789) Displaying and editing block properties (Page 791) Basics of block access (Page 640)
789
790
See also
Basics of block properties (Page 786) Overview of block properties (Page 787) Displaying and editing block properties (Page 791) Basic information on compiling blocks (Page 1000)
Result
The properties of the block will be changed. The changes are not saved until the project is saved.
791
See also
Basics of block properties (Page 786) Overview of block properties (Page 787) Block time stamps (Page 789)
9.1.3.3
Managing blocks
Procedure
To open a block, follow these steps: 1. Double-click on the block you wish to open.
Result
The block will open in the program editor.
See also
Saving blocks (Page 792) Closing blocks (Page 793) Renaming blocks (Page 793) Deleting blocks offline (Page 794) Deleting blocks online (Page 795) Opening know-how protected blocks (Page 1017)
Saving blocks
Blocks are always saved together with the project. Faulty blocks can also be saved. This allows the error to be resolved at a convenient time.
792
Procedure
To save a block, follow these steps: 1. Select the "Save" or "Save as" command in the "Project" menu. See also: Saving projects (Page 184)
See also
Opening blocks (Page 792) Closing blocks (Page 793) Renaming blocks (Page 793) Deleting blocks offline (Page 794) Deleting blocks online (Page 795)
See also
Opening blocks (Page 792) Saving blocks (Page 792) Renaming blocks (Page 793) Deleting blocks offline (Page 794) Deleting blocks online (Page 795)
793
Procedure
To change the name of a block, follow these steps: 1. Right-click the block that you want to rename. 2. Select the "Rename" command in the shortcut menu. The block name in the project tree changes to an input field. 3. Input the new name for the block. 4. Confirm your entry with the Enter key.
Result
The name of the block is now changed at all points of use in the program.
See also
Opening blocks (Page 792) Saving blocks (Page 792) Closing blocks (Page 793) Deleting blocks offline (Page 794) Deleting blocks online (Page 795)
Procedure
To delete a block that exists offline, proceed as follows: 1. In the project tree in the "Program blocks" folder, right-click on the block that you want to delete. 2. Select the "Delete" command in the shortcut menu. 3. Confirm the safety prompt with "Yes". The block is deleted offline from the project. Note If you are deleting organization blocks, note that events may be assigned to these blocks. If you delete such organization block the program cannot respond to parameterized events.
794
See also
Opening blocks (Page 792) Saving blocks (Page 792) Closing blocks (Page 793) Renaming blocks (Page 793) Deleting blocks online (Page 795)
Requirement
The "Program blocks" folder in the project tree is open.
Procedure
To delete a block that exists online, follow these steps: 1. In the "Program blocks" folder in the project tree, right-click on the block that you wish to delete from the device. 2. Select the "Delete" command in the shortcut menu. The "Delete" dialog will open. 3. Select the "Delete from device" option button. 4. Click on "Yes". The block will be deleted from the device online.
See also
Opening blocks (Page 792) Saving blocks (Page 792) Closing blocks (Page 793) Renaming blocks (Page 793) Deleting blocks offline (Page 794)
795
9.1.4
9.1.4.1
Programming blocks
Program editor
796
Toolbar
Toolbar Block interface "Favorites" pane in the "Instructions" task card and favorites in the program editor Programming window "Instructions" task card "Testing" task card
The toolbar allows you to access the principal functions of the program editor, such as: Show and hide absolute operands Show and hide favorites Skip to syntax errors
797
Block interface
The block interface contains the declarations for local tags used solely within the block. The sections available depend on the block type.
Favorites
You can save frequently used instructions as favorites. These favorites are then displayed in the "Instructions" task card and the "Favorites" pane. You can also display favorites in the program editor using the program editor toolbar. This allows you to access your favorites even when the "Instructions" task card is not visible.
Programming window
The programming window is the work area of the program editor. You can enter the program code in this window. The appearance and functionality of the program window can vary depending on the programming language used.
798
See also
Layout of the block interface (Page 808) Enlarging the programming window (Page 802)
799
800
Monitor program
Function Monitor from here Set/delete breakpoint Skip Jump to Execution to selection Display program status Activate all breakpoints Deactivate all breakpoints Keyboard shortcut <F5> <F9> <F10> <F11> <Shift+F5> <Shift+T> <Ctrl+Shift+F9> <Ctrl+Shift+F10>
See also
Keyboard shortcuts for project editing (Page 166) Keyboard shortcuts in the project tree (Page 167) Keyboard shortcuts for windows (Page 167) Keyboard shortcuts in tables (Page 167) Keyboard shortcuts for text editing (Page 168)
801
802
See also
Overview of the program editor (Page 796)
803
See also
Using autocompletion in graphic programming languages (Page 804) Using autocompletion in textual programming languages (Page 805)
804
See also
Basics of autocompletion (Page 804) Using autocompletion in textual programming languages (Page 805)
Using autocompletion in textual programming languages Inserting tags and instructions using autocompletion
To insert tags and instructions in textual programming languages using autocompletion, follow these steps: 1. Enter the first few letters of the name of the tag or instruction you wish to insert. If necessary, you can directly filter the kind of tags: Enter # to access the local tags from the block interface. Enter " to access the global tags. Autocompletion will open. It will contain only those local and global tags, data blocks, multiinstances and instructions which are admissible in the current position. You can exit autocompletion at any time by pressing <Esc>. 2. Enter more letters of the name of the tag or instruction you wish to insert. Press the <Space bar> to close autocompletion. Autocompletion will be filtered further with each letter entered. If there is no tag or instruction starting with the letters entered, autocompletion will remain at the last match. 3. Select the tag or instruction required from the list. If the tag is a structured tag, a data block or a multi-instance, then an arrow will be displayed at the end of the row. Click on the arrow to display the subordinate element. You can navigate to the very last level in this way. Use the <Backspace> key to return to the previous level. 4. Press the <Return> key to apply the tag.
See also
Basics of autocompletion (Page 804) Using autocompletion in graphic programming languages (Page 804)
805
General settings for the PLC programming Overview of the general settings Overview
The following table shows the general settings that you can make:
Group View Setting With comments with tag information Description Network comments are shown. Additional information for the tags used is displayed in the program editor. This setting only has an effect on blocks which were programmed with LAD, FBD or STL. Actual parameters are deleted if the associated formal parameters were deleted in the called block, and you run the "Update block call" function or compile the block. The compatibility of operands in comparison operations and arithmetic operations are tested according to IEC rules. You have to explicitly convert noncompatible operands. The tag declaration for blocks with optimized access contains only the symbolic names of the data elements. The addresses are automatically optimized and managed by the system. The performance of the CPU is improved, and access errors such as those from SIMATIC-HMI cannot occur. The autocomplete list is displayed. German or international designation of operations and operands
Compilation
IEC check
Additional settings
See also
Changing the settings (Page 807) Permissible addresses and data types of PLC tags (Page 763) Overview of the print settings (Page 138) Basics of block access (Page 640) Setting and canceling the IEC check (Page 712)
806
Result
The change will be loaded directly, there is no need to save it explicitly.
See also
Overview of the general settings (Page 806)
9.1.4.2
Declaring the block interface Basic information on declaring the block interface Introduction
The interface contains the declarations of local tags that are used within the block. The tags are subdivided into two groups: Block parameters that form the block interface when it is called in the program. Local data that are used for storage of intermediate results.
807
Using POINTER
The following rules apply to declaration of the interface of a function: Local tags declared in the section "Input" of the interface cannot be used for the outputs of the programmed instructions or called blocks. Local tags declared in the section "Output" of the interface cannot be used for the inputs of the programmed instructions or called blocks. Local tags declared in the section "InOut" of the interface can be used for the inputs and outputs of the programmed instructions or called blocks. The following rules apply to the use of block parameters within a function block (FB): Local tags declared in the section "Input" of the interface cannot be used for the outputs of the programmed instructions or called blocks if the IEC check is enabled. Use is possible if the IEC check is disabled. Local tags declared in the section "Output" of the interface cannot be used for the inputs of the programmed instructions or called blocks if the IEC check is enabled. Use is possible if the IEC check is disabled. Local tags declared in the section "InOut" of the interface can be used for the inputs and outputs of the programmed instructions or called blocks regardless of the IEC check settings.
See also
Using tags within the program (Page 654) Reserved key words (Page 656)
808
Block parameters
The following table shows the types of block parameters:
Type Input parameters Section Input Function Parameters whose values are read by the block. Parameters whose values are written by the block. Parameters whose values are read by the block when it is called, and whose values are written again by the block after execution. Function value that is returned to the calling block. Available in Functions, function blocks and some types of organization blocks Functions and function blocks Functions and function blocks
Output InOut
Return value
Return
Functions
Local data
The following table shows the types of local data:
Type Temporary local data Section Temp Function Tags that are used to store temporary intermediate results. Temporary local data are retained for only one cycle. If you use temporary local data, you have to make sure that the values are written within the cycle in which you want to read them. Otherwise the values will be random. Tags that are used for storage of static intermediate results in the instance data block. Static data is retained until overwritten, which may be after several cycles. The names of the blocks, which are called in this code block as multi-instance, will also be stored in the static local data. Available in Functions, function blocks and organization blocks
Static
Function blocks
809
See also
Using tags within the program (Page 654) Reserved key words (Page 656) Valid data types in the code block interfaces (Page 810) Setting the retentivity of local tags (Page 821)
Valid data types in the code block interfaces Valid data types for the interface of organization blocks
The following table shows the valid data types for the interface of an organization block in S7-1200:
S7-1200 Elementary Section Temp Data types X Structured Data types X VARIANT
The following table shows the valid data types for the interface of an organization block in S7-300/400:
810
VARIANT X x -
Data types X X X X X
X X
The following table shows the valid data types for the interface of a function block in S7-300/400:
S7-300/400 Elementary Section Input Output InOut Static Temp
(1)
POINTER
ANY
Data types X X X X X
X X -
X X X
VARIANT X X X
(1)
811
VARIANT
Data types X
The following table shows the valid data types for the interface of a function block in S7-300/400:
S7-300/400 Elementary Section Input Output InOut Temp
(1)
POINTER
ANY
Data types X X X X
X X X -
X X X X
X(1) X(1) X
Declaring local tags Declaring local tags in the block interface Requirement
The block interface is open.
Procedure
To declare a tag of the elementary data type, follow these steps: 1. Select the appropriate declaration section in the interface: 2. Enter a tag name in the "Name" column. 3. Enter the required data type in the "Data type" column. You will be supported by autocompletion during input. 4. Optional: Change the properties of the tags that are displayed in the other columns of the block interface.
Result
The tag is created.
812
Syntax check
A syntax check is performed after each entry, and any errors found are displayed in red. You do not have to correct these errors immediately - you can continue editing and make any corrections later. However, you will not be able to compile the program if the tag declaration contains syntax errors. Note If you change the interface of a block, the calls of the block in the program will possibly become inconsistent. The call locations are automatically updated, if possible. If an automatic updating is not possible, the inconsistent blocks have to be updated manually. See also: Updating block calls in LAD (Page 849) Updating block calls in FBD (Page 888)
See also
Keyboard shortcuts in tables (Page 167) Basic information on start values (Page 955) Using tags within the program (Page 654) Reserved key words (Page 656) Valid data types in the code block interfaces (Page 810) Properties of local tags (Page 820) Setting the retentivity of local tags (Page 821)
Procedure
To declare a local tag, follow these steps: 1. Insert an instruction in your program. The "<???>", "<??.?>" or "..." strings represent operand placeholders. 2. Replace an operand placeholder with the name of the tag to be created. 3. Select the tag name. If you want to declare multiple tags, select the names of all the tags to be declared.
813
Result
The declaration is written directly into the block interface and is valid within the entire block. Note If you change the interface of a block, the calls of the block in the program will possibly become inconsistent. The call locations are automatically updated, if possible. If an automatic updating is not possible, the inconsistent blocks have to be updated manually. See also: Updating block calls in LAD (Page 849) Updating block calls in FBD (Page 888)
See also
Keyboard shortcuts in tables (Page 167) Using tags within the program (Page 654) Reserved key words (Page 656) Valid data types in the code block interfaces (Page 810) Basic information on start values (Page 955) Properties of local tags (Page 820) Setting the retentivity of local tags (Page 821)
814
Procedure
To declare a tag of the ARRAY data type, follow these steps: 1. Select the appropriate declaration section in the interface. 2. Enter a tag name in the "Name" column. 3. In the "Data type" column, click the button for the data type selection. A list of the permissible data types is opened. 4. Select the "Array" data type. The "Array" dialog opens. 5. In the "Data type" text box, specify the data type of the array elements. 6. In the "ARRAY limits" text box, specify the high and low limit for each dimension. Example of a one-dimensional ARRAY: [0..3] Example of a three-dimensional ARRAY: [0..3, 0..15, 0..33] 7. Confirm your entry. 8. Optional: Change the properties of the tags that are displayed in the other columns of the block interface.
Result
The tag of ARRAY data type is created. Note You cannot define specific default values for ARRAY elements. However, you can assign them start values in the instance.
See also
Using tags within the program (Page 654) Reserved key words (Page 656) Properties of local tags (Page 820) Setting the retentivity of local tags (Page 821) Keyboard shortcuts in tables (Page 167)
815
Procedure
To declare a tag of the STRUCT data type, follow these steps: 1. Select the appropriate declaration section in the interface: 2. Enter a tag name in the "Name" column. 3. Enter "Struct" in the "Data type" column. You will be supported by autocompletion during input. An empty, indented row is inserted after the new tag. 4. Insert the first structural element in the first empty row. An additional empty row is inserted after the element. 5. Select a data type for the structure element. 6. Optional: Change the properties of the structural element that is displayed in the other columns of the block interface. 7. Repeat the step 4 to 7 for all additional structure elements. It is not necessary to end the structure explicitly. The structure ends with the last element that is entered. 8. To insert a new tag after the structure, leave a blank row after the end of the structure and then start the new tag in the second empty row.
Result
The tag of STRUCT data type is created.
See also
Using tags within the program (Page 654) Reserved key words (Page 656) Properties of local tags (Page 820) Setting the retentivity of local tags (Page 821) Keyboard shortcuts in tables (Page 167)
816
Procedure
To declare a tag based on a PLC data type, follow these steps: 1. Select the appropriate declaration section in the interface: 2. Enter the PLC data type in the "Data type" column. You will be supported by Autocomplete during input.
Result
The tag is created.
Note You define the default values of tags within a PLC data type when the PLC data type is created. You cannot change these values at the point of use of the PLC data type. If you change or delete PLC data types that are used in the block interface, the interface becomes inconsistent. To remedy this inconsistency, the interface has to be updated. See also: Updating the block interface (Page 819)
See also
Keyboard shortcuts in tables (Page 167) Basics of PLC data types (Page 967)
Overlaying tags
To overlay a tag with a new data type, follow these steps: 1. Open the block interface. 2. In the interface, select the tag that you want to overlay with a new data type. 3. Click "Add row" in the toolbar. A row is inserted after the tag to be overlaid. The overlaying tag must be declared in the row directly after the tag that is to be overlaid. 4. Enter a tag name in the "Name" column.
817
Removing overlay
To remove the overlay of a tag, follow these steps: 1. Select the overlaid tag that you want to remove. 2. Select the "Delete" command in the shortcut menu. 3. The overlay is removed.
See also
Keyboard shortcuts in tables (Page 167) Overlaying tags with AT (Page 667)
Procedure
To declare a function block to be called as a multi-instance, follow these steps: 1. In the "Name" column of the "Static" section, enter a designation for the block call. 2. In the "Data type" column, enter the symbolic name for the function block to be called. Note The program editor will declare the multi-instance automatically if you program a block call in a network and then specify in the "Call options" dialog that you want to call the block as a multiple instance.
See also
Updating the block interface (Page 819)
818
819
See also
Basics of PLC data types (Page 967) Declaring tags based on a PLC data type (Page 816) Keyboard shortcuts in tables (Page 167) Basic information on start values (Page 955) Using tags within the program (Page 654) Reserved key words (Page 656) Valid data types in the code block interfaces (Page 810) Properties of local tags (Page 820) Setting the retentivity of local tags (Page 821) Updating block calls in LAD (Page 849) Declaring multi-instances (Page 818)
820
See also
Setting the retentivity of local tags (Page 821) Changing properties of local tags (Page 822) Reserved key words (Page 656)
821
See also
Properties of local tags (Page 820) Basics of block access (Page 640)
822
Note If you change the interface of a block, the program may become inconsistent. The inconsistencies are automatically updated, if possible. If an automatic updating is not possible, the inconsistent calls are marked in red. You than have to manually updated the inconsistencies. See also: Updating block calls in LAD (Page 849) Updating block calls in FBD (Page 888)
See also
Layout of the block interface (Page 808) Keyboard shortcuts in tables (Page 167) Properties of local tags (Page 820) Setting the retentivity of local tags (Page 821) Basic information on start values (Page 955) Using tags within the program (Page 654) Reserved key words (Page 656) Valid data types in the code block interfaces (Page 810) Updating the block interface (Page 819)
823
Result
A new row is inserted above the selected row.
See also
Keyboard shortcuts in tables (Page 167)
Result
A new empty row will be inserted below the selected row.
See also
Keyboard shortcuts in tables (Page 167)
824
See also
Keyboard shortcuts in tables (Page 167)
Requirement
The table is open. Sufficient declaration rows are available.
Procedure
To automatically fill in successive cells, follow these steps: 1. Select the cells to be loaded. 2. Click the "Fill" symbol in the bottom right corner of the cell. The mouse pointer is transformed into a crosshair. 3. Keep the mouse button pressed and drag the mouse pointer downwards over the cells that you want to fill in automatically. 4. Release the mouse button. The cells are filled in automatically. 5. If entries are already present in the cells that are to be automatically filled in, a dialog appears. In this dialog you can indicate whether you want to overwrite the existing entries or insert new rows for the new tags.
See also
Keyboard shortcuts in tables (Page 167)
825
Procedure
To show or hide table columns, follow these steps: 1. Click a column header. 2. In the shortcut menu, select the "Show/hide columns" command. The selection of available columns is displayed. 3. To show a column, select the column's check box. 4. To hide a column, clear the column's check box.
Requirements
The block interface and an external editor are opened.
Procedure
To export individual tags to an external editor and import them again, follow these steps: 1. Select one or more tags. 2. Select "Copy" in the shortcut menu. 3. Switch to the external editor and paste the copied tags. 4. Edit the tags as required. 5. Copy the tags in the external editor. 6. Select the tags in the external editor. 7. Switch back to the block interface. 8. Select "Paste" in the shortcut menu.
826
Procedure
To set the mnemonics, follow these steps: 1. Select the "Settings" command in the "Options" menu. The "Settings" window is displayed in the work area. 2. Select the "General" group in the area navigation. 3. In the "General settings" group, select the mnemonics that you want to use. The mnemonics is changed in all blocks.
Requirement
The program editor is open.
Procedure
To change the representation of the operands, follow these steps: 1. Click the "Absolute/symbolic operands" button in the program editor toolbar. Each time you click the button, the representation and the symbol on the button change. Or: 1. Click the small arrow next to the "Absolute/symbolic operands" button in the program editor toolbar. A drop-down list is displayed. 2. Select the required representation from the drop-down list. The symbol on the button changes.
See also
Basic information about operands (Page 654)
827
828
Creating LAD programs Basic information on LAD LAD programming language Overview of the Ladder Logic (LAD) programming language
LAD is a graphical programming language. The representation is based on circuit diagrams. The program is mapped in one or more networks. A network contains a power rail on the left where the rungs originate. The binary signal scans are arranged in the form of contacts on the rungs. The serial arrangement of the elements on a rung creates a series connection; arrangement on simultaneous branches creates a parallel connection. Complex functions are represented by boxes.
829
Power rail
Each LAD network consists of a power rail that contains at least one rung. A network can be extended by adding additional rungs. You can use branches to program parallel connections in the specific rungs.
Contacts
You can use contacts to create or interrupt a current-carrying connection between two elements. The current is relayed from left to right. You can use contacts to query the signal state or the value of an operand and control it depending on the result of the current flow. The following types of contact are available to you in a LAD program: Normally open contact: Normally open contacts forward the current if the signal state of a specified binary operand is "1". Normally closed contacts: Normally open contacts forward the current if the signal state of a specified binary operand is "0". Contact with additional function: Contacts with additional function forward the current if a specific condition is met. With these contacts you can also execute an additional function, such as an RLO edge detection and a comparison.
830
Coils
You can use coils to control binary operands. Coils can set or reset a binary operand depending on the signal state of the result of logic operation. The following types of coils are available to you in a LAD program: Standard coils: Standard coils set a binary operand if current flows in the coil. The "Assignment" instruction is an example of a standard coil. Coils with additional function: These coils have additional functions besides the evaluation of the result of logic operation. Coils for RLO edge detection and program control are examples of coils with additional function.
Boxes
Boxes are LAD elements with complex functions. The empty box is an exception. You can use the empty box as a placeholder in which you can select the required instruction. The following types of boxes are available to you in a LAD program: Boxes without EN/ENO mechanism: A box is executed depending on the signal state at the box inputs. The error status of the processing cannot be queried. Boxes with EN/ENO mechanism: A box is only executed if the enabling input "EN" carries the signal state "1". If the box is processed correctly, the "ENO" enable output has signal state "1". If an error occurs during the processing, the "ENO" output is reset. Calls of code block are also shown in the network as boxes with EN/ENO mechanism.
See also
Rules for the use of LAD elements (Page 840)
831
Maximum height
See also
Changing the settings (Page 832)
Result
The change will be loaded directly, there is no need to save it explicitly.
832
See also
Overview of the settings for LAD (Page 832)
See also
Entering the network title (Page 837) Entering a network comment (Page 838) Navigating networks (Page 839)
Procedure
To insert a new network, follow these steps: 1. Select the network after which you want to insert a new network. 2. Select the "Insert network" command in the shortcut menu.
Result
A new empty network is inserted into the block.
833
See also
Selecting networks (Page 834) Copying and pasting networks (Page 835) Deleting networks (Page 836) Expanding and collapsing networks (Page 836) Entering the network title (Page 837) Entering a network comment (Page 838) Navigating networks (Page 839)
Selecting a network
To select a network, follow these steps: 1. Click the title bar of the network that you want to select.
834
See also
Inserting networks (Page 833) Copying and pasting networks (Page 835) Deleting networks (Page 836) Expanding and collapsing networks (Page 836) Entering the network title (Page 837) Entering a network comment (Page 838) Navigating networks (Page 839)
Requirements
A network is available.
Procedure
To copy and paste a network, follow these steps: 1. Select the network or networks to be copied. 2. Select "Copy" in the shortcut menu. 3. Select the network after which you want to paste in the copied network. 4. Select "Paste" in the shortcut menu.
See also
Inserting networks (Page 833) Selecting networks (Page 834) Deleting networks (Page 836) Expanding and collapsing networks (Page 836) Entering the network title (Page 837) Entering a network comment (Page 838) Navigating networks (Page 839)
835
Procedure
To delete a network, follow these steps: 1. Select the network that you want to delete. 2. Select the "Delete" command in the shortcut menu.
See also
Inserting networks (Page 833) Selecting networks (Page 834) Copying and pasting networks (Page 835) Expanding and collapsing networks (Page 836) Entering the network title (Page 837) Entering a network comment (Page 838) Navigating networks (Page 839)
836
See also
Inserting networks (Page 833) Selecting networks (Page 834) Copying and pasting networks (Page 835) Deleting networks (Page 836) Entering the network title (Page 837) Entering a network comment (Page 838) Navigating networks (Page 839)
Requirement
A network is available.
Procedure
To enter a network title, follow these steps: 1. Click on the title bar of the network. 2. Enter the network title.
837
See also
Using networks (Page 833) Inserting networks (Page 833) Selecting networks (Page 834) Copying and pasting networks (Page 835) Deleting networks (Page 836) Expanding and collapsing networks (Page 836) Entering a network comment (Page 838) Navigating networks (Page 839)
Requirement
A network is available.
Procedure
To enter a network comment, follow these steps: 1. Click on the right arrow before the network title. 2. If the comment area is not visible, click "Network comments on/off" in the toolbar. The comment area is displayed. 3. Click "Comment" in the comment area. The "Comment" text passage is selected. 4. Enter the network comment.
838
See also
Using networks (Page 833) Inserting networks (Page 833) Selecting networks (Page 834) Copying and pasting networks (Page 835) Deleting networks (Page 836) Expanding and collapsing networks (Page 836) Entering the network title (Page 837) Navigating networks (Page 839)
Navigating networks
You can navigate straight to a specific position within a block.
Procedure
To navigate to a specific position within a block, follow these steps: 1. Right-click on the white area of the programming window. 2. Select the "Go to > Network/line" command in the shortcut menu. The "Go to" dialog will open. 3. Enter the network to which you want to navigate. 4. Enter the line number of the network to which you want to navigate. 5. Confirm your entry with "OK".
Result
The relevant line will be displayed if this is possible. If the network or line requested does not exist, the last existing network or the last existing line in the network requested will be displayed.
See also
Using networks (Page 833) Inserting networks (Page 833) Selecting networks (Page 834) Copying and pasting networks (Page 835) Deleting networks (Page 836) Expanding and collapsing networks (Page 836) Entering the network title (Page 837) Entering a network comment (Page 838)
839
Inserting LAD elements Rules for the use of LAD elements Rules
Note the following rules when inserting LAD elements: Every LAD network must terminate with a coil or a box. However, the following LAD elements must not be used to terminate a network: Comparator boxes Instructions for positive and negative RLO edge detection The starting point of the branch for a box connection must always be the power rail. Logic operations or other boxes can be present in the branch before the box. Only contacts can be inserted into simultaneous branches with preceding logic operations. The contact for negating the result of logic operation (-|NOT|-) is an exception here. The contact for negating the result of logic operation, as well as coils and boxes, can be used in simultaneous branches if they originate directly from the power rail. Constants (e.g. TRUE or FALSE) cannot be assigned to normally open or normally closed contacts. Instead, use the operands of the BOOL data type. Only one jump instruction can be inserted in each network. Only one jump label can be inserted in each network. Instructions with positive or negative edge detection may not be arranged directly at the left margin of the rung as they requires a prior logic operation.
840
See also
Prohibited interconnections in LAD (Page 842) Overview of the LAD elements (Page 829)
841
Short-circuit
No branches may be programmed that would cause a short-circuit.
Logic operations
The following rules apply to logic operations: Only Boolean inputs can be combined with preceding logic operations. Only the first Boolean output can be combined with a further logic operation. Only one complete logical path can exist per network. Paths that are not connected can be linked.
See also
Rules for the use of LAD elements (Page 840)
842
Procedure
To insert a LAD element into a network using the "Instructions" task card, follow these steps: 1. Open the "Instructions" task card. 2. Navigate to the LAD element that you want to insert. 3. Use drag-and-drop to move the element to the desired place in the network. If the element is an internal system function block (FB), the "Call option" dialog opens. In this dialog you can create an instance data block of the single-instance or multiple-instance type for the function block in which the data of the inserted element will be saved. You will find the new instance data block created in the project tree in the "Program resources" folder under "Program blocks > System blocks". If you have selected "multi-instance", these are located in the block interface in the "Static" section. Or: 1. Select the point in the network at which you want to insert the element. 2. Open the "Instructions" task card. 3. Double-click on the element you want to insert. If the element is an internal system function block (FB), the "Call option" dialog opens. In this dialog you can create an instance data block of the single-instance or multiple-instance type for the function block in which the data of the inserted element will be saved. You will find the new instance data block created in the project tree in the "Program resources" folder under "Program blocks > System blocks". If you have selected "multi-instance", these are located in the block interface in the "Static" section.
Result
The selected LAD element is inserted with placeholders for the parameters.
Procedure
To insert an LAD element into a network using an empty box, follow these steps: 1. Open the "Instructions" task card. 2. Navigate to "General > Empty box" in the "Basic instructions" palette. 3. Use a drag-and-drop operation to move the "Empty box" element to the desired place in the network.
843
Result
The empty box is changed to the respective LAD element. Placeholders are inserted for the parameters.
Selecting the data type of a LAD element Selecting a data type Introduction
Some instructions can be executed with several different data types. If one of these instructions is used in the program, a valid data type must be specified for the instruction at the specific point in the program. Data types for the inputs and outputs must be explicitly selected for some instructions. Note The valid data type (BOOL) for the tags on the enable input ENO and the enable output ENO is predefined by the system and cannot be changed. The valid data types for an instruction are listed in the instruction drop-down list. You specify the data type of the instruction by selecting an entry from the drop-down list. If the data type of a specified tag differs from the data type of the instruction, the tag name will be displayed in red and a rollout with the corresponding error message will appear.
See also
Defining the data type of an instruction (Page 845)
844
See also
Selecting a data type (Page 844)
845
Procedure
To add SCL instructions to the Favorites, follow these steps: 1. Open the "Instructions" task card. 2. Maximize the "Basic instructions" pane. 3. Navigate in the "Basic instructions" pane to the instruction that you want to add to the Favorites. 4. Drag-and-drop the instruction into the "Favorites" pane or into the Favorites area in the program editor. Note To additionally display the Favorites in the program editor, click the "Display favorites in the editor" button in the program editor toolbar.
See also
Removing LAD elements from Favorites (Page 847) Overview of the program editor (Page 796)
846
Procedure
To insert an instruction into a program using Favorites, follow these steps: 1. Drag-and-drop the desired instruction from Favorites to the desired position. Or: 1. Select the position in the program where you want to insert the instruction. 2. In the Favorites, click on the instruction you want to insert. Note To additionally display the Favorites in the program editor, click the "Display favorites in the editor" button in the program editor toolbar.
See also
Removing LAD elements from Favorites (Page 847) Overview of the program editor (Page 796)
Procedure
To remove instructions from Favorites, follow these steps: 1. Right-click on the instruction you want to remove. 2. Select the "Remove instruction" command in the shortcut menu. Note To additionally display the Favorites in the program editor, click the "Display favorites in the editor" button in the program editor toolbar.
See also
Adding LAD elements to Favorites (Page 846) Inserting LAD elements using favorites (Page 846) Overview of the program editor (Page 796)
847
Insert block calls in LAD Inserting block calls using a drag-and-drop operation
You can insert calls for existing functions (FC) and function blocks (FB) using a drag-and-drop operation from the project tree. If you call function blocks from other function blocks, you can either call them as single-instance or multi-instance blocks. If a function block is called as single instance, it will store its data in a data block of its own. If a function block is called as multiinstance, it will store its data in the instance data block of the calling function block.
Requirement
A network is available. The block that is to be called is available.
Result
The function or the function block is inserted with its parameters. You can then assign the parameters. See also: Auto-Hotspot Note If when calling a function block you specify an instance data block that does not exist, it will be created. If you have called a function block as a multi-instance, this will be entered as a static tag in the interface.
848
See also
Updating block calls in LAD (Page 849) Correcting the call type (Page 850) Single instances (Page 643) Multi-instances (Page 644)
849
See also
Inserting block calls using a drag-and-drop operation (Page 848) Correcting the call type (Page 850)
Requirement
The user program contains a block call.
Procedure
To change the call type of a function block, follow these steps: 1. Open the code block and select the block call. 2. Select the "Change call type" command in the shortcut menu. The "Call options" dialog opens. 3. Click the "Single instance" or "Multi instance" button. If you select the "Single instance" call type, enter a name for the data block that will be assigned to the function block. If you select "Multi-instance" as the call type, enter the name of the tag in the "Name in the interface" text block with which the called function block will be entered as a static tag in the interface of the calling block. 4. Confirm your entries with "OK". Note The previous single and multiple instances will not be deleted automatically.
See also
Inserting block calls using a drag-and-drop operation (Page 848) Updating block calls in LAD (Page 849)
850
Procedure
Proceed as follows to use the "Calculate" instruction: 1. Open the "Instructions" task card. 2. Navigate to "Math functions > CALCULATE" in the "Basic instructions" pane. 3. Use drag-and-drop to move the element to the desired place in the network. The instruction "Calculate" will be inserted for the data type with a placeholder expression and question mark. 4. Enter the data type for the calculation. 5. Enter the operands for the calculation. Note The calculation is run with the inputs of the "Calculate" instruction. If you want to use constants you must also insert appropriate inputs for them. 6. Click on the "Edit 'Calculate' instruction" button to replace the placeholder expression with the correct expression. The "Edit 'Calculate' instruction" dialog will open. 7. Enter the required expression in the "OUT:= " text box. Note In the "Example" area you can find an example of a valid expression and possible instructions that you can use. To determine a value with the help of Pythagoras' theorem, for example, enter "OUT := SQRT (SQR (IN1) + SQR (IN2))". 8. Confirm your entry with "OK".
See also
CALCULATE: Calculate (Page 1197)
851
Using free-form comments Basic information on using free-form comments in LAD Introduction
Free-form comments allow you to add comments to the source code for graphic programming languages similar to line comments for textual languages. Free-form comments can be used for the following elements: Boxes Coils
See also
Inserting free-form comments (Page 852) Editing free-form comments (Page 853) Deleting free-form comments (Page 854)
Procedure
To insert a free-form comment, proceed as follows: 1. Right-click on the instruction for which you want to insert a free-form comment. 2. Select the "Insert comment" command in the shortcut menu. A comment box with a standard comment opens. The comment box is connected by an arrow to the corresponding instruction. 3. Enter the required comment in the comment box.
See also
Basic information on using free-form comments in LAD (Page 852) Editing free-form comments (Page 853) Deleting free-form comments (Page 854)
852
853
See also
Basic information on using free-form comments in LAD (Page 852) Inserting free-form comments (Page 852) Deleting free-form comments (Page 854)
See also
Basic information on using free-form comments in LAD (Page 852) Inserting free-form comments (Page 852) Editing free-form comments (Page 853)
Requirement
LAD elements are available
854
See also
Copying LAD elements (Page 855) Cutting LAD elements (Page 856) Pasting an LAD element from the clipboard (Page 856) Replacing LAD elements (Page 857) Inserting additional inputs and outputs in LAD elements (Page 858) Removing inputs and outputs (Page 859) Deleting LAD elements (Page 860)
Procedure
To copy a LAD element, follow these steps: 1. Right-click the LAD element that you want to copy. 2. Select "Copy" in the shortcut menu.
Result
The LAD element will be copied and saved to the clipboard.
855
See also
Selecting LAD elements (Page 854) Cutting LAD elements (Page 856) Pasting an LAD element from the clipboard (Page 856) Replacing LAD elements (Page 857) Inserting additional inputs and outputs in LAD elements (Page 858) Removing inputs and outputs (Page 859) Deleting LAD elements (Page 860)
Cutting
To cut a LAD element, follow these steps: 1. Right-click the LAD element that you want to cut. 2. Select "Cut" in the shortcut menu.
Result
The LAD element will be cut and saved to the clipboard.
See also
Selecting LAD elements (Page 854) Copying LAD elements (Page 855) Pasting an LAD element from the clipboard (Page 856) Replacing LAD elements (Page 857) Inserting additional inputs and outputs in LAD elements (Page 858) Removing inputs and outputs (Page 859) Deleting LAD elements (Page 860)
856
Procedure
To paste an LAD element from the clipboard, follow these steps: 1. Copy a LAD element or cut a LAD element. 2. Right-click the point in the network where you want to paste the element. 3. Select "Paste" in the shortcut menu.
See also
Selecting LAD elements (Page 854) Copying LAD elements (Page 855) Cutting LAD elements (Page 856) Replacing LAD elements (Page 857) Inserting additional inputs and outputs in LAD elements (Page 858) Removing inputs and outputs (Page 859) Deleting LAD elements (Page 860)
Requirements
A network with at least one LAD element is present.
Procedure
To replace an LAD element with another LAD element, follow these steps: 1. Select the LAD element that you want to replace. 2. Position the cursor over the triangle in the top right-hand corner of the LAD element. A drop-down list is displayed. 3. From the drop-down list, select the LAD element that you want to use to replace the existing LAD element.
857
See also
Selecting LAD elements (Page 854) Copying LAD elements (Page 855) Cutting LAD elements (Page 856) Pasting an LAD element from the clipboard (Page 856) Inserting additional inputs and outputs in LAD elements (Page 858) Removing inputs and outputs (Page 859) Deleting LAD elements (Page 860)
Requirement
An LAD element is available that permits the insertion of additional inputs and outputs.
858
See also
Selecting LAD elements (Page 854) Copying LAD elements (Page 855) Cutting LAD elements (Page 856) Pasting an LAD element from the clipboard (Page 856) Replacing LAD elements (Page 857) Removing inputs and outputs (Page 859) Deleting LAD elements (Page 860)
Requirement
An LAD element is available to which you have added additional inputs and outputs.
Remove input
To remove an input, follow these steps: 1. Select the input that you want to remove. 2. Select the "Delete" command in the shortcut menu. The input of the LAD element is removed.
Remove output
To remove an output, follow these steps: 1. Select the output that you want to remove. 2. Select the "Delete" command in the shortcut menu. The output of the LAD element will be removed.
859
See also
Selecting LAD elements (Page 854) Copying LAD elements (Page 855) Cutting LAD elements (Page 856) Pasting an LAD element from the clipboard (Page 856) Replacing LAD elements (Page 857) Inserting additional inputs and outputs in LAD elements (Page 858) Deleting LAD elements (Page 860)
Procedure
To delete a LAD element, follow these steps: 1. Right-click the LAD element that you want to delete. 2. Select the "Delete" command in the shortcut menu.
See also
Selecting LAD elements (Page 854) Copying LAD elements (Page 855) Cutting LAD elements (Page 856) Pasting an LAD element from the clipboard (Page 856) Replacing LAD elements (Page 857) Inserting additional inputs and outputs in LAD elements (Page 858) Removing inputs and outputs (Page 859)
860
Requirement
An LAD element is available.
Procedure
To connect the parameters of a LAD element, follow these steps: 1. Double-click the placeholder of the parameter. An entry field opens, and the placeholder is selected. 2. Enter the appropriate parameter. Note If you enter the absolute address of a parameter that has already been defined, this absolute address will be changed to the symbolic name of the parameter as soon as the input is confirmed. If you have not yet defined the parameter, a new tag with this absolute address and the default name "Tag_<n>" will be entered in the PLC tag table. When you confirm your input, the absolute address will be replaced with the symbolic name "Tag_<n>". 3. Confirm the parameter with the Enter key. 4. If you have not yet defined the parameter, you can define it directly in the program editor using the shortcut menu. See also: Declaring PLC tags in the program editor (Page 766) Declaring local tags in the program editor (Page 813) Or drag from it the PLC tag table: 1. In the project tree, select the "PLC tags" folder or open the PLC tag table. 2. If you have opened the PLC tag table, drag the symbol from the first column of the desired tag to the appropriate place in your program. If you have not opened the PLC tag table yet, open the detail view now. Drag the desired tag from the detail view to the appropriate place in your program. Or drag from it the block interface: 1. Open the block interface. 2. Drag the required operand from the block interface to the instruction window.
861
Result
If the syntax is error-free, the displayed parameter is black. The editor then jumps to the next placeholder. If there is an error in the syntax, the cursor stays in the entry field and a corresponding error message is displayed in the status line. If you press the Enter key again, the entry field is closed and the faulty entry is displayed in red italics.
See also
Using libraries (Page 233)
862
863
MOTOR carries signal 1, if one of the following conditions is fulfilled: Signal 1 is pending on S2 or S4 Signal 0 is pending on S5.
See also
Rules for branches in LAD (Page 865) Inserting branches into the LAD network (Page 865) Closing branches in the LAD network (Page 866) Deleting branches in LAD networks (Page 866)
864
See also
Basic information on branches in LAD (Page 864) Inserting branches into the LAD network (Page 865) Deleting branches in LAD networks (Page 866) Closing branches in the LAD network (Page 866)
Requirement
A network is available. The network contains elements.
Procedure
To insert a new branch in a network, follow these steps: 1. Open the "Instructions" task card. 2. Navigate to "General > Open branches" in the "Simple instructions" palette. 3. Use drag-and-drop to move the element to the desired place in the network. If you want to connect the new branch directly to the power rail, drag the element to the power rail.
865
See also
Basic information on branches in LAD (Page 864) Rules for branches in LAD (Page 865) Deleting branches in LAD networks (Page 866)
Requirement
A branch is available.
Procedure
To close an open branch, follow these steps: 1. Select the open branch. 2. Press and hold down the left mouse button. A dashed line will appear as soon as the cursor is moved. 3. Drag the dashed line to a suitable place on the network. Permissible connections are indicated by green lines. 4. Release the left mouse button.
See also
Basic information on branches in LAD (Page 864) Rules for branches in LAD (Page 865)
Procedure
To delete a branch, follow these steps: 1. Select the connection line that links the branch to the main branch. 2. Select the "Delete" command in the shortcut menu.
866
See also
Basic information on branches in LAD (Page 864) Rules for branches in LAD (Page 865) Inserting branches into the LAD network (Page 865)
"TagOut" receives signal 1, if the following two conditions are met: "TagIn_1" or "TagIn_3" has signal 1 "TagIn_2" or "TagIn_4" has signal 0
Inserting crossings
You can insert crossings in a LAD network by creating connections between the main branch and an additional branch or between different branches.
Requirements
A branch is available.
Procedure
To insert a new crossing in an LAD network, follow these steps: 1. Open the "Instructions" task card. 2. Navigate to "General > Open branches" in the "Simple instructions" palette. 3. Drag the element behind the existing branch. 4. Insert any element into the open branch. 5. Click the arrow of the open branch after the inserted element.
867
See also
Rearranging crossings (Page 868) Deleting crossings (Page 868) Inserting branches into the LAD network (Page 865)
Procedure
To rearrange a connection, follow these steps: 1. Select the connection line that defines the crossings in the respective branches. 2. Select the "Delete" command in the shortcut menu. 3. Open the "Instructions" task card. 4. Navigate to "General > Open branches" in the "Simple instructions" palette. 5. Use a drag-and-drop operation to move the element to the place in the network where you want to insert the new crossing. 6. Click on the arrow for the open branch. 7. Hold down the left mouse button and drag the dashed connecting line to the subsidiary branch in which you wish to insert the new crossing. 8. Release the left mouse button.
See also
Inserting crossings (Page 867) Deleting crossings (Page 868)
868
Procedure
To delete a crossing, follow these steps: 1. Select the connection line that defines the crossings in the respective branches. 2. Select the "Delete" command in the shortcut menu.
See also
Inserting crossings (Page 867) Rearranging crossings (Page 868)
Rules
Remember the following rules when using several rungs: Connections are not permitted between rungs. Only one jump instruction is permissible per network. The positioning rules for jump instructions remain valid.
Running rungs
Rungs and networks are executed from top to bottom and from left to right. This means that the first instruction in the first rung of the first network is processed first. All instructions of this
869
See also
Insert rung (Page 870) Deleting a rung (Page 870)
Procedure
To insert a new rung in a network, proceed as follows: 1. Insert any coil on the power rail. A new rung will be inserted and the coil positioned at the end of the rung. 2. Insert additional instructions in the new rung.
See also
Basic information on rungs in LAD (Page 869) Deleting a rung (Page 870)
870
Procedure
To delete a rung, proceed as follows: 1. Hold down the left mouse button and draw a frame around the rung. At the same time, make sure that you select all instructions. Alternatively, you can hold down the <Shift> key and select the first the last instruction of the rung. 2. Right-click on one of the instructions in the rung. 3. Select the "Delete" command in the shortcut menu.
See also
Basic information on rungs in LAD (Page 869) Insert rung (Page 870)
Creating FBD programs Basic information on FBD FBD programming language Overview of the Function Block Diagram (FBD) programming language
FBD is a graphical programming language. The representation is based on electronic circuit systems. The program is mapped in one or more networks. A network contains one or more logic operation paths. The binary signal scans are linked by boxes. The representation of the logic is based on the graphical logic symbols used in Boolean algebra.
871
Binary functions
You can use binary functions to query binary operands and to combine their signal states. The following operations are examples of binary functions: "AND operation", "OR operation" and "EXCLUSIVE OR operation".
Standard boxes:
You can use standard boxes to control binary operands, perform RLO edge detection or execute jump functions in the program. Standard boxes generally have only one single input.
872
Complex boxes
Complex boxes represent program elements with complex functions. The empty box is an exception. You can use the empty box as a placeholder in which you can select the required instruction. The following types of boxes are available to you in an FBD program: Complex boxes without EN/ENO mechanism: A box is executed independent of the signal state at the box inputs. The error status of the processing cannot be queried. Boxes with EN/ENO mechanism: A box is only executed if the enabling input "EN" carries the signal state "1". If the box is processed correctly, the "ENO" enable output has signal state "1". If an error occurs during processing, the "ENO" output is reset. If the EN enable input is not interconnected, the box is always executed. Calls of code block are also shown in the network as complex boxes with EN/ENO mechanism.
Maximum height
873
See also
Changing the settings (Page 874)
Result
The change will be loaded directly, there is no need to save it explicitly.
See also
Overview of the settings for FBD (Page 873)
See also
Entering the network title (Page 878) Entering a network comment (Page 879) Navigating networks (Page 880)
874
Procedure
To insert a new network, follow these steps: 1. Select the network after which you want to insert a new network. 2. Select the "Insert network" command in the shortcut menu.
Result
A new empty network is inserted into the block.
See also
Entering the network title (Page 878) Entering a network comment (Page 879) Navigating networks (Page 880)
Selecting a network
To select a network, follow these steps: 1. Click the title bar of the network that you want to select.
875
See also
Inserting networks (Page 874) Entering the network title (Page 878) Entering a network comment (Page 879) Navigating networks (Page 880)
Requirements
A network is available.
Procedure
To copy and paste a network, follow these steps: 1. Select the network or networks to be copied. 2. Select "Copy" in the shortcut menu. 3. Select the network after which you want to paste in the copied network. 4. Select "Paste" in the shortcut menu.
See also
Inserting networks (Page 874) Selecting networks (Page 875) Entering the network title (Page 878) Entering a network comment (Page 879) Navigating networks (Page 880)
876
Procedure
To delete a network, follow these steps: 1. Select the network that you want to delete. 2. Select the "Delete" command in the shortcut menu.
See also
Inserting networks (Page 874) Selecting networks (Page 875) Copying and pasting networks (Page 876) Entering the network title (Page 878) Entering a network comment (Page 879) Navigating networks (Page 880)
877
See also
Inserting networks (Page 874) Selecting networks (Page 875) Copying and pasting networks (Page 876) Deleting networks (Page 876) Entering the network title (Page 878) Entering a network comment (Page 879) Navigating networks (Page 880)
Requirement
A network is available.
Procedure
To enter a network title, follow these steps: 1. Click on the title bar of the network. 2. Enter the network title.
878
See also
Using networks (Page 874) Inserting networks (Page 874) Selecting networks (Page 875) Copying and pasting networks (Page 876) Deleting networks (Page 876) Expanding and collapsing networks (Page 877) Entering a network comment (Page 879) Navigating networks (Page 880)
Requirement
A network is available.
Procedure
To enter a network comment, follow these steps: 1. Click on the right arrow before the network title. 2. If the comment area is not visible, click "Network comments on/off" in the toolbar. The comment area is displayed. 3. Click "Comment" in the comment area. The "Comment" text passage is selected. 4. Enter the network comment.
879
See also
Using networks (Page 874) Inserting networks (Page 874) Selecting networks (Page 875) Copying and pasting networks (Page 876) Deleting networks (Page 876) Expanding and collapsing networks (Page 877) Entering the network title (Page 878) Navigating networks (Page 880)
Navigating networks
You can navigate straight to a specific position within a block.
Procedure
To navigate to a specific position within a block, follow these steps: 1. Right-click on the white area of the programming window. 2. Select the "Go to > Network/line" command in the shortcut menu. The "Go to" dialog will open. 3. Enter the network to which you want to navigate. 4. Enter the line number of the network to which you want to navigate. 5. Confirm your entry with "OK".
Result
The relevant line will be displayed if this is possible. If the network or line requested does not exist, the last existing network or the last existing line in the network requested will be displayed.
See also
Using networks (Page 874) Inserting networks (Page 874) Selecting networks (Page 875) Copying and pasting networks (Page 876) Deleting networks (Page 876) Expanding and collapsing networks (Page 877) Entering the network title (Page 878) Entering a network comment (Page 879)
880
Inserting FBD elements Rules for the use of FBD elements Rules
Note the following rules when inserting FBD elements: An FBD network can consist of several elements. All elements of a logic path must be linked to each other according to IEC 61131-3. Standard boxes (flip flops, counters, timers, math operations, etc.) can be added as output to boxes with binary logic operations (for example AND, OR). Comparison boxes are excluded from this rule. Only Boolean inputs in an instruction can be combined with preceding logic operations. Only the bottom Boolean output in an instruction can be combined with an additional logic operation. Enable input "EN" and enable output "ENO" can be connected to boxes, but this is not mandatory. Constants (e.g. TRUE or FALSE) cannot be assigned to binary logic operations. Instead of this, use tags of the BOOL data type. Only one jump instruction can be inserted in each network. Only one jump label can be inserted in each network. Instructions for positive or negative RLO edge detection may not be arranged right at the left of the network as this requires a prior logic operation.
881
882
Procedure
To insert FBD elements into a network using the "Instructions" task card, follow these steps: 1. Open the "Instructions" task card. 2. Navigate to the FBD element that you want to insert. 3. Use drag-and-drop to move the element to the desired place in the network. If the element is an internal system function block (FB), the "Call options" dialog opens. In this dialog you can create an instance data block of the single-instance or multiple-instance type for the function block in which the data of the inserted element will be saved. You will find the new instance data block created in the project tree in the "Program resources" folder under "Program blocks > System blocks". If you have selected "multi-instance", these are located in the block interface in the "Static" section. Or: 1. Select the point in the network at which you want to insert the element. 2. Open the "Instructions" task card. 3. Double-click on the element you want to insert. If the element is an internal system function block (FB), the "Call options" dialog opens. In this dialog you can create an instance data block of the single-instance or multiple-instance type for the function block in which the data of the inserted element will be saved. You will find the new instance data block created in the project tree in the "Program resources" folder under "Program blocks > System blocks". If you have selected "multi-instance", these are located in the block interface in the "Static" section.
Result
The selected FBD element is inserted with dummy entries for the parameters.
See also
Rules for the use of FBD elements (Page 881)
Procedure
To insert FBD elements into a network using an empty box, follow these steps: 1. Open the "Instructions" task card. 2. Navigate to "General > Empty box" in the "Basic instructions" palette. 3. Use a drag-and-drop operation to move the "Empty box" element to the desired place in the network.
883
Result
The empty box is changed to the respective FBD element. Placeholders are inserted for the parameters.
Selecting the data type of an FBD element Selecting a data type Introduction
Some instructions can be executed with several different data types. If one of these instructions is used in the program, a valid data type must be specified for the instruction at the specific point in the program. Data types for the inputs and outputs must be explicitly selected for some instructions. Note The valid data type (BOOL) for the tags on the enable input ENO and the enable output ENO is predefined by the system and cannot be changed. The valid data types for an instruction are listed in the instruction drop-down list. You specify the data type of the instruction by selecting an entry from the drop-down list. If the data type of a specified tag differs from the data type of the instruction, the tag name will be displayed in red and a rollout with the corresponding error message will appear.
884
Procedure
To add SCL instructions to the Favorites, follow these steps: 1. Open the "Instructions" task card. 2. Maximize the "Basic instructions" pane.
885
See also
Removing FBD elements from Favorites (Page 887) Overview of the program editor (Page 796)
Procedure
To insert an instruction into a program using Favorites, follow these steps: 1. Drag-and-drop the desired instruction from Favorites to the desired position. Or: 1. Select the position in the program where you want to insert the instruction. 2. In the Favorites, click on the instruction you want to insert. Note To additionally display the Favorites in the program editor, click the "Display favorites in the editor" button in the program editor toolbar.
See also
Overview of the program editor (Page 796) Removing FBD elements from Favorites (Page 887)
886
Procedure
To remove instructions from Favorites, follow these steps: 1. Right-click on the instruction you want to remove. 2. Select the "Remove instruction" command in the shortcut menu. Note To additionally display the Favorites in the program editor, click the "Display favorites in the editor" button in the program editor toolbar.
See also
Adding FBD elements to Favorites (Page 885) Inserting FBD elements using favorites (Page 886) Overview of the program editor (Page 796)
Inserting block calls in FBD Inserting block calls using a drag-and-drop operation
You can insert calls for existing functions (FC) and function blocks (FB) using a drag-and-drop operation from the project tree. If you call function blocks from other function blocks, you can either call them as single-instance or multi-instance blocks. If a function block is called as single instance, it will store its data in a data block of its own. If a function block is called as multiinstance, it will store its data in the instance data block of the calling function block.
Requirement
A network is available. The block that is to be called is available.
887
Result
The function or the function block is inserted with its parameters. You can then assign the parameters. See also: Auto-Hotspot Note If when calling a function block you specify an instance data block that does not exist, it will be created. If you have called a function block as a multi-instance, this will be entered as a static tag in the interface.
See also
Updating block calls in FBD (Page 888) Correcting the call type (Page 889) Single instances (Page 643) Multi-instances (Page 644)
888
See also
Inserting block calls using a drag-and-drop operation (Page 887) Correcting the call type (Page 889)
889
Requirement
The user program contains a block call.
Procedure
To change the call type of a function block, follow these steps: 1. Open the code block and select the block call. 2. Select the "Change call type" command in the shortcut menu. The "Call options" dialog opens. 3. Click the "Single instance" or "Multi instance" button. If you select the "Single instance" call type, enter a name for the data block that will be assigned to the function block. If you select "Multi-instance" as the call type, enter the name of the tag in the "Name in the interface" text block with which the called function block will be entered as a static tag in the interface of the calling block. 4. Confirm your entries with "OK". Note The previous single and multiple instances will not be deleted automatically.
See also
Inserting block calls using a drag-and-drop operation (Page 887) Updating block calls in FBD (Page 888)
Procedure
Proceed as follows to use the "Calculate" instruction: 1. Open the "Instructions" task card. 2. Navigate to "Math functions > CALCULATE" in the "Basic instructions" pane.
890
See also
CALCULATE: Calculate (Page 1358)
Using free-form comments Basic information on using free comments in FBD Introduction
Free-form comments allow you to add comments to the source code for graphic programming languages similar to line comments for textual languages. Free-form comments can be used for all non-binary boxes.
See also
Inserting free-form comments (Page 892) Editing free-form comments (Page 892) Deleting free-form comments (Page 893)
891
Procedure
To insert a free-form comment, proceed as follows: 1. Right-click on the instruction for which you want to insert a free-form comment. 2. Select the "Insert comment" command in the shortcut menu. A comment box with a standard comment opens. The comment box is connected by an arrow to the corresponding instruction. 3. Enter the required comment in the comment box.
See also
Basic information on using free comments in FBD (Page 891) Editing free-form comments (Page 892) Deleting free-form comments (Page 893)
892
See also
Basic information on using free comments in FBD (Page 891) Inserting free-form comments (Page 892) Deleting free-form comments (Page 893)
See also
Basic information on using free comments in FBD (Page 891) Inserting free-form comments (Page 892) Editing free-form comments (Page 892)
893
Requirement
FBD elements are available
See also
Copying FBD elements (Page 894) Cutting FBD elements (Page 895) Pasting an FBD element from the clipboard (Page 896) Replacing FBD elements (Page 896) Adding additional inputs and outputs to FBD elements (Page 897) Removing instruction inputs and outputs (Page 898) Deleting FBD elements (Page 899)
894
Procedure
To copy an FBD element, follow these steps: 1. Right-click the FBD element that you want to copy. 2. Select "Copy" in the shortcut menu.
Result
The FBD element will be copied and saved to the clipboard.
See also
Selecting FBD elements (Page 894) Cutting FBD elements (Page 895) Pasting an FBD element from the clipboard (Page 896) Replacing FBD elements (Page 896) Adding additional inputs and outputs to FBD elements (Page 897) Removing instruction inputs and outputs (Page 898) Deleting FBD elements (Page 899)
Cutting
To cut an FBD element, follow these steps: 1. Right-click the FBD element that you want to cut. 2. Select "Cut" in the shortcut menu.
Result
The FBD element will be cut and saved to the clipboard.
895
See also
Selecting FBD elements (Page 894) Copying FBD elements (Page 894) Pasting an FBD element from the clipboard (Page 896) Replacing FBD elements (Page 896) Adding additional inputs and outputs to FBD elements (Page 897) Removing instruction inputs and outputs (Page 898) Deleting FBD elements (Page 899)
Procedure
To paste an FBD element from the clipboard, follow these steps: 1. Copy an FBD element or cut an FBD element. 2. Right-click the point in the network where you want to paste the element. 3. Select "Paste" in the shortcut menu.
See also
Selecting FBD elements (Page 894) Copying FBD elements (Page 894) Cutting FBD elements (Page 895) Replacing FBD elements (Page 896) Adding additional inputs and outputs to FBD elements (Page 897) Removing instruction inputs and outputs (Page 898) Deleting FBD elements (Page 899)
896
Requirements
A network with at least one FBD element is present.
Procedure
To replace an FBD element with another FBD element, follow these steps: 1. Select the FBD element that you want to replace. If elements compatible with the selected FBD element are available, a triangle will appear in the upper right-hand corner of the element. 2. Position the cursor above the triangle of the FBD element. A drop-down list is displayed. 3. From the drop-down list, select the FBD element that you want to use to replace the existing FBD element.
See also
Selecting FBD elements (Page 894) Copying FBD elements (Page 894) Cutting FBD elements (Page 895) Pasting an FBD element from the clipboard (Page 896) Adding additional inputs and outputs to FBD elements (Page 897) Removing instruction inputs and outputs (Page 898) Deleting FBD elements (Page 899)
Requirements
An FBD element is available that permits the insertion of additional inputs and outputs.
897
See also
Selecting FBD elements (Page 894) Copying FBD elements (Page 894) Cutting FBD elements (Page 895) Pasting an FBD element from the clipboard (Page 896) Replacing FBD elements (Page 896) Removing instruction inputs and outputs (Page 898) Deleting FBD elements (Page 899)
Requirement
An FBD element is available, which you have expanded with additional inputs or outputs.
898
Remove input
To remove an input, follow these steps: 1. Select the input that you want to remove. 2. Select the "Delete" command in the shortcut menu. The input of the FBD element is removed.
Remove output
To remove an output, follow these steps: 1. Select the output that you want to remove. 2. Select the "Delete" command in the shortcut menu. The output of the FBD element will be removed.
See also
Selecting FBD elements (Page 894) Copying FBD elements (Page 894) Cutting FBD elements (Page 895) Pasting an FBD element from the clipboard (Page 896) Replacing FBD elements (Page 896) Adding additional inputs and outputs to FBD elements (Page 897) Deleting FBD elements (Page 899)
Procedure
To delete an FBD element, follow these steps: 1. Right-click the FBD element that you want to delete. 2. Select the "Delete" command in the shortcut menu.
899
See also
Selecting FBD elements (Page 894) Copying FBD elements (Page 894) Cutting FBD elements (Page 895) Pasting an FBD element from the clipboard (Page 896) Replacing FBD elements (Page 896) Adding additional inputs and outputs to FBD elements (Page 897) Removing instruction inputs and outputs (Page 898)
Requirement
An FBD element is available.
Procedure
To connect the parameters of an FBD element, follow these steps: 1. Click the placeholder of the parameter. An input field is opened. 2. Enter the corresponding parameters, for example a PLC tag, a local tag or a constant. Note If you enter the absolute address of a parameter that has already been defined, this absolute address will be changed to the symbolic name of the parameter as soon as the input is confirmed. If you have not yet defined the parameter, a new tag with this absolute address and the default name "Tag_1" will be entered in the PLC tag table. When you confirm your input, the absolute address will be replaced with the symbolic name "Tag_1".
900
Result
If the syntax is error-free, the displayed parameter is black. If there is an error in the syntax, the cursor stays in the input field and a corresponding error message is displayed in the inspector window in the "Info > Syntax" register.
901
See also
Using libraries (Page 233)
902
See also
Rules for branches in FBD (Page 903) Inserting branches in FBD networks (Page 904) Deleting branches in FBD networks (Page 904)
903
See also
Basic information on branches in FBD (Page 903) Inserting branches in FBD networks (Page 904) Deleting branches in FBD networks (Page 904)
Procedure
To insert a new branch in a network, follow these steps: 1. Open the "Instructions" task card. 2. Navigate to "General > Branch" in the "Basic instructions" palette. 3. Drag the element from the "Elements" pane to the a required location on a connection line between two boxes.
See also
Rules for branches in FBD (Page 903) Basic information on branches in FBD (Page 903) Deleting branches in FBD networks (Page 904)
Procedure
To delete a branch, follow these steps: 1. Select the connection line that links the branch to the main branch. 2. Select the "Delete" command in the shortcut menu.
Result
The branch is now deleted. Boxes connected to the deleted branch are placed freely within the network.
904
See also
Rules for branches in FBD (Page 903) Basic information on branches in FBD (Page 903) Inserting branches in FBD networks (Page 904)
Logic paths in FBD Basic information on logic paths in FBD Use of logic paths
The user program will be mapped in one or more networks. The networks can contain one or more logic paths on which the binary signals are arranged in the form of boxes. The following figure shows an example of the use of several logic paths within a network:
Rules
Remember the following rules when using logic paths: Connections are not permitted between logic paths. Only one jump instruction is permissible per network. The positioning rules for jump instructions remain valid.
905
See also
Inserting a logic path (Page 906) Deleting a logic operation path (Page 906)
Procedure
To insert a new logic path in a network, follow these steps: 1. Insert any instruction in a network in such a way that it has no connection to existing instructions. A new logic path is inserted. 2. Insert an assignment at the end of the new logic path. 3. Insert additional instructions in the new logic path.
See also
Basic information on logic paths in FBD (Page 905) Deleting a logic operation path (Page 906)
906
Procedure
To delete a logic path, proceed as follows: 1. Hold down the left mouse button and draw a frame around the logic path. At the same time, make sure that you select all instructions of the logic path. Alternatively, you can hold down the <Shift> key and select the first the last instruction of the logic path. 2. Right-click on one of the instructions in the logic path. 3. Select the "Delete" command in the shortcut menu.
See also
Basic information on logic paths in FBD (Page 905) Inserting a logic path (Page 906)
Creating SCL programs Basics of SCL Programming language SCL Programming language SCL
SCL (Structured Control Language) is a high-level programming language based on PASCAL. The language is based on DIN EN 61131-3 (international IEC 1131-3). The standard standardizes programming languages for programmable logic controllers. The SCL programming language fulfills the PLCopen Basis Level of ST language (Structured Text) defined in this standard.
Language elements
SCL also contains higher programming languages in addition to the typical elements of the PLC, such as inputs, outputs, timers or memory bits. Expressions Value assignments Operators
Program control
SCL provides convenient instructions for controlling the program allowing you, for example, to create program branches, loops or jumps.
907
Application
SCL is therefore particularly suitable for the following areas of application: Data management Process optimization Recipe management Mathematical / statistical tasks
Expressions Description
Expressions are calculated during the runtime of the program and return a value. An expression consists of operands (such as constants, tags or function calls) and optionally out of operators (such as *, /, + or -). Expressions can be linked together or nested within each other by operators.
Evaluation order
The evaluation of the expression occurs in a specific order that is defined by the following factors: Priority of the operators involved Left-to-right order Brackets
Types of expressions
The following expression types are available depending on the operator: Arithmetic expressions Arithmetic expressions consist of either a numerical value or combine two values or expressions with arithmetic operators. Relational expressions Relational expressions compare the values of two operands and yield a Boolean value. The result is TRUE if the comparison is true, and FALSE if it is not met. Logical expressions Logical expressions combine two operands with logical operators (AND, OR, XOR) or negating operands (NOT).
908
See also
Operators and operator precedence (Page 913) Arithmetic expressions (Page 909) Relational expressions (Page 911) Logical expressions (Page 912)
909
Example
The following example shows an arithmetic expression:
SCL "MyTag1":= "MyTag2" * "MyTag3";
See also
Expressions (Page 908)
910
911
Example
The following example shows a relational expression:
SCL IF a > b THEN c:= a; IF A > 20 AND B < 20 THEN C:= TRUE; IF A<>(B AND C) THEN C:= FALSE;
Note The comparison for STRING and DT are executed internally in the S7-300/400 by extended instructions. The following operands are not permitted for these functions: Parameter of a FC In-out parameter of an FB of type STRUCT or ARRAY
See also
Expressions (Page 908)
OR logic operation OR
912
Example
The following example shows a logical expression:
SCL IF "MyTag1" AND NOT "MyTag2" THEN c:=a; MyTag:=ALPHA OR BETA;
See also
Expressions (Page 908)
913
See also
Expressions (Page 908)
914
Examples
The following table shows examples for value assignments:
SCL "MyTag1" := "MyTag2"; "MyTag1" := "MyTag2" * "MyTag3"; "MyTag" := "MyFC"(); #MyStruct.MyStructElement := "MyTag"; #MyArray[2] := "MyTag"; "MyTag" := #MyArray[1,4]; #MyString[2] := #MyOtherString[5]; (* Assignment of a tag*) (* Assignment of an expression*) (* Call a function, which assigns its return value to the "MyTag" tag*) (* Assignment of a tag to a structure element*) (* Assignment of a tag to an ARRAY element*) (* Assignment of an ARRAY element to a tag*) (* Assignment of a STRING element to another STRING element*)
Editor settings
Group View Setting Keyword highlighting Description Notation used to represent the keywords of the programming language. You can choose between uppercase and lowercase letters or a notation corresponding to the conventions of the Pascal programming language.
915
See also
Changing the settings (Page 916)
Result
The change will be loaded directly, there is no need to save it explicitly.
See also
Overview of the settings for SCL (Page 915)
916
Sidebar Line numbers Outline view Code area Display of the absolute operands
See also
Using bookmarks (Page 920) Customizing the programming window (Page 917) Indenting and outdenting lines (Page 919) Expanding and collapsing sections of code (Page 919)
917
918
See also
Using bookmarks (Page 920) Overview of the programming window (Page 916) Indenting and outdenting lines (Page 919) Expanding and collapsing sections of code (Page 919)
Procedure
To indent or outdent individual lines, follow these steps: 1. Press the "Indent text", "Outdent text" button into the toolbar of the programming editor. Note You can set the width of the indent in "Options > Settings".
See also
Using bookmarks (Page 920) Overview of the programming window (Page 916) Customizing the programming window (Page 917) Expanding and collapsing sections of code (Page 919)
919
Procedure
To expand or collapse the code section, follow these steps: 1. Click the minus sign in the outline view. The code section closes. 2. Click the plus sign in the outline view. The code section opens.
See also
Using bookmarks (Page 920) Overview of the programming window (Page 916) Customizing the programming window (Page 917) Indenting and outdenting lines (Page 919)
See also
Setting bookmarks (Page 920) Navigating between bookmarks (Page 921) Deleting bookmarks (Page 922)
920
Procedure
To set a bookmark, follow these steps: 1. Click on the desired line in the sidebar. 2. Select the "Bookmarks > Set" command in the shortcut menu. Or: 1. Click on the desired line in the sidebar. 2. Click the "Set/delete bookmark" button in the toolbar. Or: 1. Hold down the <Ctrl> key. 2. Click on the line in the sidebar in which you want to place the bookmark.
Result
A bookmark is placed in the program code.
See also
Basics of bookmarks (Page 920) Navigating between bookmarks (Page 921) Deleting bookmarks (Page 922)
Procedure
To navigate between bookmarks, follow these steps: 1. Set the insertion cursor in the program code. 2. In the "Edit" menu, select the "Go to > Next bookmark" or "Go to > Previous bookmark" command. Or: 1. Set the insertion cursor in the program code. 2. In the toolbar of the programming editor, click the "Go to next bookmark", "Go to previous bookmark" button. Or:
921
Result
The line with the bookmark is highlighted.
See also
Basics of bookmarks (Page 920) Setting bookmarks (Page 920) Deleting bookmarks (Page 922)
Deleting bookmarks
You can delete individual bookmarks or all bookmarks from the block or the CPU.
922
See also
Basics of bookmarks (Page 920) Setting bookmarks (Page 920) Navigating between bookmarks (Page 921)
Rules
You need to observe the following rules when entering SCL instructions: Instructions can span several lines. Each instruction ends with a semicolon (;). No distinction is made between upper and lower case. Comments serve only for documentation of the program. They do not affect the program execution.
Examples
The following examples shows the various types of instructions:
SCL // Example of a value assignment "MyTag":= 0 ; // Example of a block call "MyD"B."MyFB" (ParamInput:= 10) ;
923
See also
Basics of SCL (Page 907)
Procedure
To enter SCL instructions, follow these steps: 1. Enter the syntax of the instruction using the keyboard. You are supported by the auto-complete function when performing this task. It offers all the instructions and operands that are allowed at the current location. 2. Select the required instruction or the desired operand from the auto-complete function. If you select an instruction that requires specification of operands, placeholders for the operands are inserted into the program. The placeholders for the operands are highlighted in yellow. The first placeholder is selected. 3. Replace this placeholder with an operand. 4. Use the <TAB> key to navigate to all other placeholders and replace them with operands. Note You can also drag-and-drop a defined operand from the PLC tag table or from the block interface into the program.
Result
The instruction is inserted. The programming editor performs a syntax check. Incorrect entries are displayed in red and italics. In addition, you also receive a detailed error message in the inspector window.
924
Requirement
An SCL block is open.
Procedure
To insert SCL instructions into a program using the "Instructions" task card, follow these steps: 1. Open the "Instructions" task card. 2. To insert the instruction, select one of the following steps: Navigate to the SCL instruction you want to insert and drag-and-drop it to the required line in the program code. The insertion location is highlighted by a green rectangle. Select the location in the program code where you want to insert the instruction and then double-click on the instruction you want to insert. The instruction is inserted in the program. The placeholders for the operands are highlighted in yellow. The first placeholder is selected. 3. Replace this placeholder with an operand. You can also drag a tag from the interface or the PLC tag table with drag-and-drop to the placeholder. 4. Use the <TAB> key to navigate to all other placeholders and replace them with operands.
Result
The instruction is inserted. The programming editor performs a syntax check. Incorrect entries are displayed in red and italics. In addition, you also receive a detailed error message in the inspector window.
Defining the data type of an SCL instruction Basic information on the data types of SCL instructions Introduction
The SCL instructions that you employ for block programming use specific data types to calculate function values. Certain SCL instructions only support the use of a specific data type. You cannot change the data type for these instructions. However, most of the SCL instructions
925
See also
Changing the data type of an SCL instruction (Page 926) Example for changing the data type of an SCL instruction (Page 927)
926
See also
Basic information on the data types of SCL instructions (Page 925) Example for changing the data type of an SCL instruction (Page 927)
Example for changing the data type of an SCL instruction Changing the default data type of instruction "Decode (DECO)"
Data type DINT is set as default if you insert the "Decode" instruction in the program. "Tag_Result" := DECO(IN := "Tag_Value"); Modify the program code as follows to convert the data type from DINT to BYTE: "Tag_Result" := DECO_BYTE(IN := "Tag_Value");
See also
Basic information on the data types of SCL instructions (Page 925) Changing the data type of an SCL instruction (Page 926)
Procedure
To add SCL instructions to the Favorites, follow these steps: 1. Open the "Instructions" task card. 2. Maximize the "Basic instructions" pane. 3. Navigate in the "Basic instructions" pane to the instruction that you want to add to the Favorites. 4. Drag-and-drop the instruction into the "Favorites" pane or into the Favorites area in the program editor.
927
Note To additionally display the Favorites in the program editor, click the "Display favorites in the editor" button in the program editor toolbar.
See also
Inserting SCL instructions using Favorites (Page 928) Removing SCL instructions from the Favorites (Page 929)
Procedure
To insert an instruction into a program using Favorites, follow these steps: 1. Drag-and-drop the desired instruction from Favorites to the desired position. Or: 1. Select the position in the program where you want to insert the instruction. 2. In the Favorites, click on the instruction you want to insert. Note To additionally display the Favorites in the program editor, click the "Display favorites in the editor" button in the program editor toolbar.
See also
Adding SCL instructions to the Favorites (Page 927) Removing SCL instructions from the Favorites (Page 929)
928
Procedure
To remove instructions from Favorites, follow these steps: 1. Right-click on the instruction you want to remove. 2. Select the "Remove instruction" command in the shortcut menu. Note To additionally display the Favorites in the program editor, click the "Display favorites in the editor" button in the program editor toolbar.
See also
Adding SCL instructions to the Favorites (Page 927) Inserting SCL instructions using Favorites (Page 928)
Insert block calls in SCL Basic information on the block call in SCL Calling function blocks Syntax of a call
The following syntax is used to call a function block as a single or multi-instance: <DB name> (Parameter list) //Call as a single instance <#Instance name> (Parameter list) // Call as multi-instance
929
Parameter list
If you call another code block from a SCL block, you can supply the formal parameters of the called block with actual parameters. The specification of the parameters has the form of a value assignment. This value assignment enables you to assign values (actual parameters) to the parameters you have defined in the called block. The formal parameters of the called code block are listed in brackets directly after the call. Input and in-out parameters have the assignment identifier ":=", output parameters have the assignment identifier "=>". A placeholder placed after the parameter shows the required data type and the type of the parameter.
See also
Manually inserting block calls (Page 934) Inserting block calls with drag-and-drop (Page 935) Examples for calling a function block in SCL (Page 932)
930
Return value
The call options of functions depend on whether the function returns a return value to the calling block. The return value is defined at the RET_VAL parameter. If the RET_VAL parameter is of the VOID data type, then the function will not return a value to the calling block. If the RET_VAL parameter has another data type, then the function returns a return value of this data type. All data types are permitted in SCL for the RET_VAL parameter except ANY, ARRAY and STRUCT as well as the parameter types TIMER and COUNTER.
Call options
There are two possibilities for calling functions in SCL: Standard call for functions with and without a return value With a standard call, the results of the function is made available as an output and in-out parameter. Call in an expression for functions with a return value Functions that return a return value can be used in any expression in place of an operand, for example, in a value assignment. The function calculates the return value, which has the same name as the function and returns it to the calling block. There the value replaces the function call. After the call, the results of the function will be available as return value or as an output and in-out parameter.
Parameter list
If you call another code block from a SCL block, you need to supply the formal parameters of the called block with actual parameters. The specification of the parameters has the form of a value assignment. This value assignment enables you to assign values (actual parameters) to the parameters you have defined in the called block. The formal parameters of the called code block are listed in brackets directly after the call. Input and in-out parameters have the assignment identifier ":=", output parameters have the assignment identifier "=>". A gray placeholder placed after the parameter shows the required data type and the type of the parameter.
931
See also
Manually inserting block calls (Page 934) Inserting block calls with drag-and-drop (Page 935) Examples for calling functions in SCL (Page 933)
Result
After the call is executed, the value determined for the "MyInout" in-out parameter is made available in Tag1 in the "MyDB" data block.
Calling as a multi-instance
The following example shows the call of an FB as a multi-instance:
SCL // Call as a multi-instance "MyFB" (MyInput:= 10, MyInout:= "Tag1") ;
Result
After the "MyFB" block is executed, the value determined for the "MyInout" in-out parameter is made available in "Tag1" in the data block of the calling code block.
932
See also
Calling function blocks (Page 929) Manually inserting block calls (Page 934) Inserting block calls with drag-and-drop (Page 935)
Result
After the "MyFC" block is executed, the value determined for the "MyInOut" in-out parameter is made available in "Tag1" in the "MyFB_DB". The "Tag1" operand must be further processed in the calling block.
Result
The return value will be transferred from "MyFC" to "MyOperand".
933
Result
The return value of "MyFC" will be added to "Tag2" and the result will be transferred to "MyOperand".
See also
Calling functions (Page 930) Manually inserting block calls (Page 934) Inserting block calls with drag-and-drop (Page 935)
934
Result
The block call is inserted. If you specify an instance data block that does not exist when calling a function block, it is created.
See also
Updating block calls (Page 936) Basic information on the block call in SCL (Page 929)
Requirement
The function to be called (FC) or the function block (FB) to be called is present.
935
Result
The block call is inserted. If you specify an instance data block that does not exist when calling a function block, it is created.
See also
Updating block calls (Page 936) Basic information on the block call in SCL (Page 929)
936
See also
Manually inserting block calls (Page 934) Inserting block calls with drag-and-drop (Page 935)
937
Example
The following code contains comment sections and line comments
(************************************************************************************* A description of the instructions that follow can be placed here **************************************************************************************) IF "MyVal1" > 0 THEN //No division by 0 "MyReal" := "MyVal2" (* input value *) / "MyVal1" (* measured value *); END_IF; //Data type conversion "MyInt" := REAL_TO_INT("MyReal");
938
Requirement
An SCL block is open.
Cutting an instruction
To cut an instruction, follow these steps: 1. Select the instruction you want to cut. 2. Select the "Cut" command in the shortcut menu.
939
Procedure
To delete an instruction, follow these steps: 1. Select the instruction you want to delete. 2. Select the "Delete" command in the shortcut menu.
Eliminating syntax errors in the program Basic information on syntax errors Syntax errors
Below are some examples of syntax errors: Missing separators or the use of too many separators Incorrect keyword spelling Incorrect jump label spelling/notation Notation which does not match the mnemonic set (e.g. "I 2.3" instead of "E 2.3") The use of key words as operands
See also
Finding syntax errors in the program (Page 941)
940
See also
Basic information on syntax errors (Page 940)
Changing the programming language Rules for changing the programming language Rules
Observe the following rules if you want to change the programming language for a block: You can only change between the programming languages LAD, FBD and STL. You cannot switch blocks programmed in the programming languages SCL or GRAPH. In GRAPH blocks, however, you can change between LAD and FBD as network languages. If the language of individual networks of the block cannot be changed, these networks will be displayed in their original language. You can only change the programming language of entire blocks. The programming language cannot be changed for individual networks. However, you can create networks within a block using another programming language and then copy them into the desired block.
941
See also
Rules for changing the programming language (Page 941)
942
See also
GetError: Get error locally (Page 1431) GetErrorID: Get error ID locally (Page 1435) GetError: Get error locally (Page 1269) GetErrorID: Get error ID locally (Page 1273)
943
See also
GetError: Get error locally (Page 1431) GetErrorID: Get error ID locally (Page 1273) GetErrorID: Get error ID locally (Page 1435) GetError: Get error locally (Page 1269)
944
See also
GetError: Get error locally (Page 1431) GetErrorID: Get error ID locally (Page 1273) GetErrorID: Get error ID locally (Page 1435) GetError: Get error locally (Page 1269)
Requirement
The block is open. Die "Instructions" task card is open.
945
Procedure
To enable local error handling for a block, proceed as follows: 1. Navigate to the "Basic instructions" pane of the "Instructions" task card. 2. Open the "Program Control" folder. 3. Drag the instruction "Get error locally" (GetError) or "Get error ID locally" (GetErrorID) to the required network.
Result
Local error handling is enabled for the open block. In the Inspector window under "Properties > Attributes", the "Handle errors within block" check box is selected. This setting cannot be edited in the Inspector window. The local error handling can be disabled by deleting the inserted instructions to the local error handling.
See also
GetError: Get error locally (Page 1431) GetErrorID: Get error ID locally (Page 1273) GetErrorID: Get error ID locally (Page 1435) GetError: Get error locally (Page 1269)
9.1.4.3
946
Access modes
There are two different modes of accessing data values in data blocks: Data blocks with optimized access (only S7-1200) Data blocks with optimized access have no fixed defined structure. The declaration elements contain only one symbolic name in the declaration, no fixed addressing within the block. You access the data values in these block via symbolic names. Data blocks with standard access (all CPU families) Data blocks with standard access have a fixed structure. The declaration elements contain both a symbolic name in the declaration and a fixed address within the block. You can access the data values in these blocks via symbolic names or the address.
See also
Creating data blocks (Page 779)
947
Structure of the declaration table for data blocks Structure of the declaration table for data blocks
The figure below shows the structure of the declaration table for data blocks. The display will vary depending on type of block and type of access.
948
See also
Creating data blocks (Page 779) Basic information on start values (Page 955)
Procedure
To create a data block, follow these steps: 1. Double-click the "Add new block" command. The "Add new block" dialog box opens. 2. Click the "Data block (DB)" button. 3. Select the type of the data block. You have the following options available to you: To create a global data block, select the list entry "Global DB". To create an instance data block, select the function block to which you want to assign the instance data block from the list. The list contains only the function blocks that were previously created for the CPU. To create a data block based on a PLC data type, select the PLC data type from the list. The list contains only the PLC data types that were previously created for the CPU. To create a data block based on a system data type, select the system data type from the list. The list contains only those system data types that have already been inserted to program blocks in the CPU. 4. Enter a name for the data block.
949
Result
The new data block is created. You can find the data block in the project tree in the "Program blocks" folder.
See also
Instance data blocks (Page 639) Global data blocks (DB) (Page 638) Overview of block properties (Page 787)
950
See also
Changing the properties of tags in instance data blocks (Page 960)
Creating a data structure for global data blocks Declaring tags of elementary data type Requirement
A global data block is open. Note You cannot change the structure of instance data blocks and of data blocks based on a PLC data type directly, since the structures of these blocks are defined by the respective function block or the PLC data type. The type of the data block is entered in the block properties.
951
Procedure
To declare a tag of the elementary data type, follow these steps: 1. Enter a tag name in the "Name" column. 2. In the "Data type" column, click the button for the data type selection. A list of the permissible data types is opened. 3. Select the desired data type. 4. Optional: Change the properties of the tags that are displayed in the other columns. 5. Repeat steps 1 to 4 for all tags that are to be declared.
See also
Displaying and editing block properties (Page 791) Declaring tags of the ARRAY data type (Page 952) Declaring tags of STRUCT data type (Page 953) Keyboard shortcuts in tables (Page 167)
Procedure
To declare a tag of the ARRAY data type, follow these steps: 1. Enter a tag name in the "Name" column. 2. Enter the "Array" data type in the "Data type" column. You will be supported by autocompletion in this step. The "Array" dialog opens. 3. In the "Data type" text box, specify the data type of the array elements. 4. In the "ARRAY limits" text box, specify the high and low limit for each dimension. Example of a one-dimensional ARRAY: [0..3] Example of a three-dimensional ARRAY: [0..3, 0..15, 0..33] 5. Confirm your entry. 6. Optional: Change the properties of the tags that are displayed in the other columns.
952
Procedure
To declare a tag of the STRUCT data type, follow these steps: 1. Enter a tag name in the "Name" column. 2. Enter "Struct" in the "Data type" column. You will be supported by autocompletion during input. An empty, indented row is inserted after the new tag. 3. Insert the first structural element in the first empty row. An additional empty row is inserted after the element. 4. Select a data type for the structure element. 5. Optional: Change the properties of the structural element that is displayed in the other columns of the block interface. 6. Repeat the step 4 to 7 for all additional structure elements. It is not necessary to end the structure explicitly. The structure ends with the last element that is entered. 7. To insert a new tag after the structure, leave a blank row after the end of the structure and then start the new tag in the second empty row.
Result
The tag of STRUCT data type is created.
953
See also
STRUCT (Page 699)
Procedure
To declare a tag based on a PLC data type, follow these steps: 1. Enter a tag name in the "Name" column. 2. Enter the PLC data type in the "Data type" column. You will be supported by autocompletion during input. 3. Optional: Change the properties of the tags that are displayed in the other columns of the table.
Result
The tag is created.
See also
Layout of the block interface (Page 808)
Overlaying tags
To overlay a tag with a new data type, follow these steps: 1. Open a global data block. 2. Select the tag that you want to overlay with a new data type. 3. Click "Add row" in the toolbar. A row is inserted after the tag to be overlaid.
954
Removing overlay
To remove the overlay of a tag, follow these steps: 1. Select the overlaid tag that you want to remove. 2. Select the "Delete" command in the shortcut menu. The overlay is removed.
See also
Overlaying tags with AT (Page 667)
955
See also
Define start values (Page 956) Structure of the declaration table for data blocks (Page 948) Declaring local tags in the block interface (Page 812) Apply monitor values as start values (Page 966)
See also
Basic information on start values (Page 955) Apply monitor values as start values (Page 966)
956
See also
Setting retentivity in an instance data block (Page 957) Setting retentivity in a global data block (Page 958)
957
See also
Basics of block access (Page 640) Retentivity of tags in data blocks (Page 957)
958
See also
Basics of block access (Page 640) Retentivity of tags in data blocks (Page 957)
Editing the properties of tags in data blocks Properties of the tags in data blocks Properties
The following table provides an overview of the properties of tags in data blocks:
Group General Property Name Data type Default value Description Name of the tags. Data type of the tags. Default value of the tag in the interface of a higher-level code block or in a PLC data type. The values contained in the "Default value" column can only be changed in the higher-level code block or PLC data type. The values are only displayed in the data block. Start value Value that the tag should assume at CPU startup. The default values defined in a code block are used as start values during the creation of the data block. You can then replace these adopted values with instance-specific start values. Specification of an start value is optional. If you do not specify any value, the tag assumes the default value at startup. If a default is not defined either, the default value valid for the data type is used. For example, the value "FALSE" is specified as standard for BOOL. Comment Comment on the tag.
959
See also
Changing the properties of tags in instance data blocks (Page 960) Changing the properties of tags in global data blocks (Page 961)
Changing the properties of tags in instance data blocks Instance-specific tag properties
Two options are available for defining the tag properties: The tag properties are applied from the interface of the assigned function block. Properties that are applied from the function block are displayed grayed out out in the columns of the declaration table. The "Name" and "Data type" properties are always applied. You define instance-specific properties. You can change some properties instance specific. Changeable values are, for example, "Comment" or "Visible in HMI". Properties that were changed instance specific are not grayed out in the columns of the declaration table. The instance-specific changes are retained, even if the interface of the higher-level function block is changed and the instance data blocks are subsequently updated.
960
See also
Updating data blocks (Page 950) Properties of the tags in data blocks (Page 959)
961
See also
Properties of the tags in data blocks (Page 959)
Editing the declaration table for data blocks Inserting table rows Procedure
Proceed as follows to insert a row above the selected row: 1. Select the row in front of which you want to insert a new row. 2. Click the "Insert row" button on the toolbar of the table.
Result
A new row is inserted above the selected row.
See also
Keyboard shortcuts in tables (Page 167)
962
Result
A new empty row will be inserted below the selected row.
See also
Keyboard shortcuts in tables (Page 167)
Procedure
To delete a tag, follow these steps: 1. Select the row with the tag to be deleted. You can also select several rows by clicking on them one after the other while holding down the <Ctrl> key or by pressing and holding down <Shift> and clicking on the first and last row. 2. Select the "Delete" command in the shortcut menu. Note You cannot directly change the structure of instance data blocks and of global data blocks based on a PLC data type, since the structures of these blocks are defined in the higher-level object. The type of the data block is entered in the block properties. See also: Displaying and editing block properties (Page 791)
See also
Keyboard shortcuts in tables (Page 167)
963
Requirement
The table is open. Sufficient declaration rows are available.
Procedure
To automatically fill in successive cells, follow these steps: 1. Select the cells to be loaded. 2. Click the "Fill" symbol in the bottom right corner of the cell. The mouse pointer is transformed into a crosshair. 3. Keep the mouse button pressed and drag the mouse pointer downwards over the cells that you want to fill in automatically. 4. Release the mouse button. The cells are filled in automatically. 5. If entries are already present in the cells that are to be automatically filled in, a dialog appears. In this dialog you can indicate whether you want to overwrite the existing entries or insert new rows for the new tags.
Procedure
To show or hide table columns, follow these steps: 1. Click a column header. 2. In the shortcut menu, select the "Show/hide columns" command. The selection of available columns is displayed. 3. To show a column, select the column's check box. 4. To hide a column, clear the column's check box.
964
Requirement
The data block and an external editor are opened.
Procedure
To export and re-import individual tags by drag-and-drop operation, follow these steps: 1. Select one or more tags. 2. Select "Copy" in the shortcut menu. 3. Switch to the external editor and paste the copied tags. 4. Edit the tags as required. 5. Copy the tags in the external editor. 6. Switch back to the declaration table. 7. Select "Paste" in the shortcut menu.
Monitoring data values online Monitoring data values in data blocks online
You can monitor the current data values of the tags in the CPU directly in the declaration table.
Requirement
An online connection is available. The data block has been loaded to the CPU. The program execution is active (CPU in "RUN"). The data block is open.
Procedure
To monitor the data values, proceed as follows: 1. Start monitoring by clicking the "Monitor all" button. The additional "Monitor value" column is displayed in the table. This shows the current data values. See also: Structure of the declaration table for data blocks (Page 948) 2. End the monitoring by clicking the "Monitor all" button again.
965
Requirement
An online connection to the CPU is available. The data block has been loaded to the CPU. The program execution is active (CPU in "RUN"). The global data block is open.
Procedure
To apply the data values as start values, follow these steps: 1. Start monitoring by clicking the "Monitor all" button. The "Monitor value" column is displayed in the table. This shows the current data values. 2. On the toolbar, click "Snapshot of monitored values". The latest monitored values will be applied in the "Snapshot" column. 3. End the monitoring by clicking the "Monitor all" button again. 4. Select a value in the "Snapshot" column. 5. Select "Copy" in the shortcut menu. 6. Select a value in the "Start value" column. 7. Select "Paste" in the shortcut menu. 8. Compile and reload the block.
Result
The values are applied as start values. The tags apply the new values at the next startup.
See also
Basic information on start values (Page 955) Define start values (Page 956)
966
Requirement
A data block was loaded from the device.
Procedure
To display the current values, follow these steps: 1. Open the data block. 2. Click a column header. 3. In the shortcut menu, select the "Show/hide columns" command. The selection of available columns is displayed. 4. Select the check box in the "Snapshot" column.
Result
The current values will be applied in the "Snapshot" column. Note If you subsequently change the structure of the data block, the display of the current values gets lost. The "Snapshot" column will then be empty.
9.1.4.4
967
See also
Creating PLC data types (Page 969)
Structure of the declaration table for PLC data types Structure of the declaration table for PLC data types
The figure below shows the structure of the declaration table for PLC data types.
See also
Creating PLC data types (Page 969) Show and hide table columns (Page 977)
968
Procedure
To create a PLC data type, proceed as follows: 1. In the "PLC data types" folder, click the "Add new data type" command. A new declaration table for creating a PLC data type will be created and opened. 2. Select the PLC data type and select the "Rename" command in the shortcut menu. 3. Enter the name of the PLC data type.
Result
The new PLC data type is created. You can find the PLC data type in the project tree in the "PLC data types" folder.
See also
Structure of the declaration table for PLC data types (Page 968) Basics of PLC data types (Page 967)
Procedure
To delete a PLC data type, follow these steps: 1. In the project tree, open the "PLC data types" folder. 2. Select the PLC data type to be deleted. You can also select several PLC data types by clicking on them one after the other while holding down the <Ctrl> key or by pressing and holding down <Shift> and clicking on the first and last data type. 3. Select the "Delete" command in the shortcut menu.
969
Note If you delete a PLC data type, the blocks that use the data type will become inconsistent. These inconsistencies are marked in red in the block used. To remedy these inconsistencies, the data blocks have to be updated. See also: Updating the block interface (Page 819) Updating data blocks (Page 950)
Programming the structure of PLC data types Declaring tags of elementary data type Requirement
A PLC data type is open.
Procedure
To declare a tag, follow these steps: 1. Enter a tag name in the "Name" column. 2. Enter the required data type in the "Data type" column. You will be supported by autocompletion during input. 3. Optional: Change the properties of the tags that are displayed in the other columns. 4. Repeat steps 1 to 3 for all tags that are to be declared.
See also
Keyboard shortcuts in tables (Page 167)
970
Procedure
To declare a tag of the ARRAY data type, follow these steps: 1. Enter a tag name in the "Name" column. 2. Enter the "Array" data type in the "Data type" column. You will be supported by autocompletion in this step. The "Array" dialog opens. 3. In the "Data type" text box, specify the data type of the array elements. 4. In the "ARRAY limits" text box, specify the high and low limit for each dimension. Example of a one-dimensional ARRAY: [0..3] Example of a three-dimensional ARRAY: [0..3, 0..15, 0..33] 5. Confirm your entry. 6. Optional: Change the properties of the tags that are displayed in the other columns. Note You cannot define specific default values for ARRAY elements. You can, however, assign them start values at the usage point in the data block.
See also
Structure of the declaration table for PLC data types (Page 968)
Procedure
To declare a tag of the STRUCT data type, follow these steps: 1. Enter a tag name in the "Name" column. 2. Enter "Struct" in the "Data type" column. You will be supported by autocompletion during input. An empty, indented row is inserted after the new tag. 3. Insert the first structural element in the first empty row. An additional empty row is inserted after the element. 4. Select a data type for the structure element. 5. Optional: Change the properties of the structural element that is displayed in the other columns.
971
Result
The tag of STRUCT data type is created.
See also
STRUCT (Page 699) Structure of the declaration table for PLC data types (Page 968)
Procedure
To declare a tag based on a different PLC data type, follow these steps: 1. Enter a tag name in the "Name" column. 2. Enter the PLC data type in the "Data type" column. You will be supported by autocompletion during input.
Result
The tag is created. Note You define the default values of tags within a PLC data type when the PLC data type is created. You cannot change these values at the point of use of the PLC data type.
See also
Basics of PLC data types (Page 967) Structure of the declaration table for PLC data types (Page 968)
972
Overlaying tags
To overlay a tag with a new data type, follow these steps: 1. Open the PLC data type. 2. Select the tag that you want to overlay with a new data type. 3. Click "Add row" in the toolbar. A row is inserted after the tag to be overlaid. 4. Enter a tag name in the "Name" column. 5. Enter the "AT" entry in the "Data type" column. You will be supported by Autocomplete in this step. The following is added to the entry in the "Name" column. "AT<Name of the higher-level tag>" 6. Click the data type selection button again and select the data type for the new tag. The tag is created. It points to the same data as the higher-level tag, however interprets this data with the new data type.
Removing overlay
To remove the overlay of a tag, follow these steps: 1. Select the overlaid tag that you want to remove. 2. Select the "Delete" command in the shortcut menu. 3. The overlay is removed.
See also
Overlaying tags with AT (Page 667)
973
Editing tag properties in PLC data types Properties of tags in PLC data types Properties
The following table gives an overview of tag properties in PLC data types:
Group General Property Name Data type Default value Description Name of the tags. Data type of the tags. Default value of the tag in the interface of a higher-level code block or in a PLC data type. The values contained in the "Default value" column can only be changed in the higher-level code block or PLC data type. The values are only displayed in the data block. Start value Comment Attributes Retain Visible Can be set For test Interconnectable Not relevant in PLC data types Comment on the tag. Not relevant in PLC data types Indicates whether a parameter is visible in CFC. Indicates whether a parameter is configurable in CFC. Indicates whether a parameter is registered for the CFC test mode. Indicates whether a parameter is interconnectable in CFC.
See also
Changing the properties of tags in PLC data types (Page 974) Basics of PLC data types (Page 967) Structure of the declaration table for PLC data types (Page 968)
Changing the properties of tags in PLC data types Editing general properties in the declaration table
To edit the general properties of one or more tags, follow these steps: 1. Open the PLC data type. 2. Change the entries in the columns.
974
See also
Updating the block interface (Page 819) Updating data blocks (Page 950)
Editing the declaration table for PLC data types Inserting table rows Procedure
Proceed as follows to insert a row above the selected row: 1. Select the row in front of which you want to insert a new row. 2. Click the "Insert row" button on the toolbar of the table.
Result
A new row is inserted above the selected row.
Result
A new empty row will be inserted below the selected row.
975
See also
Updating the block interface (Page 819) Updating data blocks (Page 950)
Requirement
The table is open. Sufficient declaration rows are available.
Procedure
To automatically fill in successive cells, follow these steps: 1. Select the cells to be loaded. 2. Click the "Fill" symbol in the bottom right corner of the cell. The mouse pointer is transformed into a crosshair. 3. Keep the mouse button pressed and drag the mouse pointer downwards over the cells that you want to fill in automatically. 4. Release the mouse button. The cells are filled in automatically. 5. If entries are already present in the cells that are to be automatically filled in, a dialog appears. In this dialog you can indicate whether you want to overwrite the existing entries or insert new rows for the new tags.
976
Procedure
To show or hide table columns, follow these steps: 1. Click a column header. 2. In the shortcut menu, select the "Show/hide columns" command. The selection of available columns is displayed. 3. To show a column, select the column's check box. 4. To hide a column, clear the column's check box.
9.1.4.5
See also
Rules for programming external source files (Page 977) Saving blocks as external source files (Page 978) Inserting external source files (Page 979) Opening and editing external source files (Page 980) Generating blocks from external source files (Page 980)
977
Rules
The syntax of the instructions in external source files is very similar to that in the creation of user programs in the program editor with STL or SCL. Note, however, the following additional syntax rules: Block call When calling a block, transfer the parameters in the defined order in the ASCII editor. If you do not, the comment assignments for these lines may not match. Enter the parameters in brackets. The individual parameters are separated by a comma. Upper or lower case The program editor generally disregards upper or lower case. Jump labels are an exception to this. Character string entries are also case-sensitive ("STRING" data type). Keywords are displayed in upper case. For compilation purposes, however, case is disregarded; you can therefore specify keywords in upper or lower case or a mixture of the two. Semicolon Mark the end of every instruction and every tag declaration with a semicolon. You can enter several instructions per line. Forward slashes Begin every comment with two forward slashes (//) and end the comment with the <Enter> key.
See also
Basics of using external source files (Page 977) Saving blocks as external source files (Page 978) Inserting external source files (Page 979) Opening and editing external source files (Page 980) Generating blocks from external source files (Page 980)
978
Result
The block has been saved as an external source file. You can include this source file in a project in the TIA portal and use it to generate other blocks. Please note, however, that you can only use STL source files in S7-300/400 CPUs.
See also
Basics of using external source files (Page 977) Rules for programming external source files (Page 977) Inserting external source files (Page 979) Opening and editing external source files (Page 980) Generating blocks from external source files (Page 980)
Procedure
Follow these steps to insert an external source file: 1. Double-click on the "Add new external file" command. The "Open" dialog box is opened. 2. Navigate to and select existing external source files. 3. Confirm your selection with "Open".
Result
The new source file will be added to the "External source files" folder.
See also
Basics of using external source files (Page 977) Rules for programming external source files (Page 977) Saving blocks as external source files (Page 978) Opening and editing external source files (Page 980) Generating blocks from external source files (Page 980)
979
Linking files with the file name extensions "stl" and "scl" file types to an editor
Proceed as follows to link files with the file name extensions "stl" and "scl" to an editor: 1. Open Windows Explorer. 2. Right-click on an STL file. 3. Select "Properties" in the shortcut menu. The "Properties" dialog box opens. 4. Click "Change" in the "File type" area on the "General" tab. The "Open with" dialog box opens. 5. Select the text editor you want to link to the "stl" file type. 6. Confirm your selection with "OK". 7. Close the "Properties" dialog with "OK". 8. Repeat steps 2 to 7 with an SCL file.
See also
Basics of using external source files (Page 977) Rules for programming external source files (Page 977) Saving blocks as external source files (Page 978) Inserting external source files (Page 979) Generating blocks from external source files (Page 980)
980
Procedure
To generate blocks from an external source file, follow these steps: 1. Open the external source file from which you wish to generate blocks. 2. Select the "Generate blocks" command in the "Edit" menu. 3. A prompt will appear telling you any existing blocks will be overwritten. 4. Confirm the safety prompt with "Yes".
Result
The external source file blocks will be generated and inserted in the "Program blocks" folder in the project tree. In the event of errors, information about the errors which have occurred will be displayed in the inspector window. This information, however, relates to the external source file and not to the block generated.
See also
Basics of using external source files (Page 977) Rules for programming external source files (Page 977) Saving blocks as external source files (Page 978) Inserting external source files (Page 979) Opening and editing external source files (Page 980)
9.1.5
9.1.5.1
981
982
Note You cannot perform a detailed comparison for know-how protected blocks.
See also
Basics of project data comparison (Page 200) Comparison of code blocks (Page 983) Comparison of data blocks (Page 984) Comparing PLC tag tables and PCL data types (Page 985) Carrying out an online/offline comparison (Page 985) Carrying out offline/offline comparisons (Page 986)
983
See also
Introduction to comparing project data (Page 981) Comparison of data blocks (Page 984) Comparing PLC tag tables and PCL data types (Page 985) Carrying out an online/offline comparison (Page 985) Carrying out offline/offline comparisons (Page 986)
See also
Introduction to comparing project data (Page 981) Comparison of code blocks (Page 983) Comparing PLC tag tables and PCL data types (Page 985) Carrying out an online/offline comparison (Page 985) Carrying out offline/offline comparisons (Page 986)
984
See also
Introduction to comparing project data (Page 981) Comparison of code blocks (Page 983) Comparison of data blocks (Page 984) Carrying out an online/offline comparison (Page 985) Carrying out offline/offline comparisons (Page 986)
9.1.5.2
Requirement
The project tree is open.
Procedure
To perform an online-offline comparison, follow these steps: 1. Select a device in the project tree. 2. Select the "Compare > Offline/online" command in the shortcut menu. If you have already started a comparison of this type for the device selected and would like to replace this comparison with the new comparison, confirm the message which appears by clicking on "Yes". If you click on "No", the new comparison will be cancelled. If you have not yet established an online connection, the "Go online" dialog opens. If the online connection has already been defined, the comparison editor opens.
Result
All objects that exist online and offline are displayed. The symbols in the comparison editor and in the project tree show you the status of the objects. You can now define the actions you require for the objects or start detailed comparisons.
STEP 7 Basic V11.0 SP2 System Manual, 12/2011,
985
See also
Carrying out offline/offline comparisons (Page 986) Establishing and canceling an online connection (Page 2898)
9.1.5.3
Requirement
The project tree is open.
Comparing the blocks of two different devices from two different projects
To compare the blocks of two devices from different projects, follow these steps: 1. Select a device or the folder "Program blocks" in the project tree. 2. Select the "Compare > Offline/offline" command in the shortcut menu. If you have already started a comparison for this comparison type, a message is displayed. To replace the previous comparison with the new comparison, acknowledge the message shown with "Yes". The "Offline/offline comparison" dialog will open. If you click on "No", the new comparison will be cancelled. 3. Click on the "Device in another project" button. 4. Enter the project with which you wish to carry out the comparison or select it by clicking on the "Browse" button. The devices available in the project selected will be listed. 5. Select the device with which you wish to carry out the comparison. 6. Click "OK." The comparison editor will open and symbols will show the results of the offline-offline comparison.
986
See also
Carrying out an online/offline comparison (Page 985)
987
9.1.5.4
988
Not all columns are shown in the default setting. You can, however, show or hide the columns as required as in all table editors.
The following table shows the comparison results symbols for an offline/offline comparison:
989
See also
Carrying out an online/offline comparison (Page 985) Carrying out offline/offline comparisons (Page 986) Filtering the comparison editor view (Page 990) Updating the comparison results (Page 991)
990
Requirement
The comparison editor is open.
See also
Carrying out an online/offline comparison (Page 985) Carrying out offline/offline comparisons (Page 986) Overview of the comparison editor (Page 988) Updating the comparison results (Page 991)
991
Requirement
The comparison editor is open.
Procedure
To update the comparison results, follow these steps: 1. Click the "Refresh view" button in the toolbar. The comparison results are updated. Note Please note that the "Refresh view" button will not be available while the comparison editor is loading or synchronizing content.
See also
Carrying out an online/offline comparison (Page 985) Carrying out offline/offline comparisons (Page 986) Overview of the comparison editor (Page 988) Filtering the comparison editor view (Page 990)
Requirement
The comparison editor is open.
STEP 7 Basic V11.0 SP2 System Manual, 12/2011,
992
Procedure
To select an action for a non-identical object, follow these steps: 1. Click on the arrow button in the drop-down list in the "Action" column. 2. Select the action you want. The action set will be carried out for the object in question the next time synchronization is performed. If you have accidentally changed the action you had selected, you can undo the change before the next synchronization. The shortcut menu is only available for folders if the same actions have been set for all objects in those folders. 3. To restore the previous action selected, right-click on the object or folder. 4. Select the "Restore previous selection" command in the shortcut menu.
See also
Overview of the comparison editor (Page 988) Filtering the comparison editor view (Page 990) Updating the comparison results (Page 991) Synchronizing objects (Page 993)
Synchronizing objects
Synchronization executes the actions you have specified for non-identical objects.
Requirement
The comparison editor is open. The desired actions have been selected.
Procedure
To synchronize objects, follow these steps: 1. Click the "Execute actions" button in the toolbar.
Result
The actions you specified for the objects are performed.
See also
Overview of the comparison editor (Page 988) Filtering the comparison editor view (Page 990) Updating the comparison results (Page 991) Specifying actions (Page 992)
993
9.1.5.5
Result
One instance of the program editor will be opened for each version of the block compared and the two instances will be displayed side by side. Any differences will be highlighted in color in each version.
See also
Carrying out offline/offline comparisons (Page 986) Carrying out an online/offline comparison (Page 985) Representation of the detailed comparison (Page 995) Navigating in the detailed comparison (Page 997) Changing blocks during detailed comparison (Page 998) Updating comparison results (Page 999)
994
995
Example
The following figure shows an example of the detailed comparison for the LAD programming language:
996
See also
Carrying out an online/offline comparison (Page 985) Carrying out offline/offline comparisons (Page 986) Starting a detailed comparison (Page 994) Navigating in the detailed comparison (Page 997) Changing blocks during detailed comparison (Page 998) Updating comparison results (Page 999)
997
Switching off/on the synchronization of the vertical scrolling between the editors
The scrolling for both editors is synchronized to ensure that the corresponding networks are visible parallel to each other during vertical scrolling. You can switch this mode off and on. To do this, follow these steps: 1. To switch off synchronized scrolling, click the "Synchronize scrolling between editors" button in the toolbar. 2. To switch on synchronized scrolling again, click the "Synchronize scrolling between editors" button one more time in the toolbar.
See also
Carrying out an online/offline comparison (Page 985) Carrying out offline/offline comparisons (Page 986) Starting a detailed comparison (Page 994) Representation of the detailed comparison (Page 995) Changing blocks during detailed comparison (Page 998) Updating comparison results (Page 999)
998
See also
Carrying out an online/offline comparison (Page 985) Carrying out offline/offline comparisons (Page 986) Starting a detailed comparison (Page 994) Representation of the detailed comparison (Page 995) Navigating in the detailed comparison (Page 997) Updating comparison results (Page 999)
Requirement
You have run a detailed comparison.
Procedure
To update the comparison results, follow these steps: 1. Click "Update the comparison result" in the toolbar.
See also
Carrying out an online/offline comparison (Page 985) Carrying out offline/offline comparisons (Page 986) Starting a detailed comparison (Page 994) Representation of the detailed comparison (Page 995) Navigating in the detailed comparison (Page 997) Changing blocks during detailed comparison (Page 998)
999
9.1.6
9.1.6.1
Compilation methods
You can start compilation in the following windows or editors: Compiling blocks in the project tree Used to compile individual blocks or for the simultaneous compilation of all blocks in the "Program blocks" folder. Compiling blocks in the program editor This is intended for compilation of a single open block. Compiling blocks in the call or dependency structure Used to compile individual blocks. See also: Call structure (Page 1029), Dependency structure (Page 1035)
Compilation options
If you are compiling blocks in project tree, you have further options: Software Only the changed blocks are compiled. Software (compile all blocks) All blocks are compiled. This is recommended for the first compilation and after major revisions.
Consistency check
Changing the interfaces of blocks called or PLC data types used can result in inconsistencies between calling blocks and called blocks or between the PLC data types and the global data blocks which use these PLC data types.
1000
See also
Compiling blocks in the project tree (Page 1001) Compiling blocks in the program editor (Page 1002) Correcting compilation errors (Page 1003) Block time stamps (Page 789) Updating block calls in LAD (Page 849) Updating block calls in FBD (Page 888) Compiling project data (Page 193)
Requirements
The project tree is open.
1001
Result
The code for the blocks will be generated if the consistency check has been successful. Instance data blocks generated by the system which are no longer needed will be deleted. The message under "Info > Compilation" in the inspector window reports whether the compilation was successful.
See also
Basic information on compiling blocks (Page 1000) Compiling blocks in the program editor (Page 1002) Correcting compilation errors (Page 1003) Finding syntax errors in the program (Page 941)
Procedure
To compile a block in the program editor, follow these steps: 1. Right-click the white area underneath a network in the instruction window of the program editor. 2. Select the "Compile" command in the shortcut menu.
1002
Result
The code for the block is generated. Instance data blocks generated by the system which are no longer needed will be deleted. The message under "Info > Compilation" in the inspector window reports whether the compilation was successful.
See also
Basic information on compiling blocks (Page 1000) Compiling blocks in the project tree (Page 1001) Correcting compilation errors (Page 1003)
Procedure
To correct errors following compilation, follow these steps: 1. Open the error list in the Inspector window with "Info > Compile". 2. If there is one, click on the blue question mark next to the error text for information on remedying errors. 3. Double-click the error you want to correct. The corresponding error is highlighted. 4. Correct the error. 5. Restart compilation.
See also
Basic information on compiling blocks (Page 1000) Compiling blocks in the program editor (Page 1002) Compiling blocks in the project tree (Page 1001)
1003
9.1.6.2
Downloading blocks
Note S7-1200 Version 1.0 Please note the following: If you download a know-how-protected block to a device, no restore information is loaded along with it. This means that you cannot reopen a know-how-protected block if you upload it from the device. If you download an element of your project to the CPU, for example a program block, a data block or the hardware configuration, the CPU runs a cold restart the next time it changes to RUN mode. Apart from deleting the inputs, initializing the outputs and deleting the non-retentive memory, cold restart also deletes the retentive memory areas. All subsequent changes from STOP to RUN are warm restarts in which the retentive memory is not deleted.
1004
Downloading blocks to device Downloading blocks in the "RUN" operating mode to the device Basics on downloading blocks in the "RUN" operating mode
When you download modified blocks to the device, it is not always necessary to switch the device to the "STOP" operating mode. Prior to a download operation, the Engineering System checks whether the device must be stopped before downloading. The result of this check is displayed in the "Load preview" dialog. If it is necessary to change to the "STOP" operating mode, you cannot continue the download process until you have set the appropriate option. Note Actual parameters are not overwritten by a download process in the "RUN" operating mode. Changes to the actual parameters will not become effective until the next time you change the operating mode from "STOP" to "RUN". The following table shows the actions after which you can execute the download process in the "RUN" operating mode:
Action Downloading individual blocks Downloading all blocks Adding or deleting OBs Download in "RUN" operating mode possible Yes No No
1005
See also
Downloading blocks from program editor to device (Page 1006) Downloading blocks from the project tree to the device (Page 1007) Downloading blocks to an accessible device (Page 1009) Downloading project data to a device (Page 196)
Procedure
To download a block from the program editor to the device, follow these steps: 1. Right-click the white area underneath a network in the instruction window of the program editor. 2. Select the "Download to device" command in the shortcut menu. If you have not already established an online connection, the "Extended download to device" dialog will open. Set all the necessary parameters for the connection and click on "Load". You can also open the "Extended download to device" dialog via the "Online" menu. See also: Going online and going offline (Page 2898) If you have already defined an online connection, the project data will if necessary be compiled and the "Load preview" dialog will open. This dialog displays messages and proposes actions necessary for loading.
1006
Result
The code for the block will be downloaded to the device. If the changes affect additional blocks, these will be compiled and also downloaded to the device. Blocks that only exist in the device online will be deleted. Inconsistencies between the blocks in the user program are avoided by downloading all blocks affected and deleting the unnecessary blocks in the device. The messages under "Info > General" in the Inspector window show whether the downloading process was successful.
See also
Downloading blocks from the project tree to the device (Page 1007) Downloading blocks to an accessible device (Page 1009) Downloading project data to a device (Page 196) Downloading blocks in the "RUN" operating mode to the device (Page 1005)
Downloading one or more blocks from the project tree to the device
To download one block or multiple blocks to the device from the project tree, follow these steps: 1. Open the "Program blocks" folder in project tree. 2. Select the blocks you want to download.
1007
1008
Result
The code for the blocks is downloaded to the device. If the changes affect additional blocks, these will be compiled and also downloaded to the device. Blocks that only exist in the device online will be deleted. Inconsistencies between the blocks in the user program are avoided by downloading all blocks affected and deleting the unnecessary blocks in the device. The messages under "Info > General" in the Inspector window show whether the downloading process was successful.
See also
Downloading blocks from program editor to device (Page 1006) Downloading blocks to an accessible device (Page 1009) Downloading project data to a device (Page 196) Downloading blocks in the "RUN" operating mode to the device (Page 1005)
Procedure
To download blocks to an accessible device, follow these steps: 1. Open the "Program blocks" folder of the PLC in the project tree. 2. Select the blocks you want to download to the accessible devices.
1009
Result
The blocks selected will be downloaded to the accessible device. If the changes affect additional blocks, these will also be downloaded to the accessible node. Blocks that only exist in the device online will be deleted. Inconsistencies between the blocks in the user program are avoided by downloading all blocks affected and deleting the unnecessary blocks in the device. The messages under "Info > General" in the Inspector window show whether the downloading process was successful.
See also
Downloading blocks from program editor to device (Page 1006) Downloading blocks from the project tree to the device (Page 1007) Loading project data to an accessible device (Page 197) Downloading blocks in the "RUN" operating mode to the device (Page 1005)
1010
Procedure
To upload blocks from a device, follow these steps: 1. Establish an online connection with the device from which you want to download the blocks. See also: Establishing and terminating an online connection (Page 2898) 2. Select the "Program blocks" folder. 3. In the "Online" menu, select the "Upload from device" command. The "Upload preview" dialog box opens. This dialog displays messages and proposes actions necessary for loading. 4. Check the messages and, where necessary, enable the actions in the "Action" column. As soon as uploading becomes possible, the "Upload from device" button is enabled. 5. Click the "Upload from device" button. The load is executed.
Result
The blocks will be uploaded from the device to the project. You can edit them as normal, recompile them and download them to the device again.
See also
Uploading blocks from an accessible device (Page 1011)
Procedure
To upload blocks from an accessible device to your project, follow these steps: 1. In the project tree, drag the accessible device "Program blocks" folder to the "Program blocks" folder of the device in the project. The "Upload preview" dialog box will open. This dialog displays messages and proposes actions necessary for loading. If the device folder in the project already contains data, a message will inform you that this data will be replaced. 2. Check the messages and, where necessary, enable the actions in the "Action" column. 3. The "Upload from device" button will be enabled as soon as uploading becomes possible. 4. Click on the "Upload from device" button.
1011
Result
The blocks will be uploaded from the accessible devices to the project. You can edit them as normal and recompile and load them.
See also
Uploading blocks from device (Page 1010)
Uploading blocks from or downloading blocks to a memory card Downloading blocks to a memory card Requirement
The memory card is not marked as program card. The "Program blocks" folder of the memory card is open.
Procedure
To download blocks to a memory card, follow these steps: 1. Open the device "Program blocks" folder in the project tree. 2. Select the blocks you want to download to the memory card. 3. Drag the blocks in project tree to the "Program blocks" folder of the memory card. The "Load preview" dialog opens. This dialog displays messages and proposes actions necessary for loading. 4. Check the messages and, where necessary, enable the actions in the "Action" column. 5. As soon as downloading becomes possible, the "Load" button is enabled. 6. Click the "Load" button. The load is executed. The "Load results" dialog will then open. In this dialog, you can check whether or not loading was successful and take any further action that may be necessary. 7. Click "Finish".
Result
The block is downloaded to the memory card If the changes affect additional blocks, these will also be downloaded to the memory card. Blocks that exist only on the memory card are deleted. Inconsistencies between the blocks in the user program are avoided by downloading all affected blocks and the deleting of the non-required blocks on the memory card. The messages under "Info > General" in the Inspector window show whether the downloading process was successful.
1012
See also
Uploading blocks from a memory card (Page 1013) Accessing memory cards (Page 232)
Procedure
To upload blocks from a memory card to your project, follow these steps: 1. Select the blocks you want to upload in the "Program blocks" folder of the memory card in project tree. 2. Drag the blocks to the device "Program blocks" folder. The "Upload preview" dialog box will open. This dialog displays messages and proposes actions necessary for loading. 3. Check the messages and, where necessary, enable the actions in the "Action" column. The "Upload from device" button will be enabled as soon as uploading becomes possible. 4. Click on the "Upload from device" button.
See also
Downloading blocks to a memory card (Page 1012) Accessing memory cards (Page 232)
9.1.7
9.1.7.1
Protecting blocks
Protecting blocks
Introduction
You can use a password to protect one or more blocks of the OB, FB, FC type and global data blocks from unauthorized access. You can not manually protect instance data blocks; they depend on the know-how protection of the assigned FB. This means that when you create an instance data block for a know-how protected FB, the instance data block also receives this know-how protection. This is independent of whether you explicitly create the instance data block or if it is created by a block call.
1013
See also
Setting up and removing block copy protection (Page 1015) Setting up block know-how protection (Page 1016) Opening know-how protected blocks (Page 1017) Printing know-how protected blocks (Page 1017) Removing block know-how protection (Page 1019) Changing a password (Page 1019)
1014
9.1.7.2
Requirement
The block is not know-how protected.
1015
See also
Protecting blocks (Page 1013) Setting up block know-how protection (Page 1016) Opening know-how protected blocks (Page 1017) Printing know-how protected blocks (Page 1017) Removing block know-how protection (Page 1019) Changing a password (Page 1019)
9.1.7.3
Procedure
To set up block know-how protection, follow these steps: 1. Select the blocks with no know-how protection which you want to protect. 2. Select the command "Know-how protection" in the "Edit" menu. The "Know-how protection" dialog will open. 3. Click "Define". The "Define password" dialog box opens. 4. Enter a password in the "New" field. 5. Enter the same password in the "Confirm" field. 6. Confirm your entries with "OK". 7. Close the "Know-how protection" dialog by clicking on "OK".
Result
The blocks selected will be know-how-protected. Know-how protected blocks are marked with a lock in the project tree. The password entered is valid for all blocks selected.
See also
Protecting blocks (Page 1013) Setting up and removing block copy protection (Page 1015) Opening know-how protected blocks (Page 1017) Printing know-how protected blocks (Page 1017) Removing block know-how protection (Page 1019) Changing a password (Page 1019)
1016
9.1.7.4
Procedure
To open a know-how protected block, follow these steps: 1. Double-click on the block you wish to open. The "Access protection" dialog will open. 2. Enter the password for the know-how protected block. 3. Confirm your entry with "OK".
Result
The know-how protected block will open provided you have entered the correct password. However, the block will remain know-how protected. If you copy the block or add it to a library, for example, the copies will also be know-how protected. Once you have opened the block, you can edit the program code and the block interface of the block for as long as the block or TIA portal is open. The password must be entered again the next time the block is opened. If you close the "Access protection" dialog with "Cancel", the block will open but the block code will not be displayed and you will not be able to edit the block.
See also
Protecting blocks (Page 1013) Setting up and removing block copy protection (Page 1015) Setting up block know-how protection (Page 1016) Printing know-how protected blocks (Page 1017) Removing block know-how protection (Page 1019) Changing a password (Page 1019)
9.1.7.5
1017
Procedure
To print a know-how protected block in full, follow these steps: 1. Open the know-how protected block you wish to print. See also: Opening know-how protected blocks (Page 1017) 2. Select the "Print" command in the "Project" menu. The "Print" dialog will open. 3. Select the printer in the "Name" field. 4. Click "Advanced" to modify the Windows printer settings. 5. Select the documentation information set in the "Document information" drop-down list that you want to use for the frame layout. 6. Under "Print objects/area" select whether you want to print all objects or the complete area, or only a selection. 7. Under "Properties" select the print scope. Select "All" to print the complete block. Choose "Visible" to print all the information within the block that is visible on the screen. Select "Compact" to print a shortened form of the block. 8. Click "Preview" to generate a print preview in advance. A print preview is created in the work area. 9. Click "Print" to start the printout.
See also
Printing project contents (Page 202) Protecting blocks (Page 1013) Setting up and removing block copy protection (Page 1015) Setting up block know-how protection (Page 1016) Removing block know-how protection (Page 1019) Changing a password (Page 1019)
1018
9.1.7.6 Procedure
Changing a password
To change the password, follow these steps: 1. Select the know-how protected blocks for which you want to change the password. Note You can only change the password for several blocks at once if all blocks selected have the same password. 2. Select the command "Know-how protection" in the "Edit" menu. The "Know-how protection" dialog will open. 3. Click the "Change" button. 4. Enter the old password in the "Old" field. 5. Enter the new password in the "New" field. 6. Enter the new password again in the "Confirm" field. 7. Confirm your entries with "OK". 8. Close the "Know-how protection" dialog by clicking on "OK".
See also
Protecting blocks (Page 1013) Setting up and removing block copy protection (Page 1015) Setting up block know-how protection (Page 1016) Opening know-how protected blocks (Page 1017) Printing know-how protected blocks (Page 1017) Removing block know-how protection (Page 1019)
9.1.7.7 Procedure
To remove block know-how protection, follow these steps: 1. Select the blocks for which you want to remove know-how protection. Note You can only remove know-how protection for several blocks at once if all blocks selected have the same password. 2. Select the command "Know-how protection" in the "Edit" menu. The "Know-how protection" dialog will open.
STEP 7 Basic V11.0 SP2 System Manual, 12/2011,
1019
Result
Know-how protection will be disabled for the blocks selected.
See also
Protecting blocks (Page 1013) Setting up and removing block copy protection (Page 1015) Setting up block know-how protection (Page 1016) Opening know-how protected blocks (Page 1017) Printing know-how protected blocks (Page 1017) Changing a password (Page 1019)
9.2
9.2.1
Program information
The program information of a user program contains the view specified in the following table.
View Assignment list (Page 1021) Application Provides an overview of the address bits for the I, Q, and M memory areas already allocated within the user program. Also indicates if an address has been allocated by access from an S7 program or if the address has been assigned to a SIMATIC S7 module. Call structure (Page 1029) Shows the call structure of the blocks within the user program and provides an overview of the blocks used and their relationships.
1020
9.2.2
9.2.2.1
1021
Filters
You can filter the display within the assignment list. You can use predefined filters or create your own.
See also
Symbols in the assignment list (Page 1023) Layout of the assignment list (Page 1022)
9.2.2.2
1022
See also
Introduction to the assignment list (Page 1021)
9.2.2.3
1023
Indicates that a byte is in use with byte, word or double word access and that the address is also in use by the hardware. The gray background color indicates overlapping memory access. Indicates that the address is not in use by the hardware. Indicates that the memory area has been defined as system memory. Indicates that the memory area has been defined as clock memory.
See also
Layout of the assignment list (Page 1022) Introduction to the assignment list (Page 1021)
9.2.2.4
Requirement
A project has been created with programmed blocks.
Procedure
Proceed as follows to display the assignment list: 1. Select the "Program blocks" folder or one or more of the blocks it contains. 2. Select the "Assignment list" command in the "Tools" menu.
Result
The assignment list for the selected program is displayed.
1024
See also
Setting the view options for the assignment list (Page 1025) Layout of the assignment list (Page 1022)
9.2.2.5
Introduction
The following view options are available for the assignment list: Used addresses: When this check box is activated, the addresses, I/Os and pointers used in the program are displayed. Free hardware addresses: When this check box is activated, only the free hardware addresses are displayed.
Requirement
A project has been created with programmed blocks. The assignment list is open.
Procedure
Proceed as follows to set the view options for the assignment list: symbol ("View options") in the task bar. 1. Click on the arrow of the The view options for the assignment list are opened. Check marks are set in front of the activated view options. 2. If you want to activate or deactivate a view option, click on the respective check box and set or remove the check mark.
Result
The view options are set and the desired information is displayed in the assignment list.
1025
9.2.2.6
Filter settings
You can define your own filter settings for the assignment list. The following options are available for defining filters: Display all addresses of the address areas specified. Display of single, defined addresses from the selected address area, for example, "0" and "200". Display of complete areas from the selected address area, for example, "0 - 256". The following table provides an overview of all available options:
Selection in the Address area Selection All CPU-dependent displayed addresses (I, O, M, T, C) can be activated as they are by default, or individual address areas can be activated. Symbol Check box is activated Meaning Only the activated address areas (I, O, M, T, C) are shown in the assignment list.
Filter area
Displays the assignment of all addresses of the enabled address areas (I, Q, M). Assignments of selected addresses for the activated address areas (I) are shown. Assignments of selected areas for the activated address areas (I) are shown.
Show assignment for selected addresses, for example, for the inputs "IB 0" and "IB 256" Show assignment for selected areas, for example, for the inputs "IB 0 to IB 100" and "IB 200 to IB 256".
0;256 Separate individual addresses and areas by a semicolon. 0-100;200-256 Contiguous areas should be connected by a hyphen.
9.2.2.7
Requirement
A project has been created with programmed blocks. The assignment list is open.
Defining filter
Proceed as follows to define a filter for the assignment list: 1. Click on the symbol ("Filter") in the task bar. The "Assignment List Filter" dialog opens. 2. Click on the symbol ("Create new filter") in the task bar. A new filter is created with the name "Filter_1". The check boxes for all addresses (inputs, outputs, memory bits, timers and counters) are activated by default for the filter.
1026
Delete filter
Proceed as follows to delete a filter: symbol ("Filter") in the task bar. 1. Click on the The filter dialog for the assignment list opens. 2. In the drop-down list of the task bar, select the filter you want to delete. symbol ("Delete selected filter") in the task bar. 3. Click on the The selected filter is deleted.
See also
Filter options in the assignment list (Page 1026) Displaying an assignment list (Page 1024) Introduction to the assignment list (Page 1021)
9.2.2.8
Requirement
A project has been created with programmed blocks. The assignment list is open.
Procedure
1. Click on the arrow on the drop-down list. The available filter are displayed. 2. Select the desired filter.
1027
Result
The assignment list is filtered according to the settings of the selected filter. Note The filter settings are saved when the project is closed.
9.2.2.9
Introduction
In the assignment list you can define the width of the retentive memory area for bit memories. The content of tags which are addressed in retentive memory is retained after power off and at the STOP to RUN transition after power on. The display of retentive bit memories can be enabled and disabled in the assignment list. If their display is enabled, retentive bit memories are identified by an icon in the "Address" column.
Requirement
The assignment list is open.
Procedure
Proceed as follows to define the width of the retentive memory area for bit memories: 1. Click "Retain" in the toolbar. The "Retain memory" dialog will open. 2. Starting at the count of 0, define the width of the retentive memory area by entering the last byte of this area in the input field. Watch out for any addresses of tags already assigned to the retentive area. 3. Load the block to the target system. Select the "Program blocks" folder in the Project tree and select the "Download to device" submenu in the shortcut menu.
Result
The width of the retentive memory area is defined. If enabled in the assignment list, an icon will indicate the retentive state of all tags in the "Address" column.
1028
9.2.2.10
Introduction
In the assignment list you can enable and disable the display of retentive bit memories. The retentive bit memories are identified by means of an icon in the "Address" column if the display of retentivity is enabled.
Requirement
The assignment list is open.
Procedure
Proceed as follows to enable and disable the display of retentive bit memories: 1. Click "Display/hide retentivity" in the toolbar.
Result
The retentive tags are identified by means of an icon in the "Address" column of the bit memory area if the display of retentivity is enabled. The icons in the "Address" column are hidden if the display of retentivity is disabled.
9.2.3
9.2.3.1
Call structure
The call structure describes the call hierarchy of the block within an S7 program. It provides an overview of: The blocks used Jumps to the places of use of the blocks Relationships between blocks Local data requirements of the blocks Status of the blocks
1029
View options
The following view options are available for the call structure: Show conflicts only: When this check box is activated, only the conflicts within the call structure are displayed. Group multiple calls together: When this check box is activated, several block calls are grouped together. The number of block calls is displayed in the "Call frequency" column. The links to the various call locations are offered in a drop-down list in the "Details" column.
1030
See also
Symbols in the call structure (Page 1031)
9.2.3.2
1031
9.2.3.3
Details
See also
Symbols in the call structure (Page 1031) Introducing the consistency check in the call structure (Page 1034)
1032
9.2.3.4
Requirement
A project has been created with blocks.
Procedure
Proceed as follows to display the call structure: 1. Select the "Program blocks" folder or one or more of the blocks it contains. 2. Select the "Call structure" command in the "Tools" menu.
Result
The call structure for the selected program is displayed. Note Please note that any existing local data can only be displayed or updated after compiling a block.
See also
Setting the view options for the call structure (Page 1033)
9.2.3.5
Introduction
The following view options are available for the call structure: Show conflicts only: Only the blocks causing conflicts within the call structure are displayed if this check box is activated. The following blocks cause conflicts: Blocks executing any calls with older or newer code time stamps. Blocks calling a block with modified interface. Blocks using a tag with modified address and/or data type. Block called neither directly, nor indirectly by an OB. Blocks calling a block which no longer exists. Group multiple calls together: When this viewing option is enabled, several block calls and data block accesses are grouped together. The number of block calls is displayed in the "Call frequency" column. The links to the various call locations are offered in a drop-down list in the "Details" column.
1033
Requirement
A project has been created with programmed blocks. The call structure is open.
Procedure
Proceed as follows to set the view options for the call structure: symbol ("View options") in the task bar. 1. Click on the arrow of the The view options for the call structure opens. Check marks are set in front of the activated view options. 2. If you want to activate or deactivate a view option, click on the respective check box and set or remove the check mark.
Result
The view options are set and the required information is displayed in the call structure.
9.2.3.6
Consistency check
Changing the time stamp of a block during or after the program is generated can lead to time stamp conflicts, which in turn cause inconsistencies among the blocks that are calling and being called.
See also
Symbols in the call structure (Page 1031)
1034
9.2.3.7
Requirement
A project has been created with programmed blocks. The call structure is open.
Procedure
Proceed as follows to check the block consistency: symbol ("Consistency check") in the task bar. 1. Click on the The block consistency is checked. Blocks found to be inconsistent are marked accordingly by a symbol. 2. If a block is inconsistent, click on the arrow in front of the block title in the call structure. The inconsistent blocks are displayed. The exact problem locations are listed as links in the "Details" column. 3. Click on the respective link in the "Details" column to jump to the location in the block requiring correction. 4. Check and correct the inconsistencies in the blocks. 5. Recompile the blocks by selecting the required blocks and clicking on the command "Compile" in the shortcut menu. 6. Download the corrected blocks to the target system by clicking the command "Download to device" in the shortcut menu.
Result
The block consistency is checked. The inconsistencies in the blocks are corrected. The corrected blocks are loaded to the target system.
See also
Symbols in the call structure (Page 1031)
9.2.4
9.2.4.1
Introduction
The dependency structure shows the dependencies each block has to other blocks in the program.
1035
View options
The following view options are available for the dependency structure: Show conflicts only: When this check box is activated, only the conflicts within the dependency structure are displayed. Group multiple calls together: When this check box is activated, several block calls are grouped together. The number of block calls is shown numerically in the "Dependency structure" column. The links to the various call locations are offered in a drop-down list in the "Details" column.
1036
9.2.4.2
See also
Symbols in the dependency structure (Page 1037)
9.2.4.3
Indicates that the data block needs to be compiled again. Indicates that there is an inconsistency with this object.
1037
9.2.4.4
Requirement
A project has been created with programmed blocks.
Procedure
Proceed as follows to display the dependency structure: 1. Select the block folder or one or more of the blocks contained therein. 2. Select the "Dependency structure" command in the "Tools" menu.
Result
The dependency structure for the selected program is displayed.
See also
Setting the view options for the dependency structure (Page 1039)
1038
9.2.4.5
Introduction
The following view options are available for the dependency structure: Show conflicts only: When this check box is activated, only the conflicts within the dependency structure are displayed. The following blocks cause conflicts: Blocks executing any calls with older or newer code time stamps. Blocks called by a block with modified interface. Blocks using a tag with modified address and/or data type. Block called neither directly, nor indirectly by an OB. Group multiple calls together: When this check box is activated, several block calls are grouped together. The number of block calls is shown in the relevant column. The links to the various call locations are offered in a drop-down list in the "Details" column.
Requirement
A project has been created with programmed blocks. The dependency structure is open.
Procedure
Proceed as follows to set the view options for the dependency structure: symbol ("View options") in the task bar. 1. Click on the arrow of the The view options for the dependency structure are opened. Check marks are set in front of the activated view options. 2. If you want to activate or deactivate a view option, click on the respective check box and set or remove the check mark.
Result
The view options are set and the required information is displayed in the dependency structure.
9.2.4.6
Consistency check
1039
See also
Layout of the dependency structure (Page 1037) Symbols in the dependency structure (Page 1037)
9.2.4.7
Requirement
A project has been created with programmed blocks. The dependency structure is open.
Procedure
Proceed as follows to check the block consistency: symbol ("Consistency check") in the task bar. 1. Click on the The block consistency is checked. Blocks found to be inconsistent are marked accordingly by a symbol. 2. If a block is inconsistent, click on the arrow in front of the block title in the dependency structure. The inconsistent blocks are displayed. The exact problem locations are listed as links in the "Details" column. 3. Check and correct the inconsistencies in the blocks. 4. Recompile the blocks by selecting the required blocks and clicking on the command "Compile" in the shortcut menu. 5. Download the corrected blocks to the target system by clicking the command "Download to device" in the shortcut menu.
1040
Result
The block consistency is checked. The inconsistencies in the blocks are corrected. The corrected blocks are loaded to the target system.
See also
Symbols in the dependency structure (Page 1037)
9.2.5
9.2.5.1
Introduction
The "Resources" tab indicates the hardware resources of the configured CPU for: the used programming objects, the assignment of memory areas within the CPU and the assigned inputs and outputs of the existing input and output modules.
1041
See also
Layout of the "Resources" tab (Page 1043) Displaying resources (Page 1044) Selecting the maximum load memory available (Page 1044)
1042
9.2.5.2
Load memory
1043
See also
Displaying resources (Page 1044) Selecting the maximum load memory available (Page 1044) Introducing resources (Page 1041)
9.2.5.3
Displaying resources
Requirement
A project with programmed blocks has been created.
Procedure
Proceed as follows to display the resources of the respective CPU memory areas: 1. Select the block folder or one or several of the blocks contained therein. 2. Select the "Resources" command in the "Tools" menu.
Result
The memory resources of the CPU are displayed.
9.2.5.4
Requirement
A project with programmed blocks has been created.
Procedure
Proceed as follows to display the available maximum of load memory resources: 1. Open the drop-down list in the "Total" field of the "Load memory" column by clicking the icon. 2. Select a corresponding value for the CPU used by clicking it in the drop-down list box.
Result
The "Total" field displays the selected maximum memory resources.
1044
9.3
9.3.1
Displaying cross-references
General information about cross references
Introduction
The cross-reference list provides an overview of the use of operands and tags within the user program.
Uses of cross-references
The cross-reference list offers you the following advantages: When creating and changing a program, you retain an overview of the operands, tags and block calls you have used. From the cross-references, you can jump directly to the point of use of operands and tags. During a program test or when troubleshooting, you are informed of the following: which operand is processed by which command in which block, which tag is used in which picture, which block is called by which other block. As part of the project documentation, the cross-references provide a comprehensive overview of all operands, memory areas, blocks, tags and pictures used.
See also
Structure of the cross-reference list (Page 1045) Displaying the cross-reference list (Page 1047) Displaying cross-references in the Inspector window (Page 1048)
9.3.2
1045
Depending on the installed products, additional columns or different columns are displayed for the cross-references.
See also
General information about cross references (Page 1045) Displaying the cross-reference list (Page 1047)
1046
9.3.3
Prerequisites
You have created a project.
Introduction
There are several ways of displaying cross-references depending on whether you are in the Portal view or in the Project view and which object you have selected in the project tree. In the Portal view, you can only display cross-references for the entire CPU; in the Project view, you can, for example, display cross-references for the following objects: "PLC tags" folder "PLC data types" folder "Program blocks" folder "Tags and connections" folder Individual tags Individual PLC data types Individual blocks Technological objects
Displaying cross-references
Proceed as follows to display cross-references: 1. Select the required action in the Portal view, for example "PLC programming" and the "Show cross-references" command or select one of the objects listed above in the Project view and select the "Cross-references" command in the "Tools" menu. 2. Click the "Used by" button to display where the objects shown in the cross-reference list are used. 3. Click the "Uses" button to view the users of the objects displayed in the cross-reference list. 4. You can perform the following actions using the buttons in the toolbar: Update cross-reference list Making settings for the cross-reference list Collapse entries Expand entries 5. You can sort the entries in the "Object" and "Address" columns in ascending or descending order by clicking on the relevant column title. 6. To go to the point of use of the object, click on the displayed link.
1047
See also
General information about cross references (Page 1045) Structure of the cross-reference list (Page 1045)
9.3.4
Introduction
The Inspector window displays cross-reference information about an object you have selected in the "Info > Cross-references" tab. This tab displays the instances where a selected object is being used and the other objects using it. The Inspector window also includes blocks which are only available online in the crossreferences.
Structure
The Inspector window displays the cross-reference information in tabular format. Each column contains specific and detailed information on the selected object and its application. The table below shows the additional information listed in the "Info > Cross-reference" tab:
Column Object Meaning Name of the object that uses the lower-level objects or that is being used by the lower-level objects. Number of uses Each location of use, for example, network Special properties of referenced objects, for example, the tag name in multi-instance declarations Shows additional information about the object, e.g., that an instance DB is used as template or as multiple instance. Access mode Shows whether the operand is accessed by a read (R) and/or write (W) operation. Address Monitor value Address of the operand This column will only be displayed when the program editor is open. Here you can monitor global tabs using the shortcut menu. Information about the type and language used to create the object Path of object in project tree
as
Access
Type Path
Depending on the installed products, additional columns or different columns are displayed for the cross-references.
1048
9.4
9.4.1
Functions
You have the option of testing the running of your user program on the device. You can then monitor signal states and values of tags and can assign values to tags to simulate certain situations in the running of the program.
Requirement
There must be an executable program loaded on the device.
Test options
The following test options are available: Testing with program status The program status allows you to monitor the running of the program. You can display the values of operands and the results of logic operations (RLO) allowing you to recognize and fix logical errors in your program. Testing in single step mode (S7-300/400 only) You can test blocks you created in STL or SCL in the single step mode. You do this by setting breakpoints in the program code at which program execution stops. You can then continue to run the program one step at a time. Within a CPU, you can test either with program status or in single step mode. You cannot, however, use both test options at the same time within a CPU. Testing with the watch table With the watch table, you can monitor and modify the current values of individual tags in the user program or on a CPU. You can assign values to individual tags for testing and run the program in a variety of different situations. You can also assign fixed values to the I/O outputs of a CPU in STOP mode, for example to check the wiring. Testing with the force table With the force table, you can monitor and force the current values of individual tags in the user program or on a CPU. When you force, you overwrite individual tags with specified values. This allows you to test your user program and run through various situations. When forcing, make sure that you keep to the necessary safety measures for forcing (Page 1092)!
1049
See also
Introduction to testing with program status (Page 1050) Introduction to testing with the watch table (Page 1055) Introduction for testing with the force table (Page 1077)
9.4.2
9.4.2.1
Displays in program status Program status display for LAD programs Displays in program status
The display of the program status is updated cyclically. The following figure shows an example of the program status display for LAD:
1050
1051
The values of the operands are displayed above the relevant operand name in a gray box.
In the first column, you can see the name of the tag for which the current value is being displayed. If the line includes the "IF", "WHILE" or "REPEAT" instruction, the result of the instruction is displayed in the line as "True" or "False". If the line contains more than one tag, the value of the first tag is displayed. In both cases, all tags of these lines are displayed with their values in a separate list as soon as you select a line. If you place the cursor in a tag in the program code, this is shown in bold face in the list. You can also display the other tags of a line explicitly by clicking the arrow right located in front of lines containing more than one tag. If the code of the line is not executed, the tag name is displayed in the values table in gray text. The current values of the tags are displayed in the last column. If no values can be displayed for a tag, the line has a yellow background and three question marks are shown. In this case, select the "Create extended status information" check box in the properties of the block and download the block to the device again. All values are then displayed.
1052
Requirement
The identical block exists in the device. The block is open.
Result
If you enable the display of the program status, an online connection is established and the program status is displayed. When you turn off the display of the program status, you can terminate the online connection at the same time. If the CPU is in "HOLD" or "STOP" mode, the call hierarchy of the block is displayed in the "Call hierarchy" pane on the "Testing" task card. With S7-1200 CPUs, the call hierarchy is also displayed during the test with program status. Using this call hierarchy, you can change to one of the calling blocks.
1053
Procedure
To edit blocks while the test with program status is still running, follow these steps: 1. Edit the block as necessary. The test with program status is interrupted and the block is switched offline assuming it exists offline. 2. If the block does not exist offline, load it to the project from the device. 3. Compile the block. See also: Auto-Hotspot 4. Download the block to the device. See also: Auto-Hotspot
Result
The block now contains your modifications both online and offline. The online connection is reestablished and testing with program status continues.
1054
Procedure
To modify tags during testing with the program status, proceed as follows: 1. Right-click on the tag you want to modify. 2. Select one of the following commands in the shortcut menu: "Modify > Modify to 1" "Modify > Modify to 0" "Modify > Modify operand" 3. If you select "Modify operand", the "Modify operand" dialog opens. Enter the value you require in the "Modify value" box and confirm with "OK".
9.4.3
9.4.3.1 Overview
The following functions are available in the watch table: Monitoring tags This displays the current values of the individual tags of a user program or a CPU on the programming device or PC. Modifying tags You can use this function to assign specific values to the individual tags of a user program or CPU. Modifying is also possible with Test with program status (Page 1050). "Enable peripheral outputs" and "Modify now" These two functions enable you to assign specific values to individual peripheral outputs of a CPU in STOP mode. You can also use them to check your wiring.
Possible applications
The advantage of the watch table is that a variety of test environments can be stored. This enables you to reproduce tests during commissioning or for service and maintenance purposes.
1055
See also
Layout of the watch table (Page 1056) Basic mode and expanded mode in the watch table (Page 1057) Icons in the watch table (Page 1057)
9.4.3.2
Introduction
A watch table contains the tags you defined for the entire CPU. A "Watch and force tables" folder is automatically generated for each CPU created in the project. You create a new watch table in this folder by selecting the "Add new Watch table" command.
1056
See also
Icons in the watch table (Page 1057)
9.4.3.3
Difference between basic mode and expanded mode in the watch table
Depending on the mode specified, the watch table displays different columns and column headings that can be used to perform different actions. You will find a detailed list of the columns in Layout of the watch table (Page 1056).
See also
Setting the monitoring and modify mode (Page 1066)
9.4.3.4
1057
1058
See also
Layout of the watch table (Page 1056)
9.4.3.5
Requirement
A project is open.
Procedure
To create a watch table, follow these steps: 1. Click "Project view" in the status bar. The project view is displayed. 2. In the project tree, double-click the CPU for which you want to create a watch table. 3. Double-click the "Watch and force tables" folder and then the "Add new watch table" command. A new watch table is added. 4. In the "Name" column or in the "Address" column, enter the name or the absolute address for the tags that you want to monitor or modify. 5. You can select a display format from the drop-down list in the "Display format" column if you want to change this default setting. 6. Now decide whether you want to monitor or modify the entered tags and, if applicable, enter the desired values for modifying.
1059
Procedure
To open a watch table, follow these steps: 1. Open the "Watch and force tables" folder below the desired CPU. 2. Double-click on the required watch table in the folder.
Result
The selected watch table opens.
Procedure
To copy a watch table, follow these steps: 1. Right-click the watch table that you want to copy. 2. In the context menu, select "Copy". 3. In the project tree, open the folder structure for the CPU in which you want to paste the copied watch table. 4. Right-click on the "Watch and force tables" folder. 5. In the context menu, select "Paste". 6. Alternatively, you can select the entire contents of the watch table and Drag & Drop it onto another watch table.
Result
A copy of the selected watch table is placed in the "Watch and force tables" folder of the relevant CPU.
1060
Procedure
To save a watch table, follow these steps: 1. In the project tree select the watch table you want to save. 2. If you wish to change the preset name of the table, select the "Rename" command in the context menu and enter a new name for the table. 3. In the "Project" menu, select "Save". Note that this save operation will save the entire project.
Result
The contents of the watch table and the project are saved. Note You can reuse saved watch tables to monitor and modify tags when retesting your program.
9.4.3.6
1061
Syntax check
When you enter the tags in the watch table, the syntax of each cell is checked when you exit the cell. Incorrect entries are marked in red. Note When you place the mouse pointer in a cell marked in red, brief information is displayed with additional notes on the error.
See also
Permitted operands for the watch table (Page 1062) Permissible modify values for the watch table (Page 1063)
Permitted operands for the watch table Permissible operands for the watch table
The following table shows the operands that are permitted for the watch table:
Permitted operand Input/output/bit memory Input/output/bit memory Input/output/bit memory Input/output/bit memory Data block Data block Data block Data block Example of data type BOOL BYTE WORD DWORD BOOL BYTE WORD DWORD Example (International mnemonics) I1.0, Q1.7, M10.1 I0.0:P; Q0.0:P IB1/QB10/MB100 IB1:P; QB1:P IW1; QW10; MW100 IW2:P; QW3:P ID4; QD10; MD100 ID2:P; QD1:P DB1.DBX1.0 DB1.DBB1 DB1.DBW1 DB1.DBD1
Note Please observe the following notes to work with the watch table. You cannot enter "DB0..." because it is used by the system! Peripheral outputs can be modified but not monitored. Peripheral inputs can be monitored but not modified.
1062
See also
Basic information on entering tags in the watch table (Page 1061)
Permissible modify values for the watch table Entry of modify values in the watch table
The following table shows the operands that are permitted for the entry of modify values in the watch table:
Table 9-14 I1.0 M1.7 Q1.0 Q1.1:P DB1.DBX1.1 M1.6 Table 9-15 IB1 MB12 QB10 QB11:P DB1.DBB1 Table 9-16 IW1 MW12 MW14 QW10 QW12:P DB1.DBW1 MW16 MW18 MW9 Word operands Example for permitted modify values 2#0011001100110011 W#16#ABCD ABCD B#(12, 34) 12345 'ab' S5T#9s_340ms C#123 D#2006-12-31 Byte operands Example for permitted modify values 2#00110011 B#16#1F 1F 'a' 10 Bit operands Example for permitted modify values True False 0 1 2#0 2#1
1063
Example
The following table shows the data types permitted for the watch table and their possible display formats:
Data type BOOL BYTE WORD DWORD SINT INT DINT USINT Possible display formats Bool, Hex, BCD, Octal, Bin, Dec, Dec+/Hex, BCD, Octal, Bin, Dec, Dec+/-, Character Hex, BCD, Octal, Bin, Dec, Dec+/-, Dec_Sequence, Character, SIMATIC_Timer, Date Hex, BCD, Octal, Bin, Dec, Dec+/-, Dec_Sequence, Character, Floating-point number, Time of day, Timer, Pointer Dec, Dec+/-, Hex, BCD, Octal, Bin, Character Dec, Dec+/-, Hex, BCD, Octal, Bin, Character, Unicode_Character, Dec_Sequence, SIMATIC_Timer, Counter Dec, Dec+/-, Hex, BCD, Octal, Bin, Character, Unicode_Character, Dec_Sequence, Floating-point number, Time of day, Timer, Pointer Dec, Dec+/-, Hex, BCD, Octal, Bin, Character
1064
For more information, refer to the description of the valid data types.
1065
9.4.3.7
1066
1067
Monitoring of tags
When tags are being modified, the following applies to the trigger points: If you have specified the modify mode as "once only", you will receive a message if the selected tags cannot be modified. In "permanent" modify mode, you do not receive a message.
Prerequisite
A watch table has been created. An online connection to the CPU exists.
1068
Procedure
To execute the "Monitor all" command, follow these steps: 1. Enter the tags to be monitored and the corresponding addresses in the watch table. 2. Switch to expanded mode by clicking the icon "Show/hide advanced setting columns" in the toolbar. 3. If you want to change the default monitoring mode for a tag, click the appropriate cell in the "Monitor with trigger" column and select the desired monitoring mode from the drop-down list. 4. Click the "Monitor all" icon in the toolbar.
Result
The tags of the active watch table are monitored using the monitoring mode selected.
See also
Icons in the watch table (Page 1057) Basic mode and expanded mode in the watch table (Page 1057)
Requirement
A watch table has been created. An online connection to the CPU exists.
Procedure
To execute the "Monitor now" command, follow these steps: 1. Enter the tags to be monitored and the corresponding addresses in the watch table. 2. Click the "Monitor now" icon in the toolbar.
Result
The tags of the active watch table are monitored immediately and once only.
1069
See also
Icons in the watch table (Page 1057) Basic mode and expanded mode in the watch table (Page 1057)
9.4.3.8
1070
Prerequisite
A watch table has been created. An online connection to the CPU exists.
Procedure
To modify tags to "0", follow these steps: 1. Enter the desired address in the watch table. 2. Select the "Online > Modify > Modify to 0" command in order to modify the selected address with the specified value.
1071
Result
The selected address is modified to "0". Note When modifying, note the following: Modifying can not be undone!
Prerequisite
A watch table has been created. An online connection to the CPU exists.
Procedure
To modify tags to "1", follow these steps: 1. Enter the desired address in the watch table. 2. Select the "Online > Modify > Modify to 1" command in order to modify the selected address with the specified value.
1072
Result
The selected address is modified to "1". Note When modifying, note the following: Modifying can not be undone!
Requirements
A watch table has been created. An online connection to the CPU exists.
Procedure
To modify tags immediately, follow these steps: 1. Enter the desired addresses and modify values in the watch table. 2. Select the addresses to be modified by selecting the check boxes for modifying in the column after the "Modify value". A yellow triangle appears behind the selected check box, indicating that the address is now selected for modifying but has not yet been modified. 3. Select the "Online > Modify > Modify once and now" command in order to immediately modify the selected address once only with the specified value.
1073
Result
The selected addresses are modified immediately and once only. Note When modifying, note the following: Modifying can not be undone!
Prerequisites
A watch table has been created. An online connection to the CPU exists. The watch table has to be in expanded mode.
Procedure
To modify tags "with trigger", follow these steps: 1. Enter the desired addresses and modify values in the watch table. 2. Select the addresses to be modified by selecting the check boxes for modifying in the column after the "Modify value". A yellow triangle appears behind the selected check box, indicating that the address is now selected for modifying but has not yet been modified. 3. Switch to expanded mode using the icon "Show/hide advanced settings columns" in the toolbar or the "Online > Expanded mode" command. The "Monitor with trigger" and "Modify with trigger" columns are displayed.
1074
Result
The selected tags are modified using the selected monitoring and modify mode. The yellow triangle is no longer displayed. Note When modifying, note the following: Modifying can not be undone!
Prerequisites
A watch table has been created. An online connection to the CPU exists.
1075
Procedure
To enable the peripheral outputs in STOP mode, follow these steps: 1. Enter the desired addresses and modify values in the watch table. 2. Select the addresses to be modified by selecting the check boxes for modifying in the column after the "Modify value". A yellow triangle appears behind the selected check box, indicating that the address is now selected for modifying but has not yet been modified. 3. Switch to expanded mode using the icon "Show/hide advanced settings columns" in the toolbar or the "Online > Expanded mode" command. The "Monitor with trigger" and "Modify with trigger" columns are displayed. 4. Change the relevant CPU to STOP using the operator panel. 5. Right-click to open the shortcut menu and select "Enable peripheral outputs". 6. Confirm the prompt with "Yes" if you want to unlock the command output disable for the peripheral outputs. 7. Modify the peripheral outputs using the "Online > Modify > Modify now" command.
Result
The peripheral outputs are modified with the selected modify values. The yellow triangle is no longer displayed.
1076
9.4.4
9.4.4.1 Overview
You can use the force table to assign permanent values to individual tags of the user program. This action is referred to as "forcing". The following functions are available in the force table: Monitoring tags This displays the current values of the individual tags of a user program or a CPU on the programming device or PC. Tags can be monitored with or without a trigger condition. Forcing tags This function lets you assign a permanent value to individual peripheral tags of the user program.
1077
Example
Independent of the CPU used, only I/O can be forced, such as: "Tag_1":P or "QW0:P" or "IW0:P". Note that "Tag_1":P must not be the symbolic name of a bit memory.
Possible applications
One advantage of the force table is that you can simulate different test environments and overwrite tags in the CPU with a permanent value. This enables you to intervene in the ongoing process for regulating purposes.
See also
Layout of the force table (Page 1079) Basic mode and expanded mode in the force table (Page 1080) Icons in the force table (Page 1081)
9.4.4.2
1078
9.4.4.3
Introduction
In the force table, enter the CPU-wide tags that you have defined and selected and which are to be forced in the allocated CPU. Only peripheral inputs and peripheral outputs can be forced. For each CPU created in the project, a force table will automatically be created in the "Watch and force tables" folder. Only one force table can be allocated to a CPU. This force table displays all the addresses forced in the allocated CPU.
1079
See also
Icons in the force table (Page 1081) Basic mode and expanded mode in the force table (Page 1080)
9.4.4.4
Difference between basic mode and expanded mode in the force table
In expanded mode the "Monitor with trigger" column is also displayed in the force table. You will find a detailed list of the columns under Layout of the force table (Page 1079).
1080
9.4.4.5
See also
Layout of the force table (Page 1079)
1081
9.4.4.6
Requirements
A project with an allocated CPU has to be open.
Procedure
Proceed as follows to open a force table: 1. Open the "Watch and force tables" folder below the desired CPU. 2. Double-click the "Force table" in this folder.
Result
The selected force table opens.
1082
Procedure
Proceed as follows to save a force table: 1. Enter the desired changes in the force table. 2. Select the "Save" command in the "Project" menu or click the "Save project" icon in the toolbar. Note that this save operation will save the entire project.
Result
The contents of the force table and the associated project are saved. Note You cannot rename a force table.
9.4.4.7
Basic principles for entering tags in the force table Recommended procedure
Select the tags whose values you want to monitor or force, and enter them in the force table. When entering tags in the force table, please note that these tags must be previously defined in the PLC tag table.
1083
Syntax check
When you enter tags in the force table, the syntax of each cell will be checked when you exit the cell. Incorrect entries are marked in red. Note When you place the mouse pointer in a cell marked in red, brief information is displayed with additional notes on the error.
Permitted operands for the force table Permitted operands for the force table
The following table shows the operands that are permitted for forcing in the force table:
Permitted operand Peripheral input/peripheral output Peripheral input/peripheral output Peripheral input/peripheral output Peripheral input/Peripheral output Example of data type BOOL BYTE WORD DWORD Example (International mnemonics) I0.0:P; Q0.0:P IB1:P; QB1:P IW2:P; QW3:P ID2:P; QD1:P
The following table shows the operands that are permitted for monitoring in the force table:
Permitted operand Input/output/bit memory Input/output/bit memory Input/output/bit memory Input/output/bit memory Data block Data block Data block Data block Example of data type BOOL BYTE WORD DWORD BOOL BYTE WORD DWORD Example (International mnemonics) I1.0, Q1.7, M10.1 I0.0:P IB1/QB10/MB100 IB1:P IW1; QW10; MW100 IW2:P ID4; QD10; MD100 ID2:P DB1.DBX1.0 DB1.DBB1 DB1.DBW1 DB1.DBD1
1084
Permitted force values for the force table Entering force values in the force table
The following table shows the operands that are permitted for entering force values in the force table:
Table 9-18 I1.0:P I1.1:P Q1.0P Q1.1:P I2.0:P I2.1:P Table 9-19 IB1:P IB2:P QB14:P QB10:P IB3:P Table 9-20 IW0:P IW2:P QW10:P QW12:P IW4:P IW6:P IW8:P IW10:P IW12:P Word operands Example for permitted force values 2#0011001100110011 W#16#ABCD ABCD B#(12, 34) 'ab' 12345 S5T#9S_340ms C#123 D#2006-12-31 Byte operands Example for permitted force values 2#00110011 B#16#1F 1F 'a' 10 Bit operands Example for permitted force values True False 0 1 2#0 2#1
1085
Example
The following table shows the data types permitted for the force table and their possible display formats:
Data type BOOL BYTE WORD DWORD SINT INT DINT Possible display formats Bool, Hex, BCD, Octal, Bin, Dec, Dec+/Hex, BCD, Octal, Bin, Dec, Dec+/-, Character Hex, BCD, Octal, Bin, Dec, Dec+/-, Dec_Sequence, Character, SIMATIC_Timer, Date Hex, BCD, Octal, Bin, Dec, Dec+/-, Dec_Sequence, Character, Floating-point number, Time of day, Timer, Pointer Dec, Dec+/-, Hex, BCD, Octal, Bin, Character Dec, Dec+/-, Hex, BCD, Octal, Bin, Character, Unicode_Character, Dec_Sequence, SIMATIC_Timer, Counter Dec, Dec+/-, Hex, BCD, Octal, Bin, Character, Unicode_Character, Dec_Sequence, Floating-point number, Time of day, Timer, Pointer
1086
For more information, refer to the description of the valid data types.
1087
9.4.4.8
1088
1089
Requirements
A force table has been created. An online connection to the CPU exists.
Procedure
To execute the "Monitor all" command, follow these steps: 1. Enter the tags to be monitored and the corresponding addresses in the force table. 2. Switch to expanded mode by clicking the icon "Show/hide advanced setting columns" in the toolbar. 3. If you want to change the default monitoring mode for a tag, click the appropriate cell in the "Monitor with trigger" column and select the desired monitoring mode from the drop-down list. 4. Click the "Monitor all" icon in the toolbar.
Result
The tags of the active force table will be monitored using the set monitoring mode.
Requirements
A force table has been created. An online connection to the CPU exists.
Procedure
To execute the "Monitor now" command, follow these steps: 1. Enter the tags to be monitored and the corresponding addresses in the force table. 2. Click the "Monitor now" icon in the toolbar.
Result
The tags of the active force table are monitored immediately and once only.
1090
9.4.4.9
Possible applications
By permanently assigning defined values to tags, you can specify defined default settings for your user program and, thus, test the programmed functions. Forcing is possible in basic mode and in expanded mode (Page 1080).
1091
Safety precautions when forcing tags Safety precautions when forcing tags
Because the forcing function allows you to intervene permanently in the process, observance of the following notices is essential: DANGER Prevent personal injury and material damage! Note that an incorrect action when executing the "Force" function can: Harm persons or pose a health hazard. Cause damage to machinery or the entire plant.
1092
Requirements
A force table has been created. An online connection to the CPU exists. The utilized CPU supports the force function. The "Enable peripheral outputs" function is not enabled on the CPU on which the tags are to be forced. If desired, deactivate this function in the watch table.
1093
Procedure
To force tags to "0", follow these steps: 1. Open the force table. 2. Enter the desired address in the force table. 3. Select the "Online > Force> Force to 0" command in order to force the selected address with the specified value. 4. Confirm the next dialog with "Yes".
Result
The selected address is forced to "0". The yellow triangle is no longer displayed. A red "F" is displayed in the first column, for example, indicating that the tag is being forced.
Stop forcing
To stop forcing, follow these steps: 1. Open the force table. 2. Select the "Online > Force > Stop forcing" command. 3. Confirm the next dialog with "Yes".
Result
Forcing of the selected values is stopped. The red "F" in the first column is no longer displayed. The yellow triangle reappears behind the check box again to indicate that the address is selected for forcing but is not being forced at the moment. Note When forcing, note the following: Forcing can not be undone! Terminating the online connection does not stop the forcing! To stop forcing, the forced address must be visible in the active force table.
1094
Requirements
A force table has been created. An online connection to the CPU exists. The utilized CPU supports the force function. The "Enable peripheral outputs" function is not enabled on the CPU on which the tags are to be forced. If desired, deactivate this function in the watch table.
Procedure
To force tags to "1", follow these steps: 1. Open the force table. 2. Enter the desired address in the force table. 3. Select the "Online > Force> Force to 1" command in order to force the selected address with the specified value. 4. Confirm the next dialog with "Yes".
Result
The selected address is forced to "1". The yellow triangle is no longer displayed. A red "F" is displayed in the first column, for example, indicating that the tag is being forced.
Stop forcing
To stop forcing, follow these steps: 1. Open the force table. 2. Select the "Online > Force > Stop forcing" command. 3. Confirm the next dialog with "Yes".
1095
Result
Forcing of the selected values is stopped. The red "F" in the first column is no longer displayed. The yellow triangle reappears behind the check box again to indicate that the address is selected for forcing but is not being forced at the moment. Note When forcing, note the following: Forcing can not be undone! Terminating the online connection does not stop the forcing! To stop forcing, the forced address must be visible in the active force table.
Requirements
A force table has been created. An online connection to the CPU exists. The utilized CPU supports the force function. The "Enable peripheral outputs" function is not enabled on the CPU on which the tags are to be forced. If desired, deactivate this function in the watch table.
1096
Procedure
To force tags with the "Online > Force > Force all" command, follow these steps: 1. Open the force table. 2. Enter the desired addresses and force values in the force table. 3. Select the addresses to be forced by selecting the check boxes for forcing in the column after the "Force value". A yellow triangle appears behind the selected check box, indicating that the address is selected for forcing but is not being forced at the moment. 4. Select the "Online > Force> Force all" command in order to force the selected addresses with the specified values. 5. Confirm the next dialog with "Yes".
Result
The selected addresses are forced to the specified values. The yellow triangle is no longer displayed. A red "F" is displayed in the first column, for example, indicating that the tag is being forced.
Stop forcing
To stop forcing, follow these steps: 1. Open the force table. 2. Select the "Online > Force > Stop forcing" command. 3. Confirm the next dialog with "Yes".
Result
Forcing of the selected addresses is stopped. The red "F" in the first column is no longer displayed. The yellow triangle reappears behind the check box again to indicate that the address is selected for forcing but is not being forced at the moment. Note When forcing, note the following: Forcing can not be undone! Terminating the online connection does not stop the forcing! To stop forcing, the forced address must be visible in the active force table.
1097
9.4.4.10
Requirements
A force table has been created in which tags are being forced. An online connection to the CPU exists. The utilized CPU supports the force function. The "Enable peripheral outputs" function is not enabled on the CPU on which the tags are to be forced. If desired, deactivate this function in the watch table.
Procedure
Proceed as follows to stop forcing all tags : 1. Open the force table. 2. Select the "Online > Force > Stop forcing" command in order to stop forcing the displayed addresses. 3. Confirm the "Stop forcing" dialog with "Yes".
1098
Result
The forcing of all tags is stopped. The red "F" in the first column is no longer displayed. The yellow triangle reappears behind the check box again to indicate that the address is flagged for forcing but is not being forced at the moment.
Requirements
A force table has been created in which tags are being forced. An online connection to the CPU exists. The utilized CPU supports the force function. The "Enable peripheral outputs" function is not enabled on the CPU on which the tags are to be forced. If desired, deactivate this function in the watch table.
Procedure
Proceed as follows to stop forcing individual tags : 1. Open the force table. 2. Deactivate the check boxes for the addresses that are no longer to be forced. 3. Reselect the "Online > Force" command.
1099
Result
Forcing of the disabled addresses will be stopped. The red "F" in the first column is no longer displayed. The yellow triangle reappears behind the check box again to indicate that the address is flagged for forcing but is not being forced at the moment.
9.5
9.5.1
Overview
Configuring alarms
Introduction to alarm configuration
Alarms allow you to detect errors in process control in the automation system quickly, to localize them precisely, and to eliminate them. This leads to a significant reduction in down times in the plant. Before alarms can be output, they need to be configured. You can create, edit and compile event-dependent alarms along with their alarm texts and alarm attributes and display them on display devices. The table below lists the alarm types along with a brief description of their functions.
Alarm type PLC alarms Description PLC alarms are used to report program-synchronous event and are each assigned a block. They are created in the program editor and edited in the alarm editor. Using user diagnostic alarms you can write a user entry in the diagnostics buffer and send an appropriate alarm. They are assigned a CPU. They are created in the alarm editor and be edited there. System alarms are configuration-dependent module events and are activated or deactivated in the hardware configuration. They can only be viewed in the alarm editor, but not edited.
System alarms
9.5.2
Assigning numbers
The alarms are identified by a number that is unique within the CPU. This means that it is not necessary to recompile after copying complete programs. Copying a single block is an
1100
9.5.3
Overview
Components of an alarm
How an alarm is displayed depends on the alarm method, the alarm block used and the display device. The possible components of an alarm are listed in the following table:
Component Time stamp Alarm state Associated value Image Alarm number Alarm texts Description Generated when the alarm event occurs in the automation system. The following are possible: Incoming, outgoing, outgoing without acknowledgment, outgoing with acknowledgment. With some alarms, it is possible to add a process value that can be evaluated by the alarm instruction being used. If there is a system crash, the resulting alarms can be displayed later on HMI devices. A number assigned by the system that is unique within the CPU and identifies an alarm. Are configured by the user.
9.5.4
1101
8 1 8 1
possible no no -
up to 10 up to 10 up to 10 -
ALARM_SQ
possible
1 1 1
no possible no
1 1 1
1102
9.5.5
1103
See also
Creating and editing an alarm type (Page 1108) Creating and editing an instance DB (Page 1108)
9.5.6
C_Notify C_Alarm
NOTIFY ALARM
C_Alarm_s C_Alarm_s
ALARM_S ALARM_SQ
C_Ar_Send
AR_SEND
1104
C_Alarm_s
ALARM_DQ
C_Alarm_s
ALARM_D
9.5.7
1105
Table showing the alarms in the work area. "PLC alarms" tab: You can edit PLC alarms here. "User diagnostic alarms" tab: You can create and edit user diagnostic alarms here. "System alarms" tab: System alarms can only be viewed and cannot be edited. Inspector window
You can enter or modify the texts and attributes in the table or in the Inspector window.
9.5.8
9.5.8.1
Prerequisites
You have created a function block.
Procedure
To configure a PLC alarm, follow these steps: 1. Select the function block (FB) for which you want to create a PLC alarm in the "Program blocks" folder in the project navigation and double-click on the block to open it. 2. Fill in the block interface. For each alarm block that will be called in the FB, you will need to declare tags in the calling FB. To achieve this for example, enter the following variables: For the "IN" parameter, a name for the alarm block input, for example "Alarm01" (for alarm input 01) and the data type. 3. In the instruction window of the FB, insert the call for the selected alarm block, e.g. "CALL ALARM_S" and complete your input with the RETURN key. Result: The statement part of the FB displays the input tags of the called alarm block, in this case the ALARM_S block. 4. Assign the name for the alarm block input you named in step 2 to the "EV_ID" tag, in this case "Alarm01". Note If, instead of an alarm block in the CPU, you call an FB with multiple instances in which alarms are also configured, you would also need to configure the alarms of the FB with multiple instances in the calling block. 5. Repeat steps 2 through 4 for all alarm block calls in this FB.
1106
9.5.8.2
Prerequisites
You have created a PLC alarm.
Procedure
To edit PLC alarms, follow these steps: 1. Double-click "PLC alarms" in the project navigation. The alarm editor opens. 2. Enter the required texts and attributes in the appropriate columns. Note When you edit alarm types, you can lock texts and attributes. You can do this by clicking on the icon in front of the relevant column. If you edit alarms in instance DBs in which the texts/attributes are not locked in the alarm type, a type icon is displayed in front of the relevant column. When you click on this icon, modified texts/attributes are reset to the values of the alarm type.
9.5.8.3
Prerequisites
You have created a PLC alarm.
Procedure
To edit PLC alarms, follow these steps: 1. Select the appropriate line in the block interface. 2. Move to the "Alarm" tab in the inspector window and select the required group. 3. Enter the required texts and attributes in the appropriate fields. Note When you edit alarm types, you can lock texts and attributes. You can do this by clicking on the icon next to the relevant field. If you edit alarms in instance DBs in which the texts/attributes are not locked in the alarm type, a type icon is displayed next to the relevant field. When you click on this icon, modified texts/attributes are reset to the values of the alarm type.
1107
9.5.8.4 Procedure
To delete a PLC alarm, follow these steps: 1. Open the block containing the alarm you want to delete. 2. Select the corresponding line in the block interface and select "Delete" in the shortcut menu.
Result
The alarm is deleted.
9.5.8.5 Procedure
To edit an alarm type, follow these steps: 1. Select the required alarm block. 2. Enter the texts you require in the appropriate columns or select the required attributes. If you have selected a multichannel alarm block (for example, "ALARM_8"), you can assign a separate text and certain separate attributes to each subnumber. 3. If you do not want the texts or attributes of the instance to be changed, lock them in the alarm type.
9.5.8.6
Prerequisites
You have already created an FB and created at least one alarm in it.
1108
Procedure
To assign instance data blocks (DBs) to an alarm type and to edit the alarms for these DBs for specific instances, follow the steps below: 1. Double-click on "Add new block" in the project navigation, click on the "Data block (BD)" button that appears in the dialog and select the function block (alarm type) to which you want to assign the instance DB from the "Type" drop-down list. 2. Now click in the inspector window on the "Alarm" tab and select the group you want. Or: Double-click in the project navigation on "PLC alarms" to open the alarm configuration. 3. Make the changes you require for the particular instance DB. Note If the properties of the instance DB are write-protected then you must first unlock them in alarm type (FB).
Result
This completes the alarm configuration for the selected instance DB.
9.5.8.7
Procedure
To configure a user diagnostic alarm, follow these steps: 1. Double-click on the "PLC alarms" folder in project navigation to open the alarm editor. 2. Select the "User diagnostic alarms" tab in the alarm editor. 3. Click in the table and select "Insert new alarm" in the shortcut menu.
Result
You have created a user diagnostic alarm.
9.5.8.8
Prerequisites
You have created a user diagnostic alarm. The alarm editor is open.
1109
Procedure
To edit a user diagnostic alarm, follow these steps: 1. Enter the required texts and attributes in the appropriate columns.
9.5.8.9
Procedure
Follow the steps below to delete a user diagnostic message: 1. Select the corresponding row in the table and select "Delete" in the shortcut menu.
Result
The alarm is deleted. It is no longer displayed in the table.
9.5.8.10
Entering texts
You can enter the texts for alarms manually or you can use the default values.
Info text
The info text is a text that can be specified for certain display devices. With certain groups of devices (for example WinCC), it can be changed during run time.
Additional texts
Additional texts are texts that can be displayed by certain HMI devices. Click in the relevant row and type in the text. If you want to protect the text from being overwritten, click the option in the column. The texts can include line breaks.
See also
Locking texts (Page 1111)
1110
9.5.8.11
Locking texts
Locking texts
Follow the steps below to lock texts: 1. Start by editing the alarm types. 2. Click on the icon beside the input box you want to lock. Result: The icon changes to a closed chain link.
Unlocking texts
To unlock texts, follow the steps below: 1. Start by editing the alarm types. 2. Click on the icon beside the input box you want to unlock. Result: The icon changes to an open chain link.
9.5.8.12
Locking attributes
Locking attributes
Follow the steps below to lock attributes: 1. Start by editing the alarm types. 2. Click on the icon to the left of the input box you want to lock in the table. Result: The icon changes to a closed chain link.
1111
Unlocking attributes
Follow the steps below to unlock attributes: 1. Start by editing the alarm types. 2. Click on the icon to the left of the input box you want to unlock in the table. Result: The icon changes to an open chain link.
9.5.8.13
Procedure
To insert an associated value into an alarm, follow these steps: 1. Configure a block as follows: @<No. of associated value><Element type><Format>@. 2. Insert this block at the locations in the alarm text at which the associated value is to be shown.
See also
Structure of associated values (Page 1112) Examples of associated values (Page 1113)
9.5.8.14
Element type
This uniquely configures the data type of the associated value:
Element type Y W X I D B C R Data type BYTE WORD DWORD Integer DINT BOOL CHAR REAL
1112
Format
Determine the output format for the associated value on the display device. The format is preceded by the "%" sign. The following fixed formats apply to alarm texts:
Format %[i]X %[i]u %[i]d %[i]b %[i][.y]f Description Hexadecimal number with i digits Decimal number without sign with i digits Decimal number with sign with i digits Binary number with i digits Fixed number of points Signed value of the form dddd: one or more numbers with y digits after the decimal point and total number of digits i %[i]s String (ANSI string) with i digits Characters are printed up to the first 0 Byte (00Hex). %t#<Name of text library> Access to text library
If the format is too small then the value is nevertheless output in full. If the format is too large then an appropriate number of empty characters are output before the value. Note Please note that you can optionally enter "[i]", without the square brackets.
See also
Insert associated values in alarms (Page 1112) Examples of associated values (Page 1113)
9.5.8.15
1113
See also
Insert associated values in alarms (Page 1112) Structure of associated values (Page 1112)
9.5.8.16
Procedure:
Follow the steps below to delete associated values: 1. Find the block in the alarm text that corresponds to the associated value you want to delete. The block begins with the "@" character followed by the location ID by which you can recognize the associated value, there is then format information and it ends with the "@" character. 2. Delete the block you have found from the alarm text.
9.5.9
9.5.9.1
1114
See also
Text lists (Page 227)
9.5.9.2
Requirement
The user interface language and the project language must be the same during editing.
Procedure
Follow the steps below to edit text lists: 1. Double-click on the "Text lists" command below "Common data" in project navigation or select the context command "Go to text list" in the alarm editor. The text list editor opens. 2. Select the text list you want to edit from the table. 3. Change the values as required. You can change the following values: Text titles: With the exception of the Info text, the titles for the alarm texts (alarm text, additional texts) can be freely configured to suit your purposes. Names of attribute values: Many of the names for attribute values (for example Priority, Display class, ...) can be configured freely. The index in the system text list matches the index in the selection box of the corresponding attribute in the alarm editor. Example: If you enter the text "Priority_0" at index 0 in the priority text list, the same text will be displayed at the first position in the selection box in the alarm editor.
9.5.9.3
1115
Procedure
To integrate texts from text lists in alarms, follow the steps below: 1. Double-click on the "Text lists" command below the PLC in the program navigation. The text list editor opens 2. Find the index of the text you want to integrate. 3. Put a placeholder in the format @[Index]%t#[textlist]@ at the point at which you want the text to appear. Note [Index] = for example, 1W, where 1W is the first associated value of the alarm of the type WORD.
9.5.9.4
The associated value is supplied with the value 1734. The following alarm text is displayed: Pressure has risen too high.
See also
Integrating texts from text lists in alarms (Page 1115)
9.5.10
9.5.10.1
Alarm classes
Creating alarm classes
You can configure alarm classes to suit your purposes. You can create and edit them in the alarm class editor. An alarm can then by assigned to an alarm class in the alarm editor.
Prerequisites
You have opened the "Common data" folder in project navigation.
1116
Procedure
To configure an alarm class, follow these steps: 1. Double click on the "Alarm classes" entry in project navigation. The alarm class editor opens. 2. Select "Insert new alarm class" in the shortcut menu. 3. Enter a unique name for the new alarm class in the "Name" column. The language of the name you assign here is neutral. 4. Enter a display name in the "Display name" column. This name is translatable. 5. Select whether or not this alarm class requires acknowledgment in the "With acknowledgment" column.
9.5.10.2
Result
The copied alarm class is appended to the end of the table under a new name. The name of the new alarm class is made up as follows: <old name><no.> no.: This the lowest free natural number.
1117
9.6
9.6.1
9.6.1.1
Introduction
You can export PLC tag tables to a standardized XLSX format for editing with external table editors. Similarly, you can import PLC tag tables created with external table editors to the TIA Portal.
See also
Format of the export file (Page 1118) Exporting PLC tags (Page 1119) Importing PLC tags (Page 1120)
9.6.1.2
Introduction
During the export of PLC tag tables, a standardized XSLX format will be generated that you can edit with external table editors. This format is also expected during the import of tables.
1118
See also
Basics for importing and exporting (Page 1118) Exporting PLC tags (Page 1119) Importing PLC tags (Page 1120)
9.6.1.3
Requirement
A PLC tag table is open.
Procedure
To export PLC tags and constants, follow these steps: 1. In the PLC tag table, click the "Export" button. The "Export to Excel" dialog opens. 2. Select the path to which you want to save the export file. 3. Select whether to export tags and/or constants. 4. Click the "OK" button.
Result
The export file will be generated. Errors and warnings generated during export are indicated in the "Info" tab of the Inspector window.
1119
See also
Basics for importing and exporting (Page 1118) Format of the export file (Page 1118) Importing PLC tags (Page 1120)
9.6.1.4
Requirement
A table exists and it conforms to format specifications.
Procedure
To import a PLC tag table, follow these steps: 1. Open the "All tags" table. 2. Click the "Import" button. The "Import from Excel" dialog opens. 3. Select whether to import PLC tags and/or constants. 4. Select the table you want to import. 5. Click the "OK" button.
Result
The PLC tag table will be imported. Errors and warnings generated during export are indicated in the "Info" tab of the Inspector window.
See also
Basics for importing and exporting (Page 1118) Format of the export file (Page 1118) Exporting PLC tags (Page 1119)
1120
9.7
9.7.1
9.7.1.1
Programming examples
LAD programming examples
Example of controlling a conveyor belt
Implementation
The following table shows the definition of the tags used:
Name Startschalter_Links (S1) Stoppschalter_Links (S2) Startschalter_Rechts (S3) Stoppschalter_Rechts (S4) MOTOR_ON Data type Bool Bool Bool Bool Bool Comment Start switch on the left side of the conveyor belt Stop switch on the left side of the conveyor belt Start switch on the right side of the conveyor belt Stop switch on the right side of the conveyor belt Turn on the conveyor belt motor
The following networks show the LAD programming for solving this task: Network 1: The conveyor belt motor is switched on when Start switch "S1" or "S3" is pressed.
1121
Network 2: The conveyor belt motor is switched off when Stop switch "S2" or "S4" is pressed.
9.7.1.2
Implementation
The following table shows the definition of the tags used:
Name PEB1 PEB2 RIGHT LEFT Data type Bool Bool Bool Bool Comment Photoelectric barrier 1 Photoelectric barrier 2 Display during movement to right Display during movement to left
1122
The following networks show the LAD programming for solving this task: Network 1: If the signal changes from "0" to "1" (positive edge) at "PEB1" and, at the same time, the signal state at "PEB2" is "0", then the package on the belt is moving to the left.
Network 2: If the signal changes from "0" to "1" (positive edge) at "PEB2" and, at the same time, the signal state at "PEB1" is "0", then the package on the belt is moving to the right.
9.7.1.3
1123
Implementation
The following table shows the definition of the tags used:
Name PEB1 PEB2 RESET LOAD STOCK PACKAGECOUNT Data type BOOL BOOL BOOL BOOL INT INT Comment Photoelectric barrier 1 Photoelectric barrier 2 Reset counter Set counter to value of "PV" parameter Stock at restart Number of packages in the storage area (current count value) Is set if the current count value is greater than or equal to the value of the tag "STOCK". Display lamp: Storage area empty Display lamp: Storage area not empty Display lamp: Storage area 50 % full Display lamp: Storage area 90% full Display lamp: Storage area full Comparison value: 50 packages
STOCK_PACKAGE
BOOL
1124
The following networks show the LAD programming for activating the lamps: Network 1: When a package is delivered to the storage area, the signal state at "PEB1" switches from "0" to "1" (positive signal edge). On a positive signal edge at "PEB1", the "Up" counter is enabled, and the current count value of "PACKAGECOUNT" is increased by one. When a package is delivered from the storage area to the loading dock, the signal state at "PEB2" switches from "0" to "1" (positive signal edge). On a positive signal edge at "PEB2", the "Down" counter is enabled, and the current count value of "PACKAGECOUNT" is decreased by one. If there are no packages in the storage area ("PACKAGECOUNT" = "0"), the "STOR_EMPTY" tag is set to signal state "1", and the "Storage area empty" lamp is switched on. The current count value can be reset to "0" if the "RESET" tag is set to signal state "1". If the "LOAD" tag is set to signal state "1", the current count value is set to the value of the "STOCK" tag. If the current count value is greater than or equal to the value of the "STOCK" tag , the "STOCK_PACKAGE" tag supplies the signal state "1".
Network 2: As long as there are packages in the storage area the "STOR_NOT_EMPTY" tag is set to signal state "1", and the "Storage area not empty" lamp is switched on.
1125
Network 4: If the number of packages in the storage area is greater than or equal to 90, the "Storage area 90% full" lamp switches on.
Network 5: If the number of packages in the storage area reaches 100, the "Storage area full" lamp switches on.
9.7.1.4
1126
Implementation
The following table shows the definition of the tags used:
Name Sensor Reset Stop MaxCoolTime Data type BOOL BOOL BOOL TIME Comment Temperature sensor signal Restart The cooling system is switched off. Predetermined cooling time This tag is defined in the "DB_Cool" data block. CurrCoolTime TIME Currently elapsed cooling time This tag is defined in the "DB_Cool" data block. CoolSystem Lamp TempVariable BOOL BOOL BOOL The cooling system is switched on. The "Cooling system On" lamp is switched on. Temporary variable This tag stores the signal status of the IEC timer TP.
The following network shows the LAD programming for controlling room temperature: Network 1:
Network 2:
1127
When the temperature in the cold room rises above zero degrees Celsius, the signal state at the "Sensor" operand switches from "0" to "1" (positive signal edge). In case of a positive signal edge at the input IN, the timer function for the preset cooling time is started and the "TempVariable" receives the signal state "1". The signal state "1" of the "TempVariable" causes the cooling system and the display lamp to be turned on in network 2. The outputs "Sensor", "Cooling system" and "Lamp" must be programmed in network 2, because you can program only one coil at output Q of the timer function. If the temperature in the cold room falls below zero degrees Celsius, the signal state of the sensor switches back to "0". This switches the cooling system and lamp off. If the sensor does not signal a temperature drop, the cooling system and lamp are switched off after the predetermined cooling time has elapsed, at the latest. In this case, the cooling process can be restarted by pressing the "Reset" push-button switch. Pressing and releasing the push-button switch generates a new positive signal edge at input IN, which restarts the cooling system. The cooling system and the display lamps can be turned off with the pushbutton switch "Stop" at any time.
9.7.2
9.7.2.1
1128
Implementation
The following table shows the definition of the tags used:
Name Startschalter_Links (S1) Stoppschalter_Links (S2) Startschalter_Rechts (S3) Stoppschalter_Rechts (S4) MOTOR_ON Data type Bool Bool Bool Bool Bool Comment Start switch on the left side of the conveyor belt Stop switch on the left side of the conveyor belt Start switch on the right side of the conveyor belt Stop switch on the right side of the conveyor belt Turn on the conveyor belt motor
The following networks show the FBD programming for accomplishing this task: Network 1: The conveyor belt motor is switched on when Start switch "S1" or "S3" is pressed.
Network 2: The conveyor belt motor is switched off when Stop switch "S2" or "S4" is pressed.
1129
9.7.2.2
Implementation
The following table shows the definition of the tags used:
Name PEB1 PEB2 RIGHT LEFT CM1 CM2 Data type Bool Bool Bool Bool Bool Bool Comment Photoelectric barrier 1 Photoelectric barrier 2 Display during movement to right Display during movement to left Edge bit memory 1 Edge bit memory 2
The following networks show the FBD programming for solving this task: Network 1: If the signal changes from "0" to "1" (positive edge) at "PEB1" and, at the same time, the signal state at "PEB2" is "0", then the package on the belt is moving to the left.
Network 2: If the signal state changes from "0" to "1" (positive edge) at "PEB2" and, at the same time, the signal state at "PEB1" is "0", then the package on the belt is moving to the right.
1130
9.7.2.3
Figure 9-1
1131
Implementation
The following table shows the definition of the tags used:
Name PEB1 PEB2 RESET LOAD STOCK PACKAGECOUNT Data type BOOL BOOL BOOL BOOL INT INT Comment Photoelectric barrier 1 Photoelectric barrier 2 Reset counter Set counter to value of "CV" parameter Stock at restart Number of packages in the storage area (current count value) Is set if the current count value is greater than or equal to the value of the tag "STOCK". Display lamp: Storage area empty Display lamp: Storage area not empty Display lamp: Storage area 50 % full Display lamp: Storage area 90% full Display lamp: Storage area full Comparison value: 50 packages Comparison value: 90 packages Comparison value: 100 packages
STOCK_PACKAGE
BOOL
The following networks show the FBD programming for activating the lamps: Network 1: When a package is delivered to the storage area, the signal state at "PEB1" switches from "0" to "1" (positive signal edge). On a positive signal edge at "PEB1", the "Up" counter is enabled, and the current count value of "PACKAGECOUNT" is increased by one. When a package is delivered from the storage area to the loading dock, the signal state at "PEB2" switches from "0" to "1" (positive signal edge). On a positive signal edge at "PEB2", the "Down" counter is enabled, and the current count value of "PACKAGECOUNT" is decreased by one. If there are no packages in the storage area ("PACKAGECOUNT" = "0"), the "STOR_EMPTY" tag is set to signal state "1", and the "Storage area empty" lamp is switched on. The current count value can be reset to "0" if the "RESET" tag is set to signal state "1". If the "LOAD" tag is set to signal state "1", the current count value is set to the value of the "STOCK" tag. If the current count value is greater than or equal to the value of the "STOCK" tag , the "STOCK_PACKAGE" tag supplies the signal state "1".
1132
Figure 9-2
Network 2: As long as there are packages in the storage area the "STOR_NOT_EMPTY" tag is set to signal state "1", and the "Storage area not empty" lamp is switched on.
Network 3: If the number of packages in the storage area is greater than or equal to 50, the "Storage area 50 % full" lamp switches on.
Figure 9-3
Network 4: If the number of packages in the storage area is greater than or equal to 90, the "Storage area 90% full" lamp switches on.
1133
Figure 9-4
Network 5: If the number of packages in the storage area reaches 100, the "Storage area full" lamp switches on.
9.7.2.4
1134
Implementation
The following table shows the definition of the tags used:
Name Sensor Reset Stop MaxCoolTime Data type BOOL BOOL BOOL TIME Comment Temperature sensor signal Restart The cooling system is switched off. Predetermined cooling time This tag is defined in the "DB_Cool" data block. CurrCoolTime TIME Currently elapsed cooling time This tag is defined in the "DB_Cool" data block. CoolSystem Lamp TempVariable BOOL BOOL BOOL The cooling system is switched on. The "Cooling system On" lamp is switched on. Temporary variable This tag stores the signal status of the IEC timer TP.
The following network shows the FBD programming for controlling room temperature: Network 1:
Network 2:
1135
When the temperature in the cold room rises above zero degrees Celsius, the signal state at the "Sensor" operand switches from "0" to "1" (positive signal edge). In case of a positive signal edge at the input IN, the timer function for the preset cooling time is started and the "TempVariable" receives the signal state "1". The signal state "1" of the "TempVariable" causes in network 2 that the cooling system as well as the display lamp are turned on. The outputs "Sensor", "Cooling system" and "Lamp" must be programmed in network 2, because you can program only one coil at output Q of the timer function. If the temperature in the cold room falls below zero degrees Celsius, the signal state of the sensor switches back to "0". This switches the cooling system and lamp off. If the sensor does not signal a temperature drop, the cooling system and lamp are switched off after the predetermined cooling time has elapsed, at the latest. In this case, the cooling process can be restarted by pressing the "Reset" push-button switch. Pressing and releasing the push-button switch generates a new positive signal edge at input IN, which restarts the cooling system. The cooling system and the display lamps can be turned off with the pushbutton switch "Stop" at any time.
9.8
9.8.1
9.8.1.1
References
General parameters of the instructions
Meaning of the parameters REQ, RET_VAL and BUSY with asynchronous instructions
Asynchronous instructions
For instructions that work asynchronously, the function is executed with several calls.
1136
Parameter REQ
The input parameter REQ (request) is used solely to start the job: If you call the instruction for a job that is not currently active, the job is started with REQ = 1 (case 1). If a particular job has been started and not yet completed and you call the instruction again to perform the same job (for example, in a cyclic interrupt OB), then REQ is not evaluated by the instruction (case 2).
Overview
The following table provides you with an overview of the relationships explained above. In particular, it shows the possible values of the output parameters if the execution of the job is not completed after an instruction call has been completed. Note Following every call, you must evaluate the relevant output parameters in your program. Relationship between call, REQ, RET_VAL and BUSY during execution of a "running" job.
1137
9.8.1.2
1138
1139
Note If a general error code was entered in RET_VAL, then the following situations are possible: The action associated with the instruction may have been started or already completed. A specific instruction error may have occurred when the action was performed. As a result of a general error that occurred later, the specific error could, however, no longer be indicated.
1140
1141
9.8.2
9.8.2.1
Simple instructions
LAD
Parameters
The following table shows the parameters of the instruction:
Parameters <Operand> Declaration Input Data type BOOL Memory area I, Q, M, D, L Description Operand whose signal state is queried.
Example
The following example shows how the instruction works:
Operand "TagOut" is set when one of the following conditions is fulfilled: The operands "TagIn_1" and "TagIn_2" have the signal state "1". The operand "TagIn_3" has the signal state "1".
1142
See also
Overview of the valid data types (Page 677) Example of controlling a conveyor belt (Page 1121) Example of detecting the fill level of a storage area (Page 1123) Example of controlling room temperature (Page 1126)
Parameters
The following table shows the parameters of the instruction:
Parameters <Operand> Declaration Input Data type BOOL Memory area I, Q, M, D, L Description Operand whose signal state is queried.
Example
The following example shows how the instruction works:
Operand "TagOut" is set when one of the following conditions is fulfilled: The operands "TagIn_1" and "TagIn_2" have the signal state "1". The operand "TagIn_3" has the signal state "0".
1143
See also
Overview of the valid data types (Page 677) Example of detecting the direction of a conveyor belt (Page 1122) Example of controlling room temperature (Page 1126) Example of detecting the fill level of a storage area (Page 1123)
Example
The following example shows how the instruction works:
Operand "TagOut" is reset when one of the following conditions is fulfilled: The operand "TagIn_1" has the signal state "1". The signal state of the operands "TagIn_2" and "TagIn_3" is "1".
1144
Parameter
The following table shows the parameters of the "Assignment" instruction:
Parameter <Operand> Declaration Output Data type BOOL Memory area I, Q, M, D, L Description Operand to which the RLO is assigned.
Example
The following example shows how the instruction works:
The "TagOut_1" operand is set when one of the following conditions is fulfilled: The operands "TagIn_1" and "TagIn_2" have signal state "1". The signal state of the operand "TagIn_3" is "0". The "TagOut_2" operand is set when one of the following conditions is fulfilled: Operands "TagIn_1", "TagIn_2", and "TagIn_4" have signal state "1". The signal state of the "TagIn_3" operand is "0" and the signal state of the "TagIn_4" operand is "1".
See also
Overview of the valid data types (Page 677) Example of detecting the fill level of a storage area (Page 1123) Example of controlling room temperature (Page 1126)
1145
Parameters
The following table shows the parameters of the "Negate assignment" instruction:
Parameters <Operand> Declaration Output Data type BOOL Memory area I, Q, M, D, L Description Operand to which the RLO is assigned.
Example
The following example shows how the instruction works:
Operand "TagOut_1" is reset when one of the following conditions is fulfilled: The operands "TagIn_1" and "TagIn_2" have the signal state "1". The signal state of the operand "TagIn_3" is "0".
See also
Overview of the valid data types (Page 677)
1146
Parameter
The following table shows the parameters of the "Reset output" instruction:
Parameter <Operand> Declaration Output Data type BOOL Memory area I, Q, M, D, L Description Operand which is reset with RLO = "1".
Example
The following example shows how the instruction works:
Operand "TagOut" is reset when one of the following conditions is fulfilled: The operands "TagIn_1" and "TagIn_2" have signal state "1". The signal state of the operand "TagIn_3" is "0".
See also
Overview of the valid data types (Page 677) Example of controlling a conveyor belt (Page 1121) Example of detecting the direction of a conveyor belt (Page 1122)
1147
Parameter
The following table shows the parameters of the "Set output" instruction:
Parameter <Operand> Declaration Output Data type BOOL Memory area I, Q, M, D, L Description Operand which is set with RLO = "1".
Example
The following example shows how the instruction works:
The "TagOut" operand is set when one of the following conditions is fulfilled: The operands "TagIn_1" and "TagIn_2" have signal state "1". The signal state of the operand "TagIn_3" is "0".
See also
Overview of the valid data types (Page 677) Example of controlling a conveyor belt (Page 1121) Example of detecting the direction of a conveyor belt (Page 1122)
1148
Parameter
The following table shows the parameters of the "Set bit field" instruction:
Parameter <Operand1> <Operand2> Declaration Input Output Data type UINT BOOL Memory area Constant I, Q, M Description Number of bits to be set
Pointer to the first bit to be set. With a DB or an IDB, an element of a array [..] of BOOL
Example
The following example shows the mode of operation of the "Set bit field" instruction:
If the operands "TagIn_1" and "TagIn_2" have the signal state "1", 5 bits are set starting at the address of the operand "MyDB".MyBoolArray[4].
See also
Overview of the valid data types (Page 677)
1149
Parameters
The following table shows the parameters of the "Reset bit field" instruction:
Parameters <Operand1> <Operand2> Declaration Input Output Data type UINT BOOL Memory area Constant I, Q, M Description Number of bits to be reset
Pointer to the first bit to be reset. With a DB or an IDB, an element of a array [..] of BOOL
Example
The following example shows the mode of operation of the "Reset bit field" instruction:
If the operands "TagIn_1" and "TagIn_2" have the signal state "1", 5 bits are reset starting at the address of the operand "MyDB".MyBoolArray[4].
See also
Overview of the valid data types (Page 677)
1150
Parameter
The following table shows the parameters of the "Set/reset flip-flop" instruction:
Parameter S R1 <Operand> Q Declaration Input Input Output Output Data type BOOL BOOL BOOL BOOL Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L Description Enable setting Enable resetting Operand that is set or reset Signal state of the operand
Example
The following example shows how the "Set/reset flip-flop" instruction works:
The operands "TagSR" and "TagOut" are set when the following conditions are fulfilled: The operand "TagIn_1" has the signal state "1". The operand "TagIn_2" has the signal state "0". The operands "TagSR" and "TagOut" are reset when one of the following conditions is fulfilled: The operand "TagIn_1" has signal state "0" and the operand "TagIn_2" has signal state "1". The operands "TagIn_1" and "TagIn_2" have signal state "1".
See also
Overview of the valid data types (Page 677)
1151
Parameter
The following table shows the parameters of the "Reset/set flip-flop" instruction:
Parameter R S1 <Operand> Q Declaration Input Input Output Output Data type BOOL BOOL BOOL BOOL Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L Description Enable resetting Enable setting Operand that is reset or set Signal state of the operand
Example
The following example shows how the "Reset/set flip-flop" instruction works:
The operands "TagRS" and "TagOut" are reset when the following conditions are fulfilled: The operand "TagIn_1" has the signal state "1". The operand "TagIn_2" has the signal state "0". The operands "TagRS" and "TagOut" are set when one of the following conditions is fulfilled: The operand "TagIn_1" has signal state "0" and the operand "TagIn_2" has signal state "1". The operands "TagIn_1" and "TagIn_2" have signal state "1".
1152
Parameter
The following table shows the parameters of the "Scan operand for positive signal edge" instruction:
Parameter <Operand1> <Operand2> Declaration Input InOut Data type BOOL BOOL Memory area I, Q, M, D, L I, Q, M, D, L Description Signal to be scanned Edge memory bit in which the signal state of the previous scan is saved
Example
The following example shows how the "Scan operand for positive signal edge" instruction works:
Operand "TagOut" is set when the following conditions are fulfilled: Operands "TagIn_1", "TagIn_2", and "TagIn_3" have signal state "1". There is a rising edge at operand "TagIn_4". The signal state of the previous scan is stored in the edge memory bit "Tag_M". The signal state of the operand "TagIn_5" is "1".
See also
Overview of the valid data types (Page 677) Example of detecting the direction of a conveyor belt (Page 1122)
STEP 7 Basic V11.0 SP2 System Manual, 12/2011,
1153
Parameter
The following table shows the parameters of the "Scan operand for negative signal edge" instruction:
Parameter <Operand1> <Operand2> Declaration Input InOut Data type BOOL BOOL Memory area I, Q, M, D, L I, Q, M, D, L Description Signal to be scanned Edge memory bit in which the signal state of the previous scan is saved
Example
The following example shows how the "Scan operand for negative signal edge" instruction works:
1154
See also
Overview of the valid data types (Page 677)
Parameters
The following table shows the parameters of the "Set operand on positive signal edge" instruction:
Parameters <Operand1> Declaration Output Data type BOOL Memory area I, Q, M, D, L Description Operand which is set by a positive edge. Edge memory bit
<Operand2>
InOut
BOOL
I, Q, M, D
1155
Example
The following example shows how the instruction works:
Operand "TagOut" is set for one program cycle, when the signal state at the input of the coil switches from "0" to "1" (positive edge). In all other cases, the operand "TagOut" has the signal state "0".
See also
Overview of the valid data types (Page 677)
1156
Parameters
The following table shows the parameters of the "Set operand on negative signal edge" instruction:
Parameters <Operand1> Declaration Output Data type BOOL Memory area I, Q, M, D, L Description Operand which is set by a negative edge. Edge memory bit
<Operand2>
InOut
BOOL
I, Q, M, D
Example
The following example shows how the instruction works:
Operand "TagOut" is set for one program cycle, when the signal state at the input of the coil switches from "1" to "0" (negative edge). In all other cases, the operand "TagOut" has the signal state "0".
See also
Overview of the valid data types (Page 677)
1157
Parameters
The following table shows the parameters of the "Scan RLO for positive signal edge" instruction:
Parameters CLK <Operand> Declaration Input InOut Data type BOOL BOOL Memory area I, Q, M, D, L I, Q, M, D, L Description Current RLO Edge memory bit in which the RLO of the previous query is saved. Result of edge evaluation
Output
BOOL
I, Q, M, D, L
Example
The following example shows how the instruction works:
The RLO of the previous query is saved in the edge memory bit "Tag_M". If a "0" to "1" change is detected in the signal state of the RLO, the program jumps to jump label CAS1.
See also
Overview of the valid data types (Page 677)
1158
Parameters
The following table shows the parameters of the "Scan RLO for negative signal edge" instruction:
Parameters CLK <Operand> Declaration Input InOut Data type BOOL BOOL Memory area I, Q, M, D, L I, Q, M, D, L Description Current RLO Edge memory bit in which the RLO of the previous query is saved. Result of edge evaluation
Output
BOOL
I, Q, M, D, L
Example
The following example shows how the instruction works:
The RLO of the previous query is saved in the edge memory bit "Tag_M". If there is a change in the signal state of the RLO from "1" to "0", the program jumps to jump label CAS1.
1159
See also
Overview of the valid data types (Page 677)
1160
Parameters
The following table shows the parameters of the "Generate pulse" instruction:
Parameters IN PT Declaration Input Input Data type BOOL TIME Memory area I, Q, M, D, L I, Q, M, D, L or constant Description Start input Duration of the pulse. The value of the PT parameter must be positive. Q ET Output Output BOOL TIME I, Q, M, D, L I, Q, M, D, L Pulse output Current time value
Pulse diagram
The following figure shows the pulse diagram of the "Generate pulse" instruction:
See also
Overview of the valid data types (Page 677) Example of controlling room temperature (Page 1126)
1161
Parameters
The following table shows the parameters of the "Generate on-delay" instruction:
Parameters IN PT Declaration Input Input Data type BOOL TIME Memory area I, Q, M, D, L I, Q, M, D, L or constant Description Start input Duration of the on delay. The value of the PT parameter must be positive.
1162
ET
Output
TIME
I, Q, M, D, L
Pulse diagram
The following figure shows the pulse diagram of the "Generate on-delay" instruction:
See also
Overview of the valid data types (Page 677)
1163
Parameters
The following table shows the parameters of the "Generate off-delay" instruction:
Parameters IN PT Declaration Input Input Data type BOOL TIME Memory area I, Q, M, D, L I, Q, M, D, L or constant Description Start input Duration of the off delay. The value of the PT parameter must be positive.
1164
ET
Output
TIME
I, Q, M, D, L
Pulse diagram
The following figure shows the pulse diagram of the "Generate off-delay" instruction:
See also
Overview of the valid data types (Page 677)
1165
Parameters
The following table shows the parameters of the "Time accumulator" instruction:
Parameters IN R PT Declaration Input Input Input Data type BOOL BOOL TIME Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant Description Start input Reset input Maximum duration of time recording The value of the PT parameter must be positive. Q Output BOOL I, Q, M, D, L Output that is set when the time PT expires. Accumulated time
ET
Output
TIME
I, Q, M, D, L
Pulse diagram
The following figure shows the pulse diagram of the "Time accumulator" instruction:
1166
See also
Overview of the valid data types (Page 677)
1167
Parameters
The following table shows the parameters of the instruction "Start pulse timer":
Parameters <Time duration> Declaration Input Data type TIME Memory area I, Q, M, D, L or constant D, L Description Duration with which the IEC timer runs IEC timer that is started
<IEC timer>
InOut
IEC_TIMER/TP
Example
The following example shows how the instruction works:
The "Start pulse timer" instruction is executed when the signal state of the operand "Tag_Input" changes from "0" to "1". Timer "DB1."MyIEC_TIMER starts running for the time duration that is stored in operand "TagTime".
As long as the timer "DB1".MyIEC_TIMER is running, the timer status ("DB1"MyIEC_TIMER.Q) has the signal state "1" and the operand "Tag_Output" is set. When the IEC timer has expired, the signal state of the timer status changes back to "0" and the "Tag_Output" operand is reset.
See also
Overview of the valid data types (Page 677)
1168
Parameters
The following table shows the parameters of the instruction "Start on-delay timer":
Parameters <Time duration> Declaration Input Data type TIME Memory area I, Q, M, D, L or constant D, L Description Duration with which the IEC timer runs IEC timer that is started
<IEC timer>
InOut
IEC_TIMER/TON
Example
The following example shows how the instruction works:
1169
If the timer "MyIEC_TIMER" has expired and the operand "Tag_Input" has the signal state "1", querying the timer status ("MyIEC_TIMER".Q) returns signal state "1" and the "Tag_Output" operand is set. When the signal state of the operand "Tag_Input" changes to "0", the querying of the timer status returns the signal state "0" and the operand "Tag_Output" is reset.
See also
Overview of the valid data types (Page 677)
1170
Parameters
The following table shows the parameters of the instruction "Start off-delay timer":
Parameters <Time duration> Declaration Input Data type TIME Memory area I, Q, M, D, L or constant D, L Description Duration with which the IEC timer runs IEC timer that is started
<IEC timer>
InOut
IEC_TIMER/TOF
Example
The following example shows how the instruction works:
The "Start off-delay timer" instruction is executed when the signal state of the operand "Tag_Input" changes from "1" to "0". Timer #MyIEC_TIMER starts running for the time duration that is stored in operand "TagTime".
As long as timer #MyIEC_TIMER is running, the query of the timer status (#MyIEC_TIMER.Q) returns the signal state "1" and operand "Tag_Output" is set. If the timer has expired and the operand "Tag_Input" has the signal state "0", the query of the timer status returns the signal state "0". If the signal state of the operand "Tag_Input" changes to "1" before timer #MyIEC_TIMER expires, the timer is reset. When the signal state of the operand "Tag_Input" is "1", the query of the timer status returns the signal state "1".
See also
Overview of the valid data types (Page 677)
1171
Parameters
The following table shows the parameters of the "Time accumulator" instruction:
Parameters <Time duration> Declaration Input Data type TIME Memory area I, Q, M, D, L or constant D, L Description Duration with which the IEC timer runs IEC timer that is started
<IEC timer>
InOut
IEC_TIMER/ TONR
Example
The following example shows how the instruction works:
The "Time accumulator" instruction executes on a positive signal edge in the RLO. The time is recorded as long as the operand "Tag_Input" has the signal state "1".
1172
See also
Overview of the valid data types (Page 677)
Parameters
The following table shows the parameters of the instruction "Reset timer":
Parameters <IEC timer> Declaration Output Data type IEC_TIMER, TON, TOF, TP Memory area D, L Description IEC timer that is reset.
Example
The following example shows how the instruction works:
The "Generate on-delay" instruction executes when the signal state of the "Tag_Input_1" operand changes from "0" to "1". The timer stored in the "TON_DB" instance data block starts running for the time duration specified by operand "Tag_PT".
1173
If operands "Tag_Input_2" and "Tag_Input_3" have the signal state "1", the "Reset timer" instruction is executed and the timer stored in the "TON_DB" data block is reset.
See also
Overview of the valid data types (Page 677)
1174
Parameters
The following table shows the parameters of the "Load time duration" instruction:
Parameters <Time duration> <IEC timer> Declaration Input Output Data type TIME IEC_TIMER, TON, TOF, TP Memory area I, Q, M, D, L or constant D, L Description Time duration that is set IEC timer whose duration is set
Example
The following example shows how the instruction works:
The "Generate on-delay" instruction executes when the signal state of the "Tag_Input_1" operand changes from "0" to "1". The IEC timer stored in the "TON_DB" instance data block starts running for the time duration specified by operand "Tag_PT".
When the "Tag_Input_2" operand has signal state "1", the "Load time duration" instruction executes. The instruction writes the time duration "Tag_PT_2" to the "TON_DB" instance data block, overwriting the value of the "Tag_PT" operand in the data block. The signal state of the timer status may therefore change at the next query.
See also
Overview of the valid data types (Page 677)
1175
1176
Parameters
The following table shows the parameters of the "Count up" instruction:
Parameters CU R PV Q CV Declaration Input Input Input Output Output Data type BOOL BOOL Integers BOOL Integers Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L I, Q, M, D, L Description Count input Reset input Value at which the output Q is set. Counter status Current count value
You can select the data type for the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
Example
The following example shows how the instruction works:
When the signal state of the "TagIn_1" operand changes from "0" to "1", the "Count up" instruction executes and the current count value of the "Tag_CV" operand is incremented by one. With each additional positive signal edge, the count value is incremented until the high limit of the specified data type (32 767) is reached. The value of the PV parameter is adopted as the limit for determining the "TagOut" output. The "TagOut" output has signal state "1" as long as the current count value is greater than or equal to the value of the "Tag_PV" operand. In all other cases, the "TagOut" output has signal state "0".
See also
Overview of the valid data types (Page 677)
1177
1178
Parameters
The following table shows the parameters of the "Count down" instruction:
Parameters CD LD PV Q CV Declaration Input Input Input Output Output Data type BOOL BOOL Integers BOOL Integers Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L I, Q, M, D, L Description Count input Load input Value at which the output Q is set. Counter status Current count value
You can select the data type of the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
Example
The following example shows how the instruction works:
When the signal state of the "TagIn_1" operand changes from "0" to "1", the "Count down" instruction executes and the value at the "Tag_CV" output is decremented by one. With each additional positive signal edge, the count value is decremented until the low limit of the specified data type (-32 768) is reached. The "TagOut" output has signal state "1" as long as the current count value is less than or equal to zero. In all other cases, the "TagOut" output has signal state "0".
See also
Overview of the valid data types (Page 677)
1179
1180
Parameters
The following table shows the parameters of the "Count up and down" instruction:
Parameters CU CD R LD PV Declaration Input Input Input Input Input Data type BOOL BOOL BOOL BOOL Integers Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L Description Count up input Count down input Reset input Load input Value at which the output QU / QD is set. Status of the counter up Status of the counter down Current count value
QU QD CV
You can select the data type of the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
Example
The following example shows how the instruction works:
If the signal state at the "TagIn_1" or "TagIn_2" input changes from "0" to "1" (positive signal edge), the "Count up and down" instruction is executed. When there is a positive signal edge at the "TagIn_1" input, the current count value is incremented by one and stored at the "Tag_CV" output. When there is a positive signal edge at the "TagIn_2" input, the count value is decremented by one and stored at the "Tag_CV" output. When there is a positive signal edge at the CU input, the count value is incremented until it reaches the high limit of 32 767. If input CD has a positive signal edge, the count value is decremented until it reaches the low limit value of -32 768.
1181
See also
Example of detecting the fill level of a storage area (Page 1131) Overview of the valid data types (Page 677) Example of detecting the fill level of a storage area (Page 1123)
You can also use the "Equal" instruction to compare individual characters of a string (STRING). The number of the character to be compared is given in brackets next to the operand name. "MyString[2]", for example, compares the second character of the "MyString" string.
1182
Parameters
The following table shows the parameters of the "Equal" instruction:
Parameters <Operand1> Declaration Input Data type Bit strings, integers, floatingpoint numbers, characters, TIME, DATE, TOD, DTL Bit strings, integers, floatingpoint numbers, characters, TIME, DATE, TOD, DTL Memory area I, Q, M, D, L or constant Description First value to compare
<Operand2>
Input
I, Q, M, D, L or constant
You can select the data type for the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also":
Example
The following example shows how the instruction works:
The "TagOut" output is set when the following conditions are fulfilled: The operands "TagIn_1" and "TagIn_2" have the signal state "1". The condition of the comparison instruction is fulfilled ("Tag_Value1" = "Tag_Value2").
See also
Overview of the valid data types (Page 677)
1183
You can also use the "Not equal" instruction to compare individual characters of a string (STRING). The number of the character to be compared is given in brackets next to the operand name. "MyString[2]", for example, compares the second character of the "MyString" string. When IEC Check is selected, the operands to be compared must have the same data type. If IEC Check is not selected, the width (length) of the operands must be the same. When floatingpoint numbers are compared, the operands to be compared must have the same data type regardless of the setting for the IEC Check.
1184
Parameters
The following table shows the parameters of the "Not equal" instruction:
Parameters <Operand1> Declaration Input Data type Bit strings, integers, floatingpoint numbers, characters, TIME, DATE, TOD, DTL Bit strings, integers, floatingpoint numbers, characters, TIME, DATE, TOD, DTL Memory area I, Q, M, D, L or constant Description First value to compare
<Operand2>
Input
I, Q, M, D, L or constant
You can select the data type for the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
Example
The following example shows how the instruction works:
The "TagOut" output is set when the following conditions are fulfilled: The operands "TagIn_1" and "TagIn_2" have the signal state "1". The condition of the comparison instruction is fulfilled ("Tag_Value1" <> "Tag_Value2").
See also
Overview of the valid data types (Page 677)
1185
You can also use the "Greater or equal" instruction to compare individual characters of a string (STRING). The number of the character to be compared is given in brackets next to the operand name. "MyString[2]", for example, compares the second character of the "MyString" string. When time values are compared, the RLO of the instruction is "1" if the point of time at <Operand1> is greater (more recent) than or equal to the point of time at <Operand2>.
Parameters
The following table shows the parameters of the "Greater or equal" instruction:
Parameters <Operand1> Declaration Input Data type Integers, floatingpoint numbers, characters, TIME, DATE, TOD, DTL Integers, floatingpoint numbers, characters, TIME, DATE, TOD, DTL Memory area I, Q, M, D, L or constant Description First value to compare
<Operand2>
Input
I, Q, M, D, L or constant
You can select the data type for the instruction from the "<???>" drop-down list of the instruction box.
1186
Example
The following example shows how the instruction works:
The "TagOut" output is set when the following conditions are fulfilled: The operands "TagIn_1" and "TagIn_2" have the signal state "1". The condition of the comparison instruction is fulfilled ("Tag_Value1" >= "Tag_Value2").
See also
Overview of the valid data types (Page 677) Example of detecting the fill level of a storage area (Page 1123)
1187
You can also use the "Less or equal" instruction to compare individual characters of a string (STRING). The number of the character to be compared is given in brackets next to the operand name. "MyString[2]", for example, compares the second character of the "MyString" string. When time values are compared, the RLO of the instruction is "1" if the point of time at <Operand1> is less (less recent) than or equal to the point of time at <Operand2>.
Parameters
The following table shows the parameters of the "Less or equal" instruction:
Parameters <Operand1> Declaration Input Data type Integers, floatingpoint numbers, characters, TIME, DATE, TOD, DTL Integers, floatingpoint numbers, characters, TIME, DATE, TOD, DTL Memory area I, Q, M, D, L or constant Description First value to compare
<Operand2>
Input
I, Q, M, D, L or constant
You can select the data type for the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
Example
The following example shows how the instruction works:
The "TagOut" output is set when the following conditions are fulfilled: The operands "TagIn_1" and "TagIn_2" have the signal state "1". The condition of the comparison instruction is fulfilled ("Tag_Value1" <= "Tag_Value2").
1188
See also
Overview of the valid data types (Page 677)
You can also use the "Greater than" instruction to compare individual characters of a string (STRING). The number of the character to be compared is given in brackets next to the operand name. "MyString[2]", for example, compares the second character of the "MyString" string. When time values are compared, the RLO of the instruction is "1" if the point of time at <Operand1> is greater (more recent) than the point of time at <Operand2>.
1189
Parameters
The following table shows the parameters of the "Greater than" instruction:
Parameters <Operand1> Declaration Input Data type Integers, floatingpoint numbers, characters, TIME, DATE, TOD, DTL Integers, floatingpoint numbers, characters, TIME, DATE, TOD, DTL Memory area I, Q, M, D, L or constant Description First value to compare
<Operand2>
Input
I, Q, M, D, L or constant
You can select the data type for the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
Example
The following example shows how the instruction works:
The "TagOut" output is set when the following conditions are fulfilled: The operands "TagIn_1" and "TagIn_2" have the signal state "1". The condition of the comparison instruction is fulfilled ("Tag_Value1" > "Tag_Value2").
See also
Overview of the valid data types (Page 677)
1190
You can also use the "Less than" instruction to compare individual characters of a string (STRING). The number of the character to be compared is given in brackets next to the operand name. "MyString[2]", for example, compares the second character of the "MyString" string. When time values are compared, the RLO of the instruction is "1" if the point of time at <Operand1> is less (less recent) than the point of time at <Operand2>.
Parameters
The following table shows the parameters of the "Less than" instruction:
Parameters <Operand1> Declaration Input Data type Integers, floatingpoint numbers, characters, TIME, DATE, TOD, DTL Integers, floatingpoint numbers, characters, TIME, DATE, TOD, DTL Memory area I, Q, M, D, L or constant Description First value to compare
<Operand2>
Input
I, Q, M, D, L or constant
You can select the data type for the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
1191
Example
The following example shows how the instruction works:
The "TagOut" output is set when the following conditions are fulfilled: The operands "TagIn_1" and "TagIn_2" have the signal state "1". The condition of the comparison instruction is fulfilled ("Tag_Value1" < "Tag_Value2").
See also
Overview of the valid data types (Page 677) Example of detecting the fill level of a storage area (Page 1123)
Parameters
The following table shows the parameters of the "Value within range" instruction:
Parameters Box input Declaration Input Data type BOOL Memory area I, Q, M, D, L Description Result of the previous logic operation Low limit of the value range
MIN
Input
I, Q, M, D, L or constant
1192
You can select the data type for the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also":
Example
The following example shows how the instruction works:
The "TagOut" output is set when the following conditions are fulfilled: The operands "TagIn_1" and "TagIn_2" have the signal state "1". The value of operand ""Tag_Value"" is within the value range, which is specified by the current values of operands "Tag_Min" and "Tag_Max"(MIN <= VAL or VAL <= MAX). The operand "TagIn_3" has the signal state "1".
See also
Overview of the valid data types (Page 677)
1193
Parameters
The following table shows the parameters of the "Value outside range" instruction:
Parameters Box input Declaration Input Data type BOOL Memory area I, Q, M, D, L Description Result of the previous logic operation Low limit of the value range Comparison value High limit of the value range Result of the comparison
Integers, floatingpoint numbers Integers, floatingpoint numbers Integers, floatingpoint numbers BOOL
You can select the data type for the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
1194
Example
The following example shows how the instruction works:
The "TagOut" output is set when the following conditions are fulfilled: The operands "TagIn_1" and "TagIn_2" have the signal state "1". The value of operand "Tag_Value" is outside the value range, which is specified by the current values of operands "Tag_Min" and ""Tag_Max" (MIN > VAL or VAL > MAX). The operand "TagIn_3" has the signal state "1".
See also
Overview of the valid data types (Page 677)
1195
Parameters
The following table shows the parameters of the "Check validity" instruction:
Parameters <Operand> Declaration Input Data type Floating-point numbers Memory area I, Q, M, D, L or constant Description Value to be queried.
Example
The following example shows how the instruction works:
When the values of operands "Tag_Value1" and "Tag_Value2" are valid floating-point numbers, the "Multiply" (MUL) instruction is activated and the ENO output is set. When the "Multiply" (MUL) instruction is executed, the value of operand "Tag_Value1" is multiplied by the value of operand "Tag_Value2". The product of the multiplication is stored in operand "Tag_Result". If the instruction is executed without errors, the ENO and "TagOut" outputs are set to signal state "1".
See also
Overview of the valid data types (Page 677)
1196
Parameters
The following table shows the parameters of the "Check invalidity" instruction:
Parameters <Operand> Declaration Input Data type Floating-point numbers Memory area I, Q, M, D, L or constant Description Value to be queried.
Example
The following example shows how the instruction works:
If the value at the operand "TagIn_Value" is an invalid floating-point number, the "Move value" (MOVE) instruction is not executed. The "TagOut" output is reset to signal state "0".
See also
Overview of the valid data types (Page 677)
1197
FLOOR: Generate next lower integer from floating- FLOOR( ) point number
In its initial state, the instruction box contains at least 2 inputs (IN1 and IN2). The number of inputs can be extended. The inserted inputs are numbered in ascending order in the box. The values of the input parameters are used to execute the specified expression. Not all of the defined input parameters have to be used in the expression. The result of the instruction is transferred to the output OUT.
1198
Parameters
The following table shows the parameters of the "Calculate" instruction:
Parameters EN ENO IN1 Declaration Input Output Input Data type BOOL BOOL Bit strings, integers, floatingpoint numbers Bit strings, integers, floatingpoint numbers Bit strings, integers, floatingpoint numbers Bit strings, integers, floatingpoint numbers Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L or constant I, Q, M, D, L or constant I, Q, M, D, L Description Enable input Enable output First available input Second available input Additionally inserted inputs Output to which the end result is to be transferred.
IN2
Input
INn
Input
OUT
Output
1199
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
Parameters IN1 IN2 IN3 IN4 OUT Operand "Tag_Value_1" "Tag_Value_2" "Tag_Value_3" "Tag_Value_4" "Tag_Result" Value 4 4 3 2 12
If the "Tag_Input" input has the signal state"1", the "Calculate" instruction is executed. The value of operand "Tag_Value_1" is added to the value of operand "Tag_Value_2". The sum is multiplied with the value of operand "Tag_Value_3". The product is divided by the value of operand "Tag_Value_4". The quotient is transferred as end result to the operand "Tag_Result" at the OUT output of the instruction. If the instruction is executed without errors, the ENO output and operand "Tag_Output" are set to "1".
See also
Using the "Calculate" instruction (Page 851) Overview of the valid data types (Page 677) Inserting additional inputs and outputs in LAD elements (Page 858) Removing inputs and outputs (Page 859) Basics of the EN/ENO mechanism (Page 753)
1200
Parameters
The following table shows the parameters of the "Add" instruction:
Parameters EN ENO IN1 IN2 INn Input Output Input Input Input Data type BOOL BOOL Integers, floatingpoint numbers Integers, floatingpoint numbers Integers, floatingpoint numbers Integers, floatingpoint numbers Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L or constant I, Q, M, D, L or constant I, Q, M, D, L Description Enable input Enable output First number to be added Second number to be added Optional input values that are added. Sum
OUT
Output
You can select the data type of the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also":
1201
Example
The following example shows how the instruction works:
If operand "TagIn" has the signal state "1", the "Add" instruction is executed. The value of operand "Tag_Value1" is added to the value of operand "Tag_Value2". The result of the addition is stored in operand "Tag_Result". If the instruction is executed without errors, the ENO enable output has the signal state "1" and the "TagOut" output is set.
See also
Overview of the valid data types (Page 677) Removing inputs and outputs (Page 859) Basics of the EN/ENO mechanism (Page 753) Inserting additional inputs and outputs in LAD elements (Page 858)
Parameters
The following table shows the parameters of the "Subtract" instruction:
Parameters EN ENO Declaration Input Output Data type BOOL BOOL Memory area I, Q, M, D, L I, Q, M, D, L Description Enable input Enable output
1202
You can select the data type of the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
Example
The following example shows how the instruction works:
If operand "TagIn" has the signal state "1", the "Subtract" instruction is executed. The value of operand "Tag_Value2" is subtracted from the value of operand "Tag_Value1". The result of the subtraction is stored in operand "Tag_Result". If the instruction is executed without errors, the ENO output has the signal state "1" and the "TagOut" output is set.
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753)
1203
Parameters
The following table shows the parameters of the "Multiply" instruction:
Parameters EN ENO IN1 IN2 INn Declaration Input Output Input Input Input Data type BOOL BOOL Integers, floatingpoint numbers Integers, floatingpoint numbers Integers, floatingpoint numbers Integers, floatingpoint numbers Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L or constant I, Q, M, D, L or constant I, Q, M, D, L Description Enable input Enable output Multiplier Multiplicand Optional input values that can be multiplied. Product
OUT
Output
You can select the data type for the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
Example
The following example shows how the instruction works:
If operand "TagIn" has the signal state "1", the "Multiply" instruction is executed. The value of operand "Tag_Value1" is multiplied by the value of operand "Tag_Value2". The result of the multiplication is stored in operand "Tag_Result". If the instruction is executed without errors, the ENO output has the signal state "1" and the "TagOut" output is set.
1204
See also
Overview of the valid data types (Page 677) Removing inputs and outputs (Page 859) Basics of the EN/ENO mechanism (Page 753) Inserting additional inputs and outputs in LAD elements (Page 858)
Parameters
The following table shows the parameters of the "Divide" instruction:
Parameters EN ENO IN1 IN2 OUT Declaration Input Output Input Input Output Data type BOOL BOOL Integers, floatingpoint numbers Integers, floatingpoint numbers Integers, floatingpoint numbers Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L or constant I, Q, M, D, L Description Enable input Enable output Dividend Divisor Quotient value
You can select the data type of the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
1205
Example
The following example shows how the instruction works:
If operand "TagIn" has the signal state "1", the "Divide" instruction is executed. The value of operand "Tag_Value1" is divided by the value of operand "Tag_Value2". The division result is stored in operand "Tag_Result". If the instruction is executed without errors, the ENO output has the signal state "1" and the "TagOut" output is set.
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753)
Parameters
The following table shows the parameters of the "Return remainder of division" instruction:
Parameters EN ENO IN1 IN2 OUT Declaration Input Output Input Input Output Data type BOOL BOOL Integers Integers Integers Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L or constant I, Q, M, D, L Description Enable input Enable output Dividend Divisor Remainder of division
1206
Example
The following example shows how the instruction works:
If operand "TagIn" has the signal state "1", the "Return remainder of division" instruction is executed. The value of operand "Tag_Value1" is divided by the value of operand "Tag_Value2". The remainder is stored in operand "Tag_Result". If the instruction is executed without errors, the ENO output has the signal state "1" and the "TagOut" output is set.
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753)
1207
Parameters
The following table shows the parameters of the "Create twos complement" instruction:
Parameters EN ENO IN Declaration Input Output Input Data type BOOL BOOL SINT, INT, DINT, floating-point numbers SINT, INT, DINT, floating-point numbers Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L Description Enable input Enable output Input value
OUT
Output
You can select the data type for the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
Example
The following example shows how the instruction works:
If operand "TagIn" has the signal state "1", the "Create twos complement" instruction is executed. The sign of the value at the "TagIn_Value" input is changed and the result is provided at the "TagOut_Value" output. If the instruction is executed without errors, the ENO output has the signal state "1" and the "TagOut" output is set.
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753)
1208
Parameters
The following table shows the parameters of the "Increment" instruction:
Parameters EN ENO IN/OUT Declaration Input Output InOut Data type BOOL BOOL Integers Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L Description Enable input Enable output Value to be incremented.
You can select the data type for the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
Example
The following example shows how the instruction works:
If operands "TagIn_1" and "TagIn_2" have the signal state "1", the value of operand "Tag_InOut" is incremented by one and the "TagOut" output is set.
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753)
1209
Parameters
The following table shows the parameters of the "Decrement" instruction:
Parameters EN ENO IN/OUT Declaration Input Output InOut Data type BOOL BOOL Integers Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L Description Enable input Enable output Value to be decremented.
You can select the data type for the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
Example
The following example shows how the instruction works:
If operands "TagIn_1" and "TagIn_2" have the signal state "1", the value of operand "Tag_InOut" is decremented by one and the "TagOut" output is set.
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753)
1210
Parameters
The following table shows the parameters of the "Form absolute value" instruction:
Parameters EN ENO IN Declaration Input Output Input Data type BOOL BOOL SINT, INT, DINT, floating-point numbers SINT, INT, DINT, floating-point numbers Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L Description Enable input Enable output Input value
OUT
Output
You can select the data type for the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
Parameters IN OUT Operand "TagIn_Value" "TagOut_Value" Value - 6, 234 6, 234
If operand "TagIn" has the signal state "1", the "Form absolute value" instruction is executed. The instruction calculates the absolute value of the value at the "TagIn_Value" input and sends the result to the "TagOut_Value" output. If the instruction is executed without errors, the "TagOut" output is set.
1211
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753)
Parameters
The following table shows the parameters of the "Get minimum" instruction:
Parameters EN ENO IN1 IN2 INn Declaration Input Output Input Input Input Data type BOOL BOOL Integers, floatingpoint numbers Integers, floatingpoint numbers Integers, floatingpoint numbers Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L or constant I, Q, M, D, L or constant Description Enable input Enable output First input value Second input value Additionally inserted inputs whose values are to be compared. Result
OUT
Output
I, Q, M, D, L
You can select the data type for the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
1212
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
Parameters IN1 IN2 IN3 OUT Operand TagIn_Value1 TagIn_Value2 TagIn_Value3 TagOut_Value Value 12 222 14 444 13 333 12 222
If operands "TagIn_1" and "TagIn_2" have the signal state "1", the "Get minimum" instruction is executed. The instruction compares the values of the specified operands and copies the lowest value ("TagIn_Value1") to the "TagOut_Value" output. If the instruction is executed without errors, the "TagOut" output is set.
See also
Overview of the valid data types (Page 677) Inserting additional inputs and outputs in LAD elements (Page 858) Basics of the EN/ENO mechanism (Page 753)
1213
Parameters
The following table shows the parameters of the "Get maximum" instruction:
Parameters EN ENO IN1 IN2 INn Declaration Input Output Input Input Input Data type BOOL BOOL Integers, floatingpoint numbers Integers, floatingpoint numbers Integers, floatingpoint numbers Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L or constant I, Q, M, D, L or constant Description Enable input Enable output First input value Second input value Additionally inserted inputs whose values are to be compared. Result
OUT
Output
I, Q, M, D, L
You can select the data type for the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
Parameters IN1 IN2 Operand TagIn_Value1 TagIn_Value2 Value 12 222 14 444
1214
If operands "TagIn_1" and "TagIn_2" have the signal state "1", the "Get maximum" instruction is executed. The instruction compares the values of the specified operands and copies the highest value ("TagIn_Value2") to the "TagOut_Value" output. If the instruction is executed without errors, the "TagOut" output is set.
See also
Overview of the valid data types (Page 677) Inserting additional inputs and outputs in LAD elements (Page 858) Removing inputs and outputs (Page 859) Basics of the EN/ENO mechanism (Page 753)
Parameters
The following table shows the parameters of the "Set limit value" instruction:
Parameters EN ENO MN Declaration Input Output Input Data type BOOL BOOL Integers, floatingpoint numbers Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant Description Enable input Enable output Low limit
1215
You can select the data type for the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
Parameters MN IN MX OUT Operand Tag_MN Tag_Value Tag_MX Tag_Result Value 12 000 8 000 16 000 12 000
If operands "TagIn_1" and "TagIn_2" have the signal state "1", the "Set limit value" instruction is executed. The value of operand "Tag_Value" is compared with the values of operands "Tag_MN" and "Tag_MX". Since the value of operand "Tag_Value" is less than the low limit, the value of operand "Tag_MN" is copied to the "Tag_Result" output. If the instruction is executed without errors, the "TagOut" output is set.
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753)
1216
Parameters
The following table shows the parameters of the "Form square" instruction:
Parameters EN ENO IN OUT Declaration Input Output Input Output Data type BOOL BOOL Floating-point numbers Floating-point numbers Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L Description Enable input Enable output Input value Square of the input value
You can select the data type for the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
1217
If operand "TagIn" has the signal state "1", the "Form square" instruction is executed. The instruction squares the value of operand "Tag_Value" and sends the result to the "Tag_Result" output. If the instruction is executed without errors, the "TagOut" output is set.
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753)
Parameters
The following table shows the parameters of the "Form square root" instruction:
Parameters EN ENO IN OUT Declaration Input Output Input Output Data type BOOL BOOL Floating-point numbers Floating-point numbers Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L Description Enable input Enable output Input value Square root of the input value
You can select the data type for the instruction from the "<???>" drop-down list of the instruction box.
1218
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
Parameters IN OUT Operand Tag_Value Tag_Result Value 25.0 5.0
If operand "TagIn" has the signal state "1", the "Form square root" instruction is executed. The instruction finds the square root of the value of operand "Tag_Value" and stores the result in the "Tag_Result" output. If the instruction is executed without errors, the "TagOut" output is set.
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753)
1219
Parameters
The following table shows the parameters of the "Form natural logarithm" instruction:
Parameters EN ENO IN OUT Declaration Input Output Input Output Data type BOOL BOOL Floating-point numbers Floating-point numbers Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L Description Enable input Enable output Input value Natural logarithm of the input value
You can select the data type for the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
Example
The following example shows how the instruction works:
If operand "TagIn" has the signal state "1", the "Form natural logarithm" instruction is executed. The instruction forms the natural logarithm of the value at the "Tag_Value" input and stores the result in the "Tag_Result" output. If the instruction is executed without errors, the "TagOut" output is set.
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753)
1220
Parameters
The following table shows the parameters of the "Form exponential value" instruction:
Parameters EN ENO IN OUT Declaration Input Output Input Output Data type BOOL BOOL Floating-point numbers Floating-point numbers Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L Description Enable input Enable output Input value Exponential value of input value IN
You can select the data type for the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
Example
The following example shows how the instruction works:
If operand "TagIn" has the signal state"1", the "Form exponential value" instruction is executed. The instruction calculates the exponent from base e and the value of operand "Tag_Value" and sends the result to the "Tag_Result" output. If the instruction is executed without errors, the "TagOut" output is set.
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753)
1221
Parameters
The following table shows the parameters of the "Form sine value" instruction:
Parameters EN ENO IN OUT Declaration Input Output Input Output Data type BOOL BOOL Floating-point numbers Floating-point numbers Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L Description Enable input Enable output Size of angle in radians Sine of the specified angle
You can select the data type for the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
1222
If operand "TagIn" has the signal state "1", the "Form sine value" instruction is executed. The instruction calculates the sine of the angle specified at the "Tag_Value" input and stores the result in the "Tag_Result" output. If the instruction is executed without errors, the "TagOut" output is set.
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753)
Parameters
The following table shows the parameters of the "Form cosine value" instruction:
Parameters EN ENO IN OUT Declaration Input Output Input Output Data type BOOL BOOL Floating-point numbers Floating-point numbers Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L Description Enable input Enable output Size of angle in radians Cosine of the specified angle
You can select the data type for the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
1223
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
Parameters IN OUT Operand Tag_Value Tag_Result Value +1.570796e+00 (/2) 0
If operand "TagIn" has the signal state "1", the "Form cosine value" instruction is executed. The instruction calculates the cosine of the angle specified at the "Tag_Value" input and stores the result in the "Tag_Result" output. If the instruction is executed without errors, the "TagOut" output is set.
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753)
1224
Parameters
The following table shows the parameters of the "Form tangent value" instruction:
Parameters EN ENO IN OUT Declaration Input Output Input Output Data type BOOL BOOL Floating-point numbers Floating-point numbers Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L Description Enable input Enable output Size of angle in radians Tangent of the specified angle
You can select the data type for the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
Parameters IN OUT Operand Tag_Value Tag_Result Value +3.141593e+00 () 0
If operand "TagIn" has the signal state "1", the "Form tangent value" instruction is executed. The instruction calculates the tangent of the angle specified at the "Tag_Value" input and stores the result in the "Tag_Result" output. If the instruction is executed without errors, the "TagOut" output is set.
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753)
1225
Parameters
The following table shows the parameters of the "Form arcsine value" instruction:
Parameters EN ENO IN OUT Declaration Input Output Input Output Data type BOOL BOOL Floating-point numbers Floating-point numbers Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L Description Enable input Enable output Sine value Size of angle in radians
You can select the data type for the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
1226
If operand "TagIn" has the signal state "1", the "Form arcsine value" instruction is executed. The instruction calculates the size of the angle corresponding to the sine value at the "Tag_Value" input. The result of the instruction is stored in the "Tag_Result" output. If the instruction is executed without errors, the "TagOut" output is set.
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753)
Parameters
The following table shows the parameters of the "Form arccosine value" instruction:
Parameters EN ENO IN OUT Declaration Input Output Input Output Data type BOOL BOOL Floating-point numbers Floating-point numbers Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L Description Enable input Enable output Cosine value Size of angle in radians
You can select the data type for the instruction from the "<???>" drop-down list of the instruction box.
1227
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
Parameters IN OUT Operand Tag_Value Tag_Result Value 0 +1.570796e+00 (/2)
If operand "TagIn" has the signal state "1", the "Form arccosine value" instruction is executed. The instruction calculates the size of the angle corresponding to the cosine value at the "Tag_Value" input. The result of the instruction is stored in the "Tag_Result" output. If the instruction is executed without errors, the "TagOut" output is set.
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753)
1228
Parameters
The following table shows the parameters of the "Form arctangent value" instruction:
Parameters EN ENO IN OUT Declaration Input Output Input Output Data type BOOL BOOL Floating-point numbers Floating-point numbers Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L Description Enable input Enable output Tangent value Size of angle in radians
You can select the data type for the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
Parameters IN OUT Operand Tag_Value Tag_Result Value 1.0 +0.785398e+00 (/4)
If operand "TagIn" has the signal state"1", the "Form arctangent value" instruction is executed. The instruction calculates the size of the angle corresponding to the tangent value at the "Tag_Value" input. The result of the instruction is stored in the "Tag_Result" output. If the instruction is executed without errors, the "TagOut" output is set.
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753)
1229
Parameters
The following table shows the parameters of the "Return fraction" instruction:
Parameters EN ENO IN Declaration Input Output Input Data type BOOL BOOL Floating-point numbers Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant Description Enable input Enable output Value, whose decimal places are to be determined. Decimal places of the value at the IN input
OUT
Output
Floating-point numbers
I, Q, M, D, L
You can select the data type for the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
1230
If operands "TagIn_1" and "TagIn_2" have the signal state "1", the "Return fraction" instruction is started. The decimal places from the value of operand "Tag_Value" are copied to operand "Tag_Result". If the instruction is executed without errors, the ENO output has the signal state "1" and the "TagOut" output is set.
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753)
Parameters
The following table shows the parameters of the "Exponentiate" instruction:
Parameters EN ENO IN1 Declaration Input Output Input Data type BOOL BOOL Floating-point numbers Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant Description Enable input Enable output Base value
1231
OUT
Output
You can select the data type for the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
Example
The following example shows how the instruction works:
If operands "TagIn_1" and "TagIn_2" have the signal state "1", the "Exponentiate" instruction is started. The value of operand "Tag_Value1" is raised to a power specified with the value of operand "Tag_Value2". The result is stored in the "Tag_Result" output. If the instruction is executed without errors, the ENO output has the signal state "1" and the "TagOut" output is set.
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753)
1232
1) You can also use the "Move value" instruction to transfer individual characters of a string (STRING) to operands of data type CHAR. The number of the character to be transferred is given in brackets next to the operand name. "MyString[2]", for example, transfers the second character of the "MyString" string. You can also transfer an operand with the CHAR data type to individual characters of a string. You can also replace a specific character of a string with the character of another string. 2)
The transfer of whole arrays is only possible if the data type of the array components of the operand at the IN input matches that of the operand at the OUT1 output.
If the bit length of the data type at the IN input exceeds the bit length of the data type at the OUT1 output, the more significant bits of the source value are lost. If the bit length of the data type at the IN input is less than the bit length of the data type at the OUT1 output, then the more significant bits of the destination value will be overwritten with zeros.
1233
Parameters
The following table shows the parameters of the "Move value" instruction:
Parameters EN ENO IN Declaration Input Output Input Data type BOOL BOOL Bit strings, integers, floatingpoint numbers, timers, DATE, TIME, TOD, DTL, CHAR, STRUCT, ARRAY Bit strings, integers, floatingpoint numbers, timers, DATE, TIME, TOD, DTL, CHAR, STRUCT, ARRAY Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant Description Enable input Enable output Source value
OUT1
Output
I, Q, M, D, L
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
1234
If operand "TagIn" has the signal state"1", the "Move value" instruction is executed. The instruction copies the contents of operand "TagIn_Value" to operand "TagOut_Value" and sets output "TagOut" to signal state "1".
See also
Overview of the valid data types (Page 677) Removing inputs and outputs (Page 859) Basics of the EN/ENO mechanism (Page 753) MOVE_BLK: Move block (Page 1239) UMOVE_BLK: Move block uninterruptible (Page 1241) S_MOVE: Move character string (Page 1578) Inserting additional inputs and outputs in LAD elements (Page 858)
1235
Parameters
The following table shows the parameters of the "Read field" instruction:
Parameters EN ENO INDEX Declaration Input Output Input Data type BOOL BOOL DINT Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L Description Enable input Enable output Index of field component whose content is read out First component of the field from which reading occurs
MEMBER
Input
BOOL, bit strings, integers, floatingpoint numbers, timers, DATE and CHAR as a component of an ARRAY tag BOOL. bit strings, integers, floatingpoint numbers, timers, DATE and CHAR
VALUE
Output
I, Q, M, D, L
You can select the data type for the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
1236
The field component with index 4 is read from the "Main_Field[-10...10] of REAL" field and written to the "a_real" tag. The field component to be read is specified by the value at the INDEX parameter.
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753)
Parameters
The following table shows the parameters of the "Write field" instruction:
Parameters EN ENO Declaration Input Output Data type BOOL BOOL Memory area I, Q, M, D, L I, Q, M, D, L Description Enable input Enable output
1237
VALUE
Input
BOOL. bit strings, integers, floatingpoint numbers, timers, DATE and CHAR BOOL, bit strings, integers, floatingpoint numbers, timers, DATE and CHAR as a component of an ARRAY tag
I, Q, M, D, L or constant
MEMBER
Output
I, Q, M, D, L
You can select the data type for the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
Parameters INDEX VALUE MEMBER Operand a_index a_real "DB_1".Main_Field[-10] Value 4 10,54 First component of the "Main_Field[-10..10] of REAL" field in the "DB_1" data block
The value "10,54" of the "a_real" tag is written to the field component with index 4 of the "Main_Field[-10..10] of REAL" field. The index of the field component to which the content of the "a_real" tag is transferred" is specified by the value in the INDEX parameter.
1238
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753)
Parameters
The following table shows the parameters of the "Move block" instruction:
Parameters EN ENO IN Declaration Input Output Input Data type BOOL BOOL Binary numbers, integers, floatingpoint numbers, timers, DATE and CHAR as a component of an ARRAY structure Memory area I, Q, M, D, L I, Q, M, D, L D, L Description Enable input Enable output The first element of the source area that is being copied from.
1239
OUT
Output
Binary numbers, integers, floatingpoint numbers, timers, DATE and CHAR as a component of an ARRAY structure
D, L
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
Parameters IN Operand a_array[2] Value Operand "a_array" has ARRAY data type and consists of 5 elements of the INT data type. 3 Operand "b_array" has ARRAY data type and consists of 6 elements of the INT data type.
COUNT OUT
Tag_Count b_array[1]
If operands "TagIn_1" and "TagIn_2" have the signal state "1", the "Move block" instruction is executed. The instruction selects three INT elements from the "a_array" (a_array[2..4]) tag and copies their contents into the "b_array" (b_array[1..3]) output tag. If the instruction is executed without errors, the ENO output has the signal state "1" and the "TagOut" output is set.
1240
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753) Inserting additional inputs and outputs in LAD elements (Page 858)
Parameters
The following table shows the parameters of the "Move block uninterruptible" instruction:
Parameters EN ENO Declaration Input Output Data type BOOL BOOL Memory area I, Q, M, D, L I, Q, M, D, L Description Enable input Enable output
1241
COUNT
Input
I, Q, M, D, L or constant
Number of elements to be copied from the source area to the destination area. The first element of the destination area to which the contents of the source area are being copied.
OUT
Output
Binary numbers, integers, floatingpoint numbers, timers, DATE and CHAR as a component of an ARRAY structure
D, L
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
Parameters IN Operand a_array[2] Value Operand "a_array" has ARRAY data type and consists of 5 elements of the INT data type. 3 The b_array tag has ARRAY data type and consists of 6 elements of the INT data type.
COUNT OUT
Tag_Count b_array[1]
If operands "TagIn_1" and "TagIn_2" have the signal state "1", the "Move block uninterruptible" instruction is executed. The instruction selects three INT elements from the "a_array" (a_array[2..4]) tag and copies their contents into the "b_array" (b_array[1..3]) output tag. The copy operation cannot be interrupted by other operating system activities. If the instruction is
1242
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753) Inserting additional inputs and outputs in LAD elements (Page 858)
Parameters
The following table shows the parameters of the "Fill block" instruction:
Parameters EN ENO IN Declaration Input Output Input Data type BOOL BOOL Binary numbers, integers, floatingpoint numbers, timers, DATE and CHAR as a component of an ARRAY structure Memory area I, Q, M, D, L I, Q, M, D, L D, L or constant Description Enable input Enable output Element used to fill the destination area.
1243
OUT
Output
Binary numbers, integers, floatingpoint numbers, timers, DATE and CHAR as a component of an ARRAY structure
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
Parameters IN Operand A_array[2] Value Operand "a_array" has ARRAY data type and consists of 4 elements of the WORD data type (ARRAY[1..4] of WORD). 3 Operand "b_array" has ARRAY data type and consists of 5 elements of the WORD data type (ARRAY[1..5] of WORD).
COUNT OUT
Tag_Count b_array[1]
If operands "TagIn_1" and "TagIn_2" have the signal state "1", the "Fill block" instruction is executed. The instruction copies the second element (a_array[2]) of the "a_array" tag three times to the "b_array" output tag (b_array[1..3]). If the instruction is executed without errors, the ENO and "TagOut" outputs are set to signal state "1".
1244
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753) Inserting additional inputs and outputs in LAD elements (Page 858)
Parameters
The following table shows the parameters of the "Fill block uninterruptible" instruction:
Parameters EN ENO Declaration Input Output Data type BOOL BOOL Memory area I, Q, M, D, L I, Q, M, D, L Description Enable input Enable output
1245
COUNT
Input
I, Q, M, D, L or constant D, L
Number of repeated copy operations Address in destination area from which filling starts.
OUT
Output
Binary numbers, integers, floatingpoint numbers, timers, DATE and CHAR as a component of an ARRAY structure
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
Parameters IN Operand a_array[2] Value Operand "a_array" has ARRAY data type and consists of 4 elements of the WORD data type (ARRAY[1..4] of WORD). 3 Operand "b_array" has ARRAY data type and consists of 5 elements of the WORD data type (ARRAY[1..5] of WORD).
COUNT OUT
Tag_Count b_array[1]
If operands "TagIn_1" and "TagIn_2" have the signal state "1", the "Fill block uninterruptible" instruction is executed. The instruction copies the second element (a_array[2]) of the "a_array" tag three times to "b_array" (b_array[1..3]) output tag. The copy operation cannot be interrupted
1246
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753) Inserting additional inputs and outputs in LAD elements (Page 858)
The "Swap" instruction can only be executed when the signal state at the EN enable input is "1". In this case, the ENO enable output has the signal state "1". The ENO enable output is reset when the EN enable input has the signal state "0" or errors occur during execution of the instruction.
1247
Parameters
The following table shows the parameters of the "Swap" instruction:
Parameters EN ENO IN Declaration Input Output Input Data type BOOL BOOL WORD, DWORD Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L Description Enable input Enable output Operand whose bytes are swapped. Result
OUT
Output
WORD, DWORD
You can select the data type for the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
Parameters IN OUT Operand TagIn_Value TagOut_Value Value 0000 1111 0101 0101 0101 0101 1111 0000
If operand "TagIn" has the signal state "1", the "Swap" instruction is executed. The order of the bytes is changed and stored in operand "TagOut_Value". If the instruction is executed without errors, the ENO output has the signal state "1" and the "TagOut" output is set.
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753) Inserting additional inputs and outputs in LAD elements (Page 858)
1248
Parameters
The following table shows the parameters of the "Convert value" instruction:
Parameters EN ENO IN Declaration Input Output Input Data type BOOL BOOL Bit strings, integers, floatingpoint numbers, CHAR, BCD16, BCD32 Bit strings, integers, floatingpoint numbers, CHAR, BCD16, BCD32 Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant Description Enable input Enable output Value to be converted.
OUT
Output
I, Q, M, D, L
You can select the data type for the instruction from the "<???>" drop-down list of the instruction box. Bit strings (BYTE, WORD, DWORD) cannot be selected in the instruction box. If you enter an operand of data type BYTE, WORD, or DWORD for a parameter of the instruction, the value of the operand is interpreted as an unsigned integer with the same bit length. In this case, data type BYTE is interpreted as USINT, WORD as UINT, and DWORD as UDINT. For additional information on valid data types, refer to "See also".
1249
Example
The following example shows how the instruction works:
If operand "TagIn" has the signal state "1", the content of operand "TagIn_Value" is read and converted to an integer (32-bit). The result is stored in operand "TagOut_Value". The "TagOut" output is set to "1" if the instruction is executed without errors.
See also
Overview of the valid data types (Page 677) Explicit conversion of CHAR (Page 751)
Parameters
The following table shows the parameters of the "Round numerical value" instruction:
Parameters EN ENO Declaration Input Output Data type BOOL BOOL Memory area I, Q, M, D, L I, Q, M, D, L Description Enable input Enable output
1250
You can select the data type of the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
Parameters IN OUT Operand TagIn_Value TagOut_Value 0.50000000 0 Value -0.50000000 0
If operand "TagIn" has the signal state "1", the "Round numerical value" instruction is executed. The floating-point number at input "TagIn_Value" is rounded to the nearest even integer and sent to output "TagOut_Value". If the instruction is executed without errors, the "TagOut" output is set.
See also
Overview of the valid data types (Page 677)
1251
Parameters
The following table shows the parameters of the "Generate next higher integer from floatingpoint number" instruction:
Parameters EN ENO IN OUT Declaration Input Output Input Output Data type BOOL BOOL Floating-point numbers Integers, floatingpoint numbers Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L Description Enable input Enable output Input value Result with next higher integer
You can select the data type for the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
Parameters IN OUT Operand TagIn_Value TagOut_Value 0.50000000 1 Value -0.50000000 0
If operand "TagIn" has the signal state "1", the "Generate next higher integer from floatingpoint number" instruction is executed. The floating-point number at the "TagIn_Value" input is rounded to the next higher integer and sent to the "TagOut_Value" output. If the instruction is executed without errors, the "TagOut" output is set.
1252
See also
Overview of the valid data types (Page 677)
Parameters
The following table shows the parameters of the "Generate next lower integer from floatingpoint number" instruction:
Parameters EN ENO IN OUT Declaration Input Output Input Output Data type BOOL BOOL Floating-point numbers Integers, floatingpoint numbers Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L Description Enable input Enable output Input value Result with next lower integer
You can select the data type for the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
1253
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
Parameters IN OUT Operand TagIn_Value TagOut_Value 0.50000000 0 Value -0.50000000 -1
If operand "TagIn" has the signal state "1", then the "Generate next lower integer from floatingpoint number" instruction will be executed. The floating-point number at input "TagIn_Value" is rounded to the next lower integer and sent to output "TagOut_Value". If the instruction is executed without errors, the "TagOut" output is set.
See also
Overview of the valid data types (Page 677)
1254
Parameters
The following table shows the parameters of the "Truncate numerical value" instruction:
Parameters EN ENO IN OUT Declaration Input Output Input Output Data type BOOL BOOL Floating-point numbers Integers, floatingpoint numbers Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L Description Enable input Enable output Input value Integer part of the input value
You can select the data type for the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
Parameters IN OUT Operand TagIn_Value TagOut_Value 0.50000000 0 Value - 0.50000000 0
If operand "TagIn" has the signal state "1", the "Truncate numerical value" instruction is executed. The integer part of the floating-point number at the "TagIn_Value" input is converted to an integer and sent to the "TagOut_Value" output. If the instruction is executed without errors, the "TagOut" output is set.
See also
Overview of the valid data types (Page 677)
1255
The "Scale" instruction can only be executed when the signal state at the EN enable input is "1". In this case, the ENO enable output also has the signal state "1". The ENO enable output has the signal state "0" if one of the following conditions is fulfilled: The EN input has the signal state "0". The value at the MIN input is greater than or equal to the value at the MAX input. The value of a specified floating-point number is outside the range of the normalized numbers according to IEEE-754. An overflow occurs. The value at the VALUE input is NaN (Not a Number = result of an invalid arithmetic operation).
1256
Parameters
The following table shows the parameters of the "Scale" instruction:
Parameters EN ENO MIN VALUE MAX OUT Declaration Input Output Input Input Input Output Data type BOOL BOOL Integers, floatingpoint numbers Floating-point numbers Integers, floatingpoint numbers Integers, floatingpoint numbers Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L or constant I, Q, M, D, L or constant I, Q, M, D, L Description Enable input Enable output Low limit of the value range Value to be scaled. High limit of the value range Result of scaling
You can select the data type for the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
Parameters MIN VALUE MAX OUT Operand Tag_MIN Tag_Value Tag_MAX Tag_Result Value 10 0.5 30 20
If operand "TagIn" has the signal state "1", the "Scale" instruction is executed. The value at the "Tag_Value" input is scaled to the range of values defined by the values at the "Tag_MIN" and "Tag_MAX" inputs. The result is stored in the "Tag_Result" output. If the instruction is executed without errors, the ENO output has the signal state "1" and the "TagOut" output is set.
1257
See also
Overview of the valid data types (Page 677) NORM_X: Normalize (Page 1258)
The "Normalize" instruction can only be executed when the signal state at the EN enable input is "1". In this case, the ENO enable output has the signal state "1". The ENO enable output has the signal state "0" if one of the following conditions is fulfilled: The EN input has the signal state "0". The value at the MIN input is greater than or equal to the value at the MAX input. The value of a specified floating-point number is outside the range of the normalized numbers according to IEEE-754. The value at the VALUE input is NaN (result of an invalid arithmetic operation).
1258
Parameters
The following table shows the parameters of the "Normalize" instruction:
Parameters EN ENO MIN VALUE MAX OUT Declaration Input Output Input Input Input Output Data type BOOL BOOL Integers, floatingpoint numbers Integers, floatingpoint numbers Integers, floatingpoint numbers Floating-point numbers Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L or constant I, Q, M, D, L or constant I, Q, M, D, L Description Enable input Enable output Low limit of the value range Value to be normalized. High limit of the value range Result of the normalization
You can select the data type for the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
Parameters MIN VALUE MAX OUT Operand Tag_MIN Tag_Value Tag_MAX Tag_Result Value 10 20 30 0.5
If operand "TagIn" has the signal state "1", the "Normalize" instruction is executed. The value at the "Tag_Value" input is mapped to the range of values that were defined by the values at the "Tag_MIN" and "Tag_MAX" inputs. The tag value at the "Tag_Value" input is normalized to the defined value range. The result is stored as a floating-point number in the "Tag_Result" output. If the instruction is executed without errors, the ENO output has the signal state "1" and the "TagOut" output is set.
STEP 7 Basic V11.0 SP2 System Manual, 12/2011,
1259
See also
Overview of the valid data types (Page 677) SCALE_X: Scale (Page 1256)
Example
The following example shows how the instruction works:
If operand "TagIn_1" has the signal state "1", the "Jump if RLO = 1" instruction is executed. The linear execution of the program is interrupted and continues in Network 3, which is identified by the jump label CAS1. If the "TagIn_3" input has the signal state "1", the "TagOut_3" output is set.
1260
Example
The following example shows how the instruction works:
If the operand "TagIn_1" has the signal state "0", the instruction "Jump if RLO = 0" is executed. The linear execution of the program is interrupted and continues in Network 3, which is identified by the jump label CAS1. If the "TagIn_3" input has the signal state "1", the "TagOut_3" output is set.
See also
Overview of the valid data types (Page 677)
1261
Example
The following example shows how the instruction works:
If operand "TagIn_1" has the signal state "1", the "Jump if RLO = 1" instruction is executed. The linear execution of the program is interrupted and continues in Network 3, which is identified by the jump label CAS1. If the "TagIn_3" input has the signal state "1", the "TagOut_3" output is set.
1262
Parameters
The following table shows the parameters of the "Define jump list" instruction:
Parameters EN K Declaration Input Input Data type BOOL UINT Memory area I, Q, M, L, D I, Q, M, L, D or constant Description Enable input Specifies the number of the output and thus the jump that is to be made. (K=0 to 99) First jump label Second jump label Optional jump labels (n = 2 to 99)
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
Parameters K Dest 0 Operand/Jump label "Tag_Value" LABEL0 Value 1 Jump to the network that is identified with the jump label "LABEL0".
1263
Dest 2
LABEL2
If operand "Tag_Input" has the signal state "1", the "Define jump list" instruction is executed. The program execution is resumed according to the value of operand "Tag_Value" in the network that is identified with the jump label "LABEL1".
See also
Overview of the valid data types (Page 677) Inserting additional inputs and outputs in LAD elements (Page 858) Removing inputs and outputs (Page 859)
You can select the data type of the instruction from the "<???>" drop-down list of the instruction box. If you select a comparison instruction and the data type of the instruction is not yet defined,
1264
Parameters
The following table shows the parameters of the "Jump distributor" instruction:
Parameters EN K <Comparison values> Declaration Input Input Input Data type BOOL UINT Bit strings, integers, floating-point numbers, TIME, DATE, TOD Memory area I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L or constant Description Enable input Specifies the value to be compared. Input value with which the value of the K parameter is compared.
First jump label Second jump label Optional jump labels (n = 2 to 99) Program jump that is executed when none of the comparison conditions are fulfilled.
1265
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
Parameters K == > < Dest 0 Operand/Jump label Tag_Value Tag_Value_1 Tag_Value_2 Tag_Value_3 LABEL0 Value 23 20 21 19 Jump to jump label "LABEL0", if the value of the K parameter equals 20. Jump to jump label "LABEL1" if the value of the K parameter is greater than 21. Jump to jump label "LABEL2", if the value of the K parameter is less than 19. Jump to jump label "LABEL3", if the none of the comparison conditions are fulfilled.
Dest 1
LABEL1
Dest 2
LABEL2
ELSE
LABEL 3
If the operand "Tag_Input" changes to signal state "1", the instruction "Jump distributor" is executed. The execution of the program is continued in the network that is identified with the jump label "LABEL1".
See also
Overview of the valid data types (Page 677) Inserting additional inputs and outputs in LAD elements (Page 858) Removing inputs and outputs (Page 859)
1266
If an OB is completed, another block will be selected and started or executed by the priority class system:
1267
Parameters
The following table shows the parameters of the "Return" instruction:
Parameters RLO Declaration Data type Memory area Description The status of the call function is set to the signal state of the RLO. If RLO=1, the status of the call function is set to "1". If RLO=1, the status of the call function is set to "0". I, Q, M, D, L If RLO=1, the status of the call function is set to the signal state of the specified operand.
TRUE
FALSE
<Operand>
Input
BOOL
Example
The following example shows how the instruction works:
If operand "TagIn" has the signal state"1", the "Return" instruction is executed. Program execution is terminated in the called block and continues in the calling block. The ENO output of the call function is reset to signal state "0".
See also
Overview of the valid data types (Page 677)
1268
Parameters
The "Restart cycle monitoring time" instruction has no parameters.
Parameters
The "Exit program" instruction has no parameters.
1269
Parameters
The following table shows the parameters of the "Get error locally" instruction:
Parameters ERROR Declaration Output Data type ErrorStruct Memory area D, L Description Error information
1270
Operand number of the machine command (A) Internal pointer (B) Storage area in internal memory Information about the address of an operand (C) Memory area: L: 16#40 4E, 86, 87, 8E, 8F, C0 CE E: 16#81 A: 16#82 M: 16#83 DB: 16#84, 85, 8A, 8B
DB_NUMBER OFFSET
UINT UDINT
(D) Number of the data block (E) Relative address of the operand
1271
The ENO enable output of the "Get error locally" instruction is only set if the EN enable input has the signal state "1" and error information is present. If one of these conditions is not fulfilled, the remaining program execution is not affected by the "Get error locally" instruction. The "Get error locally" instruction can also be used to forward an alarm about the error status to the calling block. To do this, the instruction must be positioned in the last network of the called block. Note The "Get error locally" instruction enables local error handling within a block. If "Get error locally" is inserted in the program code of a block, any predefined system responses are ignored when an error occurs.
1272
Example
The following example shows how the instruction works:
When an error occurs, the "Get error locally" instruction returns the error information to the locally created "#error" structure at the ERROR output. The error information is converted and evaluated using the "Equal" comparison instruction. Information about the type of error is the first comparison value assigned to the instruction. The value "1" is specified in operand "substitute" as the second comparison value. If the error is a read error, the condition of the comparison instruction is fulfilled. The "#out" and "OK" outputs are reset in this case.
See also
Overview of the valid data types (Page 677) Basics of error handling (Page 942) Principles of local error handling (Page 943) Error output priorities (Page 944) Enabling local error handling for a block (Page 945)
1273
Parameters
The following table shows the parameters of the "Get error ID locally" instruction:
Parameters ID Declaration Output Data type WORD Memory area I, Q, M, D, L Description Error ID
Parameters ID
The following table shows the values that can be output in the ID parameter:
ID (hexadecimal) 0 2503 2505 2520 2522 2523 2524 2525 2528 2529 252C 2530 2533 2534 2535 2538 2539 253A 253C 253D ID (decimal) 0 9475 9477 9504 9506 9507 9508 9509 9512 9513 9516 9520 9523 9524 9525 9528 9529 9530 9532 9533 Description No error Invalid pointer Calling the instruction "Stop" (SFC46) in the user program Invalid STRING Read error: Operand outside the valid range Write error: Operand outside the valid range Read error: Invalid operand Write error: Invalid operand Read error: Data alignment Write error: Data alignment Invalid pointer Write error: Data block Invalid pointer used Block number error FC Block number error FB Access error: DB does not exist Access error: Wrong DB used Global data block does not exist Faulty information or the function does not exist System function does not exist
1274
See also
Overview of the valid data types (Page 677) Basics of error handling (Page 942) Principles of local error handling (Page 943) Error output priorities (Page 944) Enabling local error handling for a block (Page 945)
1275
Parameters
The following table shows the parameters of the "AND logic operation" instruction:
Parameters EN ENO IN1 IN2 INn Declaration Input Output Input Input Input Data type BOOL BOOL Bit strings Bit strings Bit strings Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L or constant I, Q, M, D, L or constant Description Enable input Enable output First value for logic operation Second value for logic operation Other inputs whose values are logically combined. Result of the instruction
OUT
Output
Bit strings
I, Q, M, D, L
You can select the data type for the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
Parameters IN1 IN2 OUT Operand Tag_Value1 Tag_Value2 Tag_Result Value 01010101 01010101 00000000 00001111 00000000 00000101
If operand "TagIn" has the signal state "1", the "AND logic operation" instruction is executed. The value of operand "Tag_Value1" and the value of operand "Tag_Value2" are ANDed. The result is mapped bit-for-bit and output in operand "Tag_Result". The ENO output and the "TagOut" output are set to signal state "1".
1276
See also
Overview of the valid data types (Page 677) Inserting additional inputs and outputs in LAD elements (Page 858) Removing inputs and outputs (Page 859) Basics of the EN/ENO mechanism (Page 753)
Parameters
The following table shows the parameters of the "OR logic operation" instruction:
Parameters EN ENO IN1 IN2 INn Declaration Input Output Input Input Input Data type BOOL BOOL Bit strings Bit strings Bit strings Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L or constant I, Q, M, D, L or constant Description Enable input Enable output First value for logic operation Second value for logic operation Other inputs whose values are logically combined. Result of the instruction
OUT
Output
Bit strings
I, Q, M, D, L
1277
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
Parameters IN1 IN2 OUT Operand Tag_Value1 Tag_Value2 Tag_Result Value 01010101 01010101 00000000 00001111 01010101 01011111
If operand "TagIn" has the signal state "1", the "OR logic operation" instruction is executed. The value of operand "Tag_Value1" and the value of operation "Tag_Value2" are ORed. The result is mapped bit-for-bit and output in operand "Tag_Result". The ENO output and the "TagOut" output are set to signal state "1".
See also
Overview of the valid data types (Page 677) Inserting additional inputs and outputs in LAD elements (Page 858) Removing inputs and outputs (Page 859) Basics of the EN/ENO mechanism (Page 753)
1278
Parameters
The following table shows the parameters of the "EXCLUSIVE OR logic operation" instruction:
Parameters EN ENO IN1 IN2 INn Declaration Input Output Input Input Input Data type BOOL BOOL Bit strings Bit strings Bit strings Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L or constant I, Q, M, D, L or constant Description Enable input Enable output First value for logic operation Second value for logic operation Other inputs whose values are logically combined. Result of the instruction
OUT
Output
Bit strings
I, Q, M, D, L
You can select the data type for the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
1279
If operand "TagIn" has the signal state "1", the "EXCLUSIVE OR logic operation" instruction is executed. The value of operand "Tag_Value1" and the value of operand "Tag_Value2" are EXCLUSIVELY ORed. The result is mapped bit-for-bit and output in operand "Tag_Result". The ENO output and the "TagOut" output are set to signal state "1".
See also
Overview of the valid data types (Page 677) Inserting additional inputs and outputs in LAD elements (Page 858) Removing inputs and outputs (Page 859) Basics of the EN/ENO mechanism (Page 753)
Parameters
The following table shows the parameters of the "Create ones complement" instruction:
Parameters EN ENO IN OUT Declaration Input Output Input Output Data type BOOL BOOL Bit strings, integers Bit strings, integers Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L Description Enable input Enable output Input value Ones complement of the value at input IN
1280
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
Parameters IN OUT Operand TagIn_Value TagOut_Value W#16#000F W#16#FFF0 Value W#16#7E W#16#81
If operand "TagIn" has the signal state "1", then the "Create ones complement" instruction will be executed. The instruction inverts the signal state of the individual bits at the TagIn_Value" input and writes the result to the "TagOut_Value" output. The ENO output and the "TagOut" output are set to signal state "1".
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753)
1281
Parameters
The following table shows the parameters of the "Decode" instruction:
Parameters EN ENO IN OUT Declaration Input Output Input Output Data type BOOL BOOL UINT Bit strings Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L Description Enable input Enable output Input value Output value
You can select the data type for the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
Example
The following example shows how the instruction works:
The following figure shows how the instruction works using specific operand values:
If operand "TagIn" has the signal state "1", the "Decode" instruction is executed. The instruction reads bit number "3" from the value at the "TagIn_Value" input and sets the third bit in the value at the "TagOut_Value" output. If the instruction is executed without errors, the ENO output has the signal state "1" and the "TagOut" output is set.
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753)
1282
Parameters
The following table shows the parameters of the "Encode" instruction:
Parameters EN ENO IN OUT Declaration Input Output Input Output Data type BOOL BOOL Bit strings INT Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L Description Enable input Enable output Input value Output value
You can select the data type for the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
Example
The following example shows how the instruction works:
The following figure shows how the instruction works using specific operand values:
1283
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753)
Parameters
The following table shows the parameters of the "Select" instruction:
Parameters EN ENO G IN0 Declaration Input Output Input Input Data type BOOL BOOL BOOL Bit strings, integers, floatingpoint numbers, TIME, TOD, DATE, characters Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant Description Enable input Enable output Switch First input value
1284
OUT
Output
I, Q, M, D, L
Result
You can select the data type for the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
Parameters G IN0 IN1 OUT Operand TagIn_G TagIn_Value0 TagIn_Value1 TagOut_Value 0 W#16#0000 W#16#FFFF W#16#0000 Value 1 W#16#4C W#16#5E W#16#5E
If operand "TagIn" has the signal state "1", the "Select" instruction is executed. Based on the signal state at the "TagIn_G" input, the value at the "TagIn_Value0" or "TagIn_Value1" input is selected and copied to the "TagOut_Value" output. If the instruction is executed without errors, enable output ENO has the signal state "1" and the "TagOut" output is set.
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753)
1285
Parameters
The following table shows the parameters of the "Multiplex" instruction:
Parameters EN ENO K Declaration Input Output Input Data type BOOL BOOL UINT Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L or constant Description Enable input Enable output Specifies the input whose content is to be copied. First input value
IN0
Input
Bit strings, integers, floatingpoint numbers, TIME, TOD, DATE, CHAR Bit strings, integers, floatingpoint numbers, TIME, TOD, DATE, CHAR Bit strings, integers, floatingpoint numbers, TIME, TOD, DATE, CHAR
IN1
Input
I, Q, M, D, L or constant
INn
Input
I, Q, M, D, L or constant
1286
OUT
Output
I, Q, M, D, L
You can select the data type for the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
Parameters K IN0 IN1 ELSE OUT Operand Tag_Number Tag_Value_0 Tag_Value_1 Tag_Value_2 Tag_Result 1 DW#16#00000000 DW#16#3E4A7D DW#16#FFFF0000 DW#16#3E4A7D Value
If operand "Tag_Input" has the signal state "1", the "Multiplex" instruction is executed. Depending in the value of operand Tag_Number, the value at the "Tag_Value_1" input is copied and assigned to the operand at the "Tag_Result" output. If the instruction is executed without errors, the "ENO" and Tag_Output outputs are set.
1287
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753)
Parameters
The following table shows the parameters of the "Demultiplex" instruction:
Parameters EN ENO K Declaration Input Output Input Data type BOOL BOOL UINT Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant Description Enable input Enable output Specifies the output to which the input value (IN) is copied. Input value
IN
Input
Bit strings, integers, floatingpoint numbers, CHAR, TIME Bit strings, integers, floatingpoint numbers, CHAR, TIME
I, Q, M, D, L or constant
OUT0
Output
I, Q, M, D, L
First output
1288
OUTn
Output
I, Q, M, D, L
Optional outputs
ELSE
Output
I, Q, M, D, L
You can select the data type for the instruction from the "<???>" drop-down list of the instruction box. For additional information on available data types, refer to "See also".
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
Table 9-22 Parameters K IN Input values of the "Demultiplex" instruction before network execution Operand Tag_Number Tag_Value 1 DW#16#FFFFFFFF Values 4 DW#16#3E4A7D
1289
If the "Tag_Input" input has the signal state "1", the "Demultiplex" instruction is executed. Depending on the value of operand "Tag_Number", the value at the IN input is copied to the corresponding output.
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753)
1290
The "Shift right" instruction is only executed if the signal state is "1" at the EN enable input. In this case, the ENO enable output also has the signal state "1". If the signal state at the EN enable input is "0", the ENO enable output also has the signal state "0".
Parameters
The following table shows the parameters of the "Shift right" instruction:
Parameters EN ENO IN N Declaration Input Output Input Input Data type BOOL BOOL Bit strings, integers UINT Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L or constant I, Q, M, D, L Description Enable input Enable output Value to be shifted. Number of bit positions by which the value is shifted. Result of the instruction
OUT
Output
You can select the data type for the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
1291
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
Parameters IN N OUT Operand TagIn_Value Tag_Number TagOut_Value Value 0011 1111 1010 1111 3 0000 0111 1111 0101
If operand "TagIn" has the signal state "1", the "Shift right" instruction is executed. The content of operand "TagIn_Value" is shifted three bit positions to the right. The result is sent to the "TagOut_Value" output. If the instruction is executed without errors, the ENO output has the signal state "1" and the "TagOut" output is set.
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753)
1292
The "Shift left" instruction is only executed if the signal state is "1" at the EN enable input. In this case, the ENO enable output also has the signal state "1". If the signal state at the EN enable input is "0", the ENO enable output also has the signal state "0".
Parameters
The following table shows the parameters of the "Shift left" instruction:
Parameters EN ENO IN N Declaration Input Output Input Input Data type BOOL BOOL Bit strings, integers UINT Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L or constant I, Q, M, D, L Description Enable input Enable output Value to be shifted. Number of bit positions by which the value is shifted. Result of the instruction
OUT
Output
You can select the data type for the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
1293
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
Parameters IN N OUT Operand TagIn_Value Tag_Number TagOut_Value Value 0011 1111 1010 1111 4 1111 1010 1111 0000
If operand "TagIn" has the signal state "1", the "Shift left" instruction is executed. The content of operand "TagIn_Value" is shifted four bit positions to the left. The result is sent to the "TagOut_Value" output. If the instruction is executed without errors, the ENO output has the signal state "1" and the "TagOut" output is set.
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753)
1294
The "Rotate right" instruction is only executed if the signal state is "1" at the EN enable input. In this case, the ENO enable output also has the signal state "1". If the signal state at the EN enable input is "0", the ENO enable output also has the signal state "0".
Parameters
The following table shows the parameters of the "Rotate right" instruction:
Parameters EN ENO IN N Declaration Input Output Input Input Data type BOOL BOOL Bit strings UINT Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L or constant Description Enable input Enable output Value to be rotated. Number of bit positions by which the value is rotated. Result of the instruction
OUT
Output
Bit strings
I, Q, M, D, L
You can select the data type for the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
1295
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
Parameters IN N OUT Operand TagIn_Value Tag_Number TagOut_Value Value 0000 1111 1001 0101 5 1010 1000 0111 1100
If operand "TagIn" has the signal state "1", the "Rotate right" instruction is executed. The content of operand "TagIn_Value" is rotated five bit positions to the right. The result is sent to the "TagOut_Value" output. If the instruction is executed without errors, the ENO output has the signal state "1" and the "TagOut" output is set.
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753)
1296
The "Rotate left" instruction is only executed if the signal state is "1" at the EN enable input. In this case, the ENO enable output also has the signal state "1". If the signal state at the EN enable input is "0", the ENO enable output also has the signal state "0".
Parameters
The following table shows the parameters of the "Rotate left" instruction:
Parameters EN ENO IN N Declaration Input Output Input Input Data type BOOL BOOL Bit strings UINT Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L or constant Description Enable input Enable output Value to be rotated. Number of bit positions by which the value is rotated. Result of the instruction
OUT
Output
Bit strings
I, Q, M, D, L
You can select the data type for the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
1297
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
Parameters IN N OUT Operand TagIn_Value Tag_Number TagOut_Value Value 1010 1000 1111 0110 5 0001 1110 1101 0101
If the "TagIn" input has the signal state "1", the "Rotate left" instruction is executed. The content of operand "TagIn_Value" is rotated five bit positions to the left. The result is sent to the "TagOut_Value" output. If the instruction is executed without errors, the ENO output has the signal state "1" and the "TagOut" output is set.
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753)
9.8.2.2
FBD
1298
Parameter
The following table shows the parameters of the instruction "AND logic operation":
Parameter <Operand> Declaration Input Data type BOOL Memory area I, Q, M, D, L Description The operand indicates the bit whose signal state will be queried.
Example
The following example shows how the instruction works:
Output "TagOut" is set, when the signal state of the operands "TagIn_1" and "TagIn_2" is "1".
See also
AND truth table (Page 1300) Example of detecting the direction of a conveyor belt (Page 1130) Example of controlling room temperature (Page 1134) Overview of the valid data types (Page 677) Adding additional inputs and outputs to FBD elements (Page 897) Insert input (Page 1303)
1299
See also
&: AND logic operation (Page 1298)
Parameter
The following table shows the parameters of the instruction "OR logic operation":
Parameters <Operand> Declaration Input Data type BOOL Memory area I, Q, M, D, L Description The operand indicates the bit whose signal state will be queried.
1300
Example
The following example shows how the instruction works:
Output "TagOut" is set, when the signal state of the operands "TagIn_1" or "TagIn_2" is "1".
See also
OR truth table (Page 1301) Example of controlling a conveyor belt (Page 1128) Adding additional inputs and outputs to FBD elements (Page 897) Overview of the valid data types (Page 677) Insert input (Page 1303)
See also
>=1: OR logic operation (Page 1300)
1301
Parameter
The following table shows the parameters of the instruction "EXCLUSIVE OR logic operation":
Parameters <Operand> Declaration Input Data type BOOL Memory area I, Q, M, D, L Description The operand indicates the bit whose signal state will be queried.
Example
The following example shows how the instruction works:
Output "TagOut" is set when the signal state of the operands "TagIn_1" and "TagIn_2" is "1". When both operands return the signal state "1" or "0", the output "TagOut" is reset.
See also
EXCLUSIVE OR truth table (Page 1303) Adding additional inputs and outputs to FBD elements (Page 897) Overview of the valid data types (Page 677) Insert input (Page 1303)
1302
The following table shows the results that arise from the EXCLUSIVE OR logic operation of three operands:
Signal state of the first operand 1 0 0 1 0 1 1 0 Signal state of the second operand 0 1 1 0 0 1 1 0 Signal state of the third operand 0 1 0 1 1 0 1 0 Result of the logic operation 1 0 1 0 1 0 1 0
See also
X: EXCLUSIVE OR logic operation (Page 1301)
1303
Parameter
The following table shows the parameters of the instruction "Insert input":
Parameter <Operand> Declaration Input Data type BOOL Memory area I, Q, M, D, L Description The operand indicates the bit whose signal state will be queried.
Example
The following example shows how the instruction works:
The box of the "AND logic operation" instruction was extended by an additional input at which the signal state of the operand "TagIn_3" is queried. Output "TagOut" is set, when the signal state of the operands "TagIn_1", "TagIn_2" and "TagIn_3" returns the signal state "1".
See also
&: AND logic operation (Page 1298) >=1: OR logic operation (Page 1300) X: EXCLUSIVE OR logic operation (Page 1301)
1304
Example
The following example shows how the instruction works:
Output "TagOut" is set when the following conditions are fulfilled: The input "TagIn_1" and/or "TagIn_2" has signal state "0". The input "TagIn_3" and/or "TagIn_4" has signal state "0" or the input "TagIn_5" has signal state "1".
=: Assignment Description
You can use the "Assignment" instruction to set the bit of a specified operand. If the result of logic operation (RLO) at the box input has the signal state "1", the specified operand is set to signal state "1". If the signal state at the box input is "0", the bit of the specified operand is reset to "0". The instruction does not influence the RLO. The RLO at the box input is assigned directly to the operand above the assignment box. The "Assignment" instruction can be placed at any position in the logic string.
Parameter
The following table shows the parameters of the "Assignment" instruction:
Parameter <Operand> Declaration Output Data type BOOL Memory area I, Q, M, D, L Description Operand to which the RLO is assigned.
1305
Example
The following example shows how the instruction works:
The operand "TagOut" is set at the output of the "Assignment" instruction when one of the following conditions is fulfilled: The inputs "TagIn_1" and "TagIn_2" have the signal state "1". The signal state at the input "TagIn_3" is "0".
See also
Overview of the valid data types (Page 677) Example of detecting the fill level of a storage area (Page 1131) Example of controlling room temperature (Page 1134)
Parameters
The following table shows the parameters of the "Negate assignment" instruction:
Parameters <Operand> Declaration Output Data type BOOL Memory area I, Q, M, D, L Description Operand to which the negated RLO is assigned.
1306
Example
The following example shows the mode of operation of the "Negate assignment" instruction:
The operand "TagOut" is reset when the following conditions are fulfilled: The operand "TagIn_1" or "TagIn_2" has the signal state "1". The operand "TagIn_3" has the signal state "0".
See also
Overview of the valid data types (Page 677)
Parameters
The following table shows the parameters of the "Reset output" instruction:
Parameters <Operand> Declaration Output Data type BOOL Memory area I, Q, M, D, L Description Operand that is reset if RLO = "1".
1307
Example
The following example shows how the instruction works:
Operand "TagOut" is reset when one of the following conditions is fulfilled: The operands "TagIn_1" and "TagIn_2" have signal state "1". The operand "TagIn_3" has the signal state "0".
See also
Example of controlling a conveyor belt (Page 1128) Example of detecting the direction of a conveyor belt (Page 1130) Overview of the valid data types (Page 677)
Parameters
The following table shows the parameters of the "Set output" instruction:
Parameters <Operand> Declaratio n Output Data type BOOL Memory area I, Q, M, D, L Description Operand that is set when RLO = "1".
1308
Example
The following example shows how the instruction works:
The operand "TagOut" is reset when one of the following conditions is fulfilled: The operands "TagIn_1" and "TagIn_2" have signal state "1". The operand "TagIn_3" has the signal state "0".
See also
Overview of the valid data types (Page 677)
1309
Parameter:
The following table shows the parameters of the "Set bit field" instruction:
Parameter EN N <Operand> Declaration Input Input Output Data type BOOL UINT BOOL Memory area I, Q, M, D, L Constant I, Q, M With a DB or an IDB, an element of an array [..] of BOOL Description Enable input Number of bits to be set Pointer to the first bit to be set.
Example
The following example shows the mode of operation of the "Set bit field" instruction:
If the operands "TagIn_1" and "TagIn_2" have the signal state "1", 5 bits are set starting at the address of the operand "MyDB".MyBoolArray[4].
See also
Overview of the valid data types (Page 677)
1310
Parameters
The following table shows the parameters of the "Reset bit field" instruction:
Parameters EN N <Operand> Declaration Input Input Output Data type BOOL UINT BOOL Memory area I, Q, M, D, L Constant I, Q, M With a DB or an IDB, an element of an array [..] of BOOL Description Enable input Number of bits to be reset Pointer to the first bit to be reset.
Example
The following example shows the mode of operation of the "Reset bit field" instruction:
If the operands "TagIn_1" and "TagIn_2" have the signal state "1", 5 bits are reset starting at the address of the operand "MyDB".MyBoolArray[4].
See also
Overview of the valid data types (Page 677)
1311
Parameters
The following table shows the parameters of the "Set/reset flip-flop" instruction:
Parameters S R1 <Operand> Q Declaration Input Input Output Output Data type BOOL BOOL BOOL BOOL Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L Description Enable setting Enable resetting Operand that is set or reset Signal state of the operand
Example
The following example shows how the "Set/reset flip-flop" instruction works:
The operands "TagSR" and "TagOut" are set when the following conditions are fulfilled: The operand "TagIn_1" has the signal state "1". The operand "TagIn_2" has the signal state "0". The operands "TagSR" and "TagOut" are reset when one of the following conditions is fulfilled: The operand "TagIn_1" has signal state "0" and the operand "TagIn_2" has signal state "1". The operands "TagIn_1" and "TagIn_2" have signal state "1".
See also
Overview of the valid data types (Page 677)
1312
Parameters
The following table shows the parameters of the "Reset/set flip-flop" instruction:
Parameters R S1 <Operand> Q Declaration Input Input Output Output Data type BOOL BOOL BOOL BOOL Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L Description Enable resetting Enable setting Operand that is reset or set. Signal state of the operand
Example
The following example shows how the "Reset/set flip-flop" instruction works:
The operands "TagRS" and "TagOut" are reset when the following conditions are fulfilled: The operand "TagIn_1" has the signal state "1". The operand "TagIn_2" has the signal state "0". The operands "TagRS" and "TagOut" are set when the following conditions are fulfilled: The operand "TagIn_1" has signal state "0" and the operand "TagIn_2" has signal state "1". The operands "TagIn_1" and "TagIn_2" have signal state "1".
See also
Overview of the valid data types (Page 677)
1313
Parameters
The following table shows the parameters of the "Scan operand for positive signal edge" instruction:
Parameters <Operand1> <Operand2> Declaration Input InOut Data type BOOL BOOL Memory area I, Q, M, D, L I, Q, M, D, L Description Signal to be scanned Edge memory bit in which the signal state of the previous scan is saved
1314
Example
The following example shows how the "Scan operand for positive signal edge" instruction works:
Output "TagOut" is set when the following conditions are fulfilled: There is a rising edge at input "TagIn_1". The signal state of the operand "TagIn_2" is "1".
See also
Overview of the valid data types (Page 677) Example of detecting the direction of a conveyor belt (Page 1130)
1315
Parameters
The following table shows the parameters of the "Scan operand for negative signal edge" instruction:
Parameters <Operand1> <Operand2> Declaration Input InOut Data type BOOL BOOL Memory area I, Q, M, D, L I, Q, M, D, L Description Signal to be scanned Edge memory bit in which the signal state of the previous scan is saved
Example
The following example shows how the "Scan operand for negative signal edge" instruction works:
Output "TagOut" is set when the following conditions are fulfilled: There is a falling edge at input "TagIn_1". The signal state of the operand "TagIn_2" is "1".
See also
Overview of the valid data types (Page 677)
1316
Parameters
The following table shows the parameters of the "Set operand on positive signal edge" instruction:
Parameters <Operand1> <Operand2> Declaration InOut Output Data type BOOL BOOL Memory area I, Q, M, D, L I, Q, M, D, L Description Edge memory bit Operand which is set when there is a positive signal edge.
Example
The following example shows the parameters of the "Set operand on positive signal edge" instruction:
The "TagOut" output is set for one program cycle, when the signal state at the input of the instruction box switches from "0" to "1" (positive signal edge). In all other cases, the "TagOut" output has signal state "0".
See also
Overview of the valid data types (Page 677)
1317
Parameters
The following table shows the parameters of the "Set operand on negative signal edge" instruction:
Parameters <Operand1> Declaration Output Data type BOOL Memory area I, Q, M, D, L Description Operand which is set when there is a negative signal edge. Edge memory bit
<Operand2>
InOut
BOOL
I, Q, M, D, L
Example
The following example shows the mode of operation of the "Set operand on negative signal edge" instruction:
1318
See also
Overview of the valid data types (Page 677)
Parameters
The following table shows the parameters of the "Scan RLO for positive signal edge" instruction:
Parameters CLK <Operand> Declaration Input InOut Data type BOOL BOOL Memory area I, Q, M, D, L I, Q, M, D, L Description Current RLO. Edge memory bit in which the RLO of the previous query is saved. Result of edge evaluation
Output
BOOL
I, Q, M, D, L
1319
Example
The following example shows how the instruction works:
The RLO of the preceding bit logic operation is saved in the edge memory bit "Tag_M". If a "0" to "1" change is detected in the signal state of the RLO, the program jumps to jump label CAS1.
See also
Overview of the valid data types (Page 677)
1320
Parameters
The following table shows the parameters of the "Scan RLO for negative signal edge" instruction:
Parameters CLK <Operand> Declaration Input InOut Data type BOOL BOOL Memory area I, Q, M, D, L I, Q, M, D, L Description Current RLO Edge memory bit in which the RLO of the previous query is saved. Result of edge evaluation
Output
BOOL
I, Q, M, D, L
Example
The following example shows how the instruction works:
The RLO of the preceding bit logic operation is saved in the edge memory bit "Tag_M". If a "1" to "0" change is detected in the signal state of the RLO, the program jumps to jump label CAS1.
See also
Overview of the valid data types (Page 677)
1321
Parameters
The following table shows the parameters of the "Generate pulse" instruction:
Parameters IN PT Declaration Input Input Data type BOOL TIME Memory area I, Q, M, D, L I, Q, M, D, L or constant Description Start input Duration of the pulse. The value of the PT parameter must be positive. Q ET Output Output BOOL TIME I, Q, M, D, L I, Q, M, D, L Pulse output Current time value
1322
Pulse diagram
The following figure shows the pulse diagram of the "Generate pulse" instruction:
See also
Overview of the valid data types (Page 677) Example of controlling room temperature (Page 1134)
1323
Parameters
The following table shows the parameters of the "Generate on-delay" instruction:
Parameters IN PT Declaration Input Input Data type BOOL TIME Memory area I, Q, M, D, L I, Q, M, D, L or constant Description Start input Duration of the on delay. The value of the PT parameter must be positive. Q Output BOOL I, Q, M, D, L Output that is set when the time PT expires. Current time value
ET
Output
TIME
I, Q, M, D, L
1324
Pulse diagram
The following figure shows the pulse diagram of the "Generate on-delay" instruction:
See also
Overview of the valid data types (Page 677)
1325
Parameters
The following table shows the parameters of the "Generate off-delay" instruction:
Parameters IN PT Declaration Input Input Data type BOOL TIME Memory area I, Q, M, D, L I, Q, M, D, L or constant Description Start input Duration of the off delay. The value of the PT parameter must be positive. Q Output BOOL I, Q, M, D, L Output that is reset when the timer PT expires. Current time value
ET
Output
TIME
I, Q, M, D, L
1326
Pulse diagram
The following figure shows the pulse diagram of the "Generate off-delay" instruction:
See also
Overview of the valid data types (Page 677)
1327
Parameters
The following table shows the parameters of the "Time accumulator" instruction:
Parameters IN R PT Declaration Input Input Input Data type BOOL BOOL TIME Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant Description Start input Reset input Maximum duration of time recording. The value of the PT parameter must be positive. Q Output BOOL I, Q, M, D, L Output that is set when the time PT expires. Current time value
ET
Output
TIME
I, Q, M, D, L
1328
Pulse diagram
The following figure shows the pulse diagram of the "Time accumulator" instruction:
See also
Overview of the valid data types (Page 677)
1329
Parameters
The following table shows the parameters of the instruction "Start pulse timer":
Parameters <Time duration> Declaration Input Data type TIME Memory area I, Q, M, D, L or constant D, L Description Duration with which the IEC timer runs IEC timer, which is started
<IEC timer>
InOut
IEC_TIMER/TP
Example
The following example shows how the instruction works:
The "Start pulse timer" instruction is executed when the signal state of the operand "Tag_Input" changes from "0" to "1". Timer "DB1".MyIEC_TIMER starts running for the time duration that is stored in operand "TagTime".
As long as the timer "DB1".MyIEC_TIMER is running, the timer status ("DB1".MyIEC_TIMER.Q) has the signal state "1" and the operand "Tag_Output" is set. When the IEC timer has expired, the signal state of the timer status changes back to "0" and the "Tag_Output" operand is reset.
See also
Overview of the valid data types (Page 677)
1330
Parameters
The following table shows the parameters of the instruction "Start on-delay timer":
Parameters <Time duration> Declaration Input Data type TIME Memory area I, Q, M, D, L or constant D, L Description Duration with which the IEC timer runs IEC timer, which is started
<IEC timer>
InOut
IEC_TIMER/TON
1331
Example
The following example shows how the instruction works:
The "Start on-delay timer" instruction is executed when the signal state of the operand "Tag_Input" changes from "0" to "1". Timer "MyIEC_TIMER" starts running for the time duration that is stored in operand "TagTime".
If the timer "MyIEC_TIMER" has expired and the operand "Tag_Input" has the signal state "1", querying the timer status ("MyIEC_TIMER".Q) returns signal state "1" and the "Tag_Output" operand is set. When the signal state of the operand "Tag_Input" changes to "0", the querying of the timer status returns the signal state "0" and the operand "Tag_Output" is reset.
See also
Overview of the valid data types (Page 677)
1332
Parameters
The following table shows the parameters of the instruction "Start off-delay timer":
Parameters <Time duration> Declaration Input Data type TIME Memory area I, Q, M, D, L or constant D, L Description Duration with which the IEC timer runs IEC timer, which is started
<IEC timer>
InOut
IEC_TIMER/TOF
Example
The following example shows how the instruction works:
The "Start off-delay timer" instruction is executed when the signal state of the operand "Tag_Input" changes from "1" to "0". Timer "#MyIEC_TIMER" starts running for the time duration that is stored in operand "TagTime".
As long as the MyIEC_TIMER timer is running, the time status (#MyIEC_TIMER.Q) has signal state "1" and the "Tag_Output" operand is set. If the timer has expired and the operand "Tag_Input" has the signal state "0", the query of the timer status returns the signal state "0". If the signal state of the "Tag_Input" operand changes to "1" before the "#MyIEC_TIMER" timer expires, the time is reset. When the signal state of the operand "Tag_Input" is "1", the query of the timer status returns the signal state "1".
See also
Overview of the valid data types (Page 677)
1333
Parameters
The following table shows the parameters of the "Time accumulator" instruction:
Parameters <Time duration> Declaration Input Data type TIME Memory area I, Q, M, D, L or constant D, L Description Duration with which the IEC timer runs IEC timer, which is started
<IEC timer>
InOut
IEC_TIMER/ TONR
1334
Example
The following example shows how the instruction works:
The "Time accumulator" instruction is executed if there is a positive signal edge in the RLO. The time is recorded as long as the operand "Tag_Input" has the signal state "1".
If the recorded time exceeds the value of the operand "TagTime", then the query of the timer status ("MyIEC_TIMER".Q) will return the signal state "1" and the operand "Tag_Output" will be set.
See also
Overview of the valid data types (Page 677) RT: Reset timer (Page 1335)
1335
Parameters
The following table shows the parameters of the instruction "Reset timer":
Parameters <IEC timer> Declaration InOut Data type IEC_TIMER, TON, TOF, TP Memory area D, L Description IEC timer, which is reset.
Example
The following example shows how the instruction works:
The "Generate on-delay" instruction executes when the signal state of the "Tag_Input_1" operand changes from "0" to "1". The IEC timer stored in the instance data block "TON_DB" is started with the time duration that is specified by the operand "Tag_PT".
If the operands "Tag_Input_2" and "Tag_Input_3" have the signal state "1", the "Reset timer" instruction is executed and the IEC timer stored in the data block "TON_DB" is reset.
See also
Overview of the valid data types (Page 677)
1336
Parameters
The following table shows the parameters of the instruction "Load time duration":
Parameters <Time duration> <IEC timer> Declaration Input InOut Data type TIME IEC_TIMER, TON, TOF, TP Memory area I, Q, M, D, L or constant D, L Description Time duration IEC timer, the duration of which is set.
Example
The following example shows how the instruction works:
The "Generate on-delay" instruction executes when the signal state of the "Tag_Input_1" operand changes from "0" to "1". The IEC timer stored in the instance data block "TON_DB" is started with the time duration that is specified by the operand "Tag_PT".
1337
See also
Overview of the valid data types (Page 677)
1338
Parameters
The following table shows the parameters of the "Count up" instruction:
Parameters CU R PV Q CV Declaration Input Input Input Output Output Data type BOOL BOOL Integers BOOL Integers Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L I, Q, M, D, L Description Count input Reset input Value at which the output Q is set. Counter status Current count value
You can select the data type of the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
1339
Example
The following example shows how the instruction works:
When the signal state of the "TagIn_1" operand changes from "0" to "1", the "Count up" instruction is executed and the current count value of the "Tag_CV" operand is incremented by one. With each further positive signal edge, the counter is incremented until the high limit value of the specified data type (INT = 32 767) is reached. The value of the PV parameter is adopted as the limit for determining the "TagOut" output. The "TagOut" output has signal state "1" as long as the current count value is greater than or equal to the value of the "Tag_PV" operand. In all other cases, the "TagOut" ouput returns the signal state "0".
See also
Overview of the valid data types (Page 677)
1340
Parameters
The following table shows the parameters of the "Count down" instruction:
Parameters CD LD PV Q CV Declaration Input Input Input Output Output Data type BOOL BOOL Integers BOOL Integers Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L I, Q, M, D, L Description Count input Load input Value at which the output Q is set. Counter status Current count value
You can select the data type of the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
1341
Example
The following example shows how the instruction works:
When the signal state of the "TagIn_1" operand changes from "0" to "1", the "Count down" instruction executes and the value at the "Tag_CV" output is decremented by one. With each additional positive signal edge, the count value is decremented until the low limit of the specified data type (INT = -32 768) is reached. The value of the PV parameter is adopted as the limit for determining the "TagOut" output. The "TagOut" output has signal state "1" as long as the current count value is less than or equal to "0". In all other cases, the "TagOut" output returns the signal state "0".
See also
Overview of the valid data types (Page 677)
1342
Parameters
The following table shows the parameters of the "Count up and down" instruction:
Parameters CU CD R LD PV Declaration Input Input Input Input Input Data type BOOL BOOL BOOL BOOL Integers Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L Description Count up input Count down input Reset input Load input Value at which the output QU / QD is set. Up-counter status
QU
Output
BOOL
1343
You can select the data type of the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
Example
The following example shows how the instruction works:
If the signal state at the "TagIn_CU" or "TagIn_CD" input changes from "0" to "1" (positive signal edge), the "Count up and down" instruction is executed. When there is a positive signal edge at the "TagIn_CU" input, the current count value is incremented by one and stored at the "Tag_CV" output. When there is a positive signal edge at the "TagIn_CD" input, the count value is decremented by one and stored at the "Tag_CV" output. When there is a positive edge at the CU input, the count value is incremented until it reaches the high limit value (INT = 32 767). If input CD has a positive signal edge, the count value is incremented until it reaches the low limit value (INT = -32 768). The "TagOut_GU" output has signal state "1" as long as the current count value is greater than or equal to the value at the "Tag_PV" input. In all other cases, the "TagOut_QU" output returns the signal state "0". The "TagOut_QD" output has signal state "1" as long as the current count value is less than or equal to "0". In all other cases, the "TagOut_QD" output has signal state "0".
See also
Overview of the valid data types (Page 677) Example of detecting the fill level of a storage area (Page 1131)
1344
The "Equal" instruction also compares individual characters of a string (STRING). The number of the character to be compared is specified in square brackets beside the operand name. With the specification "MyString[2]", for example, the second character of the "MyString" string is compared. If IEC check is enabled, the operands to be compared must be of the same data type. If IEC check is not enabled, the width (length) of the operands must be the same. If the floating-point numbers are being compared, the operands to be compared must be of the same data type regardless of the IEC check setting.
Parameters
The following table shows the parameters of the instruction "Equal":
Parameters IN1 Declaration Input Data type Bit strings, integers, floatingpoint numbers, characters, TIME, DATE, TOD, DTL Bit strings, integers, floatingpoint numbers, characters, TIME, DATE, TOD, DTL Memory area I, Q, M, D, L or constant Description First value to compare
IN2
Input
I, Q, M, D, L or constant
1345
Example
The following example shows how the instruction works:
Output "TagOut" is set when the following conditions are fulfilled: The operand "TagIn_1" has the signal state "1". The condition of the comparison instruction is fulfilled ("Tag_Value1" = "Tag_Value2").
See also
Overview of the valid data types (Page 677)
The "Not equal" instruction also compares individual characters of a string (STRING). The number of the character to be compared is specified in square brackets beside the operand name. With the specification "MyString[2]", for example, the second character of the "MyString" string is compared.
1346
Parameters
The following table shows the parameters of the instruction "Not equal":
Parameters IN1 Declaration Input Data type Bit strings, integers, floatingpoint numbers, characters, TIME, DATE, TOD, DTL Bit strings, integers, floatingpoint numbers, characters, TIME, DATE, TOD, DTL Memory area I, Q, M, D, L or constant Description First value to compare
IN2
Input
I, Q, M, D, L or constant
You can select the data type of the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
Example
The following example shows how the instruction works:
Output "TagOut" is set when the following conditions are fulfilled: The operand "TagIn_1" has the signal state "1". The condition of the comparison instruction is fulfilled ("Tag_Value1" <> "Tag_Value2").
See also
Overview of the valid data types (Page 677)
1347
The "Greater or equal" instruction also compares individual characters of a string (STRING). The number of the character to be compared is specified in square brackets beside the operand name. With the specification "MyString[2]", for example, the second character of the "MyString" string is compared. In comparing timer values, the RLO of the instruction is "1" if the timer at input IN1 is greater (more recent) than or equal to the timer at input IN2.
Parameters
The following table shows the parameters of the instruction "Greater or equal":
Parameters IN1 Declaration Input Data type Integers, floatingpoint numbers, characters, TIME, TOD, DTL Integers, floatingpoint numbers, characters, TIME, TOD, DTL Memory area I, Q, M, D, L or constant Description First value to compare
IN2
Input
I, Q, M, D, L or constant
1348
Example
The following example shows how the instruction works:
Output "TagOut" is set when the following conditions are fulfilled: The operand "TagIn_1" has the signal state "1". The condition of the comparison instruction is fulfilled ("Tag_Value1" >= "Tag_Value2").
See also
Overview of the valid data types (Page 677) Example of detecting the fill level of a storage area (Page 1131)
1349
Parameters
The following table shows the parameters of the instruction "Less or equal":
Parameters IN1 Declaration Input Data type Integers, floatingpoint numbers, characters, TIME, TOD, DTL Integers, floatingpoint numbers, characters, TIME, TOD, DTL Memory area I, Q, M, D, L or constant Description First value to compare
IN2
Input
I, Q, M, D, L or constant
You can select the data type of the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
Example
The following example shows how the instruction works:
Output "TagOut" is set when the following conditions are fulfilled: The operand "TagIn_1" has the signal state "1". The condition of the comparison instruction is fulfilled ("Tag_Value1" <= "Tag_Value2").
See also
Overview of the valid data types (Page 677)
1350
The "Greater than" instruction also compares individual characters of a string (STRING). The number of the character to be compared is specified in square brackets beside the operand name. With the specification "MyString[2]", for example, the second character of the "MyString" string is compared. In comparing timer values, the RLO of the instruction is "1" if the timer at input IN1 is greater (more recent) than the timer at input IN2.
Parameters
The following table shows the parameters of the instruction "Greater than":
Parameters IN1 Declaration Input Data type Integers, floatingpoint numbers, characters, TIME, TOD, DTL Integers, floatingpoint numbers, characters, TIME, TOD, DTL Memory area I, Q, M, D, L or constant Description First value to compare
IN2
Input
I, Q, M, D, L or constant
You can select the data type of the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
1351
Example
The following example shows how the instruction works:
Output "TagOut" is set when the following conditions are fulfilled: The operand "TagIn_1" has the signal state "1". The condition of the comparison instruction is fulfilled ("Tag_Value1" > "Tag_Value2").
See also
Overview of the valid data types (Page 677)
The "Less than" instruction also compares individual characters of a string (STRING). The number of the character to be compared is specified in square brackets beside the operand name. With the specification "MyString[2]", for example, the second character of the "MyString" string is compared. In comparing timer values, the RLO of the instruction is "1" if the timer at input IN1 is less (less recent) than the timer at input IN2 .
1352
Parameters
The following table shows the parameters of the instruction "Less than":
Parameters IN1 Declaration Input Data type Integers, floatingpoint numbers, characters, TIME, TOD, DTL Integers, floatingpoint numbers, characters, TIME, TOD, DTL Memory area I, Q, M, D, L or constant Description First value to compare
IN2
Input
I, Q, M, D, L or constant
You can select the data type of the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
Example
The following example shows how the instruction works:
Output "TagOut" is set when the following conditions are fulfilled: The operand "TagIn_1" has the signal state "1". The condition of the comparison instruction is fulfilled (("Tag_Value1" < "Tag_Value2")).
See also
Overview of the valid data types (Page 677) Example of detecting the fill level of a storage area (Page 1131)
1353
Parameters
The following table shows the parameters of the "Value within range" instruction:
Parameters MIN VAL MAX Box output Declaration Input Input Input Output Data type Integers, floatingpoint numbers Integers, floatingpoint numbers Integers, floatingpoint numbers BOOL Memory area I, Q, M, D, L or constant I, Q, M, D, L or constant I, Q, M, D, L or constant I, Q, M, D, L Description Low limit of the value range Comparison value High limit of the value range Result of the comparison
You can select the data type of the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also":
Example
The following example shows how the instruction works:
Output "TagOut" is set when the following conditions are fulfilled: The operands "TagIn_1" and "TagIn_2" have signal state "1". The operand "TagIn_3" has the signal state "1". The value of the operand "Tag_Value" is within the value range that is specified by the current values of the operands "Tag_Min" and "Tag_Max" (MIN <= VAL or VAL <= MAX).
1354
See also
Overview of the valid data types (Page 677)
Parameters
The following table shows the parameters of the "Value outside range" instruction:
Parameters MIN VAL MAX Box output Declaration Input Input Input Output Data type Integers, floatingpoint numbers Integers, floatingpoint numbers Integers, floatingpoint numbers BOOL Memory area I, Q, M, D, L or constant I, Q, M, D, L or constant I, Q, M, D, L or constant I, Q, M, D, L Description Low limit of the value range Comparison value High limit of the value range Result of the comparison
You can select the data type of the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
1355
Example
The following example shows how the instruction works:
Output "TagOut" is set when the following conditions are fulfilled: The operands "TagIn_1" and "TagIn_2" have signal state "1". The operand "TagIn_3" has the signal state "1". The value of the operand "Tag_Value" is outside the value range that is specified by the values of the operands "Tag_Min" and "Tag_Max" (MIN > VAL or VAL > MAX).
See also
Overview of the valid data types (Page 677)
Parameters
The following example shows how the "Check validity" instruction works:
Parameters <Operand> Declaration Input Data type Floating-point numbers Memory area I, Q, M, D, L or constant Description Value to be checked.
1356
Example
The following example shows how the "Check validity" instruction works:
When the values of the operands "Tag_Value1" and "Tag_Value2" show valid floating-point numbers, the "Multiply" (MUL) instruction is activated and the ENO output is set. During the execution of the "Multiply" (MUL) instruction, the value of the operand "Tag_Value1" is multiplied by the value of operand "Tag_Value2". The product of the multiplication is then stored in the operand "Tag_Result". If no errors occur during the execution of the instruction, the outputs ENO and "TagOut" are set to signal state "1".
See also
Overview of the valid data types (Page 677)
Parameters
The following table shows the parameters of the instruction "Check invalidity":
Parameters <Operand> Declaration Input Data type Floating-point numbers Memory area I, Q, M, D, L or constant Description Value to be checked.
1357
Example
The following example shows how the instruction works:
When the value of operand "TagIn_Value" is an invalid floating-point number, the "Copy value" (MOVE) instruction will not be executed. The "TagOut" output is reset to signal state "0".
See also
Overview of the valid data types (Page 677)
1358
FLOOR: Generate next lower integer from floating- FLOOR( ) point number
In its initial state the instruction box contains at least 2 inputs (IN1 and IN2). The number of inputs can be extended. The inserted inputs are numbered in ascending order in the box. The values of the input parameters are use to execute the specified expression. Not all defined input parameters have to be used in the expression. The result of the instruction is transferred to the box output OUT. If, in the expression, you use inputs that are not available in the box, these inputs are automatically inserted. Provided that there are no gaps in the numbering of the inputs that are to be newly defined in the expression. You cannot, for example, use the input IN4 in the expression if the input IN3 is not defined.
1359
Parameters
The following table shows the parameters of the instruction "Calculate":
Parameters EN ENO IN1 Declaration Input Output Input Data type BOOL BOOL Bit strings, integers, floatingpoint numbers Bit strings, integers, floatingpoint numbers Bit strings, integers, floatingpoint numbers Bit strings, integers, floatingpoint numbers Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L or constant I, Q, M, D, L or constant I, Q, M, D, L Description Enable input Enable output First available input Second available input Additionally inserted inputs Output to which the end result is to be transferred.
IN2
Input
INn
Input
OUT
Output
1360
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
Parameters IN1 IN2 IN3 IN4 OUT Operand "Tag_Value_1" "Tag_Value_2" "Tag_Value_3" "Tag_Value_4" "Tag_Result" Value 4 4 3 2 12
The "Calculate" instruction is executed when input "Tag_Input" has the signal state "1". The value of operand "Tag_Value_1" is added to the value of operand "Tag_Value_2". The sum is multiplied with the value of the operand "Tag_Value_3". The product is divided by the value of the operand "Tag_Value_4". The quotient is transferred as end result to the operand "Tag_Result" at the OUT output of the instruction. If no errors occur during the execution of the individual instructions, output ENO and the operand "Tag_Output" are set to "1".
See also
Overview of the valid data types (Page 677) Adding additional inputs and outputs to FBD elements (Page 897) Removing instruction inputs and outputs (Page 898) Basics of the EN/ENO mechanism (Page 753)
1361
In its initial state the instruction box contains at least 2 inputs (IN1 and IN2). The number of inputs can be extended. The inserted inputs are numbered in ascending order in the box. During the execution of the instruction, the values of all available input parameters are added. The sum is stored at output OUT. The instruction is only executed if the signal state at the enable input EN is "1". If no errors occur during the execution of the instruction, the output ENO also has the signal state "1". Enable output ENO has the signal state "0" if one of the following conditions applies: Input EN has the signal state "0". The result of the instruction is outside the range permitted for the data type specified at output OUT. A floating-point number has an invalid value.
Parameters
The following table shows the parameters of the instruction "Add":
Parameters EN ENO IN1 IN2 INn Declaration Input Output Input Input Input Data type BOOL BOOL Integers, floatingpoint numbers Integers, floatingpoint numbers Integers, floatingpoint numbers Integers, floatingpoint numbers Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L or constant I, Q, M, D, L or constant I, Q, M, D, L Description Enable input Enable output First number to be added Second number to be added Optional input values, which are added. Sum
OUT
Output
You can select the data type of the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also":
Example
The following example shows how the instruction works:
1362
See also
Overview of the valid data types (Page 677) Removing instruction inputs and outputs (Page 898) Basics of the EN/ENO mechanism (Page 753) Adding additional inputs and outputs to FBD elements (Page 897)
Parameters
The following table shows the parameters of the instruction "Subtract":
Parameters EN ENO IN1 IN2 OUT Declaration Input Output Input Input Output Data type BOOL BOOL Integers, floatingpoint numbers Integers, floatingpoint numbers Integers, floatingpoint numbers Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L or constant I, Q, M, D, L Description Enable input Enable output Minuend Subtrahend Difference
You can select the data type of the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
1363
Example
The following example shows how the instruction works:
If the operand "TagIn" has the signal state "1", the "Subtract" instruction is executed. The value of operand "Tag_Value2" is subtracted from the value of operand "Tag_Value1". The result of the subtraction is stored in the operand "Tag_Result". If no errors occur during the execution of the instruction, the output ENO has the signal state "1" and the output "TagOut" is set.
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753)
Parameters
The following table shows the parameters of the instruction "Multiply":
Parameters EN ENO Declaration Input Output Data type BOOL BOOL Memory area I, Q, M, D, L I, Q, M, D, L Description Enable input Enable output
1364
OUT
Output
You can select the data type of the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
Example
The following example shows how the instruction works:
If the operand "TagIn" has the signal state "1", the "Multiply" instruction is executed. The value of operand "Tag_Value1" is multiplied with the value of operand "Tag_Value2". The result of the multiplication is stored in the operand "Tag_Result". If no errors occur during the execution of the instruction, the output ENO has the signal state "1" and the output "TagOut" is set.
See also
Overview of the valid data types (Page 677) Removing instruction inputs and outputs (Page 898) Basics of the EN/ENO mechanism (Page 753) Adding additional inputs and outputs to FBD elements (Page 897)
1365
Parameters
The following table shows the parameters of the instruction "Divide":
Parameters EN ENO IN1 IN2 OUT Declaration Input Output Input Input Output Data type BOOL BOOL Integers, floatingpoint numbers Integers, floatingpoint numbers Integers, floatingpoint numbers Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L or constant I, Q, M, D, L Description Enable input Enable output Dividend Divisor Quotient value
You can select the data type of the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
Example
The following example shows how the instruction works:
If the operand "TagIn" has the signal state "1", the "Divide" instruction is executed. The value of operand "Tag_Value1" is divided by the value of operand "Tag_Value2". The result of the division is stored in the operand "Tag_Result". If no errors occur during the execution of the instruction, the output ENO has the signal state "1" and the output "TagOut" is set.
1366
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753)
Parameters
The following table shows the parameters of the instruction "Return remainder of division":
Parameters EN ENO IN1 IN2 OUT Input Output Input Input Output Data type BOOL BOOL Integers Integers Integers Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L or constant I, Q, M, D, L Description Enable input Enable output Dividend Divisor Remainder of division
You can select the data type of the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
Example
The following example shows how the instruction works:
1367
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753)
Parameters
The following table shows the parameters of the "Create twos complement" instruction:
Parameters EN ENO IN OUT Declaration Input Output Input Output Data type BOOL BOOL SINT, INT, DINT, REAL, LREAL SINT, INT, DINT, REAL, LREAL Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L Description Enable input Enable output Input value Twos complement of the input value
You can select the data type of the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
1368
Example
The following example shows how the instruction works:
If the operand "TagIn" has the signal state "1", the "Create twos complement" instruction is executed. The sign of the value at input "TagIn_Value" is changed and the result is stored at output "TagOut_Value". If no errors occur during the execution of the instruction, the output ENO has the signal state "1" and the output "TagOut" is set.
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753) Adding additional inputs and outputs to FBD elements (Page 897)
Parameters
The following table shows the parameters of the "Increment" instruction:
Parameters EN ENO IN/OUT Declaration Input Output InOut Data type BOOL BOOL Integers Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L Description Enable input Enable output Value to be incremented.
You can select the data type of the instruction from the "<???>" drop-down list of the instruction box.
1369
Example
The following example shows how the instruction works:
If the operands TagIn_1 and TagIn_2 have the signal state "1", the value of the operand "Tag_InOut" is incremented by one and the output "TagOut" is set.
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753) Adding additional inputs and outputs to FBD elements (Page 897)
Parameters
The following table shows the parameters of the instruction "Decrement":
Parameters EN ENO IN/OUT Declaration Input Output InOut Data type BOOL BOOL Integers Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L Description Enable input Enable output Value to be decremented.
You can select the data type of the instruction from the "<???>" drop-down list of the instruction box.
1370
Example
The following example shows how the instruction works:
If the operands TagIn_1 and TagIn_2 have the signal state "1", the value of the operand "Tag_InOut" is decremented by one and the output "TagOut" is set.
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753) Adding additional inputs and outputs to FBD elements (Page 897)
Parameters
The following table shows the parameters of the instruction "Form absolute value":
Parameters EN ENO Declaration Input Output Data type BOOL BOOL Memory area I, Q, M, D, L I, Q, M, D, L Description Enable input Enable output
1371
OUT
Output
You can select the data type of the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
Parameters IN OUT Operand "TagIn_Value" "TagOut_Value" Value - 6, 234 6, 234
If the operand "TagIn" has the signal state "1", the "Form absolute value" instruction is executed. The instruction calculates the absolute value of the value at input "TagIn_Value" and sends the result to output "TagOut_Value". If no errors occur during the execution of the instruction, the output "TagOut" is set.
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753) Adding additional inputs and outputs to FBD elements (Page 897)
1372
Parameters
The following table shows the parameters of the "Get minimum" instruction:
Parameters EN ENO IN1 IN2 INn Declaration Input Output Input Input Input Data type BOOL BOOL Integers, floatingpoint numbers Integers, floatingpoint numbers Integers, floatingpoint numbers Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L or constant I, Q, M, D, L or constant Description Enable input Enable output First input value Second input value Additionally inserted inputs whose values are to be compared. Result
OUT
Output
I, Q, M, D, L
You can select the data type of the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
1373
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
Parameters IN1 IN2 IN3 OUT Operand TagIn_Value1 TagIn_Value2 TagIn_Value3 TagOut_Value Value 12 222 14 444 13 333 12 222
If the operands "TagIn_1" and "TagIn_2" have signal state "1", the "Get minimum" instruction is executed. The instruction compares the values of the specified operands and copies the lowest value ("TagIn_Value1") to output "TagOut_Value". If no errors occur during the execution of the instruction, the output "TagOut" is set.
See also
Overview of the valid data types (Page 677) Removing instruction inputs and outputs (Page 898) Basics of the EN/ENO mechanism (Page 753) Adding additional inputs and outputs to FBD elements (Page 897)
1374
Parameters
The following table shows the parameters of the "Get maximum" instruction:
Parameters EN ENO IN1 IN2 INn Declaration Input Output Input Input Input Data type BOOL BOOL Integers, floatingpoint numbers Integers, floatingpoint numbers Integers, floatingpoint numbers Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L or constant I, Q, M, D, L or constant Description Enable input Enable output First input value Second input value Additionally inserted inputs whose values are to be compared. Result
OUT
Output
I, Q, M, D, L
You can select the data type of the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
1375
If the operands "TagIn_1" and "TagIn_2" have signal state "1", the "Get maximum" instruction is executed. The instruction compares the values of the specified operands and copies the greatest value ("TagIn_Value2") to output "TagOut_Value". If no errors occur during the execution of the instruction, the output "TagOut" is set.
See also
Overview of the valid data types (Page 677) Removing instruction inputs and outputs (Page 898) Basics of the EN/ENO mechanism (Page 753) Adding additional inputs and outputs to FBD elements (Page 897)
Parameters
The following table shows the parameters of the "Set limit value" instruction:
Parameters EN ENO Declaration Input Output Data type BOOL BOOL Memory area I, Q, M, D, L I, Q, M, D, L Description Enable input Enable output
1376
You can select the data type of the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
Parameters MN IN MX OUT Operand Tag_MN Tag_Value Tag_MX Tag_Result Value 12 000 8 000 16 000 12 000
If the operands "TagIn_1" and "TagIn_2" have signal state "1", the "Set limit value" instruction is executed. The value of operand "Tag_Value" is compared with the values of operands "Tag_MN" and "Tag_MX". Since the value at the operand "Tag_Value" is less than the low limit, the value of the operand "Tag_MN" is copied to output "Tag_Result". If no errors occur during the execution of the instruction, the output "TagOut" is set.
1377
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753) Adding additional inputs and outputs to FBD elements (Page 897)
Parameters
The following table shows the parameters of the instruction "Form square":
Parameters EN ENO IN OUT Declaration Input Output Input Output Data type BOOL BOOL Floating-point numbers Floating-point numbers Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L Description Enable input Enable output Input value Square of the input value
You can select the data type of the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
Example
The following example shows how the instruction works:
1378
If the operand "TagIn" has the signal state "1", the "Form square" instruction is executed. The instruction squares the value of the operand "Tag_Value" and sends the result to output "Tag_Result". If no errors occur during the execution of the instruction, the output "TagOut" is set.
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753)
Parameters
The following table shows the parameters of the instruction "Form square root":
Parameters EN ENO Declaration Input Output Data type BOOL BOOL Memory area I, Q, M, D, L I, Q, M, D, L Description Enable input Enable output
1379
You can select the data type of the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
Parameters IN OUT Operand Tag_Value Tag_Result Value 25.0 5.0
If the operand "TagIn" has the signal state "1", the "Form square root" instruction is executed. The instruction calculates the square root of the operand "Tag_Value" and sends the result to output "Tag_Result". If no errors occur during the execution of the instruction, the output "TagOut" is set.
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753)
1380
Parameters
The following table shows the parameters of the instruction "Form natural logarithm":
Parameters EN ENO IN OUT Declaration Input Output Input Output Data type BOOL BOOL Floating-point numbers Floating-point numbers Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L Description Enable input Enable output Input value Natural logarithm of the floatingpoint number
You can select the data type of the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
Example
The following example shows how the instruction works:
If the operand "TagIn" has the signal state "1", the "Form natural logarithm" instruction is executed. The instruction forms the natural logarithm of the value at input "Tag_Value" and sends the result to output "Tag_Result". If no errors occur during the execution of the instruction, the output "TagOut" is set.
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753)
1381
Parameters
The following table shows the parameters of the instruction "Form exponential value":
Parameters EN ENO IN OUT Declaration Input Output Input Output Data type BOOL BOOL Floating-point numbers Floating-point numbers Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L Description Enable input Enable output Input value Exponential value of the input value IN
You can select the data type of the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
Example
The following example shows how the instruction works:
If the operand "TagIn" has the signal state "1", the "Form exponential value" instruction is executed. The instruction forms the exponent from base e and the value of the operand "Tag_Value" and sends the result to output "Tag_Result". If no errors occur during the execution of the instruction, the output "TagOut" is set.
1382
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753)
Parameters
The following table shows the parameters of the instruction "Form sine value":
Parameters EN ENO IN Declaration Input Output Input Data type BOOL BOOL Floating-point numbers Floating-point numbers Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L Description Enable input Enable output Size of angle in the radian measure Sine of the specified angle
OUT
Output
You can select the data type of the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
1383
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
Parameters IN OUT Operand Tag_Value Tag_Result Value +1.570796e+00 (/2) 1.0
If the operand "TagIn" has the signal state "1", the "Form sine value" instruction is executed. The instruction calculates the sine of the angle specified at input "Tag_Value" and sends the result to output "Tag_Result". If no errors occur during the execution of the instruction, the output "TagOut" is set.
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753)
1384
Parameters
The following table shows the parameters of the instruction "Form cosine value":
Parameters EN ENO IN Declaration Input Output Input Data type BOOL BOOL Floating-point numbers Floating-point numbers Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L Description Enable input Enable output Size of angle in the radian measure Cosine of the specified angle
OUT
Output
You can select the data type of the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
Parameters IN OUT Operand Tag_Value Tag_Result Value +1.570796e+00 (/2) 0
If the operand "TagIn" has the signal state "1", the "Form cosine value" instruction is executed. The instruction calculates the cosine of the angle specified at input "Tag_Value" and sends the result to output "Tag_Result". If no errors occur during the execution of the instruction, the output "TagOut" is set.
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753)
1385
Parameters
The following table shows the parameters of the instruction "Form tangent value":
Parameters EN ENO IN Declaration Input Output Input Data type BOOL BOOL Floating-point numbers Floating-point numbers Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L Description Enable input Enable output Size of angle in the radian measure Tangent of the specified angle
OUT
Output
You can select the data type of the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
1386
If the operand "TagIn" has the signal state "1", the "Form tangent value" instruction is executed. The instruction calculates the tangent of the angle specified at input "Tag_Value" and stores the result at output "Tag_Result". If no errors occur during the execution of the instruction, the output "TagOut" is set.
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753)
Parameters
The following table shows the parameters of the instruction "Form arcsine value":
Parameters EN ENO IN OUT Declaration Input Output Input Output Data type BOOL BOOL Floating-point numbers Floating-point numbers Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L Description Enable input Enable output Sine value Size of angle in the radian measure
1387
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
Parameters IN OUT Operand Tag_Value Tag_Result Value 1.0 +1.570796e+00 (/2)
If the operand "TagIn" has the signal state "1", the "Form arcsine value" instruction is executed. The instruction calculates the size of the angle corresponding to the sine value at input "Tag_Value". The result of the instruction is stored at output Tag_Result. If no errors occur during the execution of the instruction, the output "TagOut" is set.
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753)
1388
Parameters
The following table shows the parameters of the instruction "Form arccosine value":
Parameters EN ENO IN OUT Declaration Input Output Input Output Data type BOOL BOOL Floating-point numbers Floating-point numbers Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L Description Enable input Enable output Cosine value Size of angle in the radian measure
You can select the data type of the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
Parameters IN OUT Operand Tag_Value Tag_Result Value 0 +1.570796e+00 (/2)
If the operand "TagIn" has the signal state "1", the "Form arccosine value" instruction is executed. The instruction calculates the size of the angle corresponding to the cosine value at input "Tag_Value". The result of the instruction is stored at output Tag_Result. If no errors occur during the execution of the instruction, the output "TagOut" is set.
1389
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753)
Parameters
The following table shows the parameters of the instruction "Form arctangent value":
Parameters EN ENO IN OUT Declaration Input Output Input Output Data type BOOL BOOL Floating-point numbers Floating-point numbers Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L Description Enable input Enable output Tangent value Size of angle in the radian measure
You can select the data type of the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
1390
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
Parameters IN OUT Operand Tag_Value Tag_Result Value 1.0 +0.785398e+00 (/4)
If the operand "TagIn" has the signal state "1", the "Form arctangent value" instruction is executed. The instruction calculates the size of the angle corresponding to the tangent value at input "Tag_Value". The result of the instruction is stored at output Tag_Result. If no errors occur during the execution of the instruction, the output "TagOut" is set.
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753)
1391
Parameters
The following table shows the parameters of the "Return fraction" instruction:
Parameters EN ENO IN Declaration Input Output Input Data type BOOL BOOL Floating-point numbers Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant Description Enable input Enable output Input value, whose decimal places are to be determined. Decimal places of the input value at input IN
OUT
Output
Floating-point numbers
I, Q, M, D, L
You can select the data type of the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
Parameters IN OUT Operand Tag_Value Tag_Result Value 2.555 0.555
If the operands "TagIn_1" and "TagIn_2" have signal state "1", the "Return fraction" instruction is executed. The decimal places from the value at the operand "Tag_Value" are copied to the operand "Tag_Result". If no errors occur during the execution of the instruction, the output ENO has the signal state "1" and the output "TagOut" is set.
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753) Adding additional inputs and outputs to FBD elements (Page 897)
STEP 7 Basic V11.0 SP2 System Manual, 12/2011,
1392
Parameters
The following table shows the parameters of the instruction "Exponentiate":
Parameters EN ENO IN1 IN2 Declaration Input Output Input Input Data type BOOL BOOL Floating-point numbers Integers, floatingpoint numbers Floating-point numbers Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L or constant I, Q, M, D, L Description Enable input Enable output Base value Value with which the base value is exponentiated Result
OUT
Output
You can select the data type of the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
1393
Example
The following example shows how the instruction works:
If the operands "TagIn_1" and "TagIn_2" have signal state "1", the "Exponentiate" instruction is executed. The value of operand "Tag_Value1" is raised by the power of the value of the operand "Tag_Value2". The result is stored at output "Tag_Result". If no errors occur during the execution of the instruction, the output ENO has the signal state "1" and the output "TagOut" is set.
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753) Adding additional inputs and outputs to FBD elements (Page 897)
1394
1) You can also use the "Move value" instruction to transfer individual characters of a string (STRING) to operands of CHAR data type. The number of the character to be transferred is specified in square brackets beside the operand name. "MyString[2]", for example, transfers the second character of the "MyString" string. It is also possible to transfer from operands of the data type CHAR to the individual characters of a string. You can also replace a specific character of a string with a character of another string. 2)
Transferring entire arrays (ARRAY) is possible only when the array components of the operands at input IN and at output OUT1 are of the same data type. If the bit length of the data type at input IN exceeds the bit length of the data type at output OUT1, the higher-order bits of the source value are lost. If the bit length of the data type at input IN is less than the bit length of the data type at output OUT1, the higher-order bits of the destination value will be overwritten with zeros. In its initial state the instruction box contains 1 output (OUT1). The number of outputs can be extended. The added outputs are numbered in ascending order on the box. During the execution of the instruction the content of the operand at the input IN is transferred to all available outputs. The instruction box cannot be extended if structured data types (DTL, STRUCT, ARRAY) or characters of a string (STRING) are transferred.
1395
Parameters
The following table shows the parameters of the "Move value" instruction:
Parameters EN ENO IN Declaration Input Output Input Data type BOOL BOOL Bit strings, integers, floatingpoint numbers, timers, DATE, TIME, TOD, DTL, CHAR, STRUCT, ARRAY Bit strings, integers, floatingpoint numbers, timers, DATE, TIME, TOD, DTL, CHAR, STRUCT, ARRAY Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant Description Enable input Enable output Element used to overwrite the destination address.
OUT1
Output
I, Q, M, D, L
Destination address
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
Parameters IN OUT1 Operand TagIn_Value TagOut_Value Value 0011 1111 1010 1111 0011 1111 1010 1111
1396
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753) Removing instruction inputs and outputs (Page 898) MOVE_BLK: Move block (Page 1400) UMOVE_BLK: Move block uninterruptible (Page 1402) S_MOVE: Move character string (Page 1578) Adding additional inputs and outputs to FBD elements (Page 897)
Parameters
The following table shows the parameters of the instruction "Read field":
Parameters EN ENO INDEX Declaration Input Output Input Data type BOOL BOOL DINT Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant Description Enable input Enable output Index of field components whose content is read out
1397
VALUE
Output
I, Q, M, D, L
You can select the data type of the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
Parameters INDEX MEMBER Tag a_index "DB_1".Main_Field[-10] Value 4 First component of the field "Main_Field[-10..10] of REAL" in the data block "DB_1" Component with Index 4 of the field "Main_Field[-10..10] of REAL"
VALUE
a_real
The field component with index 4 is read out from the field "Main_Field[-10...10] of REAL" and written to the tag "a_real". The field component to be read is defined by the value at the parameter INDEX.
1398
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753)
Parameters
The following table shows the parameters of the instruction "Write field":
Parameters EN ENO INDEX Declaration Input Output Input Data type BOOL BOOL DINT Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant Description Enable input Enable output Index of field component that is written with the content of VALUE Operand whose contents are copied
VALUE
Input
BOOL, bit strings, integers, floatingpoint numbers, timers, DATE and CHAR BOOL, bit strings, integers, floatingpoint numbers, timers, DATE and CHAR as components of a ARRAY tag
I, Q, M, D, L or constant
MEMBER
Output
I, Q, M, D, L
First component of the field to which you write the content of VALUE
1399
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
Parameters INDEX VALUE MEMBER Operand a_index a_real "DB_1".Main_Field[-10] Value 4 10,54 First component of the field "Main_Field[-10..10] of REAL" in the data block "DB_1"
The value 10.54 of the tag "a_real" is written in the field component with index 4 of the field "Main_Field[-10 ... 10] of REAL". The index of the field component to which the content of the "a_real" tag is transferred" is specified by the value at the INDEX input.
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753)
1400
Parameters
The following table shows the parameters of the "Move block" instruction:
Parameters EN ENO IN Declaration Input Output Input Data type BOOL BOOL Binary numbers, integers, floatingpoint numbers, timers, DATE and CHAR as components of an ARRAY structure UINT Memory area I, Q, M, D, L I, Q, M, D, L D, L Description Enable input Enable output The first element of the source area to be copied.
COUNT
Input
I, Q, M, D, L or constant
Number of elements to be copied from the source area to the destination area. The first element of the destination area to which the content of the source area is copied.
OUT
Output
Binary numbers, integers, floatingpoint numbers, timers, DATE and CHAR as components of an ARRAY structure
D, L
1401
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
Parameters IN Operand a_array[2] Value The operand "a_array" is an ARRAY data type and consists of 5 elements of the INT data type. 3 The operand "b_array" is an ARRAY data type and consists of 6 elements of the INT data type.
COUNT OUT
Tag_Count b_array[1]
If the operands "TagIn_1" and "TagIn_2" have signal state "1", the "Move block" instruction is executed. The instruction selects three INT elements from the tag "a_array" (a_array[2..4]) and copies their content to the output tag "b_array" (b_array[1..3]). If no errors occur during the execution of the instruction, the output ENO has the signal state "1" and the output "TagOut" is set.
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753)
1402
Parameters
The following table shows the parameters of the "Move block uninterruptible" instruction:
Parameters EN ENO IN Declaration Input Output Input Data type BOOL BOOL Binary numbers, integers, floatingpoint numbers, timers, DATE and CHAR as components of an ARRAY structure UINT Memory area I, Q, M, D, L I, Q, M, D, L D, L Description Enable input Enable output The first element of the source area to be copied.
COUNT
Input
I, Q, M, D, L or constant
Number of elements to be copied from the source area to the destination area. The first element of the destination area to which the content of the source area is copied.
OUT
Output
Binary numbers, integers, floatingpoint numbers, timers, DATE and CHAR as components of an ARRAY structure
D, L
1403
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
Parameters IN Operand a_array[2] Value The operand "a_array" is an ARRAY data type and consists of 5 elements of the INT data type. 3 The tag "b_array" is an ARRAY data type and consists of 6 elements of the INT data type.
COUNT OUT
Tag_Count b_array[1]
If the operands "TagIn_1" and "TagIn_2" have signal state "1", the "Move block uninterruptible" instruction is executed. The instruction selects three INT elements from the tag "a_array" (a_array[2..4]) and copies their content to the output tag "b_array" (b_array[1..3]). The copy operation cannot be interrupted by other operating system activities. If no errors occur during the execution of the instruction, the output ENO has the signal state "1" and the output "TagOut" is set.
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753)
1404
Parameters
The following table shows the parameters of the "Fill block" instruction:
Parameters EN ENO IN Declaration Input Output Input Data type BOOL BOOL Binary numbers, integers, floatingpoint numbers, timers, DATE and CHAR as components of an ARRAY structure UINT Memory area I, Q, M, D, L I, Q, M, D, L D, L or constant Description Enable input Enable output Element used to fill the destination area.
COUNT
Input
I, Q, M, D, L or constant D, L
Number of repeated copy operations Address in destination area where filling begins.
OUT
Output
Binary numbers, integers, floatingpoint numbers, timers, DATE and CHAR as components of an ARRAY structure
1405
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
Parameters IN Operand A_array[2] Value The operand "a_array" is an ARRAY data type and consists of 4 elements of the WORD data type (ARRAY[1..4] of WORD). 3 The operand "b_array" is an ARRAY data type and consists of 5 elements of the WORD data type (ARRAY[1..5] of WORD).
COUNT OUT
Tag_Count b_array[1]
If the operands "TagIn_1" and "TagIn_2" have signal state "1", the "Fill block" instruction is executed. The instruction copies the second element (a_array[2]) of the tag "a_array" three times to the output tag "b_array" (b_array[1..3]). If no errors occur during the execution of the instruction, the outputs ENO and "TagOut" are set to signal state "1".
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753)
1406
Parameters
The following table shows the parameters of the "Fill block uninterruptible" instruction:
Parameters EN ENO IN Declaration Input Output Input Data type BOOL BOOL Binary numbers, integers, floatingpoint numbers, timers, DATE and CHAR as components of an ARRAY structure UINT Memory area I, Q, M, D, L I, Q, M, D, L D, L or constant Description Enable input Enable output Element used to fill the destination area.
COUNT
Input
I, Q, M, D, L or constant D, L
Number of repeated copy operations Address in destination area where filling begins.
OUT
Output
Binary numbers, integers, floatingpoint numbers, timers, DATE and CHAR as components of an ARRAY structure
1407
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
Parameters IN Operand a_array[2] Value The operand "a_array" is an ARRAY data type and consists of 4 elements of the WORD data type (ARRAY[1..4] of WORD). 3 The operand "b_array" is an ARRAY data type and consists of 5 elements of the WORD data type (ARRAY[1..5] of WORD).
COUNT OUT
Tag_Count b_array[1]
If the operands "TagIn_1" and "TagIn_2" have signal state "1", the "Fill block uninterruptible" instruction is executed. The instruction copies the second element (a_array[2]) of the tag "a_array" three times to the output tag "b_array" (b_array[1..3]). The copy operation cannot be interrupted by other operating system activities. If no errors occur during the execution of the instruction, the outputs ENO and "TagOut" are set to signal state "1".
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753)
1408
Execution of the "Swap" instruction requires a signal state of "1" at enable input EN. In this case, the enable output ENO has the signal state "1". The enable output ENO is reset when the enable input EN has the signal state "0" or errors occur during the execution of the instruction.
Parameters
The following table shows the parameters of the "Swap" instruction:
Parameters EN ENO IN Declaration Input Output Input Data type BOOL BOOL WORD, DWORD Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L Description Enable input Enable output Operand whose bytes are swapped. Result
OUT
Output
WORD, DWORD
You can select the data type of the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
1409
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
Parameters IN OUT Operand TagIn_Value TagOut_Value Value 0000 1111 0101 0101 0101 0101 1111 0000
If the operand "TagIn" has the signal state "1", the "Swap" instruction is executed. The arrangement of the bytes is changed and stored in the operand "TagOut_Value". If no errors occur during the execution of the instruction, the output ENO has the signal state "1" and the output "TagOut" is set.
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753)
1410
Parameters
The following table shows the parameters of the "Convert value" instruction:
Parameters EN ENO IN Declaration Input Output Input Data type BOOL BOOL Bit strings, integers, floatingpoint numbers, CHAR, BCD16, BCD32 Bit strings, integers, floatingpoint numbers, CHAR, BCD16, BCD32 Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant Description Enable input Enable output Value to be converted.
OUT
Output
I, Q, M, D, L
You can select the data type of the instruction from the "<???>" drop-down list of the instruction box. Bit strings (BYTE, WORD, DWORD) cannot be selected in the instruction box. If you have specified an operand of data type BYTE, WORD or DWORD at a parameter of the instruction, the value of the operand is interpreted as an unsigned integer with the same bit length. In this case the data type BYTE is interpreted as USINT, WORD as UINT and DWORD as UDINT. For additional information on valid data types, refer to "See also".
Example
The following example shows how the instruction works:
If the operand "TagIn" has the signal state "1", the content of the operand "TagIn_Value" is read and converted to an integer (16 bits). The result is stored in the operand "TagOut_Value". The output "TagOut" is set to "1" if the instruction was executed without errors.
1411
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753)
Parameters
The following table shows the parameters of the "Round numerical value" instruction:
Parameters EN ENO IN OUT Declaration Input Output Input Output Data type BOOL BOOL Floating-point numbers Integers, floatingpoint numbers Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L Description Enable input Enable output Input value to be rounded. Result of the rounding
You can select the data type of the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
1412
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
Parameters IN OUT Operand TagIn_Value TagOut_Value 0.50000000 0 Value -0.50000000 0
If the operand "TagIn" has the signal state "1", the "Round numerical value" instruction is executed. The floating-point number at input "TagIn_Value" is rounded to the nearest even integer and sent to output "TagOut_Value". If no errors occur during the execution of the instruction, the output "TagOut" is set.
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753)
1413
Parameters
The following table shows the parameters of the instruction "Generate next higher integer from floating-point number":
Parameters EN ENO IN Declaration Input Output Input Data type BOOL BOOL Floating-point numbers Integers, floatingpoint numbers Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L Description Enable input Enable output Input value as floating-point number Result with the next higher integer
OUT
Output
You can select the data type of the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
Parameters IN OUT Operand TagIn_Value TagOut_Value 0.50000000 1 Value -0.50000000 0
If the operand "TagIn" has the signal state "1", the instruction "Generate next higher integer from floating-point number" is executed. The floating-point number at input "TagIn_Value" is rounded to the next higher integer and displayed at the output "TagOut_Value". If no errors occur during the execution of the instruction, the output "TagOut" is set.
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753)
1414
Parameters
The following table shows the parameters of the instruction "Generate next lower integer from floating-point number":
Parameters EN ENO IN Declaration Input Output Input Data type BOOL BOOL Floating-point numbers Integers, floatingpoint numbers Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L Description Enable input Enable output Input value as floating-point number Result with the next lower integer
OUT
Output
You can select the data type of the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
1415
If the operand "TagIn" has the signal state "1", then the instruction "Generate next lower integer from floating-point number" will be executed. The floating-point number at input "TagIn_Value" is rounded to the next lower integer and displayed at output "TagOut_Value". If no errors occur during the execution of the instruction, the output "TagOut" is set.
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753)
Parameters
The following table shows the parameters of the instruction "Truncate numerical value":
Parameters EN ENO IN Declaration Input Output Input Data type BOOL BOOL Floating-point numbers Integers, floatingpoint numbers Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L Description Enable input Enable output Input value as floating-point number Result with integer part of the floatingpoint number
OUT
Output
You can select the data type of the instruction from the "<???>" drop-down list of the instruction box.
STEP 7 Basic V11.0 SP2 System Manual, 12/2011,
1416
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
Parameters IN OUT Operand TagIn_Value TagOut_Value 0.50000000 0 Value -0.50000000 0
If the operand "TagIn" has the signal state "1", the instruction "Truncate numerical value" is executed. The integer part of the floating-point number at input "TagIn_Value" is converted to an integer and sent to output "TagOut_Value". If no errors occur during the execution of the instruction, the output "TagOut" is set.
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753)
1417
Execution of the instruction "Scale" requires a signal state of "1" at enable input EN. In this case, the enable output ENO also has the signal state "1". Enable output ENO has the signal state "0" if one of the following conditions applies: Input EN has the signal state "0". The value at input MIN is greater than or equal to the value at input MAX. The value of a specified floating-point number is outside the range of the normalized numbers according to IEEE-754. An overflow occurs. The value at input VALUE is NaN (Not a number = result of an invalid arithmetic operation).
Parameters
The following table shows the parameters of the "Scale" instruction:
Parameters EN ENO MIN VALUE MAX OUT Declaration Input Output Input Input Input Output Data type BOOL BOOL Integers, floatingpoint numbers Floating-point numbers Integers, floatingpoint numbers Integers, floatingpoint numbers Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L or constant I, Q, M, D, L or constant I, Q, M, D, L Description Enable input Enable output Low limit of the value range Value to be scaled. High limit of the value range Result of scaling
1418
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
Parameters MIN VALUE MAX OUT Operand Tag_MIN Tag_Value Tag_MAX Tag_Result Value 10 0.5 30 20
If the operand "TagIn" has the signal state "1", the instruction "Scale" is executed. The value at input "Tag_Value" is scaled to the range of values defined by the values at inputs "Tag_MIN" and "Tag_MAX". The result is stored at output "Tag_Result". If no errors occur during the execution of the instruction, the output ENO has the signal state "1" and the output "TagOut" is set.
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753) NORM_X: Normalize (Page 1419)
1419
Execution of the instruction "Normalize" requires the signal state of "1" at enable input EN. In this case, the enable output ENO has the signal state "1". Enable output ENO has the signal state "0" if one of the following conditions applies: Input EN has the signal state "0". The value at input MIN is greater than or equal to the value at input MAX. The value of a specified floating-point number is outside the range of the normalized numbers according to IEEE-754. The value at input VALUE is NaN (result of an invalid arithmetic operation).
Parameters
The following table shows the parameters of the instruction "Normalize":
Parameters EN ENO MIN VALUE Declaration Input Output Input Input Data type BOOL BOOL Integers, floatingpoint numbers Integers, floatingpoint numbers Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L or constant Description Enable input Enable output Low limit of the value range Value to be normalized.
1420
You can select the data type of the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
Parameters MIN VALUE MAX OUT Operand Tag_MIN Tag_Value Tag_MAX Tag_Result Value 10 20 30 0.5
If the operand "TagIn" has the signal state "1", the instruction "Normalize" is executed. The value at input "Tag_Value" is assigned to the range of values defined by the values at inputs "Tag_MIN" and "Tag_MAX". The tag value at input "Tag_Value" is normalized corresponding to the defined value range. The result is stored as a floating-point number at output "Tag_Result". If no errors occur during the execution of the instruction, the output ENO has the signal state "1" and the output "TagOut" is set.
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753) SCALE_X: Scale (Page 1417)
1421
Example
The following example shows how the instruction works:
If the operand "TagIn_1" has the signal state "1", the instruction "Jump if RLO = 1" is executed. The linear execution of the program is interrupted and continues in Network 3, which is identified by the jump label CAS1. If input "TagIn_3" has the signal state "1", output "TagOut_3" is reset.
See also
Overview of the valid data types (Page 677)
1422
Example
The following example shows how the instruction works:
If the operand "TagIn_1" has the signal state "0", the instruction "Jump if RLO = 0" is executed. The linear execution of the program is interrupted and continues in Network 3, which is identified by the jump label CAS1. If input "TagIn_3" has the signal state "1", output "TagOut_3" is reset.
See also
Overview of the valid data types (Page 677)
1423
Example
The following example shows how the instruction works:
If the operand "TagIn_1" has the signal state "1", the instruction "Jump if RLO = 1" is executed. The linear execution of the program is interrupted and continues in Network 3, which is identified by the jump label CAS1. If input "TagIn_3" has the signal state "1", output "TagOut_3" is reset.
1424
Parameters
The following table shows the parameters of the instruction "Define jump list":
Parameters EN K Declaration Input Input Data type BOOL UINT Memory area I, Q, M, L, D I, Q, M, L, D or constant Description Enable input Specifies the number of the output and thus the jump that will be executed. (K=0 to 99) First jump label Second jump label Optional jump labels (n = 2 to 99)
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
1425
DEST1
LABEL1
DEST2
LABEL2
If the operand "Tag_Input" has the signal state "1", the instruction "Define jump list" is executed. The execution of the program is continued according to the value of the operand "Tag_Value" in the network that is identified with the jump label "LABEL1".
See also
Overview of the valid data types (Page 677) Adding additional inputs and outputs to FBD elements (Page 897) Removing instruction inputs and outputs (Page 898)
1426
Parameters
The following table shows the parameters of the instruction "Jump distributor":
Parameters EN K <Comparison values> Declarati on Input Input Input Data type BOOL UINT Bit strings, integers, floating-point numbers, TIME, DATE, TOD Memory area I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L or constant Description Enable input Specifies the value to be compared. Input values with which the value of the parameter K is compared.
First jump label Second jump label Optional jump labels (n = 2 to 99) Program jump which is executed if none of the comparison conditions are fulfilled.
1427
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
Parameters K == > < DEST0 Operand/Jump label Tag_Value Tag_ Value_1 Tag_ Value_2 Tag_ Value_3 LABEL0 Value 23 20 21 19 Jump to jump label "LABEL0", if the value of parameter K is equal to 20. Jump to jump label "LABEL1", if the value of parameter K is greater than 21. Jump to jump label "LABEL2", if the value of parameter K is less than 19. Jump to jump label "LABEL3", if none of the comparison conditions are fulfilled.
DEST1
LABEL1
DEST2
LABEL2
ELSE
LABEL 3
If the operand "Tag_Input" changes to signal state "1", the instruction "Jump distributor" is executed. The execution of the program is continued in the network that is identified with the jump label "LABEL1".
See also
Overview of the valid data types (Page 677) Adding additional inputs and outputs to FBD elements (Page 897) Removing instruction inputs and outputs (Page 898)
1428
If an OB is completed, another block will be selected by the priority class system and started or re-executed.
1429
Parameters
The following table shows the parameters of the instruction "Return":
Parameters RLO Declaration Data type Memory area Description The status of the call function is set to the signal state of the RLO. When RLO=1, the status of the call function is set to "1". When RLO=1, the status of the call function is set to "0". When RLO=1, the status of the call function is set to the signal state of the specified operand.
TRUE
FALSE
<Operand>
Input
BOOL
I, Q, M, D, L
Example
The following example shows how the instruction works:
If the operands "TagIn_1" and "TagIn_2" have signal state "1", the instruction "Return" is executed. Program execution in the called block is terminated and continues in the calling block. Output ENO of the call function is reset to signal state "0".
See also
Overview of the valid data types (Page 677)
1430
Parameters
The instruction "Restart cycle monitoring time" has no parameters.
Parameters
The instruction "Exit program" has no parameters.
1431
Parameters
The following table shows the parameters of the instruction "Get error locally":
Parameters ERROR Declaration Output Data type ErrorStruct Memory area D, L Description Error information
1432
Operand number of the machine command (A) Internal pointer (B) Storage area in internal memory Information about the address of an operand (C) Memory area: L: 16#40 4E, 86, 87, 8E, 8F, C0 CE I: 16#81 Q: 16#82 M: 16#83 DB: 16#84, 85, 8A, 8B
DB_NUMBER OFFSET
UINT UDINT
(D) Number of the data block (E) Relative address of the operand
1433
The enable output ENO of the instruction "Get error locally" instruction is set only if the enable input EN returns signal state "1" and error information is present. If one of these conditions does not apply, then the remaining program execution is not affected by the instruction "Get error locally". The instruction "Get error locally" can also be used to forward an alarm about the error status to the calling block. To do this, the instruction must be positioned in the last network of the called block. Note The instruction "Get error locally" enables local error handling within a block. When "Get error locally" is inserted in the program code of a block, any predefined system responses are ignored if an error occurs.
1434
Example
The following example shows how the instruction works:
If an error occurs, the instruction "Get error locally" returns the error information to the locally created structure "#error" at output ERROR. The error information is converted and evaluated with the comparison instruction "Equal to". Information about the type of error is the first comparison value assigned to the instruction. For the second comparison value, a value of "1" is specified in the operand "substitute". If the error is a read error, the condition of the comparison instruction is satisfied. In this case the outputs "#out" and "OK" are reset.
See also
Overview of the valid data types (Page 677) Basics of error handling (Page 942) Principles of local error handling (Page 943) Error output priorities (Page 944) Enabling local error handling for a block (Page 945)
1435
Parameters
The following table shows the parameters of the instruction "Get error ID locally":
Parameters ID Declaration Output Data type WORD Memory area I, Q, M, D, L Description Error ID
Parameter ID
The following table shows the values that can be output at the parameter ID:
ID (hexadecimal) 0 2503 2505 2520 2522 2523 2524 2525 2528 2529 252C 2530 2533 2534 2535 2538 2539 ID (decimal) 0 9475 9477 9504 9506 9507 9508 9509 9512 9513 9516 9520 9523 9524 9525 9528 9529 Description No error Invalid pointer Calling the instruction "Stop" (SFC46) in the user program Invalid STRING Read errors: Operand outside the valid range Write errors: Operand outside the valid range Read errors: Invalid operand Write errors: Invalid operand Read errors: Data alignment Write errors: Data alignment Invalid pointer Write errors: Data block Invalid pointer used Block number error FC Block number error FB Access error: DB does not exist Access error: Wrong DB used
1436
See also
Overview of the valid data types (Page 677) Basics of error handling (Page 942) Principles of local error handling (Page 943) Error output priorities (Page 944) Enabling local error handling for a block (Page 945)
1437
Parameters
The following table shows the parameters of the instruction "AND logic operation":
Parameters EN ENO IN1 IN2 INn OUT Declaration Input Output Input Input Input Output Data type BOOL BOOL Bit strings Bit strings Bit strings Bit strings Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L or constant I, Q, M, D, L or constant I, Q, M, D, L Description Enable input Enable output First value for logic operation Second value for logic operation Optional input values Result of the instruction
You can select the data type of the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
Parameters IN1 IN2 OUT Operand Tag_Value1 Tag_Value2 Tag_Result Value 01010101 01010101 00000000 00001111 00000000 00000101
1438
See also
Overview of the valid data types (Page 677) Adding additional inputs and outputs to FBD elements (Page 897) Removing instruction inputs and outputs (Page 898) Basics of the EN/ENO mechanism (Page 753)
Parameters
The following table shows the parameters of the instruction "OR logic operation":
Parameters EN ENO IN1 IN2 Declaration Input Output Input Input Data type BOOL BOOL Bit strings Bit strings Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L or constant Description Enable input Enable output First value for logic operation Second value for logic operation
1439
You can select the data type of the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
Parameters IN1 IN2 OUT Operand Tag_Value1 Tag_Value2 Tag_Result Value 01010101 01010101 00000000 00001111 01010101 01011111
If the operand "TagIn" has the signal state "1", the instruction "OR logic operation" is executed. The value of operand "Tag_Value1" is linked by OR to the value of the operand "Tag_Value2". The result is mapped bit-for-bit and sent to the operand "Tag_Result". Output ENO and the output "TagOut" are set to signal state "1".
See also
Overview of the valid data types (Page 677) Adding additional inputs and outputs to FBD elements (Page 897) Removing instruction inputs and outputs (Page 898) Basics of the EN/ENO mechanism (Page 753)
1440
Parameters
The following table shows the parameters of the instruction "EXCLUSIVE OR logic operation":
Parameters EN ENO IN1 IN2 INn OUT Declaration Input Output Input Input Input Output Data type BOOL BOOL Bit strings Bit strings Bit strings Bit strings Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L or constant I, Q, M, D, L or constant I, Q, M, D, L Description Enable input Enable output First value for logic operation Second value for logic operation Optional input values Result of the instruction
You can select the data type of the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
1441
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
Parameters IN1 IN2 OUT Operand Tag_Value1 Tag_Value2 Tag_Result Value 01010101 01010101 00000000 00001111 01010101 01011010
If the operand "TagIn" has the signal state "1", the instruction "EXCLUSIVE OR logic operation" is executed. The value of operand "Tag_Value1" is linked by EXCLUSIVE OR to the value of the operand "Tag_Value2". The result is mapped bit-for-bit and sent to the operand "Tag_Result". Output ENO and the output "TagOut" are set to signal state "1".
See also
Overview of the valid data types (Page 677) Adding additional inputs and outputs to FBD elements (Page 897) Removing instruction inputs and outputs (Page 898) Basics of the EN/ENO mechanism (Page 753)
1442
Parameters
The following table shows the parameters of the instruction "Create ones complement":
Parameters EN ENO IN OUT Declaration Input Output Input Output Data type BOOL BOOL Bit strings, integers Bit strings, integers Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L Description Enable input Enable output Input value Ones complement of the value at input IN
You can select the data type of the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
Parameters IN OUT Operand TagIn_Value TagOut_Value W#16#000F W#16#FFF0 Value W#16#7E W#16#81
If the operand "TagIn" has the signal state "1", then the instruction "Truncate numerical value" will be executed. The instruction inverts the signal state of the individual bits at input "TagIn_Value" and writes the result to output "TagOut_Value". Output ENO and the output "TagOut" are set to signal state "1".
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753)
1443
Parameters
The following table shows the parameters of the "Decode" instruction:
Parameters EN ENO IN OUT Declaration Input Output Input Output Data type BOOL BOOL UINT Bit strings Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L Description Enable input Enable output Input value Output value
You can select the data type of the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
Example
The following example shows how the instruction works:
The following figure shows how the instruction works using specific operand values:
1444
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753)
Parameters
The following table shows the parameters of the "Encode" instruction:
Parameters EN ENO IN OUT Declaration Input Output Input Output Data type BOOL BOOL Bit strings INT Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L Description Enable input Enable output Input value Output value
You can select the data type of the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
1445
Example
The following example shows how the instruction works:
The following figure shows how the instruction works using specific operand values:
If operand "TagIn" has the signal state "1", the "Encode" instruction is executed. The instruction selects bit position "3" as the least significant bit at input "TagIn_Value" and writes the value "3" to the tag at the output "TagOut_Value. If no errors occur during the execution of the instruction, the output ENO has the signal state "1" and the output "TagOut" is set.
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753)
1446
Parameters
The following table shows the parameters of the "Select" instruction:
Parameters EN ENO G IN0 Declaration Input Output Input Input Data type BOOL BOOL BOOL Bit strings, integers, floatingpoint numbers, TIME, TOD, DATE, character Bit strings, integers, floatingpoint numbers, TIME, TOD, DATE, character Bit strings, integers, floatingpoint numbers, TIME, TOD, DATE, character Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant Description Enable input Enable output Switch First input value
IN1
Input
I, Q, M, D, L or constant
OUT
Output
I, Q, M, D, L
Result
You can select the data type of the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
Parameters G IN0 Operand TagIn_G TagIn_Value0 0 W#16#0000 Value 1 W#16#4C
1447
If the operand "TagIn" has the signal state "1", the instruction "Select" is executed. Depending on the signal state at input "TagIn_G", the value at input "TagIn_Value0" or "TagIn_Value1" is selected and copied to output "TagOut_Value". If no errors occur during the execution of the instruction, the enable output ENO has the signal state "1" and the output "TagOut" is set.
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753)
Parameters
The following table shows the parameters of the instruction "Multiplex":
Parameters EN ENO Declaring Input Output Data type BOOL BOOL Memory area I, Q, M, D, L I, Q, M, D, L Description Enable input Enable output
1448
IN0
Input
Bit strings, integers, floatingpoint numbers, TIME, TOD, DATE, CHAR Bit strings, integers, floatingpoint numbers, TIME, TOD, DATE, CHAR Bit strings, integers, floatingpoint numbers, TIME, TOD, DATE, CHAR Bit strings, integers, floatingpoint numbers, TIME, TOD, DATE, CHAR Bit strings, integers, floatingpoint numbers, TIME, TOD, DATE, CHAR
IN1
Input
I, Q, M, D, L or constant
INn
Input
I, Q, M, D, L or constant
ELSE
Input
I, Q, M, D, L or constant
OUT
Output
I, Q, M, D, L
You can select the data type of the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
1449
If the operand "Tag_Input" has the signal state "1", the instruction "Multiplex" is executed. Depending on the value of the operand "Tag_Number", the value at input "Tag_Value_1" is copied and assigned to the operand at output "Tag_Result". If no errors occur during the execution of the instruction, the outputs ENO and "Tag_Output" are set.
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753)
1450
Parameters
The following table shows the parameters of the instruction "Demultiplex":
Parameters EN ENO K Declaration Input Output Input Data type BOOL BOOL UINT Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant Description Enable input Enable output Specifies the output to which the input value (IN) will be copied. Input value
IN
Input
Bit strings, integers, floatingpoint numbers, CHAR, TIME Bit strings, integers, floatingpoint numbers, CHAR, TIME Bit strings, integers, floatingpoint numbers, CHAR, TIME Bit strings, integers, floatingpoint numbers, CHAR, TIME Bit strings, integers, floatingpoint numbers, CHAR, TIME
I, Q, M, D, L or constant
OUT0
Output
I, Q, M, D, L
First output
OUT1
Output
I, Q, M, D, L
Second output
OUTn
Output
I, Q, M, D, L
Optional outputs
ELSE
Output
I, Q, M, D, L
You can select the data type of the instruction from the "<???>" drop-down list of the instruction box. For additional information on available data types, refer to "See also".
Example
The following example shows how the instruction works:
1451
Output values of the "Demultiplex" instruction after network execution Operand Tag_Output_0 Tag_Output_1 Tag_Output_2 Unchanged DW#16#FFFFFFFF Unchanged Values Unchanged Unchanged DW#16#3E4A7D
If input "Tag_Input" has the signal state "1", the instruction "Demultiplex" is executed. Depending on the value of the operand "Tag_Number", the value at input "IN" is copied to the corresponding output.
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753)
1452
The instruction "Shift right" is only executed if the signal state at the enable input EN is "1". In this case, the enable output ENO also has the signal state "1". If the signal state at the enable input EN is "0", the signal state at the enable output ENO is also "0".
Parameters
The following table shows the parameters of the instruction "Shift right":
Parameters EN ENO IN N Declaration Input Output Input Input Data type BOOL BOOL Bit strings, integers UINT Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L or constant I, Q, M, D, L Description Enable input Enable output Value to be shifted. Number of bit positions by which the value is shifted. Result of the instruction
OUT
Output
You can select the data type of the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
1453
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
Parameters IN N OUT Operand TagIn_Value Tag_Number TagOut_Value Value 0011 1111 1010 1111 3 0000 0111 1111 0101
If the operand "TagIn" has the signal state "1", the instruction "Shift right" is executed. The content of the operand "TagIn_Value" is shifted three bit positions to the right. The result is sent at output "TagOut_Value". If no errors occur during the execution of the instruction, the output ENO has the signal state "1" and the output "TagOut" is set.
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753)
1454
The instruction "Shift left" is only executed if the signal state at the enable input EN is "1". In this case, the enable output ENO also has the signal state "1". If the signal state at the enable input EN is "0", the signal state at the enable output ENO is also "0".
Parameters
The following table shows the parameters of the instruction "Shift left":
Parameters EN ENO IN N Declaration Input Output Input Input Data type BOOL BOOL Bit strings, integers UINT Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L or constant I, Q, M, D, L Description Enable input Enable output Value to be shifted. Number of bit positions by which the value is shifted. Result of the instruction
OUT
Output
You can select the data type of the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
1455
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
Parameters IN N OUT Operand TagIn_Value Tag_Number TagOut_Value Value 0011 1111 1010 1111 4 1111 1010 1111 0000
If the operand "TagIn" has the signal state "1", the instruction "Shift left" is executed. The content of the operand "TagIn_Value" is shifted four bit positions to the left. The result is sent at output "TagOut_Value". If no errors occur during the execution of the instruction, the output ENO has the signal state "1" and the output "TagOut" is set.
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753)
1456
The instruction "Rotate right" is only executed if the signal state at the enable input EN is "1". In this case, the enable output ENO also has the signal state "1". If the signal state at the enable input EN is "0", the signal state at the enable output ENO is also "0".
Parameters
The following table shows the parameters of the instruction "Rotate right":
Parameters EN ENO IN N Declaration Input Output Input Input Data type BOOL BOOL Bit strings UINT Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L or constant Description Enable input Enable output Value to be rotated. Number of bit positions by which the value is rotated. Result of the instruction
OUT
Output
Bit strings
I, Q, M, D, L
You can select the data type of the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
1457
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
Parameters IN N OUT Operand TagIn_Value Tag_Number TagOut_Value Value 0000 1111 1001 0101 5 1010 1000 0111 1100
If the operand "TagIn" has the signal state "1", the instruction "Rotate right" is executed. The content of the operand "TagIn_Value" is rotated five bit positions to the right. The result is sent at output "TagOut_Value". If no errors occur during the execution of the instruction, the output ENO has the signal state "1" and the output "TagOut" is set.
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753)
1458
The instruction "Rotate left" is only executed if the signal state at the enable input EN is "1". In this case, the enable output ENO also has the signal state "1". If the signal state at the enable input EN is "0", the signal state at the enable output ENO is also "0".
Parameters
The following table shows the parameters of the instruction "Rotate left":
Parameters EN ENO IN N Declaration Input Output Input Input Data type BOOL BOOL Bit strings UINT Memory area I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L or constant Description Enable input Enable output Value to be rotated. Number of bit positions by which the value is rotated. Result of the instruction
OUT
Output
Bit strings
I, Q, M, D, L
You can select the data type of the instruction from the "<???>" drop-down list of the instruction box. For additional information on valid data types, refer to "See also".
1459
Example
The following example shows how the instruction works:
The following table shows how the instruction works using specific operand values:
Parameters IN N OUT Operand TagIn_Value Tag_Number TagOut_Value Value 1010 1000 1111 0110 5 0001 1110 1101 0101
If input "TagIn" has the signal state "1", the instruction "Rotate left" is executed. The content of the operand "TagIn_Value" is rotated five bit positions to the left. The result is sent at output "TagOut_Value". If no errors occur during the execution of the instruction, the output ENO has the signal state "1" and the output "TagOut" is set.
See also
Overview of the valid data types (Page 677) Basics of the EN/ENO mechanism (Page 753)
9.8.2.3
SCL
1460
Syntax
Use the following syntax for the "Generate pulse" instruction: Data block of system data type IEC_Timer (global DB):
SCL <IEC_Timer_DB>.TP(IN := <Operand>, PT := <Operand>, Q => <Operand>, ET => <Operand>)
Local tag:
SCL #myLocal_timer(IN := <Operand>, PT := <Operand>, Q => <Operand>, ET => <Operand>)
1461
Pulse diagram
The following figure shows the pulse diagram of the "Generate pulse" instruction:
Example
The following example shows how the instruction works:
SCL "TP_DB".TP(IN := "Tag_Start", PT := "Tag_PresetTime", Q => "Tag_Status", ET => "Tag_ElapsedTime");
1462
See also
Overview of the valid data types (Page 677) Entering SCL instructions (Page 923) Editing SCL instructions (Page 938)
1463
Syntax
Use the following syntax for the "Generate on-delay" instruction: Data block of system data type IEC_Timer (global DB):
SCL <IEC_Timer_DB>.TON(IN := <Operand>, PT := <Operand>, Q => <Operand>, ET => <Operand>)
Local tag:
SCL #myLocal_timer(IN := <Operand>, PT := <Operand>, Q => <Operand>, ET => <Operand>)
ET
Output
TIME
1464
Pulse diagram
The following figure shows the pulse diagram of the "Generate on-delay" instruction:
Example
The following example shows how the instruction works:
SCL "TON_DB".TON(IN := "Tag_Start", PT := "Tag_PresetTime", Q => "Tag_Status", ET => "Tag_ElapsedTime");
When the signal state of the "Tag_Start" operand changes from "0" to "1", the time programmed for the PT parameter is started. At the end of the time, the "Tag_Start" operand is set to signal state "1" if the "Tag_Status" operand has signal state "1". At the end of the time, the "Tag_Status" operand is set to signal state "1" if the "Tag_Start" operand has signal state "1". The current count value is stored in the "Tag_ElapsedTime" operand.
1465
See also
Overview of the valid data types (Page 677) Entering SCL instructions (Page 923) Editing SCL instructions (Page 938)
Syntax
The following syntax is used for the "Generate off-delay" instruction: Data block of system data type IEC_Timer (global DB):
SCL <IEC_Timer_DB>.TOF(IN := <Operand>, PT := <Operand>,
1466
Local tag:
SCL #myLocal_timer(IN := <Operand>, PT := <Operand>, Q => <Operand>, ET => <Operand>)
ET
Output
TIME
1467
Pulse diagram
The following figure shows the pulse diagram of the "Generate off-delay" instruction:
Example
The following example shows how the instruction works:
SCL "TOF_DB".TOF(IN := "Tag_Start", PT := "Tag_PresetTime", Q => "Tag_Status", ET => "Tag_ElapsedTime");
With a change in the signal state of the "Tag_Start" operand from "0" to "1", the "Tag_Status" operand is set. When the signal state of the "Tag_Start" operand changes from "1" to "0", the time programmed for the PT parameter is started. As long as the time is running, the "Tag_Status" operand remains set. When the time has expired, the "Tag_Status" operand is reset. The current count value is stored in the "Tag_ElapsedTime" operand.
See also
Overview of the valid data types (Page 677) Entering SCL instructions (Page 923) Editing SCL instructions (Page 938)
1468
Syntax
Use the following syntax for the "Time accumulator" instruction: Data block of system data type IEC_Timer (global DB):
SCL <IEC_Timer_DB>.TONR(IN := <Operand>, R := <Operand>, PT := <Operand>, Q => <Operand>, ET => <Operand>)
Local tag:
SCL #myLocal_timer(IN := <Operand>,
1469
ET
Output
TIME
1470
Pulse diagram
The following figure shows the pulse diagram of the "Time accumulator" instruction:
Example
The following example shows how the instruction works:
SCL "TONR_DB".TONR(IN := "Tag_Start", R := "Tag_Reset", PT := "Tag_PresetTime", Q => "Tag_Status", ET => "Tag_Time");
When the signal state of the "Tag_Start" operand changes from "0" to "1", the time programmed for the PT parameter is started. While the timer is running, the timer values that are recorded at signal state "1" of the operand "Tag_Start" is accumulated. The accumulated times is stored in the "Tag_Time" operand. When the timer value displayed at the PT parameter is reached, the "Tag_Status" operand is set to the signal state "1". The current count value is stored in the "Tag_Time" operand.
1471
See also
Overview of the valid data types (Page 677) Entering SCL instructions (Page 923) Editing SCL instructions (Page 938)
1472
Syntax
The following syntax is used for the "Count up" instruction: Data block of system data type IEC_counter (global DB):
SCL <IEC_Counter_DB>.CTU(CU := <Operand>, R := <Operand>, PV := <Operand>, Q => <Operand>, CV => <Operand>)
Local tag:
SCL #myLocal_counter(CU := <Operand>, R := <Operand>, PV := <Operand>, Q => <Operand>, CV => <Operand>)
The following table shows the permitted data types for local counters:
Data type SINT USINT INT UINT DINT UDINT Syntax CTU_SINT CTU_USINT CTU_INT CTU_UINT CTU_DINT CTU_UDINT IEC counters IEC_SCOUNTER / CTU_SINT IEC_USCOUNTER / CTU_USINT IEC_COUNTER / CTU_INT IEC_UCOUNTER / CTU_UINT IEC_DCOUNTER / CTU_DINT IEC_UDCOUNTER / CTU_UDINT
1473
Example
The following example shows how the instruction works:
SCL "IEC_COUNTER_DB".CTU(CU := "Tag_Start", R := "Tag_Reset", PV := "Tag_PresetValue", Q => "Tag_Status", CV => "Tag_CounterValue");
When the signal state of the "Tag_Start" operand changes from "0" to "1", the "Count up" instruction is executed and the current count value of the "Tag_CounterValue" operand is incremented by one. With each additional positive signal edge, the counter is incremented until the high limit value of the specified data type (32 767) is reached. Output "Tag_Status" has the signal state "1" as long as the current counter is greater than or equal to the value of the operand "Tag_PresetValue". In all other cases, the "Tag_Status" output has signal state "0". The current count value is stored in the "Tag_CounterValue" operand.
See also
Overview of the valid data types (Page 677) Entering SCL instructions (Page 923) Editing SCL instructions (Page 938)
1474
Syntax
The following syntax is used for the "Count down" instruction: Data block of system data type IEC_counter (global DB):
SCL <IEC_Counter_DB> CTD(CD := <Operand>, LD := <Operand>, PV := <Operand>, Q => <Operand>, CV => <Operand>)
1475
The following table shows the permitted data types for local counters:
Data type SINT USINT INT UINT DINT UDINT Syntax CTD_SINT CTD_USINT CTD_INT CTD_UINT CTD_DINT CTD_UDINT IEC counters IEC_SCOUNTER / CTU_SINT IEC_USCOUNTER / CTU_USINT IEC_COUNTER / CTU_INT IEC_UCOUNTER / CTU_UINT IEC_DCOUNTER / CTU_DINT IEC_UDCOUNTER / CTU_UDINT
Example
The following example shows how the instruction works:
SCL "IEC_SCOUNTER_DB".CTD(CD := "Tag_Start", LD := "Tag_Load", PV := "Tag_PresetValue", Q => "Tag_Status", CV => "Tag_CounterValue");
1476
See also
Overview of the valid data types (Page 677) Entering SCL instructions (Page 923) Editing SCL instructions (Page 938)
1477
Syntax
The following syntax is used for the "Count up and down" instruction: Data block of system data type IEC_counter (global DB):
SCL <IEC_Counter_DB>.CTUD(CU:= <Operand>, CD:= <Operand>, R:= <Operand>, LD:= <Operand>, PV:= <Operand>, QU=> <Operand>, QD:= <Operand>, CV=> <Operand>)
Local tag
SCL myLocal_counter(CU:= <Operand>, CD:= <Operand>, R:= <Operand>, LD:= <Operand>, PV:= <Operand>, QU=> <Operand>, QD:= <Operand>, CV=> <Operand>)
1478
Example
The following example shows how the instruction works:
SCL "IEC_COUNTER_DB".CTUD(CU := "Tag_Start1", CD := "Tag_Start2", LD := "Tag_Load", R := "Tag_Reset", PV := "Tag_PresetValue", QU => "Tag_CU_Status", QD => "Tag_CD_Status", CV => "Tag_CounterValue");
If the "Tag_Start1" operand has a positive signal edge in the signal state, the current counter value is incremented by one and stored in the "Tag_CounterValue" operand. If the "Tag_Start2" operand has a positive signal edge in the signal state, the counter value is decremented by
1479
See also
Overview of the valid data types (Page 677) Entering SCL instructions (Page 923) Editing SCL instructions (Page 938)
Syntax
Use the following syntax for the instruction "Form absolute value":
SCL ABS(<Expression>)
1480
Example
The following example shows how the instruction works:
SCL "Tag_Result1" := ABS("Tag_Value"); "Tag_Result2" := ABS("Tag_Value1"*"Tag_Value2");
The absolute value of the input value is returned in the format of the input value as a function value. The following table shows how the instruction works using specific operand values:
Operand Tag_Value Tag_Result1 Tag_Value1 Tag_Value2 Tag_Result2 Value -2 2 4 -1 4
See also
Overview of the valid data types (Page 677) Expressions (Page 908) Operators and operator precedence (Page 913) Entering SCL instructions (Page 923) Editing SCL instructions (Page 938)
1481
Syntax
The following syntax is used for the instruction "Get minimum ":
SCL MIN(IN1:= <Operand>, IN2:= <Operand>, INn := <Operand>)
IN2
Input
INn
Input
Function value
Example
The following example shows how the instruction works:
SCL "Tag_Result" := MIN(IN1 := "Tag_Value1", IN2 := "Tag_Value2", IN3 := "Tag_Value3");
The following table shows how the instruction works using specific operand values:
Parameters IN1 IN2 IN3 Function value Operand Tag_Value1 Tag_Value2 Tag_Value3 Tag_Result Value 12 222 14 444 13 333 12 222
The instruction compares the values of the available inputs and copies the lowest value ("Tag_Value1") to operand "Tag_Result".
1482
See also
Overview of the valid data types (Page 677) Expressions (Page 908) Operators and operator precedence (Page 913) Entering SCL instructions (Page 923) Editing SCL instructions (Page 938)
Syntax
The following syntax is used for the instruction "Get maximum ":
SCL MAX(IN1:= <Operand>, IN2:= <Operand>, INn := <Operand>)
IN2
Input
INn
Input
Function value
1483
Example
The following example shows how the instruction works:
SCL "Tag_Result" := MAX(IN1 := "Tag_Value1", IN2 := "Tag_Value2", IN3 := "Tag_Value3");
The following table shows how the instruction works using specific operand values:
Parameters IN1 IN2 IN3 Function value Operand Tag_Value1 Tag_Value2 Tag_Value3 Tag_Result Value 12 222 14 444 13 333 14 444
The instruction compares the values of the specified operands and copies the greatest value ("Tag_Value2") to the operand "Tag_Result".
See also
Overview of the valid data types (Page 677) Expressions (Page 908) Operators and operator precedence (Page 913) Entering SCL instructions (Page 923) Editing SCL instructions (Page 938)
1484
Syntax
The following syntax is used for the instruction "Set limit value":
SCL LIMIT(MN:= <Operand>, IN := <Operand>, MX := <Operand>)
IN
Input
Input value
MX
Input
High limit
Function value
Example
The following example shows how the instruction works:
SCL "Tag_Result" := LIMIT(MN := "Tag_Minimum", IN := "Tag_Value", MX := "Tag_Maximum");
The following table shows how the instruction works using specific operand values:
Parameters MN IN MX Function value Operand Tag_Minimum Tag_Value Tag_Maximum Tag_Result Value 12 000 8 000 16 000 12 000
The value of the operand "Tag_Value" is compared with the values of operands "Tag_Minimum" and "Tag_Maximum". Because the value of the operand "Tag_Value" is less than the lower limit value, the value of operand "Tag_Minimum" will be copied to operand "Tag_Result".
1485
See also
Overview of the valid data types (Page 677) Expressions (Page 908) Operators and operator precedence (Page 913) Entering SCL instructions (Page 923) Editing SCL instructions (Page 938)
Syntax
Use the following syntax for the instruction "Form square":
SCL SQR(<Expression>)
Example
The following example shows how the instruction works:
SCL "Tag_Result1" := SQR("Tag_Value"); "Tag_Result2" := SQR((SQR("Tag_Value1"))*"Tag_Value2);
The square of the input value is returned in the "Tag_Result" operand as a function value. The following table shows how the instruction works using specific operand values:
1486
See also
Overview of the valid data types (Page 677) Expressions (Page 908) Operators and operator precedence (Page 913) Entering SCL instructions (Page 923) Editing SCL instructions (Page 938)
Syntax
Use the following syntax for the instruction "Form square root":
SCL SQRT(<Expression>)
1487
Example
The following example shows how the instruction works:
SCL "Tag_Result1" := SQRT("Tag_Value"); "Tag_Result2" := SQRT((SQR("Tag_Value1"))+"Tag_Value2");
The square root of the input value is returned in the "Tag_Result" operand as a function value. The following table shows how the instruction works using specific operand values:
Operand Tag_Value Tag_Result1 Tag_Value1 Tag_Value2 Tag_Result2 Value 4.0 2.0 3.0 16.0 5.0
See also
Overview of the valid data types (Page 677) Expressions (Page 908) Operators and operator precedence (Page 913) Entering SCL instructions (Page 923) Editing SCL instructions (Page 938)
1488
Syntax
Use the following syntax for the instruction "Form natural logarithm":
SCL LN(<Expression>)
Example
The following example shows how the instruction works:
SCL "Tag_Result1" := LN("Tag_Value"); "Tag_Result2" := LN("Tag_Value1"+"Tag_Value2");
The result of the instruction is returned in the "Tag_Result" operand as a function value. The following table shows how the instruction works using specific operand values:
Operand Tag_Value Tag_Result1 Tag_Value1 Tag_Value2 Tag_Result2 Value 2.5 0.916 1.5 3.2 1.548
1489
See also
Overview of the valid data types (Page 677) Expressions (Page 908) Operators and operator precedence (Page 913) Entering SCL instructions (Page 923) Editing SCL instructions (Page 938)
Syntax
The following syntax is used for the instruction "Form exponential value":
SCL EXP(<Expression>)
Example
The following example shows how the instruction works:
SCL "Tag_Result1" := EXP("Tag_Value"); "Tag_Result2" := EXP("Tag_Value1"/"Tag_Value2");
The following table shows how the instruction works using specific operand values:
Operand Tag_Value Tag_Result1 Tag_Value1 Value 20.5 799902200 15.5
1490
The result of the instruction is returned in the operand "Tag_Result" as a function value.
See also
Overview of the valid data types (Page 677) Expressions (Page 908) Operators and operator precedence (Page 913) Entering SCL instructions (Page 923) Editing SCL instructions (Page 938)
Syntax
Use the following syntax for the instruction "Form sine value":
SCL SIN(<Expression>)
Function value
1491
Example
The following example shows how the instruction works:
SCL "Tag_Result" := SIN("Tag_Value");
The result of the instruction is returned in the "Tag_Result" operand as a function value. The following table shows how the instruction works using specific operand values:
Operand Tag_Value Tag_Result Value +1.570796e+00 (/2) 1.0
See also
Overview of the valid data types (Page 677) Expressions (Page 908) Operators and operator precedence (Page 913) Entering SCL instructions (Page 923) Editing SCL instructions (Page 938)
Syntax
Use the following syntax for the "Form cosine value" instruction:
SCL COS(<Expression>)
1492
Function value
Example
The following example shows how the instruction works:
SCL "Tag_Result" := COS("Tag_Value");
The result of the instruction is returned in the "Tag_Result" operand as a function value. The following table shows how the instruction works using specific operand values:
Operand Tag_Value Tag_Result Value +1.570796e+00 (/2) 0
See also
Overview of the valid data types (Page 677) Expressions (Page 908) Operators and operator precedence (Page 913) Entering SCL instructions (Page 923) Editing SCL instructions (Page 938)
1493
Syntax
Use the following syntax for the instruction "Form tangent value":
SCL TAN(<Expression>)
Function value
Example
The following example shows how the instruction works:
SCL "Tag_Result" := TAN("Tag_Value");
The result of the instruction is returned in the "Tag_Result" operand as a function value. The following table shows how the instruction works using specific operand values:
Operand Tag_Value Tag_Result Value +3.141593e+00 () 0
See also
Overview of the valid data types (Page 677) Expressions (Page 908) Operators and operator precedence (Page 913) Entering SCL instructions (Page 923) Editing SCL instructions (Page 938)
1494
Syntax
Use the following syntax for the instruction "Form arcsine value":
SCL ASIN(<Expression>)
Example
The following example shows how the instruction works:
SCL "Tag_Result" := ASIN("Tag_Value");
The result of the instruction is returned in the "Tag_Result" operand as a function value. The following table shows how the instruction works using specific operand values:
Operand Tag_Value Tag_Result Value 1.0 +1.570796e+00 (/2)
1495
See also
Overview of the valid data types (Page 677) Expressions (Page 908) Operators and operator precedence (Page 913) Entering SCL instructions (Page 923) Editing SCL instructions (Page 938)
Syntax
Use the following syntax for the instruction "Form arccosine value":
SCL ACOS(<Expression>)
Example
The following example shows how the instruction works:
SCL "Tag_Result" := ACOS("Tag_Value");
The result of the instruction is returned in the "Tag_Result" operand as a function value.
1496
See also
Overview of the valid data types (Page 677) Expressions (Page 908) Operators and operator precedence (Page 913) Entering SCL instructions (Page 923) Editing SCL instructions (Page 938)
Syntax
Use the following syntax for the instruction "Form arctangent value":
SCL ATAN(<Expression>)
1497
Example
The following example shows how the instruction works:
SCL "Tag_Result" := ATAN("Tag_Value");
The result of the instruction is returned in the "Tag_Result" operand as a function value. The following table shows how the instruction works using specific operand values:
Operand Tag_Value Tag_Result Value 1.0 +0.785398e+00 (/4)
See also
Overview of the valid data types (Page 677) Expressions (Page 908) Operators and operator precedence (Page 913) Entering SCL instructions (Page 923) Editing SCL instructions (Page 938)
Syntax
The following syntax is used for the instruction "Return fraction":
SCL FRAC(<Expression>)
1498
Example
The following example shows how the instruction works:
SCL "Tag_Result" := FRAC("Tag_Value");
The following table shows how the instruction works using specific operand values:
Operand Tag_Value Tag_Result Value 2.555 0.555 -1.4421 -0.4421
See also
Overview of the valid data types (Page 677) Expressions (Page 908) Operators and operator precedence (Page 913) Entering SCL instructions (Page 923) Editing SCL instructions (Page 938)
1499
Syntax
The following syntax is used for the instruction "Move block":
SCL MOVE_BLK(IN := <Operand>, COUNT := <Operand>, OUT=> <Operand>)
COUNT
Input
Number of elements to be copied from the source area to the destination area. The first element of the destination area to which the content of the source area is copied.
OUT
Output
BOOL, bit strings, integers, floating-point numbers, timers, DATE and CHAR as components of an ARRAY structure BOOL, bit strings, integers, floating-point numbers, timers, DATE and CHAR as components of an ARRAY structure
Function value
Example
The following example shows how the instruction works:
SCL "Tag_Result" := MOVE_BLK(IN := #a_array[2], COUNT := "Tag_Count", OUT => #b_array[1]);
The following table shows how the instruction works using specific operand values:
1500
COUNT OUT
Tag_Count b_array[1]
The instruction selects three INT elements from the tag "a_array" (a_array[2..4]) and copies their contents into the tag "b_array" (b_array[1..3]). The result of the instruction is returned in the operand "Tag_Result" as a function value.
See also
Overview of the valid data types (Page 677) Entering SCL instructions (Page 923) Editing SCL instructions (Page 938)
Syntax
The following syntax is used for the instruction "Move block uninterruptible":
SCL UMOVE_BLK(IN := <Operand>, COUNT := <Operand>, OUT=> <Operand>)
1501
COUNT
Input
Number of elements to be copied from the source area to the destination area. The first element of the destination area to which the content of the source area is copied.
OUT
Output
BOOL, bit strings, integers, floating-point numbers, timers, DATE and CHAR as components of an ARRAY structure BOOL, bit strings, integers, floating-point numbers, timers, DATE and CHAR as components of an ARRAY structure
Function value
Example
The following example shows how the instruction works:
SCL "Tag_Result" := UMOVE_BLK(IN := #a_array[2], COUNT := "Tag_Count", OUT => #b_array[1]);
The following table shows how the instruction works using specific operand values:
Parameters IN Operand a_array[2] Value The operand "a_array" is an ARRAY data type and consists of five elements of the INT data type. 3 The operand "b_array" is an ARRAY data type and consists of six elements of the INT data type.
COUNT OUT
Tag_Count b_array[1]
The instruction selects three INT elements from the tag "a_array" (a_array[2...4]) and moves the content to the output tag "b_array" (b_array[1...3]). The copy operation cannot be interrupted by other operating system activities. The result of the instruction is returned in the operand "Tag_Result" as a function value.
1502
See also
Overview of the valid data types (Page 677) Entering SCL instructions (Page 923) Editing SCL instructions (Page 938)
Syntax
The following syntax is used for the "Fill block" instruction:
SCL FILL_BLK(IN := <operand>, COUNT := <operand>, OUT => <operand>))
COUNT OUT
Input Output
Number of repeated copy operations Address in destination area where filling begins.
Function value
1503
Example
The following example shows how the instruction works:
SCL "Tag_Result" := FILL_BLK(IN := #a_array[2], COUNT := "Tag_Count", OUT => #b_array[1]);
The following table shows how the instruction works using specific operand values:
Parameters IN Operand a_array[2] Value The operand "a_array" is an ARRAY data type and consists of four elements of the WORD data type (ARRAY[1 to 4] of WORD). 3 The operand "b_array" is an ARRAY data type and consists of five elements of the WORD data type (ARRAY[1 to 5] of WORD).
COUNT OUT
Tag_Count b_array[1]
The instruction copies the second element (a_array[2]) of the tag "a_array" three times to the output tag "b_array" (b_array[1..3]). The result of the instruction is returned in the "Tag_Result" operand as a function value.
See also
Overview of the valid data types (Page 677) Entering SCL instructions (Page 923) Editing SCL instructions (Page 938)
1504
Syntax
The following syntax is used for the "Fill block uninterruptible" instruction:
SCL UFILL_BLK(IN := <operand>, COUNT := <operand>, OUT => <Operand>)
COUNT OUT
Input Output
Number of repeated copy operations Address in destination area where filling begins.
Function value
Example
The following example shows how the instruction works:
SCL "Tag_Result" := UFILL_BLK(IN := #a_array[2], COUNT := "Tag_Count", OUT => #b_array[1]);
The result of the instruction is returned as a function value. The following table shows how the instruction works using specific operand values:
1505
COUNT OUT
Tag_Count b_array[1]
The instruction copies the second element (a_array[2]) of the tag "a_array" three times to the output tag "b_array" (b_array[1..3]). The copy operation cannot be interrupted by other operating system activities.
See also
Overview of the valid data types (Page 677) Entering SCL instructions (Page 923) Editing SCL instructions (Page 938)
1506
Syntax
The following syntax is used for the "Swap" instruction:
SCL SWAP(<Expression>)
Example
The following example shows how the instruction works:
SCL "Tag_Result" := SWAP("Tag_Value");
The result of the instruction is returned as a function value. The following table shows how the instruction works using specific operand values:
1507
See also
Overview of the valid data types (Page 677) Entering SCL instructions (Page 923) Editing SCL instructions (Page 938)
Syntax
The following syntax is used for the "Write memory address" instruction:
SCL POKE(AREA := <Operand>, DBNUMBER := <Operand>, BYTEOFFSET := <Operand>, VALUE := <Operand>)
BYTEOFFSET VALUE
Input Input
1508
Example
The following example shows how the instruction works:
SCL POKE_WORD(AREA := "Tag_Area", DBNUMBER := "Tag_DBNumber", BYTEOFFSET := "Tag_Byte"), VALUE := "Tag_Value";
The following table shows how the instruction works using specific operand values:
Parameters AREA DBNUMBER BYTEOFFSET VALUE Operand Tag_Area Tag_DBNumber Tag_Byte Tag_Value Value 16#84 5 20 16#11
The instruction overwrites the memory address "20" in the data block "5" with value "16#11".
See also
Overview of the valid data types (Page 677) Entering SCL instructions (Page 923) Editing SCL instructions (Page 938)
1509
Syntax
The following syntax is used for the "Write memory bit" instruction:
SCL POKE_BOOL(AREA := <Operand>, DBNUMBER := <Operand>, BYTEOFFSET := <Operand>, BITOFFSET := <Operand>, VALUE := <Operand>)
For additional information on valid data types, refer to "See also". Note If you write the memory bit in the input, output or bit memory areas, you need to set the parameter "DBNUMBER" with the value "0", as the instruction is faulty otherwise.
Example
The following example shows how the instruction works:
SCL "Tag_Result" := POKE_BOOL(AREA := "Tag_Area", DBNUMBER := "Tag_DBNumber", BYTEOFFSET := "Tag_Byte", BITOFFSET := "Tag_Bit", VALUE := "Tag_Value");
The following table shows how the instruction works using specific operand values:
1510
The instruction overwrites the memory bit "3" in data block "5" in byte "20" with the value "M0.0".
See also
Entering SCL instructions (Page 923) Editing SCL instructions (Page 938) Overview of the valid data types (Page 677)
Syntax
The following syntax is used for the "Read memory address" instruction:
SCL PEEK(AREA := <Operand>, DBNUMBER := <Operand>, BYTEOFFSET := <Operand>) PEEK_<Data type>(AREA := <Operand>, DBNUMBER := <Operand>, BYTEOFFSET := <Operand>)
1511
Input
For additional information on valid data types, refer to "See also". Note If you read the memory address of the input, output or bit memory areas, you will need to set the parameter "DBNUMBER" with the value "0", as the instruction is faulty otherwise.
Example
The following example shows how the instruction works:
SCL "Tag_Result1" := PEEK(AREA := "Tag_Area", DBNUMBER := "Tag_DBNumber", BYTEOFFSET := "Tag_Byte"); "Tag_Result2" := PEEK_WORD(AREA := "Tag_Area", DBNUMBER := "Tag_DBNumber", BYTEOFFSET := "Tag_Byte");
The following table shows how the instruction works using specific operand values:
Parameters AREA DBNUMBER Operand Tag_Area Tag_DBNumber Value 16#84 5
1512
The instruction reads the value of address "20" from the "Tag_Byte" operand at data block "5" and returns the result as a function value.
See also
Entering SCL instructions (Page 923) Editing SCL instructions (Page 938) Overview of the valid data types (Page 677)
Syntax
The following syntax is used for the "Read memory bit" instruction:
SCL PEEK_BOOL(AREA := <Operand>, DBNUMBER := <Operand>, BYTEOFFSET := <Operand>, BITOFFSET := <Operand>)
BYTEOFFSET
Input
DINT
1513
For additional information on valid data types, refer to "See also". Note If you read the memory bit from the input, output or bit memory areas, you will need to set the parameter "DBNUMBER" with the value "0", as the instruction is faulty otherwise.
Example
The following example shows how the instruction works:
SCL "Tag_Result" := PEEK_BOOL(AREA := "Tag_Area", DBNUMBER := "Tag_DBNumber", BYTEOFFSET := "Tag_Byte", BITOFFSET := "Tag_Bit");
The following table shows how the instruction works using specific operand values:
Parameters AREA DBNUMBER BYTEOFFSET BITOFFSET Function value Operand Tag_Area Tag_DBNumber Tag_Byte Tag_Bit Tag_Result Value 16#84 5 20 3 3
The instruction reads the value of memory bit "3" from the "Tag_Bit" operand at byte "20" of data block "5" and returns the result at the "Tag_Result" operand as function value.
See also
Entering SCL instructions (Page 923) Editing SCL instructions (Page 938) Overview of the valid data types (Page 677)
1514
Syntax
The following syntax is used for the "Write memory area" instruction:
SCL POKE_BLK(AREA_SRC := <Operand>, DBNUMBER_SRC := <Operand>, BYTEOFFSET_SRC := <Operand>, AREA_DEST := <Operand>, DBNUMBER_DEST := <Operand>, BYTEOFFSET_DEST := <Operand>, COUNT := <Operand>)
BYTEOFFSET_SRC
Input
DINT
AREA_DEST
Input
BYTE
BYTEOFFSET_DEST
Input
DINT
COUNT
Input
DINT
1515
Example
The following example shows how the instruction works:
SCL "Tag_Result" := POKE_BLK(AREA_SRC := "Tag_Source_Area", DBNUMBER_SRC := "Tag_Source_DBNumber", BYTEOFFSET_SRC := "Tag_Source_Byte"), AREA_DEST := "Tag_Destination_Area", DBNUMBER_DEST := "Tag_Destination_DBNumber", BYTEOFFSET_DEST := "Tag_Destination_Byte", COUNT := "Tag_Count");
The following table shows how the instruction works using specific operand values:
Parameters AREA_SRC DBNUMBER_SRC BYTEOFFSET_SRC AREA_DEST DBNUMBER_DEST BYTEOFFSET_DEST COUNT Operand Tag_Area Tag_DBNumber Tag_Byte Tag_Destination_Area Tag_Destination_DBNumber Tag_Destination_Byte Tag_Count Value 16#84 5 20 16#83 0 30 100
The instruction writes 100 byte from data block "5" starting with address "20" in the memory area of the bit memory starting at address "30".
See also
Entering SCL instructions (Page 923) Editing SCL instructions (Page 938) Overview of the valid data types (Page 677)
1516
Syntax
The "Convert value" instruction uses the syntax of the explicit conversion functions. For information on this function, refer to the "Explicit conversion functions (Page 1518)" section.
Example
The following example shows how the instruction works:
SCL "Tag_INT" := REAL_TO_INT("Tag_REAL");
The following table shows how the instruction works using specific operand values:
Operand Tag_REAL Tag_INT Data type REAL INT Value 20.56 21
With conversion, the value of the "Tag_REAL" operand is rounded to the nearest integer and saved in the "Tag_INT" " operand.
See also
Overview of the valid data types (Page 677) Operators and operator precedence (Page 913) Entering SCL instructions (Page 923) Editing SCL instructions (Page 938)
1517
1518
SINT_TO_CHAR
SINT_TO_STRING
Conversions of USINT Explanation The bit sample of the source value is transferred right-justified without any alterations into the target data type. The bit pattern of the source value is transferred without any changes into the target data type. If the sign bit is overwritten during conversion, the enable output ENO is set to "0".
1519
USINT_TO_CHAR USINT_TO_STRING
Conversions of INT Explanation The bit sample of the source value is transferred right-justified without any alterations into the target data type. If a negative value is converted into an unsigned target data type or an overflow occurs, the ENO enable output is set to "0".
INT_TO_BYTE INT_TO_WORD INT_TO_DWORD INT_TO_SINT INT_TO_USINT INT_TO_UINT INT_TO_DINT INT_TO_UDINT INT_TO_REAL INT_TO_LREAL INT_TO_CHAR
The value is converted into the format of the target data type. The value "-1" is changed to the value "-1.0", for example, with the "Convert value" instruction. The bit pattern of the source value is transferred without any changes into the target data type. With the conversion of negative values or with an overflow, the enable output ENO is set to "0". The value is converted into a character string. The character string is shown preceded by a sign. If the length of the character string is exceeded, the enable output "ENO" is set to "0".
INT_TO_STRING
Conversions of UINT Explanation The bit sample of the source value is transferred right-justified without any alterations into the target data type. With an overflow, the enable output ENO is set to "0".
The bit pattern of the source value is transferred without any changes into the target data type. If the sign bit is overwritten during conversion, the enable output ENO is set to "0".
1520
Conversions of DINT Explanation The bit sample of the source value is transferred right-justified without any alterations into the target data type. If a negative value is converted into an unsigned target data type or an overflow occurs, the ENO enable output is set to "0".
DINT_TO_BYTE DINT_TO_WORD DINT_TO_DWORD DINT_TO_SINT DINT_TO_USINT DINT_TO_INT DINT_TO_UINT DINT_TO_UDINT DINT_TO_REAL DINT_TO_LREAL DINT_TO_TIME DINT_TO_CHAR
The value is converted into the format of the target data type. The value "-1" is changed to the value "-1.0", for example, with the "Convert value" instruction. The bit pattern of the source value is transferred without any changes into the target data type. The bit pattern of the source value is transferred without any changes into the target data type. With the conversion of negative values or with an overflow, the enable output ENO is set to "0". The value is converted into a character string. The character string is shown preceded by a sign. If the length of the character string is exceeded, the enable output "ENO" is set to "0".
DINT_TO_STRING
Conversions of UDINT Explanation The bit pattern of the source value is transferred without any changes into the target data type. With an overflow, the enable output ENO is set to "0".
1521
Conversions of REAL Explanation The bit pattern of the source value is transferred without any changes into the target data type. The value is converted into a target data type. The result of the conversion depends on the instruction used. If the permitted value range of the target data type is exceeded with the conversion or the value to be converted is an invalid floating-point number, the enable output ENO is set to "0".
The value is converted into a target data type. The value is converted into a character string. If the length of the character string is exceeded with the conversion or the value to be converted is an invalid floating-point number, the enable output ENO is set to "0".
Conversions of LREAL Explanation The value is converted into a target data type. The result of the conversion depends on the instruction used. If the permitted value range is exceeded with the conversion or the value to be converted is an invalid floating-point number, the enable output ENO is set to "0".
The value is converted into a target data type. If the permitted value range is exceeded with the conversion or the value to be converted is an invalid floating-point number, the enable output ENO is set to "0". The value is converted into a character string. If the length of the character string is exceeded with the conversion or the value to be converted is an invalid floating-point number, the enable output ENO is set to "0".
LREAL_TO_STRING
1522
Conversions of DATE Explanation The bit pattern of the source value is transferred without any changes into the target data type. The result of the conversion corresponds with the number of days since 01.01.1990.
DATE_TO_UINT
Conversions of TOD Explanation The bit pattern of the source value is transferred without any changes into the target data type. The result of the conversion corresponds with the number of milliseconds since the start of the day (00:00).
TOD_TO_UDINT
Conversions of DTL Explanation With the conversion, the information regarding the date is extracted from the DTL format and written into the target data type. With the conversion, the information regarding the time is extracted from the DTL format and written into the target data type.
DTL_TO_DATE DTL_TO_TOD
Conversions of CHAR Explanation The bit sample of the source value is transferred right-justified without any alterations into the target data type.
The value is converted into the first character of the character string (STRING). If the length of the character string is not defined, the length "1" is set after conversion. If the length of the character string is defined, this length is the same after conversion.
1523
Syntax
Use the following syntax for the conversion instructions: <Target_value> := <Conversion_function>(<Source_value>); The syntax of the instruction consists of the following parts:
Part / Parameter <Source_value> Declaration Input, constant Data type Bit sequences, integers, floating-point numbers, timers, date and time, character sequences Description Value to be converted.
<Conversion_function>
Function that specifies the data type to be converted . Result of the conversion
<Target_value>
Output
Bit sequences, integers, floating-point numbers, timers, date and time, character sequences
Example
The following example shows how the conversion function works:
SCL "Tag_Word" := BYTE_TO_WORD("Tag_Byte");
The following table shows how the instruction works using specific operand values:
1524
See also
Overview of the valid data types (Page 677) Operators and operator precedence (Page 913) Entering SCL instructions (Page 923) Editing SCL instructions (Page 938)
Syntax
The following syntax is used for the "Round numerical value" instruction:
SCL ROUND(<Expression>) ROUND_<data type>(<expression>)
1525
Example
The following example shows how the instruction works:
SCL "Tag_Result1" := ROUND("Tag_Value"); "Tag_Result2" := ROUND_REAL("Tag_Value");
The following table shows how the instruction works using specific operand values:
Operand Tag_Value Tag_Result1 Tag_Result2 0,50000000 0 0,0 Value -0,50000000 0 0,0
The result of the instruction is returned as function value at the "Tag_Result" operand.
See also
Overview of the valid data types (Page 677) Operators and operator precedence (Page 913) Entering SCL instructions (Page 923) Editing SCL instructions (Page 938)
Syntax
The following syntax is used for the "Generate next higher integer from floating-point number" instruction:
SCL CEIL(<expression>) CEIL_<data type>(<expression>)
1526
Example
The following example shows the instruction works:
SCL "Tag_Result1" := CEIL("Tag_Value"); "Tag_Result2" := CEIL_REAL("Tag_Value);
The following table shows how the instruction works using specific operand values:
Operand Tag_Value Tag_Result1 Tag_Result2 Value 0.5 1 1.0 -0.5 0 0,0
The result of the instruction is returned as function value at the "Tag_Result" operand.
See also
Overview of the valid data types (Page 677) Expressions (Page 908) Operators and operator precedence (Page 913) Entering SCL instructions (Page 923) Editing SCL instructions (Page 938)
1527
Syntax
Use the following syntax for the "Generate next lower integer from floating-point number" instruction:
SCL FLOOR(<expression>) FLOOR_<data type>(<expression>)
Example
The following example shows how the instruction works:
SCL "Tag_Result1" := FLOOR("Tag_Value"); "Tag_Result2" := FLOOR_REAL("Tag_Value");
The following table shows how the instruction works using specific operand values:
Operand Tag_Value Tag_Result1 Tag_Result2 Value 0,5 0 0,0 -0,5 -1 -1,0
The result of the instruction is returned as function value at the "Tag_Result" operand.
1528
See also
Overview of the valid data types (Page 677) Expressions (Page 908) Operators and operator precedence (Page 913) Entering SCL instructions (Page 923) Editing SCL instructions (Page 938)
Syntax
The following syntax is used for the "Truncate numerical value" instruction:
SCL TRUNC(<Expression>) TRUNC_<data type>(<expression>)
Example
The following example shows how the instruction works:
SCL "Tag_Result1" := TRUNC("Tag_Value1"); "Tag_Result2" := TRUNC("Tag_Value2"+"Tag_Value3");
1529
The following table shows how the instruction works using specific operand values:
Operand Tag_Value1 Tag_Result1 Tag_Value2 Tag_Value3 Tag_Result2 Tag_Result3 Tag_Value4 Value -1,5 -1 2,1 3,2 5 2,4 2
The result of the instruction is returned as function value at the "Tag_Result" operand.
See also
Overview of the valid data types (Page 677) Operators and operator precedence (Page 913) Entering SCL instructions (Page 923) Editing SCL instructions (Page 938)
1530
Syntax
The following syntax is used for the "Scale" instruction:
SCL SCALE_X(MIN := <operand>, VALUE := <operand>, MAX := <operand>) SCALE_X_<data type>(MIN := <operand>, VALUE := <operand>, MAX := <operand>)
1531
Example
The following example shows the instruction works:
SCL "Tag_Result1" := SCALE_X(MIN := "Tag_Value1", VALUE := "Tag_Real", MAX := "Tag_Value2"); "Tag_Result2" := SCALE_X_REAL(MIN := "Tag_Value1", VALUE := "Tag_Real", MAX := "Tag_Value2");
The following table shows how the instruction works using specific operand values:
Operand Tag_Real Tag_Value1 Tag_Value2 Tag_Result1 Tag_Result2 Value 0.5 10 30 20 20,0
The result of the instruction is returned as function value at the "Tag_Result" operand.
See also
Overview of the valid data types (Page 677) Operators and operator precedence (Page 913) Entering SCL instructions (Page 923) Editing SCL instructions (Page 938)
1532
Syntax
The following syntax is used for the "Normieren" instruction:
SCL NORM_X(MIN := <operand>, VALUE := <operand>, MAX := <operand>) NORM_X_<data type>(MIN := <operand>, VALUE := <operand>, MAX := <operand>)
1533
Example
The following example shows how the instruction works:
SCL "Tag_Result1" := NORM_X(MIN := "Tag_Value1", VALUE := "Tag_InputValue", MAX := "Tag_Value2"); "Tag_Result2" := NORM_X_LREAL(MIN := "Tag_Value1", VALUE := "Tag_InputValue", MAX := "Tag_Value2");
The following table shows how the instruction works using specific operand values:
Operand Tag_InputValue Tag_Value1 Tag_Value2 Tag_Result1 Tag_Result2 Value 20 10 30 0,5 0,5
The result of the instruction is returned as function value at the "Tag_Result" operand.
1534
See also
Overview of the valid data types (Page 677) Operators and operator precedence (Page 913) Entering SCL instructions (Page 923) Editing SCL instructions (Page 938)
Syntax
Depending on the type of branch, you can program the following forms of the instruction: Branch through IF:
SCL IF <Condition> THEN <Instructions> END_IF
If the condition is satisfied, the instructions programmed after the THEN are executed. If the condition is not satisfied, the execution of the program continues with the next instruction after the END_IF. Branch through IF and ELSE:
SCL IF <Condition> THEN <Instructions1> ELSE <Instructions0>; END_IF
If the condition is satisfied, the instructions programmed after the THEN are executed. If the condition is not satisfied, the instructions programmed after the ELSE are executed. Then the execution of the program continues with the next instruction after the END_IF.
1535
If the first condition (<Condition1>) is satisfied, the instructions (<Instructions1>) after the THEN are executed. After execution of the instructions, the execution of the program continues after the END_IF. If the first condition is not satisfied, the second condition (<Condition2>) is checked. If the second condition (<Condition2>) is fulfilled, the instructions (<Instructions2>) after the THEN are executed. After execution of the instructions, the execution of the program continues after the END_IF. If none of the conditions are fulfilled, the instructions (<Instructions0>) after ELSE are executed followed by the execution of the program after END_IF. You can nest as many combinations of ELSIF and THEN as you like within the IF instruction. The programming of an ELSE branch is optional. The syntax of the IF instruction consists of the following parts:
Part <Condition> <Instructions> Data type BOOL Description Expression to be evaluated Instructions to be executed with satisfied condition. An exception are instructions programmed after the ELSE. These are executed if no condition within the program loop is satisfied.
Example
The following example shows how the instruction works:
SCL IF "Tag_1" = 1 THEN "Tag_Value" := 10; ELSIF "Tag_2" = 1 THEN "Tag_Value" := 20; ELSIF "Tag_3" = 1 THEN "Tag_Value" := 30; ELSE "Tag_Value" := 0; END_IF;
The following table shows how the instruction works using specific operand values:
Operand Tag_1 Tag_2 1 0 0 1 Value 0 0 0 0
1536
See also
Operators and operator precedence (Page 913) Entering SCL instructions (Page 923) Editing SCL instructions (Page 938) Overview of the valid data types (Page 677)
Syntax
The following syntax is used for the "Create multiway branch" instruction:
SCL CASE <expression> OF <Constant1>: <Instructions1> <Constant2>: <Instructions2> <ConstantX>: <InstructionsX>; // X >=3 ELSE <Instructions0>; END_CASE
1537
For additional information on valid data types, refer to "See also". If the value of the expression agrees with the value of the first constant (<Constant1>), the instructions (<Instructions1>) which are programmed directly after the first constant are executed. Program execution subsequently resumes after the END_CASE. If the value of the expression does not agree with the value of the first constant (<Constant1>), this value is compared to the value of the constant which is programmed next. In this way, the CASE instruction is executed until the values agree. If the value of the expression does not correspond to any of the programmed constant values, the instructions (<Instructions0>) which are programmed after the ELSE are executed. ELSE is an optional part of the syntax and can be omitted. The CASE instruction can also be nested by replacing an instruction block with CASE . END_CASE represents the end of the CASE instruction.
Example
The following example shows how the instruction works:
SCL CASE "Tag_Value" OF 0 : "Tag_1" := 1; 1,3,5 : "Tag_2" :=1; 6..10 : "Tag_3" := 1; 16,17,20..25 : "Tag_4" := 1; ELSE "Tag_5" := 1; END_CASE;
The following table shows how the instruction works using specific operand values:
Operand Tag_Value Tag_1 Tag_2 0 1 1, 3 , 5 1 Values 6, 7, 8, 9, 10 16,17, 20, 21, 22, 23, 24, 25 2 -
1538
1: The operand is set to the signal state "1". -: The signal state of the operand remains unaltered.
See also
CONTINUE: Recheck loop condition (Page 1543) Overview of the valid data types (Page 677) Operators and operator precedence (Page 913) Entering SCL instructions (Page 923) Editing SCL instructions (Page 938) EXIT: Exit loop immediately (Page 1544)
Syntax
The following syntax is used for the "Run in counting loop" instruction:
SCL FOR <Run_tag> := <Start_value> TO <End_value> BY <Increment> DO <Instructions> END_FOR
1539
Example
The following example shows how the instruction works:
SCL FOR i := 2 TO 8 BY 2 DO "a_array[i] := "Tag_Value"*"b_array[i]"; END_FOR;
The operand "Tag_Value" is multiplied with the elements (2, 4, 6, 8) of the ARRAY tag "b_array". The result is read in to the elements (2, 4, 6, 8) of the ARRAY tag "a_array".
See also
CONTINUE: Recheck loop condition (Page 1543) EXIT: Exit loop immediately (Page 1544) Overview of the valid data types (Page 677) Operators and operator precedence (Page 913) Entering SCL instructions (Page 923) Editing SCL instructions (Page 938)
1540
Syntax
The following syntax is used for the "Run if condition is met" instruction:
SCL WHILE <Condition> DO <Instructions> END_WHILE
Example
The following example shows how the instruction works:
SCL WHILE "Tag_Value1" <> "Tag_Value2" DO "Tag_Result" := "Tag_Input"; END_WHILE;
As long as the values of the operands "Tag_Value1" and "Tag_Value2" do not match, the value of the operand "Tag_Input" is allocated to the operand "Tag_Result".
1541
See also
EXIT: Exit loop immediately (Page 1544) Operators and operator precedence (Page 913) Entering SCL instructions (Page 923) Editing SCL instructions (Page 938) CONTINUE: Recheck loop condition (Page 1543) Overview of the valid data types (Page 677)
Syntax
The following syntax is used for the "Run if condition is not met" instruction:
SCL REPEAT <Instructions> UNTIL <Condition> END_REPEAT
<Condition>
BOOL
1542
Example
The following example shows how the instruction works:
SCL REPEAT "Tag_Result" := "Tag_Value"; UNTIL "Tag_Error" END_REPEAT;
As long as the value of the operand "Tag_Error" has the signal state "0", the value of the operand "Tag_Value" is allocated to the operand "Tag_Result".
See also
CONTINUE: Recheck loop condition (Page 1543) EXIT: Exit loop immediately (Page 1544) Operators and operator precedence (Page 913) Entering SCL instructions (Page 923) Editing SCL instructions (Page 938) Overview of the valid data types (Page 677)
Syntax
The following syntax is used for the "Recheck loop condition" instruction:
SCL CONTINUE
Example
The following example shows how the instruction works:
SCL FOR i := 1 TO 15 BY 2 DO IF (i < 5) THEN
1543
For additional information on valid data types, refer to "See also". If the condition i < 5 has been fulfilled, the following value assignment ("DB10".Test[i] := 1) is not processed. The run variable (i) is increased by the increment of "2" and checked to see whether its current value lies in the programmed value range. If the run variable lies in the value range, the IF condition is evaluated again. If the condition i < 5 is not satisfied, the subsequent value allocation ("DB10".Test[i] := 1) is executed and a new loop is started. In this case, the run variable is also increased by the increment "2" and checked.
See also
Operators and operator precedence (Page 913) Entering SCL instructions (Page 923) Editing SCL instructions (Page 938) EXIT: Exit loop immediately (Page 1544)
Syntax
The following syntax is used for the "Exit loop immediately" instruction:
SCL EXIT
Example
The following example shows how the instruction works:
SCL FOR i := 15 TO 1 BY -2 DO
1544
For additional information on valid data types, refer to "See also". If the condition i < 5 is satisfied, then the execution of the loop will be cancelled. Program execution resumes after the END_FOR. If the condition i < 5 is not satisfied, the subsequent value allocation ("DB10".Test[i] := 1) is executed and a new loop is started. The run tag (i) is decreased by the increment of "-2" and it is checked whether its current value lies in the programmed value range. If the (i) run variable lies within the value range, the IF condition is evaluated again.
See also
Operators and operator precedence (Page 913) Entering SCL instructions (Page 923) Editing SCL instructions (Page 938) CONTINUE: Recheck loop condition (Page 1543)
Syntax
Use the following syntax for the "Jump" instruction:
SCL GOTO <Jump label> ... <Jump label>: <Instructions>
1545
Example
The following example shows how the instruction works:
SCL CASE "Tag_Value" OF 1 : GOTO MyLABEL1; 2 : GOTO MyLABEL2; 3 : GOTO MyLABEL3; ELSE GOTO MyLABEL4; END_CASE; MyLABEL1: "Tag_1" := 1; MyLABEL2: "Tag_2" := 1; MyLABEL3: "Tag_3" := 1; MyLABEL4: "Tag_4" := 1;
Depending on the value of the "Tag_Value" operand, the execution of the program will resume at the point identified by the corresponding jump label. If the operand "Tag_Value" has the value 2, for example, program execution will resume at the jump label "MyLABEL2". The program line identified by the jump label "MyLABEL1" will be skipped in this case.
See also
Operators and operator precedence (Page 913) Entering SCL instructions (Page 923) Editing SCL instructions (Page 938)
Syntax
The following syntax is used for the "Exit block" instruction:
SCL RETURN
1546
Example
The following example shows how the instruction works:
SCL IF "Tag_Error" <>0 THEN RETURN; END_IF;
If the signal state of the "Tag_Error" operand is zero, execution of the program ends in the block currently being processed.
See also
Operators and operator precedence (Page 913) Entering SCL instructions (Page 923) Editing SCL instructions (Page 938)
Syntax
The following syntax is used for the "Exit program" instruction:
SCL STP()
See also
Entering SCL instructions (Page 923) Editing SCL instructions (Page 938)
1547
Syntax
The following syntax is used for the "Restart cycle monitoring time" instruction:
SCL RE_TRIGR()
See also
Entering SCL instructions (Page 923) Editing SCL instructions (Page 938)
1548
Syntax
The following syntax is used for the "Get error locally" instruction:
SCL <Error information> := GET_ERROR()
1549
Operand number of the machine command (A) Internal pointer (B) Storage area in internal memory Information about the address of an operand (C) Memory area: L: 16#40 4E, 86, 87, 8E, 8F, C0 CE E: 16#81 A: 16#82 M: 16#83 DB: 16#84, 85, 8A, 8B
DB_NUMBER OFFSET
UINT UDINT
(D) Number of the data block (E) Relative address of the operand
1550
The instruction "Get error locally" can also be used to forward an alarm about the error status to the calling block. To do this, you have to program the instruction at the end of the called block.
See also
Entering SCL instructions (Page 923) Editing SCL instructions (Page 938)
1551
Syntax
The following syntax is used for the instruction "Get error ID locally":
SCL <Error_ID> := GET_ERR_ID()
Error ID
The following table shows the values that can be output:
ID (hexadecimal) 0 2503 2505 2520 2522 2523 2524 2525 2528 2529 252C 2530 2533 2534 2535 2538 2539 ID (decimal) 0 9475 9477 9504 9506 9507 9508 9509 9512 9513 9516 9520 9523 9524 9525 9528 9529 Description No error Invalid pointer Calling the instruction "Stop" (SFC46) in the user program Invalid STRING Read errors: Operand outside the valid range Write errors: Operand outside the valid range Read errors: Invalid operand Write errors: Invalid operand Read errors: Data alignment Write errors: Data alignment Invalid pointer Write errors: Data block Invalid pointer used Block number error FC Block number error FB Access error: DB does not exist Access error: Wrong DB used
1552
See also
Entering SCL instructions (Page 923) Editing SCL instructions (Page 938)
Syntax
The following syntax is used for the "Decode" instruction:
SCL DECO(IN := <Expression>) DECO_WORD(IN := <expression>)
1553
_<data type>
Example
The following example shows how the instruction works:
SCL "Tag_Result" := DECO(IN := "Tag_Value"); "Tag_Result2" := DECO_BYTE(IN := "Tag_Value2");
The following figure shows how the instruction works using specific operand values:
The instruction reads the number "3" from the value of the operand "Tag_Value" and sets the third bit to the value of the operand "Tag_Result".
See also
Overview of the valid data types (Page 677) Operators and operator precedence (Page 913) Entering SCL instructions (Page 923) Editing SCL instructions (Page 938)
1554
Syntax
The following syntax is used for the "Encode" instruction:
SCL ENCO(IN := <Expression>)
Example
The following example shows how the instruction works:
SCL "Tag_Result" := ENCO(IN := "Tag_Value");
The following figure shows how the instruction works using specific operand values:
The instruction reads the lowest-value set bit of the operand "Tag_Value" and writes the bit position "3" in the operand "Tag_Result".
See also
Overview of the valid data types (Page 677) Operators and operator precedence (Page 913) Entering SCL instructions (Page 923) Editing SCL instructions (Page 938)
1555
Syntax
The following syntax is used for the "Select" instruction:
SCL SEL(G := <Expression>, IN0 := <expression>, IN1 := <Expression>)
IN1
Input
Function value
Example
The following example shows how the instruction works:
SCL "Tag_Result" := SEL(G := "Tag_Value", IN0 := "Tag_0", IN1 := "Tag_1");
The following table shows how the instruction works using specific operand values:
1556
The result of the instruction is returned in the operand "Tag_Result" as a function value.
See also
Overview of the valid data types (Page 677) Operators and operator precedence (Page 913) Entering SCL instructions (Page 923) Editing SCL instructions (Page 938)
Syntax
The following syntax is used for the "Multiplex" instruction:
SCL MUX(K := <Expression>, IN1 := <Expression>, IN2 := <Expression>, INELSE := <Expression>)
1557
IN1
Input
BOOL, bit strings, integers, floating-point numbers, characters, TOD, DATE, TIME BOOL, bit strings, integers, floating-point numbers, characters, TOD, DATE, TIME BOOL, bit strings, integers, floating-point numbers, characters, TOD, DATE, TIME BOOL, bit strings, integers, floating-point numbers, characters, TOD, DATE, TIME BOOL, bit strings, integers, floating-point numbers, characters, TOD, DATE, TIME
IN2
Input
INn
Input
INELSE
Input
Function value
Example
The following example shows how the instruction works:
SCL "Tag_Result" := MUX(K := "Tag_Number", IN1 := "Tag_1", IN2 := "Tag_2", INELSE := "Tag_3");
The following table shows how the instruction works using specific operand values:
Operand Tag_Number Tag_1 Tag_2 Tag_3 Tag_Result 2 DW#16#00000000 DW#16#3E4A7D DW#16#FFFF0000 DW#16#3E4A7D Value 4 DW#16#00000000 DW#16#3E4A7D DW#16#FFFF0000 DW#16#FFFF0000
The result of the instruction is returned in the operand "Tag_Result" as a function value.
1558
See also
Overview of the valid data types (Page 677) Operators and operator precedence (Page 913) Entering SCL instructions (Page 923) Editing SCL instructions (Page 938)
Syntax
The following syntax is used for the "Demultiplex" instruction:
SCL DEMUX(K := <Expression>, IN := <Expression>, OUT1 := <Operand>, OUT2 := <Operand>, ELSE := <Operand>)
IN
Input
BOOL, bit strings, integers, floating-point numbers, strings, TIME, TOD, DATE BOOL, bit strings, integers, floating-point numbers, strings, TIME, TOD, DATE
OUT1
Output
First output
1559
OUTn
Output
Optional outputs
ELSE
Output
Output to which the value at input IN is copied if K > n. Result of the instruction
Function value
Example
The following example shows how the instruction works:
SCL "Tag_Result" := DEMUX(K := "Tag_Number", IN := "Tag_Value", OUT1 := "Tag_1", OUT2 := "Tag_2", ELSE := "Tag_3");
The following tables show how the instruction works using specific operand values:
Table 9-43 Parameters K IN Input values of the "Demultiplex" instruction before the network execution Operand Tag_Number Tag_Value 2 DW#16#FFFFFFFF Values 4 DW#16#3E4A7D
Output values of the "Demultiplex" instruction after the network execution Operand Tag_1 Tag_2 Tag_3 Unchanged DW#16#FFFFFFFF Unchanged Values Unchanged Unchanged DW#16#3E4A7D
The result of the instruction is returned in the operand "Tag_Result" as a function value.
1560
See also
Overview of the valid data types (Page 677) Operators and operator precedence (Page 913) Entering SCL instructions (Page 923) Editing SCL instructions (Page 938)
1561
Syntax
The following syntax is used for the "Shift right" instruction:
SCL SHR(IN := <Operand>, N := <Operand>)
Example
The following example shows how the instruction works:
SCL "Tag_Result" := SHR(IN := "Tag_Value", N := "Tag_Number");
The following table shows how the instruction works using specific operand values:
Parameters IN N Function value Operand Tag_Value Tag_Number Tag_Result Value 0011 1111 1010 1111 3 0000 0111 1111 010 1
The content of the "Tag_Value" operand is shifted by three bit positions to the right. The result of the instruction is returned in the operand "Tag_Result" as a function value.
See also
Overview of the valid data types (Page 677) Operators and operator precedence (Page 913) Entering SCL instructions (Page 923) Editing SCL instructions (Page 938)
1562
Syntax
The following syntax is used for the "Shift left" instruction:
SCL SHL(IN := <Operand>, N := <Operand>)
1563
Example
The following example shows how the instruction works:
SCL "Tag_Result" := SHL(IN := "Tag_Value", N := "Tag_Number");
The following table shows how the instruction works using specific operand values:
Parameters IN N Function value Operand Tag_Value Tag_Number Tag_Result Value 0011 1111 1010 1111 4 1111 1010 1111 0000
The value of the "Tag_Value" operand is shifted by four bit positions to the left. The result of the instruction is returned in the operand "Tag_Result" as a function value.
See also
Overview of the valid data types (Page 677) Operators and operator precedence (Page 913) Entering SCL instructions (Page 923) Editing SCL instructions (Page 938)
1564
Syntax
The following syntax is used for the "Rotate right" instruction:
SCL ROR(IN := <Operand>, N := <Operand>)
Function value
Bit strings
Example
The following example shows how the instruction works:
SCL "Tag_Result" := ROR(IN := "Tag_Value", N := "Tag_Number");
1565
The content of the "Tag_Value" operand is rotated by five bit positions to the right. The result of the instruction is returned in the operand "Tag_Result" as a function value.
See also
Overview of the valid data types (Page 677) Operators and operator precedence (Page 913) Entering SCL instructions (Page 923) Editing SCL instructions (Page 938)
1566
Syntax
The following syntax is used for the "Rotate left" instruction:
SCL ROL(IN := <Operand>, N := <Operand>)
Function value
Bit strings
Example
The following example shows how the instruction works:
SCL "Tag_Result" := ROL(IN := "Tag_Value", N := "Tag_Number");
The following table shows how the instruction works using specific operand values:
1567
The content of the operand "Tag_Value" is rotated five bit positions to the left. The result of the instruction is returned in the operand "Tag_Result" as a function value.
See also
Overview of the valid data types (Page 677) Operators and operator precedence (Page 913) Entering SCL instructions (Page 923) Editing SCL instructions (Page 938)
9.8.3
9.8.3.1
Extended instructions
Date and time-of-day
Parameters
The following table shows the parameters of the "T_CONV" instruction. If an input and output parameter of the same data type is used, the instruction copies the corresponding value.
Parameter IN OUT Declaration Input Return Data type TIME, DINT TIME, DINT Memory area I, Q, M, D, L or constant I, Q, M, D, L Description Value to be converted Result of the conversion
For additional information on valid data types, refer to "Overview of the valid data types (Page 677)".
1568
Parameters
The following tables show the parameters of the "T_ADD" instruction, according to the possible conversions:
Table 9-45 Parameter IN1 IN2 OUT Addition of a time period (TIME) to another time period (TIME) Declaration Input Input Return Data type TIME TIME TIME Memory area I, Q, M, D, L or constant I, Q, M, D, L or constant I, Q, M, D, L Description Summand Summand Result of addition
Addition of a time period (TIME) to a time (DTL) Declaration Input Input Return Data type DTL TIME DTL Memory area D I, Q, M, D, L or constant D Description Summand Summand Result of addition
For additional information on valid data types, refer to "Overview of the valid data types (Page 677)".
1569
Parameters
The following tables show the parameters of the "T_SUB" instruction, according to the possible conversions:
Table 9-47 Parameter IN1 IN2 OUT Subtraction of a time period (TIME) from another time period (TIME) Declaration Input Input Return Data type TIME TIME TIME Memory area I, Q, M, D, L or constant I, Q, M, D, L or constant I, Q, M, D, L Description Minuend Subtrahend Result of subtraction
Subtraction of a time period (TIME) from a time (DTL) Declaration Input Input Return Data type DTL TIME DTL Memory area D I, Q, M, D, L or constant I, Q, M, D, L Description Minuend Subtrahend Result of subtraction
For additional information on valid data types, refer to "Overview of the valid data types (Page 677)".
1570
Parameters
The following table shows the parameters of the "T_DIFF" instruction:
Parameter IN1 IN2 OUT Declaration Input Input Return Data type DTL DTL TIME Memory area D D I, Q, M, D, L Description Minuend Subtrahend Difference in TIME format.
For additional information on valid data types, refer to "Overview of the valid data types (Page 677)".
1571
Parameter
The following table shows the parameters of the instruction "T_COMBINE":
Parameter IN1 IN2 OUT Declaration Input Input Return Data type DATE TOD DTL Memory area D, L D, L D Description Input tag in the DATE format. Input tag in the TIME_OF_DAY format. Return value in the DTL format.
For additional information on valid data types, refer to "Overview of the valid data types (Page 677)".
Parameters
The following table shows the parameters of the "WR_SYS_T" instruction:
Parameter IN RET_VAL Declaration Input Return Data type DTL INT, REAL, DInt Memory area D I, Q, M, D, L Description Date and time-of-day Status of the instruction
For additional information on valid data types, refer to "Overview of the valid data types (Page 677)".
Parameter RET_VAL
Error code (W#16#....) 0000 8081 No error Year invalid Description
1572
Parameters
The following table shows the parameters of the "RD_SYS_T" instruction:
Parameter RET_VAL OUT Declaration Return Output Data type INT, REAL, DInt DTL Memory area I, Q, M, D, L D Description Status of the instruction Date and time of CPU
For additional information on valid data types, refer to "Overview of the valid data types (Page 677)".
Parameter RET_VAL
Error code (W#16#....) 0000 8222 8223 No error The result is outside the permissible range of values The result cannot be saved with the specified data type Description
1573
Parameters
The following table shows the parameters of the "RD_LOC_T" instruction:
Parameter RET_VAL OUT Declaration Return Output Data type DINT, INT, LREAL, REAL DTL Memory area M, D, L D Description Status of the instruction Local time
For additional information on valid data types, refer to "Overview of the valid data types (Page 677)".
Parameter RET_VAL
Error code (W#16#....) 0000 0001 8080 No error No error. Local time is output as daylight saving time. Local time cannot be read out. Description
1574
Parameters
The following table shows the parameters of the "SET_TIMEZONE" instruction:
Parameter REQ TimeZone DONE BUSY Declaration Input Input Output Output Data type BOOL Time Transformation Rule (Page 1575) BOOL BOOL Memory area I, Q, M, D, L or constant D I, Q, M, D, L I, Q, M, D, L Description REQ=1: Conversion of module time to local time Rule for conversion of module time to local time. 0: Job not yet started or is still executing 1: Job completed error-free 0: Job not yet started or already completed 1: Job not yet completed. A new job cannot be started. ERROR STATUS Output Output BOOL DINT, DWORD, UDINT, WORD I, Q, M, D, L I, Q, M, D, L 0: No error 1: Error occurred Error message
For additional information on valid data types, refer to "Overview of the valid data types (Page 677)".
STATUS parameter
Error code (W#16#....) 7000 7001 7002 No job processing active. Start of the job processing. Parameter BUSY = 1, DONE = 0 Intermediate call (REQ irrelevant): Instruction already active; BUSY has the value "1". Description
TimeTransformationRule Description
The times for changeover to daylight saving time and standard time are defined in the TimeTransformationRule structure. The structure is as follows:
Name TimeTransformationRule Bias DaylightBias DaylightStartMonth Data type STRUCT INT INT USINT // Time difference between local time and UTC [min] // Time difference between daylight saving and standard time [min] // Month of conversion to daylight saving time Description
1575
1576
Parameters
The following table shows the parameters of the instruction "RTM":
Parameter NR Declaration Input Data type RTM (UINT) Memory area I, Q, M, D, L or constant Description Number of the runtime meter Numbering starts with 0. For information on the number of runtime meters of your CPU, refer to the technical data. MODE Input BYTE I, Q, M, D, L or constant Job ID: 0: Read out (the status is then written to CQ and the current value to CV). After the runtime meter has reached (2E31) -1 hours, it stops at the highest value that can be displayed and outputs an "Overflow" error message. 1: start (at the last counter value) 2: stop 4: set (to the value specified in PV) 5: set (to the value specified in PV) and then start 6: set (to the value specified in PV) and then stop 7: Save all values of the runtime meter to the memory card (MC). PV Input BYTE, DINT, INT, SINT, UINT, USINT, WORD DINT, INT, LREAL, REAL BOOL DINT I, Q, M, D, L or constant New value for the runtime meter
RET_VAL
Return
I, Q, M, D, L
If an error occurs while the instruction is being executed, the return value contains an error code. Status of the runtime meter (1: running) Current value of the runtime meter
CQ CV
Output Output
I, Q, M, D, L I, Q, M, D, L
For additional information on valid data types, refer to "Overview of the valid data types (Page 677)".
Parameter RET_VAL
Error code (W#16#...) 0000 8080 8081 8082 8091 No error Wrong number for the runtime meter A negative value was passed to the PV parameter. Overflow of the runtime meter The MODE input parameter contains an illegal value. Explanation
1577
9.8.3.2
String + Char
Parameters
The following table shows the parameters of the "S_MOVE" instruction:
Parameter IN OUT Declaration Input Output Data type STRING STRING Memory area D, L D, L Description Source value Destination address
For additional information on valid data types, refer to "Overview of the valid data types (Page 677)".
1578
Parameters
The following tables show the parameters of the "S_CONV" instruction, according to the possible conversions:
Table 9-49 Parameters IN OUT Parameters for converting a character string to a numeric value: Declaration Input Output Data type STRING CHAR, USINT, UINT, UDINT, SINT, INT, DINT, REAL, LREAL Memory area D, L I, Q, M, D, L Description Value to be converted Result of the conversion
1579
OUT
Output
D, L
Parameters for copying a character string: Declaration Input Output Data type STRING STRING Memory area D, L D, L Description Value to be copied Result of the copy operation
For additional information on valid data types, refer to "Overview of the valid data types (Page 677)".
Parameters
The following table shows the parameters of the "STRG_VAL" instruction:
Parameter IN FORMAT Declaration Input Input Data type STRING WORD Memory area D, L Description Numeric character string to be converted
1580
OUT
Output
I, Q, M, D, L
For additional information on valid data types, refer to "Overview of the valid data types (Page 677)".
Parameter FORMAT
You use the FORMAT parameter to specify how the characters of a character string are to be interpreted. Exponential values can also be converted and represented with the "STRG_VAL" instruction. Only tags of the USINT data type can be specified in the FORMAT parameter. The following table shows the possible values of the FORMAT parameter and their meaning:
Value (W#16#....) 0000 0001 0002 0003 0004 to FFFF Invalid values Exponential Decimal fraction "." "," "." "," Notation Decimal representation
Parameter P
The conversion starts at the character whose position you specified in the P parameter. If, for example, the value "1" is specified in the P parameter, the conversion starts at the first character of the specified character string.
Example
The following table shows examples of the conversion of a character string to a numeric value:
IN (STRING) '123' '-00456' '123.45' '+2345' '00123AB' '123' FORMAT (W#16#....) 0000 0000 0000 0000 0000 0000 OUT (data type) INT/DINT INT/DINT INT/DINT INT/DINT INT/DINT REAL OUT (value) 123 -456 123 2345 123 123.0 ENO status 1 1 1 1 1 1
1581
Parameters
The following table shows the parameters of the "VAL_STRG" instruction:
Parameter IN Declaration Input Data type USINT, SINT, UINT, INT, UDINT, DINT, REAL, LREAL USINT Memory area Description
SIZE
Input
1582
I, Q, M, D, L or constant Number of decimal places I, Q, M, D, L or constant Output format of the characters I, Q, M, D, L D, L Character starting at which the result is written. Result of the conversion
For additional information on valid data types, refer to "Overview of the valid data types (Page 677)".
Parameter P
With the P parameter, you specify the character in the string starting at which the result is written. If, for example, the value "2" is specified in the P parameter, the converted value is saved starting at the second character of the string.
Parameter FORMAT
Use the FORMAT parameter to specify how the numerical value is interpreted during conversion and written to the character string. You can specify only tags of the FORMAT data type in the USINT parameter. The following table shows the possible values of the FORMAT parameter and their meaning:
Value (W#16#....) 0000 0001 0002 0003 0004 0005 0006 0007 0008 to FFFF Invalid values Exponential Decimal fraction "+" and "-" Exponential Decimal fraction "-" "." "," "." "," "." "," "." "," Notation Sign Decimal representation
1583
Parameter PREC
Use the PREC parameter to define the number of decimal places when converting floatingpoint numbers. A maximum precision of seven numbers is supported for numerical values of the REAL data type. If the value to be converted is an integer, you use the PREC parameter to specify the position where the decimal point will be placed.
Example
The following table shows examples of the conversion of numeric values to a character string.
IN (value) 123 0 12345678 12345678 123 -123 -0.00123 -0.00123 -Inf
1)
IN (data type) UINT UINT UDINT UDINT INT INT REAL REAL REAL REAL REAL UDINT
P 16 16 16 16 16 16 16 16 16 16 16 16
SIZE 10 10 10 10 10 10 10 10 10 10 10 6
FORMAT (W#16#....) 0000 0000 0000 0001 0004 0004 0004 0006 -/-/-/-/-
PREC 0 2 3 3 0 0 4 4 4 4 4 3
OUT (STRING) xxxxxxx123 C xxxxxx0.00 C x12345.678 C x12345.678 C xxxxxx+123 C xxxxxx-123 C xxx-0.0012 C -1.2300E-3 C xxxxxx-INF C xxxxxx+INF C xxxxxxxNaN C xxxxxxxxxx C
ENO status 1 1 1 1 1 1 1 1 0 0 0 0
+Inf 2) NaN
3)
12345678
1)
"x" represents blanks -Inf: Floating-point number representing a negative infinite value. 2) +Inf: Floating-point number representing a positive infinite value. 3) NaN: Value returned as the result of invalid math operations.
1584
Parameter
The following table shows the parameters of the instruction "Strg_TO_Chars":
Parameter STRG PCHARS CHARS Declaration Input Input InOut Data type STRING DINT VARIANT Memory area D, L Description Source: Character string
I, Q, M, D, L or constant Position in the destination character string from which the characters will be written. D, L Destination: Field in which the characters will be copied. The characters are copied to a field of data type Array of CHAR or Array of BYTE. Number of copied characters.
CNT
Output
UINT
I, Q, M, D, L
For additional information on valid data types, refer to "Overview of the valid data types (Page 677)".
Parameter
The following table shows the parameters of the instruction "Chars_TO_Strg":
Parameter CHARS PCHARS Declaration Input Input Data type VARIANT DINT Memory area I, Q, M, D, L Description Source: Field from which the characters will be copied.
I, Q, M, D, L or constant Position in the field Array of CHAR / Array of BYTE from which the characters will be copied.
1585
I, Q, M, D, L or constant Number of characters to be copied. Use "0" to copy all characters. D, L Destination: Character string
For additional information on valid data types, refer to "Overview of the valid data types (Page 677)".
Parameters
The following table shows the parameters of the "ATH" instruction:
Parameter IN N RET_VAL OUT Declaration Input Input Return Output Data type VARIANT INT WORD VARIANT Memory area Description
I, Q, M, D, L or constant Pointer to ASCII character string I, Q, M, D, L or constant Number of ASCII characters to be converted I, Q, M, D, L I, Q, M, D, L Status of the instruction Hexadecimal number
For additional information on valid data types, refer to "Overview of the valid data types (Page 677)".
1586
Parameter RET_VAL
Error code (W#16#....) 0000 0007 8101 8182 8120 8151 8301 8382 8320 8351 No error Invalid character. Only the following ASCII characters may be used: Digits "0" to "9", upper case letters "A" to "F", lower case letters "a" to "f". Invalid pointer in the IN parameter, e.g., because a non-existing data block is referenced. Input buffer is too small for data in the N parameter. Invalid format in the IN parameter. Non-supported data type in the IN parameter. Invalid pointer in the OUT parameter, e.g., because a non-existing data block is referenced. Output buffer is too small for data in the N parameter. Invalid format in the OUT parameter. Non-supported data type in the OUT parameter. Description
1587
Example
The following table shows examples of the conversion of ASCII character strings to hexadecimal numbers:
IN '0123' '123AFx1a23' N 4 10 OUT 16#0123 16#123AF01a23 ENO status 1 0
Parameter
The following table shows the parameters of the "HTA" instruction:
Parameter IN N RET_VAL OUT Declaration Input Input Return Output Data type VARIANT INT WORD VARIANT Memory area Description
I, Q, M, D, L or constant Start address of the hexadecimal digits I, Q, M, D, L or constant Number of hexadecimal bytes to be converted I, Q, M, D, L I, Q, M, D, L Error message Address at which the result is stored.
For additional information on valid data types, refer to "Overview of the valid data types (Page 677)".
1588
Parameter RET_VAL
Error code (W#16#....) 0000 8101 8182 8120 8151 8301 8382 8320 8351 No error Invalid pointer in the IN parameter, e.g., because a non-existing data block is referenced. Input buffer is too small for data in the N parameter. Invalid format in the IN parameter. Non-supported data type in the IN parameter. Invalid pointer in the OUT parameter, e.g., because a non-existing data block is referenced. Output buffer is too small for data in the N parameter. Invalid format in the OUT parameter. Non-supported data type in the OUT parameter. Description
1589
Example
The following table shows examples of the conversion of hexadecimal numbers to ASCII character strings:
IN W#16#0123 16#123AF01023 N 2 4 OUT '0123' '123AF010' ENO status 1 0
Parameters
The following table shows the parameters of the "LEN" instruction:
Parameter IN OUT Declaration Input Return Data type STRING INT, DINT, REAL, LREAL Memory area D, L or constant I, Q, M, D, L Description Character string Number of valid characters
For additional information on valid data types, refer to "Overview of the valid data types (Page 677)".
1590
Parameters
The following table shows the parameters of the "CONCAT" instruction:
Parameter IN1 IN2 OUT Declaration Input Input Return Data type STRING STRING STRING Memory area D, L or constant D, L or constant D, L Description Character string Character string Resulting character string
For additional information on valid data types, refer to "Overview of the valid data types (Page 677)".
Parameters
The following table shows the parameters of the "LEFT" instruction:
Parameter IN L OUT Declaration Input Input Return Data type STRING BYTE, INT, SINT, USINT STRING Memory area D, L or constant I, Q, M, D, L or constant D, L Description Character string Number of characters to be extracted Extracted partial character string
For additional information on valid data types, refer to "Overview of the valid data types (Page 677)".
1591
Parameters
The following table shows the parameters of the "RIGHT" instruction:
Parameter IN L OUT Declaration Input Input Return Data type STRING BYTE, INT, SINT, USINT STRING Memory area D, L or constant I, Q, M, D, L or constant D, L Description Character string Number of characters to be extracted Extracted partial character string
For additional information on valid data types, refer to "Overview of the valid data types (Page 677)".
1592
Parameters
The following table shows the parameters of the "MID" instruction:
Parameter IN L P OUT Declaration Input Input Input Return Data type STRING BYTE, INT, SINT, USINT BYTE, INT, SINT, USINT STRING Memory area D, L or constant I, Q, M, D, L or constant I, Q, M, D, L or constant D, L Description Character string Length of the string to be extracted Position of the first character to be extracted (first character = 1) Extracted partial character string
For additional information on valid data types, refer to "Overview of the valid data types (Page 677)".
1593
Parameter
The following table shows the parameters of the "DELETE" instruction:
Parameter IN L P OUT Declaration Input Input Input Return Data type STRING BYTE, INT, SINT, USINT BYTE, INT, SINT, USINT STRING Memory area D, L or constant Description Character string
I, Q, M, D, L or constant Number of characters to be deleted I, Q, M, D, L or constant Position of first character to be deleted D, L Resulting character string
For additional information on valid data types, refer to "Overview of the valid data types (Page 677)".
Parameter
The following table shows the parameters of the "INSERT" instruction:
Parameter IN1 IN2 Declaration Input Input Data type STRING STRING Memory area D, L or constant D, L or constant Description Character string String to insert
1594
For additional information on valid data types, refer to "Overview of the valid data types (Page 677)".
Parameters
The following table shows the parameters of the "REPLACE" instruction:
Parameter IN1 IN2 L Declaration Input Input Input Data type STRING STRING BYTE, INT, SINT, USINT Memory area D, L or constant D, L or constant Description String with characters to be replaced. String with characters to be inserted.
1595
For additional information on valid data types, refer to "Overview of the valid data types (Page 677)".
Parameters
The following table shows the parameters of the "FIND" instruction:
Parameter IN1 IN2 OUT Declaration Input Input Return Data type STRING STRING, CHAR DINT, INT, LREAL, REAL Memory area D, L or constant D, L or constant (For CHAR also I, Q, M) I, Q, M, D, L Character position Description String searched through Characters to search for
For additional information on valid data types, refer to "Overview of the valid data types (Page 677)".
1596
9.8.3.3
Distributed I/O
Functional description
"RDREC" works asynchronously, that is, its execution extends over multiple calls. You start the data record transfer by calling "RDREC" with REQ = 1. The job status is displayed via output parameter BUSY and the two central bytes of output parameter STATUS. The two central bytes of STATUS correspond to the RET_VAL output parameter of the instructions that operate asynchronously. See also: Meaning of the parameters REQ, RET_VAL and BUSY with asynchronous instructions (Page 1136). The transfer of the data record is complete when the output parameter BUSY has the value FALSE .
1597
Parameter
The following table shows the parameters of the instruction "RDREC":
Parameter REQ ID Declaration Input Input Data type BOOL HW_IO (WORD) Memory area I, Q, M, D, L Description REQ = 1: Transfer data record
I, Q, M, L or constant Logical address of the DP slave/PROFINET IO component (module or sub-module) For an output module, bit 15 must be set. For a mixed module, the lower of the two addresses must be specified.
INDEX
Input
BYTE, DINT, INT, SINT, UINT, USINT, WORD BYTE, UINT, USINT BOOL BOOL BOOL DWORD UINT VARIANT
I, Q, M, D, L or constant
I, Q, M, D, L or constant I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L
maximum length in bytes of the data record information to be read New data record was received and is valid BUSY = 1: The reading process is not yet complete. ERROR = 1: An error occurred during the reading process. Block status or error information Length of the read data record information Destination area for the read data record
For additional information on valid data types, refer to "Overview of the valid data types (Page 677)". Note If you use "RDREC" to read a data record for PROFINET IO, then negative values in the INDEX, MLEN, and LEN parameters will be interpreted as an unsigned 16-bit integer.
Parameter STATUS
For interpretation of the STATUSparameter, see Parameter STATUS (Page 1603).
1598
Functional description
"WRREC" works asynchronously, that is, its execution extends over multiple calls. You start the data record transfer by calling WRREC with REQ = 1. The job status is displayed via the output parameter BUSY and the two central bytes of output parameter STATUS. The two central bytes of STATUS correspond to the RET_VAL output parameter of the instructions that operate asynchronously. See also: Meaning of the parameters REQ, RET_VAL and BUSY with asynchronous instructions (Page 1136). Note that you must assign the same value to the actual parameter of RECORD for all "WRREC" calls that belong to one and the same job. The same applies to the actual parameters of LEN. The transfer of the data record is complete when the output parameter BUSY has the value FALSE.
1599
Parameter
The following table shows the parameters of the instruction "WRREC":
Parameter REQ ID Declaration Input Input Data type BOOL HW_IO (WORD) Memory area I, Q, M, D, L Description REQ= 1: Transfer data record
I, Q, M, L or constant Logical address of the DP slave/PROFINET IO component (module or sub-module). For an output module, bit 15 must be set (for example, for address 5: ID:=DW#16#8005). For a mixed module, the lower of the two addresses must be specified. The logical address is converted automatically to DWORD data type. I, Q, M, D, L or constant Data record number
INDEX
Input
BYTE, DINT, INT, SINT, UINT, USINT, WORD BYTE, UINT, USINT BOOL BOOL BOOL DWORD
LEN
Input
I, Q, M, D, L or constant I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L
(hidden) Maximum length of the data record to be transferred in bytes Data record was transferred BUSY = 1: The writing process is not yet complete. ERROR = 1: An error occurred during the writing process. Block status or error information For interpretation of the STATUSparameter, see Parameter STATUS (Page 1603).
RECORD
InOut
VARIANT
I, Q, M, D, L
Data record
For additional information on valid data types, refer to "Overview of the valid data types (Page 677)". Note If you use "WRREC" to write a data record for PROFINET IO, negative values in the INDEX and LEN parameters will be interpreted as an unsigned 16-bit integer.
Parameter STATUS
For interpretation of the STATUSparameter, see Parameter STATUS (Page 1603).
1600
Calling RALRM
"RALRM" can be called in three operating modes (MODE parameter). These are explained in the table below.
MODE 0 1 2 RALRM ... ... shows the component that triggered the interrupt in the ID output parameter and writes TRUE in the NEW output parameter. ... writes all output parameters, independent of the interrupt triggering component. ... checks whether the component specified in the F_ID input parameter has triggered the interrupt. If not, NEW = FALSE If yes, NEW = TRUE and all other output parameters are written.
1601
Parameter
The following table shows the parameters of the instruction "RALRM":
Parameter MODE F_ID MLEN NEW STATUS (Page 1603) ID Declaration Input Input Input Output Output Output Data type BYTE, INT, SINT, USINT Memory area I, Q, M, D, L or constant Description Mode Logical start address of the component (module) from which interrupts will be received Maximum length of the interrupt information to be received, in bytes A new interrupt was received. Error code of the instruction or DP master
HW_IO (WORD) I, Q, M, L or constant Logical start address of the component (module) from which an interrupt was received Bit 15 contains the I/O ID: 0 = input address, 1 = output address.
LEN
Output
I, Q, M, D, L
InOut InOut
I, Q, M, D, L I, Q, M, D, L
Destination area for OB start and management information Destination area for header information and additional interrupt information For AINFO , you should provide a length of at least MLEN bytes.
For additional information on valid data types, refer to "Overview of the valid data types (Page 677)". Note If you select a destination area (Page 1616)TINFO or AINFO that is too short, RALRM cannot enter the full information.
1602
1603
A0 A1 A2 A3
B0
invalid index
B4 B5 B6 B7 B8
invalid area state conflict access denied invalid range invalid parameter
1604
C0
C2 C3 C4
Dx 81 00 to FF 00 82 : 88 00 to FF : 00 to FF 01 23 24
1605
89
00 to FF 01 23 24 32 3A
8A : 8F FE, FF
00 to FF : 00 to FF 00 to FF
1606
In a distributed configuration with PROFIBUS DP The DP master system ID (1-31) The station number (0-127).
In a distributed configuration with PROFINET IO: The last two positions in the PROFINET IO system ID (0-15). To obtain the complete PROFINET IO system ID, you must add 100 (decimal) to it. The station number (0-2047).
1607
24
BYTE
central: distributed:
0 Flags of the PROFIBUS DP master interface module/PROFINET IO controller master interface module Bit 0 = 0: Bit 0 = 1: Bit 1 to 7: Interrupt originating from an integrated interface module (PROFINET IO or PROFIBUS DP) Interrupt originating from an external interface module (PROFINET IO or PROFIBUS DP) Reserved
1608
Structure of the management information in bytes 26 to 27 with PROFIBUS and a central configuration
Byte no. for TINFO 26 and 27 Data type WORD WORD 28 and 29 30 and 31 WORD WORD Meaning central: distributed: 0 0 0 PROFIBUS ID number as unique identifier of the PROFIBUS DP slave (Bytes 28 and 29 can be omitted) (Bytes 30 and 31 can be omitted)
Parameter AINFO Data structure of the destination area AINFO with interrupts from PROFIBUS DP or central I/O devices
The information for PROFINET IO is provided below.
Byte 0 to 3 4 to 199 Meaning Header information, for exact description, see below Additional interrupt information: data for the respective interrupt: central: distributed: ARRAY[0] to ARRAY[195] ARRAY[0] to ARRAY[59]
1609
Structure of the header information with interrupts from PROFIBUS DP or central IO devices
Byte 0 Data type BYTE Meaning Length of the received interrupt information in bytes central: distributed: 1 BYTE central: distributed: 4 to 224 4 to 63 Reserved ID for the interrupt type 1: 2: 3: 4: 5: 6: 31 Diagnostics interrupt Process interrupt Removal interrupt Insertion interrupt Status interrupt Update Interrupt Failure of an expansion device, DP master system, or DP station 32 to 126: 2 3 BYTE BYTE central: distributed: Reserved Specifier Bits 0 and 1: 0: no further information; 1: Incoming event, faulty slot 2: Outgoing event, slot not faulty anymore 3: Outgoing event, slot still faulty Bit 2: Bits 3 to 7: Add_Ack Sequence number Manufacturer-specific interrupt Slot number of the component that triggered the interrupt
Data structure of the destination area AINFO with interrupts from PROFINET IO
Byte 0 to 25 26 to 1431 Meaning Header information, for exact description, see below Additional interrupt information: Standardized diagnostics data for the respective interrupt: ARRAY[0] to ARRAY[1405] Note: The additional interrupt information may also be omitted.
1610
1611
W#16#8000: Channel diagnostics Channel diagnostics is output in blocks of 6 bytes each. The additional interrupt information (without format identifier) is only output for disrupted channels.
Byte 0 to 1 Data type WORD Meaning Format identifier for the structure of the following data serving as additional interrupt information W#16#8000: Channel diagnostics 2 to 3 WORD Channel number of the component triggering the interrupt (range of values: 0 to 65535): W#16#0000 to W#16#7FFF: Channel number of the interface module/sub-module W#16#8000: The generic substitute for the entire sub-module W#16#8001 to W#16#FFFF: Reserved
1612
1613
Note The section from "channel number" to "type of error" can occur from 0 to n times.
W#16#8001
W#16#8001: MULTIPLE (different types of diagnostics information are transmitted) In this case, the additional interrupt information is transmitted as blocks of variable length.
Byte 0 to 1 2 to 3 4 to 5 6 7 8 to 11 12 to 13 14 to 15 16 to 17 18 to 19 20 to 21 Data type WORD WORD WORD BYTE BYTE DWORD WORD WORD WORD WORD WORD Meaning Format identifier for the structure of the following data serving as additional interrupt information W#16#8001: Manufacturer-specific diagnostics and/or channel diagnostics Block type Block length Version: high byte Version: low byte API (only if low byte of version = 1) Slot number Subslot number Channel number Channel properties Format identifier: W#16#0000 to W#16#7FFF: Manufacturer-specific diagnostics W#16#8000: Channel diagnostics W#16#8002: Extended channel diagnostics W#16#8003: Stepped extended channel diagnostics W#16#8004 to W#16#80FF: Reserved 22 to n BYTE Data depend on the format identifier
Note The section starting from "block type" can occur from 1 to n times.
W#16#8002
W#16#8002: Extended channel diagnostics
Byte 0 to 1 2 to 3 4 to 5 6 to 7 Meaning Format identifier W#16#8002 Channel number Channel properties Error type
1614
W#16#8003
W#16#8003: Stepped extended channel diagnostics
Byte 0 to 1 2 to 3 4 to 5 6 to 7 8 to 9 10 to 13 14 to 17 Meaning Format identifier W#16#8003 Channel number Channel properties Error type Additional error value Additional error information Qualified channel qualifier
W#16#8100
W#16#8100: Maintenance information
Byte 0 to 1 2 to 3 4 to 5 6 to 7 8 to 9 10 to 13 Meaning Format identifier W#16#8100 Block type Block length Block version Reserved Maintenance status
Note You can find more detailed information about the structure of the additional alarm information in the Programming Manual SIMATIC PROFINET IO from PROFIBUS DP to PROFINET IO and the current version of IEC 61158-6-10-1.
1615
Destination area TINFO and AINFO Destination area TINFO and AINFO
Depending on the respective OB in which "RALRM (Page 1601)" is called, the destination areas TINFO and AINFO are only partially written. Refer to the table below to find out which information is entered respectively.
Interrupt type OB TINFO OB status information Yes TINFO Management information Yes AINFO Header information Yes AINFO Additional interrupt information central: distributed: No as supplied by PROFIBUS DP slave/ PROFINET IO device Yes Yes Yes No Data record 1 as supplied by PROFIBUS DP slave/ PROFINET IO device No as supplied by PROFIBUS DP slave/ PROFINET IO device
Process interrupt
4x
Status interrupt Update interrupt Manufacturer-specific interrupt I/O redundancy error Diagnostics interrupt
55 56 57 70 82
Insert/remove interrupt
83
Yes
Yes
Yes
central: distributed:
83
Yes
Yes
Yes
PROFINET IO only
83 Special form of the insert module interrupt: Enabled by supervisor Unconfigured module inserted Rack failure/ station failure ... all other OBs 83 86
Yes
Yes
Yes
PROFINET IO only
Yes Yes No
Yes No No
PROFINET IO only No No
1616
1617
Parameters
The following table shows the parameters of the instruction "DPRD_DAT":
Parameter LADDR Declaration Input Data type Memory area Description Hardware identifier of the module which is to be read from. If you click on the block parameter LADDR, all addressable components, including hardware identifier are available in a drop-down list. If an error occurs while the instruction is being executed, the return value contains an error code. Target area for the user data that were read. It has to be at least as long as the inputs of the selected module. The BYTE, WORD and Array of BYTE / WORD data types are permitted. The data type STRING is not supported.
RET_VAL
Return
I, Q, M, D, L
RECORD
Output
I, Q, M, D, L
For additional information on valid data types, refer to "Overview of the valid data types (Page 677)".
Parameter RET_VAL
Note If you access DPV1 slaves, error information of these slaves can be forwarded from the DP master to the instruction. For a description of this error information, refer to Parameter STATUS (Page 1603)STATUS[3].
Explanation No error occurred. You have not configured a module for the specified hardware identifier or You have ignored the restriction concerning the length of consistent data, or you have not specified a hardware identifier as an address at parameter LADDR .
A type other than (Array of) BYTE / WORD is specified in the VARIANT reference. No DP module/PROFINET IO device from which you can read consistent data exists for the hardware identifier specified in LADDR . Access error detected while I/O devices were being accessed. Slave failure on external DP interface module. The length of the specified target area at parameter RECORD is shorter than the configured user data length. System error with external DP interface module. System error with external DP interface module.
1618
1619
Parameters
The following table shows the parameters of the instruction "DPWR_DAT":
Parameter LADDR Declaration Input Data type Memory area Description
HW_IO (WORD) I, Q, M, L or constant Configured hardware identifier from the PIQ area of the module to which the data is written. If you click on the block parameter LADDR, all addressable components, including hardware identifier are available in a drop-down list. VARIANT I, Q, M, D, L Source area for the user data to be written. It must be at least as long as what you have configured for the selected module. The BYTE, WORD and Array of BYTE / WORD data types are permitted. The data type STRING is not supported. If an error occurs while the instruction is being executed, the return value contains an error code.
RECORD
Input
RET_VAL
Return
I, Q, M, D, L
For additional information on valid data types, refer to "Overview of the valid data types (Page 677)".
Parameter RET_VAL
Note If you access DPV1 slaves, error information of these slaves can be forwarded from the DP master to the instruction. For a description of this error information, refer to Parameter STATUS (Page 1603)STATUS[3].
Explanation No error occurred. System error with external DP interface module. You have not configured a module for the specified hardware identifier or You have ignored the restriction concerning the length of consistent data, or you have not specified a hardware identifier at parameter LADDR .
1620
The data that has been read is entered in the destination area indicated by RECORD following error-free data transfer. You start the read process by assigning the value "1" to the REQ input parameter when the "DPNRM_DG" instruction is called.
1621
Functional description
The reading process is executed asynchronously, in other words, it can extend over several calls. The RET_VAL and BUSY output parameters indicate the status of the job. See also: Meaning of the parameters REQ, RET_VAL and BUSY with asynchronous instructions (Page 1136).
Parameters
The following table shows the parameters of the instruction "DPNRM_DG":
Parameter REQ LADDR Declaration Input Input Data type BOOL HW_DP SLAVE (WORD) Memory area I, Q, M, D, L or constant D, L or constant Description REQ=1: Read request Configured diagnostic address of the DP slave. Note: Address must be specified in hexadecimal form, for example, diagnostic address 1022 means: LADDR:=W#16#3FE. I, Q, M, D, L If an error occurs while the instruction is being executed, the return value contains an error code. If no error has occurred, the length of the data actually transferred is entered in RET_VAL . Destination area for the diagnostics data that were read. Only the BYTE data type is permitted. The minimum length of the data record to be read or the destination area is 6. The maximum length of the data record to be sent is 240. Standard slaves can provide more than 240 bytes of diagnostics data up to a maximum of 244 bytes. In this case, the first 240 bytes are transferred to the destination area and the overflow bit is set in the data. BUSY=1: The reading process is not yet complete.
RET_VAL
Return
RECORD
Output
VARIANT
I, Q, M, D, L
BUSY
Output
BOOL
I, Q, M, D, L
For additional information on valid data types, refer to "Overview of the valid data types (Page 677)".
Parameter RECORD
The CPU evaluates the actual length of the read diagnostics data: If the length specified for RECORD
1622
Parameter RET_VAL
If an error occurs while the function is being executed, the return value contains an error code. If no error occurs during the data transfer, RET_VAL contains the length of the data read in bytes as a positive number. Note The amount of data read in a DP slave depends on its diagnostics status. For the evaluation of the error information of the RET_VAL parameter, refer to the following table. The general error information of the instructions are described in the following section: Evaluating errors with output parameter RET_VAL (Page 1138).
Error code (W#16#...) 0000 7000 7001 7002 Explanation No error First call with REQ=1: Data transfer triggered; BUSY has the value "1". Intermediate call (REQ irrelevant): Data transfer already active; BUSY has the value "1". Restriction Distributed I/O Distributed I/O
First call with REQ=0: No data transfer active; BUSY has the value "0". -
1623
80B0
Instruction not possible for module type. The module does not recognize the data record. Data record number 241 not permitted. With "WR_REC (Page 1598)", data records 0 and 1 are not permitted.
The length specified in parameter RECORD is incorrect. The configured slot is not occupied. Actual module type does not match the specified module type in SDB1. There are no diagnostics data available. The data of the previous write job on the module for the same data record have not yet been processed by the module. The module is currently processing the maximum possible number of jobs for a CPU. The required resources (memory, etc.) are currently occupied. Internal temporary error. Job could not be carried out. Repeat the job. If this error occurs often, check your installation for sources of electrical interference.
Distributed I/O not available. Data record transfer stopped due to priority class abort (restart or background) General error information See also: Evaluating errors with output parameter RET_VAL (Page 1138)
See also
RDREC: Read data record (Page 1597)
1624
9.8.3.4
Interrupts
Parameters
The following table shows the parameters of the "ATTACH" instruction:
Parameter OB_NR EVENT ADD Declaration Input Input Input Data type OB_ATT (INT) EVENT_ATT (DWORD) BOOL Memory area Description
I, Q, M, D, L or constant Effects on previous assignments: ADD=0 (default): This event replaces all previous event assignments for this OB. ADD=1: This event is added to the previous event assignments for this OB.
RET_VAL
Return
INT
I, Q, M, D, L
For additional information on valid data types, refer to "Overview of the valid data types (Page 677)".
Parameter RET_VAL
Error code (W#16#....) 0 8090 8091 8093 No error OB does not exist OB is incorrect type Event does not exist Description
1625
Parameters
The following table shows the parameters of the "DETACH" instruction:
Parameter OB_NR EVENT RET_VAL Declaration Input Input Return Data type OB_ATT (INT) EVENT_ATT (DWORD) INT Memory area Description
I, Q, M, D, L or constant Organization block (numbers up to 32768 are supported.) D, L or constant I, Q, M, D, L Event Status of the instruction
For additional information on valid data types, refer to "Overview of the valid data types (Page 677)".
Parameter RET_VAL
Error code (W#16#....) 0 1 8090 8091 8093 No error No assignment exists (warning) OB does not exist OB has incorrect type Event does not exist Description
1626
Functional description
If a lower priority OB and a higher priority OB are called in the same time interval, the lower priority OB will only be called once the higher priority OB has been executed. The call time for the lower priority OB can be offset according to the length of time to execute the higher-priority OB.
If a phase offset is configured for the lower priority OB and the phase offset is greater than the current execution time of the respective higher priority OB, then the block will be called in a fixed time base.
1627
Parameters
The following table shows the parameters of the "SET_CINT" instruction:
Parameter OB_NR CYCLE PHASE RET_VAL Declaration Input Input Input Return Data type OB_CYCLIC UDINT UDINT INT Memory area Description
I, Q, M, D, L or constant OB number (<32768) I, Q, M, D, L or constant Time interval in microseconds I, Q, M, D, L or constant Phase offset I, Q, M, D, L Status of the instruction
For additional information on valid data types, refer to "Overview of the valid data types (Page 677)".
Parameter RET_VAL
Error code (W#16#....) 0 8090 8091 8092 80B2 No error OB does not exist or is of the wrong type Incorrect time interval Incorrect phase offset No event assigned to OB Description
1628
Parameters
The following table shows the parameters of the "QRY_CINT" instruction:
Parameter OB_NR Declaration Input Data type OB_CYCLIC (INT) UDINT UDINT WORD Memory area Description
I, Q, M, D, L or constant OB number (<32768) or symbolic addressing via the name of the OB (e.g. OB_MyOB) I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L Time interval in microseconds Phase offset Status of the cyclic interrupt: Bit 0 to bit 4: see parameter STATUS Other bits: Always "0"
RET_VAL
Return
INT
I, Q, M, D, L
For additional information on valid data types, refer to "Overview of the valid data types (Page 677)".
Parameter STATUS
Bit 0 1 2 3 4 Other bits Value 0 1 0 1 0 1 0 1 0 1 Meaning The CPU is in RUN mode. The CPU is in startup. The cyclic interrupt is enabled. The cyclic interrupt is delayed. The cyclic interrupt is not enabled or has expired. The cyclic interrupt is enabled. An OB with the specified number does not exist. An OB with the specified number exists. Always "0"
1629
Parameter RET_VAL
If an error occurs, the relevant error code will be displayed in the RET_VAL parameter and the STATUS parameter is set to "0".
Error code (W#16#....) 0 8090 80B2 No error OB does not exist or is of the wrong type No event assigned to OB Description
1630
Parameters
The following table shows the parameters of the "SET_TINTL" instruction:
Parameter OB_NR SDT Declaration Input Input Data type OB_TOD (INT) DTL Memory area I, Q, M, D, L or constant D Description Number of the OB started at time SDT+ multiple of PERIOD (OB 10 to OB 17). Start date and time-of-day. The seconds and milliseconds of the start time-of-day are ignored and set to "0". LOCAL = true: Use local time LOCAL = false: Use system time Period from starting point SDT onwards: W#16#0000 = once W#16#0201 = once every minute W#16#0401 = once hourly W#16#1001 = once daily W#16#1201 = once weekly W#16#1401 = once monthly W#16#1801 = once yearly W#16#2001 = at month's end ACTIVATE Input BOOL I, Q, M, D, L or constant I, Q, M, D, L ACTIVATE = true: Execute instruction ACTIVATE = false: Execute instruction only when "ACT_TINT (Page 1632)" is called If an error occurs during execution of the instruction, then the actual parameter of RET_VAL contains an error code.
LOCAL PERIOD
Input Input
BOOL WORD
I, Q, M, D, L or constant I, Q, M, D, L or constant
RET_VAL
Return
INT
For additional information on valid data types, refer to "Overview of the valid data types (Page 677)".
Parameter RET_VAL
Error code (W#16#...) 0000 8090 8091 8092 80A1 8xyy No error occurred. Incorrect parameter OB_NR Incorrect parameter SDT Incorrect parameter PERIOD The set start time is in the past. (This error code occurs only when PERIOD = W#16#0000.) General error information See also: Evaluating errors with output parameter RET_VAL (Page 1138) Description
1631
Parameters
The following table shows the parameters of the instruction "CAN_TINT":
Parameter OB_NR RET_VAL Declaration Input Return Data type OB_TOD (INT) INT Memory area D, L or constant I, Q, M, D, L Description Number of the OB whose start date and time-of-day are to be deleted. If an error occurs during execution of the instruction, the actual parameter of RET_VAL contains an error code.
For additional information on valid data types, refer to "Overview of the valid data types (Page 677)".
Parameter RET_VAL
Error code (W#16#...) 0000 8090 80A0 8xyy No error occurred. Incorrect parameter OB_NR No start date/time specified for the time-of-day interrupt OB General error information See also: Evaluating errors with output parameter RET_VAL (Page 1138) Description
1632
Parameters
The following table shows the parameters of the instruction "ACT_TINT":
Parameter OB_NR RET_VAL Declaration Input Return Data type OB_TOD (INT) INT Memory area I, Q, M, D, L or constant I, Q, M, D, L Description Number of the OB to be activated. If an error occurs during execution of the instruction, the actual parameter of RET_VAL contains an error code.
For additional information on valid data types, refer to "Overview of the valid data types (Page 677)".
Parameter RET_VAL
Error code (W#16#...) 0000 8090 80A0 80A1 8xyy No error occurred. Incorrect parameter OB_NR Start date and time-of day not set for the relevant time-of-day interrupt OB. The activated time lies in the past; error occurs for execution "once". General error information See also: Evaluating errors with output parameter RET_VAL (Page 1138) Description
1633
Parameters
The following table shows the parameters of the instruction "QRY_TINT":
Parameter OB_NR RET_VAL Declaration Input Return Data type OB_TOD (INT) INT Memory area Description
I, Q, M, D, L or constant Number of the OB that will be queried for status (OB 10 to OB 17). I, Q, M, D, L If an error occurs during execution of the instruction, then the actual parameter of RET_VAL contains an error code. Status of the time-of-day interrupt; see following table.
STATUS
Output
WORD
I, Q, M, D, L
For additional information on valid data types, refer to "Overview of the valid data types (Page 677)".
Parameter STATUS
If an error occurs (see RET_VAL parameter), "0" is output in the STATUS parameter.
Bit 0 1 2 4 6 Other Value 0 1 0 1 0 1 0 1 0 1 Meaning In Run. During startup. The time-of-day interrupt is enabled. The time-of-day interrupt is disabled. Time-of-day interrupt is not activated or has elapsed. The time-of-day interrupt is activated. An OB with an OB number as specified at OB_NR parameter does not exist. An OB with an OB number as specified at OB_NR parameter does exist. Base for the time-of-day interrupt is the basic time Base for the time-of-day interrupt is the local time Always "0"
Parameter RET_VAL
Error code (W#16#...) 0000 8090 8xyy No error occurred. Incorrect parameter OB_NR General error information See also: Evaluating errors with output parameter RET_VAL (Page 1138) Description
1634
1635
The operating system generates a time error (calls OB 80). If OB 80 does not exist, the CPU changes to STOP.
Starting in a startup OB
A time-delay interrupt can be started in a startup OB. Two conditions must be satisfied to call the time-delay OB: The delay time must have elapsed. The CPU must be in the RUN mode. If the delay time has elapsed and the CPU is not yet in the RUN mode, the time-delay interrupt OB call is delayed until the CPU is in RUN mode. The time-delay interrupt OB is then called before the first instruction in OB Main [OB 1] is executed.
Accuracy
The maximum time between the "SRT_DINT" instruction call and the start of the time-delay interrupt OB is one millisecond less than the assigned delay time, provided that no interruption events delay the call.
1636
Parameters
The following table shows the parameters of the "SRT_DINT" instruction:
Parameter OB_NR DTIME Declaration Input Input Data type OB_DELAY (INT) TIME Memory area D, L or constant Description Number of the OB to be executed after a delay time You can realize longer times, for example, by using a counter in a time-delay interrupt OB. SIGN Input WORD I, Q, M, D, L or constant Note: You must assign a value to this parameter upon call. However, the value has no significance. I, Q, M, D, L Status of the instruction
RET_VAL
Return
INT
For additional information on valid data types, refer to "Overview of the valid data types (Page 677)".
Parameter RET_VAL
Error code (W#16#...) 0000 8090 8091 8xyy No error Incorrect OB_NR parameter Incorrect DTIME parameter General error information See also: Evaluating errors with output parameter RET_VAL (Page 1138) Description
1637
Parameters
The following table shows the parameters of the "CAN_DINT" instruction:
Parameter OB_NR RET_VAL Declaration Input Return Data type OB_DELAY (INT) INT Memory area Description
I, Q, M, D, L or constant Number of the OB whose call will be canceled I, Q, M, D, L Status of the instruction
For additional information on valid data types, refer to "Overview of the valid data types (Page 677)".
Parameter RET_VAL
Error code (W#16#...) 0000 8090 No error Incorrect OB_NR parameter Description
Parameters
The following table shows the parameters of the instruction "QRY_DINT":
Parameter OB_NR RET_VAL Declaration Input Return Data type OB_DELAY (INT) INT Memory area D, L or constant I, Q, M, D, L Description Number of the OB whose status is to be queried. If an error occurs during execution of the instruction, the actual parameter of RET_VAL contains an error code. The value "0" is displayed in the STATUS parameter. Status of the time-delay interrupt, see following table.
STATUS
Output
WORD
I, Q, M, D, L
For additional information on valid data types, refer to "Overview of the valid data types (Page 677)".
1638
Parameter STATUS
Bit 0 1 2 3 4 Other bits Value 0 1 0 1 0 1 0 1 Meaning Operating system in RUN Operating system in startup Time-delay interrupt is enabled by the operating system. Time-delay interrupt is disabled. Time-delay interrupt is not activated or has elapsed. Time-delay interrupt is activated. Time-delay interrupt OB with the specified number does not exist. Time-delay interrupt OB with the specified number exists. Always "0"
Parameter RET_VAL
Error code (W#16#...) 0000 8090 8xyy No error occurred. Incorrect information in the OB_NR parameter General error information See also: Evaluating errors with output parameter RET_VAL (Page 1138) Description
Asynchronous error event DIS_AIRT: Delay execution of higher priority interrupts and asynchronous error events Description
You use "DIS_AIRT" to delay the processing of interrupt OBs whose priority are higher than the priority of the current organization block. You can call "DIS_AIRT" multiple times in an organization block. The "DIS_AIRT" calls are counted by the operating system. Processing is delayed more and more each time "DIS_AIRT" is executed. To cancel a delay, you must execute the "EN_AIRT (Page 1640)" instruction. To cancel all delays, the number of "EN_AIRT (Page 1640)" executions must be equal to the number of "DIS_AIRT" calls. You can query the number of delays in the RET_VAL parameter of the "DIS_AIRT" instruction. If the value in the RET_VAL parameter is "0", there are no delays.
1639
Parameters
The following table shows the parameters of the "DIS_AIRT" instruction:
Parameter RET_VAL Declaration Return Data type INT Memory area I, Q, M, D, L Description Number of delays
For additional information on valid data types, refer to "Overview of the valid data types (Page 677)".
EN_AIRT: Enable execution of higher priority interrupts and asynchronous error events Description
You use "EN_AIRT" to enable processing of organization blocks when interrupts occur that have been delayed by the "DIS_AIRT (Page 1639)" instruction. When "EN_AIRT" is executed, you cancel a processing delay that was registered by the operating system when "DIS_AIRT (Page 1639)" was called. To cancel all delays, the number of "EN_AIRT" executions must be equal to the number of "DIS_AIRT (Page 1639)" calls. If, for example, you have called "DIS_AIRT (Page 1639)" five times and thereby also delayed the processing five times, you must call the "EN_AIRT" instruction five times in order to cancel all five delays. You can query the number of interrupt delays that have not yet been enabled after the execution of "EN_AIRT" in the RET_VAL parameter of the "EN_AIRT" instruction. The value "0" in the RET_VAL parameter means that all delays enabled by "DIS_AIRT (Page 1639)" have been cancelled.
Parameters
The following table shows the parameters of the "EN_AIRT" instruction:
Parameter RET_VAL Declaration Return Data type INT Memory area I, Q, M, D, L Description Number of configured delays
For additional information on valid data types, refer to "Overview of the valid data types (Page 677)".
1640
9.8.3.5
Diagnostics
Parameters
The following table shows the parameters of the "LED" instruction:
Parameter LADDR Declaration Input Data type HW_IO Memory area I, Q, M, L or constant Description Identification number of the CPU or interface. The number is automatically assigned and stored in the CPU properties or the interface in the hardware configuration. Identification number of the LED: 1: STOP/RUN 2: ERROR 3: MAINT (maintenance) 4: Redundant 5: Link (green) 6: Rx/Tx (yellow) RET_VAL Return INT I, Q, M, D, L Status of LED
LED
Input
UINT
I, Q, M, D, L or constant
For additional information on valid data types, refer to "Overview of the valid data types (Page 677)".
1641
Parameter RET_VAL
RET_VAL 0 to 9 Description LED status: 0 = LED does not exist 1 = Permanently switched off 2 = Color 1 (e.g., for LED STOP/RUN: green) permanently ON 3 = Color 2 (e.g., for LED STOP/RUN: orange) permanently ON 4 = Color 1 flashing at 2 Hz 5 = Color 2 flashing at 2 Hz 6 = Colors 1 and 2 flashing alternately at 2 Hz 7 = LED is active, color 1 8 = LED is active, color 2 9 = LED exists, but status information not available 8091 8092 8093 80Bx Module addressed with the LADDR parameter does not exist. A module that does not support LEDs was addressed with the LADDR parameter. The identification number specified in the LED parameter is not defined. The CPU specified in the LADDR parameter does not support the "LED" instruction.
Parameters
The following table shows the parameters of the "DeviceStates" instruction:
Parameter LADDR MODE Declaration Input Input Data type HW_ IOSYSTEM UINT Memory area I, Q, M, L or constant Description Identification number of the IO system
1642
For additional information on valid data types, refer to "Overview of the valid data types (Page 677)".
Parameter MODE
With the MODE parameter, you select which status information is to be output based on the following numbers.
MODE 1 2 3 4 5 Description Configuration of module/device is active or not yet complete Module defective Module disabled Module exists There is a problem in the module.
Parameter STATE
With the STATE parameter, the status of the modules selected with the MODE parameter is output. The status information is output as a bit character string. The length of the bit character string depends on the I/O system: For PROFIBUS-DP the length of the character string is 128 bits. For PROFINET-IO the length of the character string is 1024 bits. If the status selected using MODE applies to a module, the corresponding bit of the module is set to "1". For example, if an error has occurred in the third module, the third bit is set to "1". The "0" bit of the bit character string summarizes the status information for all modules of an I/O system: Bit 0 = 0: No errors have occurred in any module/all bits of the bit character string are set to "0". Bit 0 = 1: An error has occurred in at least one module/at least one bit of the bit character string was set to "1".
1643
Parameter RET_VAL
Error code (W#16#...) 0 8091 8092 80Bx 8452 No error LADDR does not exist LADDR does not address an IO system The module specified in the "LADDR " parameter does not support the "DeviceStates" instruction. The complete status information does not fit in the tag configured in the STATE parameter. The result is only output up to the byte length of the tag used. Description
Parameters
The following table shows the parameters of the "ModuleStates" instruction:
Parameter LADDR MODE RET_VAL STATE Declaration Input Input Return InOut Data type HW_DEVICE UINT INT VARIANT Memory area I, Q, M, L or constant I, Q, M, D, L or constant I, Q, M, D, L I, Q, M, D, L Description Identification number of the module Selection of status information to be read Status of the instruction Buffer for the status of the module
For additional information on valid data types, refer to "Overview of the valid data types (Page 677)".
1644
Parameter MODE
With the MODE parameter, you select which status information is to be output based on the following numbers.
MODE 1 2 3 4 5 Description Configuration of module is active or not yet complete Module defective Module disabled Module exists There is a problem in the module.
Parameter STATE
Any bit string (BOOL, BYTE, WORD) or an Array of a bit string can be used as a data type (e.g. Array of BYTE). The length of the bit string depends on the device you use. The maximum length is 128 bit. If the status selected using MODE applies to a module, the corresponding bit of the module sub-module is set to "1". For example, if an error has occurred for the submodule in the third slot of the module, the third bit is set to "1". The "0" bit of the bit character string summarizes the status information for all devices: Bit 0 = 0: An error did not occur for any module. All the bits of the bit character string are set to "0". Bit 0 = 1: An error occurred for at least one sub-module of the module. At least one bit of the bit character string was set to "1".
Parameter RET_VAL
Error code (W#16#...) 0 8091 8092 80Bx 8452 No error LADDR does not exist LADDR does not address an IO module The module specified in the "LADDR" parameter does not support the "ModuleStates" instruction. The complete status information does not fit in the tag configured in the STATE parameter. The result is only output up to the bit length of the tag used. Description
1645
Parameters
The following table shows the parameters of the "GET_DIAG" instruction:
Parameter MODE LADDR CHANNEL RET_VAL CNT_DIAG DIAG Declaration Input Input Input Return Output InOut Data type UINT HW_ANY (WORD) UINT INT UINT VARIANT Memory area Description
I, Q, M, D, L or constant Use the MODE parameter to select which diagnostic data is to be output. I, Q, M, L or constant Hardware ID of the device.
I, Q, M, D, L or constant Channel number I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L Status of the instruction Number of output diagnostic details Pointer to data area for storage of diagnostic information of the selected mode. Pointer to data area for storage of diagnostic details in accordance with the selected mode.
DETAILS
InOut
VARIANT
I, Q, M, D, L
For additional information on valid data types, refer to "Overview of the valid data types (Page 677)".
Parameter MODE
Depending on the value at the MODE parameter, different diagnostics data is output at the DIAG, CNT_DIAG and DETAILS output parameters.
MODE 0 Description Output of all supported diagnostic information for a module as DWORD, where Bit X=1 indicates that mode X is supported. Output of the inherent status of the addressed hardware object. DIAG Bit string of the supported modes as DWORD, where Bit X=1 indicates that mode X is supported. Diagnostics status. Output of the inherent status of the addressed hardware object in accordance with the DIS structure. Diagnostics status. Output in accordance with the DIS structure. 1 Module status information in accordance with the DiagnosticsDetails structure. Status of the channels (DiagnosticsDetails). CNT_DIAG 0 DETAILS -
Output of the status of all subordinate modules of the addressed hardware object.
Output of the I/O status of the addressed hardware object. Output of the I/O status of all subordinate modules of the addressed hardware object.
Diagnostics status. Output in accordance with the DIS structure. Output of diagnostics data in accordance with the DNN structure
1646
DIS structure
With parameter MODE = 1 to 3, the diagnostics information is output in accordance with the DIS structure. The following table shows the meaning of the individual parameter values.
Parameter OwnState Data type UINT16 Value Enum 0 1 2 3 4 5 6 7 MaintenanceState DWORD Enum 0 1 2 3 4 5 6 7 8 9 10 IO State UINT16 Bit array 0 1 2 3 4 5 6 7 8 to 15 No maintenance required The module or device is disabled. Maintenance required Maintenance demanded Error Status unknown / error in subordinate module Inputs/outputs are not available. I/O status of the module Bit 0 = 1: No maintenance required Bit 1 = 1: The module or device is disabled. Bit 2 = 1: Maintenance required Bit 3 = 1: Maintenance demanded Bit 4 = 1: Error Bit 5 = 1: The module or the device cannot be reached from the CPU (valid for modules and devices below a CPU). Inputs/outputs are not available. Qualifier; bit 7 = 1, if bit 0, 2, or 3 are set Reserved (always = 0) Description The value of the parameter Ownstate describes the maintenance status of the module. No fault The module or device is disabled. Maintenance required Maintenance demanded Error The module or the device cannot be reached from the CPU (valid for modules and devices below a CPU). Inputs/outputs are not available. -
1647
1648
DiagnosticsDetail structure
With parameter MODE = 2 or 3, the diagnostics information details are output in accordance with the DiagnosticsDetail structure. The following table shows the meaning of the individual parameter values.
Parameter ChannelNumber Properties ALID Qualifier ErrorType ExtErrorType AddValue_1 AddValue_2 AddValue_3 AddValue_4 Data type UInt Word UInt DWord UDInt UDInt UInt UInt UInt UInt Identification ID of alarm Qualifier of diagnostic data Channel error type Extended channel error type Additional value Additional value Additional value Additional value Description Channel number
1649
DNN structure
With parameter MODE = 4, the diagnostics information details are output in accordance with the DNN structure. The following table shows the meaning of the individual parameter values.
Parameter SubordinateState SubordinateIOState DNNmode Data type UINT WORD WORD Value Enum Bitarray Bitarray Description Status of the subordinate module (see parameter OwnState of the DIS structure) Status of the inputs and outputs of the subordinate module (see parameter IO State of the DIS structure) Bit 0 = 0: Diagnostics enabled Bit 0 = 1: Diagnostics disabled Bit 1 to 15: Reserved
Parameter RET_VAL
Error code (W#16#...) 0 n 8080 8081 8082 8090 8091 80C1 No error The data area in the DETAILS parameter is too small. Not all details of the diagnostic data can be output. Value in the MODE parameter is not supported. Type in the DIAG parameter is not supported with the selected mode (parameter MODE). Type in the DETAILS parameter is not supported with the selected mode (parameter MODE). LADDR does not exist The selected channel in the CHANNEL parameter does not exist. Insufficient resources for parallel execution. Description
9.8.3.6
Pulse
1650
Parameters
The following table shows the parameters of the "CTRL_PWM" instruction:
Parameter PWM ENABLE BUSY STATUS Declaration Input Input Output Output Data type HW_PWM BOOL BOOL WORD Memory area I, Q, M, D, L or constant I, Q, M, D, L I, Q, M, D, L Description The pulse output is enabled when ENABLE = TRUE and disabled when ENABLE = FALSE. Processing status Status of the instruction
For additional information on valid data types, refer to "Overview of the valid data types (Page 677)".
Parameter STATUS
Error code (W#16#...) 0 80A1 Description No error Hardware ID of the pulse generator is invalid
1651
9.8.3.7
Data logging
Data log files can be copied to the PC as follows: If the PROFINET interface is connected to the PC, you use a Web browser to access the data logs via the Web server. The CPU can be in RUN or STOP mode for this. If the CPU is in "RUN" mode, the program continues running while the Web server is transferring data. If there is a memory card in the S7-1200 CPU, you can remove this card and insert it into a standard slot for SD (Secure Digital) cards or MMC (MulitMediaCard) cards on a PC. Use File Manager to transfer the data log files from the memory card to the PC. The CPU goes to "STOP" when you remove the memory card.
1652
1653
Parameter
The following table shows the parameters of the "DataLogCreate" instruction:
Parameter REQ RECORDS FORMAT Declaration Input Input Input Data type BOOL UDInt UInt Memory area I, Q, M, L, D or constant I, Q, M, L, D or constant I, Q, M, L, D or constant I, Q, M, L, D or constant Description Execution of instruction on a rising edge. Number of data records in the data log Data format: 0: Internal (not supported) 1: CSV (Comma separated values) TIMESTAMP Input UInt Time stamp: 0: No time stamp 1: Date and time With the time stamp, an additional header is not required for the data log. NAME InOut VARIANT I, Q, M, L, D or constant Name of the data log. The specified name is also used as a file name for the csv file. The restrictions for Windows file names apply when assigning the name. The following characters must not be used: "\", "/", ":", "*", "?", "<", ">", "|", "space" ID InOut DWORD I, Q, M, L, D Object ID of the data log (output only). The ID of the data log is required for the additional data logging instructions. Header of the CSV file Data buffer for a data log data record. The instruction was executed successfully. Creation of the data log is not yet complete. 0: No error. 1: An error occurred during execution of the instruction. Detailed information is output via the STATUS parameter. STATUS Output WORD I, Q, M, L, D Status parameter The parameter is only set for the duration of one call. To display the status, you should copy the STATUS parameter to a free data area.
I, Q, M, L, D I, Q, M, L, D I, Q, M, L, D I, Q, M, L, D I, Q, M, L, D
For additional information on valid data types, refer to "Overview of the valid data types (Page 677)".
STEP 7 Basic V11.0 SP2 System Manual, 12/2011,
1654
Parameter HEADER
The HEADER parameter is a VARIANT pointer to a data block that defines a header for the CSV file (header). The header is always the first line in the CSV file representation. When a header is created, the individual columns must each be separated by a comma. ASTRING, Array of BYTE, or Array of CHAR data type can be used for the individual column names. When the Array [...] of type data type is used, a longer character string is possible than when the STRING data type is used. When the STRING data type is used, the length is limited to 254 bytes. If no header is to be created, do not specify a value in the HEADER parameter.
Parameter DATA
The DATA parameter is a VARIANT pointer to a structure or an array in a data block. An element of a structure or an array corresponds to a column in the data log with a specific data type. Note the following when creating the data block: The number of columns must correspond to the number of columns defined in the HEADER parameter. If the STRUCT data type is used, structure nestings (STRUCT in STRUCT) may not be used. Arrays (only 1-dimensional) can be configured as a single element or as a structure component. Each element in the array generates a separate column in the data log. The tags of the data block can be set as retentive or non-retentive tags. However, the retentive setting must be the same for all tags of the data block.
Parameter STATUS
Error code (W#16#...) 0 7000 7001 7002 8070 8090 8093 8097 80B3 80B4 80C1 8453 8553 8B51 No error. No job processing active. Start of the job processing. Parameter BUSY = 1, DONE = 0 Intermediate call (REQ irrelevant): Instruction already active; BUSY has the value "1". Complete internal instance memory is assigned. Illegal file name (see description of the NAME parameter). Data log already exists. File length exceeds the file system limit. Load memory not sufficient. The memory card is write-protected. Too many files open. Invalid format selection. Invalid time stamp. Invalid data type at the HEADER parameter. Description
1655
Parameters
The following table shows the parameters of the "DataLogOpen" instruction:
Parameter REQ MODE Declaration Input Input Data type BOOL UInt Memory area I, Q, M, L, D or constant I, Q, M, L, D or constant Description Execution of instruction on a rising edge. Mode for opening the data log: MODE= "0" Retain data records of the data log MODE= "1" Data records of the data log are deleted, but the header is retained NAME ID DONE BUSY InOut InOut Output Output String DWORD BOOL BOOL I, Q, M, L, D or constant I, Q, M, L, D I, Q, M, L, D I, Q, M, L, D (File) name of the data log. Object ID of the data log. Instruction was executed successfully. Execution of instruction not yet complete.
1656
For additional information on valid data types, refer to "Overview of the valid data types (Page 677)".
Parameter STATUS
Error code (W#16#...) 0 2 7000 7001 7002 8070 8090 8091 8092 80B4 80C0 Description No error. Warning: Data log file was already opened by this application. No job processing active. Start of the job processing. Parameter BUSY = 1, DONE = 0 Intermediate call (REQ irrelevant): Instruction already active; BUSY has the value "1". Complete internal instance memory is assigned. There are inconsistencies between the data log definition and existing data log data. A different data type than String was used at the NAME parameter. Data log does not exist. The memory card is write-protected. The data log file is locked.
1657
Parameters
The following table shows the parameters of the "DataLogWrite" instruction:
Parameter REQ ID DONE BUSY ERROR Declaration Input InOut Output Output Output Data type BOOL DWORD BOOL BOOL BOOL Memory area I, Q, M, L, D or constant I, Q, M, L, D I, Q, M, L, D I, Q, M, L, D I, Q, M, L, D Description Execution of instruction on a rising edge. Object ID of the data log Instruction was executed successfully. Execution of the instruction not yet complete. 0: No error. 1: An error occurred during execution of the instruction. Detailed information is output via the STATUS parameter. STATUS Output WORD I, Q, M, L, D Status parameter The parameter is only set for the duration of one call. To display the status, you should copy the STATUS parameter to a free data area.
For additional information on valid data types, refer to "Overview of the valid data types (Page 677)".
Parameter STATUS
Error code (W#16#...) 0 0001 7000 7001 7002 No error Last possible data record created at the end of the file. Creation of another data record will overwrite an older data record. No job processing active. Start of the job processing. Parameter BUSY = 1, DONE = 0 Intermediate call (REQ irrelevant): Instruction already active; BUSY has the value "1". Description
1658
Parameters
The following table shows the parameters of the "DataLogClose" instruction:
Parameter REQ ID DONE BUSY ERROR Declaration Input InOut Output Output Output Data type BOOL DWORD BOOL BOOL BOOL Memory area I, Q, M, L, D or constant I, Q, M, L, D I, Q, M, L, D I, Q, M, L, D I, Q, M, L, D Description Execute function on a rising edge. Object ID of the data log Instruction was executed successfully. Execution of the instruction not yet complete. 0: No error. 1: An error occurred during execution of the instruction. Detailed information is output via the STATUS parameter. STATUS Output WORD I, Q, M, L, D Status parameter The parameter is only set for the duration of one call. To display the status, you should copy the STATUS parameter to a free data area.
For additional information on valid data types, refer to "Overview of the valid data types (Page 677)".
1659
Parameter STATUS
Error code (W#16#...) 0 1 7000 7001 7002 8092 No error Data log not open No job processing active. Start of the job processing. Parameter BUSY = 1, DONE = 0 Intermediate call (REQ irrelevant): Instruction already active; BUSY has the value "1". Data log does not exist. Description
Parameter
The following table shows the parameters of the "DataLogNewFile" instruction:
Parameter REQ RECORDS NAME ID Declaration Input Input InOut InOut Data type BOOL UDInt VARIANT DWORD Memory area I, Q, M, L, D or constant I, Q, M, L, D or constant I, Q, M, L, D or constant I, Q, M, L, D Description Execution of instruction on a rising edge. Number of data records in the data log. File name of the new data log. Object ID of the data log In: ID of the existing data log Out: ID of the new data log DONE BUSY Output Output BOOL BOOL I, Q, M, L, D I, Q, M, L, D Instruction was executed successfully. Execution of the instruction not yet complete.
1660
For additional information on valid data types, refer to "Overview of the valid data types (Page 677)".
Parameter STATUS
Error code (W#16#...) 0 7000 7001 7002 8070 8090 8091 8092 8093 8097 80B3 80B4 80C1 No error. No job processing active. Start of the job processing. Parameter BUSY = 1, DONE = 0 Intermediate call (REQ irrelevant): Instruction already active; BUSY has the value "1". Complete internal instance memory is assigned. Invalid file name. Path does not exist. Source data log does not exist. New data log already exists. File length exceeds the file system limit. Load memory not sufficient. The memory card is write-protected. Too many files open. Description
9.8.3.8
1661
Functional description
The "READ_DBL" instruction works asynchronously, that is, its execution extends over multiple calls. You start the job by calling "READ_DBL" with REQ = 1. The RET_VAL and BUSY output parameters indicate the status of the job. See also: Meaning of the parameters REQ, RET_VAL and BUSY with asynchronous instructions (Page 1136)
Parameter
The following table shows the parameters of the instruction "READ_DBL":
Parameter REQ SRCBLK RET_VAL BUSY DSTBLK Declaration Input Input Return Output Output Data type BOOL VARIANT INT BOOL VARIANT Memory area I, Q, M, D, L or constant D I, Q, M, D, L I, Q, M, D, L D Description REQ = 1: Read request Pointer to data block in the load memory that is to be read from Error information BUSY = 1: The reading process is not yet complete. Pointer to the data block in the work memory that is to be written to
For additional information on valid data types, refer to "Overview of the valid data types (Page 677)".
1662
Parameter RET_VAL
Error code (W#16#...) 0000 0081 7000 7001 7002 8051 8081 8093 80B1 80B4 80C3 8251 82B1 82C0 8551 85B1 85C0 8xyy No error The destination area is larger than the source area. The source area is written completely to the destination area; the remaining bytes of the destination area will not be changed. First call with REQ=0: No data transfer active; BUSY has the value "0". First call with REQ=1: Data transfer triggered; BUSY has the value "1". Intermediate call (REQ irrelevant): Data transfer already active; BUSY has the value "1". Data block type error. The source area is larger than the destination area. The destination area is fully written. The remaining bytes of the source area are ignored. No data block or a data block that is not in the work memory is specified for the DSTBLK parameter. No data block is specified for the SRCBLK parameter, or the data block specified there is not a load memory object. DB with F-attribute must not be read. The maximum number of simultaneously active "READ_DBL" instructions has already been reached. Source DB of incorrect type. Source DB not specified or does not exist. The source DB is currently being processed by another instruction or a different communication function. Destination DB of incorrect type. Destination DB not specified or does not exist. The destination DB is currently being processed by another instruction or a communication function. General error codes See also: Evaluating errors with output parameter RET_VAL (Page 1138) Description
1663
Functional description
The "WRIT_DBL" instruction works asynchronously, that is, its execution extends over multiple calls. You start the job by calling "WRIT_DBL" with REQ =1. The RET_VAL and BUSY output parameters indicate the status of the job. See also: Meaning of the parameters REQ, RET_VAL and BUSY with asynchronous instructions (Page 1136).
Parameter
The following table shows the parameters of the instruction "WRIT_DBL":
Parameter REQ SRCBLK RET_VAL BUSY DSTBLK Declaration Input Input Return Output Output Data type BOOL VARIANT INT BOOL VARIANT Memory area I, Q, M, D, L or constant D I, Q, M, D, L I, Q, M, D, L D Description REQ = 1: Write request Pointer to the DB in the work memory that is to be read from Error information BUSY= 1: The writing process is not yet complete. Pointer to the data block in the load memory that is to be written to
For additional information on valid data types, refer to "Overview of the valid data types (Page 677)".
Parameter RET_VAL
Error code (W#16#...) 0000 0081 7000 No error The destination area is greater than the source area. The source area is written completely to the destination area; the remaining bytes of the destination area will not be changed. First call with REQ=0: No data transfer active; BUSY has the value "0". Description
1664
9.8.4
9.8.4.1
Technology
PID Control
Call
PID_Compact is called in the constant interval of the cycle time of the calling OB (preferably in a cyclic interrupt OB).
1665
Startup
At the startup of the CPU, PID_Compact starts in the operating mode that was last active. To retain PID_ Compact in "Inactive" mode, set sb_RunModeByStartup = FALSE.
1666
PID algorithm
PID_Compact is a PIDT1 controller with anti-windup and weighting of the proportional and derivative actions. The following equation is used to calculate the output value.
y = Kp
Symbol y Kp s b w x TI a c
[ (b w - x) + T s
I
(w - x) +
TD s a TD s + 1
(c w - x)
Description Output value Proportional gain Laplace operator Proportional action weighting Setpoint Process value Integral action time Derivative delay coefficient (T1 = a TD) Derivative action time Derivative action weighting
1667
Reaction to errors
If errors occur, they are output in parameter Error, and PID_Compact changes to "Inactive" mode. Reset the errors using the Reset parameter.
See also
Controller type (Page 2724)
1668
1669
sb_EnCyclEstimation sb_EnCyclMonitoring
BOOL BOOL
TRUE TRUE
sb_RunModeByStartup
BOOL
TRUE
sBackUp.r_Gain
REAL
1.0
1670
1671
sPid_Cmpt.b_LoadBackUp
BOOL
FALSE
sPid_Cmpt.b_InvCtrl
BOOL
FALSE
1672
1673
Note Edit the variables listed in this table in "Inactive" mode to avoid malfunction of the PID controller. The "Inactive" mode is forced by setting variable "sRet.i_Mode" to "0".
1674
Meaning of values
State / sRet.i_Mode 0 Description of the operating mode Inactive The controller is switched off. The controller was in "inactive" mode before pretuning was performed. The PID controller will change to "inactive" mode when running if an error occurs or if the "Deactivate controller" icon is clicked in the commissioning window. 1 Pretuning The pretuning determines the process response to a jump of the output value and searches for the point of inflection. The optimized PID parameters are calculated as a function of the maximum rate of rise and dead time of the controlled system. Pretuning requirements: The controller is in inactive mode or manual mode ManualEnable = FALSE The process value must not be too close to the setpoint. |Setpoint - Input| > 0.3 * |sPid_Cmpt.r_Pv_Hlm - sPid_Cmpt.r_Pv_Llm| and |Setpoint - Input| > 0.5 * |Setpoint| The setpoint may not be changed during pretuning. The higher the stability of the process value, the easier it is to calculate the PID parameters and increase precision of the result. Noise on the process value can be tolerated as long as the rate of rise of the process value is significantly higher compared to the noise. PID parameters are backed up before they are recalculated and can be reactivated with sPid_Cmpt.b_LoadBackUp. There is a change to automatic mode following successful pretuning and to "inactive" mode following unsuccessful pretuning. The phase of pretuning is indicated with Variable i_Event_SUT (Page 1680).
1675
1676
See also
Output parameters of PID_Compact (Page 1669) Pretuning (Page 2733) Fine tuning (Page 2734) "Manual" mode (Page 2739) Variable i_Event_SUT (Page 1680) Variable i_Event_TIR (Page 1680)
Error parameter
If several errors are pending, the values of the error codes are displayed by means of binary addition. The display of error code 0003, for example, indicates that the errors 0001 and 0002 are also pending.
Error (DW#16#...) 0000 0001 Description There is no error. The "Input" parameter is outside the process value limits. Input > sPid_Cmpt.r_Pv_Hlmor Input < sPid_Cmpt.r_Pv_Llm You cannot start the actuator again until you eliminate the error. 0002 0004 0008 0010 0020 0040 0080 Invalid value at parameter "Input_PER". Check whether an error is pending at the analog input. Error during fine tuning Oscillation of the process value could not be maintained. Error while starting pretuning. The process value is too close to the setpoint. Start fine tuning. The setpoint was changed during controller tuning. Pretuning may not be carried out in automatic mode or during fine tuning. Error in fine tuning The setpoint is too close to the setpoint limits. Incorrect configuration of output value limits. Check to see if the limits of the output value are configured correctly and match the direction in which the control is operating. 0100 0200 0400 0800 1000 Error during controller tuning has resulted in invalid parameters. Invalid value at parameter "Input": Numerical format of value is invalid. Calculating the output value failed. Check the PID parameters. Sampling time error: PID_Compact is not called within the sampling time of the cyclic interrupt OB. Invalid value at parameter "Setpoint": Numerical format of value is invalid.
See also
Output parameters of PID_Compact (Page 1669)
Reset parameter
The response to Reset = TRUE depends on the version of the PID_Compact instruction.
1677
1678
Variable sd_warning
If several warnings are pending, the values of variable sd_warning are displayed by means of binary addition. The display of warning 0003, for example, indicates that the warnings 0001 and 0002 are also pending.
sd_warning (DW#16#....) 0000 0001 0002 0004 0008 0010 0020 0040 No warning pending. The point of inflection was not found during pretuning. Oscillation increased during fine tuning. The setpoint was outside the set limits. Not all the necessary controlled system properties were defined for the selected method of calculation. The PID parameters were instead calculated using the "i_CtrlTypeTIR = 3" method. The operating mode could not be changed because ManualEnable = TRUE. The cycle time of the calling OB limits the sampling time of the PID algorithm. Improve results by using shorter OB cycle times. The process value exceeded one of its warning limits. Description
1679
Variable i_Event_SUT
i_Event_SUT Name 0 SUT_INIT 100 SUT_STDABW 200 SUT_GET_POI 9900 SUT_IO 1 SUT_NIO Description Initialize pretuning Calculate the standard deviation Find the point of inflection Pretuning successful Pretuning not successful
See also
Static variables of PID_Compact (Page 1670) Parameters State and sRet.i_Mode (Page 1674)
Variable i_Event_TIR
i_Event_TIR Name 0 TIR_INIT 200 TIR_STDABW 300 TIR_RUN_IN 400 TIR_CTRLN 500 TIR_OSZIL 9900 TIR_IO 1 TIR_NIO Description Fine tuning is not possible. Pretuning will be executed first. Initialize fine tuning Calculate the standard deviation Attempt to reach the setpoint Attempt to reach the setpoint with the existing PID parameters (if pretuning has been successful) Determine oscillation and calculate parameters Fine tuning successful Fine tuning not successful
-100 TIR_FIRST_SUT
See also
Static variables of PID_Compact (Page 1670) Parameters State and sRet.i_Mode (Page 1674)
1680
1681
PID algorithm
PID_3Step is a PIDT1 controller with anti-windup and weighting of the proportional and derivative actions. The following equation is used to calculate the output value.
y = K p s (b w - x) +
1 TI s (w - x) +
TD s a TD s + 1
(c w - x)
Symbol y Kp s b w x TI a TD c
Description Output value Proportional gain Laplace operator Proportional action weighting Setpoint Process value Integral action time Derivative delay coefficient (T1 = a TD) Derivative action time Derivative action weighting
1682
1683
1684
Call
PID_3Step is called in the constant interval of the cycle time of the calling OB (preferably in a cyclic interrupt OB).
Startup
At the startup of the CPU, PID_3Step starts in the operating mode that was last active. To retain PID_3Step in "Inactive" mode, set RunModeByStartup = FALSE.
Reaction to errors
If errors occur, these are output in the Error parameter. Configure the response of PID_3Step using the ErrorBehaviour and ActivateRecoverMode tags.
ErrorBeha viour 0 0 1 ActivateRecov Actuator setting configuration Response erMode Set Output to FALSE TRUE FALSE Current output value Current output value while error is pending Substitute output value Change to "Inactive" mode (Mode = 0) Change to "Error monitoring" mode (Mode = 8) Change to "Approach substitute output value" mode (Mode = 5) Change to "Inactive" mode (Mode = 0) 1 TRUE Substitute output value while error is pending Change to "Approach substitute output value with error monitoring" mode (Mode = 7) Change to "Error monitoring" mode (Mode = 8)
1685
See also
State and Retain.Mode parameters (Page 1697) ErrorBits parameter (Page 1704) Configuring PID_3Step (Page 2742)
1686
If OutputPerOn = FALSE and FeedbackOn = FALSE, you cannot limit the output value. The digital outputs are reset with Actuator_H = TRUE or Actuator_L = TRUE, or after a travel time amounting to 110% of the motor transition time. The output value is 27648 at 100% and -27648 at -100%. PID_3Step must be able to close the valve completely. Therefore, zero must be included in the output value limits.
1687
Effective direction
For cooling and discharge control systems, it may be necessary to invert the effective direction. This inversion is controlled using variable Config.InvertControl.
See also
Configuring PID_3Step (Page 2742)
1688
Manual_UP
BOOL
FALSE
Manual_DN
BOOL
FALSE
Reset
BOOL
FALSE
1689
See also
State and Retain.Mode parameters (Page 1697) ErrorBits parameter (Page 1704)
1690
Config.LoadBackUp Config.InvertControl
BOOL BOOL
FALSE FALSE
1691
1692
+3.40282 High limit of setpoint 2e+38 If you set SetpointUpperLimit outside the process value limits, the configured process value absolute high limit defaults to the setpoint high limit. If you set SetpointUpperLimit within the process value limits, this value is used as the setpoint high limit.
Config.SetpointLowerLimit
REAL
Low limit of the setpoint 3.402822 If you set SetpointLowerLimit outside the process value limits, the e+38 configured process value absolute low limit defaults to the setpoint low limit. If you set SetpointLowerLimit within the process value limits, this value is used as the setpoint low limit.
Config.MinimumOnTime
REAL
0.0
Minimum ON time Minimum time in seconds for which the servo drive must be switched on.
Config.MinimumOffTime
REAL
0.0
Minimum OFF time Minimum time in seconds for which the servo drive must be switched off.
Config.TransitTime
REAL
30.0
Motor transition time Time in seconds the actuating drive requires to move the valve from the closed to the opened state.
Config.InputScaling.UpperPoi ntIn
REAL
27648.0
Scaling Input_PER high Input_PER is converted to percent based on the two value pairs UpperPointOut, UpperPointIn and LowerPointOut, LowerPointIn from the InputScaling structure.
Config.InputScaling.LowerPoi ntIn
REAL
0.0
Scaling Input_PER low Input_PER is converted to percent based on the two value pairs UpperPointOut, UpperPointIn and LowerPointOut, LowerPointIn from the InputScaling structure.
Config.InputScaling.UpperPoi ntOut
REAL
100.0
Scaled high process value Input_PER is converted to percent based on the two value pairs UpperPointOut, UpperPointIn and LowerPointOut, LowerPointIn from the InputScaling structure.
Config.InputScaling.LowerPoi ntOut
REAL
0.0
Scaled low process value Input_PER is converted to percent based on the two value pairs UpperPointOut, UpperPointIn and LowerPointOut, LowerPointIn from the InputScaling structure.
27648.0
Scaling Feedback_PER high Feedback_PER is converted to percent based on the two value pairs UpperPointOut, UpperPointIn and LowerPointOut, LowerPointIn from the FeedbackScaling structure.
0.0
Scaling Feedback_PER low Feedback_PER is converted to percent based on the two value pairs UpperPointOut, UpperPointIn and LowerPointOut, LowerPointIn from the FeedbackScaling structure.
1693
GetTransitTime.InvertDirectio n
BOOL
CycleTime.EnEstimation CycleTime.EnMonitoring
BOOL BOOL
TRUE TRUE
1694
CtrlParamsBackUp.SetByUser BOOL
CtrlParamsBackUp.DWeightin REAL g CtrlParamsBackUp.Cycle REAL CtrlParamsBackUp.InputDead REAL Band PIDSelfTune.SUT.CalculateS UTParams BOOL
PIDSelfTune.SUT.TuneRuleS UT
INT
1695
1696
Note Edit the variables listed in this table in "Inactive" mode to avoid malfunction of the PID controller. "Inactive" mode is forced by setting variable "Retain.Mode" to "0".
See also
State and Retain.Mode parameters (Page 1697) ActivateRecoverMode variable (Page 1706)
1697
Meaning of values
State / Description Retain.Mode 0 1 Inactive The controller is switched off and no longer modifies the valve position. Pretuning The pretuning determines the process response to a pulse of the output value and searches for the point of inflection. The optimized PID parameters are calculated as a function of the maximum rate of rise and dead time of the controlled system. Pretuning requirements: State = 0 or State = 4 ManualEnable = FALSE The motor transition time has been configured or measured. The setpoint and the process value lie within the configured limits. The higher the stability of the process value, the easier it is to calculate the PID parameters and increase precision of the result. Noise on the process value can be tolerated as long as the rate of rise of the process value is significantly higher compared to the noise. PID parameters are backed up before they are recalculated and can be reactivated with Config.LoadBackUp. The setpoint is frozen in variable CurrentSetpoint. There is a change to automatic mode following successful pretuning and to "inactive" mode following unsuccessful pretuning. The pretuning phase is indicated by variable SUT.State.
1698
1699
1700
Automatic change of operating mode in the event of an error Automatic change of operating mode once the current mode has been completed.
1701
Automatic change of operating mode in the event of an error Automatic change of operating mode once the current mode has been completed. Automatic change of operating mode when error is no longer pending.
1702
Automatic operating mode changes during automatic and manual mode (PID_3Step V1.0)
PID_3Step will automatically change operating mode in the event of an error. The following diagram illustrates the influence of ErrorBehaviour and ActivateRecoverMode on the change of operating mode.
Automatic change of operating mode in the event of an error Automatic change of operating mode once the current mode has been completed. Automatic change of operating mode when error is no longer pending.
See also
ActivateRecoverMode variable (Page 1706) ErrorBits parameter (Page 1704)
1703
ErrorBits parameter
If several errors are pending, the values of the error codes are displayed by means of binary addition. The display of error code 0003, for example, indicates that the errors 0001 and 0002 are also pending.
ErrorBits (DW#16#...) 0000 0001 There is no error. The "Input" parameter is outside the process value limits. Input > Config.InputUpperLimit or Input < Config.InputLowerLimit If ActivateRecoverMode = TRUE and ErrorBehaviour = 1, the actuator moves to the substitute output value. If ActivateRecoverMode = TRUE and ErrorBehaviour = 0, the actuator stops in its current position. If ActivateRecoverMode = FALSE, the actuator stops in its current position. PID_3Step V1.1 You can move the actuator in manual mode. PID_3Step V1.0 Manual mode is not possible in this state. You cannot start the actuator again until you eliminate the error. 0002 Invalid value at parameter "Input_PER". Check whether an error is pending at the analog input. If automatic mode was active before the error occurred, ActivateRecoverMode = TRUE and the error is no longer pending, PID_3Step switches back to automatic mode. 0004 0008 0010 0020 0040 0080 Error during fine tuning Oscillation of the process value could not be maintained. Error while starting pretuning. The process value is too close to the setpoint. Start fine tuning. The setpoint may not be changed during fine tuning. Pretuning may not be carried out in automatic mode or during fine tuning. Error in fine tuning The setpoint is too close to the setpoint limits. Error in pretuning. Incorrect configuration of output value limits. Check to see if the limits of the output value are configured correctly and match the direction in which the control is operating. 0100 0200 Error during fine tuning has resulted in invalid parameters. Invalid value at parameter "Input": Numerical format of value is invalid. If automatic mode was active before the error occurred, ActivateRecoverMode = TRUE and the error is no longer pending, PID_3Step switches back to automatic mode. 0400 0800 Calculating the output value failed. Check the PID parameters. Sampling time error: PID_3Step is not called within the sampling time of the cyclic interrupt OB. If automatic mode was active before the error occurred, ActivateRecoverMode = TRUE and the error is no longer pending, PID_3Step switches back to automatic mode. 1000 Invalid value at parameter "Setpoint": Numerical format of value is invalid. If automatic mode was active before the error occurred, ActivateRecoverMode = TRUE and the error is no longer pending, PID_3Step switches back to automatic mode. Description
1704
Reset parameter
A rising edge at Reset resets the errors and warnings and clears the integral action. A falling edge at Reset triggers a change to the most recently active operating mode.
STEP 7 Basic V11.0 SP2 System Manual, 12/2011,
1705
ActivateRecoverMode variable
The effect of the ActivateRecoverMode variable depends on the version of the PID_3Step.
1706
See also
PID_3Step static variables (Page 1691) State and Retain.Mode parameters (Page 1697)
1707
Warnings variable
If several warnings are pending, their values are displayed by means of binary addition. The display of warning 0003, for example, indicates that the warnings 0001 and 0002 are also pending.
Warnings (DW#16#...) 0000 0001 0002 0004 0008 0010 0020 0040 0080 0100 0200 0400 No warning pending. The point of inflection was not found during pretuning. Oscillation increased during fine tuning. The setpoint was limited to the configured limits. Not all the necessary controlled system properties were defined for the selected method of calculation. The PID parameters were instead calculated using the TuneRuleTIR = 3 method. The operating mode could not be changed because ManualEnable = TRUE. The cycle time of the calling OB limits the sampling time of the PID algorithm. Improve results by using shorter OB cycle times. The process value exceeded one of its warning limits. Invalid value at Retain.Mode. The operating mode is not changed. The manual value was limited to the limits of the controller output. The rule used for controller tuning returns incorrect results, or is not supported. Method selected for transition time measurement not suitable for actuator. The transition time cannot be measured because the actuator settings do not match the selected measuring method. 0800 The difference between the current position and the new output value is too small for transition time measurement. This state can produce incorrect results. The difference between the current output value and new output value must be at least 50% of the entire control range. The substitute output value cannot be reached because it is beyond the output value limits. Description
1000
The following warnings are deleted as soon as the cause is dealt with: 0004 0020 0040 0100 All other warnings are cleared with a rising edge at Reset.
SUT.State variable
SUT.Stat e Name Description Initialize pretuning Determine start position without position feedback Calculate the standard deviation Find the point of inflection
1708
TIR.State variable
TIR.State Name -100 TIR_FIRST_SUT 0 TIR_INIT 200 TIR_STDABW 300 TIR_RUN_IN 400 TIR_CTRLN 500 TIR_OSZIL 9900 TIR_IO 1 TIR_NIO Description Fine tuning is not possible. Pretuning will be executed first. Initialize fine tuning Calculate the standard deviation Attempt to reach the setpoint with the maximum or minimum output value Attempt to reach the setpoint with the existing PID parameters (if pretuning has been successful) Determine oscillation and calculate parameters Fine tuning successful Fine tuning not successful
9.8.4.2
Motion Control
Requirements
The technology object "Axis" has been configured correctly. There is no pending enable-inhibiting error.
Override response
Execution of "MC_Power" cannot be aborted by a motion control command. Disabling the axis (input parameter "Enable" = FALSE ) aborts all motion control jobs for the associated technology object in accordance with the selected "StopMode".
1709
Parameter
Parameter Axis Enable Declaration INPUT INPUT Data type TO_Axis_1 BOOL Default value FALSE Description Axis technology object TRUE Motion Control attempts to enable the axis. FALSE All active jobs are aborted according to the configured "StopMode" and the axis is stopped. StopMode INPUT INT 0 0 Emergency stop If a request to disable the axis is pending, the axis brakes at the configured emergency stop deceleration. The axis is disabled after reaching standstill. 1 Immediate stop If a request to disable the axis is pending, this axis is disabled without deceleration. Pulse output is stopped immediately. Status OUTPUT BOOL FALSE Status of axis enable FALSE The axis is disabled. The axis does not execute motion control jobs and does not accept any new jobs (exception: MC_Reset command). The axis is not homed. Upon disabling, the status does not change to FALSE until the axis reaches a standstill. TRUE The axis is enabled. The axis is ready to execute motion control jobs. Upon axis enabling, the status does not change to TRUE until the signal "Drive ready" is pending. If the "Drive ready" drive interface was not configured in the axis configuration, the status changes to TRUE immediately. Busy Error OUTPUT OUTPUT BOOL BOOL FALSE FALSE TRUE TRUE MC Power is active An error occurred in motion control instruction "MC_Power" or in the associated technology object. The cause of the error can be found in parameters "ErrorID" and "ErrorInfo".
ErrorID ErrorInfo
OUTPUT OUTPUT
WORD WORD
16#0000 16#0000
Error ID (Page 2857) for parameter "Error"" Error info ID (Page 2857) for parameter "ErrorID"
NOTICE If the axis is switched off due to an error, it will be enabled again automatically after the error has been eliminated and acknowledged. This requires that input parameter "Enable" has retained the value TRUE during this process.
1710
Disabling an axis
To disable an axis, you can follow the steps described below: 1. Bring the axis to a standstill. You can identify when the axis is at a standstill in the tag of the technology object <Axis name>.StatusBits.StandStill. 2. Set input parameter "Enable" to FALSE after standstill is reached. 3. If output parameters "Busy" and "Status" and technology object tag <Axis name>.StatusBits.Enable indicate the value FALSE, disabling of the axis is complete.
1711
See also
List of ErrorIDs and ErrorInfos (technology objects as of V2.0) (Page 2857) MC_Power: Function chart (Page 1713) MC_Reset: Acknowledge error (Page 1714) MC_Home: Home axes, set home position (Page 1715) MC_Halt: Halt axis (Page 1718) MC_MoveAbsolute: Absolute positioning of axes (Page 1722) MC_MoveRelative: Relative positioning of axes (Page 1725) MC_MoveVelocity: Move axes at preset rotational speed (Page 1729) MC_MoveJog: Move axes in jogging mode (Page 1733) MC_ChangeDynamic: Changing the dynamic settings for the axis (as of technology object "Axis" V2.0) (Page 1739) MC_CommandTable: Run axis jobs as movement sequence (as of technology object "Axis" V2.0) (Page 1737)
1712
An axis is enabled and then disabled again. When the drive has signaled "Drive ready" back to the CPU, the successful enable can be read out via "Status_1". Following an axis enable, an error has occurred that caused the axis to be disabled. The error is eliminated and acknowledged with "MC_Reset". The axis is then enabled again.
See also
MC_Power: Enable, disable axis (Page 1709)
1713
Requirements
The technology object "Axis" has been configured correctly. The cause of a pending configuration error requiring acknowledgement has been eliminated (for example, acceleration in "Axis" technology object has been changed to a valid value).
Override response
The MC_Reset command cannot be aborted by any other motion control command. The new MC_Reset command does not abort any other active motion control jobs.
Parameter
Parameter Axis Execute Done Busy Error Declaration INPUT INPUT OUTPUT OUTPUT OUTPUT Data type TO_Axis_1 BOOL BOOL BOOL BOOL Default value FALSE FALSE FALSE FALSE Description Axis technology object Start of the command with a positive edge TRUE TRUE TRUE Error has been acknowledged. The command is being executed. An error occurred during execution of the command. The cause of the error can be found in parameters "ErrorID" and "ErrorInfo".
ErrorID ErrorInfo
OUTPUT OUTPUT
WORD WORD
16#0000 16#0000
Error ID (Page 2857) for parameter "Error"" Error info ID (Page 2857) for parameter "ErrorID"
1714
See also
List of ErrorIDs and ErrorInfos (technology objects as of V2.0) (Page 2857) MC_Power: Enable, disable axis (Page 1709) MC_Home: Home axes, set home position (Page 1715) MC_Halt: Halt axis (Page 1718) MC_MoveAbsolute: Absolute positioning of axes (Page 1722) MC_MoveRelative: Relative positioning of axes (Page 1725) MC_MoveVelocity: Move axes at preset rotational speed (Page 1729) MC_MoveJog: Move axes in jogging mode (Page 1733) MC_CommandTable: Run axis jobs as movement sequence (as of technology object "Axis" V2.0) (Page 1737) MC_ChangeDynamic: Changing the dynamic settings for the axis (as of technology object "Axis" V2.0) (Page 1739)
Requirements
The technology object "Axis" has been configured correctly. The axis is enabled. No MC_CommandTable command may be active upon start with Mode = 0, 1 or 2.
1715
Override response
The override response is dependent on the selected mode: Mode = 0, 1 The MC_Home command cannot be aborted by any other motion control command. The MC_Home command does not abort any active motion control jobs. Position-related motion jobs are resumed after homing according to the new homing position (value at input parameter: "Position"). Mode = 2 The MC_Home command can be aborted by the following motion control jobs: MC_Home command Mode = 2, 3 The new MC_Home command aborts the following active motion control command. MC_Home command Mode = 2 Position-related motion jobs are resumed after homing according to the new homing position (value at input parameter: "Position"). Mode = 3 The MC_Home command can be aborted by the following motion control jobs: MC_Home command Mode = 3 MC_Halt command MC_MoveAbsolute command MC_MoveRelative command MC_MoveVelocity command MC_MoveJog command The new MC_Home command aborts the following active motion control jobs: MC_Home command Mode = 2, 3 MC_Halt command MC_MoveAbsolute command MC_MoveRelative command MC_MoveVelocity command MC_MoveJog command
Parameter
Parameter Axis Execute Declaration INPUT INPUT Data type TO_Axis_1 BOOL Default value FALSE Description Axis technology object Start of the command with a positive edge
1716
ErrorID ErrorInfo
OUTPUT OUTPUT
WORD WORD
16#0000 16#0000
Note Axis homing is lost under the following conditions: Disabling of axis by motion control instruction "MC_Power" Changeover between automatic mode and manual control Upon start of active homing. After successful completion of the homing operation, axis homing is again available. After POWER OFF -> POWER ON of the CPU After CPU restart (RUN-STOP -> STOP-RUN)
1717
Homing an axis
To home the axis, follow these stops: 1. Check the requirements indicated above. 2. Initialize the necessary input parameters with values, and start the homing operation with a rising edge at input parameter "Execute" 3. If output parameter "Done" and technology object tag <Axis name>.StatusBits.HomingDone indicate the value TRUE, homing is complete.
See also
List of ErrorIDs and ErrorInfos (technology objects as of V2.0) (Page 2857) MC_Power: Enable, disable axis (Page 1709) MC_Reset: Acknowledge error (Page 1714) MC_Halt: Halt axis (Page 1718) MC_MoveAbsolute: Absolute positioning of axes (Page 1722) MC_MoveRelative: Relative positioning of axes (Page 1725) MC_MoveVelocity: Move axes at preset rotational speed (Page 1729) MC_MoveJog: Move axes in jogging mode (Page 1733) MC_CommandTable: Run axis jobs as movement sequence (as of technology object "Axis" V2.0) (Page 1737) MC_ChangeDynamic: Changing the dynamic settings for the axis (as of technology object "Axis" V2.0) (Page 1739)
Requirements
The technology object "Axis" has been configured correctly. The axis is enabled.
1718
Override response
The MC_Halt command can be aborted by the following motion control jobs: MC_Home command Mode = 3 MC_Halt command MC_MoveAbsolute command MC_MoveRelative command MC_MoveVelocity command MC_MoveJog command The new MC_Halt command aborts the following active motion control jobs: MC_Home command Mode = 3 MC_Halt command MC_MoveAbsolute command MC_MoveRelative command MC_MoveVelocity command MC_MoveJog command
Parameter
Parameter Axis Execute Done Busy CommandAborted Error Declaration INPUT INPUT OUTPUT OUTPUT OUTPUT OUTPUT Data type TO_Axis_1 BOOL BOOL BOOL BOOL BOOL Default value FALSE FALSE FALSE FALSE FALSE Description Axis technology object Start of the command with a positive edge TRUE TRUE TRUE TRUE Zero velocity reached The command is being executed. During execution the command was aborted by another command. An error occurred during execution of the command. The cause of the error can be found in parameters "ErrorID" and "ErrorInfo".
ErrorID ErrorInfo
OUTPUT OUTPUT
WORD WORD
16#0000 16#0000
Error ID (Page 2857) for parameter "Error" Error info ID (Page 2857) for parameter "ErrorID"
1719
See also
MC_Halt: Function chart (Page 1721) List of ErrorIDs and ErrorInfos (technology objects as of V2.0) (Page 2857) MC_Power: Enable, disable axis (Page 1709) MC_Reset: Acknowledge error (Page 1714) MC_Home: Home axes, set home position (Page 1715) MC_MoveAbsolute: Absolute positioning of axes (Page 1722) MC_MoveRelative: Relative positioning of axes (Page 1725) MC_MoveVelocity: Move axes at preset rotational speed (Page 1729) MC_MoveJog: Move axes in jogging mode (Page 1733) MC_CommandTable: Run axis jobs as movement sequence (as of technology object "Axis" V2.0) (Page 1737) MC_ChangeDynamic: Changing the dynamic settings for the axis (as of technology object "Axis" V2.0) (Page 1739)
1720
The following values were configured in the configuration window Dynamics > General: Acceleration: 10.0 Deceleration: 5.0
The axis is braked by an MC_Halt job until it comes to a standstill. The axis standstill is signaled via "Done_2". While an MC_Halt job is braking the axis, this job is aborted by another motion job. The abort is signaled via "Abort_2".
1721
See also
MC_Halt: Halt axis (Page 1718)
Requirements
The technology object "Axis" has been configured correctly. The axis is enabled. The axis is homed.
Override response
The MC_MoveAbsolute command can be aborted by the following motion control jobs: MC_Home command Mode = 3 MC_Halt command MC_MoveAbsolute command MC_MoveRelative command MC_MoveVelocity command MC_MoveJog command The new MC_MoveAbsolute command aborts the following active motion control jobs: MC_Home command Mode = 3 MC_Halt-Auftrag MC_MoveAbsolute command MC_MoveRelative command MC_MoveVelocity command MC_MoveJog command
1722
Parameter
Parameter Axis Execute Position Declaration INPUT INPUT INPUT Data type TO_Axis_1 BOOL REAL Default value FALSE 0.0 Description Axis technology object Start of the command with a positive edge Absolute target position Limit values: -1.0e12 Position 1.0e12 Velocity INPUT REAL 10.0 Velocity of axis This velocity is not always reached on account of the configured acceleration and deceleration and the target position to be approached. Limit values: Start/stop velocity Velocity maximum velocity Done Busy CommandAborted Error OUTPUT OUTPUT OUTPUT OUTPUT BOOL BOOL BOOL BOOL FALSE FALSE FALSE FALSE TRUE TRUE TRUE TRUE Absolute target position reached The command is being executed. During execution the command was aborted by another command. An error occurred during execution of the command. The cause of the error can be found in parameters "ErrorID" and "ErrorInfo".
ErrorID ErrorInfo
OUTPUT OUTPUT
WORD WORD
16#0000 16#0000
Error ID (Page 2857) for parameter "Error" Error info ID (Page 2857) for parameter "ErrorID"
See also
MC_MoveAbsolute: Function chart (Page 1724) List of ErrorIDs and ErrorInfos (technology objects as of V2.0) (Page 2857) MC_Power: Enable, disable axis (Page 1709) MC_Reset: Acknowledge error (Page 1714) MC_Home: Home axes, set home position (Page 1715) MC_Halt: Halt axis (Page 1718) MC_MoveRelative: Relative positioning of axes (Page 1725) MC_MoveVelocity: Move axes at preset rotational speed (Page 1729) MC_MoveJog: Move axes in jogging mode (Page 1733) MC_CommandTable: Run axis jobs as movement sequence (as of technology object "Axis" V2.0) (Page 1737) MC_ChangeDynamic: Changing the dynamic settings for the axis (as of technology object "Axis" V2.0) (Page 1739)
1723
The following values were configured in the configuration window Dynamics > General: Acceleration: 10.0 Deceleration: 10.0
1724
An axis is moved to absolute position 1000.0 with a MC_MoveAbsolute job. When the axis reaches the target position, this is signaled via "Done_1". When "Done_1" = TRUE, another MC_MoveAbsolute job, with target position 1500.0, is started. Because of the response times (e.g., cycle time of user program, etc.), the axis comes to a standstill briefly (see zoomed-in detail). When the axis reaches the new target position, this is signaled via "Done_2". An active MC_MoveAbsolute job is aborted by another MC_MoveAbsolute job. The abort is signaled via "Abort_1". The axis is then moved at the new velocity to the new target position 1500.0. When the new target position is reached, this is signaled via "Done_2".
See also
MC_MoveAbsolute: Absolute positioning of axes (Page 1722)
Requirements
The technology object "Axis" has been configured correctly. The axis is enabled.
Override response
The MC_MoveRelative command can be aborted by the following motion control jobs: MC_Home command Mode = 3 MC_Halt command MC_MoveAbsolute command MC_MoveRelative command MC_MoveVelocity command MC_MoveJog command The new MC_MoveRelative command aborts the following active motion control jobs: MC_Home command Mode = 3 MC_Halt command MC_MoveAbsolute command MC_MoveRelative command
1725
Parameter
Parameter Axis Execute Distance Declaration INPUT INPUT INPUT Data type TO_Axis_1 BOOL REAL Default value FALSE 0.0 Description Axis technology object Start of the command with a positive edge Travel distance for the positioning operation Limit values: -1.0e12 Distance 1.0e12 Velocity INPUT REAL 10.0 Velocity of axis This velocity is not always reached on account of the configured acceleration and deceleration and the distance to be traveled. Limit values: Start/stop velocity Velocity maximum velocity Done Busy CommandAborted Error OUTPUT OUTPUT OUTPUT OUTPUT BOOL BOOL BOOL BOOL FALSE FALSE FALSE FALSE TRUE TRUE TRUE TRUE Target position reached The command is being executed. During execution the command was aborted by another command. An error occurred during execution of the command. The cause of the error can be found in parameters "ErrorID" and "ErrorInfo".
ErrorID ErrorInfo
OUTPUT OUTPUT
WORD WORD
16#0000 16#0000
Error ID (Page 2857) for parameter "Error" Error info ID (Page 2857) for parameter "ErrorID"
1726
See also
MC_MoveRelative: Function chart (Page 1728) List of ErrorIDs and ErrorInfos (technology objects as of V2.0) (Page 2857) MC_Power: Enable, disable axis (Page 1709) MC_Reset: Acknowledge error (Page 1714) MC_Home: Home axes, set home position (Page 1715) MC_Halt: Halt axis (Page 1718) MC_MoveAbsolute: Absolute positioning of axes (Page 1722) MC_MoveVelocity: Move axes at preset rotational speed (Page 1729) MC_MoveJog: Move axes in jogging mode (Page 1733) MC_CommandTable: Run axis jobs as movement sequence (as of technology object "Axis" V2.0) (Page 1737) MC_ChangeDynamic: Changing the dynamic settings for the axis (as of technology object "Axis" V2.0) (Page 1739)
1727
The following values were configured in the configuration window Dynamics > General:
1728
The axis is moved by an MC_MoveRelative job by the distance ("Distance") 1000.0. When the axis reaches the target position, this is signaled via "Done_1". When "Done_1" = TRUE, another MC_MoveRelative job, with travel distance 500.0, is started. Because of the response times (e.g., cycle time of user program, etc.), the axis comes to a standstill briefly (see zoomed-in detail). When the axis reaches the new target position, this is signaled via "Done_2". An active MC_MoveRelative job is aborted by another MC_MoveRelative job. The abort is signaled via "Abort_1". The axis is then moved at the new velocity by the new distance ("Distance") 500.0. When the new target position is reached, this is signaled via "Done_2".
See also
MC_MoveRelative: Relative positioning of axes (Page 1725)
Requirements
The technology object "Axis" has been configured correctly. The axis is enabled.
Override response
MC_MoveVelocity can be aborted by the following motion control jobs: MC_Home command Mode = 3 MC_Halt command MC_MoveAbsolute command MC_MoveRelative command MC_MoveVelocity command MC_MoveJog command The new MC_MoveVelocity command aborts the following active motion control jobs: MC_Home command Mode = 3 MC_Halt command MC_MoveAbsolute command
1729
Parameter
Parameter Axis Execute Velocity Declaration INPUT INPUT INPUT Data type TO_Axis_1 BOOL REAL Default value FALSE 10.0 Description Axis technology object Start of the command with a positive edge Velocity specification for axis motion Limit values: Start/stop velocity |Velocity| maximum velocity (Velocity = 0.0 is permitted) Direction INPUT INT 0 Direction specification 0 1 Direction of rotation corresponds to the sign of the value in parameter "Velocity" Positive direction of rotation (The sign of the value in parameter "Velocity" is ignored) 2 Negative direction of rotation (The sign of the value in parameter "Velocity" is ignored) Current INPUT BOOL FALSE Maintain current velocity FALSE "Maintain current velocity" is deactivated. The values of parameters "Velocity" and "Direction" are used. TRUE "Maintain current velocity" is activated. The values in parameters "Velocity" and "Direction" are not taken into account. When the axis resumes motion at the current velocity, the "InVelocity" parameter returns the value TRUE. InVelocity OUTPUT BOOL FALSE TRUE "Current" = FALSE: The velocity specified in parameter "Velocity" was reached. "Current" = TRUE: The axis travels at the current velocity at the start time. Busy CommandAborted Error OUTPUT OUTPUT OUTPUT BOOL BOOL BOOL FALSE FALSE FALSE TRUE TRUE TRUE The command is being executed. During execution the command was aborted by another command. An error occurred during execution of the command. The cause of the error can be found in parameters "ErrorID" and "ErrorInfo".
ErrorID ErrorInfo
OUTPUT OUTPUT
WORD WORD
16#0000 16#0000
Error ID (Page 2857) for parameter "Error" Error info ID (Page 2857) for parameter "ErrorID"
1730
See also
MC_MoveVelocity: Function chart (Page 1732) List of ErrorIDs and ErrorInfos (technology objects as of V2.0) (Page 2857) MC_Power: Enable, disable axis (Page 1709) MC_Reset: Acknowledge error (Page 1714) MC_Home: Home axes, set home position (Page 1715) MC_Halt: Halt axis (Page 1718) MC_MoveAbsolute: Absolute positioning of axes (Page 1722) MC_MoveRelative: Relative positioning of axes (Page 1725) MC_MoveJog: Move axes in jogging mode (Page 1733) MC_CommandTable: Run axis jobs as movement sequence (as of technology object "Axis" V2.0) (Page 1737) MC_ChangeDynamic: Changing the dynamic settings for the axis (as of technology object "Axis" V2.0) (Page 1739)
1731
The following values were configured in the configuration window Dynamics > General: Acceleration: 10.0 Deceleration: 10.0
1732
An active MC_MoveVelocity job signals via "InVel_1" that its target velocity has been reached. It is then aborted by another MC_MoveVelocity job. The abort is signaled via "Abort_1". When the new target velocity 15.0 is reached, this is signaled via "InVel_2". The axis then continues moving at the new constant velocity. An active MC_MoveVelocity job is aborted by another MC_MoveVelocity job prior to reaching its target velocity. The abort is signaled via "Abort_1". When the new target velocity 15.0 is reached, this is signaled via "InVel_2". The axis then continues moving at the new constant velocity.
See also
MC_MoveVelocity: Move axes at preset rotational speed (Page 1729)
Requirements
The technology object "Axis" has been configured correctly. The axis is enabled.
Override response
The MC_MoveJog command can be aborted by the following motion control jobs: MC_Home command Mode = 3 MC_Halt command MC_MoveAbsolute command MC_MoveRelative command MC_MoveVelocity command MC_MoveJog command The new MC_MoveJog command aborts the following active motion control jobs: MC_Home command (Mode = 3) MC_Halt command MC_MoveAbsolute command MC_MoveRelative command
1733
Parameter
Parameter Axis JogForward Declaration INPUT INPUT Data type TO_Axis_1 BOOL Default value FALSE Description Axis technology object As long as the parameter is TRUE, the axis moves in the positive direction at the velocity specified in parameter "Velocity". As long as the parameter is TRUE, the axis moves in the negative direction at the velocity specified in parameter "Velocity".
JogBackward
INPUT
BOOL
FALSE
If both parameters are simultaneously TRUE, the axis stops with the configured deceleration. An error is indicated in parameters "Error", "ErrorID", and "ErrorInfo". Velocity INPUT REAL 10.0 Preset velocity for jog mode Limit values, instruction version V1.0: Start/stop velocity |Velocity| maximum velocity Limits, instruction version V2.0: Start/stop velocity velocity maximum velocity InVelocity Busy CommandAborted Error OUTPUT OUTPUT OUTPUT OUTPUT BOOL BOOL BOOL BOOL FALSE FALSE FALSE FALSE TRUE TRUE TRUE TRUE The velocity specified in parameter "Velocity" was reached. The command is being executed. During execution the command was aborted by another command. An error occurred during execution of the command. The cause of the error can be found in parameters "ErrorID" and "ErrorInfo".
ErrorID ErrorInfo
OUTPUT OUTPUT
WORD WORD
16#0000 16#0000
Error ID (Page 2857) for parameter "Error" Error info ID (Page 2857) for parameter "ErrorID"
1734
See also
MC_MoveJog: Function chart (Page 1736) List of ErrorIDs and ErrorInfos (technology objects as of V2.0) (Page 2857) MC_Power: Enable, disable axis (Page 1709) MC_Reset: Acknowledge error (Page 1714) MC_Home: Home axes, set home position (Page 1715) MC_Halt: Halt axis (Page 1718) MC_MoveAbsolute: Absolute positioning of axes (Page 1722) MC_MoveRelative: Relative positioning of axes (Page 1725) MC_MoveVelocity: Move axes at preset rotational speed (Page 1729) MC_CommandTable: Run axis jobs as movement sequence (as of technology object "Axis" V2.0) (Page 1737) MC_ChangeDynamic: Changing the dynamic settings for the axis (as of technology object "Axis" V2.0) (Page 1739)
1735
The following values were configured in the configuration window Dynamics > General: Acceleration: 10.0 Deceleration: 5.0
The axis is moved in the positive direction in jog mode via "Jog_F". When the target velocity 50.0 is reached, this is signaled via "InVelo_1". The axis brakes to a standstill again after Jog_F is reset. The axis is moved in the negative direction in jog mode via "Jog_B". When the target velocity 50.0 is reached, this is signaled via "InVelo_1". The axis brakes to a standstill again after Jog_B is reset.
See also
MC_MoveJog: Move axes in jogging mode (Page 1733)
1736
MC_CommandTable MC_CommandTable: Run axis jobs as movement sequence (as of technology object "Axis" V2.0) Description
The Motion Control instruction "MC_CommandTable" combines multiple individual axis control jobs in one movement sequence.
Requirements
The technology object "Axis" has been added to Version V2.0 and correctly configured. The technology object "Command table" has been added and correctly configured. The axis is enabled.
Override response
The MC_CommandTable command can be aborted by the following motion control jobs: MC_Home command (Mode = 3) MC_Halt command MC_MoveAbsolute command MC_MoveRelative command MC_MoveVelocity command MC_MoveJog command MC_CommandTable command The new MC_CommandTable command aborts the following active motion control jobs: MC_Home command (Mode = 3) MC_Halt command MC_MoveAbsolute command MC_MoveRelative command MC_MoveVelocity command MC_MoveJog command MC_CommandTable command The active motion control command is cancelled by the start of the first "Positioning Relative", "Positioning Absolute", "Velocity set point" or "Halt" command.
1737
Parameter
Parameter Axis Declaration INPUT Data type TO_Axis_1 TO_CommandT able_1 BOOL INT Default value FALSE 1 Description Axis technology object Command table technology object Command table start with positive edge Defines the step at which the execution of the command table should begin Limit values: 1 StartStep EndStep EndStep INPUT INT 32 Defines the step up to which the execution of command table should take place Limit values: StartStep EndStep 32 Done Busy CommandAb orted Error OUTPUT OUTPU OUTPUT OUTPUT BOOL BOOL BOOL BOOL FALSE FALSE FALSE FALSE TRUE TRUE TRUE TRUE Command table has been successfully executed The command table is being executed. The command table was cancelled by another command. An error occurred during execution of the command table. The cause of the error can be found in parameters "ErrorID" and "ErrorInfo".
Error ID (Page 2857) for parameter "Error"" Error info ID (Page 2857) for parameter "ErrorID" Step in command table currently being executed User-defined numerical value / bit pattern of the step currently being executed
See also
List of ErrorIDs and ErrorInfos (technology objects as of V2.0) (Page 2857) Overview of the Motion Control statements (Page 2823) MC_Power: Enable, disable axis (Page 1709) MC_Reset: Acknowledge error (Page 1714) MC_Home: Home axes, set home position (Page 1715) MC_Halt: Halt axis (Page 1718) MC_MoveAbsolute: Absolute positioning of axes (Page 1722) MC_MoveRelative: Relative positioning of axes (Page 1725) MC_MoveVelocity: Move axes at preset rotational speed (Page 1729) MC_MoveJog: Move axes in jogging mode (Page 1733) MC_ChangeDynamic: Changing the dynamic settings for the axis (as of technology object "Axis" V2.0) (Page 1739)
1738
MC_ChangeDynamic MC_ChangeDynamic: Changing the dynamic settings for the axis (as of technology object "Axis" V2.0) Description
Motion Control instruction "MC_ChangeDynamic" allows you to change the following settings of the axis: Change the ramp-up time (acceleration) value Change the ramp-down time (deceleration) value Change the emergency stop ramp-down time (emergency stop deceleration) value Change the smoothing time (jerk) value The effectiveness of the change is shown in the description of the tag (Page 2866).
Requirements
The technology object "Axis" has been added to Version V2.0. The technology object "Axis" has been configured correctly.
Override response
A MC_ChangeDynamic command cannot be aborted by any other Motion Control command. A new MC_ChangeDynamic command does not abort any active Motion Control jobs.
Parameter
Parameter Axis Execute ChangeRa mpUp RampUpTi me Declaration INPUT INPUT INPUT INPUT Data type TO_Axis_1 BOOL BOOL REAL Default value FALSE FALSE 5.00 Description Axis technology object Start of the command with a positive edge TRUE Change ramp-up time in line with input parameter "RampUpTime"
Time (in seconds) to accelerate axis from standstill to configured maximum velocity without jerk limit. The change will influence the tag <Axis name>. Config.DynamicDefaults.Acceleration. The effectiveness of the change is shown in the description of this tag.
ChangeRa mpDown
INPUT
BOOL REAL
FALSE 5.00
TRUE
Time (in seconds) to decelerate axis from the configured maximum velocity to standstill without jerk limiter. The change will influence the tag <Axis name>. Config.DynamicDefaults.Deceleration . The effectiveness of the change is shown in the description of this tag.
1739
Time (in seconds) to decelerate the axis from configured maximum velocity to standstill without jerk limiter in emergency stop mode. The change will influence the tag <Axis name>. Config.DynamicDefaults.EmergencyDeceleration . The effectiveness of the change is shown in the description of this tag.
INPUT INPUT
BOOL REAL
FALSE 0.25
TRUE
Smoothing time (in seconds) used for the axis acceleration and deceleration ramps The change will influence the tag <Axis name>. Config.DynamicDefaults.Jerk . The effectiveness of the change is shown in the description of this tag.
Done
OUTPUT
BOOL
FALSE
TRUE
The changed values have been written to the technology data block. The description of the tags will show when the change becomes effective. An error occurred during execution of the command. The cause of the error can be found in parameters "ErrorID" and "ErrorInfo".
Error
OUTPUT
BOOL
FALSE
TRUE
ErrorID ErrorInfo
OUTPUT OUTPUT
WORD WORD
16#0000 16#0000
Error ID (Page 2857) for parameter "Error"" Error info ID (Page 2857) for parameter "ErrorID"
Note Values can be entered at the input parameters "RampUpTime", "RampDownTime", "EmergencyRampTime" and "JerkTime" which exceed the admissible limits of the resulting parameters: "Acceleration", "Deceleration", "Emergency stop deceleration" and "Jerk". Please note the equations and limit values in "Axis technology object" -> "Configuring the technology object" -> "Dynamics" and ensure that the values you input are within the valid range.
1740
See also
List of ErrorIDs and ErrorInfos (technology objects as of V2.0) (Page 2857) Overview of the Motion Control statements (Page 2823) Changing the configuration of dynamics in the user program (Page 2794) Changing the homing configuration in the user program (Page 2801) MC_Power: Enable, disable axis (Page 1709) MC_Reset: Acknowledge error (Page 1714) MC_Home: Home axes, set home position (Page 1715) MC_Halt: Halt axis (Page 1718) MC_MoveAbsolute: Absolute positioning of axes (Page 1722) MC_MoveRelative: Relative positioning of axes (Page 1725) MC_MoveVelocity: Move axes at preset rotational speed (Page 1729) MC_MoveJog: Move axes in jogging mode (Page 1733) MC_CommandTable: Run axis jobs as movement sequence (as of technology object "Axis" V2.0) (Page 1737) Tag of the Axis technology object (Page 2866)
9.8.4.3
High-speed counters
DIR
BOOL
I, Q, M, D, L or constant
CV RV
BOOL BOOL
I, Q, M, D, L or constant I, Q, M, D, L or constant
PERIOD
BOOL
I, Q, M, D, L or constant
1741
BUSY STATUS
BOOL WORD
I, Q, M, D, L I, Q, M, D, L
Description
With the "Control high-speed counters" operation, you can make parameter settings and control the high-speed counters supported by the CPU by loading new values into the counter. The operation can only execute if a high-speed counter you want to control is enabled. It is not possible to insert or execute multiple "Control high-speed counters" operations simultaneously for each high-speed counter in the program. You can load the following parameter values into a high-speed counter using the "Control highspeed counters" operation: Count direction (NEW_DIR): The count direction defines whether a high-speed counter counts up or down. The count direction is defined by the following values at the NEW_DIR input: 1 = up, -1 = down. A change to the count direction with the "Control high-speed counters" operation is possible only when direction control is set in the parameters by the program. The count direction specified at the NEW_DIR input is loaded into a high-speed counter when the bit at the DIR input is set. Count value (NEW_CV): The count value is the initial value at which a high-speed counter starts counting. The count value can be in a range from -2147483648 to 2147483647. The count value specified at the NEW_CV input is loaded into a high-speed counter when the bit at the CV input is set. Reference value (NEW_RV): You can compare the reference value with the current counter value to trigger an alarm. The reference value like the counter value can be in a range from -2147483648 to 2147483647. The reference value specified at the NEW_RV input is loaded into a high-speed counter when the bit at the RV input is set. Period of the frequency measurement (NEW_PERIOD): The period of the frequency measurement is specified by the following values at the NEW_PERIOD input: 10 = 0.01s, 100 = 0.1s, 1000 = 1s. The period can be updated when the "Frequency measurement" function is set in the parameters of the specified high-speed counter. The period specified at the NEW_PERIOD input is loaded into a high-speed counter if the bit at the PERIOD input is set. The "Control high-speed counters" operation is only executed if the signal state at the EN input is "1". As long as the operation is executing, the bit at the BUSY output is set. Once the operation has executed completely, the bit at the BUSY output is reset.
1742
Parameter STATUS
At the STATUS output, you can query whether errors occurred during execution of the "Control high-speed counters" operation. The following table shows the meaning of the values output at the STATUS output:
Error code (hexadecimal) 0 80A1 80B1 80B2 80B3 80B4 80C0 Description No error Hardware identifier of the high-speed counter invalid Count direction (NEW_DIR) invalid Count value (NEW_CV) invalid Reference value (NEW_RV) invalid Period of the frequency measurement (NEW_PERIOD) invalid Multiple access to the high-speed counter
9.8.5
9.8.5.1
Communication
Communications processor
1743
Parameters
The following table shows the parameters of the "PORT_CFG" instruction:
Parameter REQ PORT PROTOCOL Declaration Input Input Input Data type BOOL PORT (UINT) UINT Memory area I, Q, M, D, L D, L or constant I, Q, M, D, L or constant Description Activates the configuration change on a rising edge Identification of the communication port (HW-ID) Transmission protocol: 0: Point-to-point communication protocol 1..n: Future definition for specific transmission protocols BAUD Input UINT I, Q, M, D, L or constant Baud rate of the port: 1: 300 baud 2: 600 baud 3: 1200 baud 4: 2400 baud 5: 4800 baud 6: 9600 baud (default) 7: 19200 baud 8: 38400 baud 9: 57600 baud 10: 76800 baud 11: 115200 baud PARITY Input UINT I, Q, M, D, L or constant Parity of the port: 1: No parity (default) 2: Even parity 3: Odd parity 4: Mark parity 5: Space parity DATABITS Input UINT I, Q, M, D, L or constant I, Q, M, D, L or constant Bits per character: 1: 8 bits per character (default) 2: 7 bits per character STOPBITS Input UINT Number of stop bits: 1: 1 stop bit (default) 2: 2 stop bits
1744
You will find more detailed information on valid data types in "Overview of the valid data types (Page 677)".
STATUS parameter
Error code (W#16#...) 80A0 80A1 80A2 80A3 80A4 80A5 80A6 80A7 The specified protocol is invalid. The specified baud rate is invalid. The specified parity rate is invalid. The specified number of bits per character is invalid. The specified number of stop bits is invalid. The specified type of flow control is invalid. Incorrect value at the WAITTIME parameter When the data flow control is enabled, the value at the WAITTIME parameter must be greater than zero. Invalid values at XONCHAR and XOFFCHAR parameters. Description
You will find more detailed information on general error codes of the communication instructions in: "General status information of the communications blocks (Page 1760)".
1745
Parameters
The following table shows the parameters of the "SEND_CFG" instruction:
Parameter REQ PORT RTSONDLY Declaration Input Input Input Data type BOOL PORT (UINT) UINT Memory area I, Q, M, D, L D, L or constant I, Q, M, D, L or constant Description Activates the configuration change on a rising edge Identification of the communication port (HW-ID) The time that should elapse after activating RTS until the start of transmission. Valid values for this parameter are as follows: 0 (default) 0 to 65535 ms in steps of 1 ms This parameter does not apply to RS-485 modules. RTSOFFDLY Input UINT I, Q, M, D, L or constant Time that should elapse after the end of transmission until deactivation of RTS. Valid values for this parameter are as follows: 0 (default) 0 to 65535 ms in steps of 1 ms This parameter does not apply to RS-485 modules. BREAK Input UINT I, Q, M, D, L or constant Specifies the bit times for a break, which are sent at the start of the message. 12 bit times are set as default. A maximum of 25000 bit times can be specified.
1746
You will find more detailed information on valid data types in "Overview of the valid data types (Page 677)".
STATUS parameter
Error code (W#16#...) 80B0 80B1 80B2 The configuration of a transmission interruption is not permitted. The specified break time exceeds the permitted maximum of 25000 bit times. The specified time for idle line exceeds the permitted maximum of 25000 bit times. Description
You will find more detailed information on general error codes of the communication instructions in: "General status information of the communications blocks (Page 1760)".
1747
Parameters
The following table shows the parameters of the "RCV_CFG" instruction:
Parameter REQ PORT CONDITIONS DONE Declaration Input Input Input Output Data type BOOL PORT (UINT) CONDITIONS BOOL Memory area I, Q, M, D, L D, L or constant D, L I, Q, M, D, L Description Activates the configuration change on a rising edge. Identification of the communication port (HW-ID) Data structure defining the conditions for start and end of data transmission. Status parameter with the following values: 0: Job not yet started or is still executing 1: Job completed error-free ERROR Output BOOL I, Q, M, D, L Status parameter with the following values: 0: No error 1: Error occurred. STATUS Output WORD I, Q, M, D, L Status of the instruction
You will find more detailed information on valid data types in "Overview of the valid data types (Page 677)".
1748
1749
1750
1751
STATUS parameter
Error code (W#16#...) 80C0 80C1 80C2 80C3 80C4 80C5 Error in start condition Error in end condition No end condition defined Receive interrupt enabled A value that is equal to 0 or greater than 4132 was entered at the MAXLEN parameter while the "Maximum length" end condition was set. A value that is greater than 4131 was entered at the N parameter while the "N+LEN+M" end condition was set. A value that is equal to 0 or invalid was entered at the LENGTHSIZE parameter while the "N+LEN+M" end condition was set. Description
1752
You will find more detailed information on general error codes of the communication instructions in: "General status information of the communications blocks (Page 1760)".
Parameters
The following table shows the parameters of the "SEND_PTP" instruction:
Parameter REQ Declaration Input Data type BOOL Memory area I, Q, M, D, L Description Enables the requested transmission on a rising edge of this enable input. The content of buffer is transmitted to the point-to-point communication module (CM). Identification of the communication port (HW-ID) Pointer to the start address of the send buffer. Boolean values or Array of BOOL are not supported. Length of the send buffer
1753
You will find more detailed information on valid data types in "Overview of the valid data types (Page 677)".
STATUS parameter
Error code (W#16#...) 7000 7001 7002 8080 8088 80D0 80D1 80D2 80D3 The send operation is not active. The send operation is processing the first call. The send operation is processing subsequent calls (queries following the first call). The identifier entered for the communications port number is invalid. The length of the LENGHT parameter does not correspond to the length of data to be sent. See also: Parameters LENGHT and BUFFER. A new send request was received while a transmission was taking place. The transmission was interrupted because the CTS signal was not confirmed within the specified wait time. The send request was interrupted because the communications partner (DCE) signaled that it was not willing to receive (DSR). The send request was interrupted because the maximum size of the waiting loop was exceeded (more than 1024 Byte). Description
You will find more detailed information on general error codes of the communication instructions in: "General status information of the communications blocks (Page 1760)".
1754
LENGTH > 0
ARRAY
Parameters
The following table shows the parameters of the "RCV_PTP" instruction:
Parameter EN_R PORT Declaration Input Input Data type BOOL PORT (UINT) Memory area I, Q, M, D, L D, L or constant Description Enables receipt on a rising edge Identification of the communication port (HW-ID)
1755
You will find more detailed information on valid data types in "Overview of the valid data types (Page 677)".
STATUS parameter
Error code (W#16#....) 80E0 80E1 80E2 80E3 80E4 8080 8088 0094 0095 0096 0097 0098 0099 Receipt of messages was terminated because the receive buffer is full. Receipt of messages was terminated as a result of a parity error. Receipt of messages was terminated as a result of a framing error. Receipt of messages was terminated as a result of an overflow error. Receipt of messages was terminated because the calculated message length (N+LEN+M) exceeds the size of the receive buffer. The identifier entered for the communications port number is invalid. A data type STRING is referenced via the BUFFER parameter. Receipt of messages was terminated because the maximum character length was received. Receipt of messages was terminated as a result of a timeout. Receipt of messages was terminated because of a timeout within the character string. Receipt of messages was terminated as a result of a reply timeout. Receipt of messages was terminated because the "N+LEN+M" length condition has been satisfied. Receipt of messages was terminated because the character string defined as the end condition was received. Description
You will find more detailed information on general error codes of the communication instructions in: "General status information of the communications blocks (Page 1760)".
1756
Parameters
The following table shows the parameters of the "RCV_RST" instruction:
Parameter REQ PORT DONE Declaration Input Input Output Data type BOOL PORT (UINT) BOOL Memory area I, Q, M, D, L D, L or constant I, Q, M, D, L Description Enables deleting of the receive buffer on a rising edge Identification of the communication port (HW-ID) Status parameter with the following values: 0: Job not yet started or is still executing 1: Job completed error-free ERROR Output BOOL I, Q, M, D, L Status parameter with the following values: 0: No error 1: Error occurred STATUS Output WORD I, Q, M, D, L Status of the instruction You will find more detailed information on general error codes of the communication instructions in: "General status information of the communications blocks (Page 1760)".
You will find more detailed information on valid data types in "Overview of the valid data types (Page 677)".
Parameters
The following table shows the parameters of the "SGN_GET" instruction:
Parameter REQ PORT NDR Declaration Input Input Output Data type BOOL PORT (UINT) BOOL Memory area I, Q, M, D, L D, L or constant I, Q, M, D, L Description Enables the query on a rising edge Identification of the communication port (HW-ID) Is set for one cycle if new data are ready for sending and the instruction was executed errorfree. Data terminal ready, module ready Data set ready, communications partner ready Send request, module ready to send Clear to send, communications partner can receive data (reaction to RTS = ON of the module).
I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L
1757
You will find more detailed information on valid data types in "Overview of the valid data types (Page 677)".
STATUS parameter
Error code (W#16#....) 80F0 The communication module is an RS-485 module and no signals are available. Description
You will find more detailed information on general error codes of the communication instructions in: "General status information of the communications blocks (Page 1760)".
Parameters
The following table shows the parameters of the "SGN_SET" instruction:
Parameter REQ PORT SIGNAL Declaration Input Input Input Data type BOOL PORT (UINT) BYTE Memory area I, Q, M, D, L D, L or constant I, Q, M, D, L or constant Description Activates the action on a rising edge Initial value: FALSE Identification of the communication port (HW-ID) Initial value: 0 Specifies the signals to be set: Set 01H = RTS Set 02H = DTR Set 04H = DSR Initial value: FALSE
1758
You will find more detailed information on valid data types in "Overview of the valid data types (Page 677)".
STATUS parameter
Error code (W#16#...) 80F0 80F1 80F2 80F3 Description The communication module is an RS-485 module and no signals are available. No signals are settable because H/W flow control is enabled. The DSR signal cannot be set because the module is a DTE device. The DTR signal cannot be set because the module is a DCE device.
You will find more detailed information on general error codes of the communication instructions in: "General status information of the communications blocks (Page 1760)".
1759
General status information of the communications blocks General information on execution status of the communications blocks
The following table shows which general information can be output at the STATUS parameter of the communications blocks:
Error code (W#16#....) 8070 8080 8081 8085 8090 8091 8092 All internal instance memory is in use The identifier entered for the communications port is invalid Timeout, module error, internal error Error specifying the length at the LENGHT parameter. The specified length is "0" or greater than the maximum permitted value. Message length invalid, module invalid, message invalid Incorrect version in parameterization message Invalid record length in parameterization message Description
1760
Requirements for using the USS protocol General requirements for setting up a drive
The use of 4 PKW words must be set up for the drives. The drives can be configured for 2, 4, 6 or 8 PZD words. The number of PZD words in the drive must match the PZD_LEN input of the "USS_DRV (Page 1765)" instruction of the drive. The baud rate of all drives must match the baud rate of the BAUD input parameter of the "USS_PORT (Page 1764)" instruction. The drive must be set up for remote control. USS must be specified for the desired frequency value on the COM connection of the drive. 1 to 16 must be set as the drive address. This address must match the address of the DRIVE input parameter of the "USS_DRV (Page 1765)" instruction. To control the direction of the drive, the polarity of the drive desired value must be set up. The RS-485 network must be connected correctly.
1761
Description
Each communication module CM 1241 RS485 supports a maximum of 16 drives. A single instance data block contains temporary memory and buffer functions for all drives in the USS network that are connected to a PtP communications module you installed. The USS instructions for these drives have shared access to the information in this data block.
1762
All drives (max. 16) that are connected to an RS485 port are part of the same USS network. All drives that are connected to a different RS485 port are part of a different USS network. As the S7-1200 supports up to three CM 1241 RS485 modules, you can set up up to three USS networks, each having a maximum of 16 drives, thus a total of 48 USS drives are supported. Each USS network is managed via a unique data block (three data blocks are required for three USS networks with three CM 1241 RS485 modules). All instructions that belong to a USS network must share this data block. This includes all "USS_DRV (Page 1765)", "USS_PORT (Page 1764)", "USS_RPM (Page 1768)", and "USS_WPM (Page 1769)" instructions for controlling all drives in a USS network. The instruction "USS_DRV (Page 1765)" is a function block (FB). When you insert the instruction "USS_DRV" in the editor, in the "Call options" dialog you will be asked to assign a DB to the instruction. If this is the first "USS_DRV" instruction in this program for this USS network, you can accept the default DB assignment (or, if necessary, change the name) and the new DB is created. If this is not the first USS_DRV instruction for this network, you must select the appropriate DB that was previously assigned to this USS network in the drop-down list in the "Call options" dialog. All "USS_PORT (Page 1764), USS_RPM (Page 1768)", and "USS_WPM (Page 1769)" instructions are functions (FCs). When you insert these FCs in the editor, no DB is assigned. Instead, you have to assign the DB in question to the USS_DB input of these instructions (double-click on the parameter field and then on the icon to display the available DBs). The instruction "USS_PORT (Page 1764)" controls communication between the CPU and the drives via the PtP communications module. Whenever this instruction is called, communication with a drive is processed. Your program must call this function quickly enough so that the drives do not report a timeout. The instruction can be called from the main program or any interrupt OB. The function block "USS_DRV (Page 1765)" gives your program access to a specified drive in the USS network. Its inputs and outputs correspond to the states and operating functions of the drive. If there are 16 drives in the network, "USS_DRV" must be called at least 16 times in your program, i.e., once for each drive. How quickly these blocks are called depends on the required speed for controlling drive functions. You can only call the instruction "USS_DRV" from the main program OB. CAUTION Call "USS_DRV", "USS_RPM", "USS_WPM" only from the main program OB. The instruction "USS_PORT" can be called from any OB, it is usually called from a time-delay interrupt OB. If the instruction "USS_PORT" is interrupted during execution, this may result in unexpected errors. The "USS_RPM" and "USS_WPM" instructions are used to read and write the operating parameters of the drive. These parameters control the internal mode of operation of the drive. A definition of these parameters can be found in the drive manual.
1763
Call
Your program must execute the "USS_PORT" instruction often enough to prevent timeouts in the drive. You should therefore call the "USS_PORT" instruction from a cyclic interrupt OB to prevent drive timeouts and keep the most recent USS data updates available for "USS_DRV (Page 1765)" calls.
1764
Parameters
The following table shows the parameters of the "USS_PORT" instruction:
Parameter PORT Declaration Input Data type PORT Memory area D, L or constant Description PtP communications port identifier Constant that can be referenced within the "Constants" tab of the default tag table. BAUD USS_DB ERROR Input Input Output DINT DINT BOOL I, Q, M, D, L or constant D I, Q, M, D, L Baud rate for USS communication. Reference to the instance DB of the "USS_DRV (Page 1765)" instruction. ERROR is set to TRUE if an error occurs. A corresponding error code will be output at the STATUS output. Status value of the request. It indicates the result of the cycle or initialization. Additional information is available in the "USS_Extended_Error (Page 1771)" tag for some status codes.
Output
WORD
I, Q, M, D, L
You will find more detailed information on valid data types in "Overview of the valid data types (Page 677)".
1765
Parameters
Expand the box to display all the parameters by clicking the bottom of the box. The parameter connections that are grayed are optional and do not need to be assigned. The following table shows the parameters of the "USS_DRV" instruction:
Parameter RUN OFF2 Declaration Input Input Data type BOOL BOOL Memory area I, Q, M, D, L or constant I, Q, M, D, L or constant I, Q, M, D, L or constant I, Q, M, D, L or constant Description Drive start bit: If this parameter has the value TRUE, this input enables the drive to run at the preset speed. "Electrical stop" bit: If this parameter has the value FALSE, this bit cause the drive to coast to a stop without braking. Fast stop bit - If this parameter has the value FALSE, this bit causes a fast stop by braking the drive. Fault acknowledge bit - This bit resets the fault bit on a drive. This bit is set after the fault is cleared to indicate to the drive that it no longer needs to indicate the previous fault. Drive direction control - This bit is set to indicate that the direction is forward (when SPEED_SP is positive). Drive address: This input is the address of the USS drive. The valid range is drive 1 to drive 16. Word length - This is the number of words of PZD data. Valid values are 2, 4, 6, or 8 words. The default is 2. Speed setpoint - This is the speed of the drive as a percentage of configured frequency. A positive value specifies forward direction (when DIR has the value TRUE). Control word 3 - A value written to a user-configurable parameter on the drive. The user must configure this on the drive. Optional parameter Control word 4 - A value written to a user-configurable parameter on the drive. The user must configure this on the drive. Optional parameter Control word 5 - A value written to a user-configurable parameter on the drive. The user must configure this on the drive. Optional parameter Control word 6 - A value written to a user-configurable parameter on the drive. The user must configure this on the drive.
OFF3 F_ACK
Input Input
BOOL BOOL
SPEED_SP
Input
REAL
CTRL3
Input
WORD
CTRL4
Input
WORD
CTRL5
Input
WORD
CTRL6
Input
WORD
1766
CTRL8
Input
WORD
NDR
Output
BOOL
ERROR
Output
BOOL
I, Q, M, D, L
Output
WORD
I, Q, M, D, L
I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L
SPEED
Output
REAL
I, Q, M, D, L
I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L I, Q, M, D, L
You will find more detailed information on valid data types in "Overview of the valid data types (Page 677)".
1767
Parameters
The following table shows the parameters of the "USS_RPM" instruction:
Parameter REQ Declaration Input Data type BOOL Memory area I, Q, M, D, L Description Send request: If this parameter has the value TRUE, it indicates that a new read request is desired. This is ignored if the request for this parameter is already pending. Drive address: This input is the address of the USS drive. The valid range is drive 1 to drive 16. Parameter number: This input specifies which drive parameter is written. The range of this parameter is 0 to 2047. See your drive manual for details on how to access any parameters above this range. Parameter index: This input specifies which drive parameter index is to be written. This is a 16-bit value where the least significant byte is the actual index value with a range of (0 to 255). The most significant byte may also be used by the drive and is drivespecific. See your drive manual for additional information. Reference to the instance DB that is created and initialized when a "USS_DRV" instruction is inserted in your program. If this parameter has the value TRUE, it indicates that the VALUE output holds the previously requested read parameter value. This bit is set when the "USS_DRV" instruction recognizes the read response from the drive. This bit is reset when either: you request the response data via another "USS_RPM" poll or the second of the next two calls of "USS_DRV (Page 1765)" is executed ERROR Output BOOL I, Q, M, D, L Error occurred - If this parameter has the value TRUE, this indicates that an error has occurred and the STATUS output is valid. All other outputs are set to zero on an error. Communication errors are only reported at the ERROR and STATUS outputs of the "USS_PORT (Page 1764)" instruction.
DRIVE PARAM
Input Input
USINT UINT
I, Q, M, D, L or constant I, Q, M, D, L or constant
INDEX
Input
UINT
I, Q, M, D, L or constant
USS_DB
Input
VARIANT
DONE
Output
BOOL
I, Q, M, D, L
1768
VALUE
Output
I, Q, M, D, L
You will find more detailed information on valid data types in "Overview of the valid data types (Page 677)".
Parameters
The following table shows the parameters of the "USS_WPM" instruction:
Parameter REQ Declaration Input Data type BOOL Memory area I, Q, M, D, L Description Send request: If this parameter has the value TRUE, it indicates that a new write request is desired. This is ignored if the request for this parameter is already pending. Drive address: This input is the address of the USS drive. The valid range is drive 1 to drive 16. Parameter number: This input specifies which drive parameter is written. The range of this parameter is 0 to 2047. See your drive manual for details on how to access any parameters above this range.
DRIVE PARAM
Input Input
USINT UINT
I, Q, M, D, L or constant I, Q, M, D, L or constant
1769
EEPROM
Input
BOOL
I, Q, M, D, L or constant
VALUE
Input
I, Q, M, D, L or constant
USS_DB
InOut
This is a reference to the instance DB that is created and initialized when a "USS_DRV (Page 1765)" instruction is inserted in your program. If this parameter has the value TRUE, the VALUE input was written to the drive. This bit is set when the "USS_DRV (Page 1765)" instruction recognizes the write response from the drive. This bit is reset when either: You request the drive's confirmation that the write operation is complete via another "USS_WPM" poll or when the second of the next two calls to "USS_DRV (Page 1765)" is executed.
DONE
Output
BOOL
I, Q, M, D, L
ERROR
Output
BOOL
I, Q, M, D, L
Error occurred: If this parameter has the value TRUE, this indicates that an error has occurred and the STATUS output is valid. All other outputs are set to zero on an error. Communication errors are only reported at the ERROR and STATUS outputs of the "USS_PORT (Page 1764)" instruction. This is the status value of the request. It indicates the result of the write request. Additional information is available in the "USS_Extended_Error (Page 1771)" tag for some status codes.
Output
WORD
I, Q, M, D, L
You will find more detailed information on valid data types in "Overview of the valid data types (Page 677)".
1770
8181 8182 8183 8184 8185 8186 8187 8188 8189 818A 818B 818C 818D 818E
80Ax-80Fx
1771
MODBUS MB_COMM_LOAD: Configure port on the PtP module for Modbus RTU Description
The "MB_COMM_LOAD" instruction configures a port for communication using the Modbus RTU protocol. The following hardware can be used for this: Up to three point-to-point modules (PtP) CM 1241 RS485 or CM 1241 RS232 A communications board CB 1241 RS485 in addition to this After configuration of the port, you communicate over Modbus by executing the "MB_SLAVE" or "MB_MASTER" instruction.
Call
"MB_COMM_LOAD" must be called once to configure the port for the Modbus RTU protocol. On completion of the configuration, the port can be used by the "MB_MASTER (Page 1774)" and "MB_SLAVE (Page 1782)" instructions. "MB_COMM_LOAD" only needs to be called again if one of the communication parameters has to be modified. Each "MB_COMM_LOAD" call deletes the communications buffer. To avoid data loss during communication, you should not call the instruction unnecessarily. One instance of "MB_COMM_LOAD" must be used to configure the port of each communication module that is used for Modbus communication. You assign a unique "MB_COMM_LOAD" instance data block for each port that you use. The S7-1200 CPU is limited to three communication modules. An instance data block is assigned when you insert the "MB_MASTER (Page 1774)" or "MB_SLAVE (Page 1782)" instruction. This instance data block is referenced when you specify the MB_DB parameter on the "MB_COMM_LOAD" instruction.
1772
Parameters
The following table shows the parameters of the "MB_COMM_LOAD" instruction:
Parameter REQ PORT Declaration Input Input Data type BOOL UINT Memory area I, Q, M, D, L I, Q, M, D, L or constant Description Execution of the instruction on a rising edge. ID of the communications port: After you have inserted the communications module in the device configuration, the port ID appears in the drop-down list at the PORT box connection. This constant can also be referenced within the "Constants" tab of the tag table. Baud rate selection: 300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 76800, 115200 All other values are invalid. PARITY Input UINT I, Q, M, D, L or constant Parity selection: 0 None 1 Odd 2 Even FLOW_CTRL Input UINT I, Q, M, D, L or constant Flow control selection: 0 (default) No flow control 1 Hardware flow control with RTS always ON (does not apply to RS485 ports) 2 - Hardware flow control with RTS switched RTS_ON_DLY Input UINT I, Q, M, D, L or constant RTS on-delay selection: 0 (default) No delay of RTS active until the first character of the message is transmitted. 1 to 65535 Delay in milliseconds of "RTS active" until the first character of the message is transmitted (does not apply to RS-485 ports). RTS delays must be applied independent of the FLOW_CTRL selection. RTS_OFF_DLY Input UINT I, Q, M, D, L or constant RTS off-delay selection: 0 (default) No delay after the last character transmitted until "RTS inactive" 1 to 65535 Delay in milliseconds after the last character transmitted until "RTS inactive" (does not apply to RS-485 ports). RTS delays must be applied independent of the FLOW_CTRL selection. RESP_TO Input UINT I, Q, M, D, L or constant Response timeout: Time in milliseconds allowed by "MB_MASTER (Page 1774)" for the slave to respond. If the slave does not respond in this time, "MB_MASTER (Page 1774)" repeats the request or terminates the request with an error if the specified number of retries has been sent. 5 ms to 65535 ms (default = 1000 ms).
BAUD
Input
UDINT
I, Q, M, D, L or constant
1773
DONE ERROR
Output Output
BOOL BOOL
I, Q, M, D, L I, Q, M, D, L
You will find more detailed information on valid data types in "Overview of the valid data types (Page 677)".
STATUS parameter
Error code (W#16#...) 0000 8180 8181 8182 8183 8184 8185 Description No error Invalid value for the port ID (wrong address for the communications module). Invalid baud rate value. Invalid parity value. Invalid flow control value. Invalid value for the timeout of the response (the time before which a timeout is reported must be at least 25 ms). Incorrect pointer in the MB_DB parameter to the instance DB of the "MB_MASTER (Page 1774)" or "MB_SLAVE (Page 1782)" instruction.
MB_MASTER: Communicate via the PtP port as Modbus master Description of MB_MASTER Description
The "MB_MASTER" instruction allows your program to communicate as a Modbus master using a port on a point-to-point module (CM) or a communications board (CB). You can access data in one or more Modbus slave devices. Before the "MB_MASTER" instruction can communicate with a port, "MB_COMM_LOAD (Page 1772)" must first execute.
1774
Parameters
The following table shows the parameters of the "MB_MASTER" instruction:
Parameters REQ (Page 1777) MB_ADDR Declaration Input Data type BOOL Memory area I, Q, M, D, L Description Request input: 0 No request 1 Request to transmit data to Modbus slave(s) Input UINT I, Q, M, D, L or constant Modbus RTU station address: Default address range: 0 to 247 Extended address range: 0 to 65535 The value "0" is reserved for broadcasting a message to all Modbus slaves. Modbus function codes 05, 06, 15, and 16 are the only function codes supported for broadcast. MODE (Page 1778) Input USINT I, Q, M, D, L or constant Mode selection: Specifies the type of request: Read, write, or diagnostics: Refer to the Modbus functions table for details.
1775
DATA_LEN
Input
UINT
I, Q, M, D, L or constant M, D
Input
VARIANT
DONE
Output
BOOL
I, Q, M, D, L
You will find more detailed information on valid data types in "Overview of the valid data types (Page 677)".
STATUS parameter
Table 9-56 Error code (W#16#....) 0000 80C8 80D1 No error Slave timeout. Check the baud rate, parity and the connectors on the slave. The receiver issued a flow control request to suspend an active transmission and never re-enabled the transmission within the wait time. This error is also generated during hardware flow control if the recipient does not detect CTS within the wait time. 80D2 80E0 80E1 80E2 80E3 80E4 8180 8186 8188 8189 The send request was aborted because no DSR signal is received from the DCE. The message was terminated because the receive buffer is full. The message was terminated as a result of a parity error. The message was terminated as a result of a framing error. The message was terminated as a result of an overrun error. The message was terminated as a result of the specified length exceeding the total buffer size. Invalid value for the port ID. Invalid Modbus station address The MODE parameter has an invalid value for a broadcast call. Invalid data address value. Communications and configuration error messages of the instruction Description
1776
Table 9-57 Error code (W#16#....) 8380 8381 8382 8383 8384 8385 8386 8387 8388
Error messages of the Modbus protocol Response code of slave 01 03 02 > 03 03 Description CRC error Function code not supported Data length error Error in the data address or address outside the valid range of DATA_PTR Data value error Data diagnostic code value not supported (function code 08) Function code of the response does not match the function code of the query. Response from wrong slave The response of the slave to a write call is not correct. The data sent by the slave does not match the query from the master.
1777
Operation and data Read output bits: 1 to (1992 or 2000) bits per query Read input bits: 1 to (1992 or 2000) bits per query Read holding register: 1 to (124 or 125) WORD per query Read input WORD: 1 to (124 or 125) WORD per query Writing an output bit: One bit per query Writing a holding register: 1 WORD per query Writing multiple output bits: 2 to (1960 or 1968) bits per query Writing multiple holding registers: 2 to (122 or 123) WORD per query Writing one or more output bits: 1 to (1960 or 1968) bits per query Writing one or more holding registers:
Modbus address 1 to 9999 10001 to 19999 40001 to 49999 or 400001 to 465535 30001 to 39999 1 to 9999 40001 to 49999 or 400001 to 465535 1 to 9999 40001 to 49999 or 400001 to 465535 1 to 9999 40001 to 49999 or 400001 to 465535 -
1 to (122 or 123) WORD per query Reading out the communications status word of the slaves and the event counter: The status word indicates execution of the instruction (0: is not executing; 0xFFFF: is executing). The event counter is incremented each time a message is transferred successfully. The DATA_ADDR and DATA_LEN parameters of the "MB_MASTER" instruction are ignored with this function.
80
08
Checking the slave status by reading the error code (0x0000): 1 WORD per query
1778
Modbus address -
Reserved
For the "Extended address range", the maximum data length is reduced by one byte or one WORD depending on which data type is used for the function.
1779
EXTENDED_ ADDRESSING
BOOL
Network 2: Read 100 words from the holding register of the slave.
1780
Network 3: This is an optional network that displays the values of the first 3 words as soon as the read operation has executed.
Network 4: Write 64 bits to the process image output, starting at slave address Q2.0.
1781
MB_SLAVE: Communicate via the PtP port as Modbus slave Description of MB_SLAVE Description
The "MB_SLAVE" instruction allows your program to communicate as a Modbus slave using a port on a point-to-point module (PtP) or a communications board (CB). A Modbus RTU master can issue a request and then your program responds via "MB_SLAVE" execution. You must assign a unique instance data block when you insert the "MB_SLAVE" instruction in your program. This instance data block is used when you specify it at the MB_DB parameter of the "MB_COMM_LOAD (Page 1772)" instruction. Modbus communication function codes (1, 2, 4, 5, and 15) can read and write bits and words directly in the process image input and process image output in the target system. The following table shows the mapping of Modbus addresses to the process image in the CPU.
Modbus functions of "MB_SLAVE" Codes 01 02 04 05 15 Function Read bits Read bits Read words Write bit Write bits Data area Output Input Input Output Output Address range 1 10001 30001 1 1 to to to to to 8192 18192 30512 8192 8192 Data area Process image output Process image input Process image input Process image output Process image output S7-1200 CPU address Q0.0 to Q1023.7 I0.0 to I1023.7 IW0 to IW1022 Q0.0 to Q1023.7 Q0.0 to Q1023.7
Modbus communication function codes (function codes 3, 6, 16) use a separate holding register. To do this, you can use bit memory or a data block with the "Standard - compatible with S7-300/400" access type. You specify the type of the holding register using the MB_HOLD_REG parameter of the MB_SLAVE instruction. The following table shows the mapping of the Modbus holding register to the DB address of MB_HOLD_REG in the target system.
Modbus functions of "MB_SLAVE" Codes Function 03 06 16 Read words Write word Write words Data area Holding register Holding register Holding register Address range (WORD number) 40001 to 49999 or 400001 to 465535 40001 to 49999 or 400001 to 465535 40001 to 49999 or 400001 to 465535 Address in the DB (BYTE number) DW0 to DW19998 or DW0 to DW131068 DW0 to DW19998 or DW0 to DW131068 DW0 to DW19998 or DW0 to DW131068 S7-1200 Bit memory address (BYTE number) MW0 to CPU limit
1782
The "MB_SLAVE" instruction supports broadcast write requests from Modbus masters as long as the requests include access to valid addresses. Regardless of the validity of a request, "MB_SLAVE" gives no response to a Modbus master as the result of a broadcast request.
1783
The response timeout period is the amount of time a Modbus master waits for the start of a response from a Modbus slave. This time period is not defined by the Modbus protocol, but rather by a parameter of each Modbus master. The frequency of execution (time between one execution and the next execution) of "MB_SLAVE" must be based on the particular parameters of your Modbus master. As a minimum, you should execute "MB_SLAVE" twice within the response timeout period of the Modbus master.
Parameters
The following table shows the parameters of the "MB_SLAVE" instruction:
Parameter MB_ADDR Declaration Input Data type UINT Memory area I, Q, M, D, L or constant D Description Station address of the Modbus slave Default address range: 0 to 247 Extended address range: 0 to 65535 MB_HOLD_REG Input VARIANT Pointer to the Modbus holding register DB. The DB must be created with the "Standard - compatible with S7-300/400" access type. New data ready: 0: No new data 1: Indicates that new data has been written by the Modbus master DR Output BOOL I, Q, M, D, L Read data: 0: No data read 1: Indicates that data has been read by the Modbus master ERROR Output BOOL I, Q, M, D, L 0: No error detected 1: Error, a corresponding error code is output in the STATUS STATUS Output WORD I, Q, M, D, L Error code
NDR
Output
BOOL
I, Q, M, D, L
You will find more detailed information on valid data types in "Overview of the valid data types (Page 677)".
STATUS parameter
STATUS(W#16 #....) 80C8 80D1 Description The specified response timeout (refer to RCVTIME or MSGTIME) is "0". The receiver issued a flow control request to suspend an active transmission and never re-enabled the transmission within the wait time. This error is also generated during hardware flow control if the recipient does not detect CTS within the wait time. 80D2 The transmit request was aborted because no DSR signal is received from the DCE.
1784
Response code sent to Modbus master (B#16#...) 8380 8381 8382 8383 8384 8385 No response 01 03 02 03 03 CRC error Function code not supported or not supported in a broadcast Data length error Error in the data address or address outside the valid range of MB_HOLD_REG Data value error Data diagnostic code value not supported (function code 08)
1785
HR_Start_Offset
The addresses of the Modbus holding register start at 40001 or 400001. These addresses correspond to the start address of the holding register in the target system memory. Using the HR_Start_Offset variable, you can set the offset to a different start address. Example: A holding register starts at MW 100 and has a length of 100 WORD. With an offset of 20 in the HR_Start_Offset parameter, the holding register begins at address 40021 instead of 40001. Each address below 40021 and above 400119 causes an addressing error.
HR_Start_Offset = 0 Modbus word address Minimum Maximum 40001 40099 S7-1200 byte address MW100 MW198 HR_Start_Offset = 20 Modbus word address 40021 40119 S7-1200 byte address MW100 MW198
Extended_Addressing
To address the Modbus slave, a single byte (default address range) or a double byte (extended address range) can be configured. Extended addressing is used to address more than 247 devices in a single network. If you decide on extended addressing, you can address a maximum of 64,000 addresses. Below, you will see a frame of Modbus function 1 as an example.
Table 9-58 Function 1 Request Valid response Error response Slave address with one byte (byte 0) Byte 0 Slave address Slave address Slave address Byte 1 F code F code 0x81 Byte 2 Byte 3 Start address Length E code Byte 4 Byte 5 Length of the coils Coil data
Slave address with two bytes (byte 0 and byte 1) Byte 0 Byte 1 Slave address Slave address Slave address Byte 2 F code F code 0x81 Byte 3 Length F code Byte 4 Start address Byte 5 Coil data Byte 6 Length of the coils
1786
Network 2: Check the requests of the Modbus master in every cycle. 100 words starting at MW1000 are configured for the Modbus holding register.
MODBUS TCP MB_CLIENT: Communicating via PROFINET as a Modbus TCP client Description of MB_CLIENT Description
The "MB_CLIENT" instruction communicates as a Modbus TCP client via the PROFINET connection of the S7-1200 CPU. To use the instruction, you do not require any additional hardware module. With the "MB_CLIENT" instruction, you establish a connection between the client and the server, send requests and receive responses and control connection termination of the Modbus TCP server.
1787
Parameters
The following table shows the parameters of the "MB_CLIENT" instruction:
Parameters REQ (Page 1790) DISCONNECT (Page 1790) Declaration Input Input Data type BOOL BOOL Description Communications request to the Modbus TCP server on a rising edge. With this parameter, you control the establishment and termination of the connection to the Modbus server: 0: Establish a communications connection to the specified IP address and port number. 1: Disconnect the communications connection. No other function is executed during connection termination. CONNECT_ID Input WORD Unique ID to identify the connection. Each instance of the instructions "MB_CLIENT" and "MB_SERVER (Page 1794)" must be assigned a unique connection ID. 1st octet of the IP address* of the Modbus TCP server. 2nd octet of the IP address* of the Modbus TCP server. 3rd octet of the IP address* of the Modbus TCP server. 4th octet of the IP address* of the Modbus TCP server. IP port number of the server to which the client establishes the connection and communicates using the TCP/IP protocol (default value: 502). Selects of the mode of the request (read, write or diagnostics). Start address of the data accessed by the "MB_CLIENT" instruction. Data length: Number of bits or words for the data access (see MB_MODE and MB_DATA_ADDR parameters - data length). Pointer to the Modbus data register: The register is a buffer for the data received from the Modbus server or to be sent to the Modbus server. The pointer must reference a data block or a memory area. The bit at output parameter DONE is set to "1" as soon as the last job is completed without errors. 0: No "MB_CLIENT " job in progress 1: "MB_ CLIENT " job in progress ERROR Out BOOL 0: No error 1: Error occurred. The cause of error is indicated by the STATUS parameter. STATUS (Page 1793) Out BOOL Error code of the instruction.
MB_MODE (Page 1790) MB_DATA_ADDR (Page 1790) MB_DATA_LEN MB_DATA_PTR (Page 1792) DONE BUSY
Out Out
BOOL BOOL
* 8-bit long component of the 32-bit IPv4 IP address of the Modbus TCP server.
1788
MB_Transaction_ID
WORD
1789
RCV_TIMEOUT
REAL
2.0
See also
MB_CLIENT example 1: Send several requests via a TCP connection (Page 1798) MB_CLIENT example 2: Send multiple requests via several TCP connections (Page 1799) MB_CLIENT example 3: Coordinate several requests (Page 1800)
See also
Description of MB_CLIENT (Page 1787)
1790
See also
Description of MB_CLIENT (Page 1787)
1791
See also
Description of MB_CLIENT (Page 1787)
1792
See also
Description of MB_CLIENT (Page 1787)
1793
MB_SERVER: Communicating via PROFINET as a Modbus TCP server Description of MB_SERVER Description
The "MB_SERVER" instruction communicates as a Modbus TCP server via the PROFINET connection of the S7-1200 CPU. To use the instruction, you do not require any additional hardware module. The "MB_SERVER" instruction processes connection requests of a Modbus TCP client, receives requests from Modbus functions and sends responses.
Parameters
The following table shows the parameters of the "MB_SERVER" instruction:
Parameters DISCONNECT Declaration Input Data type BOOL Description The "MB_SERVER" instruction is used to enter into a passive connection with a partner module. The server reacts to a TCP connection request from every requesting IP address. 0: Passive communication connection can be initialized 1: Initialization of the connection termination. You can use this parameter to control when a connection request accepted. If the input to this parameter is set, no other operations are executed. CONNECT_ID Input UNIT The parameter uniquely identifies a connection within the CPU. Each individual instance of the instructions "MB_CLIENT (Page 1787)" and "MB_SERVER" must have a unique CONNECT_ID parameter. Start value = 502. The number of IP Ports defines which IP port is monitored for connection requests of the Modbus client. These TCP port numbers must not be used for the passive connection of the "MB_SERVER" instruction: 20, 21, 25, 80, 102, 123, 5001, 34962, 34963 and 34964. MB_HOLD_REG (Page 1797) InOut VARIANT Pointer to the Modbus holding register of the "MB_SERVER" instruction: As the holding register, use either a global data block with standard access or a memory area (M). The holding register contains the values that may be accessed by a Modbus client using the Modbus functions 3 (read), 6 (write) and 16 (read). "New Data Ready": 0: No new data 1: New data written by the Modbus client written DR Output BOOL "Data Read": 0: No data read 1: Data read by the Modbus client ERROR Output BOOL If an error occurs during the call of the "MB_SERVER" instruction, the output of the ERROR parameter is set to TRUE. Detailed information about the cause of the problem is indicated by the STATUS parameter. Error code of the instruction.
IP_PORT
Input
UINT
NDR
Output
BOOL
Output
WORD
1794
Incoming Modbus messages with the function codes 3, 6 and 16 write to or read from the Modbus holding registers (you specify the holding registers with the MB_HOLD_REG parameter).
1795
Exception_Count Success_Count
WORD WORD
0 0
1796
See also
MB_SERVER example: Multiple TCP connections (Page 1801)
See also
Description of MB_SERVER (Page 1794)
1797
The MB_HOLD_REG parameter has an invalid pointer. Data area is too small. The MB_HOLD_REG parameter references an an optimized data block. Either use a data block with standard access or a memory area Error due to timeout of execution (more than 55 seconds). Function code is not supported. Error in data length Error in data address or access outside the address area of the holding register (MB_HOLD_REG (Page 1797) parameter). Error in data value Value of the diagnostic code is not supported (only with function code 08).
01 03 02 03 03
See also
Description of MB_SERVER (Page 1794)
Examples MB_CLIENT example 1: Send several requests via a TCP connection Description
Several requests of the Modbus Client can be sent via a TCP connection. To do this, use the same instance DB, the same connection ID and the same port number. Only one client can be active at any one time. After processing of a client has been completed, the next client is processed. The order of execution must be defined in the program. In the following sample program, the value of the STATUS output parameter is also copied.
1798
MB_CLIENT example 2: Send multiple requests via several TCP connections Description
Requests from the Modbus client can be sent via different TCP connections. If you require this, use a different instance DB and a different connection ID. Use a different port number, if the connections are to the same Modbus server. If the connections are to different Modbus servers, you can freely assign the port number.
1799
1800
1801
9.8.5.2
S7 communication
Example
An inconsistency can arise if a communication block is interrupted, for example, by a hardware interrupt OB with a higher priority. If the user program in this OB now changes the data which
1802
Effect
If larger packages of data are to be transferred in a consistent form, the transfer should not be interrupted. This can, for example, increase the interrupt reaction time of the CPU. In other words: The greater the quantity of data which must be transferred with absolute consistency, the longer the interrupt reaction time of a system.
1803
Control parameters
Data exchange will only be activated if the appropriate control parameters have a defined value (for example, are set) when the instruction is called or when the value has undergone a specific change since the previous call (for example, a positive edge). Note First call For the first call, set the REQ parameter to FALSE .
Addressing parameter ID
The parameter ID is a reference to the local connection description (specified by the configuration of the connection). Note Addressing parameter ID You can reassign the addressing parameter ID during runtime. The new parameter is validated with each new job after the previous job has been closed. You can save instance DBs and therefore work memory if you use an instance data block for several connections via IDs.
Status parameters
With the status parameters, you monitor whether the instruction has completed its task correctly or whether it is still active. The status parameters also indicate errors. Note The status parameters are valid for one cycle only, namely from the first command following the call until the next call. As a result, you must evaluate these parameters after each instruction cycle.
1804
1805
Parameters
The following table shows the parameters of the "GET" instruction:
Parameters REQ ID Declaration Input Input Data type BOOL CONN_PRG (WORD) BOOL Memory area I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L Description Control parameter request, activates the data exchange on a rising edge. Addressing parameter ID, see also: Common parameters of instructions for S7 communication (Page 1803) Status parameter NDR: 0: Job not yet started or still executing. 1: Job completed without errors. ERROR STATUS Output Output BOOL WORD I, Q, M, D, L I, Q, M, D, L Status parameters ERROR and STATUS, error code: ERROR=0 STATUS has the value: 0000H: Neither warning nor error <> 0000H: Warning, STATUS supplies detailed information.
NDR
Output
ERROR=1 An error has occurred, STATUS supplies detailed information on the type of error. ADDR_1 ADDR_2 ADDR_3 ADDR_4 RD_1 RD_2 RD_3 RD_4 InOut InOut InOut InOut InOut InOut InOut InOut REMOTE REMOTE REMOTE REMOTE VARIANT VARIANT VARIANT VARIANT I, Q, M, D, L D Pointers to the areas on the partner CPU that are to be read. Only absolute addressing is permitted for the data type REMOTE (example: P#DB10.DBX5.0 Byte 10). Pointers to the areas on the local CPU in which the read data are entered. Only data types BOOL are permitted (for a bit field the address must be "0" and the length an integer multiple of byte), BYTE, CHAR, WORD, INT, DWORD, DINT, REAL.
You will find more detailed information on valid data types in "Overview of the valid data types (Page 677)".
1806
Note Data consistency Data is received consistently if you read the part of the receive area RD_i currently being used completely before initiating another job.
1807
Parameters
The following table shows the parameters of the "PUT" instruction:
Parameters REQ ID Declaration Input Input Data type BOOL CONN_PRG (WORD) DONE Output BOOL Memory area I, Q, M, D, L I, Q, M, D, L or constant I, Q, M, D, L Description Control parameter request, activates the data exchange on a rising edge. Addressing parameter ID, see also: Common parameters of instructions for S7 communication (Page 1803) Status parameter DONE: 0: Job not yet started or still executing 1: Job has been executed error-free. ERROR STATUS Output Output BOOL WORD I, Q, M, D, L I, Q, M, D, L Status parameters ERROR and STATUS, error code: ERROR=0 STATUS has the value: 0000H: Neither warning nor error <> 0000H: Warning, STATUS supplies detailed information.
ERROR=1 There is an error. STATUS supplies detailed information on the type of error. ADDR_1 ADDR_2 ADDR_3 ADDR_4 InOut InOut InOut InOut REMOTE REMOTE REMOTE REMOTE D Pointers to the areas on the partner CPU to which the data will be written. Only absolute addressing is permitted for the data type REMOTE (example: P#DB10.DBX5.0 Byte 10).
1808
You will find more detailed information on valid data types in "Overview of the valid data types (Page 677)".
1809
Data consistency
When a send operation is activated (rising edge at REQ), the data to be sent from the send area SD_i is copied from the user program. After the block call, you can write to these areas without corrupting the current send data. Note The send operation is only complete when the DONE status parameter has the value "1".
9.8.5.3
1810
Parameters
The following table shows the parameters of the "TSEND_C" instruction:
Parameter REQ CONT Declaration Input Input Data type BOOL BOOL Memory area I, Q, M, D, L I, Q, M, D, L Description Starts the send job on a rising edge. Controls the communications connection: 0: Disconnect the communications connection 1: Establish and maintain the communications connection When sending data (rising edge at the REQ parameter), the CONT parameter must have the value TRUE in order to establish or maintain a connection. LEN Input UINT I, Q, M, D, L or constant Maximum number of bytes to be sent with the job . If you use purely symbolic values at the DATA parameter, the LEN parameter must have the value "0". Pointer to the connection description See also: Auto-Hotspot DATA COM_RST InOut InOut VARIANT BOOL I, Q, M, D, L I, Q, M, D, L Pointer to the send area containing the address and the length of the data to be sent. Restarts the instruction: 0: Irrelevant 1: Complete restart of the instruction causing an existing connection to be terminated and a new connection to be established. DONE Output BOOL I, Q, M, D, L Status parameter with the following values: 0: Job not yet started or is still executing 1: Job completed error-free BUSY Output BOOL I, Q, M, D, L Status parameter with the following values: 0: Job not yet started or already completed 1: Job not yet completed. A new job cannot be started. ERROR Output BOOL I, Q, M, D, L Status parameter with the following values: 0: No error 1: Error occurred STATUS Output WORD I, Q, M, D, L Status of the instruction
CONNECT
InOut
TCON_Param
You will find more detailed information on valid data types in "Overview of the valid data types (Page 677)".
1811
Local or remote port is being used by the system. Attempt being made to terminate a non-existent connection. IP address of the remote endpoint of the connection is invalid, in other words, it matches the IP address of the local partner. Communications error: You called the COM_RST = 1 instruction before the send job was complete. The CONNECT parameter points to a data block that was generated with the attribute Only store in load memory. Inconsistent parameter assignment: Group error for error codes 80A0 to 80A2, 80A4, 80B4 to 80B9. You have violated one or both of the following conditions for passive connection establishment (active_est = FALSE) when using the ISO-on-TCP protocol variant (connection_type = B#16#12): "local_tsap_id_len >= B#16#02", and/or "local_tsap_id[1] = B#16#E0".
1812
1 1 1 1 1 1 1 1 1
See also
TCON: Establish communication connection (Page 1819)
1813
1814
B#16#11 The data are available as soon as the data length specified at the LEN parameter was fully received. B#16#12 The data are available as soon as the data length specified at the LEN parameter was fully received.
1 to 8192
1815
Parameters
The following table shows the parameters of the "TRCV_C" instruction:
Parameters EN_R CONT Declaration Input Input Data type BOOL BOOL Memory area I, Q, M, D, L I, Q, M, D, L Description Receive enable Controls the communications connection: 0: Automatically disconnect communications connection after data have been sent 1: Establish and maintain the communications connection When receiving data (rising edge at the EN_R parameter), the CONT parameter must have the value TRUE in order to establish or maintain a connection. LEN Input UINT I, Q, M, D, L or constant D I, Q, M, D, L I, Q, M, D, L Maximum length of the data to be received. If you use purely symbolic values at the DATA parameter, the LEN parameter must have the value "0". Pointer to the connection description See also: Auto-Hotspot DATA COM_RST InOut InOut VARIANT BOOL Pointer to the receive area Restarts the instruction: 0: Irrelevant 1: Complete restart of the instruction causing an existing connection to be terminated DONE Output BOOL I, Q, M, D, L Status parameter with the following values: 0: Job not yet started or is still executing 1: Job completed error-free BUSY Output BOOL I, Q, M, D, L Status parameter with the following values: 0: Job not yet started or already completed 1: Job not yet completed. A new job cannot be started ERROR Output BOOL I, Q, M, D, L Status parameter ERROR: 0: No error 1: Error occurred STATUS RCVD_LEN Output Output WORD UINT I, Q, M, D, L I, Q, M, D, L Status of the instruction Amount of data actually received in bytes
CONNECT
InOut
TCON_Param
You will find more detailed information on valid data types in "Overview of the valid data types (Page 677)".
1816
1817
1 1 1 1
Note Error messages of the instructions "TCON", "TRCV" and "TDISCON" Internally, the TRV_C instruction uses the "TCON (Page 1819)", "TRCV (Page 1826)" and "TDISCON (Page 1821)" instructions. The error messages of these instructions are contained in the respective descriptions.
1818
Parameters
The following table shows the parameters of the "TCON" instruction:
Parameter REQ ID CONNECT DONE Declaration Input Input InOut Output Data type BOOL CONN_OUC (WORD) TCON_Param BOOL D I, Q, M, D, L Memory area I, Q, M, D, L L, D or constant Description Starts the job to establish the connection specified in the ID on a rising edge. Reference to the assigned connection. Range of values: W#16#0001 to W#16#0FFF Pointer to the connection description See also: Auto-Hotspot Status parameter with the following values: 0: Job not yet started or is still executing 1: Job completed error-free
1819
You will find more detailed information on valid data types in "Overview of the valid data types (Page 677)".
1820
1 1 1
Functional description
"TDISCON" is an asynchronous instruction, in other words, its job processing extends over multiple calls. You start the job for terminating a connection by calling the "TDISCON" instruction with REQ = 1. After "TDISCON" has been successfully executed, the ID specified for "TCON (Page 1819)" is no longer valid and cannot be used for sending or receiving.
1821
Parameters
The following table shows the parameters of the instruction "TDISCON":
Parameter REQ Declaration Input Data type BOOL Memory area I, Q, M, D, L Description Control parameter REQUEST starts the job for terminating the connection specified by ID. The job starts at rising edge. Reference to the connection to the remote partner or between the user program and the communications level of the operating system that is to be terminated. ID must be identical to the associated parameter ID in the local connection description. Range of values: W#16#0001 to W#16#0FFF DONE Output BOOL I, Q, M, D, L Status parameter DONE: 0: Job not yet started or still executing. 1: Job executed without error. BUSY ERROR Output Output BOOL BOOL I, Q, M, D, L I, Q, M, D, L BUSY = 1: The job is not yet completed. BUSY = 0: The job is completed. Status parameter ERROR: ERROR=1: An error has occurred during processing, STATUS supplies detailed information on the type of error. STATUS Output WORD I, Q, M, D, L Status parameter STATUS: Error information
ID
Input
CONN_OUC (WORD)
L, D or constant
You will find more detailed information on valid data types in "Overview of the valid data types (Page 677)".
1822
Parameters
The following table shows the parameters of the "TSEND" instruction:
Parameter REQ ID Declaration Input Input Data type BOOL CONN_OUC (WORD) Memory area I, Q, M, D, L D, L or constant Description Starts the send job on a rising edge. Reference to the connection established with "TCON". Range of values: W#16#0001 to W#16#0FFF
1823
DATA
InOut
VARIANT
I, Q, M, D
You will find more detailed information on valid data types in "Overview of the valid data types (Page 677)".
1824
Note Because "TSEND" is executed asynchronously, you must keep the data in the send area consistent until the DONE parameter or the ERROR parameter changes to the value "1".
1825
TCP (Ad-hoc mode) TCP (Receipt of data with specified length) ISO on TCP (Protocol-controlled data transfer)
The data is immediately available. The data is available as soon as the data length specified at the LEN parameter was fully received. The data is available as soon as the data length specified at the LEN parameter was fully received.
65535 1 to 8192
1 to 1472 Identical to the value at the LEN parameter Identical to the value at the LEN parameter
B#16#12
1826
Parameters
The following table shows the parameters of the "TRCV" instruction:
Parameter EN_R ID Declaration Input Input Data type BOOL CONN_OUC (WORD) LEN Input UINT I, Q, M, D, L or constant I, Q, M, D I, Q, M, D, L Memory area I, Q, M, D, L D, L or constant Description Receive enable Reference to the connection established with "TCON". Value range: W#16#0001 to W#16#0FFF Length of the receive area in bytes. If you use purely symbolic values at the DATA parameter, the LEN parameter must have the value "0". Pointer to the receive area Status parameter with the following values: 0: Job not yet started or is still executing 1: Job completed error-free BUSY Output BOOL I, Q, M, D, L Status parameter with the following values: 0: Job not yet started or already completed 1: Job not yet completed. A new job cannot be started ERROR Output BOOL I, Q, M, D, L Status parameter ERROR: 0: No error 1: Error occurred STATUS RCVD_LEN Output Output WORD UINT I, Q, M, D, L I, Q, M, D, L Status of the instruction Amount of data actually received in bytes
DATA NDR
InOut Output
VARIANT BOOL
You will find more detailed information on valid data types in "Overview of the valid data types (Page 677)".
1827
Note Because "TRCV" is executed asynchronously, the data in the receive area is only consistent when the NDR parameter is set to the value "1".
1828
Structure of the address information for the remote partner with UDP Overview
With "TUSEND (Page 1830)", you transfer the address information of the receiver at the ADDR parameter. This address information must have the structure specified below. With "TURCV (Page 1833)", you receive the address of the sender of the received data at the ADDRparameter. This address information must have the structure specified below.
1829
Configuration of the address information for the remote partner for "TADDR_PAR" (UDT 66)
Byte 0 to 3 Parameter rem_ip_addr Data type ARRAY [1..4] of BYTE Start value B#16#00 ... Description IP address of the remote partner, e.g. 192.168.002.003: rem_ip_addr[1] = B#16#C0 (192) rem_ip_addr[2] = B#16#A8 (168) rem_ip_addr[3] = B#16#02 (002) rem_ip_addr[4] = B#16#03 (003) 4 to 5 rem_port_nr ARRAY [1..2] of BYTE B#16#00 ... remote port no. (possible values see: Auto-Hotspot): rem_port_nr[1] = high byte of the port no. in hexadecimal notation rem_port_nr[2] = low byte of port no. in hexadecimal notation 6 to 7 spare ARRAY [1..2] of BYTE B#16#00 ... Standby: Assign "0" to this parameter.
Functional description
"The TUSEND" instruction works asynchronously; that is, its job processing extends over multiple calls. You start the job by calling "TUSEND" with REQ = 1. The job status is indicated by the output parameters BUSY and STATUS. Here, STATUS corresponds to the output parameter RET_VAL of the asynchronous instructions. See also: Meaning of the parameters REQ, RET_VAL and BUSY with asynchronous instructions (Page 1136). The following table shows the relationship between BUSY, DONE, and ERROR. Using this table, you can determine the current status of "TUSEND" or when the send process is concluded.
1830
Note Due to the asynchronous operation of "TUSEND", make sure the data in the send area remains consistent until the DONE parameter or the ERROR parameter has the value TRUE.
Parameters
The following table shows the parameters of the instruction "TUSEND":
Parameters REQ Declaration Input Data type BOOL Memory area I, Q, M, D, L Description Control parameter REQUEST starts the send job on a rising edge. The data is transferred from the area specified by DATA and LEN. ID Input WORD M, D or constant Reference to the associated connection between the user program and the communication layer of the operating system. ID must be identical to the associated parameter ID in the local connection description. Range of values: W#16#0001 to W#16#0FFF LEN Input UINT I, Q, M, D, L Number of bytes to be sent with the job Range of values: 1 to 1472 DONE Output BOOL I, Q, M, D, L Status parameter DONE: 0: Job not yet started or still executing. 1: Job executed without error. BUSY Output BOOL I, Q, M, D, L BUSY = 1: The job is not yet completed. A new job cannot be triggered. BUSY = 0: The job is completed. ERROR Output BOOL I, Q, M, D, L Status parameter ERROR: ERROR=1: Error occurred during processing. STATUS supplies detailed information on the type of error STATUS Output WORD M, D Status parameter STATUS: Error information
1831
You will find more detailed information on valid data types in "Overview of the valid data types (Page 677)".
1832
Functional description
"The TURCV" instruction works asynchronously; that is, its job processing extends over multiple calls. You start the receive job by calling "TURCV" with EN_R = 1. The job status is indicated by the output parameters BUSY and STATUS. Here, STATUS corresponds to the output parameter RET_VAL of the asynchronous instructions See also: Meaning of the parameters REQ, RET_VAL and BUSY with asynchronous instructions (Page 1136). The following table shows the relationship between BUSY, NDR, and ERROR. Using this table, you can determine the current status of TURCV or when the receive process is concluded.
BUSY TRUE FALSE FALSE FALSE NDR irrelevant TRUE FALSE FALSE ERROR irrelevant FALSE TRUE FALSE Description The job is being processed. Job successfully completed. The job was stopped with an error. The cause of the error can be found in the STATUS parameter. The instruction was not assigned a (new) job.
Note Due to the asynchronous operation of "TURCV", the data in the receive area is only consistent when the NDR parameter has the value TRUE.
1833
Parameters
The following table shows the parameters of the instruction "TURCV":
Parameters EN_R Declaration Input Data type BOOL Memory area I, Q, M, D, L Description Control parameter enabled to receive: With EN_R = 1, "TURCV" is ready to receive. The receive job is being processed. Reference to the associated connection between the user program and the communication layer of the operating system. ID must be identical to the associated parameter ID in the local connection description. Value range: W#16#0001 to W#16#0FFF Length of the receive area in bytes: 0 (recommended) or 1 to 1472 Status parameter NDR: NDR = 0: Job not yet started or still running. NDR = 1: Job successfully completed ERROR Output BOOL I, Q, M, D, L Status parameter ERROR: ERROR=1: Error occurred during processing. STATUS supplies detailed information on the type of error BUSY Output BOOL I, Q, M, D, L BUSY = 1: The job is not yet completed. A new job cannot be triggered. BUSY = 0: The job is completed. STATUS RCVD_LEN DATA Output Output InOut WORD UINT VARIANT M, D I, Q, M, D, L I, Q, M, D Status parameter STATUS: Error information Amount of data actually received, in bytes Receive area The address references: The process image input The process image output A bit memory address A data block ADDR InOut VARIANT D Pointers to the address of the receiver (for example, P#DB100.DBX0.0 byte 8), see also: Structure of the address information for the remote partner with UDP (Page 1829)
ID
Input
WORD
M, D or constant
LEN NDR
Input Output
UINT BOOL
I, Q, M, D, L I, Q, M, D, L
You will find more detailed information on valid data types in "Overview of the valid data types (Page 677)".
1834
See also
TCON: Establish communication connection (Page 1819) TDISCON: Terminate communication connection (Page 1821)
1835
Functional description
The "T_CONFIG" instruction works asynchronously, that is, its execution extends over multiple calls. You start the transfer operation by calling "T_CONFIG" with REQ = 1. Only one job can be active at any time. The job status is indicated by the output parameters BUSY and STATUS. The following table shows the relationship between BUSY, DONE, and ERROR. Using this table, you can determine the current status of the instruction and when the transfer of configuration data is concluded.
BUSY TRUE FALSE FALSE FALSE DONE irrelevant TRUE FALSE FALSE ERROR irrelevant FALSE TRUE FALSE Description The job is being processed. Job successfully completed. The job was stopped with an error. The cause of the error can be found in the STATUS parameter. The instruction was not assigned a (new) job.
Parameters
The following table shows the parameters of the "T_CONFIG" instruction:
Parameters REQ Declaration Input Data type BOOL Memory area I, Q, M, D, L or constant Description You start processing of the instruction when calling the instruction with REQ = 1. When you call the instruction with REQ = 0, the status displays DONE, ERROR and STATUS will be updated. INTERFACE Input HW_INTERFACE I, Q, M, D, L or constant Hardware identification of the interface (see "Properties" in the Inspector window of the device configuration). The hardware ID is stored in the system constants of the PLC tags. Pointer to a data block in which you store the connection data. Use the pointer to reference a higher-level Struct element containing the Header, Addr and NOS fields as subelements (refer to the description of the CONF_DATA parameter).
InOut
VARIANT
1836
You will find more detailed information on valid data types in "Overview of the valid data types (Page 677)".
1837
* In the table above, f is the field_id and s the id of the subfield in which the error occurred.
1838
Field IF_CONF_Header
Use the field IF_CONF_Header to select how many subfields you want to use during execution of "T_CONFIG".
Byte 0 ... 1 2 ... 3 4 ... 5 Parameters FieldType FieldId SubfieldCount Data type UINT UINT UINT Start value Description Field type: Must always be 0. Error ID: Must always be 0. Total number of subfields in the structure
1839
Subfield IF_CONF_V4
Use the subfield IF_CONF_V4 to specify the Ethernet addresses that you want to assign to the interface of the CPU.
Byte 0 ... 1 2 ... 3 4 ... 5 Parameters Id Length Mode Data type UINT UINT UINT Start value 30 18 Description Subfield identifier Length of the subfield in bytes Validity of addressing: 1: permanent 2: temporary 6 ... 9 10 ... 12 14 ... 16 InterfaceAddress SubnetMask DefaultRouter IP_V4 * IP_V4 * IP_V4 * IP address Subnet mask Router address
* The data type IP_V4 is a structure of 4 BYTE, which includes the respective address of the respective parameter (e.g. at parameter SubnetMask the four-digit address of the subnet mask of the IP protocol).
Subfield IF_CONF_NOS
Use the subfield IF_CONF_NOS to specify the station name to be assigned during execution of the instruction "T_CONFIG".
Byte 0 ... 1 2 ... 3 Parameters Id Length Data type UINT UINT Start value 40 246 Description Subfield identifier Length of the subfield in bytes
1840
The station name is subject to the following limitations: Restricted to a total of 240 characters (lower case letters, numbers, dash, or dot) A name component within the station name, i.e., a character string between two dots, must not exceed 63 characters. No special characters such as umlauts, brackets, underscore, slash, blank space, etc. The only special character permitted is the dash. The station name must not begin or end with the "-" character. The station name must not begin with a number. The station name form n.n.n.n (n = 0, ... 999) is not permitted. The station name must not begin with the string "port-xyz" or "port-xyz-abcde" (a, b, c, d, e, x, y, z = 0, ... 9). Note You can also create an ARRAY NoS that is shorter than 240 bytes, but not less than 2 bytes. In this case, you must adjust the "Length" (length of subfield) tag accordingly.
9.8.5.4
Web server
1841
Initialization
User-defined web pages are "packed" into data blocks so that the CPU can process them. You will have to generate data blocks from the source files (HTML files, screens, Javascript files, ...) during configuration. The Web Control DB takes on a special role (default: DB 333), it includes the status and control information as well as the references to other data blocks with coded web pages. The data blocks with coded web pages are called fragment DBs. If the data blocks were loaded to the CPU, then the CPU does not "know" that the web pages in it are coded. The instruction "WWW" in the startup OB, for example, will inform the CPU which DB is the Web Control DB. The user-defined web pages will be available after this initialization via a web browser.
Synchronization
If you want the user program to interact with the user-defined web pages, then the instruction WWW must be used in the cyclical program part. Examples for interaction between user program and web page: Checking received data Compiling and returning data for web browser making request In this case it must be possible to evaluate the current status information and the web server must receive control information, such as release of a web page requested by a web browser.
Parameter
The following table shows the parameters of the instruction "WWW":
Parameter CTRL_DB RET_VAL Declaration Input Output Data type BLOCK_DB INT Description Data block that describes the user-defined web pages (web control DB) Error information
For additional information on valid data types, refer to Overview of the valid data types (Page 677).
1842
Parameter RET_VAL
Error code (W#16#...) 0000 00xy No error occurred. There are no requests by web pages that have to be released by the user program. x: indicates if an error has occurred during initialization of the web control DB (CTRL_DB): x=0: No errors occurred. x=1: Error occurred. The error is coded in the byte "CTRL_DB.last_error" of the web control DB, see description of web control DB. y: Number of the pending request. Several requests are possible (e. g. requests "0" and "1" are pending: y="3". y="1": Request "0" y="2": Request "1" y="4": Request "2" y="8": Request "3" 803A 8081 80C1 The specified web control DB does not exist on the CPU. Incorrect version or incorrect format of the web control DB There are no resources to initialize the web application. Explanation
See also
Overview of the valid data types (Page 677)
9.8.5.5
TeleService
1843
If the CPU changes to STOP mode while "TM_MAIL" is active, the communication connection to the mail server aborts. The communication connection to the mail server will also be lost if communication problems occur on the Industrial Ethernet bus. In this case the transfer of the e-mail is interrupted and it cannot reach its recipient. CAUTION Changing user programs You can change the parts of your user program that directly affect calls of "TM_MAIL" only: when the CPU is in "STOP" mode or when no mail is being sent (REQ = 0 and BUSY = 0). This relates, in particular, to deleting and replacing program blocks that contain "TM_MAIL" calls or calls for the instance of "TM_MAIL". Ignoring this restriction can tie up connection resources. The automation system can change to an undefined status for the TPC/IP communication functions via Industrial Ethernet. A warm or cold restart of the CPU is required after the changes are transferred.
Data consistency
The ADDR_MAIL_SERVER input parameter of the instruction is taken from the "TM_MAIL" instruction again each time the sending of an e-mail is triggered. If a change is made during the operation, the "new" value only becomes effective after a renewed triggering of an e-mail. In contrast, the WATCH_DOG_TIME, TO_S, CC, FROM, SUBJECT, TEXT, ATTACHMENT, and, if applicable, USERNAME and PASSWORD parameters are taken from the "TM_MAIL" instruction while it is running, which means that they may only be changed after the job is complete (BUSY = 0)
1844
Parameters
The following table shows the parameters of the "TM_MAIL" instruction:
Parameter REQ ID Declaration Input Input Data type BOOL INT Memory area I, Q, M, D, L D, L or constant Description Control parameter REQUEST: Activates the sending of an e-mail on a rising edge. Reference to the connection to be established. See ID parameter of the TCON (Page 1819), TDISCON (Page 1821), TSEND (Page 1823), and TRCV (Page 1826) instructions. A number that is not used for any additional instances of this instruction in the user program must be entered here. Input parameter for receiver addresses: STRING with a maximum length of 240 characters (see example call). STRING D Input parameter for CC recipient addresses (optional): STRING with a maximum length of 240 characters (see example call). If an empty string is assigned here, the e-mail is not sent to a CC recipient. SUBJECT TEXT Input Input STRING STRING D D Input parameter for subject of the e-mail. STRING with a maximum length of 240 characters. Input parameter for text of the e-mail (optional): Reference to a data string with a maximum length of 240 characters. If an empty string is assigned at this parameter, the e-mail is sent without text. ATTACHMENT Input VARIANT I, Q, M, D, L Input parameter for e-mail attachment: (optional): Reference to a byte/word/double word field with a maximum length of 65534 bytes. If no value is assigned, the e-mail is sent without an attachment. DONE BUSY Output Output BOOL BOOL I, Q, M, D, L I, Q, M, D, L DONE = 0: Job not yet started or still executing. DONE = 1: Job was executed error-free. BUSY = 1: The sending of the e-mail is not yet completed. BUSY=0: The processing of "TM_MAIL" was stopped. ERROR Output BOOL I, Q, M, D, L ERROR=1: An error occurred during processing. STATUS and SFC_STATUS supply detailed information about the type of error. Output/status parameter STATUS: Return value or error information of the "TM_MAIL" instruction.
Input
STRING
Output
WORD
I, Q, M, D, L
1845
USERNAME
*The values of the parameter are not modified at every call of the instruction "TM_MAIL". The values lie in the statistical parameters of the instance and are only described once at the first call of the instruction.
You will find more detailed information on valid data types in "Overview of the valid data types (Page 677)". Note Optional parameters The optional parameters CC, TEXT, and ATTACHMENT are only sent with the e-mail if the corresponding parameters contain a string of length > 0.
1846
SMTP authentication
Authentication refers here to a procedure for ensuring an identity, for example, by a password query. The "TM_MAIL" instruction supports the SMTP authentication procedure AUTH-LOGIN that is requested by most mail servers. For information about the authentication procedure of your mail server, refer to your mail server's manual or the Web site of your Internet service provider. To use the AUTH-LOGIN authentication procedure, the "TM_MAIL" instruction requires the user name with which it can log onto the mail server. This user name corresponds to the user name with which you set up a mail account on your mail server. It is made available to the "TM_MAIL" instruction in the USERNAME parameter. To log on, the "TM_MAIL" instruction also requires the associated password. This password corresponds to the password you specified when you set up your mail account. It is made available to the "TM_MAIL" instruction in the PASSWORD parameter. If no user name is specified in the DB, the AUTH-LOGIN authentication procedure is not used. The e-mail is then sent without authentication.
1847
"TM_MAIL" is active (BUSY = 1). "TM_MAIL" is active (BUSY = 1). The processing of "TM_MAIL" was completed with an error code of the internally called communication instructions.
8010
xxxx
8011
xxxx
8012
xxxx
8013
xxxx
1848
8501 8502
8535 8550
SMTP authentication incomplete. Mail server cannot be reached, you have no access rights.
8552 8554
Action aborted: Assigned memory size has been exceeded Transmission failed.
1849
Note Status error 1. An incorrect entry of the recipient addresses does not generate a status error of the "TM_MAIL" instruction. In this case, there is no guarantee that the e-mail will be sent to other recipients, even if these were entered correctly. 2. You will find more detailed information on the SMTP error code and other error codes in SMTP protocol on the Internet or in the error documentation of the mail server. You can also view the most recent message from the mail server in your instance DB in the BUFFER1 parameter. If you look under "Data", you will find the data most recently sent by the "TM_MAIL" instruction.
1850
10
Creating screens
Basics
Screen basics
Introduction
In WinCC you create screens that an operator can use to control and monitor machines and plants. When you create your screens, the object templates included support you in visualizing processes, creating images of your plant, and defining process values.
Application example
The figure shows a screen that was created in WinCC. With the help of this screen, the operator can operate and monitor the mixing station of a fruit juice manufacturing system. Fruit juice base is supplied from various tanks to a mixing unit. The screen indicates the fill level of the tanks.
Screen design
Insert an object you need to represent a process into your screen. Configure the object to correspond to the requirements of your process. A screen may consist of static and dynamic elements.
1851
Screen properties
The screen layout is determined by the features of the HMI device you are configuring. It corresponds with the layout of the user interface of this device. The screen properties such as the screen resolution, fonts and colors are also determined by the characteristics of the selected HMI device. If the set HMI device has function keys, the screen shows these function keys. A function key is a key on the HMI device. You can assign one or several functions in WinCC. These functions are triggered when the operator presses the relevant key on the HMI device. A function key can be assigned global or local functions. Global function keys always trigger the same action, regardless of the currently displayed screen. Function keys with local assignment trigger different actions, based on the currently displayed screen on the operator station. This assignment applies only to the screen in which you have defined the function key.
Opening screens
In order for the operator to be able to call a screen in runtime, you must integrate each configured screen in the operating process. You have various options of configuring these functions: You use the "Screen" editor to configure buttons and function keys for opening other screens. You use the "Global Screen" editor to configure globally assigned function keys.
10.1.1.2
Introduction
The functions of an HMI device determine the display of the device in WinCC and the scope of functions of the editors. The following screen properties are determined by the functions of the selected HMI device:
STEP 7 Basic V11.0 SP2 System Manual, 12/2011,
1852
Device layout
The device layout of a screen forms the image of the HMI device in your configuration. The device layout of the screen shows all the function keys available on the HMI device, for example.
Screen resolution
The screen resolution is determined by the different display dimensions of the various operator panels. You can only change the screen resolution if you configure the "WinCC Runtime Advanced" or "WinCC Runtime Professional" HMI device.
Number of colors
You can assign colors to the screen objects. The number of possible colors is determined by the color depth and specific colors supported on the selected HMI device.
Fonts
You can customize the appearance of the texts in all the screen objects that contain static or dynamic text. How to highlight individual texts in a screen. Select the font, font style and size, and set additional effects such as underscoring, for example.
The settings for the text markups such as font style and effects always refer to the entire text of a screen object. That is, you can display the complete title in bold format, but not its individual characters or words, for example.
1853
Objects available
Some of the screen objects can not be configured globally for all HMI devices. These screen objects are not displayed in the "Tools" task card. For a KTP 1000 touch panel unit you can not configure a slider, for example.
Basics
Introduction
The following task cards are available in the "Screens" editor: Tools: Display and operating objects Animations: Templates for dynamic configuration Layout: Aid for customizing the display Libraries: Administration of the project library and of the global libraries Note WinCC Basic The "Animations" task card is not available in WinCC Basic.
Tools
The "Tools" task card contains objects in different panes: Basic objects Elements Controls User controls (optional) Graphics You paste objects from the palettes into your screens by drag&drop or a double click. The objects available for selection are determined by the features of the HMI device you are configuring. The following icons are used to change the display mode:
Icon Meaning Displays the objects as a list. Displays the objects as a graphic.
1854
Animations
The "Animations" task card contains the possible dynamizations of a screen object in the palettes. You paste the animations to a screen object by drag&drop or a double click from the "Movements", "Display" and "Tag Binding" palettes.
Layout
The "Layout" task card contains the following panes for displaying objects and elements: Zoom: Serves to select detail view Layers: Serves to manage screen object layers The layers are displayed in a tree view and contain information about the active layer and the visibility of all layers. Grid: You specify whether you want to align the objects to a grid or to other objects and set the grid size for a grid. Objects out of range: Objects that lie outside the visible area are displayed with name, position and type.
Libraries
The "Libraries" task card show the following libraries in separate panes: Project library: The project library is stored together with the project. Global library: The global library is stored in a separate file in the specified path on your configuration PC.
Requirement
A screen is open. The view shows only a screen section.
1855
Procedure
To move the view: 1. Click the icon at the bottom right corner of the work area and press the left mouse button. A miniature view of the full screen is shown. An orange frame shows the currently selected area. 2. Hold down the mouse button and drag the frame to the desired area. Note The screen is scrolled when you drag a screen object from the visible to a currently hidden section.
Requirement
The screen is opened.
1856
Procedure
Proceed as follows to zoom a view with the selection frame: 1. Click the toolbar button. 2. Use the mouse to draw a selection frame in the screen. After you have released the mouse button, the section enclosed by the selection frame is zoomed to fit the complete work area. Alternatively open the "Layout" task card and change the screen view.
Result
The selected screen section is magnified.
To create screens, you need to take the following initial steps: Plan the structure of the process visualization: Number of screens and their layout Example: Subprocesses are visualized in separate screens, and merged in a master screen. Define your screen navigation control strategies. Adapt the templates and the global screen. You define objects centrally and assign function keys for example. Create the screens. Use the following options of efficient screen creation: Working with libraries Working with layers Working with faceplates
Requirement
The project has been created. The Inspector window is open.
1857
Procedure
1. Double-click "Screens > Add New Screen" in the project navigation. The screen is generated in the project and appears in your view. The screen properties are shown in the Inspector window. 2. Enter a meaningful name for the screen. 3. Configure the screen properties in the Inspector window: Specify whether and on which template the screen is based. Set the "Background Color" and the "Screen Number." Specify a documenting text under "Tooltip". Specify the layers to be displayed under "Layers" in the engineering system. Select dynamic screen update under "Animations." Select "Events" to define which functions you want to execute in Runtime when you call and exit the screen or at other events. Note Not all HMI devices support the "Visibility" animation.
Result
You created the screen in your project. You can now paste objects and control elements from the "Tools" task card and assign function keys in further work steps.
Copy screen
1. Select the screen in the project tree. 2. Select the "Copy" command in the shortcut menu to copy the screen to the clipboard.
1858
Rename screen
1. Select the screen in the project tree. 2. Select "Rename" from the shortcut menu. 3. Type in a new name. 4. Press <Enter>. As an option, use the <F2> function key to rename the screen.
Delete screen
1. Select the screen in the project tree. 2. Select "Delete" from the shortcut menu. The screen and all its objects are deleted from the current project.
Requirement
The project contains the screen you want to use as the start screen.
1859
Procedure
1. Double-click "Runtime settings > General" in the project tree.
2. Select the desired screen as "Start screen." Alternatively select a screen in the project tree and select "Use as start screen" in the shortcut menu.
Result
The start screen opens on the HMI at the start of Runtime.
10.1.1.5
1860
Application examples
You want to assign the ActivateScreen" function to a function key in the template. The operator uses this key to switch to another screen in runtime. This configuration applies to all screens that are based on this template. A graphic with your company logo can be added to the template. The logo appears on all screens that are based on this template. Note If an object from the template has the same position as an object in the screen, the template object is covered.
See also
Creating a new template (Page 1863) Managing templates (Page 1864) Global screen (Page 1861) Using a template in the screen (Page 1865)
Function keys
For HMI devices with function keys you assign the function keys globally in the "Global Screen" editor. This global assignment applies for all screens of the HMI device. Proceed as follows to assign function keys locally in screens or templates:
1861
1862
See also
Basics on working with templates (Page 1860)
Requirement
The project has been created. The Inspector window is open.
Procedure
1. Select "Screen management > Templates" in the project tree and then double-click "Add new template". The template is created in the project, and appears in your view. The properties of the template are displayed in the Inspector window. 2. Define the name of the template under "Properties > Properties > General" in the Inspector window. 3. Specify the layers in the engineering system that are displayed under "Properties >Properties >Layers" in the Inspector window. 4. Add the necessary objects from the "Tools" task card. 5. Configure the function keys.
Result
The template is created in your project.
1863
See also
Basics on working with templates (Page 1860)
Copying templates
1. Select the template in the project navigation. 2. Select "Copy" in the shortcut menu. 3. Select the position in the project navigation where you want to paste the template. 4. Select "Paste" from the shortcut menu to insert the template. A unique name is assigned automatically to the copy. Alternatively, you can hold down the <Ctrl> key, and drag the template into position.
Deleting a template
1. In the project navigation, select the template to be deleted. 2. Select "Delete" in the shortcut menu. The template, and all its objects are deleted from the current project.
See also
Basics on working with templates (Page 1860)
1864
Requirement
A template has been created. A screen has been created.
Procedure
Proceed as follows to use a template in a screen: 1. Double click a screen in the project tree. The screen opens in the work area. 2. Open "Properties > Properties > General" in the inspector window. 3. Select a template that is to be applied to the screen under "Template".
Result
The screen is based on the selected template. All objects which you have configured in the template are available in the screen. The template is displayed in the screen.
See also
Basics on working with templates (Page 1860)
10.1.2
10.1.2.1
Introduction
Objects are graphics elements which you use to design the screens of your project.
1865
1866
Basic objects
Icon Object "Line" "Ellipsis" "Circle" "Rectangle" "Text field" "Graphic view" Instructions One or more lines of text. The font and layout are adjustable. Displays graphics from external graphic programs, and inserts OLE objects. The following graphic formats can be used: "*.emf", "*.wmf", "*.dib", "*.bmp", "*.jpg", "*.jpeg", "*.gif" and "*.tif".
Elements
Icon Object "I/O field" Instructions Outputs the values of a tag, and/or writes values to a tag. You can define limits for the tag values shown in the I/O field. To hide the operator input in Runtime, activate "Hidden input." "Button" "Symbolic I/O field" "Graphic I/O field" "Date/time field" Executes a list of functions, or a script as configured. Outputs the values of a tag, and/or writes values to a tag. A text from a text list is displayed in relation to the tag value. Outputs the values of a tag, and/or writes values to a tag. A graphic from a graphics list is displayed in relation to the tag value. Outputs the system date and time, or the time and date from a tag. This allows the operator to enter new values. The display format is adjustable. The bar represents a value from the PLC in the form of a scaled bar graph. Toggles between two defined states. You can label a switch with text, or a graphic.
"Bar" "Switch"
Controls
Icon Object "Alarm view" "Trend view" Description Shows currently pending alarms or alarm events from the alarm buffer or alarm log. Represents multiple curves with values from the PLC, or from a log.
1867
See also
Options for Editing Objects (Page 1868) Inserting an object (Page 1869) Deleting an Object (Page 1871) Positioning an object (Page 1872) Resizing an object (Page 1873) Selecting multiple objects (Page 1874) Aligning objects (Page 1876) Moving an object forward or backward (Page 1878) Show objects outside the screen area (Page 1879) Rotating objects (Page 1880) Flipping objects (Page 1881) Inserting multiple objects of the same type (stamping tool) (Page 1882) Repositioning and resizing multiple objects (Page 1884) External graphics (Page 1884) Managing external graphics (Page 1885) Storing an external image in the graphics library. (Page 1887) Basics on groups (Page 1889) Overview of keyboard access (Page 1895) Example: Inserting and configuring a rectangle (Page 1898)
10.1.2.2
Introduction
Objects are graphics elements which you use to design the screens of your project. You have the following options for editing objects:
1868
See also
Overview of objects (Page 1865)
10.1.2.3
Inserting an object
Introduction
In the "Screens" or "Reports" editor, insert the objects to the "Toolbox" task card. Use the mouse to drag the objects into the work area. You either keep the objects in their original size, or scale them up or down when you paste them. In addition, you can copy or move objects via the clipboard from one editor to another, for example to transfer a screen object to a report. Alternatively, you can also use the mouse instead of the clipboard for copying and moving:
1869
Requirement
The "Tools" task card is open.
Copying an object
1. Select the desired object. 2. Select "Copy" in the shortcut menu. 3. Click the desired location and select "Paste" in the shortcut menu. WinCC inserts a copy of the object at the desired location. You can only change the properties that are appropriate for the relevant context. Example: In the "Screens" editor, you can set for I/O fields and the mode for input and output. In the "Reports" editor, the mode is set to "Output". Original and copy are not interconnected and are configured independently from one another.
Inserting lines
1. Select the desired graphic object in the "Tools" task card. 2. Click on a location in the work area. A line in the standard size is inserted.
1870
Note If you want to insert several objects of the same type, use the "Stamp" function. This avoids having to reselect the object in the "Tools" task card every time before inserting it. To do so, select the icon in the toolbar of the "Tools" task card.
See also
Overview of objects (Page 1865)
10.1.2.4
Deleting an Object
Introduction
You can delete objects individually or with a multiple selection.
Requirement
You have opened the work area containing at least one object.
Procedure
1. Select the object that you want to delete. To delete multiple objects, keep the <Shift> key pressed and select the objects to be deleted one after the other. Alternatively, drag and maximize an area around the desired objects with the mouse. 2. Select "Delete" from the shortcut menu.
Result
The selected objects are deleted.
See also
Overview of objects (Page 1865)
1871
10.1.2.5
Positioning an object
Introduction
When you select an object, it is enclosed by a rectangle with resizing handles. This rectangle is the rectangle which surrounds the object. The position of an object is defined by the coordinates of the top left corner of the rectangle surrounding the object.
Note If the position is outside the work area the object is not displayed in Runtime.
Requirement
You have opened the work area containing at least one object.
Procedure
1. Select the object you want to move. The selected object is framed by a rectangle with resizing handles.
1872
The object initially remains at its original position. 4. Now release the mouse button. The object is moved into the position indicated by the contour of the selection rectangle.
Alternative procedure
1. In the Inspector window, select "Properties > Properties > Layout". 2. Enter the X and Y values for the position under "Position & Size".
Result
The object appears at its new position.
See also
Overview of objects (Page 1865)
10.1.2.6
Resizing an object
Introduction
When you select an object, it is enclosed by a rectangle with handles. You have the following options of resizing an object: Drag the handles using the mouse. Modify the "Size" property in the Inspector window.
Requirement
You have opened the work area containing at least one object.
1873
Procedure
1. Select the object you want to resize. The selection rectangle appears. The following figure shows a selected object:
2. Drag a resizing contact of the rectangle to a new position. The size of the object changes. The size of the object is aligned to the grid pattern, provided the "Snap to grid" function is set. Press <ALT> to disable this function while you drag the object. Note In order to scale the object proportionally, keep the <Shift> key pressed while changing the size with the mouse.
Alternative procedure
1. In the Inspector window, select "Properties > Properties > Layout". 2. Enter the size of the object under "Position & Size".
Result
The object now appears with its new size.
See also
Overview of objects (Page 1865)
10.1.2.7
Introduction
Select all objects you want to align with each other or to change global properties. This procedure is called "multiple selection." The Inspector window shows all the properties of the selected objects. You now have several options of selecting multiple objects: Draw a selection frame around the objects. Hold down the <Shift> key, and click the required objects.
1874
You have the following options to specify the reference object: Select the objects via multiple selection. The object selected first is then the reference object. Draw a selection frame around the objects. The reference object compiled automatically. If you wish to specify a different object within the selection as the reference object, click on the desired object. This action does not cancel your multiple selection.
Requirement
You have opened the work area containing at least two objects.
1875
Result
Multiple objects are selected. One of those is identified as the reference object. You can now perform the following steps: Changing the object properties of all the objects Resizing all the objects by the same ratio, by dragging the selection frame to increase or reduce the size Moving all the objects in one group Aligning the objects to the reference object
See also
Overview of objects (Page 1865)
10.1.2.8 Procedure
Aligning objects
1. Select the objects via multiple selection. 2. Specify an object as the reference object. 3. Select the desired command in the toolbar or the shortcut menu - see table below. The selected objects will be aligned.
1876
Icon
Description Aligns the horizontal distance between the objects. The position of the objects on the extreme left and right side remains unchanged. All other objects are distributed evenly between them. Aligns the vertical distance between the objects. The position of the objects at the extreme top and bottom (right and left) remains unchanged. All other objects are distributed evenly between them.
1877
See also
Overview of objects (Page 1865)
10.1.2.9
Introduction
You can use the "Order" functions in the shortcut menu of a selected object or in the toolbar to move a selected object in front of or behind other objects within an object layer. Note ActiveX controls are always positioned in front of an object layer (.NET property).
Requirement
You have opened a screen which contains a layer with multiple objects.
Procedure
1. Select the object you want to move forward or backward. 2. Select the "Sort" command and one of the following commands from the shortcut menu:
Icon Description Moves the selected object before all the other objects of the same layer Moves the selected object to the lowest position in the same layer Moves the selected object up by one position Moves the selected object down by one position
Alternative procedure
1. Open the "Layers" palette of the "Layout" task card. 2. Navigate to the required object. 3. Hold down the mouse button, and drag the object in the tree topology to the required position in the layer. 4. Now release the mouse button.
1878
Result
The object is moved up or down.
See also
Overview of objects (Page 1865)
Requirement
You have opened a screen which contains objects that are outside the configurable area. The "Layout" task card is open.
Procedure
1. Open the "Layout > Objects outside the area" task card. This displays a list of objects that are outside the configurable area. 2. Select the the object which you want to move back into the screen from the list. 3. Select "Move to screen" in the object shortcut menu. Alternatively open the "Layout > Layer" task card. Objects outside the area are indicated by icon. If you click this icon, the object is moved back into the screen. the
Result
The objects are moved to the configurable area.
See also
Overview of objects (Page 1865)
1879
Requirement
You have opened the work area containing at least one object.
Procedure
1. Select the object that you want to rotate. 2. Click one of the following toolbar icons: , to rotate the object clockwise around its center point. The angle of rotation is 90. , to rotate the object counterclockwise around its center point. The angle of rotation is 90. , to rotate the object clockwise by 180.
1880
Result
The object is shown at its new angle.
See also
Overview of objects (Page 1865) Ellipse (Page 1964)
Requirement
You have opened a screen which contains at least one object.
Procedure
1. Select the object that you want to flip. 2. Click the "Flip" command in the shortcut menu and select one of the options displayed: , to flip the selected object along its vertical center axis. , to flip the selected object along its horizontal center axis.
Result
The object is shown at its flipped position.
1881
See also
Overview of objects (Page 1865) Ellipse (Page 1964)
Requirement
A line has been created in a screen.
Procedure
1. Select the line on your screen. 2. In the Inspector window, select "Properties > Properties > Appearance": 3. Select "Dash" as the style. 4. To display the dashed line in two colors, select the line width "1". 5. Select the setting "Arrow" in the "Line ends" area.
Result
The line is displayed in two colors as a dashed line. The end of the line is an arrow.
10.1.2.14 Inserting multiple objects of the same type (stamping tool) Introduction
WinCC offers the possibility to "stamp" several objects of the same type directly one after the other, i.e. paste without having to reselect the object every time. In addition you have the possibility of multiplying an object that has already been inserted.
Requirement
The "Tools" task card is open.
1882
3. Drag the handles to the right and/or down while keeping the left mouse button pressed. 4. The object is multiplied depending on available space if you keep moving the cursor.
Result
You have pasted and stamped an object in a screen.
1883
See also
Overview of objects (Page 1865)
See also
Overview of objects (Page 1865)
1884
Transparent graphics
In WinCC you also use graphics with a transparent background. When a graphic with a transparent background is inserted into a graphic object of WinCC, the transparency is replaced by the background color specified for the graphic object. The selected background color is linked firmly with the graphic. If you use the graphic in another graphic object of WinCC, this object is displayed with the same background color as the graphic object that was configured first. If you want to use the graphic with different background colors, include this graphic in the graphic browser again under a different name. The additional background color is configured when the graphic is used at the corresponding graphic object of WinCC.
Managing graphics
An extensive collection of graphics, icons and symbols is installed with WinCC, for example: In the Toolbox window of the "Graphic" pane the graphic objects are structured by topic in the "WinCC graphics folder." The link to the WinCC graphics folder cannot be removed, edited or renamed. The "Graphics" pane is also used to manage the external graphics. The following possibilities are available: Creating links to graphics folders The external graphic objects in this folder, and in the subfolders, are displayed in the toolbox and are thus integrated in the project. Editing folder links You open the program required for editing of the external graphic in WinCC.
See also
Overview of objects (Page 1865)
1885
Requirement
The "Screens" editor is open. The "Tools" task card is open. The graphics are available. The graphics have the following formats: *.bmp, *.ico, *.emf, *.wmf, *.gif, *.tif, *.jpeg or *.jpg
1886
See also
Overview of objects (Page 1865)
Requirement
A screen has been created. A Graphic View is inserted in the screen. The Inspector window of the Graphic view is open. To store an external graphic in the image browser: A graphic is available. To store an OLE object in the browser: An OLE-compatible graphics program is installed on your configuration computer.
1887
1888
Result
The image file is now stored in your image browser. It is shown in a screen with a Graphic view , or is added as a list element in an image list. You can double-click OLE objects in your library to open them for editing in the corresponding graphic editor. When you have finished editing graphics, end the graphic programming software with "File > Close" or "File > Close & return to WinCC." The changes are applied to WinCC.
See also
Overview of objects (Page 1865)
Overview
WinCC offers the following methods for editing multiple objects: Multiple selection Creating object groups
Editing mode
To edit an individual object in a group, select the object in the "Layout > Layers" task card. Alternatively select "Group > Edit group" in the object group's shortcut menu.
1889
Hierarchical groups
You add further objects or groups to extend a group. The group is enlarged by the new objects and is structured hierarchically in main and sub-groups. Such hierarchical groups must be broken up in stages. You also break up the group in the same order in which you grouped the objects or groups. It takes exactly the same number of steps to break up these hierarchical groups as it did to create them.
Layers
All objects of a group are located in the same layer.
See also
Overview of objects (Page 1865)
Requirement
You have opened a screen which contains at least two objects.
1890
Alternative procedure
You can also edit groups in the "Layout" task card. Using drag-and-drop you can also easily edit nested groups in the "Layers" pane.
Result
The selected objects are combined in a group. The multiple selection rectangle becomes the rectangle surroundings the objects in the group. The handles are shown only for the group. The group in in the active layer.
Ungroup Introduction
Select the "Ungroup" command to split a group into the original object fractions.
Requirement
You have opened a screen that contains a group.
Ungroup
1. Select the group. 2. Select the "Group > Ungroup" command from the shortcut menu.
1891
Result
The lower-level group is ungrouped. The objects are assigned to the next higher group.
Alternative procedure
You can also edit groups in the "Layout" task card. Using drag-and-drop you can also easily edit nested groups in the "Layers" pane.
Requirements
A screen with one group and at least one other object is opened.
Procedure
1. Select the group. 2. Press the <Shift> key and select the object you want to add to the group. 3. Select the "Group > Add to group" command from the shortcut menu.
Result
The group consists of the original objects, and the newly-added objects. The added objects are arranged at the front of the group.
Alternative procedure
You can also edit groups in the "Layout" task card. Using drag&drop you can also easily edit hierarchical groups in the "Layers" palette.
1892
Requirement
You have opened a screen that contains a group.
1893
Alternative procedure
You can also edit groups in the "Layout" task card. Using drag-and-drop you can also easily edit nested groups in the "Layers" pane.
Requirement
You have opened a screen that contains a group.
The properties of the group are displayed in the Inspector window. 2. Change the position and size of the grouped objects in "Properties > Properties >Layout." 3. Change the name of the group in "Properties > Properties > Miscellaneous."
1894
The properties of the object are displayed. 3. Change the object properties.
Result
Although you have edited the object, it is still an element of the group. These changes do not affect the other objects of the group.
1895
See also
Example: Inserting and configuring a rectangle (Page 1898) Overview of objects (Page 1865)
Defining the Operator Authorization and Operator Control Enable for an Object Introduction
If you configure an object for operator input with the <Tab> key, the object must have both an operator authorization, and an operator control enable.
Requirement
You have opened a screen which contains at least one object.
Procedure
1. Select the object. 2. Select "Properties > Properties > Security" in the Inspector window. 3. Select the operator authorization under "Authorization." 4. Activate the authorization to operate.
Result
The operator can use the <Tab> key in Runtime to select the object.
1896
See also
Example: Inserting and configuring a rectangle (Page 1898)
Requirement
The active screen contains operable objects. No object is selected. The objects have been enabled for use in runtime, and have operator authorization.
Procedure
1. Select "Edit tab sequence" in the "Edit" menu. Tab sequence mode is activated. The tab sequence number is displayed for all objects that can be used. The tab sequence number is also displayed for hidden objects. 2. Use edit the tab sequence mode, click the accessible objects in the order in which you want them to be activated using <Tab> in runtime. The following figure shows how the tab sequence is defined in the screen. In runtime, the <Tab> key first activates the alarm view (number 1), then the I/O field (number 2), and then the button (number 3):
1897
Result
The operator selects the objects in the specified order in Runtime with the <Tab> key.
See also
Example: Inserting and configuring a rectangle (Page 1898)
Principle
The rectangle is a closed object which can be filled with a color or pattern. The height and width of a rectangle can be adjusted to allow its horizontal and vertical alignment.
1898
Overview
Carry out the following steps in order to create a rectangle: Inserting a rectangle Configuring a rectangle
See also
Basics on groups (Page 1889) Overview of objects (Page 1865)
Requirement
A screen is open. The Inspector window is open. The "Tools" task card is open.
Procedure
1. Click the "Basic objects" palette in the "Tools" task card. 2. Drag the "Rectangle" object into the screen. 3. In the Inspector window, select "Properties > Properties > Miscellaneous". 4. Type in the new name "MyRectangle".
Result
The rectangle is now inserted and named "MyRectangle". The rectangle has the default properties of the "rectangle" object.
1899
Interim result
The rectangle is red and has a black frame with a width of two pixels.
3. Set "20" for the both the X and Y coordinates under "Position & Size". 4. Set "100" for the height and for the width.
1900
Result
The rectangle is positioned at the coordinates (20, 20), and has a width and height of 100 pixels.
10.1.3
10.1.3.1
Application
The text list is used, for example, to display a drop-down list in a symbolic I/O field. If the symbolic I/O field is a display field, the associated texts will differ according to the value of the configured tags. If the symbolic I/O field is an input field, the configured tag assumes the associated value when the operator selects the corresponding text in Runtime. Note Display of tag values without text The display of tag values to which no text has been assigned depends on the Runtime: The display and operating object remains empty. Three asterisks *** are displayed.
Multilingual texts
You can configure multiple languages for the texts in a text list. The texts will then be displayed in the set language in Runtime. To this purpose you set the languages in the Project window under "Language support > Project languages."
1901
Configuration steps
The following steps are necessary to display texts in a symbolic I/O field for example: 1. Creating the text list 2. Assignment of the texts to values or value ranges of a text list 3. Assignment of a text list in the display object, e.g. the symbolic I/O field
Procedure
1. Double-click "Text and graphics lists" in the project window. 2. Open the "Text lists" tab.
3. Click "Add" in the "Text lists" table. The Inspector window of the text list is open. 4. Assign a name to the text list that indicates its function.
1902
Result
A text list is created.
Requirement
The "Text and graphics list" editor is open. The "Text lists" tab is open. An area text list has been created and selected.
1903
Procedure
1. Click "Add" in the "Text list entries" table. The Inspector window for this list entry opens.
2. Select the setting "Range" in "Properties > Properties > General > Value" in the Inspector window.
Enter the value "1" for "Min" for example. Enter the value "20" for "Max" for example. For "Text", enter the text that is displayed in Runtime if the tag is within the specified value range. Note Use a maximum of 255 characters and no semicolons for the text. 3. Click "Add" in the "Text list entries" table. A second list entry is created. 4. Select the setting "Range" in "Properties > Properties > General > Value" in the Inspector window. Enter the value "21" for "Min" for example. Enter the value "40" for "Max" for example. For "Text", enter the text that is displayed in Runtime when the tag is within the specified value range. 5. If required, activate the "default entry". The entered text is always displayed when the tag has an undefined value. Only one default entry is possible per list.
Result
An area text list is created. Texts have been assigned to the possible value ranges.
1904
Requirement
The "Text and graphics list" editor is open. The "Text lists" tab is open. A bit text list has been created and selected.
Procedure
1. Click "Add" in the "Text list entries" table. The Inspector window for this list entry opens.
2. Select the setting "Single value" in "Properties > Properties > General > Value" in the Inspector window. Enter "0" for "Value." Enter the text which is displayed in Runtime under "Text" if the bit tag is set to "0". Note Use a maximum of 255 characters and no semicolons for the text. 3. Click "Add" in the "Text list entries" table. A second list entry is created. 4. Select the setting "Single value" in "Properties > Properties > General > Value" in the Inspector window. Enter "1" under "Value." Enter the text which is to be displayed in Runtime under "Text" if the bit tag is set to "1".
1905
Result
A bit text list is created. Texts that appear in Runtime are assigned to the possible values "0" and "1".
Requirement
The "Text and graphics list" editor is open. The "Text lists" tab is open. A bit number text list has been created and selected.
Procedure
1. Click "Add" in the "Text list entries" table. The Inspector window for this list entry opens.
2. Select the setting "Single value" in "Properties > Properties > General > Value" in the Inspector window. Enter "10", for example, for "Value". Under "Text", enter the text that is displayed in Runtime when the tag has the value "10". Note Use a maximum of 255 characters and no semicolons for the text.
1906
Result
A bit number text list is created. Texts that appear in Runtime are assigned to the specified bit numbers.
Requirement
A text list is created. You have created a tag. The "Screens" editor is open. A screen with a symbolic I/O field is open. The object is edited.
1907
Procedure
1. Select the text list which you want to have displayed in Runtime in "Properties > Properties > General > Text list" in the Inspection window. 2. Select the setting "Output" as the "Mode". Note Runtime dependency Different field types are available for a symbolic I/O field depending on the Runtime. 3. Select the tag the value of which determines the display in the symbolic I/O field as "Tag".
Result
The defined texts of the text list are displayed in the symbolic I/O field in Runtime when the tag has the specified value.
10.1.3.2
1908
Application
You can configure the graphics list for the following situations: Drop-down list with a graphic I/O field State-specific graphic for a button The graphics in a graphics list can be configured as multilingual. The graphics will then be displayed in the set language in runtime.
Graphic sources
Graphics can be added to the graphics list from the following sources: By selecting from a graphic browser By selecting an existing file You can use the following file types: *.bmp, *.ico, *.emf, *.wmf, *.gif, *.tiff, *.png, *.jpeg and *.jpg. By creating a new file
Function
If the graphic I/O field is a display field, the associated graphics will differ according to the value of the configured tags. If the graphic I/O field is an input field, the configured tag assumes the associated value when the operator selects a graphic in runtime.
Configuration steps
The following tasks are required to display graphics, for example, in a graphic I/O field: 1. Creating the graphics list 2. Assignment of the graphics to values or value ranges of a graphics list 3. Assigning a graphics list in the display object, for example the graphic I/O field
1909
Procedure
1. Double-click "Text and graphics lists" in the project window. 2. Open the "Graphics lists" tab.
3. Click "Add" in the "Graphics lists" table. The Inspector window of the graphics list will open up.
4. Assign a name to the graphics list that indicates its function. 5. Select the graphics list type "Bit number (0 - 31)" for example under "Select". 6. Enter a comment for the graphics list.
Result
A graphics list of the type "Range (0 - 31)" is created.
1910
Requirement
The "Text and graphics list" editor is open. The "Graphics list" tab is open. An area graphics list has been created and selected.
Procedure
1. Click "Add" in the "Graphics list entries" table. The Inspector window for this list entry opens.
2. Select the settings "Range" in "Properties > Properties > General > Value" in the Inspector window: Enter the value "1" for "Min" for example. Enter the value "20" for "Max" for example. Select a graphic that is displayed in Runtime when the tag is within the specified value range.
Note As an alternative to the drop-down menu, you can insert graphics from libraries or from your file system: 1. Select a graphic in the library or in your file system. 2. Drag-and-drop the graphic into the "Graphics list entries > Graphic" table. 3. Click "Add" in the "Graphics list entries" table. A further list entry is created.
1911
5. If required, activate the "default entry". The graphic is always displayed when the tag has an undefined value. Only one default entry is possible per list.
Result
An area graphics list is created. Graphics that appear in Runtime are assigned to the possible values.
Requirement
The "Text and graphics list" editor is open. The "Graphics list" tab is opened. A bit graphics list has been created and selected.
1912
Procedure
1. Click "Add" in the "Graphics list entries" table. The Inspector window for this list entry opens.
2. Select the settings "Single value" in the inspector window "Properties > Properties > General > Value": Enter "0" as the value. Select a graphic which is displayed in Runtime if the bit "0" is set in the tag. Note As an alternative to the drop-down menu, you can insert graphics from libraries or from your file system: 1. Select a graphic in the library or in your file system. 2. Drag-and-drop the graphic into the "Graphics list entries > Graphic" table. 3. Click "Add" in the "Graphics list entries" table. A new list entry is created. 4. Select "Properties > Properties > General > Value > Single value": in the Inspector window. Enter "1" as the value. Select a graphic which is displayed in Runtime if the bit "1" is set in the tag.
Result
A bit graphics list is created. Graphics that appear in Runtime are assigned to the values "0" and "1".
1913
Requirement
The "Text and graphics list" editor is open. The "Graphics list" tab is open. A bit number graphics list has been created and selected.
Procedure
1. Click "Add" in the "Graphics list entries" table. The Inspector window for this list entry opens.
2. Select the settings "Single value" in "Properties > Properties > General > Value" in the Inspector window: Enter the value "0" for example. Select a graphic which is displayed in Runtime if the bit "0" is set in the tag.
Note As an alternative to the drop-down menu, you can insert graphics from libraries or from your file system: 1. Select a graphic in the library or in your file system. 2. Drag-and-drop the graphic into the "Graphics list entries > Graphic" table.
1914
Result
A bit number graphics list is created. Graphics that appear in Runtime are assigned to the specified bit numbers.
Requirement
A graphics list is created. The values have been defined. Graphics have been assigned to the values. You have created a tag. The "Screens" editor is open. A screen with a graphics I/O field is open. The object is edited.
Procedure
1. Select the graphics list the graphics of which you want to have displayed in Runtime in "Properties > Properties > General > Graphics list" in the inspector window. 2. Select the setting "Input/Output" as the "Mode". Note Runtime dependency Different field types are available for a graphic I/O field depending on the Runtime. 3. As "Tag", select the tag whose values are defined by the display in the graphic I/O field.
Result
The defined graphics of the graphics list are displayed in the graphic I/O field in Runtime when the tag has the specified value.
1915
10.1.4
10.1.4.1
Dynamizing screens
Basics on dynamization
Dynamizing objects
In WinCC you dynamize objects to map your system and show processes on HMI devices. You implement dynamizations by Animations Tags System functions One example is the mapping of a tank, the liquid level of which rises or falls in relation to a process value. The options for dynamization depend on the object involved. When you copy an object, its dynamization functions are included.
See also
Dynamization in the inspector window (Page 1916) Configuring a new animation (Page 1918) Basic on events (Page 1927)
10.1.4.2
Introduction
Basically, you can dynamize all the screen objects which you have configured in a screen. Which dynamization possibilities and which events are available depends on the device and the selected object.
Animations
WinCC helps you to implement dynamization using predefined animations. If you want to animate an object, first configure the desired animation in the object's inspector window. Then adapt the animation to the requirements of your project. The selection of the supported animations depends on the HMI device and the selected object. You choose between the following types of animation:
1916
Events
Operable objects also react to events, such as a mouse click. You configure a function list with system functions on an event. The system functions are processed as a reaction to the triggered event. You configure events in the "Properties > Events" inspector window.
1917
You will find further information in "Working with function lists (Page 2153)".
See also
Basics on dynamization (Page 1916)
10.1.4.3
Requirement
You have opened a screen which contains at least one dynamic object. The Inspector window is open. The toolbox window is displayed.
1918
Result
The animation appears in the Inspector window of the object. You configure the animation in the following steps. In the animations overview the green arrow indicates which animation is already configured. The configured animation opens in the inspector window when you click the green arrow.
See also
Dynamizing the visibility of an object (Page 1924) Basics on dynamization (Page 1916)
1919
Type
Areas or single values of the tag are observed in Runtime depending on the selection. The appearance of the object changes according to the configuration.
Requirement
A screen is open. A dynamic object is contained and selected in the screen. The Inspector window is open. The toolbox window is displayed.
Procedure
1. In the Inspector window, select "Properties > Animations". The animations available for the selected object are displayed. 2. Select the animation "Appearance" and click the The parameters of the animation are displayed. 3. Select a tag in "Tag > Name". 4. Select "Type > Range" for example. 5. Click "Add" in the table. 6. Enter the tag interval "0 - 20" in the "Range" column for example. 7. For "Foreground color" and "Background color", select the color the object is to acquire in Runtime when the tag reaches the interval. button.
1920
Result
In Runtime, the flashing response, and color of the object change dynamically according to the process value returned in the tag.
Requirement
You have created a tag. You have opened a screen which contains at least one dynamic object. The Inspector window is open. The toolbox window is displayed.
1921
Procedure
1. Select the screen object you want to control dynamically. The object properties are displayed in the Inspector window. 2. In the Inspector window, select "Properties > Animations". The animations available for the selected object are displayed. button. 3. Select "Horizontal movement" and click the The parameters of the animation are displayed. A transparent copy of the object is shown in the work area, which is connected to the source object by means of an arrow. 4. Select a tag for control of movement. 5. Move the object copy to the relevant destination. The system automatically enters the pixel values of the final position in the Inspector window. 6. Customize the range of values for the tag as required.
1922
Result
In Runtime, the object moves in response to every change in value of the tag that is used to control the movement. The direction of movement corresponds to the configured type of movement "horizontal". Note You configure vertical and diagonal movement in the same way as horizontal movement
Requirement
Two tags are set up. You have opened a screen which contains at least one dynamic object. The Inspector window is open. The toolbox window is displayed.
1923
Result
In Runtime, the object moves in response to every change in value of the tag that is used to control the movement.
Requirement
You have created a tag. You have opened a screen containing an object that you want to show or hide in Runtime. The Inspector window is open.
1924
Procedure
1. Select the screen object you want to control dynamically. The object properties are displayed in the Inspector window. 2. In the Inspector window, select "Properties > Animations". The animations available for the selected object are displayed. button. 3. Select "Visibility" and click the The parameters of the animation are displayed. 4. Select a tag. 5. Activate "Single bit". 6. Select bit number "6" for example. 7. Activate "Visible".
Result
The screen object is shown or hidden in Runtime depending on the tag value. If the tag value matches the configured bit number exactly, the screen object is shown. If the tag value matches the configured bit number exactly, the screen object is hidden.
See also
Configuring a new animation (Page 1918)
1925
If you configure an animation for an object group, this animation will apply to all individual objects that support this animation.
Application example
The "horizontal movement" animation is configured for the object of an object group. The "direct movement" animation is configured for the whole object group. Only the animation of the object group i.e. "direct movement" is executed in Runtime. This also applies for object groups within object groups. Only the animation of the group on the top layer is listed.
Animations for object groups and for multiple selection Changing animations for multiple objects
For a multiple selection, the animations that are configured for the reference object appear in the Inspector window. You can change the animations as usual. The changes will apply to all the objects in the multiple selection that support the configured animation. This means that even objects for which you have not yet configured an animation will have the reference object's animation.
1926
Application example
Select a button, and a circle at the same time. The button is the reference object. The "Appearance" animation is already configured for the button, so it appears in the Inspector window of the multiple selection. When you activate "Properties > Animations >Appearance > Flashing" in the inspector window, the settings of the "Appearance" animation apply for the button and for the circle.
Application example
You select a circle, and a rectangle. The "Diagonal movement" animation is already configured for the circle. You configure the "Horizontal movement" animation for the multiple selection. This animation applies to the rectangle since no animation of the Movement type is yet configured for it. For the circle, you are asked to confirm that you want to replace the existing "Diagonal movement" animation with the new "Horizontal movement" animation.
10.1.4.4
Events
Which events and system functions are available depends on the object used. If the operator activates a screen object for example, the configured system function is executed. Further information can be found in Working with function lists (Page 2153)
See also
Basics on dynamization (Page 1916) Example: Configuring a button for language switching (Page 1928) Configure system function on the "Click" event (Page 1928)
1927
Requirements
A screen is open. A button has been created in the screen. The inspector window is open.
Procedure
1. Select the button. 2. Click "Properties> Events" in the Inspector window. 3. Select the "Click" event. 4. Click "Add function" in the table. 5. Select the "ShowAlarmWindow" system function.
Result
The alarm window opens in the screen if the operator clicks the button in runtime.
See also
Basic on events (Page 1927)
Requirements
You have completed the "Configuring a button in multiple languages" example. The "Screen_1" screen is open. The button on the screen has been selected.
1928
Procedure
1. In the Inspector window, select "Properties > Events > Press". 2. Click on "Add function" in the table. 3. Select the "SetLanguage" system function.
Result
You have assigned the button the function "SetLanguage". Pressing the button during runtime will switch the runtime language. The runtime languages are switched in the order specified by the number sequence in the "Languages and fonts" editor.
See also
Basic on events (Page 1927) Button (Page 1982)
10.1.5
10.1.5.1
Introduction
The function key is a physical key on your HMI device and its functions can be configured. A function list can be configured for the events "Key pressed" and "Release key". A function key can be assigned global or local functions. Note Availability for specific HMI devices Function keys are not available on all HMI devices.
1929
Hotkey assignment
You can assign hotkeys, such as buttons, to control objects. The available hotkeys depend on the HMI device. Note The function key has a local or global action assigned to it. If the function key also has a hotkey assigned to it, then the hotkey function will be executed in Runtime.
Graphics
When a function key is placed directly next to the display, you can assign a graphic to it to make the function of the function key more clear.
Display of assignment
Table 10-1 Function key The following table shows which symbols display the assignment of the function keys: Description Not assigned
Global assignment
1930
Local assignment
Local assignment (local assignment of the template overwrites global assignment) Local assignment (local assignment overwrites global assignment)
Local assignment (local assignment overwrites local assignment of the template, which already overwrites global assignment) Assigning buttons with screen navigation
Note Basic Panels The "Screen Navigation" editor is not available for Basic Panels.
10.1.5.2
Introduction
You define the global assignment of a function key in the "Global Screen" editor. The global assignment applies to all screens of the set HMI device. Note Availability for specific HMI devices Function keys are not available on all HMI devices.
1931
Requirement
You have opened the project. The Inspector window is open.
Procedure
Proceed as follows to assign a screen-based function to a function key: 1. To open the "Global Screen" editor, double-click "Global Screen" in the "Screen management" group of the Project window. 2. Select the desired function key. The properties of the function key are shown in the Inspector window.
3. Under "General", configure a graphic and an operator authorization for the function key. 4. Configure a function list for the required event under "Events".
Result
If a local assignment does not overwrite the global assignment, the assignment of the function key changes in all the screens of the set HMI device in accordance with your entry.
1932
10.1.5.3
Introduction
Function keys are assigned globally and locally. A local assignment of the function keys is only valid for the screen or the template in which it was defined. The following local function keys are available: Local function keys of a screen Different functions are assigned to the function key for each screen. This assignment applies only to the screen in which you have defined the function key. Local function keys of a template You assign the function keys in a template. The assignment applies to all the screens that are based on this template and are not overwritten by a local assignment in a screen. A local assignment overwrites the global assignment of a function key. Note Availability for specific HMI devices Function keys are not available on all HMI devices.
Requirement
You have opened the screen or the template in which you want to assign a function key locally. The Inspector window is open.
1933
Procedure
Proceed as follows: 1. Select the desired function key in the screen or in the template. The properties of the function key are shown in the Inspector window. 2. Click "General" in the Inspector window.
3. Disable the "Use local template" or "Use global assignment" option. 4. Under "General", configure a graphic and an operator authorization for the function key. 5. Configure a function list for the required event under "Events".
Result
The function key is assigned the configured function in the screen or in the template.
10.1.5.4
Introduction
A function key can have two states: Pressed: Defined by the "Key pressed" event. Released: Defined by the "Release key" event.
1934
Requirement
To assign the function key a global function: The "Global Screen" editor is open. To assign the function key a local function: The screen in which you want to assign a function key is open. If you want to assign a function key locally in a template: The template in which you want to assign a function key is open. The Inspector window is open.
Procedure
Proceed as follows: 1. Select the function key you want to define. The properties of the function key are shown in the Inspector window. 2. Configure the function list for the desired result in the Inspector window under "Properties" in the "General" group.
Result
The function list is executed in runtime when the operator presses or releases the function key.
10.1.5.5
Introduction
In WinCC you can assign an operator authorization for a function key in runtime. This allows you to restrict access to the function keys to specific persons or operator groups when you
1935
Requirement
The user groups have been defined. To protect a global function key: The "Global Screen" editor is open. If you want to protect a local function key of a screen or of a template: The screen or the template which contains the function key is open. The Inspector window is open.
Procedure
Proceed as follows: 1. Select the relevant function key. The properties of the function key are shown in the Inspector window. 2. Click "General" in the Inspector window.
3. In the "Authorization" list, select the user group you want to allow runtime access to the function key.
1936
Result
The operator authorization is configured.
10.1.5.6
Introduction
In order to make the function of a key more clear, you can insert a graphic in the screen alongside the function key. Graphics can only be assigned to function keys that border the screen margin of the HMI device. Note Availability for specific HMI devices Function keys are not available on all HMI devices.
Requirement
To assign a graphic to a global function key: The "Global Screen" editor is open. If you want to assign a graphic to a local function key in a screen or template: The screen or the template that contains the corresponding function key is open. The Inspector window is open. You have created the graphic for the function key.
1937
Procedure
Proceed as follows: 1. Select the relevant function key. The properties of the function key are shown in the Inspector window. 2. Click "General" in the Inspector window.
3. Click in the "Graphic" area of the list. The graphic browser of your WinCC project appears. The pane on the left side shows the external graphics which are stored in the browser. The pane on the right side shows you a preview of the graphic you have selected in the browser.
Using the and icons, you can display the collection either in form of thumbnails or as a list. In order to open and edit OLE objects with the associated graphics program, double-click on the object. 4. In the browser click the desired graphic or store the relevant graphic in the graphic browser. The graphic preview is shown in the right pane. 5. Click "Select" to add the graphic to the screen. Click "Clear" to remove the graphic from the screen.
1938
Result
The graphic is displayed next to the function key.
10.1.5.7 Task
In this example you create a local function key in a screen. When the operator presses this function key, a screen change to a predefined screen is triggered, for example "Boiler 2". Note Availability for specific HMI devices Function keys are not available on all HMI devices.
Requirement
The screen in which you want to assign the function key is open. You have created the "Boiler 2" screen. The Inspector window is open.
Procedure
Proceed as follows to use the "ActivateScreen" function: 1. Select the desired function key. The properties of the function key are shown in the Inspector window. 2. Click "General." 3. To overwrite a global assignment, disable the "Use local template" option.
1939
5. Select the "ActivateScreen" system function from the list. The "ActivateScreen" function appears in the "Function list" dialog box, including the "Screen name" and "Object number" parameters.
6. Select the "Boiler 2" screen from the "Screen name" list.
Result
The operator changes to the "Boiler 2" screen in runtime by pressing the selected function key.
1940
10.1.6
10.1.6.1 Layers
Use layers in order to achieve differentiated editing of the objects in a screen. A screen consists of 32 layers that you can give any names. If you assign objects to the layers, you thereby define the screen depth. Objects of layer 0 are located at the screen background, while objects of layer 31 are located in the foreground.
The objects of a single layer are also arranged hierarchically. When you create a screen, the object inserted first is located at the rear within the layer. Each further object is placed one position towards the front. You can shift objects forwards and backwards within a layer.
Application examples
Use layers, for example, in the following cases: To hide the labeling of objects when editing, To hide objects, e.g. alarm windows, while configuring other objects
1941
10.1.6.2
Introduction
By default, a new object is inserted on the active layer. You can, however, assign an object to another layer at a later time.
Requirement
A screen with an object is open. The Inspector window is open.
Procedure
1. Select the object in the screen. The object properties are displayed in the Inspector window. 2. Enter the layer to which you want to move the object in "Properties > Properties > Miscellaneous > Layer" in the Inspector window. Alternatively, select the object from the "Layout" task card and drag it to the required layer.
Result
The object is assigned to the selected layer, and positioned at the top of the layer.
10.1.6.3
Introduction
The screen objects are always assigned to one of the 32 layers. There is always an active layer in the screen. New objects you add to the screen are always assigned to the active layer. The number of the active layer is indicated in the "Layer" toolbar. The active layer is indicated icon in the "Layout > Layers" task card. by the Layer 0 is the active layer when you start programming. You can activate a different layer during configuration, if necessary.
1942
Requirement
You have opened a screen which contains at least one object. The Inspector window of the active screen is open.
Procedure
1. Click "Properties > Properties > Layers" in the Inspector window of the current screen. 2. Enter the layer number in "Settings > Active layer".
Alternative procedure
1. Select "Layout > Layers" in the "Layout" task card. 2. Select the "Set to active" command from the shortcut menu of a layer.
Result
The layer with the specified number is now active.
10.1.6.4
Introduction
You can show or hide the layers of a screen as required. You specify the layers that are shown in the Engineering System. When you open a screen, all the layers are always shown.
1943
Requirement
The screen is opened. The "Layout" task card is open.
Procedure
1. Select the layer that you want to hide or show in the "Layout > Layers" task card. 2. Click one of the icons next to the corresponding layer: A shown layer is hidden A hidden layer is shown Note The active layer cannot be hidden.
Alternative procedure
1. Click in an area of the screen that does not contain an object. The screen properties are shown in the Inspector window. 2. In the Inspector window, select "Properties > Properties > Layers":
3. In the list, disable the levels you wish to hide. If you activate "All ES layers" for a layer, the objects in this layer will be shown in the Engineering System.
Result
The layers are shown according to your settings.
1944
10.1.6.5
Renaming layers
Introduction
When you create a screen, the 32 layers are numbered consecutively by default. To improve clarity, you can rename the layers to suit your requirements.
Requirement
The screen is opened.
Procedure
1. Click in an area of the screen that does not contain an object. The screen properties are shown in the Inspector window. 2. In the Inspector window, select "Properties > Properties > Layers".
Result
The layer is displayed with the new name.
1945
10.1.7
10.1.7.1
Introduction
Store all objects you need frequently in the libraries. An object that is stored in the library only has to be configured once. It can then be used repeatedly as often as required. Library objects extend the number of available screen objects and increase the effectiveness during configuration through the multiple usage of ready-to-use objects. Libraries are managed in the "Libraries" task card. The following libraries are available: Project library Global libraries
Note There is a symbol library in the "Tools" task card in the "Graphics" palette.
Project library
There is one library for each project. Objects of the project library are stored alongside with the project data and are available only for the project in which the library was created. If the project is moved to another PC, any project library created in it is also moved.
1946
Global libraries
In addition to the objects from the project library, you can also incorporate objects from global libraries in your projects. A global library is saved independently of the project data in its own file with the extension *.aI11. A project can access several global libraries. A global library may be used concurrently in several projects. When a library object is changed by a project, this library will be changed in all projects in which these libraries are open.
Library objects
A library can contain all WinCC objects. Examples: Complete HMI device Screens Display and control objects including tags and functions Graphics Tags Alarms Text and graphics lists Faceplates Structures
See also
Copy templates and types (Page 1947)
10.1.7.2
Introduction
Both the "Project library" and the "Global library" contain the two folders "Copy templates" and "Types". You can create or use the library objects either as a copy template or a type.
Copy templates
Use copy templates to create independent copies of the library object.
1947
Types
Create instances of objects of the "Types" folder and use these in your project. The instances are bound to their respective type. Changes to an instance also change all other instances. Types are marked by a green triangle in the "Libraries" task card.
See also
Basics on libraries (Page 1946)
10.1.7.3
Libraries in WinCC
Introduction
The WinCC software package includes extensive libraries. Sorted by topic into folders, they contain preassembled graphic objects which you can use in screens for operation and monitoring of your plant.
1948
The folders divide switches and buttons into categories. The "DiagnosticsButtons" folder contains the object "System diagnostics indicator", for example. You use the "System diagnostics indicator" object for system diagnostics in your plant. Note You can only use the objects in the "DiagnosticsButtons" folder on Comfort Panels. You cannot use objects which have "Switch" in the object name or in the associated folder name in Runtime Professional.
1949
In addition, graphics views for the designs are stored in the "Design_Backgrounds" folder; they can be used as object backgrounds for the custom extension of the scope of the library. Note You cannot use objects which have "Switch" in the object name in Runtime Professional. The same applies for the object "D5_Display_3" with the date/time field it contains.
10.1.7.4
Introduction
The libraries are displayed as file folders in the corresponding palette. The elements contained in the library are displayed in the file folder and in the "Elements" palette.
1950
Requirement
At least one library object has been created in a library. The "Libraries" task card is opened.
Procedure
1. Select the library in the corresponding palette whose library objects you want to display.
2. Click . The contained library objects are displayed in the "Elements" palette.
When several objects are assigned to the library with a multiple selection, only one of the objects is shown in the "Elements" palette. The individual components of this element are displayed in the "Parts" palette.
1951
Result
The library objects are displayed in accordance with the configuration. The components of the faceplates are displayed.
1952
10.1.7.5
Introduction
You can always copy or move library objects within the categories of a library. Delete the library objects you do not require. Note Copy templates and types You can only copy and move library objects within the same library. You can only copy copy templates to the "Copy templates" folder or any sub-folder of "Copy templates". You can also only insert types in the "Types" folder or any sub-folder of "Types".
Requirement
You have opened a library which contains several categories and at least one object. The library object is shown.
1953
10.1.7.6
Introduction
You can store all of WinCC objects, such as screens, tags, graphic objects or alarms in your libraries. You can use drag-and-drop to move the corresponding object from the work area, project window or detail view to the library. In a library you have divided into categories, you can directly add objects to a specific category.
Requirement
The "Screens" editor is open. A screen object has been created in the work area of the screen. The created libraries are displayed.
Procedure
1. Select the object in the work area of the "Screens" editor. 2. Drag-and-drop the object from the work area to the desired library. The mouse pointer is transformed into a crosshair with an appended object icon.
Result
The object is saved to the library for further use in multiple instances of your configuration.
1954
10.1.7.7
Introduction
The system always assigns the inserted library object a name which consists of the name of the object type and of a consecutive number. If the inserted object already exists, you can use a dialog window to specify whether or not the existing object should be replaced or inserted under a new name. Enter a new name if you do not want to replace the existing object. You cannot insert library objects that are not supported by the HMI device. Note If you insert a screen with interconnected template from the library, the template will also be inserted. Any existing matching template is not used.
Requirement
The "Libraries" task card is opened. The editor in which you want to insert the library object is open.
Procedure
1. Select the library object that you want to insert in the library. 2. Drag-and-drop the library object to the position in the work area where you want to insert the object. The library object is inserted. 3. Select the library object in the screen and adapt it.
Result
If the object was contained in the "Copy templates" folder, you have inserted an independent copy of the library object in the editor. If the object was contained in the "Types" folder, you have inserted an instance of the library object in the editor.
10.1.7.8
Introduction
In the libraries you store the configured objects that you want to use several times in your configuration. To use objects in several projects, create a global library.
1955
Requirement
You have opened the project. The "Libraries" task card is opened.
Procedure
icon in the "Libraries > Global libraries" task card. 1. Click the The "Create new global library" dialog opens.
2. Enter a name. 3. Select the path where the new library is to be stored. 4. Click "Create".
Result
The new library is shown in the "Global libraries" palette. The global library contains the "Types" and "Copy templates" folders. You can save objects to the library.
10.1.7.9
Introduction
A global library is stored in a separate file on your hard disk drive. The file contains the objects of the global library including the referenced objects. E.g. the reference of a tag which was configured on an I/O field is also saved in the library. WinCC prompts you to save the global libraries when you close WinCC or your project without saving. You also can store the global library during configuration, without storing the entire project.
Requirement
You have opened a project which contains at least one library. The "Libraries" task card is opened. A library has been changed.
STEP 7 Basic V11.0 SP2 System Manual, 12/2011,
1956
Procedure
1. Select the global library that you want to save. 2. Click the icon in the "Libraries" task card in the "Global libraries" palette.
You can alternatively select the "Save Library" command in the shortcut menu. If you want to store the global library in a different folder, select "Save as" in the shortcut menu. Select the path in which you want to store the new library and enter a file name.
Result
The global libraries are saved under their current file name or a file name you have specified.
Requirement
You have saved a global library. A project is open. The "Libraries" task card is opened.
Procedure
icon in the "Global libraries" palette. 1. Click the The "Open global library" dialog box is displayed. 2. Select the path in which the library is stored. 3. Click "Open." Note If you want to access a global library from several projects, the global library will have to be read-only when you open it. As soon as a global library is read-only, access from other projects is blocked.
Result
WinCC displays the opened global library in the "Global libraries" palette.
1957
10.1.8
10.1.8.1
Objects for Basic Panels Availability of display and operating elements for Basic Panels
Only the objects which can be used for the device you are configuring will be shown in the object window. The following table shows the availability of indicator and control objects for the Basic Panels.
Overview
KP300 Basic KP400 Basic KTP400 Basic KTP600 Basic KTP1000 Basic TP1500 Basic Bar User view Date/time field I/O field Ellipse Graphic view Graphic I/O field Help indicator Circle Trend view Line Alarm view Alarm window Alarm indicator Rectangle Recipe view Button Switch Symbolic I/O field Text field Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes No Yes Yes Yes Yes
1958
Objects
The tags are displayed graphically using the "Bar" object. The bar graph can be labeled with a scale of values.
Layout
In the Inspector window, you customize the settings for the position, shape, style, color, and font types of the object. You can adapt the following properties in particular: Color transition: Specifies the change in color display when limit values are exceeded. Displaying the limit lines / limit markers: Shows the configured limit as a line or marker. Define bar segments: Defines the gradations on the bar scale. Define scale gradation: Defines the subdivisions, scale markings and intervals of a bar scale.
Color transition
You define how the color change is represented in "Properties > Properties > Appearance" in the Inspector window.
Color transition "Segmented" Description If a particular limit was reached, the bar changes color segment by segment. With segment by segment representation, you visualize, for example, which limits are exceeded by the displayed value. If a particular limit was reached, the entire bar changes color.
"Entire bar"
1959
See also
Device-Specific Nature of the Objects (Page 1958)
Layout
In the Inspector window, you customize the position, shape, style, color and font types of the object. You can adapt the following properties in particular: Number of lines: Specifies the maximum number of visible entries.
Number of lines
The number of lines in the user view displayed in Runtime is specified in the Inspector window. The setting for the number of lines is only effective if the property "Fit object to contents" is active. 1. In the Inspector window, select "Properties > Properties > View". 2. Enter an integer value under "Number of lines".
STEP 7 Basic V11.0 SP2 System Manual, 12/2011,
1960
See also
Device-Specific Nature of the Objects (Page 1958) Simple user view (Page 2662) Configuring a user view (Page 2134)
Layout
In the Inspector window, you customize the position, style, colors and font types of the object. You can adapt the following properties in particular: Display system time: Specifies that the system time is displayed. Include tag: Specifies that the time of the connected tag is displayed. Long date/time format: This setting defines the format displayed for the data and time.
Using tags
The time of the interconnected tag is displayed in the date/time field. 1. Click the "General" group in the inspector window. 2. In the "Format" area, select a tag with the "DateTime" data type, e.g. an internal tag. Information about data types which are available for connection to other PLCs can be found in the documentation about the respective communication drivers.
1961
See also
Device-Specific Nature of the Objects (Page 1958)
Layout
In the Inspector window, you customize the position, shape, style, color and font types of the object. You can adapt the following properties in particular: Mode: Specifies the response of the object in Runtime. Display format: Specifies the display format in the I/O field for input and output of values. Hidden input: Specifies whether the input value is displayed normally or encrypted during input. Note Reports In reports, I/O fields only output data. "Output" mode is preset. Properties for configuring input are not available, e.g. "hidden input".
1962
Mode
The response of the I/O field is specified in the Inspector window in "Properties > Properties > General > Type".
Mode "Input" "Input/output" "Output" Description Values can only be input into the I/O field in runtime. Values can be input and output in the I/O field in runtime. The I/O field is used for the output of values only.
Layout
The "display format" for the input and output of values is specified in "Properties > Properties > General > Format" in the Inspector window.
Layout "Binary" "Date" "Date/time" "Decimal" "Hexadecimal" "Time" "Character string" Input and output of values in binary form Input and output of date information. The format depends on the language setting on the HMI device. Input and output of date and time information. The format depends on the language setting on the HMI device. Input and output of values in decimal form Input and output of values in hexadecimal form Input and output of times. The format depends on the language setting on the HMI device. Input and output of character strings.
Note Data formats Not all data formats are available for selection for Runtime Professional.
Hidden input
In Runtime the input can be displayed normally or encrypted, for example for hidden input of a password. A "*" is displayed for every character during hidden input. The data format of the value entered cannot be recognized. 1. In the Inspector window, select "Properties > Properties > Response": 2. Activate "Hidden input".
1963
See also
Device-Specific Nature of the Objects (Page 1958)
Ellipse Application
The "Ellipse" is an enclosed object that can be filled with a color or pattern.
Layout
In the Inspector window you can customize the settings for the object position, geometry, style, frame and color. You can adapt the following properties in particular: Horizontal radius: Specifies the horizontal radius of the elliptical object. Vertical radius: Specifies the vertical radius of the elliptical object.
Horizontal radius
The horizontal radius of the "Ellipse" object is specified in the Inspector window. The value is entered in pixels. 1. In the Inspector window, select "Properties > Properties > Layout". 2. Enter a value between 0 and 2500 under "Horizontal."
Vertical radius
The vertical radius of the "Ellipse" object is specified in the Inspector window. The value is entered in pixels. 1. In the Inspector window, select "Properties > Properties > Layout". 2. Enter a value between 0 and 2500 at "Vertical."
See also
Device-Specific Nature of the Objects (Page 1958) Rotating objects (Page 1880) Flipping objects (Page 1881)
1964
Layout
In the Inspector window, you customize the position, shape, style, color and font types of the object. You can adapt the following properties in particular: Graphic: Specifies the graphic file that is displayed in the object. Stretch graphic: Specifies the automatic size stretching for objects with graphics. Transparent color: Specify whether or not the transparent color is used for the graphic.
Inserting graphics
The following graphic format is used in the "Graphic view" object: *.bmp, *.tif, *.png, *.ico, *.emf, *.wmf, *.gif, *.jpg or *.jpeg. You may also use graphics as OLE objects in the Graphic view . 1. In the Inspector window, select "Properties > Properties > General": 2. Select the graphic that you wish to insert. The graphic preview is shown in the right pane. 3. Click "Apply" to insert the graphic in the Graphic view .
Stretch graphic
Whether a graphic displayed in a Graphic view is stretched to the size of the Graphic view in runtime is specified in the Inspector window. 1. Click "Properties > Properties > Layout" in the inspector window. 2. Select the required size adjustment for the graphic.
1965
Transparent color
This property defines whether the transparent color is used for the graphic to be displayed. 1. Click "Properties > Properties > Appearance" in the inspector window: 2. Activate "Background > Transparent". 3. Select a transparent color. Note When using bitmaps in WinCC screens the "Transparent color" setting demands a high character performance in the layout on the panel. Visualization performance is enhanced by disabling the "Transparent" setting in the properties of the relevant display object. This restriction applies in particular when bitmaps are used as background image. Note Basic Panels The "Transparent" property is not available for Basic Panels.
See also
Device-Specific Nature of the Objects (Page 1958) Storing an external image in the graphics library. (Page 1887) Options for Editing Objects (Page 1868) Objects for Basic Panels (Page 1958)
Layout
In the Inspector window, you customize the position, shape, style, color and font types of the object. You can adapt the following properties in particular: Mode: Specifies the response of the object in Runtime. Scroll bar type: Specifies the graphic layout of the scroll bar.
1966
Note Basic Panels The scroll bar is not available for Basic Panels. Note Reports Graphic I/O fields output exclusively graphics in reports. "Output" mode is preset. Properties for configuring the selection of graphics are not available, e.g. "scroll bar".
Mode
The response of the "Graphic I/O field" object is specified under "Properties > Properties > General > Type > Mode" in the Inspector window.
Mode "Input" "Input/output" "Output" "Two states" Description The "Graphic I/O field" object is only used to select graphics. The "Graphic I/O field" object is used to select and display graphics. The "Graphic I/O field" object is used to display graphics only. The "Graphic I/O field" object is only used to display graphics and can have a maximum of two states. You use no graphics list but insert one graphic each for the "ON" and "OFF" state.
Stretch graphic
Whether a graphic displayed in a graphic I/O field is stretched to the size of the view in runtime is specified in the Inspector window. 1. In the Inspector window, select "Properties > Properties > Layout". 2. Select the required size adjustment for the graphic.
1967
See also
Device-Specific Nature of the Objects (Page 1958) Symbolic I/O field (Page 1983)
You configure the object "help indicator" exclusively in the global screen.
Layout
You can adapt the following properties in the Inspector window: Position: Determines the position of the object "Help indicator."
Position
You can use this property to set the position of the object "Help indicator." 1. Select the object "Help indicator" in the template. 2. In the Inspector window, select "Properties > Properties > Layout". 3. Enter a value for X and Y. You can also use the cursor keys to position the selected object. If you have configured a screen object at this position, the visible help indicator covers the screen object. The help indicator is covered only by incoming system alarms and dialogs.
See also
Device-Specific Nature of the Objects (Page 1958)
1968
Circle Application
The "Circle" object is a closed object which can be filled with a color or pattern.
Layout
In the Inspector window you can customize the settings for the object position, geometry, style, frame and color. You can adapt the following properties in particular: Radius: Specifies the size of the circle.
Radius
The radius of the "Circle" object is specified in the Inspector window. The value is entered in pixels. 1. In the Inspector window, select "Properties > Properties > Layout". 2. Enter a value between 0 and 2500 in the "Radius" area.
See also
Device-Specific Nature of the Objects (Page 1958)
1969
Layout
In the Inspector window, you customize the position, shape, style, color, and font types of the object. You can adapt the following properties in particular: Display value table, ruler and grid: Specifies whether a value table, a ruler or a grid is displayed in addition to the coordinate system to improve legibility. Toolbars: Defines the display of the control elements.
Toolbars
The layout of the control elements is defined in the "Properties > Properties > Toolbar" inspector window. Note Basic Panels As archiving is not possible for Basic Panels, the control elements are not available.
Toolbar button
Description Scrolls back to the beginning of the trend recording. The start values with which the trend recording started are displayed. Zooms into the displayed time section. Zooms out of the displayed time section. Moves the ruler back. Moves the ruler forward. Scrolls back one display width. Scrolls forward one display width. Shows or hides the ruler. The ruler displays the Xvalue associated with a Y-value. Stops trend recording or continues trend recording.
"Zoom in" "Zoom out" "Ruler backward" "Ruler forward" "Backward" "Forward" "Ruler" "Start/stop"
1970
Consistency test
If warnings or errors are displayed in the output window during a consistency check in connection with trend views, clicking "Go to Error/Tag" on the shortcut menu will not always take you to the exact error position. In some cases only the trend view is shown as cause of error.
See also
Device-Specific Nature of the Objects (Page 1958) Configuring trend displays for values from the PLC (Page 2027) Touch and key operation (Page 2656) Overview (Page 2655)
Line Application
The "Line" object is an open object. The line length and gradient slope are defined by the height and width of the rectangle enclosing the object.
1971
Layout
In the Inspector window, you customize the settings for the object position, shape, style, and color. You can adapt the following properties in particular: Line style Line start and end
Line style
The representation of the line is specified under "Properties > Properties > Appearance" in the Inspector window. The line is shown without interruption if you select "Solid", for example. Note The line styles available depend on the selected HMI device.
See also
Device-Specific Nature of the Objects (Page 1958)
1972
Layout
In the Inspector window, you customize the position, shape, style, color and font types of the object. Note The fonts available for selection depend on the "Language and fonts" you have configured in the Runtime settings. You can adapt the following properties in particular: Control elements: Defines the operator controls of the alarm display. Alarm classes: This setting defines which alarm classes are displayed in the alarm view. Columns: Specifies the displayed columns in runtime. Note If you have different alarm classes output, these will be initially sorted into alarm classes in runtime, and then by when the alarm occurred.
1973
Control elements
The control elements that can be used to control the alarm display in runtime are specified in the Inspector window under "Display > Settings". The following table shows the control elements in the alarm view, and what they do:
Button "Info text" Function Displays info text for an alarm.
"Acknowledge"
Acknowledges an alarm.
"Loop-In-Alarm"
Switches to the screen containing information about the error that has occurred.
Define columns
Define the columns to be displayed in the alarm view in runtime in the Inspector window. 1. In the Inspector window, click "Properties > Columns". 2. Activate the columns that are to be displayed in runtime under "Columns".
1974
See also
Device-Specific Nature of the Objects (Page 1958) Alarm window (Page 1975) Alarm indicator (Page 1977) Configuring an alarm view (Page 2053)
Note In the engineering system you dynamize, for example, the visibility of an object in "Properties > Animations" in the Inspector window. In runtime, the "Simple alarm window" object does not support animations. If you have configured an animation and, for example, wish to perform a consistency check of the project, then an error alarm is issued in the Output window.
1975
Layout
In the Inspector window, you customize the position, shape, style, color and font types of the object. You configure the Alarm window in the same way as the Alarm view. In addition you adapt the following properties: Fixed alarm windows: Specifies that the Alarm window retains the focus after a screen change. Window: You define the operator input and response of the Alarm window in runtime. Note If you have different alarm classes output, these will be initially sorted into alarm classes in runtime, and then by when the alarm occurred.
Control elements
The control elements that can be used to control the alarm view in runtime are specified in the Inspector window under "Properties >Display > Settings". The following table shows the control elements in the Alarm window, and what they do:
Button "Tooltip" Function Displays a tooltip for an alarm.
"Acknowledge"
Acknowledges an alarm.
"Loop-In-Alarm"
Switches to the screen containing information about the error that has occurred.
1976
Window
Define the response of the Alarm window under "Properties > Properties > Mode > Window" in the Inspector window. The following table shows the possible properties:
Option Automatic display Closable Modal Function The Alarm window is automatically displayed when a system alarm occurs, for example. The window closes again after a set time has elapsed. You define the display duration in the alarm settings. The Alarm window is linked to a confirmation, such as: Alarm must be acknowledged. If the modal alarm window has the focus, the buttons in the screen behind it cannot be used. The functions configured for a function key are carried out. You can change the size of the Alarm window in runtime.
Sizeable
See also
Device-Specific Nature of the Objects (Page 1958) Alarm view (Page 1972) Configuring an alarm window (Page 2055)
1977
Alarm indicator OP 73
A "simple" alarm indicator is available for the HMI OP 73. The following diagram shows the alarm indicator for the OP 73 HMI devices:
The "simple" alarm indicator shows alarms to be acknowledged or alarms which have already been acknowledged and have not yet gone. Only the position can be defined for the "simple" alarm indicator. The alarm indicator is displayed on the device at the selected position. If you have configured a screen object at this position, the visible alarm indicator covers the screen object. The alarm indicator is covered by system dialogs, such as the login dialog, Help dialog, and alarm windows.
Layout
In the Inspector window, you customize the position, shape, style, color and font types of the object. You can adapt the following properties in particular: Alarm classes: Establishes the alarm classes where the alarm indicator is displayed. Operator control in Runtime: Defines the operator actions in Runtime that cause the Alarm window to open.
Alarm classes
You define which alarm classes are shown with an alarm indicator in "General > Alarm classes" in the Inspector window. Alarm classes, such as "Warnings" or "Errors".
See also
Device-Specific Nature of the Objects (Page 1958) Alarm view (Page 1972) Configuring an alarm indicator (Page 2056)
1978
Rectangle Application
The "Rectangle" is a closed object which you can fill with a color.
Layout
In the Inspector window, you customize the position, shape, style, color and font types of the object. You can adapt the following properties in particular: Corner radius: Specifies the horizontal and vertical distance between the corner of the rectangle and the start point of a rounded corner.
Corner radius
The corners of the "Rectangle" object can be rounded to suit your requirements. When the properties "X" and "Y" are set to the 100 % value, the rectangle is displayed as an ellipse. As soon as one of the properties has the value 0%, a normal rectangle without a rounded corner is shown. 1. Click "Properties > Properties > Layout" in the inspector window. 2. Enter a value for "X" in the "Corner radius" area. The input value is the percentage proportion of half the width of the rectangle. 3. Enter a value for "Y" in the "Corner radius" area. The input value is the percentage proportion of half the height of the rectangle.
See also
Device-Specific Nature of the Objects (Page 1958) Rotating objects (Page 1880) Flipping objects (Page 1881)
1979
Layout
In the Inspector window, you customize the position, geometry, style, color and font types of the object. You can adapt the following properties in particular: Control elements: Specifies the menu commands of the recipe view.
Control elements
The menu commands with which the recipe view is operated in Runtime are configured under "Properties > Buttons" in the inspector window.
Menu command "Tooltip" "New record" "Delete record" "Saving" "Save as" "Write to PLC" "Read from PLC" Description Calls up the configured tooltip for the selected recipe. Creates a new recipe record in the recipe. Deletes the selected record. Saves the modified record with its current name. Saves the modified record with a new name. Sends the current value to the PLC. Reads the current value from the PLC.
See also
Device-Specific Nature of the Objects (Page 1958) Simple recipe view (Page 2097) Displaying recipes (Page 2091) Configuring the simple recipe view (Page 2108) Description of the simple recipe view (Page 2111)
1980
Switch Application
The "Switch" object is used to configure a switch that is used to switch between two predefined states in Runtime. The current state of the "Switch" object can be visualized with either a label or a graphic. The following figure shows a "Switch" type switch.
Layout
In the Inspector window, you customize the position, shape, style, color and font types of the object. In particular, you can customize the following property: Type: Defines the graphic representation of the object.
Type
The button display is defined in "Properties > Properties > General >Settings" in the Inspector window.
Type "Switch" Description The two states of the "Switch" are displayed in the form of a switch. The position of the switch indicates the current state. The state is changed in runtime by sliding the switch. You specify the direction of movement of the switch in "Switch orientation" with this type. "Switch with text" "Switch with graphic" The switch is shown as a button. The current state is visualized with a label. In runtime click on the button to actuate the switch. The switch is shown as a button. The current state is visualized with a graphic. In runtime click on the button to actuate the switch.
Note Basic Panels The "Switch" type is not available for Basic Panels.
See also
Device-Specific Nature of the Objects (Page 1958) Elements (Page 2221) Overview of objects (Page 1865)
1981
Button Application
The "Button" object allows you to configure an object that the operator can use in runtime to execute any configurable function.
Layout
In the Inspector window, you customize the position, shape, style, color and font types of the object. You can adapt the following properties in particular: Mode: Defines the graphic representation of the object. Text / Graphic: Defines whether the Graphic view is static or dynamic. Define hotkey: Defines a key, or shortcut that the operator can use to actuate the button. Note You can only define a hotkey for HMI devices with keys.
Mode
The button display is defined in "Properties > Properties > General >Mode" in the Inspector window.
Mode "Invisible" "Text" "Graphic" Description The button is not visible in runtime. The current state of the button is visualized with a label. The current state of the button is visualized with a graphic.
Text / Graphic
The "Mode" property settings are used to define whether the display is static or dynamic. The display is defined in "Properties > Properties > General >Label > Text" or "Graphic" in the Inspector window.
Type "Text" Option "Text" Description "Text OFF" is used to specify a text that appears in the button when the state is "OFF". If you enable "Text ON", you can enter a text for the "ON" state. "Text list" The text in the button depends on the state. The entry from the text list corresponding to the state is displayed.
1982
Define hotkey
In the Inspector window, a key or key combination is defined that the operator can use to control the button in runtime. 1. In the Inspector window, select "Properties > Properties > General": 2. Select a key or key combination from the selection list in the "Hotkey" area.
See also
Device-Specific Nature of the Objects (Page 1958) Example: Configuring a button for language switching (Page 1928) Example: Configuring a button with logon dialog box (Page 2142) Example: Configuring a button with access protection (Page 2146)
1983
Layout
In the Inspector window, you customize the position, shape, style, color and font types of the object. You can adapt the following properties in particular: Mode: Specifies the response of the object in Runtime. Text list: Specifies the text list that is linked to the object. Button for selection list: Specifies that the object has a button to open the selection list. Note Reports In reports, symbolic I/O fields only output data. "Output" mode is preset. Properties for configuring the selection of graphics are not available, e.g. "button for selection list".
Mode
The response of the symbolic I/O field is specified in the Inspector window in "Properties > Properties > General > Type".
Mode "Output" "Input" "Input/output" "Two states" Description The symbolic I/O field is used to output values. The symbolic I/O field is used to input values. The symbolic I/O field is used for the input and output of values. The symbolic I/O field is used only to output values and has a maximum of two states. The field switches between two predefined texts. This is used, for example, to visualize the two states of a valve: closed or open.
Note The behavior possible for the symbolic I/O field depends on the Runtime.
Text list
In the Inspector window, you specify which text list is linked to the symbolic I/O field. 1. In the Inspector window, select "Properties > Properties > General": 2. Under "Contents" open the selection list for "Text list". 3. Select a text list.
1984
See also
Device-Specific Nature of the Objects (Page 1958) Graphic I/O field (Page 1966)
Layout
In the Inspector window, you customize the position, shape, style, color and font types of the object. You can adapt the following properties in particular: Text: Specifies the text for the text field. Size of text field: Defines whether the size of the object is adapted to the space required by the largest list entry.
Text
Specify the text for the text field in the Inspector window. 1. In the Inspector window, select "Properties > Properties > General": 2. Enter a text. For texts over several lines you can set a line break by pressing the key combination <Shift + Enter>.
1985
See also
Device-Specific Nature of the Objects (Page 1958)
10.1.9
10.1.9.1
Procedure
Before you create a screen change, define the plant structure and derive from it the screen changes that you want to configure. Create the start screen under "Runtime Settings > General > Start screen".
See also
Assign button with screen change (Page 1987)
1986
10.1.9.2
Introduction
Configure a button in the screen to switch between the screens on the HMI device during operation. Note If you have set the "Visibility" of animations to "Hidden" in the Inspector window of a screen, this screen cannot be called up in Runtime.
Requirements
You have created the project. You have created the "Screen_2" screen. "Screen_1" is created.
Procedure
1. Double-click "Screen_1" in the project navigation. The screen is displayed in the work area. 2. Move "Screen_2" from the project tree to the open screen by drag&drop. A button with the name "Screen_1" is inserted. 3. In the Inspector window, select "Properties > Events > Click". The "ActivateScreen" system function is displayed in the "Function list".
4. At the "Object number" attribute, define, if required, the tab sequence number of the object on which the focus is to be set after a screen change. You can also specify a tag that contains the object number.
Alternative procedure
1. Move a button from the "Tools" task card to "Screen2" by drag&drop. 2. In the Inspector window, select "Properties > Events > Click". 3. Select the "ActivateScreen" system function. 4. Select "Screen_2" for the "Screen number".
STEP 7 Basic V11.0 SP2 System Manual, 12/2011,
1987
Result
The operator goes to "Screen_1 with the button in Runtime. If you have specified an object number, the object with this object number has the focus following a screen change.
See also
Basics for screen navigation (Page 1986)
10.1.9.3
Introduction
Configure a screen change function key in the screen to switch between the screens on the HMI device during operation. Note If you have set the "Visibility" of animations to "Hidden" in the inspector window of a screen, this screen cannot be called up in Runtime.
Requirements
You have created a project. You have created the "Screen_2" screen. You have created the "Screen_1" screen.
Procedure
1. Double click "Screen_1" in the project tree. The screen is displayed in the work area. 2. Move "Screen_2" from the project tree to a function key, e.g. "F2". The configured function key displays a yellow triangle. 3. Click "Properties > Events > Press key" in the inspector window. The "ActivateScreen" system function is displayed.
Result
The operator goes to the specified "Screen_2" with function key "F2" in Runtime.
1988
10.2
10.2.1
10.2.1.1
Introduction
Process values are forwarded in runtime using tags. Process values are data which is stored in the memory of one of the connected automation systems. They represent the status of a plant in the form of temperatures, fill levels or switching states, for example. Define external tags for processing the process values in WinCC. WinCC works with two types of tag: External tags Internal tags The external tags form the link between WinCC and the automation systems. The values of external tags correspond to the process values from the memory of an automation system. The value of an external tag is determined by reading the process value from the memory of the automation system. It is also possible to rewrite a process value in the memory of the automation system.
Internal tags do not have a process link and only convey values within the WinCC.
Tags in WinCC
For external tags, the properties of the tag are used to define the connection that the WinCC uses to communicate with the automation system and form of data exchange. Tags that are not supplied with values by the process - the internal tags - are not connected to the automation system. In the tag's "Connection" property, this is identified by the "Internal tag" entry. You can create tags in different tag tables for greater clarity. You then directly access the individual tag tables in the "HMI tags" node in the project tree. The tags from all tag tables can be displayed with the help of the table "Show all tags".
1989
See also
Overview of HMI tag tables (Page 1990) Internal tags (Page 1994) External tags (Page 1991) Addressing external tags (Page 1992) Creating external tags (Page 1995) Basics on arrays (Page 2022) Cycle basics (Page 2025)
10.2.1.2
Introduction
HMI tag tables contain the definitions of the HMI tags that apply across all devices. A tag table is created automatically for each HMI device created in the project. In the project tree there is an "HMI tags" folder for each HMI device. The following tables can be contained in this folder: Standard tag table User-defined tag tables All tags The following tables are also available in an HMI tag table: Discrete alarms Analog alarms With the help of these tables you configure alarms for the currently selected HMI tag. In the project tree you can create additional tag tables in the HMI tags folder and use these to sort and group tags and constants. You can move tags to a different tag table using a dragand-drop operation or with the help of the "Tag table" field. You activate the "Tag table" field using the shortcut menu of the column headings.
1990
All tags
The "All tags" table shows an overview of all HMI tags and system tags of the HMI device in question. This table cannot be deleted, renamed or moved.
See also
Basics of tags (Page 1989)
10.2.1.3
External tags
Introduction
External tags allow communication (exchange of data) between the components of an automation system, such as between the HMI device and the PLC.
Principle
An external tag is the image of a defined memory location in the PLC. You have read and write access to this storage location from both the HMI device and from the PLC. Since external tags are the image of a storage location in the PLC, the applicable data types depend on the PLC which is connected to the HMI device. In STEP 7, if you write a PLC control program, the PLC tags created in the control program will be added to the PLC tag table. If you want to connect an external tag to a PLC tag, access the PLC tags directly via the PLC tag table and connect them to the external tag.
Data types
All the data types which are available at the connected PLC are available at an external tag in WinCC. Information about data types which are available for connection to other PLCs can be found in the documentation about the respective communication drivers.
1991
See also
Addressing external tags (Page 1992) Basics of communication (Page 2243) Basics of tags (Page 1989)
10.2.1.4
Introduction
The options for addressing external tags depend on the type of connection between WinCC and the PLC in question. A distinction must be made between the following connection types: Integrated connection Connections of devices which are within a project and were created with "Devices & Networks" editor are referred to as integrated connections. Non-integrated connection Connections of devices which were created with the "Connections" editor are referred to as non-integrated connections. It is not necessary that all of the devices be within a single project. The connection type can also be recognized by its symbol.
Integrated connection Non-integrated connection
You can find additional details on this in the section "Basics of communication (Page 2243)".
1992
1993
S7 1200
Yes
Create an integrated connection in the "Devices & Networks" editor. If the PLC is contained in the project and integrated connections are supported, you can then also have the connection created automatically. To do this, when configuring the HMI tag, simply select an existing PLC tag to which you want to connect the HMI tag. The integrated connection is then automatically created by the system.
See also
External tags (Page 1991) Basics of tags (Page 1989) Basics of communication (Page 2243)
10.2.1.5
Internal tags
Introduction
Internal tags do not have any connection to the PLC.
1994
Principle
Internal tags are stored in the memory of the HMI device. Therefore, only this HMI device has read and write access to the internal tags. You can create internal tags to perform local calculations, for example. You can use the HMI data types for internal tags. The following HMI data types are available:
HMI data type Array Bool DateTime DInt Int LReal Real SInt UDInt UInt USInt WString Data format One-dimensional array Binary tag Date/time format Signed 32-bit value Signed 16-bit value Floating-point number 64-bit IEEE 754 Floating-point number 32-bit IEEE 754 Signed 8-bit value Unsigned 32-bit value Unsigned 16-bit value Unsigned 8-bit value Text tag, 16-bit character set
See also
Basics of tags (Page 1989)
10.2.2
10.2.2.1
1995
Requirement
You have opened the project. A connection to the PLC is configured. The Inspector window is open.
Procedure
To create an external tag, proceed as follows: 1. Open the "HMI tags" folder in the project tree and double-click the standard tag table. The tag table is opened. Alternatively, create a new tag table and then open it. 2. In the "Name" column, double-click "Add" in the tag table. A new tag is created. 3. Select the "Properties > Properties >General" category in the Inspector window and, if required, enter a unique tag name in the "Name" field. The tag name must be unique throughout the device. 4. If required, select the "Display name" field to enter a name to be displayed in Runtime. The name to be displayed is language-specific and can be translated for the required Runtime languages. The display name is available for Basic Panels, Panels and Runtime Advanced. 5. Select the connection to the required PLC in the "Connection" box. If the connection you require is not displayed, you must first create the connection to the PLC. You create the connection to a SIMATIC S7 PLC in the "Devices & Networks" editor. You create the connection to external PLCs in the "Connections" editor. If the project contains the PLC and supports integrated connections, you can have the connection created automatically. To do this, when configuring the HMI tag, simply select an existing PLC tag to which you want to connect the HMI tag. The integrated connection is then automatically created by the system.
1996
7. If you are working with a non-integrated connection, enter the address from the PLC in the "Address" field. The "PLC tag" field remains empty. 8. Configure the other properties of the tag in the inspector window. You can also configure all tag properties directly in the tag table. To view hidden columns, activate the column titles using the shortcut menu. You can also create new tags alternatively directly at the application point, e.g. on an I/O field. by clicking the button in the object list. You then configure the new tag in the Inspector window.
Result
An external tag has been created and linked to a PLC tag or an address in the PLC.
See also
Creating internal tags (Page 1998) Creating multiple tags (Page 1999) Editing a Tag (Page 2000) Tag limits (Page 2005) Basics of tags (Page 1989) Addressing external tags (Page 1992)
1997
Requirement
You have opened the project.
Procedure
1. Open the "HMI tags" folder in the project tree and double-click the entry "Standard tag table". The tag table is opened. Alternatively, create a new tag table and then open it. 2. If the Inspector window is not open, select the "Inspector window" option in the "View" menu. 3. Select the "Properties > Properties >General" category in the Inspector window and, if required, enter a unique tag name in the "Name" field. This tag name must be unique throughout the project. 4. If required, select the "Display name" field to enter a name to be displayed in Runtime. The name to be displayed is language-specific and can be translated for the required Runtime languages. The display name is available for Basic Panels, Panels and Runtime Advanced. 5. Select "Internal tag" as the connection in the "Connection" field. 6. Select the required data type in the "Data type" field. 7. In the "Length" field, you must specify the maximum number of characters to be stored in the tag according to the selected data type. The length is automatically defined by the data type for numerical tags. 8. As an option, you can enter a comment regarding the use of the tag. To do so, click "Properties > Properties > Comment" in the Inspector window and enter a text. You can also configure all tag properties directly in the tag table. To view hidden columns, activate the column titles using the shortcut menu. You can also create new tags alternatively directly at the application point, e.g. on an I/O field. button in the object list. You can then configure the new tag in by clicking the the Properties window that opens.
Result
An internal tag is created. You can now use this in your project. In additional steps you can configure the tag, for example, by setting the start value and limits.
1998
See also
Creating external tags (Page 1995)
Requirement
You have opened the project. A tag table is open. The tag which is to serve as a template for other tags is configured.
Procedure
1. If you want to create new tags, mark in the "Name" column the tag that should be used as a template for the new tags. If you want to copy a property of a tag to the tags below it, select the cell which contains this property. The selected cell will be highlighted in color and a small blue square will appear in its bottom right corner. If you move the mouse over this square, the cursor will change to a black cross. 2. Hold down the mouse button and drag this square over the cells below that you wish to fill automatically. The marking will be extended to cover this area. 3. Now release the mouse button. All of the marked cells will be filled automatically. New tags will be created in all empty cells in the marked area.
Result
Depending on which cells were selected, the function may automatically fill individual properties or create new tags.
1999
See also
Creating external tags (Page 1995)
10.2.2.2
Editing tags
Requirement
The tag which you wish to rename, copy or delete must exist. The tag table is open.
Renaming tags
1. In the "Name" field, select the tag in the tag table. 2. Select "Rename" from the shortcut menu. 3. Type in a new name. The tag appears under its new name.
Copying tags
1. Select one or more tags in the tag table or in the Detail window. 2. Select "Copy" from the shortcut menu. 3. Click on the point at which you want to insert the tag. For example, click another tag table in the same device or the tag table in a second device. 4. Select the "Insert" or "Extended insert" command from the shortcut menu. The tag is inserted as described above.
2000
Deleting a tag
1. Select one or more tags in the tag table. 2. Select the "Cross-reference" command from the "Tools" menu. In the "Cross-reference" editor, check to see where the tags are used. In this manner, you can see what impact the deletion of the tag will have on your project. 3. Select "Delete" in the pop-up menu of the tag. All marked tags will be deleted.
See also
Changing the tag configuration (Page 2001) Configuring multiple tags simultaneously (Page 2002) Using multiple tags simultaneously in a screen (Page 2002) Reconnecting a tag (Page 2004) Creating external tags (Page 1995) Importing and exporting tags (Page 2549)
2001
See also
Editing a Tag (Page 2000)
Requirement
You created the tags you want to configure. The tag table is open. The Inspector window is open.
Procedure
1. In the tag table, select all the tags that you want to configure at the same time. If the selected property is identical for all the tags, the setting for this property will appear in the Inspector window. The associated field will remain blank otherwise. 2. You can define the shared properties in the Inspector window or directly in the tag table. if you change a property commonly on several tags, only this one property is changed. The other properties of the tag remain unchanged.
Result
All marked tags will be reconfigured. To edit tag properties which differ from one tag to the other, simply clear the multiple selection.
See also
Editing a Tag (Page 2000)
2002
Requirement
Several tags are set up. A screen is open.
Procedure
1. In the project tree, select the required tag table under "HMI tags".
2. Select the detail view at the bottom of the project tree. The detail view shows the tags that exist in the selected tag group.
3. Mark the tags in the detail window. 4. Drag the tags to the screen. For each tag, this creates an I/O field that is connected to the tag. Note When you move a PLC tag from the detail window to the work area by drag&drop, a network and a connection are created additionally in the "Devices & Networks" editor.
2003
See also
Editing a Tag (Page 2000)
Requirement
You have created an HMI tag. The tag table is open. A PLC tag with the absolute address from the PLC is present.
Procedure
Proceed as follows to reconnect tags: 1. Select the row with the tag in the tag table. 2. Open the shortcut menu and select the menu command "Reconnect PLC tag". The system looks for a PLC tag whose absolute address and data type match the settings for the HMI tag. If a matching PLC tag is found, the tag connection is established immediately.
Result
The PLC tag is connected to the HMI tag.
2004
See also
Editing a Tag (Page 2000)
Configuring tags
Introduction
You can restrict the value range with limits for numerical tags.
Principle
You can specify a value range defined by a high and low limit for numerical tags. If the process value violates the value range, you trigger a function list. If the operator enters a value for the tag that is outside the configured value range, the input is rejected. The value is not accepted. Note You enter the text of the analog alarms for limit violations in the "Analog alarms" editor.
Application example
Use the limit to warn the operator in good time when the value of a tag enters a critical range, for example.
2005
See also
Applying linear scaling to a tag (Page 2011) Defining the start value of a tag (Page 2008) Defining the acquisition cycle for a tag (Page 2015) Defining Limits for a Tag (Page 2006) Start value of a tag (Page 2007) Updating the tag value in Runtime (Page 2008) Linear scaling of a tag (Page 2009) Connecting a tag to another PLC (Page 2011) Indirect addressing of tags (Page 2012) Addressing tags indirectly (Page 2013) Using tags to trigger functions (Page 2014) Address multiplexing (Page 2016) Configuring address multiplexing with absolute addressing (Page 2017) Configuring address multiplexing with symbolic addressing (Page 2019) Creating external tags (Page 1995)
Requirement
You created the tag for which you want to set limits. The Inspector window with the properties for this tag is open.
Procedure
To define limits of a tag, follow these steps: 1. In the Inspector window select "Properties > Properties > Limits." If you want to define one button. Enter a number in of the limits as a constant value, select "Constant" using the the relevant field. If you want to define one of the limits as a tag value, select "HMI tag" using the button. Use the object list to define the tag for the limit. 2. To set an additional limit value for the tag, repeat step 1 with the appropriate settings.
2006
Alternative procedure
You can also configure the high and low limit directly in the tag table. To view hidden columns, activate the column titles using the shortcut menu.
Result
You have set a value range defined by a high and low limit for the selected tag. If the value range is exceeded or undershot, a function list is carried out.
See also
Tag limits (Page 2005)
Application example
You can assign a default value to an I/O field. Enter the desired default value as start value for the tag that is linked to the I/O field.
2007
See also
Defining the start value of a tag (Page 2008) Tag limits (Page 2005)
Requirement
You have created the tag for which you want to define a start value. The Inspector window with the tag properties is open.
Procedure
To configure a start value, proceed as follows: 1. In the Inspector window select "Properties > Properties > Values." 2. Enter the desired "Start value."
Alternative procedure
You can also configure the start value directly in the tag table. To view hidden columns, activate the column titles using the shortcut menu.
Result
The start value you selected for the tag is transferred to the project.
See also
Tag limits (Page 2005) Start value of a tag (Page 2007)
2008
Principle
When Runtime starts, the value of a tag is equal to its start value. Tag values change in Runtime. In Runtime, you have the following options for changing the value of a tag: A value change in an external tag in the PLC. By input, for example, in an I/O field. By running a system function, such as "SetValue."
See also
Tag limits (Page 2005)
2009
Principle
To apply linear scaling to a tag, you must specify one value range on the HMI device and one on the PLC. The value ranges will be mapped to each other linearly.
As soon as data from the HMI device is written to an external tag, it will be automatically mapped to the value range of the PLC. As soon as data from the HMI device is read from the external tag, a corresponding transformation will be performed in the other direction. Note You can also use the system functions "LinearScaling" and "InvertLinearScaling" to automatically convert process values.
Application example
The user enters length dimensions in centimeters but the PLC is expecting inches. The entered values are automatically converted before they are forwarded to the controller. Using linear scaling, the value range [0 to 100] on the PLC can be mapped onto the value range [0 to 254] on the HMI device.
See also
Tag limits (Page 2005)
2010
Requirement
The external tag to which linear scaling is to be applied must exist. The Inspector window with the properties for this tag is open.
Procedure
To apply linear scaling to a tag, follow these steps: 1. In the Inspector window select "Properties > Properties > Linear scaling." 2. Click on "Enable" to switch on linear scaling. Using this option, you can temporarily switch off linear scaling for testing purposes, for example. Settings which were made earlier for linear scaling remain unchanged. 3. In the "PLC" area, enter the start and end values of the value range to be applied to the process values on the PLC. 4. In the "HMI device" area, enter the end and start values of the value range to be applied to the process values on the HMI device.
Result
In Runtime the data will be automatically mapped from one value range to the other. Note You can also use the "LinearScaling" and "InvertLinearScaling" system functions to automatically convert process values.
See also
Tag limits (Page 2005)
2011
Requirement
The external tag, whose connection you wish to change, must already exist. The connection to the PLC must already exist. The Properties window for this tag is open.
Procedure
To change the PLC connection of a tag, proceed as follows: 1. In the Inspector window select "Properties > Properties > General." 2. Select the new connection in the "Connection" field. The tag properties that you must change will be highlighted in color in the tag table and in the Inspector window. 3. Change all highlighted properties of the tag to suit the requirements of the new PLC.
Result
The external tag is connected to the new PLC.
See also
Tag limits (Page 2005)
Application example
Using indirect addressing, you could configure the following scenario: The operator selects one of several machines from a selection list. Depending on the operator's selection, data from the selected machine will be displayed in an output field. To configure such a scenario, configure the index tag for a symbolic I/O field. Configure the multiplex tag at an I/O field. Configure the tag list of the multiplex tag to reflect the structure of the selection list.
2012
See also
Tag limits (Page 2005)
Requirement
The tag which you wish to address indirectly must already exist. The index tag must exist. The tags which will be contained in the tag list must already exist. The Inspector window with the tag properties is open.
Procedure
To address tags indirectly, proceed as follows: 1. In the Inspector window select "Properties > Properties > Multiplexing". 2. Select the "Multiplexing" option to activate indirect addressing. Using this option, you can temporarily switch off indirect addressing for testing purposes, for example. Settings which were made earlier for indirect addressing remain unchanged. 3. Select an "Index tag" or define a new tag using the object list. 4. Click the first entry in the "Tags" column in the tag list. 5. Select a tag as a list entry or define a new tag using the object list. The entry in the "Index" column will be generated automatically. 6. Repeat step 5 for all tags that you wish to add to the tag list. 7. If necessary, you can use drag-and-drop to change the order of the entries in the list.
Result
In runtime, the system will dynamically access the tag in the tag list which has the same index value as the value currently in the index tag.
2013
See also
Tag limits (Page 2005)
Requirement
The tag whose value you wish to use as an event already exists. The Inspector window with the properties for this tag is open.
Procedure
To configure a tag with a function list, proceed as follows: 1. Under "Properties > Events >" in the Inspector window, select the event for which you want to create a function list. The function list associated with the selected event is shown. 2. Click "<Add function>". The second table column contains a selection button. 3. Click the selection button and select a system function. 4. Define the parameter values.
Result
The function list is processed when the configured event occurs in Runtime.
See also
Tag limits (Page 2005)
2014
Requirement
You have created the tag for which you want to define an acquisition cycle. The Inspector window with the tag properties is open.
Procedure
To configure an acquisition cycle for a tag, follow these steps: 1. In the Inspector window select "Properties > Properties > General." 2. If you want to update the tag at regular intervals as long as it is being displayed on the screen or logged, select "Cyclic in operation" as the acquisition mode. Or: If you want to update the tag at regular intervals even though it is not being displayed on the screen or logged, select "Cyclic continuous" as the acquisition mode. The "Cyclic continuous" setting is selected for a tag, for example, that has a function list configured for a change of its value and that is not directly visible in a screen. 3. Select the required cycle time in the "Acquisition cycle" field or define a new acquisition cycle using the object list. Alternatively, you can configure the acquisition cycle directly in the work area of the tag table. To view hidden columns, activate the column titles using the shortcut menu. Note Only use the "Cyclic continuous" acquisition mode for tags that really have to be continuously updated. Frequent read operations generate a heavy communication load.
Result
The configured tag is updated in Runtime with the selected acquisition cycle.
See also
Tag limits (Page 2005)
2015
2016
See also
Tag limits (Page 2005)
Requirement
The tag for address multiplexing is created and connected to the PLC. The Properties window for this tag is open.
Procedure
1. Select the tag for address multiplexing in the tag table, and select "Properties > Properties > General" in the Inspector window. The general properties of the tag are displayed.
2. Select the "Int" data type for this example. 3. Select the access type "Absolute addressing".
2017
5. Click the selection button in the "DB number" field and select the entry "HMI tag".
6. In the "DB number" field, click the button and select a tag for the DB number in the object list. Or create a new tag with the help of the object list. Accept the tag by clicking the button.
7. Repeat steps 3 and 4 for the "Address" field and configure a further tag for calling the address area in the data block.
2018
Result
In runtime, the multiplex tag is used to access the memory location corresponding to the address currently found in the tag. You control access to the data block with the tag in the DB number field. You control access to the address in the selected data block with the tag in the "Address" field. Note The value in the memory location will only be read at the next update cycle for the addressed tag. If, for example, you use a multiplex tag in a script, do not attempt to access contents of the memory location directly after changing it.
See also
Tag limits (Page 2005)
Requirement
The tag for address multiplexing is created. The Properties window for this tag is open. A data block with an array tag is created in the connected PLC. The data block was compiled.
2019
Procedure
1. Select the tag for address multiplexing in the tag table, and select "Properties > Properties > General" in the Inspector window. The general properties of the tag are displayed.
2020
5. Click the selection button in the "Address" field. The address dialog opens. 6. Click the selection button in the "Index tag" field and select the entry "HMI tag".
7. In the "Index tag" field, click the button and select a tag for the array index in the object list. Or create a new tag with the help of the object list. Accept the tag by clicking the button.
Result
In Runtime, the array element whose index value is contained in the index tag is accessed.
2021
See also
Tag limits (Page 2005)
10.2.3
10.2.3.1 Definition
Array data of a uniform data type is successively arranged and is addressed within the address space to allow access to these data by means of an index. The individual array elements are addressed by means of an integer index. The properties of each array element are the same and are configured at the array tag in a data block of the PLC program.
Advantages
You can configure multiple array elements with the same properties at one time using a single array tag. You can then use each array element as any other tag in your configuration.
Restrictions
The following restrictions apply to the use of arrays: Not all HMI devices support array tags. An array may contain only one dimension. The lower index of an array must begin with "0".
Application examples
Array tags can be used in the following situations: To group process values in profile trends: You map process values to trends which are acquired at different points in time, for example. To access specific values which are grouped in trends: You output all values of the profile trend by stepping up the index tag, for example.
2022
Special features
WARNING Increased system load and performance losses Read or write access to a single array element always includes read or write access to all array elements of the array tag. Transfer of the data of large arrays from and to the PLC usually takes longer compared to the transfer of a basic data type. This may cause communication overload and disruption as a result. Example: An array tag which consists of 100 array elements of data type "Real" was configured. If an array element with a length of four bytes changes, 100 x 4 bytes are written to the PLC. CAUTION Data inconsistency at array tags If the value of a single element must be changed in an array tag, the whole array is read, changed and rewritten as a complete array. Changes carried out in the meantime to other array elements in the PLC are overwritten during rewriting. You should always prevent the HMI device and the PLC from concurrently writing values to the same array tag. Use synchronous transfer of recipe data records to synchronize an array tag with the PLC.
See also
Creating array tags (Page 2024) Examples of arrays (Page 2025) Basics of tags (Page 1989)
2023
10.2.3.2
Introduction
Create an array tag to configure a large number of tags of the same data type. The array elements are saved to a consecutive address space. You can create an array tag as an internal tag or as an external tag. If you want to create an array tag as an external tag, first configure an array tag in a data block of the connected PLC. You then connect the array tag to an HMI tag.
Requirement
The HMI tag table is open.
Procedure
To create an array tag, follow these steps: 1. Double click <Add> in the "Name" column of the HMI tag table. A new HMI tag is created. 2. Click 3. Click in the Data type column and select the "Array" data type. in the data type column. The dialog box for configuring the array is opened.
4. Select the desired data type for the array tag in the "Date type" field.
5. Define the number of array elements in the "Array limits" field. The lower limit must begin with "0". 6. Click . The settings for the array are saved. 7. Save the project.
2024
Result
An array tag is created. The properties of the array elements are inherited from the parent array tag.
See also
Basics on arrays (Page 2022)
10.2.3.3
Examples of arrays
Introduction
Array tags combine a number of tags, e.g. 100 array elements. You use array tags as complete arrays in the following places: In the "Alarms" editor In the "Recipes" editor For address multiplexing In the trend view You use individual array elements everywhere in the configuration like HMI tags.
Examples
You can configure an array tag with the corresponding number of array elements to handle multiple tags of the same data type. The individual array elements can be accessed indirectly by means of a multiplex index tag, for example. Use these index tags to operate and monitor the array elements.
See also
Basics on arrays (Page 2022)
10.2.4
10.2.4.1
Introduction
Cycles are used to control actions that regularly occur in runtime. Common applications are the acquisition cycle and the update cycle.
2025
Principle
In Runtime, actions that are performed regularly are controlled by cycles. Typical applications for cycles: Acquisition of external tags The acquisition cycle determines when the HMI device will read the process value of an external tag from the PLC. Set the acquisition cycle to suit the rate of change of the process values. The temperature of an oven, for example, changes much more slowly than the speed of an electrical drive. Do not set the acquisition cycle too low, since this will unnecessarily increase the communication load of the process. The smallest possible value for the cycle depends on the HMI device that will be used in your project. For most HMIs, this value is 100 ms. The values of all other cycles are always an integer multiple of the smallest value.
Application example
You can use cycles for the following tasks: To regularly update a tag. To draw attention to maintenance intervals.
See also
Basics of tags (Page 1989)
10.2.5
10.2.5.1
Displaying tags
Outputting tag values in screens
Introduction
In runtime you can output tag values in the screens of the operator device in the form of a trend. A trend is a graphic representation of the values that a tag takes during runtime. Use the "Trend display" graphic object to represent it. Process values for the trend display are loaded by the PLC from the ongoing process. The values to be displayed are determined individually within a fixed, configurable cycle. Cyclically-triggered trends are suitable for representing continuous curves, such as the changes in the operating temperature of a motor.
Displayed values
You will need to configure a trend view in a screen so that tag values are displayed on the HMI device. When configuring the trend view, specify which tag values are to be displayed. You can control the updating of the trend display by defining the cycle time.
2026
10.2.5.2
Introduction
You use a trend view to graphically represent values that a tag assumes during the process.
Requirement
A screen is open. The Inspector window with the trend view properties is open.
Procedure
To configure a trend view, follow these steps: 1. Add the "Trend view" object from the toolbox in the "Control" group to the screen.
2. Select the "Trend" category from the "Properties" group in the Inspector window and doubleclick "<Add>" in the "Name" column.
3. Assign a name to the trend in the "Name" column. 4. In the "Style" column, use the selection button to open the "Style" dialog and select the style of the line. 5. Select the number of trend values in the "Trend values" column.
2027
7. You can make other settings in the dialogs of the Inspector window. For example, you can select the "Display table" option in the "Table" category to display a value table beneath the trend view. Note If you hold down the <CTRL> key and double-click the trend view, the trend view is activated. You set the column width and the position of the columns in the table header of the values table in active mode. In order to activate the trend view the zoom factor has to be set to 100 %.
Result
In runtime, the values of the selected tags are displayed in the configured trend view.
10.3
10.3.1
10.3.1.1
Introduction
The alarm system allows you to display and record operating states and faults on the HMI device that are present or occur in a plant. An alarm may have the following content:
N Time o. 5 Date Alarm text Boiler pressure above high limit. Status Incoming Outgoing Alarm class Warning: Color Red
2028
10.3.1.2
Alarm types
2029
User-defined alarms
Analog alarms Analog alarms are used to monitor limit violations. Discrete alarms Discrete alarms are used to monitor states.
System-defined alarms
System events System events belong to the HMI device and are imported into the project. System events monitor the HMI device.
Description
A system alarm indicates the status of the system, plus communication errors between the HMI device and system. Under "Runtime settings > Alarms" you specify how long a system alarm is shown on the HMI device.
Support
The reference contains a list of the possible system events, along with the cause and possible remedies. If you contact online support because of a system alarm on the HMI device, you will need the alarm number and tags used in the system alarm.
2030
Example
The speed of the mixer in a fruit juice mixing plant must not be too high or too low. You can configure analog alarms to monitor the speed of the mixer. If the high or low limit for the speed of the mixer is violated, an alarm is output on the HMI device containing the following alarm text, for example: "Mixer speed is too low".
Example
A fruit juice mixing plant consists of several tanks containing the ingredients. To ensure the correct mixing ratio of water, fruit concentrate, sugar, and flavoring, the valves in the intakes open and close at the right moment. This operation should be monitored. You configure a suitable discrete alarm for all the valve states. If a valve on one of the four tanks opens or closes, an alarm is displayed, such as "Water valve closed". The operator can thus monitor whether the plant is producing correctly.
10.3.1.3
Alarm states
Introduction
An alarm assumes various alarm states in Runtime.
2031
Description
Every alarm has an alarm status. The alarm states are made up of the following events: Incoming (I) The condition for triggering an alarm is satisfied. The alarm is displayed, such as "Boiler pressure too high." Outgoing (O) The condition for triggering an alarm is no longer satisfied. The alarm is no longer displayed as the boiler was vented. Acknowledge (A) The operator acknowledges the alarm.
IA IAO
Each occurrence of these states can be displayed and logged on the HMI device and a protocol printed. Note You can configure the display text for the alarm status.
2032
10.3.1.4
Alarm classes
Description
The alarm class defines how an alarm is displayed. The alarm class specifies if and how the user has to acknowledge alarms of this alarm class. A new alarm class with mandatory acknowledgment is generated in WinCC. Note The choice of display modes for alarm classes depends on the options on your HMI device.
See also
Creating alarm classes (Page 2039)
2033
See also
Creating alarm classes (Page 2039)
10.3.1.5
Acknowledgment
Description
Acknowledging an alarm changes the alarm status from "Incoming" to "Acknowledged". When the operator acknowledges an alarm, the operator confirms that he or she has processed the status that triggered the alarm.
2034
2035
10.3.1.6
Alarm groups
Introduction
Many alarms from different areas and processes occur in a plant. You can compile associated alarms into alarm groups.
Alarm groups
You can use the alarm groups to monitor the parts of the plant and to acknowledge the associated alarms together as required. Alarm groups can contain alarms from different alarm classes. You only assign alarms that require acknowledgment to alarm groups.
Display in Runtime
In Runtime, the "Alarm group" column displays the number of the alarm group to which the alarm belongs.
2036
10.3.1.7
Alarm number
10.3.2
10.3.2.1 Overview
You configure the components of alarms in WinCC. The following table shows the basic components of alarms:
Alarm Alarm class number Warni 1 ng Syste m 110001 Time Date of day 11:09 :14 11:25 :58 Alarm status Alarm text Alarm Tooltip group Maximum speed reached Switch to "Online" mode 2 0 This alarm is ... This alarm is ... speed_1 PLCVariable_1 Trigger tag Limit value 27
Alarm class
Alarm classes, such as "Warnings" or "Errors." The alarm class defines the following for an alarm: Acknowledgment model Appearance in Runtime (e.g. color)
Alarm number
An alarm is identified by a unique alarm number. The alarm number is assigned by the system. You can change the alarm number to a sequential alarm number, if necessary, to identify alarms associated in your project.
2037
Alarm status
An alarm has the events "Incoming," "Outgoing," "Acknowledge." For each event, a new alarm is output with the current status of the alarm.
Alarm text
The alarm text describes the cause of the alarm. The alarm text can contain output fields for current values. The values you can insert depend on the Runtime in use. The value is retained at the time at which the alarm status changes.
Alarm group
The alarm group bundles individual alarms.
Tooltip
You can configure a separate tooltip for each alarm; the user can display this tooltip in Runtime.
Trigger tag
Each alarm is assigned a tag as trigger. The alarm is output when this trigger tag meets the defined condition, e.g. when its state changes or it exceeds a limit.
Limit value
Analog alarms indicate limit violations. Depending on the configuration, WinCC outputs the analog alarm as soon as the trigger tag exceeds or undershoots the limit value.
2038
10.3.2.2
Configuring alarms
2039
Requirement
The "HMI alarms" editor is open. The Inspector window is open.
Procedure
To create an alarm class, proceed as follows: 1. Click the "Alarm Classes" tab. The predefined and existing custom alarm classes are displayed. The following table lists the predefined alarm classes: 1. Double-click "<Add>" in the table. A new alarm class is created. Each new alarm is automatically assigned a static ID. The properties of the new alarm class are shown in the Inspector window. 2. Configure the alarm class under "Properties > Properties >General" in the Inspector window. Enter a "Name" and the "Display name". Depending on the HMI device, you can also activate logging, or automatic sending of emails. 3. Define the acknowledgment model for the alarm class under "Properties > Properties > Acknowledgment" in the Inspector window. 4. Change the default text under "Properties > Properties > Status" in the Inspector window. This text indicates the status of an alarm in Runtime. 5. Change the default colors under "Properties > Properties > Colors" in the Inspector window. Depending on the HMI device, also change the flashing characteristics. These settings define how alarms from this alarm class are displayed in Runtime. Note To display the alarm classes in color in Runtime, the "Use alarm class colors" option must be activated. In the project navigation, enable "Runtime settings > Alarms > General > Use alarm class colors" accordingly. This option is selected in a new project in WinCC.
2040
Requirement
You have created a project. The "HMI alarms" editor is open. The Inspector window is open.
Result
An alarm group is created. For the group acknowledgment of alarms in Runtime, assign the associated alarms that require acknowledgment to an alarm group.
Requirements
The "HMI alarms" editor is open. The Inspector window is open. You have created the required alarm classes and alarm groups.
Procedure
To configure a discrete alarm, proceed as follows: 1. Open the "Discrete alarms" tab. 2. To create a new discrete alarm, double-click in the work area on "<Add>". A new discrete alarm is created.
2041
2042
See also
Configuring loop-in alarm (Page 2047)
Requirements
The "HMI alarms" editor is open. The Inspector window is open. You have created the required alarm classes and alarm groups.
Procedure
To configure an analog alarm, proceed as follows: 1. Click the "Analog alarms" tab. 2. To create a new analog alarm, double-click in the table on "<Add>". A new analog alarm is created.
2043
4. Configure the tag that triggers the alarm under "Properties > Properties > Trigger > Settings". Do not use trigger tags for anything else.
2044
Creating a tooltip
To configure a tooltip for the alarm, follow these steps: Select "Properties > Properties > Tooltip" in the Inspector window and enter your text.
See also
Configuring loop-in alarm (Page 2047)
2045
Requirements
The "HMI alarms" editor is open. The alarm is selected.
2046
Procedure
To format an alarm text, proceed as follows: 1. Select the alarm to edit. 2. In the Inspector window, select the characters to format under "Properties > Properties > General > Alarm text". 3. Select the formatting from the shortcut menu, e.g. "Underscored" or "Uppercase".
Result
The selected characters are displayed in Runtime with the selected formatting.
Result
The selected characters are displayed in unformatted notation in Runtime.
Requirements
The screen called by the Loop-In-Alarm has been created. The "HMI alarms" editor is open.
2047
Procedure
To configure a Loop-In-Alarm for an alarm, proceed as follows: 1. Click the tab that contains the alarm for which you want to configure the Loop-In-Alarm. 2. Select the alarm. 3. In the Inspector window, select "Properties > Events > Loop-In-Alarm". 4. Select the "ActivateScreen" system function. 5. Select the screen called by the Loop-In-Alarm as parameter.
Note To configure the Loop-In-Alarm for an alarm view with an "alarm line" format, use the following system functions: "EditAlarm" for HMI devices with keys "AlarmViewEditAlarm" for HMI devices without keys The system functions trigger the "Loop-In-Alarm" event. The alarm line has no buttons.
Result
If you click on the "Loop-In-Alarm" button of the alarm view in Runtime, a screen is opened with information on the selected alarm.
See also
Configuring analog alarms (Page 2043) Configuring discrete alarms (Page 2041)
2048
Alarms in the "HMI tags" Editor Configuring discrete alarms in the "HMI tags" editor Introduction
In WinCC, you can create and edit discrete and analog alarms, including the trigger tags, in the "HMI tags" editor. Note If you delete, move or copy objects in the "HMI tags" editor, the changes also take effect in the "HMI alarms" editor.
Requirements
The "HMI tags" editor is open.
Procedure
To configure a discrete alarm, proceed as follows: 1. To create a tag, click on "<Add>" in the table at the top of the work area. A new tag is created. 2. Configure an internal or external tag as required. Use the data types "Int" or "UInt" to select an HMI tag. Use the data types "Int" or "Word" to select a PLC tag. 3. Select the tag at the top of the work area. 4. Click on "<Add>" in the table on the "Discrete alarms" tab at the bottom of the work area. A new discrete alarm is created for the tag. If you have selected the incorrect data type, the tag will be marked in the discrete alarm. 5. Configure the discrete alarm in the Inspector window: Enter the alarm text under "Properties > Properties > General > Alarm text". You can also insert output fields into the alarm text. Select an alarm class. Select the trigger bit of the tag that triggers the discrete alarm under "Properties > Trigger". 6. You can create additional discrete alarms to monitor the tags. Note A tag is monitored using only one alarm type. You should therefore create either analog alarms or discrete alarms for a tag.
2049
Result
The configured discrete alarms are created in the "HMI tags" editor and displayed in the "HMI alarms" and "HMI tags" editors.
Requirements
The "HMI tags" editor is open.
Procedure
To configure an analog alarm in the "HMI tags" editor, proceed as follows: 1. To create a tag, click on "<Add>" in the table at the top of the work area. A new tag is created. 2. Configure an internal or external tag as required. 3. In the Inspector window, configure the range values of the tags under "Properties > Properties > Range": Select whether to use a "Constant" or an "HMI tag" as limit value for your range values. The object list opens when you select "HMI tag". Select the tag you want to use.
2050
Result
The configured analog alarms are created in the "HMI tags" editor and displayed in the "HMI alarms" and "HMI tags" editors.
10.3.2.3
Overview of configuring alarm output Steps to complete when configuring alarm output
You configure the alarm output in WinCC in the following steps: 1. Create alarm view Use the display and control objects in the "Screens" editor to display alarms in Runtime. 2. Configure acknowledgment In the "Screens" editor, you can set the operator action that will trigger the acknowledgment.
2051
Additional signals
Alarm indicator The alarm indicator is a configurable, graphical icon. When an alarm comes in, the alarm indicator is displayed on the HMI device. You configure the alarm indicator in the "Global screen" editor. The alarm indicator has two states: Flashing: At least one alarm that requires acknowledgment is pending. Static: The alarms are acknowledged but at least one of them has not gone out yet. The alarm indicator also displays the number of pending alarms according to the HMI device. System functions You can configure a list of functions for the event associated with an alarm. These functions must be executed in Runtime when the event occurs. Use system functions for alarms in WinCC to control the alarm view or the alarm window other than via the toolbar.
2052
Requirement
A screen is open in the "Screen" editor. The "Tools" task card is open.
2053
3. In the table, activate the alarm classes to be displayed in the alarm view.
2054
Result
Alarms of various alarm classes are output in the alarm view during runtime.
See also
Alarm view (Page 1972)
2055
Requirement
The "Global Screen" editor is open. The "Tools" task card is displayed. The Inspector window is open.
Procedure
Proceed as follows to configure an alarm window: 1. Insert an "Alarm window" object from the "Tools" task card into the global screen. 2. Configure the alarm window like an alarm view. 3. Under "Properties > Properties > Mode > Window" in the Inspector window, select how the alarm window reacts and is operated in Runtime. Activate "Modal" if the alarm window is to retain the focus in Runtime after a screen change. This option is important, as switching back and forth between the screen and different windows with <Ctrl+TAB> is not supported.
Result
During runtime, the alarms of the selected alarm class are displayed in the alarm window.
See also
Alarm window (Page 1975)
2056
Requirement
The "Global Screen" editor is open. The "Tools" task card is open. The Inspector window is open.
Procedure
Proceed as follows to configure the alarm indicator: 1. Insert the "Alarm indicator" object from the "Tools" task card into the work area. 2. Select the alarm indicator. 3. Under "Properties > Properties > General" in the Inspector window, select the alarm classes to be displayed by the alarm indicator. Specify whether to display pending and/or acknowledged alarms in the alarm indicator.
4. Under "Properties > Event", assign system function "ShowAlarmWindow" to an event of the alarm indicator. Note If you have configured a permanent window in the screen or template, do not position the alarm window and alarm indicator in the vicinity of the permanent window. Otherwise the alarm window and the alarm indicator are not displayed in Runtime. However, the permanent window is not visible in the "Global screen" editor.
Result
The alarm indicator is displayed if alarms from the selected alarm class are pending or need to be acknowledged in Runtime. The alarm window opens when the user operates the alarm indicator.
2057
See also
Alarm indicator (Page 1977)
10.3.2.4
Acknowledging alarms
Requirement
The "HMI alarms" editor is open. The required alarm class has been created. The required alarm has been created.
Result
The alarm will not disappear in Runtime until it is acknowledged by the operator.
2058
Requirement
The "HMI alarms" editor is open. The required alarm class has been created. The required alarm has been created. An alarm view and a button are created in the "Screens" editor.
2059
2060
Result
If the operator acknowledges the alarm in Runtime, the operating step is forwarded to the PLC.
10.3.3
10.3.3.1 Alarms
Alarms indicate events and states on the HMI device which have occurred in the system, in the process or on the HMI device itself. A status is reported when it is received. An alarm could trigger one of the following alarm events: Incoming Outgoing Acknowledge Loop-in-alarm The configuration engineer defines which alarms must be acknowledged by the user. An alarm may contain the following information: Date Time Alarm text Location of fault Status Alarm class Alarm number Alarm group
Alarm classes
Alarms are assigned to various alarm classes. "Warnings" Alarms of this class usually indicate states of a plant such as "Motor switched on". Alarms in this class do not require acknowledgment. "Errors" Alarms in this class must always be acknowledged. Error alarms normally indicate critical errors within the plant such as "Motor temperature too high".
2061
Alarm buffer
Alarm events are saved to an internal buffer. The size of this alarm buffer depends on the HMI device type.
Alarm view
The alarm view shows selected alarms or alarm events from the alarm buffer. Whether alarm events have to be acknowledged or not is specified in your configuration.
Alarm window
An alarm window shows all pending alarms or alarms awaiting acknowledgement of a particular alarm class. The alarm window is displayed as soon as a new alarm occurs. You can configure the order in which the alarms are displayed. You can choose to display the alarms in ascending or descending order of their occurrence. The alarm window can also be set to indicate the exact location of the fault, including the date and time of the alarm event. By means of configuration, the display can be filtered in such a way that only alarms that contain a specific character string will be shown.
Alarm indicator
The alarm indicator is a graphic icon that is displayed on the screen when an alarm of the specified alarm class is activated. The alarm indicator can have one of two states: Flashing: At least one unacknowledged alarm is pending. Static: The alarms are acknowledged but at least one of them has not gone out yet. The displayed number indicates the number of queued alarms.
2062
10.3.3.2 Application
The simple alarm view shows selected alarms or alarm events from the alarm buffer. The layout and operation of the simple alarm window correspond to that of the simple alarm view. Note In the Engineering System, for example, dynamize the visibility of an object in the "Animations" tab of the Inspector window. In Runtime, the "Simple alarm view" does not support animations. If you configured an animation and, for example, run a consistency check on the project, an error alarm is displayed in the output window.
Layout
Depending on the configuration, in the alarm view different columns with information regarding an alarm or an alarm event are displayed. To differentiate between the different alarm classes, the first column in the alarm view contains an icon:
Symbol ! empty depends on the configuration $ Alarm class "Errors" "Warnings" Custom alarm classes "System"
2063
Operation
You use the alarm view as follows, depending on how it is configured: Acknowledging alarms Editing alarms
Control elements
The buttons have the following functions:
Button Function Acknowledge alarm Loop-In-Alarm Changes to the screen that contains information about the error event Displaying a tooltip for an alarm Displays the full text of the selected alarm in a separate window, namely the alarm text window In the alarm text window, you can view alarm texts that exceed the space available in the Alarm view. Close the alarm text window with the the button. Scrolls one alarm up. Scrolls one page up in the alarm view. Scrolls one page down in the alarm view. Scrolls one alarm down.
10.3.3.3 Application
The alarm indicator is displayed if alarms of the specified alarm class are pending or require acknowledgment.
2064
Layout
The alarm indicator can have one of two states: Flashing: At least one unacknowledged alarm is pending. Static: The alarms are acknowledged but at least one of them has not gone out yet. The displayed number indicates the number of queued alarms.
Operation
Depending on the configuration, when operating the alarm indicator an alarm window is opened. The alarm indicator can only be operated with the touch screen.
10.3.3.4
Acknowledging alarms
Introduction
You can acknowledge alarms in Runtime according to your project configuration settings. You can acknowledge alarms as follows: Using the display and control object buttons Using the "ACK" key on your HMI device Using individually-configured function keys or buttons If an operator authorization is configured for an individual control, the alarms can only be acknowledged by authorized users. To automatically acknowledge alarms in Runtime, use the system functions and the option "Acknowledgment by the PLC".
Acknowledgment variants
You acknowledge individual alarms or multiple alarms together in Runtime. They are distinguished as follows: Single acknowledgment Acknowledgment of an alarm using a button or a function key. Acknowledge alarm groups Acknowledgment of all the alarms of an alarm group using a button or a function key.
Requirement
An alarm is displayed on the HMI device.
Procedure
To acknowledge an alarm, proceed as follows: 1. Select the alarm. 2. Click on the
STEP 7 Basic V11.0 SP2 System Manual, 12/2011,
button.
2065
Result
The alarm status changes to "Acknowledged". If the condition for triggering an alarm no longer applies, the alarm status also changes to "Outgoing", and it is no longer displayed on the HMI device.
10.3.4
10.3.4.1
Reference
System functions for alarms
System functions
System functions are predefined functions you can use to implement many tasks in runtime, even with no programming knowledge. You use system functions in a function list. The table shows all the system functions available for displaying and editing alarms.
System function EditAlarm ClearAlarmBuffer ClearAlarmBufferProtoolLegacy Effect Triggers the Loop-In-Alarm event for all selected alarms. Deletes alarms from the alarm buffer on the HMI device. Function such as "ClearAlarmBuffer". This system function has been retained to ensure compatibility and uses the old ProTool numbering. Triggers the event Loop-In-Alarm for all alarms selected in the specified alarm view. Acknowledges the alarms that are selected in the specified alarm view. Displays the configured tooltip for the alarm selected in the specified alarm view. Acknowledges all selected alarms. Hides or shows the alarm window on the HMI device.
10.3.4.2
System events
2066
Note System events are output in an alarm view. System events are output in the language currently set on your HMI device.
30000 - Alarms errors when using system functions Meaning of the system events
All system events that can be displayed are listed below. The system events are divided into different ranges.
Table 10-2 Number 30010 30011 30000 - Alarms errors when using system functions Effect/causes The tag could not accept the function result, e.g. when it has exceeded the value range. A system function could not be executed because the function was assigned an invalid value or type in the parameter. A system function could not be executed because the function was assigned an invalid value or type in the parameter. Remedy Check the tag types of the system function parameters. Check the parameter value and tag type of the invalid parameter. If a tag is used as a parameter, check its value. Check the parameter value and tag type of the invalid parameter. If a tag is used as a parameter, check its value.
30012
2067
40011
50001
--
70011
Check the time which is to be set. The system time could not be modified. The error alarm only appears in connection with area Using Windows NT/XP: Users running WinCC Runtime pointer "Date/time PLC". Possible causes: must be granted the right to set the system time of the An invalid time was transferred in the job mailbox. operating system. The Windows user has no right to modify the system time. If the first parameter in the system event is displayed with the value 13, the second parameter indicates the byte containing the incorrect value.
2068
70013
70014
Check the time which is to be set. Using Windows NT/XP: Users running WinCC Runtime must be granted the right to set the system time of the operating system.
70025
70026
--
70027
2069
70029
Check the settings in the "Control Panel > OP" dialog and save the RAM file system using the "Save Files" button in the "Persistent Storage" tab.
70030
The parameters configured for the system function Compare the parameters configured for the system function with the parameters configured for the PLCs are faulty. The connection to the new PLC was not established. and correct them as necessary. The PLC configured in the system function is not an Compare the S7 PLC name parameter configured for the system function with the parameters configured for S7 PLC. The connection to the new PLC was not established. the PLC and correct them as necessary. The object configured with this number in the tab sequence is not available in the selected screen. The screen changes but the focus is set to the first object. Check the number of the tab sequence and correct it if necessary.
70031
70032
70033
Check the network connection to the SMTP server and An e-mail cannot be sent because a TCP/IP re-establish it if necessary. connection to the SMTP server no longer exists. This system event is generated only at the first attempt. All subsequent unsuccessful attempts to send an e-mail will no longer generate a system event. The event is regenerated when an e-mail has been successfully sent in the meantime. The central e-mail component in WinCC Runtime attempts to connect to the SMTP server at cyclic intervals (1 minute) in order to transmit the remaining e-mails. Following a disruption, the TCP/IP connection to the SMTP server could be re-established. The queued e-mails are then sent. No SMTP server for sending e-mails is configured. An attempt to connect to an SMTP server has failed and it is not possible to send e-mails. WinCC Runtime generates the system event after the first attempt was made to send an e-mail. An e-mail cannot be sent for unknown reasons. The contents of the e-mail are lost. The SMTP server has rejected sending or forwarding an e-mail because the domain of the recipient is unknown to the server or because the SMTP server requires authentication. The contents of the e-mail are lost. The syntax of the e-mail address is incorrect or contains illegal characters. The contents of the e-mail are discarded. The syntax of the e-mail address is incorrect or contains illegal characters. --
70034
70036
Configure an SMTP server: In the WinCC Engineering System using "Device settings > Device settings" In the Windows CE operating system using "Control Panel > Internet Settings > E-mail > SMTP Server" Check the e-mail parameters (recipient etc.). Check the domain of the recipient address or disable the authentication on the SMTP server if possible. SMTP authentication is currently not used in WinCC Runtime. Check the e-mail address of the recipient.
70037 70038
70039
70040
--
2070
70042
110003
The operating mode of the specified PLC was changed by the "SetConnectionMode" system function. The "offline" operating mode is now set. The operating mode of the specified PLC was changed by the "SetConnectionMode" system function. The "online" operating mode is now set. An attempt was made to use the "SetConnectionMode" system function to set the specified PLC to "online" mode, although the entire system is in "offline" mode. This changeover is not allowed. The PLC remains in "offline" mode. The content of the "project ID" area pointer does not match the project ID configured in WinCC. The WinCC Runtime is therefore terminated.
110004
--
110005
Switch the complete system to "online" mode and repeat execution of the system function.
110006
Check: the project ID entered on the PLC. the project ID entered in WinCC.
2071
140004
No tag update or write operations are executed due to an incorrect access point, or incorrect module configuration.
140005
No tag update or write operations are executed due to an incorrect HMI device address (possibly too high).
140006
No tag update or write operations are executed due to an incorrect baud rate setting.
2072
140008
Check whether the connection is up and the PLC is switched on. In the Control Panel, check the set parameters using the "Set PG/PC interface" function. Restart the system.
140009 140010
To reinstall the module, open the Control Panel and select "Set PG/PC interface". Switch on the PLC. DP/T: If only one master is connected to the network, disable "PG/PC is the only master" in "Set PG/PC interface". If several masters are connected to the network, enable these. Do not change any settings, for this will cause bus errors. Check the connection and whether the communication partner is switched on. Restart the HMI device. Or: Start WinCC Runtime and then start your other applications.
140011 140012
No tag updates or write operations because communication is down. There is an initialization problem (e.g. if WinCC Runtime was closed in Task Manager). Or: Another application (e.g.STEP7) with different bus parameters is active and the driver cannot be started with the new bus parameters (baud rate, for example). The MPI cable is disconnected and, therefore, there is no power supply. The configured bus address is in use by another application. Incorrect baud rate Or: Incorrect bus parameters (e.g. HSA) Or: OP address > HSA or: Incorrect interrupt vector (interrupt not registered by the driver)
Check the connections. Change the HMI device address in the PLC configuration. Correct the parameters.
2073
2074
Select system function "SetOnline" to enable communication. Check the configuration. Check the configuration. Check the configuration. Set online mode or reconnect to the PLC.
190008
190011
2075
190101
--
190102
--
2076
Coordination is canceled because the write access Change the address or set the address in the PLC at an to the address configured in the PLC is not possible. area which allows write access. Coordination is not carried out at the moment because the address format of the area pointer does not match the internal storage format. Coordination can be executed again because the last error state is eliminated (return to normal operation). The coordination may not be executed. No more data is read or written. Possible causes: The cable is defective. The PLC does not respond, is defective, etc. System overload Internal error
200003
--
200004 200005
-Ensure that the cable is plugged in and the PLC is operational. Restart the system if the system alarm persists.
210001
Change the address, or set up the address in a PLC area at which read/write access is possible. Internal error
210002
210003
--
-Check the PLC program. Check the parameters of the control job. Recompile the configuration data.
2077
220000 - WinCC communication driver alarms 220000 - WinCC communication driver alarms
Number 220001 Effect/causes The tag is not downloaded because write access to data type Bool/Bit is not supported by the sublevel communication driver/HMI device. The tag is not downloaded because write access to data type Byte is not supported by the sublevel communication driver/HMI device. The communication driver cannot be loaded as it is possibly not installed. Communication is down and no update data is transferred because the cable is not connected or defective etc. Communication is up. The connection between the specified PLC and the specified port is active. The connection to the specified PLC is interrupted at the specified port. Remedy Change the configuration.
220002
220003 220004
--Check the following: Is the cable plugged in? Is the PLC OK? Is the right port being used? Is your configuration OK (port parameters, protocol settings, PLC address)? Restart the system if the system event persists.
220008
The communication driver cannot access or open the specified port. This port might be in use by another application, or a port that does not exist on the target device is being used. No communication with the PLC.
Close all applications that access the port and restart the computer. Use another port that exists in the system.
2078
230003
Configure the screen and check the selection function. Observe the range of values for the tag when entering a value. Navigate to another page.
230005
230100
230200
230201
--
2079
230302
Check the configured server address. Check whether the DNS service is available on the network. Check the configured server address. Check whether the remote server is running on the target computer. Use a compatible remote server.
230303
230304
230305
2080
230307
260001
Log on to the system as a user with sufficient authorization. --Select another user name because user names have to be unique in the user management. Enter a shorter user name. Use a shorter or longer password. Enter a logon timeout value between 0 and 60 minutes.
260008
--
260009
If you need to delete a user, because perhaps you have exceeded the maximum number permitted, delete another user.
260012
The password entries in the "Change Password" You have to log on to the system again. Then enter dialog and in the confirmation field do not match. the identical password twice to be able to change the The password is not changed. User will be password. logged off.
2081
260014
You can log on to the system with your correct password. Only an administrator can change the assignment to a group. Enter a password that contains at least one number. Enter a password that contains at least one special character. Check the connection to the SIMATIC Logon Server and its configuration; for example: 1. Port number 2. IP address 3. Server name 4. Functional transfer cable Or use a local user. Log in again and choose a different password. Check the password rules on the SIMATIC Logon Server.
2082
Try again. If necessary, check the password data on the SIMATIC Logon Server.
270001
270002
2083
270004
If the problems persist at the next restart, contact Customer Support (delete Flash). If the problems persist at the next restart, contact Customer Support (delete Flash). The project was compiled and downloaded again to the HMI device. The error should no longer occur at the next restart of the HMI device. Update the operating system and download your project again to the HMI device.
270005 270006
270007
290001
290002
290003
Check the configuration to see whether the tag addresses have been set up in the PLC.
290004
290005
2084
290008
Remove the specified recipe tag in the specified recipe from the project.
290010
A recipe of the specified number does not exist. Check the source for the number (constant or tag value). An attempt was made to save a data record The following remedies are available: under a data record number that already exists. Check the source for the number (constant or tag The operation is not executed. value). First, delete the data record. Modify the "Overwrite" function parameter.
290014
Check the following: The file name Ensure that the file is in the specified directory.
290020
Check back to verify that the download of data records from the HMI device to the PLC has started. Check back to verify that the download of records from the HMI device to the PLC was completed. Check back to indicate that the download of data records from the HMI device to the PLC was canceled due to an error.
--
290021
--
290022
Check the following conditions in the configuration: Are the tag addresses configured in the PLC? Does the recipe number exist? Does the data record number exist? Is the "Overwrite" function parameter set?
290023
Check back to verify that the download of data records from the PLC to the HMI device has started. Check back to verify that the download of data records from the PLC to the HMI device was completed.
--
290024
---
2085
290027
Check the connection to the PLC. Unable to connect to the PLC at present. As a result, the data record cannot be read or written. Possible causes: No hardware connection to the PLC (no cable plugged in, cable is defect), or the PLC is switched off. This alarm is output after you selected screen which contains a recipe view in which a data record is already selected. While saving, it was detected that a data record with the specified number already exists. During the export of data records, a file with the specified name was found. Confirmation prompt before deleting data records. A data record error with error code %1 that cannot be described in more detail occurred. The action is canceled. It is possible that the mailbox was not installed correctly on the PLC. A data record or file cannot be saved because the storage location is out of sufficient space. An attempt was made to execute several recipe actions simultaneously. The last action is not executed. The database for the recipe was corrupted and will be deleted. A check back indicates that the export of data records was started. A check back indicates successful completion of the export of data records. A check back indicates that the export of data records was canceled due to an error. A check back indicates that the import of records was started. A check back indicates successful completion of the import of data records. Reload the data record from the storage location, or retain the current values. Overwrite the data record, or cancel the action. Overwrite the file, or cancel the process. -Check the storage location, the data record, the "Data record" area pointer, and the connection to the PLC. Restart the action after a short waiting time. If the error persists, contact Customer Support. Forward the relevant error code to Customer Support. Delete files no longer required. Retrigger the action after a short waiting time.
290030
290041 290042
Confirmation prompt before saving data records. ----Ensure that the structure of the data records at the storage location and the current recipe structure on the HMI device are identical. ---
290053 290054
2086
290056
290057
--
290058
--
290063
-----Check the source of the data record number, or the data record name (constant, or tag value). Enter a value within the recipe tag limits.
290072
When editing data record values, you entered a Enter a value within the recipe tag limits. value that exceeds the high limit of the recipe tag. The entry is discarded.
2087
Overwrite the record, change the record number or cancel the action. Select a different data record name. -Download the project to the device again, including the recipes (the corresponding check box in the download dialog must be check marked).
10.4
10.4.1
10.4.1.1
Introduction
Related data, e.g. machine parameter assignments or production data, are combined in recipes. Examples: Machine parameter settings that are needed to convert production to a different product variant. Product components that result in different compositions for different end products. A recipe has a fixed data structure. The structure of a recipe is defined in the configuration. A recipe contains recipe data records. These differ in terms of their values, but not their structure.
2088
Using recipes
Recipes can be used in the following situations: Manual production You select the required recipe data and display it on the HMI device. You modify the recipe data as required and save it on the HMI device. You transfer the recipe data to the PLC. Automatic production The control program starts transfer of the recipe data between the PLC and HMI device. You can also start the transfer from the HMI device. Production is then implemented automatically. It is not essential to display or modify the data. Teach-in mode You optimize production data that was optimized manually on the system, e.g. axis positions or filling volumes. The values thus determined are transferred to the HMI device and saved in a recipe data record. You can then transfer the saved recipe data back to the PLC at a later date.
2089
10.4.1.2
10.4.1.3
Structure of recipes
Introduction
The basic structure of a recipe is illustrated with reference to the filling station in a fruit juice plant. There may be several different recipes in an HMI device. A recipe can be compared to an index card box that contains several index cards. The index card box contains several variants for manufacturing a product family. All the data for each manufacturing variant is contained on a single index card. Example: In a soft drinks production plant, a recipe is needed for different flavors. Drink variants include fruit juice drink, juice and nectar.
2090
Recipe
The recipe contains all the recipe data records for the different drink variants.
5 30 23 80
15 35 20 70
Recipe entries
Each index card in a drawer has the same structure. All the index cards contain fields for the different ingredients. Each field corresponds to a recipe entry. All the records of a recipe thus contain the same entries. The records differ, however, in the value of the individual entries. Example: All the drinks contain the following ingredients: Water Concentrate Sugar Flavoring The records for juice drink, fruit juice or nectar differ, however, in the quantity of sugar used in production.
10.4.1.4
Displaying recipes
Introduction
You need to configure the recipe view to display recipes. You can change the values of a recipe in the recipe view and thereby influence the manufacturing process or a machine.
2091
Recipe view
The recipe view is an off-the-shelf WinCC display and operator control for managing recipe data records. The recipe view is always part of a screen. The recipe view shows recipe data records in tabular form. You adapt the appearance and the possible operations to suit your specific needs.
If you are editing recipes with a recipe view in your project, the values are saved in recipe data records. The values are not transferred between the HMI device and PLC until you use the relevant operator control.
10.4.1.5
2092
To transfer recipe data records to the PLC, use the "To PLC" button in the recipe view or an operator control with the system function "RecipeViewSetDataRecordToPLC". Data are exchanged with the PLC by recipe tags. On Basic Panels you cannot use recipe tags outside a recipe, e.g. not in I/O fields.
10.4.1.6 Overview
When recipe data records are transferred between the HMI device and PLC, both communication peers access common communication areas on the other peer. Recipe data records are always transferred directly. The values of the tags are written directly to or read directly from the configured addresses without being placed on the clipboard.
2093
Coordinated transfer
In the case of coordinated transfer, both the PLC and the HMI device set the status bits in the shared data compartment. Coordinated transfer of recipe data records can be a useful solution in the following cases: The PLC is the "active partner" for the transfer of recipe data records. The PLC evaluates information about the recipe number and name, as well as the recipe data record number and name. The transfer of recipe data records is started by the following PLC jobs: "Set_data_record_in_PLC" "Get_data_record_from_PLC"
10.4.2
10.4.2.1
Introduction
You can create, configure and edit recipes, recipe entries and recipe data records in the "Recipes" editor. The "Recipes" editor also allows you to enter values in recipe data records.
2094
You can then configure the selected recipe, the recipe element or the recipe data record in the Inspector window. You will find further notes on configuring the components of a recipe under "Configuring Recipes".
Recipe settings
The following settings are available for recipes:
Setting Name of the recipe Display name Description This is a unique identification for the recipe within the HMI device. Appears in the recipe view, for example, in Runtime. You can configure display names in multiple languages. Assign descriptive names or designations which the operator can associate directly with a recipe, e.g. "fruit juice drink". This is a unique identification for the recipe within the HMI device. Information about the recipe. The date and time of the last change to the recipe is set by default. Defines the storage location for recipes. The recipes are stored as a file. The recipe data records are limited to a predetermined number by default. Maximum number of data records in a recipe in Runtime. The number is limited by the recipe memory of the HMI device.
Recipe number Version Path Size type [fixed] Number of data records [fixed]
2095
NOTICE Path The storage location depends on the storage media available on the HMI device. Basic Panels and OP77A, TP177A (Portrait) These HMI devices have no external memory. Recipes are always saved in the internal Flash memory. The "Path" setting is therefore not available.
Display name
Tooltip
2096
10.4.3
10.4.3.1
Recipe view
The simple recipe view is a ready-made display element and operator control that is used to manage recipe data records. The recipe view shows recipe data records in tabular form. The displayed buttons and information in the columns are adjustable. The values displayed or entered in the recipe view are saved in recipe data records. The displayed recipe data record can be written into the PLC by buttons or values can be read in from the PLC.
2097
Display of values
NOTICE Processed recipe data record is changed in the background Only applies for Basic Panels: if an operator has changed a recipe data record and a PLC job wants to read or write any recipe data record of this recipe, the PLC job is stopped and a system alarm is output. On the other hand, the changed value is displayed immediately if only the PLC job and no operator has changed recipe data. Does not apply for Basic Panels: If an operator has changed a recipe data record and a PLC job has changed the values of the recipe data record concerned, the recipe view is not updated automatically. To update the recipe view, reselect the respective recipe data record.
See also
Recipe view (Page 1980)
10.4.3.2
Screen change
If you change to another screen and have not yet saved changes to the recipe data in the recipe view, you will be prompted to save the recipe data. The recipe name and the name of the recipe data record are displayed to show which recipe data have not been saved yet.
2098
10.4.4
10.4.4.1
Configuring recipes
General configuration procedure
Carry out the following configuration steps when you create a new recipe:
Step 1 2 3 Description Define the structure of the recipe. Create tags according to the recipe structure. Assign process names to these tags. Create the recipe.
2099
NOTICE Basic Panels and OP77A, TP177A (Portrait) The selection of the storage location is not available for these devices. The recipes are always saved in the internal Flash memory. Recipe tags cannot be used outside a recipe, e.g. not in I/O fields, not in alarms as trigger tags, not in systems functions as parameters, etc. NOTICE Restrictions recipe view and recipe image Only the simple recipe view is available in Basic Panels and OP77A, TP177A. Recipe images are not available in Basic Panels and OP73, OP77A, TP177A (Portrait).
10.4.4.2
Requirement
The tags for the recipe have been created. The "Recipes" editor is open.
2100
Create recipe
Create a recipe as follows: 1. Click "Add" in the first free row of the table in the "Recipes" editor. The new recipe is created and displayed on a line.
2. Enter a descriptive name for the recipe under "Name" in the "General" area. This name identifies the recipe unambiguously within the project. 3. Select "Display name" to enter the language-specific name to be displayed in runtime. 4. Select a recipe number in "Number". The number identifies the recipe unambiguously within the HMI device. The recipe is automatically assigned a version that indicates the date and time of the last change. As an alternative, you can enter specific information relating to the recipe. 5. Specify the storage location for recipe data records in "Data medium". The options offered depend on the specific HMI device used. NOTICE Basic Panels and OP77A, TP177A (Portrait) The selection of the storage location is not available for these devices. The recipes are always saved in the internal Flash memory. Recipe tags cannot be used outside a recipe, e.g. not in I/O fields, not in alarms as trigger tags, not in systems functions as parameters, etc. 6. Enter a tooltip that is shown to the operator in runtime.
2101
NOTICE Basic Panels and OP77A, TP177A (Portrait) Because the recipe tags cannot be additionally used in I/O fields in screens for Basic Panels, the "Synchronize recipe view and recipe tags" is not available; you will also not be able to use the "Manual transfer of individual modified values (teach-in mode)" option. 8. Deactivate "Manual transfer of individual modified values (teach-in mode)" to specify that the recipe tags are automatically transferred to the PLC when editing the I/O fields. 9. Activate "Coordinated transfer of data records" to monitor the transfer of recipe data in Runtime using area pointers. 10.Select the appropriate connection to the PLC for coordinated transfer under "Synchronize with".
2102
6. Enter a tooltip. The tooltip is shown to the operator in Runtime. 7. Under "Default value", enter the value that you want to use as the default entry when you create a new recipe data record. 8. To assign text to a value or range of values, select the relevant text list here. The assigned recipe tag must have the data type of a number. The tag value must be within the range of values of the text list. The text stored in the text list is displayed in an output field, for example, in Runtime. 9. Determine exactly how many places a decimal number is rounded to in the "Decimal places" column, e.g. 3 decimal places and vice versa by what power of ten an integer value is multiplied, e.g. 1,000. Examples for 3 decimal places: Entering "5" for a recipe element with the "Integer" data type gives the value "5000". Entering "5.6789" for a recipe element with the "Real" data type gives the value "5.679". 10.Create as many recipe entries as needed for the recipe. The maximum number of recipe entries possible depends on the HMI device being used.
2103
3. Enter a descriptive name under "Name". The name identifies the data record uniquely within the recipe. 4. Enter a language-specific name under "Display name". The display name appears in the recipe view, for example, in runtime. 5. Enter a recipe data record number under "Number". The recipe data record number identifies the recipe data record uniquely within the recipe. 6. If you already know the recipe values at the configuration stage, you can enter the relevant value for each recipe element.
2104
Result
The complete recipe is configured.
Requirement
You have created at least one recipe. The "Recipes" editor is open.
2105
Renaming recipes
We distinguish between internal names and display names for recipes, recipe entries and recipe data records. To rename recipe elements, proceed as follows: 1. Select the recipe that you want to rename. The Inspector window opens. 2. Select the "Rename" command from the shortcut menu. 3. Enter the new name. You rename recipe elements and recipe data records on the relevant tab in the same way. Note The view names in the "Recipes" editor can also be renamed under "Languages & Resources > Project Texts". This possibility is useful when you have already configured in several languages for example.
2106
Deleting a recipe
To delete a recipe, proceed as follows: 1. Select the recipe that you want to delete. 2. Select the "Delete" command from the shortcut menu. The recipe is deleted. You delete recipe elements and recipe data records on the relevant tab in the same way. Note When a recipe is deleted, the recipe data records contained in the recipe are also deleted. Note When you delete a recipe element, the associated values in the recipe data records are also deleted. The assigned tags are retained.
2107
10.4.4.3
Procedure
To configure a simple recipe view, proceed as follows: 1. Paste the recipe view into the screen. You will find the recipe view under "Controls" in the "Tools" task card. 2. Only in devices which also support the extended recipe view: Activate "Simple view" under "Properties > Display > Mode".
2108
4. If you only want to display the recipe data in the recipe view, deactivate "Processing mode" in the "Recipe data record" area. 5. You can define additional options for the recipe view under "Properties > Appearance" and "Properties > Layout".
2109
7. Under "Properties" > Toolbar" specify which menu commands are available in the recipe view in Runtime.
Result
The simple recipe view is configured. You can use the recipe view to display and edit recipe data during runtime.
2110
10.4.5
10.4.5.1
In the simple recipe view, each area is shown separately on the HMI device. You can use the shortcut menu to operate each of these display areas. The simple recipe view always begins with the recipe list.
Operation
You have the following options for using the simple recipe view, according to the configuration: Create, change, copy or delete recipe data records Read recipe data records from the PLC or transfer to the PLC
2111
2112
Function The displayed values of the selected data record are transferred from the HMI device to the PLC. The recipe values from the PLC are displayed in the recipe view of the HMI device.
2113
Result
The new recipe data records will be saved to the selected recipe. If the recipe data records already exists, a system event will be output to the screen.
2114
Result
The recipe data record is stored under the new name.
Result
The modified values are applied to the recipe data record.
Result
The recipe data record is deleted.
2115
Procedure
To read a recipe data record from the PLC, proceed as follows: 1. Open the recipe on the HMI device. The data record list opens. 2. Select the element list of the recipe data record to which you want to apply the values from the PLC. 3. Select the "From PLC" command from the shortcut menu for the element list. The values are read from the PLC and displayed in the current recipe data record. 4. If you want to save the values, select the "Save" or "Save As" command.
Result
The values are read from the PLC, visualized on the HMI device and saved to the recipe data record.
Procedure
To transfer a recipe data record to the PLC, proceed as follows: 1. Open the recipe you want to use. The data record list opens. 2. Select the element list of the recipe data record whose values you want to transfer to the PLC. 3. Select the "To PLC" command from the shortcut menu for the element list.
Result
The values of the recipe data record are transferred to the PLC.
2116
10.4.6
10.4.6.1 Task
Example
Example of creating a recipe
In this example, you create three recipes for a fruit juice mixing machine. The fruit juice mixing machine produces drinks with "orange", "apple" and "tropical" flavors. You create a recipe for each flavor. Each recipe contains a recipe data record for the following mixing ratios: Beverage Nectar Juice
Settings
The settings relate to an HMI device which is connected to a SIMATIC S7-300 or SIMATIC S7-400. In this example, you will need the following tags, recipes, recipe entries and recipe data records: Tags:
Name Liter water Liter concentrate Kilo sugar Gram flavoring PLC connection Yes Yes Yes Yes Address DB 120, DBW 0 DB 120, DBW 4 DB 120, DBW 8 DB 120, DBW 12 Type Integer Integer Integer Integer
2117
Procedure
To create a recipe, proceed as follows: 1. Create the following tags with the settings specified above: "LiterWater", "LiterConcentrate", "KiloSugar" and "GramFlavoring". 2. Create the "Orange", "Apple" and "Tropical" recipes with the settings indicated above. Create the recipe entries in each recipe.
3. Not for Basic Panels: Configure each recipe so that you can synchronize the recipe data records between the recipe screen and recipe view. The values of the recipe tags should not be transferred automatically to the PLC. You will have to make the following settings in the Properties dialog for the recipe concerned: Under "Properties > Options": Activate the "Synchronize recipe view and recipe tags" option. Activate the "Manual transfer of individual modified values (teach-in mode)" option. 4. Create the data records indicated above in each recipe. Enter the values indicated above in each of the data records.
Result
The "Orange", "Apple" and "Tropical" recipes have been created.
2118
10.5
10.5.1
Principle
The access protection controls access to data and functions in Runtime. This feature protects your applications against unauthorized operation. Safety-related operations are already limited to specific user groups when a project is being created. To this purpose you set up users and user groups that you equip with characteristic access rights, so-called authorizations. You then configure the authorizations required for operation of safety-related objects. Operators only have access, for example, to specific operator controls. Commissioners, for example, have unlimited access in Runtime.
Definition
You administer users, user groups and authorizations centrally in the user administration of WinCC. You transfer users and user groups together with the project to the HMI device. The users and passwords are managed on the HMI device in the User view.
Application example
You configure the "Service" authorization so that only service technicians have access to the configuration parameters. You assign the authorization to the "Service technician" user group. This allows all members of this group to set the protected configuration parameters. CAUTION Access protection does not protect against incorrect operations. It is your job to ensure that only authorized personnel with appropriate training will design, commission, operate and maintain plants and machines. Access protection is not suitable for defining work routines and monitoring their observance.
10.5.2
Introduction
In case of a project in manufacturing engineering, the environment at the equipment manufacturer has to be differentiated from the environment at the end customer as plant operator. The equipment manufacturer allows users, for example Mr. Foreman, a specific access within the application or HMI device. However, a user Foreman does not exist at the end customer. The machine manufacturer cannot know the end users and the tasks they have to perform for configuration. The final users are usually set after commissioning at the end customer.
STEP 7 Basic V11.0 SP2 System Manual, 12/2011,
2119
Principle
To minimize the work required for management, authorizations are assigned via user groups and not directly to individual users. A user group assembles configured authorizations according to common jobs. For example, all permissions required for a service job are collected in a "Service technician" group. When you create a user who should be responsible for servicing, you simply assign him to the "Service technician" group. The user view enables user administration in Runtime. Use user view to create, delete and assign an authorization to users in Runtime. The user administration separates the administration of the users from the configuration of the authorizations. This ensures flexibility at the access protection. Defaults can be set for the user administration during the configuration phase in the Engineering System.
10.5.3
10.5.3.1
Basics
Users
Introduction
You can create users in the "Users" tab of the "User administration" editor and assign them to user groups. The "Users" tab is part of the user administration in WinCC.
2120
Open
To open the "Users" tab, double-click "User administration" in the project window.
Work area
The users are managed in the work area: You create or delete users. You assign users to user groups. Note You can assign a user to exactly one user group.
Inspector window
When you select a user, you can change the password in the "General" group. Under "Automatic logoff" you can specify if the user is to be automatically logged off by the HMI device when there is no operator activity after the specified time.
10.5.3.2
Introduction
The "Users" work area lists the users and user groups in table form. You administrate the users and assign them to a user group.
Principle
The work area consists of the "Users" and "Groups" tables.
2121
10.5.3.3
User groups
Introduction
You can create users and authorizations in the "User groups" tab of the "User Administration" editor. The "User groups" tab is part of the user administration in WinCC.
Open
Double-click the "User administration" in the project window. Open the "User groups" tab.
Work area
The user groups and authorizations are managed in the work area: You create new user groups and authorizations or delete them. You assign the authorizations to the user groups.
Inspector window
When a user group or an authorization is selected, you can edit the name in the "General" group. You can also enter a brief description in the "Comment" group.
10.5.3.4
Introduction
The "User groups" work area shows a table of the groups and their authorizations. You administer the user groups and assign authorizations to them.
2122
Principle
The work area consists of the "Groups" and "Authorizations" tables.
The "Groups" table shows the existing user groups. When you select a user group in this table, the "Active" column of the "Authorizations" table shows the authorizations which were assigned to the user group. The number of the user group and of the authorization is assigned by the user administration. The designations and descriptions are assigned by you. The number of predefined authorizations are fixed. Authorizations that you create can be freely edited. Ensure that the assigned numbers are unique.
10.5.3.5
Introduction
In the "Runtime settings > User administration" editor, configure the security settings for users and their passwords in runtime.
Open
Double-click the "Runtime settings" editor in the project window. Click "User administration."
Work area
You carry out the settings for the validity of passwords in runtime in the work area. You determine the complexity of the password, for example.
2123
Effects in runtime
The security settings have the following effects in runtime, depending on the configuration. "Runtime services" group "Enable limit for logon attempts" check box selected The number entered in the "Number of incorrect logon attempts" box defines the number of logon attempts a user is allowed before being assigned to the "Unauthorized" group. "Enable limit for logon attempts" check box not selected The user has an unlimited number of logon attempts in runtime. "Number of incorrect logon attempts" field If you enter "4" in the field, for example, and the fourth logon attempt fails, the user is automatically assigned to the "Unauthorized" group. You can specify 1 to 9 attempts. "Logon only with password" check box When the check box is selected, the user will be authenticated by the password. The user name is not required. To match users to passwords, you cannot configure passwords more than once. "Hierarchy level" group "Group-specific rights for user administration" check box When this check box is selected, administrators only manage users whose group number is less than or equal to their own. For example, an administrator whose group number is 5 can only manage users whose group number is less than or equal to 5. This means that the administrator can assign users only to groups with a group number less than or equal to 5.
2124
10.5.4
10.5.4.1 Principle
This section addresses four target groups. The topics are organized correspondingly. The target groups serve as examples for different groups of persons who use the user administration. 1. Administrator OEM 2. Administrator RT 3. Planners 4. Operator As Administrator OEM you create the user groups, users and authorizations for Runtime in the Engineering System of, for example, an equipment manufacturer. As Administrator RT you administer users in Runtime by means of the "User view."
2125
10.5.4.2
Requirements
The "User groups" work area is open.
Procedure
1. Double-click "Add" in the "Authorizations" table. 2. Enter "Archive data" as the name of the authorization. 3. Enter a brief description as the "Comment."
2126
Note Using SIMATIC Logon Ensure that the names of the user groups in Windows and WinCC are identical.
Requirements
The "User groups" work area is open.
Procedure
1. Double-click "Add" in the "Groups" table. 2. Enter "Operators" as the "Name" of the user group. 3. Change the "Number" of the user group as required. 4. Enter "Display name" of the "Operators" user group. 5. Enter a brief description as the "Comment". In runtime, the user view shows the display name of the user group. The display name of the user group depends on the language. You can specify the name in several languages and switch between languages in runtime.
See also
Assigning an authorization (Page 2127) Creating users (Page 2128) Assigning a user to a user group (Page 2129) Managing user groups (Page 2131) User administration (Page 2130)
Requirements
An "Archive data" authorization has been created. An "Operators" user group has been created. The "User groups" work area is open.
2127
Procedure
1. Click on the "Operators" user group in the "Groups" table. The "Authorizations" table shows all authorizations. 2. Activate the "Archive data" authorization in the "Authorizations" table. NOTICE The "Archive data" authorization is only a designation and does not having any relation to the function "Archiving." You have to establish this relation yourself. To do so, configure the "StartArchiving" system functions at a control button and select "Archive data" as the "Authorization."
See also
Creating a user group (Page 2126)
Requirements
The "Users" work area is open.
Procedure
1. Double-click "Add" in the "Users" table. 2. Enter "Foreman" as the user name. Note The user name must be unique within the project. Otherwise the input is not accepted.
2128
See also
Creating a user group (Page 2126)
Requirements
The user "Foreman" has been created. An "Operators" user group has been created. The "Users" work area is open.
Procedure
1. Click on the "Foreman" user in the "Users" table. The "Groups" table shows all user groups. 2. Activate the "Operators" user group in the "Groups" table.
See also
Creating a user group (Page 2126)
2129
Requirements
The "Users" work area is open.
2130
Deleting a user
1. Select the line of the user to be deleted. 2. Open the shortcut menu with the right mouse button and select the "Delete" command. Note Predefined users cannot be deleted.
See also
Creating a user group (Page 2126)
Requirements
The "User groups" work area is open.
2131
Deleting authorizations
1. Mark the line of the authorization to be deleted. 2. Open the shortcut menu with the right mouse button and select the "Delete" command. Note Predefined authorizations cannot be deleted.
See also
Creating a user group (Page 2126)
2132
10.5.4.3
User view
When you configure a user view in the Engineering System, you administer users in this user view following download to the HMI device. CAUTION Changes in the user view are effective immediately in Runtime. Changes in runtime are not updated in the engineering system. When downloading the user administration to the HMI device, all changes in the user view are overwritten after a security prompt and based on the settings. Users who have a "User administration" authorization have unlimited access to the user view. This allows them to administer all users. Any other user has only limited access to the user view for self administration.
Structure
The user view shows the following in each line: The user The corresponding user group. If no user is logged on, the user view is empty. The content of the individual fields is displayed after logon.
2133
When an administrator is logged on, the user view shows all the users. The administrator changes the user name and the password. The administrator creates new users and assigns them to an existing user group.
When no administrator is logged on, the user view shows only the logged-on user. Users can change their own passwords.
2134
Requirements
A screen has been created.
Procedure
1. Select the "User view" object from the "Controls" category in the toolbox. 2. Drag-and-drop the "User view" object into the screen. 3. Click on "Properties > Properties" in the Inspector window. 4. Specify the appearance of the "User view". 5. You can, for example, select " "Display mode > Fit to size > Fit object to contents".
Result
You have created a user view in the screen.
Requirements
The user view is open. A "Group 2" user group has been created.
2135
Procedure
1. Click "<New User>" in the user view. A dialog opens. 2. Enter "Foreman" as the user name. 3. Press the <Return> button. 4. Click "Password." 5. Enter the password of the user. 6. Press the <Return> button. The password is hidden. 7. Click in the "Group" column. 8. Select "Group 2" as the "Group".
9. Press the <Return> button. 10.Click in the "Logoff time" column. 11.Enter the time after which the user is logged off automatically.
Requirements
Runtime is enabled. The simple user view has been created.
STEP 7 Basic V11.0 SP2 System Manual, 12/2011,
2136
2137
Deleting a user
1. Click the name of the user to be deleted. 2. Delete the name. 3. Press the <Return> button. NOTICE The user can no longer log on in runtime.
2138
Requirements
Under "Runtime settings > User administration" the "Enable limit for logon attempts" check box has been selected. The number 3 is entered in the field "Number of invalid login attempts". The "ShowLogonDialog" system function is configured on a button called "Logon".
Procedure
1. Click the "Logon" button. The logon dialog box is displayed.
2. Enter your user name as it was specified in the user administration, for example "Foreman". If someone has logged on before you, the name of the user will be displayed. 3. Enter the corresponding password. The input is concealed. 4. Click "OK" to close the dialog box.
2139
10.5.4.4
Requirements
The "Operators" user group has been created. The "Archive data" authorization has been created. A screen has been created and opened. The screen contains a button.
Procedure
1. Click the button in the screen. 2. Click "Properties > Properties > Security" in the Inspector window. 3. Select "Archive data" as the "Authorization".
2140
10.5.5
10.5.5.1
Reference
Objects with access protection
Introduction
The following objects can be configured with an authorization: Date/time field I/O field Graphic I/O field Recipe view Switch Button Symbolic I/O field
10.5.5.2 Principle
The predefined user groups and authorizations have the following numbers:
User group "Administrator group" "Users" Number 1 2
2141
10.5.6
10.5.6.1 Task
Examples
Example: Configuring a button with logon dialog box
In the following example, you configure the function "ShowLogonDialog" for a button. A different user can then log on in runtime when the shift changes, for example. In the process the user previously logged on is logged off. Note In runtime the logon dialog box is not displayed by default until you access a protected object. Either no user is logged on or the logged-on user does not have the required authorization.
Requirements
A screen has been created. A button has been created in the screen.
Procedure
1. Click the button in the screen. 2. Click "Properties > Events > Release" in the Inspector window.
2142
Result
If the user clicks on the button in runtime, the function "ShowLogonDialog" is called up. When the function "ShowLogonDialog" is called up, the logon dialog box is displayed. The user logs on with his user name and password.
10.5.6.2 Task
In the following example, you configure the function "TraceUserChange" to the event "User change".
Principle
The "TraceUserChange" function is called when a user logs on or off. When a function is called up, a system message with information about the corresponding user is output. This system message can be archived. When archiving, the system message is provided with a date stamp and time stamp. This ensures that you can track which user was logged on at the HMI device at which time and for how long.
Requirements
You have created an HMI device with Runtime Advanced. The Inspector window is open.
2143
Procedure
1. Double-click the "Scheduler" in the Project view. 2. Double-click "Add" in the table of the tasks. 3. Enter "Logon-Protocol" as the "Name". 4. Select "User change" as the "Trigger". 5. Open "Properties > Events" in the Inspector window. 6. Click the entry "Add function" in the "Function list" table. 7. Select the "TraceUserChange" system function.
Result
A system message is output when a user logs on or logs off.
10.5.6.3
Principle
Completely different groups of persons are involved in a plant or project. Each group of persons protects its respective data and functions against access by others. For this purpose, users are created and assigned to a user group. You can reproduce different views through user groups. Example: Organizational view: Commissioners, Operators, Shift I, Shift II Technological view: Axis control, Tool changers, Plant North, Plant South The following example orientates itself to the organizational view. Every user group has characteristic requirements regarding access protection: A user group has operating authorizations for specific application cases. A programmer changes, for example, recipe data records. In the example the users Miller, Group Smith and Foreman are created and assigned to different user groups. Ms. Miller works as a programmer in the engineering system. The Group Smith are commissioners. Mr. Foreman is an operator.
2144
Requirements
A new project has been created. The "User administration" editor is open.
Procedures overview
Working with user administration has the following procedure in the example: 1. Creating authorizations The planner specifies which authorizations are required for access protection. 2. Configuring authorizations: The planner specifies which objects may be operated and which functions may be executed. 3. Creating user groups and allocating authorizations: The administrator creates the user groups together with the planner. The planner uses the authorizations to specify who may operate objects and change parameters. 4. Creating users and assigning them to a user group: The administrator administers the users.
Result
The aim is the following structure of the user administration of users, user groups and authorizations:
Users Miller Smith Foreman User groups Roles Authorizations Changing recipe records X X x X X Changing system parameters Changing process parameters Managing
The user "Foreman" who belongs to the "Operators" user group has access to the configured "To Recipe view" button. Note Alternatively, you can create several users as operators with different operating authorizations, for example, Operator Level 1, Operator Level 2.
2145
Procedure
1. Open the "User groups" work area. 2. Double-click "Add" in the "Authorizations" table. 3. Enter "Change recipe data records" as the "Name" of the authorization. 4. Repeat steps 2 and 3 to create additional authorizations: "Change system parameters", "Change process parameters".
Result
Requirements
A "Change recipe data records" authorization has been created. A "Recipes" screen has been created. A "Start" screen has been created and opened. A button has been created and marked in the "Start" screen.
STEP 7 Basic V11.0 SP2 System Manual, 12/2011,
2146
Procedure
1. Click "Properties > Properties > General" in the Inspector window. 2. Enter "To Recipe view" as the text. 3. Click "Properties > Events > Click" in the Inspector window. 4. Click the "Add function" entry in the first line of the "Function list" table. 5. Select the "ActivateScreen" system function in the "Screens" group. 6. Click the button in the "Screen name" field. A dialog box for selecting the screen opens. button to close the dialog box. 7. Select the "Recipes" screen and use the
8. Click "Properties > Properties > Security" in the Inspector window. 9. Select "Change recipe data records" as the "Authorization."
Result
Access to the "To Recipe view" button is protected. If, for example, the user "Smith" clicks the button in Runtime, the function "Recipe view" screen is called up. Prerequisite is that the user "Smith" has logged on correctly and has the required authorization. The "Recipes" screen contains a recipe view and other screen objects.
2147
Procedure
1. Open the "User groups" work area. 2. Double-click "Add" in the "Groups" table. 3. Enter "Programmer" as the "Name". 4. Repeat steps 2 and 3 to create the "Commissioner" and "Operator" user groups. 5. Click "Administrator" in the "Groups" table. 6. Activate the "Change system parameters" authorization in the "Authorizations" table.
Interim result
2148
Procedure
1. Click "Operator" in the "Groups" table. 2. Activate the "Change recipe data records" authorization in the "Authorizations" table. 3. Click "Commissioner" in the "Groups" table. 4. Activate the authorizations "Change recipe data records", "Change system parameters" and "Change process parameters" in the "Authorizations" table. 5. Click "Programmer" in the "Groups" table. 6. Activate the "Change recipe data records" authorization in the "Authorizations" table.
Result
Procedure
1. Open the "Users" work area. 2. Double-click "Add" in the "Users" table.
2149
Interim result
Procedure
1. Double-click "Add" in the "Users" table. 2. Enter "Smith" as the user name. 3. Click the button in the "Password" column. The dialog box for entering the password is displayed. 4. Enter "smith" as the password. 5. To confirm the password enter it a second time in the lower field. 6. Close the dialog box by using the icon. 7. Activate the "Commissioner" user group in the "Groups" table. 8. Repeat steps 2 to 6 for the user "Foreman." 9. Activate the "Operators" user group in the "Groups" table.
2150
Result
10.6
10.6.1
10.6.1.1
Introduction
System functions are functions supplied by WinCC. They are predefined and cannot be changed. You can use system functions to implement many tasks in Runtime even without having any programming knowledge, for example: Calculations, e.g. increasing a tag value by a specific or variable amount. Logging functions, e.g. starting a process value log. Settings, e.g. changing the PLC or setting a bit in the PLC. Alarms, e.g after a different user logs on.
2151
Usage
You use system functions in a function list. When configuring a function list, you select the system functions from a selection list that is sorted by categories:
Each system function in WinCC is logically linked with an object and an event. As soon as the event occurs, the system function is triggered.
Language dependency
The names of the system functions are dependent on the set project language. The functionality can then be recognized immediately by the project planner.
Availability
You only configure system functions within a function list which are supported by the selected HMI device. If you use a project for several HMI devices, the system functions that are not supported by an HMI device are marked in color.
Events
The object and the selected function determine which events can be defined as triggers for executing a system function. For example, the "Change value", "Low limit violated" and "Upper limit exceeded" events are associated with the "Tag" object. The "Loaded" and "Cleared" events are associated with the "Screen" object.
2152
10.6.1.2
Introduction
A function list is processed when a configured event occurs in runtime. The operator can trigger an event, for example, by pressing a function key on the HMI device. The system could also trigger an event if a process value falls below a specified limit, for example.
Applications
You can configure system functions on all the objects that are able to react to an event. You can use system functions directly in function lists and thereby control the sequence. Function list The system functions will be processed one line at a time in a function list. To avoid wait times, system functions in WinCC Runtime with a longer running time are executed simultaneously. For instance, a subsequent system function can already be performed even though the previous system function has not yet been completed. An example for the configuration of a function list can be found under "Changing the operating mode on the HMI device with the current display".
10.6.2
10.6.2.1
Introduction
When the configured event occurs, several system functions can be performed with the function list.
2153
Principle
The function list is configured for an event of an object, e.g. a screen object or a tag. The events which are available depend on the selected object and the HMI device.
Events occur only when the project is in Runtime. Events include: Value changes of a tag Pressing of a button Activation of Runtime You can configure exactly one function list for each event. Note The choice of configurable system functions in a function list depends on the HMI device chosen.
10.6.2.2
Status information
During configuration the project data is tested in the background. With the following causes the function list is not executed in Runtime and the incorrect entries are marked red: At least one system function is not completely supplied with parameters. At least one system function is contained which is not supported by the selected HMI device, for example, by changing the device type.
2154
10.6.2.3
Introduction
You can configure a function list by selecting system functions from a drop-down list. The system functions are arranged in the drop-down list according to categories.
Requirement
Object has at least one configurable event.
Procedure
Proceed as follows to configure a function list: 1. Open the editor in WinCC in which the object is located. 2. Select the object. 3. Click "Properties > Events" in the Inspector window. Select the event for which you want to configure the function list. 4. Select the "<No Function>" entry in the drop-down list of the Inspector window. 5. Select the desired system function.
2155
The system function is entered in the function list. 7. If the system function has parameters, specify the values for the parameters.
8. If you want to add other system functions or functions to the function list, then repeat steps four to seven.
Result
The function list is configured. In addition, to the configured event, the status of the function list is displayed in the Inspector window. When the configured event occurs in Runtime, the function list is completed from top to bottom.
2156
10.6.2.4
Introduction
A function list can be edited as follows: Changing the order of execution for system functions Removing a system function For additional information, refer to "Configuring a function list".
Requirement
The function list is configured.
2157
10.6.2.5 Principle
A function list is executed from top to bottom in Runtime. A distinction is made between synchronous and asynchronous execution, so that no waiting periods ensue during execution. The distinction is made by the system by evaluating the different runtimes of the system functions. User-defined functions are always executed synchronously independent of the runtime. If a system function returns an error status, the execution of the function list is cancelled.
Synchronous execution
During synchronous execution, the system functions in a function list are executed one after the other. The previous system function must be finished before the next system function can be executed.
Asynchronous execution
System functions that perform file operations such as saving and reading have a longer runtime than system functions that, for example, set a tag value. Therefore, system functions with longer runtimes are executed asynchronously. For example, while a system function is writing a recipe data record to a storage medium, the next system function is already being executed. Due to the parallel execution of system functions, waiting periods at the HMI device are avoided.
10.6.3
10.6.3.1
Example
Changing the operating mode on the HMI device with the current display
Scheduled task
In this example, you use the "SetDeviceMode" system function to switch between the "online" and "offline" modes on the HMI device. You also display the current set operating mode on the HMI device.
Requirements
A screen has been created.
Settings
For this example you require a HMI-tag and a text list with the following settings: HMI tag:
2158
Text list:
Name ShowOperatingMode Contains Bit (0/1) Values 1: Operating mode: "Online" 0: Operating mode: "Offline"
Procedure
1. Create the "OperatingMode" HMI-tag indicated above.
3. Open the screen and insert a button for which you configure the operating mode change to "online". 4. Click "Properties> Events" in the Inspector window. Select the "Press" event. 5. Configure the "SetDeviceMode" system function for the "Press" event. The system function is found in the selection list under "Settings". 6. For the "Mode" parameter, select the "Online" entry. 7. Configure the system function "SetBit" on the event "Press". The system function is found in the selection list under "Bit processing". 8. Select the HMI-tag "Operating mode" from the selection list for the parameter "Tag".
2159
Interim result
You can toggle the operating mode of the HMI device with the two buttons in Runtime. You want to display the current set operating mode in an output field on the HMI device.
Procedure
1. Create a "Symbolic I/O field" in the process image. Click "Properties > Properties" in the Inspector window. 2. Make the following settings in the "General" group: Select "Output" as the "Mode". Select the text list "Show operating mode" as "Text list". Select "Operating mode" as "Tag".
2160
Result
When you change the operating mode with the buttons, the currently set operating mode on the HMI device is always shown.
10.6.4
10.6.4.1
Reference
Function list
Overview
KP300 Basic PN User-defined functions Logoff (Page 2164) AdjustContrast (Page 2164) ActivateScreen (Page 2165) ActivateScreenByNumber (Page 2166) ActivateCleanScreen (Page 2167) ActivatePreviousScreen (Page 2168) UpdateTag (Page 2169) Logon (Page 2169) EditAlarm (Page 2170) ScreenObjectCursorDown (Page 2171) ScreenObjectCursorUp (Page 2170) ScreenObjectPageDown (Page 2172) ScreenObjectPageUp (Page 2171) IncreaseFocusedValue (Page 2172) IncreaseTag (Page 2173) GoToHome (Page 2174) No Yes Yes Yes Yes No Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes KTP400 Basic PN No Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes KTP 600 Basic DP No Yes No Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes KTP 600 Basic PN No Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
1)
KTP KTP TP 1500 1000 1000 Basic Basic DP Basic PN PN No Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes No Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes No Yes Yes Yes Yes Yes Yes Yes Yes No Yes Yes Yes Yes No Yes No
2161
RecipeViewGetDataRecordFromPLC Yes (Page 2192) RecipeViewClearDataRecord (Page 2193) RecipeViewMenu (Page 2193) RecipeViewOpen (Page 2194) RecipeViewSetDataRecordToPLC (Page 2194) Yes Yes Yes Yes
2162
KTP400 Basic PN Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes No Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
KTP 600 Basic DP Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes No Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
KTP 600 Basic PN Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes No Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
KTP KTP TP 1500 1000 1000 Basic Basic DP Basic PN PN Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes No Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes No Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes No No Yes No No Yes Yes Yes Yes No Yes Yes Yes No Yes Yes Yes No Yes Yes Yes Yes Yes
Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
2163
Parameters
--
See also
Device-based dependency of system functions (Page 2161)
AdjustContrast Description
Changes the contrast of the display one level on the HMI device.
Parameters
Adjust Specifies how the contrast is changed:
2164
Application example
Objective One button each for increasing and decreasing the screen contrast is desired. Notes on configuring Configure two buttons and configure the "AdjustContrast" system function on the "Press" event. The parameters "Increase" and "Decrease" are allocated. Procedure on HMI device When one of the two buttons is pressed in runtime, the contrast is increased or decreased one level.
See also
Device-based dependency of system functions (Page 2161)
ActivateScreen Description
Performs a screen change to the given screen. Use the "ActivateScreenByNumber" system function to change from the root screen to the permanent window or vice versa.
Parameters
Screen name Name of the screen to which you change.
2165
See also
Device-based dependency of system functions (Page 2161) ActivateScreenByNumber (Page 2166)
ActivateScreenByNumber Description
Performs a screen change to a screen depending on a tag value. The screen is identified by its screen number.
Parameters
Screen number Tag which contains the screen number of the destination screen. When a change from the root screen to the permanent window is desired, "0" or "-1" is specified:
2166
See also
Device-based dependency of system functions (Page 2161) ActivateScreen (Page 2165)
ActivateCleanScreen Description
Activates the clean screen on the HMI device. The display of the HMI device is disabled for the given time period. When the display of the HMI device is deactivated, it can be cleaned without triggering touch functions by mistake.
Parameters
Time period Time period for which the display is disabled. The time remaining is displayed as a progress bar.
2167
ActivatePreviousScreen Description
Performs a screen change to the screen which was activated before the current screen. The screen change is not performed if no screen was activated beforehand. The last 10 screens that were called up are saved. A system alarm is output when you change to a screen which is no longer saved. Note If you want to use the system function, the screen to which you change has to be used in the navigation structure.
Parameters
--
See also
Device-based dependency of system functions (Page 2161)
2168
UpdateTag Description
Reads the current value of the tag with the specified Update ID from the PLC.
Parameters
Update ID Update ID assigned to the tag that will be updated.
Logon Description
Logs on the current user on the HMI device.
Parameters
Password The tag from which the password for the user logging on is read. If the user is logged on, the password in the tag is deleted. User name The tag from which the user name for the user logging on is read.
2169
See also
Device-based dependency of system functions (Page 2161)
EditAlarm Description
Triggers the "Edit" event for all selected alarms. If the alarms to be edited have not yet been acknowledged, the acknowledgment takes place automatically when this system function is called up. This system function can only be used for function keys.
Parameters
--
See also
Device-based dependency of system functions (Page 2161)
ScreenObjectCursorUp Description
Results in a line-by-line, upward cursor movement in the specified screen object. The system function can be used for the following screen objects: User view Alarm view Recipe view
2170
Parameters
Screen object Name of the screen object in which the key function is triggered.
ScreenObjectCursorDown Description
Results in a line-by-line, downward cursor movement in the specified screen object. The system function can be used for the following screen objects: User view Alarm view Recipe view
Parameters
Screen object Name of the screen object in which the key function is triggered.
ScreenObjectPageUp Description
Results in a page-by-page, upward cursor movement in the specified screen object. The system function can be used for the following screen objects: User view Alarm view Recipe view
2171
Parameters
Screen object Name of the screen object in which the key function is triggered.
ScreenObjectPageDown Description
Results in a page-by-page, downward cursor movement in the specified screen object. The system function can be used for the following screen objects: User view Alarm view Recipe view
Parameters
Screen object Name of the screen object in which the key function is triggered.
IncreaseFocusedValue Description
Adds the given value to the value of the tag which is connected to the input field (drop-down list, graphic selection list, slider bar) which has the current focus. This system function can only be used for function keys.
2172
Parameters
Value The value which is added to the tag value.
IncreaseTag Description
Adds the given value to the value of the tags. X=X+a Note The system function uses the same tag as input and output values. When this system function is used to convert a value, help tags must be used. The auxiliary tags can be assigned to the tag value with the "SetTag" system function. If you configure the system function on the events of an alarm and the tag is not being used in the current screen, it is not ensured that the actual value of the tags is being used in the PLC. You can improve the situation by setting the "Cyclic continuous" acquisition mode.
Parameters
Tag The tag to which the given value is added.
2173
See also
Device-based dependency of system functions (Page 2161) SetTag (Page 2208)
GoToHome Description
Executes the key function <Home> on the HMI device. This system function is used when the HMI device does not have this functionality by default. The system function can only be used for the following function keys.
Parameters
--
See also
Device-based dependency of system functions (Page 2161)
GoToEnd Description
Executes the key function <End> on the HMI device. This system function is used when the HMI device does not have this functionality by default. The system function can only be used for the following function keys.
2174
Parameters
--
See also
Device-based dependency of system functions (Page 2161)
InvertBit Description
Inverts the value of the given tag of the "Bool" type: If the tag has the value of 1 (TRUE), it will be set to 0 (FALSE). If the tag has the value of 0 (FALSE), it will be set to 1 (TRUE).
Parameters
Tag The tag whose bit is set.
2175
See also
Device-based dependency of system functions (Page 2161) InvertBitInTag (Page 2176)
InvertBitInTag Description
Inverts a bit in the given tag: If the bit in the tag has the value of 1 (TRUE), it will be set to 0 (FALSE). If the bit in the tag has the value of 0 (FALSE), it will be set to 1 (TRUE). After changing the given bit, the system function transfers the entire tag back to the PLC. It is not checked whether other bits in the tags have changed in the meantime. Operator and PLC have read-only access to the indicated tag until it is transferred back to the PLC. Note If the PLC supports BOOL tags, do not use this system function. Use the "InvertBit" system function instead.
Parameters
Tag The tag in which the given bit is set. Bit The number of the bit that is set. When this system function is used in a user-defined function, the bits in a tag are counted from right to left. The counting begins with 0.
2176
See also
Device-based dependency of system functions (Page 2161) InvertBit (Page 2175)
InvertLinearScaling Description
Assigns a value to the tag X, which is calculated from the value of the given tag Y using the linear function X = (Y - b) / a. The tags X and Y must not be identical. This system function is the inverse of the "LinearScaling" system function. Note The tags X and Y must not be identical. If a tag is to be converted into itself, a auxiliary tag must be used. The "SetTag" system function can be used to assign the value of the tags to be converted to the auxiliary tags.
Parameters
X The tag which is assigned the value calculated from the linear equation. Y The tag whose value is used for the calculation. b The value which is subtracted. a The value through which is divided.
2177
See also
Device-based dependency of system functions (Page 2161) LinearScaling (Page 2186)
CalibrateTouchScreen Description
Calls a program for calibrating the touch screen. During the calibration process, there is a prompt to touch five positions on the screen display. Touch the screen display within 30 seconds, to confirm the calibration process. If the calibration is not completed within this time span, the calibration settings are discarded. The user prompt is in English. Use this system function the first time you start the HMI device.
Parameters
-Note The CalibrateTouchScreen system function cannot be simulated.
See also
Device-based dependency of system functions (Page 2161)
TrendViewScrollForward Description
Scrolls forward one display width in the Trend view.
2178
Parameters
Screen object Name of the trend view in which is scrolled forward. Note The HMI device TP 177A does not support this system function for the "screen" object.
TrendViewScrollBack Description
Scrolls back one display width to the left in the trend view.
Parameters
Screen object Name of the trend view in which is scrolled back. Note The HMI device TP 177A does not support this system function for the "screen" object.
2179
TrendViewExtend Description
Reduces the time period which is displayed in the trend view.
Parameters
Screen object Name of the trend view in which the displayed time period is reduced. Note The HMI device TP 177A does not support this system function for the "screen" object.
TrendViewCompress Description
Increases the time period which is displayed in the trend view.
2180
Parameters
Screen object Name of the trend view in which the displayed time period is increased. Note The HMI device TP 177A does not support this system function for the "screen" object.
TrendViewRulerRight Description
Moves the read-line forwards (to the right) in the trend view. Note In order to be able to move the read-line, the read-line must have been switched on. This is done using the "TrendViewSetRulerMode" system function.
Parameters
Screen object Name of the trend view in which the read-line is moved forward. Note The HMI device TP 177A does not support this system function for the "screen" object.
See also
TrendViewSetRulerMode (Page 2182)
2181
TrendViewRulerLeft Description
Moves the read-line backwards (to the left) in the trend view. Note In order to be able to move the read-line, the read-line must have been switched on. This is done using the "TrendViewSetRulerMode" system function.
Parameters
Screen object Name of the trend view in which the read-line is moved backwards. Note The HMI device TP 177A does not support this system function for the "screen" object.
See also
TrendViewSetRulerMode (Page 2182)
TrendViewSetRulerMode Description
Hides or shows the read-line in the trend view. The read-line displays the Y value belonging to the X value. Note To ensure that the ruler is displayed, you have to activate the setting "Show ruler" in the trend view properties.
2182
Parameters
Screen object Name of the trend view in which the read-line is hidden or shown. Note The HMI device TP 177A does not support this system function for the "screen" object.
TrendViewStartStop Description
Stops the trend recording or continues the trend recording in the trend view.
Parameters
Screen object Name of the trend view in which the recording of the trend is started or stopped. Note The HMI device TP 177A does not support this system function for the "screen" object.
2183
TrendViewBackToBeginning Description
Scrolls back to the beginning of the display range in the trend view.
Parameters
Screen object Name of the trend view in which you scroll to the beginning of the display range. Note The HMI device TP 177A does not support this system function for the "screen" object.
GetUserName Description
Writes the user name of the user currently logged on to the HMI device in the given tag. If the given tag has a control connection, the user name is also available in the PLC connection. This system function makes it possible, for example, to implement a user-dependent release of certain functionalities.
2184
Parameters
Tag The tag to which the user name is written.
See also
Device-based dependency of system functions (Page 2161)
GetGroupNumber Description
Reads the number of the group to which the user logged on to the HMI device belongs, and writes it to the given tag.
Parameters
Tag The tag to which the number of the group is written.
See also
Device-based dependency of system functions (Page 2161)
GetPassword Description
Writes the password of the user currently logged on to the HMI device in the given tag. Note Make sure that the value of the given tag is not displayed in another place in the project.
2185
Parameters
Tag The tag to which the password is written.
See also
Device-based dependency of system functions (Page 2161)
LinearScaling Description
Assigns a value to the tag Y, which is calculated from the value of the given tag X using the linear function Y= (a *X) + b. The inverse of this function is the "InvertLinearScaling" system function. Note The tags X and Y must not be identical. If a tag is to be converted into itself, a auxiliary tag must be used. The "SetTag" system function can be used to assign the value of the tags to be converted to the auxiliary tags.
2186
Parameters
Y The tag which is assigned the value calculated from the linear equation. a The value with which is multiplied. X The tag whose value is used for the calculation. b The value which is added.
See also
Device-based dependency of system functions (Page 2161) InvertLinearScaling (Page 2177)
ClearAlarmBuffer Description
Deletes alarms from the alarm buffer on the HMI device. Note Alarms which have not yet been acknowledged are also deleted.
2187
Parameters
Alarm class number Determines which alarms are to be deleted from the alarm buffer: 0 (hmiAll) = All alarms/events 1 (hmiAlarms) = Alarms of alarm class "Errors" 2 (hmiEvents) = Alarms of alarm class "Warnings" 3 (hmiSystem) = Alarms of alarm class "System" 4 (hmiS7Diagnosis) = Alarms of alarm class "Diagnosis Events" Note Availability for specific devices Alarms of alarm class "Diagnosis Events" are not available on Basic Panels.
See also
Device-based dependency of system functions (Page 2161)
ClearAlarmBufferProTool Description
The system function exists to ensure compatibility. It has the same functionality as the "ClearAlarmBuffer" system function, but uses the old ProTool numbering.
Parameters
Alarm class number Alarm class number whose messages are to be deleted: -1 (hmiAllProtoolLegacy) = All alarms/events
2188
See also
Device-based dependency of system functions (Page 2161) ClearAlarmBuffer (Page 2187)
AlarmViewEditAlarm Description
Triggers the event "Edit" for all alarms selected in the given alarm view. This system function is used when the integrated button of the ActiveX control should not be used. A system function can in turn be configured on the "Edit" event. For example, it is possible to change to the process screen in which the alarm appeared. Note If the alarms to be edited have not yet been acknowledged, the acknowledgment takes place automatically when this system function is called up.
2189
Parameters
Screen object Name of the alarm view in which the event is triggered. Note The HMI devices listed below do not support this system function for the "screen" object: OP 73, OP 77A, TP 177A.
AlarmViewUpdate Description
Updates the enhanced alarm view.
Parameters
Screen object Name of the alarm view which is updated.
AlarmViewAcknowledgeAlarm Description
Acknowledges the alarms selected in the given alarm view. This system function is used when the integrated button of the ActiveX control should not be used.
2190
Parameters
Screen object Name of the alarm view in which the event is triggered. Note The HMI devices listed below do not support this system function for the "screen" object: OP 73, OP 77A, TP 177A.
AlarmViewShowOperatorNotes Description
Displays the configured tooltip of the alarm selected in the given alarm view.
Parameters
Screen object Name of the alarm view in which the event is triggered. Note The HMI devices listed below do not support this system function for the "screen" object: OP 73, OP 77A, TP 177A.
AcknowledgeAlarm Description
Acknowledges all selected alarms. This system function is used when the HMI device does not have an ACK key or when the integrated key of the alarm view should not be used. This system function can only be used for function keys.
2191
Parameters
--
RecipeViewNewDataRecord Description
Creates a new data record in the given recipe view.
Parameters
Screen object Name of the recipe view in which the new recipe data record is created.
RecipeViewGetDataRecordFromPLC Description
Transfers the data record that is currently loaded in the PLC to the HMI device and displays it in the recipe view.
2192
Parameters
Screen object Name of the recipe view in which the recipe data record from the PLC is displayed.
RecipeViewClearDataRecord Description
Deletes the data record which is currently displayed in the recipe view.
Parameters
Screen object Name of the recipe view in which the displayed recipe data record is deleted.
RecipeViewMenu Description
Opens the menu of the specified simple recipe view. Only use this system function at a simple recipe view.
2193
Parameters
Screen object Name of the recipe view in which the menu is to be opened.
RecipeViewOpen Description
Displays the data record values in the given recipe view or changes to the next selection field. The system function has no effect if the selection field for the recipe data record values is displayed on the HMI device. Operation sequence of the selection lists in runtime: Recipe name Data record name RecipeDataRecordValues This system function is used when a simple recipe view has been configured. In the simple recipe view, only one selection list is displayed at a time on the HMI device. Use the "RecipeViewBack" system function to display the previous selection list.
Parameters
Screen object Name of the recipe view in which the command is triggered.
See also
RecipeViewBack (Page 2197)
RecipeViewSetDataRecordToPLC Description
Transfers the recipe data record which is currently displayed in the recipe view to the PLC.
2194
Parameters
Screen object Name of the recipe view from which the recipe data record is transferred to the connected PLC.
RecipeViewSaveDataRecord Description
Saves the recipe data record which is currently displayed in the recipe view.
Parameters
Screen object Name of the recipe view in which the recipe data record is saved.
RecipeViewSaveAsDataRecord Description
Saves the data record currently being displayed in the recipe view under a new name.
2195
Parameters
Screen object Saves the data record currently being displayed in the recipe view under a new name and/or new number.
RecipeViewRenameDataRecord Description
Renames the selected data record in the given recipe view. Only use this system function at a simple recipe view.
Parameters
Screen object Name of the recipe view in which the recipe data record is renamed.
RecipeViewShowOperatorNotes Description
Displays the configured tooltip of the specified recipe view.
Parameters
Screen object Name of the recipe view whose configured tooltip is displayed.
2196
RecipeViewBack Description
Returns to the previous selection list in the given recipe view. The system function has no effect if the selection field for the recipe is displayed on the HMI device. Operation sequence of the selection lists in runtime: Recipe name Data record name RecipeDataRecordValues This system function is used when a simple recipe view has been configured. In the simple recipe view, only one selection list is displayed at a time on the HMI device. Use the "RecipeViewOpen" system function to display the recipe data record values or the next selection field.
Parameters
Screen object Name of the recipe view in which the command is triggered.
ResetBit Description
Sets the value of a "Bool" type tag to 0 (FALSE).
2197
Parameters
Tag The BOOL type tag which is set to 0 (FALSE).
See also
Device-based dependency of system functions (Page 2161) ResetBitInTag (Page 2198)
ResetBitInTag Description
Sets a bit in the specified tag to 0 (FALSE). After changing the given bit, the system function transfers the entire tag back to the PLC. It is not checked whether other bits in the tags have changed in the meantime. Operator and PLC have read-only access to the indicated tag until it is transferred back to the PLC. Note If the PLC supports BOOL tags, do not use this system function. Use the "ResetBit" system function instead.
Parameters
Tag The tag in which a bit is set to 0 (FALSE). Bit The number of the bit that is set to 0 (FALSE). When this system function is used in a user-defined function, the bits in the specified tag will be counted from right to left independent of the PLC used. The counting begins with 0.
2198
See also
Device-based dependency of system functions (Page 2161) ResetBit (Page 2197)
PressButton Description
The system function can only be configured on the function keys of an HMI device and triggers the "Press key" event at the specified screen object. Use this system function when you want to operate a button in a screen with a function key of the HMI device, for example. Note The "PressButton" and "ReleaseButton" system functions must always be configured together. If you configure the "PressButton" system function on the "Press key" event for a function key, the "ReleaseButton" system function is configured on the "Release" event for the same function key.
Parameters
Screen object Name of the screen object on which the event is triggered.
ReleaseButton Description
The system function can only be configured on the function keys of an HMI device and triggers the "Release button" event at the specified screen object.
2199
Parameters
Screen object Name of the screen object on which the event is triggered.
ShiftAndMask Description
This system function converts the input bit pattern of the source tags into an output bit pattern of the target tags. This involves bit shifting and masking. Note If the source and target tag have a different number of bits, using the system function in the target tag can result in a violation of the value range.
2200
Parameters
Source tag The tag includes the input bit pattern. Integer-type tags, e.g. "Byte", "Char", "Int", "UInt", "Long" and "ULong" are permitted. Example: The actual value 72 is set at the 16-bit integer source tag: 0000000001001000. Target tag The output bit pattern is saved in the tag. Integer type tags, e.g. "Byte", "Char", "Int", "UInt", "Long" and "ULong" are permitted. Example: The shifted input bit pattern is multiplied by the bit mask, with bit-by-bit logical AND operation: 0000000000001001. The resultant decimal value "8" is saved to the target tag. Please note the following: The source and target tags have the same number of bits. The number of bits to shift is less than the number of bits in the source tag and target tag. Bits to mask does not have more bits than the source tag and the target tag. Bits to shift Number of bits by which the input bit pattern is shifted right. A negative value shifts the input bit pattern to the left. Example: "Bits to shift" has the value "+3". The input bit pattern is shifted right by three bits when the system function is called: 0000000000001001. Bits to the left are padded with "0". Three bits are truncated on the right. The new decimal value is "9". Note The left bit is "1" in a source tag of the data type with negative signed integer. This sign bit is padded with "0" when the bits are shifted right. The sign changes to "+". Bits to mask An integer serves as bit mask. The bit pattern is used to multiply the shifted input bit pattern. Example: Integer "2478" with the bit pattern "0000100110101110". You can enter the bit mask in three different ways: Hexadecimal: First enter the prefix "0h" or "0H", followed by an optional space for better readability. Then group the bit pattern in blocks of four (0000)(1001)(1010)(1110) and set each block in hexadecimal code: (0)(9)(A)(E). Only the characters 0-9, A-F, a-f are allowed: "0h 09AE". Binary: First enter the prefix "0b" or "0B", followed by an optional space for better readability. Then group the binary bit pattern into blocks of four 0000 1001 1010 1110 with spaces in between as a check. Only the characters "0" or "1" are allowed: "0b 0000 1001 1010 1110". Decimal: Enter the value "2478" directly, without a prefix.
2201
See also
Device-based dependency of system functions (Page 2161)
PageUp Description
Executes the key function <PageUp> on the HMI device. This system function can only be used for function keys and tasks with a time trigger.
Parameters
-
See also
Device-based dependency of system functions (Page 2161)
PageDown Description
Executes the key function <Pagedown> on the HMI device. This system function can only be used for function keys.
2202
Parameters
-
See also
Device-based dependency of system functions (Page 2161)
SetDeviceMode Description
Toggles the operating mode on the HMI device. The following types of operation are possible: "Online", "Offline" and "Load".
Parameters
Operating mode Determines the operating mode of the HMI device: 0 (hmiOnline) = Online: The connection to the PLC is established. 1 (hmiOffline) = Offline: The connection to the PLC is disconnected. 2 (hmiTransfer) = load: A project can be transferred from the configuration computer to the HMI device. Note If you use a PC as an HMI device, the runtime software will be exited when you change operating mode after "Load".
See also
Device-based dependency of system functions (Page 2161) SetConnectionMode (Page 2209)
2203
SetBit Description
Sets the value of a "Bool" type tag to 1 (TRUE).
Parameters
Tag The BOOL type tag which is set to 1 (TRUE).
See also
Device-based dependency of system functions (Page 2161)
SetBitInTag Description
Sets a bit in the given tag to 1 (TRUE). After changing the given bit, the system function transfers the entire tag back to the PLC. It is not checked whether other bits in the tags have changed in the meantime. Operator and PLC have read-only access to the indicated tag until it is transferred back to the PLC. Note If the PLC supports BOOL tags, do not use this system function. Use the "SetBit" system function instead.
2204
Parameters
Tag The tag in which a bit is set to 1 (TRUE). Bit The number of the bit that is set to 1 (TRUE). When this system function is used in a user-defined function, the bits in the specified tag will be counted from right to left independent of the PLC used. The counting begins with 0. Note The guaranteed update of the tags used with actual process values is absolutely conditional in terms of reliable functionality. You should therefore configure the tag in an I/O field or assign the system function to a screen object, such as a button. If you have configured a short event such as the activation of an alarm for the system function you can only access the actual process values by setting the tag for continuous reading.
See also
Device-based dependency of system functions (Page 2161) SetBit (Page 2204)
SetBitWhileKeyPressed Description
Sets the bit of the given tag to 1 (TRUE) as long as the user keeps the configured key pressed. After changing the given bit, the system function transfers the entire tag back to the PLC. It is not checked whether other bits in the tags have changed in the meantime. Operator and PLC have read-only access to the indicated tag until it is transferred back to the PLC. You should
2205
Parameters
Tag The tag in which a bit is temporarily set to 1 (TRUE). Use only tags of the type BOOL, as far as allowed by the PLC. Bit The number of the bit that is temporarily set to 1 (TRUE). Note The guaranteed update of the tags used with actual process values is absolutely conditional in terms of reliable functionality. You should therefore configure the tag in an IO field, or assign the function to a screen element such as a button. If you configured a short event such as the activation of an alarm for the function you can only access the actual process values by setting the tag for continuous reading.
See also
SetBit (Page 2204)
2206
SetColorBackgroundLighting Description
Defines the background lighting of the button. Note The configuration that was set at Switch off is reestablished when restarting the HMI device.
Parameters
Value Defines the background lighting of the button: 0 (hmiWhite) = White: No color 1 (hmiGreen) = Green: Green color 2 (hmiYellow) = Yellow: Yellow color 3 (hmiRed) = Red: Red color
SetLanguage Description
Toggles the language on the HMI device. All configured text and system events are displayed on the HMI device in the newly set language.
2207
Parameters
Language Determines which language is set on the HMI device. The following specifications are possible: -1 (hmiToggle) = Toggle: Changes to the next language. The sequence is determined during configuration in the "Project languages" editor. Number you have defined under "Languages and fonts" in the "Runtime Settings" editor. Changes to the language with the given number. Language you have defined under "Languages and fonts" in the "Runtime Settings" editor. Language abbreviation in accordance with the VBScript5 reference: This changes to the language corresponding to the specified language code, e.g. "de-DE" for German (Germany) or "en-US" for English (United States). An overview of the language abbreviations is available in the basic information of VBScript under the topic "Area diagram-ID (LCID) Diagram".
See also
Device-based dependency of system functions (Page 2161)
SetTag Description
Assigns a new value to the given tag. Note This system function can be used to assign strings and numbers, depending on the type of tag.
Parameters
Tag The tag to which the given value is assigned.
2208
See also
Device-based dependency of system functions (Page 2161) IncreaseTag (Page 2173)
SetConnectionMode Description
Connects or disconnects the given connection. Note A connection to the PLC cannot be established until the operating mode ONLINE has been set on the HMI device. Use the "SetDeviceMode" system function for this purpose.
Parameters
Mode Determines whether a connection to the PLC is established or disconnected: 0 (hmiOnline) = Online: Connection is established. 1 (hmiOffline) = Offline: Connection is disconnected. Connection The PLC to which the HMI device is connected. You specify the name of the PLC in the connection editor.
2209
Application example
Two typical application examples for this system function are as follows: Test As long as no PLC is connected to the HMI device, no error messages will be output during the test on the HMI device. If the HMI device is connected to a PLC, the connection to the PLC can be established by pressing a key. Start up Several PLCs are to be configured for a system. At first, all PLCs except one are configured "Offline". After start up of the first PLC, the connection to each of the other PLCs is established by pressing a key. In this way, the other PLCs are started up one after another.
See also
Device-based dependency of system functions (Page 2161) SetDeviceMode (Page 2203)
SimulateSystemKey Description
Simulates the behavior of a System Key. Use this system function if a system key, such as the "ACK" key, "Input" key or the number pad is not available on the HMI device.
2210
Parameters
System Key System Key, the behavior for which is to be simulated.
SimulateTag Description
Simulates the behavior of tags and dynamic objects such as text lists, without having the HMI device connected to a PLC. This system function is used, for example, to demonstrate the functionality of a project. NOTICE Only tags of the data type Integer can be used for simulation. Tags of the data types Integer and Double Integer, however, can be used with OP 73, OP 77A, TP 177A.
2211
Parameters
Tag The tag whose value is changed. Cycle The factor by which the basic cycle of 200 milliseconds is multiplied. The cycle defines when the tag value is changed by the specified value. Possible cycles between 1 and 32767. Maximum value The maximum value that the tag can assume during simulation. The maximum value must be greater than the minimum value but less than / equal to 32767. Minimum value The minimum value that the tag can assume during simulation. The minimum value must be greater than the maximum value but less than / equal to -32768. Value The value by which the tag value is changed during each cycle. Possible values between -32768 and 32767. A positive value increases the tag value. When the maximum value is reached, the tag value is set to the minimum value after the next update cycle. A negative value reduces the tag value. When the minimum value is reached, the tag value is set to the maximum value after the next update cycle.
StopRuntime Description
Exits the runtime software and thereby the project running on the HMI device.
Parameters
Mode Determines whether the operating system is shut down after exiting runtime.
2212
See also
Device-based dependency of system functions (Page 2161)
TraceUserChange Description
Outputs a system event that shows which user is currently logged in on the HMI device. This system function can only be used in the Scheduler.
Parameters
--
DecreaseFocusedValue Description
Subtracts the specified value from the value of the tag which is connected to the screen object and currently has the focus. The system function can be configured: Input field Symbolic selection list Graphic selection list Slider bar
2213
Parameters
Value The value which is subtracted from the tag value.
DecreaseTag Description
Subtracts the given value from the tag values. X=X-a Note The system function uses the same tag as input and output values. When this system function is used to convert a value, help tags must be used. The auxiliary tags are assigned to the tag value with the "SetTag" system function. If you configure the system function on the events of an alarm and the tag is not being used in the current screen, it is not ensured that the actual value of the tags is being used in the PLC. You can improve the situation by setting the "Cyclic continuous" acquisition mode.
Parameters
Tag The tag from which the given value is subtracted. Value The value which is subtracted.
2214
See also
Device-based dependency of system functions (Page 2161)
ChangeConnection Description
Disconnects the connection to the currently used PLC in use and establishes a connection to a PLC with another address. The newly connected PLC must belong to the same device class (S7-1200, S7-300, ...etc). With S7-1200, the use of the function is also only permitted for absolute addressing.
Note When changing to another address, ensure that the address is not already being used by another HMI device. The follows address types are supported: IP address MPI address The follows PLC types are supported: SIMATIC S7 1200 SIMATIC S7 300/400 SIMATIC S7-NC SIMOTION
Parameters
Connection Name of the connection that is disconnected. The name is set during configuration, for example, in the "Connections" editor.
2215
Application example
You want to operate one HMI device on several machines. Configure the necessary PLCs in the project, to which you want to change by pressing a key. When changing the PLC, the connection to the PLC in use is disconnected. Then the connection to the new PLC with other address parameters is reestablished. To access the values of the new PLC, configure the same tags for the PLC used. The PLC which you have indicated when creating the project will be used as default. 1. Enter the name and address of the PLC in the "Connections" editor. 2. Configure a button in the process screen. 3. Configure the "ChangeConnection" system function on the "Press" event. 4. Enter the name of the connection and address of the PLC as parameters.
See also
Device-based dependency of system functions (Page 2161)
ShowLogonDialog Description
Opens a dialog on the HMI device with which the user can log on to the HMI device.
2216
Parameters
--
ShowOperatorNotes Application
Displays the configured tooltip of the selected object. If the system function is configured on a function key, the tooltip for the screen object that currently has the focus is displayed. If a tooltip is configured for the screen itself, you can switch to this text by pressing <Enter> or by double-clicking on the help window. If the system function is configured on a button, only the tooltip for the current screen is displayed. If a tooltip is configured on the button itself, initially only the tooltip for the button is displayed. You can press <Enter> or double-click on the help window to switch to the tooltip for the current screen. Note No other screen object can be used while the help window is open. To use the screen object, close the help window.
2217
Parameters
Display mode Determines whether the configured tooltip is hidden or shown: 0 (hmiOff) = Off: Configured tooltip is hidden 1 (hmiOn) = On: Configured tooltip is shown -1 (hmiToggle) = Toggle: Toggles between the two modes
See also
Device-based dependency of system functions (Page 2161)
ShowAlarmWindow Description
Hides or shows the alarm window on the HMI device.
Parameters
Object name Name of the alarm view which is hidden or shown. Display mode Determines whether the alarm window is hidden or shown: 0 (hmiOff) = Off: Alarm view is hidden 1 (hmiOn) = On: Alarm view is shown -1 (hmiToggle) = Toggle: Toggles between the two modes
See also
Device-based dependency of system functions (Page 2161)
2218
Events
Introduction
The following table shows which events occur in which editor. Technical data subject to change.
Icon Editor Screens HMI alarms HMI tags Scheduler
Cleared (Page 2224) Enable (Page 2224) Adjust (Page 2225) Loaded (Page 2225) Execute (Page 2225) Selection changed (Page 2225) When dialog is opened (Page 2226) When dialog is closed (Page 2226) User change (Page 2226) Screen change (Page 2226) Disabling (Page 2227) Double-click (Page 2227) Pressing (Page 2228) On Finish Input (Page 2228) Press ESC twice (Page 2228) Outgoing (Page 2229) Incoming (Page 2229) Click (Page 2229) Loop-in alarm (Page 2229) Releasing (Page 2230) In the event of high limit violation (Page 2230) Alarm buffer overflow (Page 2230) In the event of low limit violation (Page 2231) Acknowledging (Page 2231)
-- ---------------------
--------------- - ----
-------------------- - --
2219
Reach margin (Page 2231) Runtime stop (Page 2232) Press key (Page 2232) Release key (Page 2232) Overflow (Page 2233) Switch OFF (Page 2233) Switch ON (Page 2233) Low free storage space (Page 2233) Free space critically low (Page 2234) Value change (Page 2234) Time expired (Page 2234)
------------
------------
--------- --
- ----------
Cleared (Page 2224) Enable (Page 2224) Adjust (Page 2225) Loaded (Page 2225) Execute (Page 2225) Selection changed (Page 2225) When dialog is opened (Page 2226) When dialog is closed (Page 2226) User change (Page 2226) Screen change (Page 2226) Disabling (Page 2227)
------------
------------
------------
------------
------------
------------
2220
Double-click (Page 2227) Pressing (Page 2228) On Finish Input (Page 2228) Press ESC twice (Page 2228) Outgoing (Page 2229) Incoming (Page 2229) Click (Page 2229) Loop-in alarm (Page 2229) Releasing (Page 2230) In the event of high limit violation (Page 2230) Alarm buffer overflow (Page 2230) In the event of low limit violation (Page 2231) Acknowledging (Page 2231) Reach margin (Page 2231) Runtime stop (Page 2232) Press key (Page 2232) Release key (Page 2232) Overflow (Page 2233) Switch OFF (Page 2233) Switch ON (Page 2233) Low free storage space (Page 2233) Free space critically low (Page 2234) Value change (Page 2234) Time expired (Page 2234)
-------------------------
-------------------------
-------------------------
-------------------------
-------------------------
-------------------------
Elements Introduction
The following table shows which events occur on which objects. Technical data subject to change.
Icon Object IO field Button Symbolic IO field Graphic IO field Date/time field Bar Switch
2221
Cleared (Page 2224) Enable (Page 2224) Adjust (Page 2225) Loaded (Page 2225) Execute (Page 2225) Selection changed (Page 2225) When dialog is opened (Page 2226) When dialog is closed (Page 2226) User change (Page 2226) Screen change (Page 2226) Disabling (Page 2227) Double-click (Page 2227) Pressing (Page 2228) On Finish Input (Page 2228) Press ESC twice (Page 2228) Outgoing (Page 2229) Incoming (Page 2229) Click (Page 2229) Loop-in alarm (Page 2229) Releasing (Page 2230) Auto-Hotspot Alarm buffer overflow (Page 2230) In the event of low limit violation (Page 2231) Acknowledging (Page 2231) Reach margin (Page 2231) Runtime stop (Page 2232) Press key (Page 2232) Release key (Page 2232) Overflow (Page 2233) Switch OFF (Page 2233) Switch ON (Page 2233) Low free storage space (Page 2233) Free space critically low (Page 2234) Value change (Page 2234) Time expired (Page 2234)
- -------- -------------------------
- ------- -------------------------
- -------- -------------------------
------------------------------------
------------------------------------
See also
In the event of high limit violation (Page 2230)
2222
Controls Introduction
The following table shows which events occur on which objects. Technical data subject to change.
Icon Object Alarm view/alarm window Alarm indicator Trend view User view Recipe view Auxiliary indicator
Cleared (Page 2224) Enable (Page 2224) Adjust (Page 2225) Loaded (Page 2225) Execute (Page 2225) Selection changed (Page 2225) When dialog is opened (Page 2226) When dialog is closed (Page 2226) User change (Page 2226) Screen change (Page 2226) Disabling (Page 2227) Double-click (Page 2227) Pressing (Page 2228) On Finish Input (Page 2228) Press ESC twice (Page 2228) Outgoing (Page 2229) Incoming (Page 2229) Click (Page 2229) Loop-in alarm (Page 2229) Releasing (Page 2230) In the event of high limit violation (Page 2230) Alarm buffer overflow (Page 2230) In the event of low limit violation (Page 2231) Acknowledging (Page 2231) Reach margin (Page 2231) Runtime stop (Page 2232)
- -------- ----------------
----------------- --------
- -------- ----------------
- -------- ----------------
---------------------------
---------------------------
2223
Press key (Page 2232) Release key (Page 2232) Overflow (Page 2233) Switch OFF (Page 2233) Switch ON (Page 2233) Low free storage space (Page 2233) Free space critically low (Page 2234) Value change (Page 2234) Time expired (Page 2234)
----------
----------
----------
----------
----------
----------
Enable Description
Occurs when the user selects a display or operating object using the configured tab sequence. Note Please note that the availability of the event is dependent upon the HMI device and object type. Note If the user e.g. clicks a button with the mouse, the "Click" event is triggered. Users wishing to trigger the "Enable" event must select the button using the tab key. The "Activate" event is only used to detect whether an object was selected. The event does not trigger a password prompt. For this reason, do not use the "Activate" event if you want to configure access protection on the function call of the object.
2224
Adjust Description
Occurs if the status of a display and operator control object changes. The status of an object changes if, for example, the user presses the key. Note Please note that the availability of the event depends on the HMI device and object type.
Loaded Description
Occurs when all configured display and operating objects are loaded in the active screen after a screen change. Note Please note that the availability of the event is dependent upon the HMI device and object type. Note Enable a screen change to ensure that the connection with the control is established after switch-on.
Execute Description
Occurs when the scheduled task has been executed.
2225
2226
Disabling Description
Occurs when the user takes the focus from a display and operating object. A screen object can be disabled using the configured tab order or by performing another action with the mouse. Note Please note that the availability of the event is dependent upon the HMI device and object type. Note System functions or user-defined functions on the "Deactivate" event of a screen are not executed when a screen is being closed. The "Deactivate" event is only used to detect whether an object was deselected. The event does not trigger a password prompt. For this reason, do not use the "Deactivate" event if you want to configure access protection on the function call of the object.
Double-click Description
Occurs when the user double-clicks on an object from the symbol library. Note Please note that the availability of the event is dependent upon the HMI device and object type.
2227
Pressing Description
Occurs when the user clicks on a button with the left mouse button, presses <RETURN> or <SPACE>. Also occurs when the user right-clicks on an object of the symbol library. Note Please note that the availability of the event is dependent upon the HMI device and object type.
2228
Outgoing Description
Occurs when an alarm is deactivated. Note Please note that the availability of the event depends on the HMI device and object type.
Incoming Description
Occurs when an alarm is triggered and displayed in the alarm view. Note Please note that the availability of the event depends on the HMI device and object type.
Click Description
Occurs if the user clicks a display and operating object with the mouse or touches the touch display with a finger. In case you click the incorrect object, prevent processing of configured function list as follows: Move the mouse pointer away from the object while keeping the mouse button pressed. Release the mouse button as soon as the mouse pointer leaves the object. The function list will then not be processed. On touch displays, the display must be touched with the finger until a reaction occurs, e.g., a screen change. Note Please note that the availability of the event is dependent upon the HMI device and object type.
2229
Releasing Description
Occurs when the user releases a button. This even does not occur, as long as the button remains pressed. Note Please note that the availability of the event is dependent upon the HMI device and object type.
2230
Acknowledging Description
Occurs when the user acknowledges an alarm. Note Please note that the availability of the event is dependent upon the HMI device and object type.
Configurable objects
The event can only be configured on the <Up> and <Down> keys, or on the keys on which you have configured the "ScreenObjectPageUp" or "ScreenObjectPageDown" system functions.
2231
2232
Overflow Description
Occurs when the configured size of the log is reached. You use the log type "Trigger event". Note Please note that the availability of the event is dependent upon the HMI device and object type.
Switch ON Description
Occurs when the user moves the display and operating object "Switch" to the ON position. Note Please note that the availability of the event is dependent upon the HMI device and object type.
2233
10.7
10.7.1
Definition
Planning tasks
Field of application of the Scheduler
You can use the Scheduler to configure tasks to run independent of the screen in the background. You create tasks by linking system functions or scripts to a trigger. The linked functions will be called when the triggering event occurs.
2234
Example of an application
The Scheduler is used to execute event-controlled tasks automatically. For example, you use a task to automate the following: Regular swap out of log data Printout of an alarm report when an alarm buffer overflow occurs Printout of a report at shift end Monitoring a tag Monitoring of a user change Note The availability of the listed examples is determined by the HMI device.
See also
Working with tasks and triggers (Page 2236) Example: Update user following change of user (Page 2241) Work area of the "Scheduler" editor (Page 2237)
2235
10.7.2
Introduction
A task consists of a trigger and a task type.
Starting a task
Controlled by a trigger, the Scheduler starts the task linked to the trigger.
See also
Field of application of the Scheduler (Page 2234)
2236
10.7.3
10.7.3.1
Basics
Work area of the "Scheduler" editor
Introduction
Double-click on "Scheduler" to open it in the project view. The work area shows the scheduled tasks, which consist of the trigger and the task type, for example, the function list.
Structure
The work area consists of the table of jobs.
The table of tasks shows specified tasks with their properties, such as triggers. You select a task type and a trigger. You assign a name and a comment to the task. The description provides a written summary of the task including the timing for the task.
2237
Inspector window
The "Properties" tab of the Inspector window is split into two parts. The "Job" area lists the name of the job and the job type. The "Starting time" area shows the trigger. The area is different depending on the trigger selected. In the "Events" tab use the function list with system functions that will be executed in the task. Note You can obtain more detailed information about the elements of the user interface using the tooltips. To do so, move the mouse pointer to the relevant object or press <F1> if the object has already been selected.
See also
Field of application of the Scheduler (Page 2234) Planning tasks with event triggers (Page 2239) Triggers (Page 2238) Function list (Page 2238)
10.7.3.2
Function list
Function list
A trigger starts the function list. The function list is executed line-for-line. Each line contains a system function. You can configure exactly one function list for each task. Note The choice of configurable system functions in a function list depends on the selected trigger and the HMI device.
See also
Work area of the "Scheduler" editor (Page 2237)
10.7.3.3
Triggers
Introduction
A trigger is linked to a task and forms the triggering event which will call this task. The task is executed when the trigger occurs.
2238
Event trigger
When a task is linked to a system event, the task will be triggered by the event. System events include, for example, Runtime stop, screen change, user change, etc. Each system event can only be configured once for each HMI device.
Deactivating job
If you do not need a certain job temporarily, deactivate the job in the Engineering System. You also use the trigger "Deactivated" to make a previously configured system event available once again. Example: Task "A" is planned with the system event "Shutdown". This system event is then no longer available for another task "B". Select "Disabled" as the trigger for task "A" to make the "Runtime stop" system event available again. Note The available triggers depend on the HMI device.
See also
Work area of the "Scheduler" editor (Page 2237)
10.7.3.4
Introduction
You plan a task that generates a screen change when the user changes.
Requirements
The "Scheduler" work area is open. You have created the "Start" screen.
Procedure
1. Click "Add..." in the table of the task area. 2. Enter "Screen change at user change" as the "Name." 3. Select "User change" as the "Trigger." 4. In the Inspector window, select "Properties > Events".
2239
Result
The task is executed with the "User change" event. When a new user logs on successfully, the "Start" screen is called up.
See also
Work area of the "Scheduler" editor (Page 2237)
2240
10.7.4
10.7.4.1 Task
Examples
Example: Update user following change of user
Configure an I/O field which displays the logged on user. Configure a task which updates the I/O field when the logged on user changes.
Requirements
A "CurrentUser" tag of the "String" type is created. A screen has been created and opened. An I/O field is created in the screen.
Procedure
1. Click on the "I/O field" object. 2. In the Inspector window, select "Properties > Events > General": Select "Character string" as the "Display format." Select "CurrentUser" as the "Variable." Select "Output" as the mode. 3. Change to the work area of the Scheduler. 4. Click "Add..." in the table of the task area. 5. Enter "CurrentUser" as the "Name". 6. Select "User change" as the "Trigger." 7. In the Inspector window, select "Properties > Events".
2241
Result
When a new user logs on successfully, the "ReadUserName" function is called up. The "CurrentUser" tag is updated and displayed in the I/O field of the newly logged on user. If a user does not log on successfully, the logged on user is logged off. The I/O field continues to display the user previously logged on until a new user logs on successfully.
See also
Field of application of the Scheduler (Page 2234)
2242
10.8
10.8.1
10.8.1.1
Communication
The data exchange between two devices is known as communication. The devices can be interconnected directly or via a network. The interconnected devices in communication are referred to as communication partners.
Data transferred between the communication partners may serve different purposes: Display processes Operate processes Output alarms Archive process values and alarms Document process values and alarms Administer process parameters and machine parameters
Communication partners
Communication between the following devices is described in more detail in this section: PLC The PLC controls a process by means of a user program. HMI device You use the HMI device to operate and monitor the process.
2243
Automation system
The following characteristics describe an automation system: The PLC and HMI device are interconnected The network between the PLC and HMI device is configured
10.8.1.2
Introduction
To set up an automation system, you must configure, parameterize, and interconnect the individual devices. You insert PLCs and HMI devices into the project in the same way. Likewise, you configure the two devices in the same way. Automation system setup: 1. Insert PLC into the project. 2. Insert HMI device into the project. 3. Network the devices together. 4. Interconnect the devices.
2244
Inserting devices
If you have created a project, you can add a device in the portal view or project view.
2245
Project view
2246
2247
Networking devices
You can network the interfaces of the communication-capable devices conveniently in the "Devices & Networks" editor. In the networking step, you configure the physical device connections.
The tabular network overview supplements the graphical network view with the following additional functions: You obtain detailed information on the structure and parameter settings of the devices. Using the "Subnet" column, you can connect communication-capable components to subnets that have been created.
2248
Connecting devices
After you network the devices together, you configure the connection. You configure the "HMI connection" connection type for communication with the HMI device.
10.8.1.3
2249
10.8.1.4
10.8.1.5
Communication drivers
Communication drivers
A communication driver is a software component that establishes a connection between a PLC and an HMI device. The communication driver thus enables the assignment of process values to HMI tags. The interface as well as the profile and transmission speed can be chosen, depending on the HMI device used and the connected communication partner.
2250
10.8.2
10.8.2.1
2251
PROFIBUS
Ethernet network
An Ethernet network allows you to interconnect all devices that are connected to the network via an integrated Ethernet interface or a communication module. You can thereby connect multiple HMI devices to one SIMATIC S7 PLC and multiple SIMATIC S7 PLCs to one HMI device. The maximum number of communication partners that you can connect to an HMI device is dependent on the HMI device used. Additional information is available in the documentation for the respective HMI device.
PROFINET
PROFINET is an open standard for industrial automation defined by IEEE 61158 and based on Industrial Ethernet. PROFINET makes use of IT standards all the way to the field level and enables plant-wide engineering. With PROFINET, you can realize high-performance automation solutions for applications with stringent real-time requirements.
2252
PROFIBUS PROFIBUS DP
PROFIBUS DP (distributed I/O) is used to connect the following devices: PLCs, PCs, HMI devices Distributed I/O devices, e.g., SIMATIC ET 200 Valves Drives PROFIBUS DP's fast response times make it ideally suited for the manufacturing industry. Its basic functionality includes cyclic exchange of process data between the master and PROFIBUS DP slaves, as well as diagnostics.
PROFIBUS network
You can connect an HMI device within the PROFIBUS network to any SIMATIC S7 module that has an integrated PROFIBUS or PROFIBUS DP interface. You can thereby connect multiple HMI devices to one SIMATIC S7 PLC and multiple SIMATIC S7 PLCs to one HMI device. The maximum number of communication partners that you can connect to an HMI device is dependent on the HMI device used. Additional information is available in the documentation for the respective HMI device. You configure the SIMATIC S7-200 PLC as a passive device in the network. You connect the SIMATIC S7-200 using the DP connector or a PROFIBUS communication module.
MPI MPI
MPI (Multi-Point Interface) is the integrated interface for SIMATIC products: PLCs HMI devices Programming device/PC Small subnets with the following characteristics are set up with MPI: Short distances Few devices Small data quantities
MPI network
You connect the HMI device to the MPI interface of the SIMATIC S7 PLC. You can connect multiple HMI devices to one SIMATIC S7 PLC and multiple SIMATIC S7 PLCs to one HMI
2253
Network architectures
MPI is based on the PROFIBUS standard (IEC 61158 and EN 50170) and supports the following bus topologies: Line Star Tree An MPI subnet contains a maximum of 127 devices and consists of multiple segments. Each segment contains a maximum of 32 devices and is limited by terminating resistors. Repeaters are used to connect segments. The maximum cable length without a repeater is 50 m.
PPI Introduction
PPI (point-to-point interface) is an integrated interface that was developed specially for the SIMATIC S7-200. A PPI network typically connects S7-200 PLCs. However, other SIMATIC PLCs (e.g., S7-300 and S7-400) or HMI devices can communicate with a SIMATIC S7-200 in the PPI network.
PPI network
A PPI connection is a point-to-point connection. The HMI device is the master. The SIMATIC S7-200 is the slave. You can connect a maximum of one SIMATIC S7-200 to an HMI device. You use the serial connector of the CPU to connect the HMI device. You can connect multiple HMI devices to one SIMATIC S7-200. From the perspective of the SIMATIC S7-200, only one connection at a time is possible. Note The PPI network can contain a maximum of four masters in addition to the HMI device. For performance reasons, do not configure more than four devices at a time as a master in the PPI network.
Network architectures
PPI is based on the PROFIBUS standard (IEC 61158 and EN 50170) and supports the following bus topologies: Line Star
2254
10.8.2.2
Networking devices
The network view of the "Devices & Networks" editor includes a graphical area and a tabular area. You can use the graphical area to network the devices in the project with drag-and-drop. The tabular area provides an overview of the devices and their components. You can network the following PLCs together with HMI devices in the "Devices & Networks" area. SIMATIC S7 1200 SIMATIC S7 300 SIMATIC S7 400 All other PLCs are available in the TIA-Portal and are configured "not integrated". You configure "not integrated" connections in the "Connections" editor of the HMI device.
2255
With the networking step, you configure the physical connection of the communication partners. The networking of devices is depicted by lines that are colored according to the interface.
2256
Integrated connections
Connections of devices within a project are referred to as integrated connections. In the case of integrated connections, you can directly configure addresses of PLC tags. Note An HMI connection can be configured in the "Devices & Networks" editor for the following PLCs only: SIMATIC S7 1200 SIMATIC S7 300 SIMATIC S7 400 You configure the HMI connections to all other PLCs in the "Connections" editor of the HMI device.
2257
5. Change the IP address and subnet mask address parameters according to the requirements of your project.
2258
When the mouse pointer is moved over the interface of a device, the following icons indicate whether a connection is possible: A connection is possible. A connection is not possible.
2259
Then you can configure the parameters of the selected HMI connection and the communication partners in the inspector window.
Requirements
A project is open. An HMI device has been created.
2260
2261
2262
10.8.3
10.8.3.1
Data exchange
Data exchange using tags
Internal tags do not have a process link and only convey values within the WinCC.
Tags in WinCC
For external tags, the properties of the tag are used to define the connection that the WinCC uses to communicate with the automation system and form of data exchange. Tags that are not supplied with values by the process - the internal tags - are not connected to the automation system. In the tag's "Connection" property, this is identified by the "Internal tag" entry. You can create tags in different tag tables for greater clarity. You then directly access the individual tag tables in the "HMI tags" node in the project tree. The tags from all tag tables can be displayed with the help of the table "Show all tags". With structures you bundle a number of different tags that form one logical unit. Structures are project-associated data and are available for all HMI devices of the project. You use the "Types" editor in the project library to create and edit a structure.
2263
All tags
The "All tags" table shows an overview of all HMI tags and system tags of the HMI device in question. This table cannot be deleted, renamed or moved. This table also contains the "Tags table" column, which indicates the tag table of where a tag is included. Using the "Tags table" field, the assignment of a tag to a tags table can be changed. With devices for Runtime Professional, the table "All tags" contain an additional tab "System tags". The system tags are created by the system and used for internal management of the project. The names of the system tags begin with the "@" character. System tags cannot be deleted or renamed. You can evaluate the value of a system tag, but cannot modify it.
2264
Additional tables
The following tables are also available in an HMI tag table: Discrete alarms Analog alarms Logging tags With the help of these tables you configure alarms and logging tags for the currently selected HMI tag.
Principle
An external tag is the image of a defined memory location in the PLC. You have read and write access to this storage location from both the HMI device and from the PLC. Since external tags are the image of a storage location in the PLC, the applicable data types depend on the PLC which is connected to the HMI device. In STEP 7, if you write a PLC control program, the PLC tags created in the control program will be added to the PLC tag table. If you want to connect an external tag to a PLC tag, access the PLC tags directly via the PLC tag table and connect them to the external tag.
2265
Data types
All the data types which are available at the connected PLC are available at an external tag in WinCC. Information about data types which are available for connection to other PLCs can be found in the documentation about the respective communication drivers. See "Communication between devices (Page 2243)" for additional information. Note As well as external tags, area pointers are also available for communication between the HMI device and PLC. You can set up and enable the area indicators in the "Connections" editor.
See also
Communication between devices (Page 2243)
You can find additional details on this in the section "Basics of communication (Page 2243)".
2266
2267
S7 1200
Yes
Create an integrated connection in the "Devices & Networks" editor. If the PLC is contained in the project and integrated connections are supported, you can then also have the connection created automatically. To do this, when configuring the HMI tag, simply select an existing PLC tag to which you want to connect the HMI tag. The integrated connection is then automatically created by the system.
See also
Basics of communication (Page 2243)
Principle
Internal tags are stored in the memory of the HMI device. Therefore, only this HMI device has read and write access to the internal tags. You can create internal tags to perform local calculations, for example.
2268
10.8.3.2
Area pointers
The following area pointers are supported:
Area pointer
Area pointers can be configured for connections. Data record Date/time
2269
Structure
The "Area pointer" tab contains two tables of area pointers. The top part of the table contains the area pointers you can create and enable separately for each available connection. The "Global area pointers of HMI device" table contains the area pointers which are created only once in the project and can be used for only one connection.
2270
Active Enables the area pointer. Pointer name Name of the area pointer specified by WinCC. PLC tag Here you select the PLC tag or the tag array that you have configured as the data area for the area pointer.
2271
2272
Alternative procedure
Alternatively, you can also use the absolute access mode to access area pointers.
Requirements
A PLC is created in the project. A connection is configured between the PLC and the HMI device. The PLC program contains a global data block.
2273
Procedure
1. Open "PLC > Program blocks" in the project tree. 2. Double-click the global data block you created previously. The data block opens.
3. Enter a tag name in the "Name" column. 4. Select "Array[lo .. hi] of type" as the data type in the "Data type" column. 5. Replace the "lo" entry by the low value for the dimension of the array. 6. Replace the "hi" entry by the high value for the dimension of the array. Example: If you configure an area pointer with the length "4", enter the value "0" for "lo" and the value "3" for "hi" inside the brackets. 7. Replace the "type" designation with the "word" data type. The full data type for an array of 4 tags appears as follows: "Array[0 .. 3] of word". The tag array is created after the entry is confirmed. 8. Click "Compile". The project is compiled.
2274
Requirements
The global data block has been parameterized in the PLC program.
Procedure
1. Open "HMI >Connections" in the project tree. 2. Click the "Area pointer" tab. 3. Enable the required area pointer. You enable a global area pointer by selecting the connection in the "Connection" field. 4. Click the navigation button in the "PLC tag" field. The object list opens. 5. Navigate to the data block in the object list, and select the tag in the right window. You do not need an array tag to configure an area pointer with the length of "1".
6. Select the "Word" data type when creating the tag in the data block. If required, set additional parameters, such as the acquisition cycle, during configuration.
Result
The area pointer is enabled and connected to the PLC tag in the global data block.
10.8.4
10.8.4.1
Device dependency
Basic Panel
Communication drivers for Basic Panels Device dependency of the Basic Panels
The following table shows which communication drivers you can configure with the various Basic Panels.
2275
Communication drivers
HMI SIMATI SIMATI SIMATI SIMATI OPC devices C S7 C S7 C S7 C 1200 300/40 200 HTTP 0 protoco l KP300 Basic Yes Yes Yes Yes Yes No No No No AllenAllenMitsubi Mitsubi Bradley Bradley shi MC shi FX DF1 TCP/IP EtherN et/IP Yes Yes No No Yes Yes No No Modico n Modbu s TCP/ IP Yes Yes Modico Omron n Host Modbu Link s RTU No No No No
KTP40 Yes 0 Basic mono PN KTP40 Yes 0 Basic mono PN Portrait KTP60 Yes 0 Basic DP KTP60 Yes 0 Basic DP Portrait KTP60 Yes 0 Basic PN KTP60 Yes 0 Basic PN Portrait KTP60 Yes 0 Basic mono PN KTP60 Yes 0 Basic mono PN Portrait KTP10 00 Basic DP KTP10 00 Basic PN Yes
Yes
Yes
No
No
Yes
No
Yes
No
Yes
No
No
Yes
Yes
No
No
No
Yes 2)
No
Yes
No
yes 1)
Yes
Yes
Yes
No
No
No
Yes 2)
No
Yes
No
yes 1)
Yes
Yes
Yes
No
No
Yes
No
Yes
No
Yes
No
No
Yes
Yes
No
No
Yes
No
Yes
No
Yes
No
No
Yes
Yes
No
No
Yes
No
Yes
No
Yes
No
No
Yes
Yes
No
No
Yes
No
Yes
No
Yes
No
No
Yes
Yes
No
No
No
Yes 2)
No
Yes
No
yes 1)
Yes
Yes
Yes
Yes
No
No
Yes
No
Yes
No
Yes
No
No
Yes
Yes
No
No
Yes
No
Yes
No
Yes
No
No
2276
1)
2)
only with RS 422-RS232 converter Order number: 6AV6 671-8XE00-0AX0 Direct communication with PLC 5 or KF2 module, otherwise only approved with RS422-RS232 converter (option). Order number: 6AV6 671-8XE00-0AX0
KTP1000 Basic PN PROFINET (X1) PROFINET (X1) PROFINET (X1) PROFINET (X1)
TP1500 Basic PN PROFINET (X1) PROFINET (X1) PROFINET (X1) PROFINET (X1)
2)
2)
Mitsubishi TCP/ PROFINET IP (X1) Mitsubishi FX Modicon Modbus TCP Modicon Modbus RTU Omron Host Link PROFINET (X1)
3)
2277
3)
For SIMATIC S7-200 only Direct communication with PLC5 or KF2 module, otherwise only approved with RS422RS232 converter (option). Order number: 6AV6 671-8XE00-0AX0 only approved with RS 422-RS232 converter Order number: 6AV6 671-8XE00-0AX0
Area pointer
KP300 Basic KTP400 Basic PN Screen number Data record Date/time Date/time PLC Coordination Project ID Job mailbox Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes KTP600 Basic PN Yes Yes Yes Yes Yes Yes Yes KTP600 Basic DP Yes Yes Yes Yes Yes Yes Yes KTP1000 Basic PN Yes Yes Yes Yes Yes Yes Yes KTP1000 Basic DP Yes Yes Yes Yes Yes Yes Yes TP1500 Basic PN Yes Yes Yes Yes Yes Yes Yes
2278
10.8.5
10.8.5.1
Introduction
This section describes the communication between an HMI device and the SIMATIC S7 1200 PLC. You can configure the following communication channels for the SIMATIC S7 1200 PLC: PROFINET PROFIBUS
2279
10.8.5.2
You can also connect multiple HMI devices to one SIMATIC S7 1200 and multiple SIMATIC S7 1200s to one HMI device. The maximum number of communication partners that you can connect to an HMI device is dependent on the HMI device used. Additional information is available in the documentation for the respective HMI device.
2280
Requirements
The following communication partners are created in the "Devices & Networks" editor: SIMATIC S7 1200 HMI device with PROFINET or Ethernet interface
Procedure
1. Double-click the "Devices & Networks" item in the project tree. The available communication partners in the project are displayed graphically in the network view. 2. Click the "Connections" button and select "HMI connection" for the connection type. The devices available for connection are highlighted in color. 3. Click the PROFINET interface of the PLC and use a drag-and-drop operation to draw a connection to the PROFINET or Ethernet interface of the HMI device.
2281
The connection is displayed graphically in the Inspector window. 6. Click the communication partners in the "Network view" and change the PROFINET parameters in the Inspector window according to the requirements of your project. See the chapter "PROFINET parameters (Page 2282)" for additional details. Note The created HMI connection is also shown in the tabular area of the editor on the "Connections" tab. You check the connection parameters in the table. You can change the local name for the connection only in the table.
Result
You have created a connection between an HMI device and a SIMATIC S7 1200. The IP address and subnet mask connection parameters are configured.
PROFINET parameters PROFINET parameters for the HMI connection PROFINET parameters for the HMI connection
An overview of the configured HMI connection parameters can be found in the properties for the HMI connection. Only limited changes are possible in this Inspector window.
2282
"Connection"
Displays whether the devices are networked together. - displayed if the devices are networked together. - displayed if the devices are not networked together.
"Connection path"
The communication partners of the selected HMI connection and the associated PROFINET parameters are displayed in the "Connection path" area. Some of the areas displayed cannot be edited in this dialog. "End point" Displays the device name. This area is not editable. "Interface" Displays the selected interface of the device. You can choose between several interfaces, depending on the device.
2283
PROFINET parameters for the HMI device PROFINET parameters for the HMI device
An overview of the configured HMI device parameters can be found in the properties for the HMI device.
2284
"IP protocol"
"Set IP address in the project" When you transfer the WinCC project to the HMI device, this IP address is set up directly in the HMI device. Note The device is automatically restarted in the case of HMI devices with the Windows CE 3.0 operating system. HMI devices with Windows CE 3.0: OP 77B TP 177B color PN/DP TP 177B mono DP OP 177B color PN/DP OP 177B mono DP Mobile Panel 177 PN Mobile Panel 177 DP TP 277 6" OP 277 6" "Subnet mask" You assign data of the subnet mask in the "Subnet mask" area. "Use IP router" If you are using an IP router, select "Use IP router" and enter the router address in the "Router address" field. "Set IP address using a different method" If the function "Set IP address using a different method" is activated, the IP address is not taken from the project. You have to enter the IP address directly in the Control Panel of the HMI device.
PROFINET parameters for the PLC PROFINET parameters for the PLC
An overview of the configured parameters can be found in the properties for the PLC.
2285
"IP protocol"
"Interface type" Depending on the HMI device type, you have various interfaces to choose from. "IP address" You assign the IP address of the HMI device in the "IP address" area. "Subnet mask" You assign data of the subnet mask in the "Subnet mask" area. If you are using an IP router, select "Use IP router" and enter the router address in the field.
2286
IP address
The IP parameters are visible if the communication-capable devices support the TCP/IP protocol. The IP address consists of 4 decimal figures in the range of 0 to 255. The decimal figures are separated from one another by a dot. Example: 140.80.0.2 The IP address consists of the following: The address of the (sub) net The address of the node (generally also called host or network node)
Subnet mask
The subnet mask splits these two addresses. It determines which part of the IP address addresses the network and which part of the IP address addresses the node. The set bits of the subnet mask determine the network part of the IP address. Example: Subnet mask: 255.255.0.0 = 11111111.11111111.00000000.00000000 In the example given for the above IP address, the subnet mask shown here has the following meaning: The first 2 bytes of the IP address identify the subnet - i.e. 140.80. The last two bytes address the node, thus 0.2. It is generally true that: The network address results from AND linking the IP address and subnet mask. The node address results from AND NOT linking the IP address and subnet mask.
2287
Note Range of values for the first decimal point A value of between 224 and 255 is also possible for the first decimal number of the IP address (address class D etc). This is, however, not recommended because there is no address check for these values.
Result: All nodes with addresses between 129.80.001.xxx and 129.80.127.xxx are on one subnet, all nodes with addresses between 129.80.128.xxx and 129.80.255.xxx are on another subnet.
Router
The job of the routers is to connect the subnets. If an IP datagram is to be sent to another network, it first has to be conveyed to a router. To make this possible, in this case you have to enter the address of the router for each node in the subnet. The IP address of a node in the subnet and the address of the router may only differ at the points at which there is a "0" in the subnet mask.
2288
Setting port options Setting the port options Changing connection settings for the PROFINET IO port
You can change the network settings for the PROFINET IO port as required. By default, the settings are made automatically. In normal situations, this guarantees problem-free communication.
"Monitor" option
This option enables or disables port diagnostics. Examples of port diagnostics: The link status is monitored, in other words, the diagnostics are generated during link-down and the system reserve is monitored in the case of fiber optic ports.
2289
Note When a local port is connected, STEP 7 makes the setting for the partner port if the partner port supports the setting. If the partner port does not accept the setting, an error message is generated.
2290
Enable boundaries
"Boundaries" are limits for transmission of certain Ethernet frames. The following boundaries can be set at a port: "End of discovery of accessible devices" No forwarding of DCP frames to identify accessible devices. Devices downstream from this port cannot be reached by the project tree under "Accessible devices". Devices downstream from this port cannot be reached by the CPU. "End of topology discovery" LLDP frames (Link Layer Discovery Protocol) are not forwarded for topology detection. "End of sync domain" No forwarding of sync frames transmitted to synchronize nodes within a sync domain. If you operate, for example, a PROFINET device with more than two ports in a ring, you should prevent the sync frame from being fed into the ring by setting a sync boundary (at the ports not inside the ring). Additional example: If you want to use several sync domains, configure a sync domain boundary for the port connected to a PROFINET device from the other sync domain.
2291
Restrictions
The following restrictions must be observed: The individual check boxes can only be used if the port supports the function in question. If a partner port has been determined for the port, the following check boxes cannot be used: "End of discovery of accessible devices" "End of topology discovery" If autonegotiation is disabled, none of the check boxes can be used.
10.8.5.3
2292
Requirements
The following communication partners are created in the "Devices & Networks" editor: HMI device with MPI/DP interface SIMATIC S7 1200
Procedure
1. Double-click the "Devices & Networks" item in the project tree. The available communication partners in the project are displayed graphically in the network view. 2. Click the "Connections" button. The devices available for connection are highlighted in color. 3. Use a drag-and-drop operation to move a PROFIBUS-capable communication module from the hardware catalog to the PLC.
4. Click the HMI device interface. 5. Select the "PROFIBUS" interface type in the Inspector window under "Properties > General > PROFIBUS address/ MPI address > Parameters".
2293
7. Click the name of the connection. The connection is displayed graphically in the Inspector window. 8. Click "Highlight HMI connection" and select the HMI connection. 9. Click the communication partners in the "Network view" and change the PROFINET parameters in the Inspector window according to the requirements of your project. See the chapter "PROFIBUS parameters (Page 2294)" for additional details. Note The created HMI connection is also shown in the tabular area of the editor on the "Connections" tab. You check the connection parameters in the table. You can change the local name for the connection only in the table.
Result
You have created an HMI connection between an HMI device and a SIMATIC S7 1200 via PROFIBUS.
PROFIBUS parameters PROFIBUS parameters for the HMI connection PROFIBUS parameters for the HMI connection
An overview of the configured HMI connection parameters can be found in the properties for the HMI connection. Only limited changes are possible in this Inspector window.
2294
"Connection"
Displays whether the devices are networked together. - displayed if the devices are networked together. - displayed if the devices are not networked together.
2295
"Connection path"
The communication partners of the selected HMI connection and the associated PROFIBUS parameters are displayed in the "Connection path" area. Some of the areas displayed cannot be edited in this dialog. "End point" Displays the device name. This area is not editable. "Interface" Displays the selected interface of the device. You can choose between several interfaces, depending on the device. "Interface type" Displays the selected interface type. This area is not editable. "Subnet" Displays the selected subnet. This area is not editable. "Address" Displays the PROFIBUS address of the device. This area is not editable. "Find connection path" button Enables the subsequent specification of connections.
PROFIBUS parameters for the HMI device PROFIBUS parameters for the HMI device
An overview of the configured HMI device parameters can be found in the properties for the HMI device.
2296
"Parameters"
"Interface type" Depending on the HMI device type, you have various interfaces to choose from. "Address" You assign the PROFIBUS address of the HMI device in the "Address" area. The PROFIBUS address must be unique throughout the PROFIBUS network.
2297
PROFIBUS parameters for the PLC PROFIBUS parameters for the PLC
An overview of the configured parameters can be found in the properties for the PLC.
2298
"Parameters"
"Interface type" Depending on the HMI device type, you have various interfaces to choose from. "Address" You assign the PROFIBUS address of the HMI device in the "Address" area. The PROFIBUS address must be unique throughout the PROFIBUS network. "Highest address" The "Highest address" area displays the highest address of the PROFIBUS network. "Transmission speed" The "Transmission speed" is determined by the slowest device connected to the network. The setting is identical throughout the network.
2299
Meaning of profiles
Profile DP Meaning Select the "DP" bus profile when the only devices connected to the PROFIBUS subnet are those which satisfy the requirements of standard EN 50170 Volume 2/3, Part 8-2 PROFIBUS. The bus parameter setting is optimized on these devices. This includes devices with DP master and DP slave interfaces of the SIMATIC S7 and distributed I/Os of other manufacturers. Standard Compared to the "DP" profile, the "Standard" profile also offers scope for devices of another project or devices which have not been configured here to be taken into account when calculating the bus parameters. The bus parameters are then calculated following a simple, non-optimized algorithm. Select the "Universal" bus profile when individual devices on the PROFIBUS subnet use the PROFIBUS-FMS service. This includes the following devices for example: CP 343-5 PROFIBUS-FMS devices of other manufacturers As with the "Standard" profile, this profile allows you to take other devices into account when calculating the bus parameters.
Universal
10.8.5.4
Data exchange
Data exchange using area pointers General information on area pointers Introduction
You use an area pointer to access a data area in the PLC. During communication, the PLC and the HMI device alternately access these data areas for read and write operations. The PLC and the HMI device trigger defined interactions based on the evaluation of stored data.
2300
Note Note that when you enter the year, values 80 to 99 result in years 1980 through 1999 and the values 0 to 29 result in the years 2000 through 2029.
2301
n+4 1) n+5
1)
Reserved Reserved
Reserved Reserved
2302
Note Note that when you enter the year, values 80 to 99 result in years 1980 through 1999 and the values 0 to 29 result in the years 2000 through 2029.
The HMI devices do not support the use of nanoseconds. Values in the nanosecond range will be ignored during processing in Runtime.
2303
Application
Note Each time the area pointer is updated by the HMI device, the entire coordination area is always written. For this reason, the PLC program must not make any changes in the coordination area.
Startup bit
The startup bit is set briefly to "0" by the HMI device during startup. After startup, the bit is set permanently to "1".
Operating mode
As soon as the HMI device is switched offline by the user, the operating mode bit is set to 1. In normal operation of the HMI device, the state of the operating mode bit is "0". You can find out the current operating mode of the HMI device by querying this bit.
Life bit
The life bit is inverted by the HMI device at intervals of approximately one second. By querying this bit in the PLC program, you can check whether or not the connection to the HMI device still exists.
2304
Use
Before the "Screen number" area pointer can be used, it must be set up and activated by selecting "Communication Area pointer". You can create only one instance of the "Screen number" area pointer and only on one PLC. The screen number is always transferred to the PLC when a new screen is activated or when the focus within a screen changes from one screen object to another.
Structure
The area pointer is a data area in the memory of the PLC with a fixed length of 5 words.
15 1. Word 2. Word 3. Word 4th word 5. Word 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Current screen type Current screen number Reserved Current field number Reserved
2305
Use
In order to use this area pointer you must set up the following during the configuration: Define the version of configuration. Possible values between 1 and 255. You enter the version in the editor "Runtime settings > General" in the "Identification" area. This is where you select the PLC tag or the tag array that you have configured as the data area for the area pointer.
Connection failure
A connection failure to a device on which the "project ID" area pointer is configured results in all the other connections in the project being switched to "offline". This behavior has the following prerequisites:
2306
Data structure
The first word of the job mailbox contains the job number. Depending on the job mailbox, up to three parameters can be transferred.
Word n+0 n+1 n+2 n+3 Most significant byte 0 Parameter 1 Parameter 2 Parameter 3 Least significant byte Job number
The HMI device evaluates the job mailbox if the first word of this job is not equal to zero. This means that the parameters must be entered in the job mailbox first, followed by the job number. When the HMI device accepts the job mailbox, the first word is set to 0 again. The execution of the job mailbox is generally not completed at this point in time.
2307
Job mailboxes
All job mailboxes and their parameters are listed below. The "No." column contains the job number of the job mailbox. Job mailboxes can only be triggered by the PLC when the HMI device is online.
No . Function
14 Set time (BCD-coded) Parameter 1 Parameter 2 Parameter 3 15 Set date (BCD-coded) Parameter 1 Left byte: Right byte: weekday (1-7: Sunday-Saturday) Left byte: day (1-31) Right byte: month (1-12) Left byte: year Left byte: Right byte: hours (0-23) Left byte: minutes (0-59) Right byte: seconds (0-59) -
Logs the user on with the name "PLC user" at the HMI device with the group number transferred in parameter 1. The logon is possible only when the transferred group number exists in the project. Parameter 1 Parameter 2, 3 24 User logoff Logs off the current user. (The function corresponds to the "logoff" system function) Parameter 1, 2, 3 40 Transferring date/time to PLC An interval of at least 5 seconds must be maintained between two successive jobs to prevent overload of the HMI device. Parameter 1, 2, 3 41 Transfer date/time to the PLC An interval of at least 5 seconds must be maintained between two successive jobs to prevent overload of the HMI device. Parameter 1, 2, 3 46 Updating tags Causes the HMI device to read the current value of the tags from the PLC whose update ID matches the value transferred in parameter 1. (Function corresponds to the "UpdateTag" system function.) Parameter 1 49 Clear event buffer Deletes all analog alarms and discrete alarms of the "Warnings" class from the alarm buffer. Parameter 1, 2, 3 50 Clear error alarm buffer 1 - 100 Group number 1 to 255 -
2308
14 Set time (BCD-coded) Deletes all analog alarms and discrete alarms of the "Errors" class from the alarm buffer. Parameter 1, 2, 3 51 Display selection Parameter 1 Parameter 2 Parameter 3 69 Reading data record from PLC Parameter 1 Parameter 2 Parameter 3 70 Screen number Field number
1)
Recipe number (1-999) Data record number (1-65535) 0: Do not overwrite existing data record 1: Overwrite existing data record
Writing data record from PLC 1) Parameter 1 Parameter 2 Parameter 3 Recipe number (1-999) Data record number (1-65535) -
1) 2)
Only devices supporting recipes OP 73, OP 77A and TP 177A HMI devices also execute the "Screen selection" job mailbox if the on-screen keyboard is active. The weekday is ignored on HMI device KTP 600 BASIC PN.
3)
2309
2310
Reading values
When a read job is triggered, the values are read from the PLC addresses and transferred to the HMI device. Triggering by the operator in the recipe view: The values are downloaded to the HMI device. You can then process, edit, or save these values, for example. Triggering by a function or job mailbox: The values are saved immediately to the data volume.
Writing values
When a write job is triggered, the values are written to the PLC addresses. Triggering by the operator in the recipe view: The current values are written to the PLC. Triggering by a function or job mailbox: The current values are written to the PLC from the data medium.
Sequence of a transfer started by the operator in the recipe display Reading from the PLC started by the operator in the recipe view
Step 1 2 Yes The HMI device enters the recipe number to be read and the status "Transferring" in the data mailbox and sets the data record number to 0. The HMI device reads the values from the PLC and displays them in the recipe view. If the recipes have synchronized tags, the values from the PLC are also written to the tags. 4 5 The HMI device sets the status "Transfer completed." The control program must reset the status word to zero in order to enable further transfers. Action Check: Status word = 0? No Abort with system alarm.
2311
Note The status word may only be set by the HMI device. The PLC may only reset the status word to zero. Note The PLC may only evaluate the recipe and data record numbers when data inconsistency is detected if one of the conditions outlined below has been met: The data mailbox status is set to "Transfer completed". The data mailbox status is set to "Transfer completed with error".
2312
Sequence when reading from the PLC with job mailbox "PLC DAT" (no. 69)
Step 1 2 3 4 Yes The HMI device enters the recipe and data record number specified in the job and the status "Transferring" in the data mailbox. The HMI device reads the values and stores the values in the data record specified in the job mailbox. If "Overwrite" was selected in the job, an existing data record is overwritten without any prompt for confirmation. The HMI device sets the status "Transfer completed". If "Do not overwrite" was selected in the job, and the data record already exists, the HMI device aborts the job and enters 0000 1100 in the status word of the data mailbox. 5 The control program must reset the status word to zero in order to enable further transfers. Action Check: Status word = 0? No Abort without return message.
Sequence writing to the PLC with job mailbox "DAT PLC" (no. 70)
Step 1 2 3 4 5 Yes The HMI device enters the recipe and data record number specified in the job and the status "Transferring" in the data mailbox. The HMI device fetches the values of the data record specified in the job from the data medium and writes the values to the PLC. The HMI device sets the status "Transfer completed." The PLC program can now evaluate the transferred data. To allow further transfers, the PLC program must set the status word to 0 again. Action Check: Status word = 0? No Abort without return message.
2313
Sequence of the transfer when triggered by a configured function Reading from the PLC using a configured function
Step 1 2 Yes The HMI device enters the recipe and data record number specified in the function and the status "Transferring" in the data mailbox. The HMI device reads the values from the PLC and stores them in the data record specified in the function. If "Yes" was selected for the "Overwrite" function, an existing data record is overwritten without any prompt for confirmation. The HMI device sets the status "Transfer completed." If "No" was selected for the "Overwrite" function and the data record already exists, the HMI device aborts the job and enters 0000 1100 in the status word of the data mailbox. 5 The control program must reset the status word to zero in order to enable further transfers. Action Check: Status word = 0? No Abort with system alarm.
3 4
4 5
Possible causes of error when transferring data records Possible causes of error
The section below shows possible error causes which lead to the cancellation of data record transfer: Tag address not set up on the PLC Overwriting data records not possible
STEP 7 Basic V11.0 SP2 System Manual, 12/2011,
2314
Trends Trends
A trend is the graphical representation of one or more values from the PLC. The value is read out time-triggered for Basic Panels. For additional information see: Configuring trend displays for values from the PLC (Page 2027)
Time-triggered trends
The HMI device reads in the trend values cyclically at an interval specified in the configuration.
2315
Data types
For connections with a SIMATIC communication driver, the following data types are supported:
PLC Discrete alarms SIMATIC S7 PLCs WORD, INT Permitted data types Analog alarms BYTE, CHAR, WORD, INT, DWORD, DINT, REAL, TIMER
2316
2317
10.8.5.5
Permitted data types for SIMATIC S7 1200 - V1 Permitted data types for connections with SIMATIC S7 1200 (V1)
V1: Firmware Version V1.0 The table lists the data types that can be used when configuring tags and area pointers.
2318
Permitted data types for SIMATIC S7 1200 - V2 Permitted data types for connections with SIMATIC S7 1200 (V2)
V2: Firmware Version V2.0 The table lists the data types that can be used when configuring tags and area pointers.
Data type BOOL SINT INT DINT USINT UINT UDINT REAL LREAL TIME DATE DTL Length 1 bit 1 byte 2 bytes 4 bytes 1 byte 2 bytes 4 bytes 4 bytes 8 bytes 4 bytes 2 bytes 12 bytes
2319
10.8.5.6
2320
Procedure
1. Open the "Connections" editor of the HMI device. 2. Double-click "<Add>".
3. In the "Communication drivers" column, select the "SIMATIC S7 1200" driver. 4. Click the name of the connection.
2321
6. Set the IP addresses of the communication partners in the Inspector window: HMI device: "Parameters > HMI device > Address" PLC: "Parameters > PLC > Address"
2322
Procedure
1. Open the "Connections" editor of the HMI device. 2. Double-click "<Add>".
3. In the "Communication drivers" column, select the "SIMATIC S7 1200" driver. 4. Click the name of the connection. 5. Select the "MPI/DP" interface in the Inspector window under "Parameters".
2323
7. Set the addresses of the communication partners in the Inspector window: HMI device: "Parameters > HMI device > Address" PLC: "Parameters > PLC > Address"
Parameters for the connection Parameters for the connection (SIMATIC S7 1200) Parameters to be set
To assign the connection parameters, such as addresses and profiles, click the connection that you have created in the "Connections" editor. The communication partners are displayed schematically in the Inspector window under "Parameters". The "HMI device", "Network", and "PLC" areas are available for assigning parameters according to the interface used.
2324
2325
2326
2327
10.8.6
10.8.6.1
Introduction
This section describes the communication between an HMI device and the SIMATIC S7 300 and S7 400 PLCs. These two PLCs will be referred to jointly as SIMATIC S7 300/400.
2328
10.8.6.2
You can also connect multiple HMI devices to one SIMATIC S7 300/400 and multiple SIMATIC S7 300/400s to one HMI device. The maximum number of communication partners that you can connect to an HMI device is dependent on the HMI device used. Additional information is available in the documentation for the respective HMI device.
2329
Requirements
The following communication partners are created in the "Devices & Networks" editor: HMI device with PROFINET or Ethernet interface SIMATIC S7 300/400 with PROFINET interface.
Procedure
1. Double-click the "Devices & Networks" item in the project tree. The available communication partners in the project are displayed graphically in the network view. 2. Click the "Connections" button and select "HMI connection" for the connection type. The devices available for connection are highlighted in color.
2330
4. Click the connecting line. 5. Click "Highlight HMI connection" and select the HMI connection. The connection is displayed graphically in the Inspector window. 6. Click the communication partners in the "Network view" and change the PROFINET parameters in the Inspector window according to the requirements of your project. See the chapter "PROFINET parameters (Page 2332)" for additional details. Note The created HMI connection is also shown in the tabular area of the editor on the "Connections" tab. You check the connection parameters in the table. You can change the local name for the connection only in the table.
Result
You have created a connection between an HMI device and a SIMATIC S7 300/400. The IP address and subnet mask connection parameters are configured.
2331
PROFINET parameters PROFINET parameters for the HMI connection PROFINET parameters for the HMI connection
An overview of the configured HMI connection parameters can be found in the properties for the HMI connection. Only limited changes are possible in this Inspector window.
2332
"Connection"
Displays whether the devices are networked together. - displayed if the devices are networked together. - displayed if the devices are not networked together.
"Connection path"
The communication partners of the selected HMI connection and the associated PROFINET parameters are displayed in the "Connection path" area. Some of the areas displayed cannot be edited in this dialog. "End point" Displays the device name. This area cannot be edited. "Interface" Displays the selected interface of the device. You can choose between several interfaces, depending on the device. "Interface type" Displays the selected interface type. This area cannot be edited. "Subnet" Displays the selected subnet. This area cannot be edited. "Address" Displays the selected IP address of the device. This area cannot be edited. "Find connection path" button Enables the subsequent specification of connections.
PROFINET parameters for the HMI device PROFINET parameters for the HMI device
An overview of the configured HMI device parameters can be found in the properties for the HMI device.
2333
2334
"IP protocol"
"Set IP address in the project" When you transfer the WinCC project to the HMI device, this IP address is set up directly in the HMI device. Note The device is automatically restarted in the case of HMI devices with the Windows CE 3.0 operating system. HMI devices with Windows CE 3.0: OP 77B TP 177B color PN/DP TP 177B mono DP OP 177B color PN/DP OP 177B mono DP Mobile Panel 177 PN Mobile Panel 177 DP TP 277 6" OP 277 6" "Subnet mask" You assign data of the subnet mask in the "Subnet mask" area. "Use IP router" If you are using an IP router, select "Use IP router" and enter the router address in the "Router address" field. "Set IP address using a different method" If the function "Set IP address using a different method" is activated, the IP address is not taken from the project. You have to enter the IP address directly in the Control Panel of the HMI device.
PROFINET parameters for the PLC PROFINET parameters for the PLC
An overview of the configured parameters can be found in the properties for the PLC.
2335
"IP protocol"
"Interface type" Depending on the HMI device type, you have various interfaces to choose from. "IP address" You assign the IP address of the HMI device in the "IP address" area. "Subnet mask" You assign data of the subnet mask in the "Subnet mask" area. If you are using an IP router, select "Use IP router" and enter the router address in the field.
2336
IP address
The IP parameters are visible if the communication-capable devices support the TCP/IP protocol. The IP address consists of 4 decimal figures in the range of 0 to 255. The decimal figures are separated from one another by a dot. Example: 140.80.0.2 The IP address consists of the following: The address of the (sub) net The address of the node (generally also called host or network node)
Subnet mask
The subnet mask splits these two addresses. It determines which part of the IP address addresses the network and which part of the IP address addresses the node. The set bits of the subnet mask determine the network part of the IP address. Example: Subnet mask: 255.255.0.0 = 11111111.11111111.00000000.00000000 In the example given for the above IP address, the subnet mask shown here has the following meaning: The first 2 bytes of the IP address identify the subnet - i.e. 140.80. The last two bytes address the node, thus 0.2. It is generally true that: The network address results from AND linking the IP address and subnet mask. The node address results from AND NOT linking the IP address and subnet mask.
2337
Note Range of values for the first decimal point A value of between 224 and 255 is also possible for the first decimal number of the IP address (address class D etc). This is, however, not recommended because there is no address check for these values.
Result: All nodes with addresses between 129.80.001.xxx and 129.80.127.xxx are on one subnet, all nodes with addresses between 129.80.128.xxx and 129.80.255.xxx are on another subnet.
Router
The job of the routers is to connect the subnets. If an IP datagram is to be sent to another network, it first has to be conveyed to a router. To make this possible, in this case you have to enter the address of the router for each node in the subnet. The IP address of a node in the subnet and the address of the router may only differ at the points at which there is a "0" in the subnet mask.
2338
Setting port options Setting the port options Changing connection settings for the PROFINET IO port
You can change the network settings for the PROFINET IO port as required. By default, the settings are made automatically. In normal situations, this guarantees problem-free communication.
"Monitor" option
This option enables or disables port diagnostics. Examples of port diagnostics: The link status is monitored, in other words, the diagnostics are generated during link-down and the system reserve is monitored in the case of fiber optic ports.
2339
Note When a local port is connected, STEP 7 makes the setting for the partner port if the partner port supports the setting. If the partner port does not accept the setting, an error message is generated.
2340
Enable boundaries
"Boundaries" are limits for transmission of certain Ethernet frames. The following boundaries can be set at a port: "End of discovery of accessible devices" No forwarding of DCP frames to identify accessible devices. Devices downstream from this port cannot be reached by the project tree under "Accessible devices". Devices downstream from this port cannot be reached by the CPU. "End of topology discovery" LLDP frames (Link Layer Discovery Protocol) are not forwarded for topology detection. "End of sync domain" No forwarding of sync frames transmitted to synchronize nodes within a sync domain. If you operate, for example, a PROFINET device with more than two ports in a ring, you should prevent the sync frame from being fed into the ring by setting a sync boundary (at the ports not inside the ring). Additional example: If you want to use several sync domains, configure a sync domain boundary for the port connected to a PROFINET device from the other sync domain.
2341
Restrictions
The following restrictions must be observed: The individual check boxes can only be used if the port supports the function in question. If a partner port has been determined for the port, the following check boxes cannot be used: "End of discovery of accessible devices" "End of topology discovery" If autonegotiation is disabled, none of the check boxes can be used.
10.8.6.3
2342
Requirements
The following communication partners are created in the "Devices & Networks" editor: HMI device with MPI/DP interface SIMATIC S7 300/400 with PROFIBUS interface
Procedure
1. Double-click the "Devices & Networks" item in the project tree. The available communication partners in the project are displayed graphically in the network view.
2. Click the "Connections" button. The devices available for connection are highlighted in color. 3. Click the HMI device interface. 4. Select the "PROFIBUS" interface type in the Inspector window under "Properties > General > HMI MPIDP > Parameters".
2343
6. Click the connecting line. 7. Click "Highlight HMI connection" and select the HMI connection. The connection is displayed graphically in the Inspector window. 8. Click the communication partners in the "Network view" and change the PROFINET parameters in the Inspector window according to the requirements of your project. See the chapter "PROFIBUS parameters (Page 2344)" for additional details. Note The created HMI connection is also shown in the tabular area of the editor on the "Connections" tab. You check the connection parameters in the table. You can change the local name for the connection only in the table.
Result
You have created an HMI connection between an HMI device and a SIMATIC S7 300/400 via PROFIBUS.
PROFIBUS parameters PROFIBUS parameters for the HMI connection PROFIBUS parameters for the HMI connection
An overview of the configured HMI connection parameters can be found in the properties for the HMI connection. Only limited changes are possible in this Inspector window.
2344
"Connection"
Displays whether the devices are networked together. - displayed if the devices are networked together. - displayed if the devices are not networked together.
"Connection path"
The communication partners of the selected HMI connection and the associated PROFIBUS parameters are displayed in the "Connection path" area. Some of the areas displayed cannot be edited in this dialog. "End point" Displays the device name. This area is not editable. "Interface" Displays the selected interface of the device. You can choose between several interfaces, depending on the device.
2345
PROFIBUS parameters for the HMI device PROFIBUS parameters for the HMI device
An overview of the configured HMI device parameters can be found in the properties for the HMI device.
2346
"Parameters"
"Interface type" You assign the interface type in the "Interface type" area. Depending on the HMI device type, you have various interfaces to choose from. "Address" You assign the PROFIBUS address of the HMI device in the "Address" area. The PROFIBUS address must be unique throughout the PROFIBUS network. "Highest address" The "Highest address" area displays the highest address of the PROFIBUS network. "Transmission speed" The "Transmission speed" is determined by the slowest device connected to the network. The setting is identical throughout the network.
PROFIBUS parameters for the PLC PROFIBUS parameters for the PLC
An overview of the configured parameters can be found in the properties for the PLC.
2347
"Parameters"
"Interface type" Depending on the HMI device type, you have various interfaces to choose from. "Address" You assign the PROFIBUS address of the HMI device in the "Address" area. The PROFIBUS address must be unique throughout the PROFIBUS network. "Highest address" The "Highest address" area displays the highest address of the PROFIBUS network. "Transmission speed" The "Transmission speed" is determined by the slowest device connected to the network. The setting is identical throughout the network.
2348
Meaning of profiles
Profile DP Meaning Select the "DP" bus profile when the only devices connected to the PROFIBUS subnet are those which satisfy the requirements of standard EN 50170 Volume 2/3, Part 8-2 PROFIBUS. The bus parameter setting is optimized on these devices. This includes devices with DP master and DP slave interfaces of the SIMATIC S7 and distributed I/Os of other manufacturers. Standard Compared to the "DP" profile, the "Standard" profile also offers scope for devices of another project or devices which have not been configured here to be taken into account when calculating the bus parameters. The bus parameters are then calculated following a simple, non-optimized algorithm. Select the "Universal" bus profile when individual devices on the PROFIBUS subnet use the PROFIBUS-FMS service. This includes the following devices for example: CP 343-5 PROFIBUS-FMS devices of other manufacturers As with the "Standard" profile, this profile allows you to take other devices into account when calculating the bus parameters.
Universal
2349
10.8.6.4
2350
Requirements
The following communication partners are created in the "Devices & Networks" editor: HMI device with MPI/DP interface SIMATIC S7 300/400 with MPI/DP interface
Procedure
1. Double-click the "Devices & Networks" item in the project tree. The available communication partners in the project are displayed graphically in the network view.
2. Click the "Connections" button. The devices available for connection are highlighted in color. 3. Click the interface of the PLC and use a drag-and-drop operation to draw a connection to the HMI device.
2351
Result
You have created an HMI connection between an HMI device and a SIMATIC S7 300/400 via MPI.
MPI parameters MPI parameters for the HMI connection MPI parameters for the HMI connection
An overview of the configured HMI connection parameters can be found in the properties for the HMI connection. Only limited changes are possible in this Inspector window.
2352
"Connection"
Displays whether the devices are networked together. - displayed if the devices are networked together. - displayed if the devices are not networked together.
"Connection path"
The communication partners of the selected HMI connection and the associated MPI parameters are displayed in the "Connection path" area. Some of the areas displayed cannot be edited in this dialog. "End point" Displays the name of the device. This area is not editable. "Interface" Displays the selected interface of the device. You can choose between several interfaces, depending on the device.
2353
MPI parameters for the HMI device MPI parameters for the HMI device
An overview of the configured HMI device parameters can be found in the properties for the HMI device.
2354
"Parameters"
"Interface type" You assign the interface type in the "Interface type" area. Depending on the HMI device type, you have various interfaces to choose from. "Address" You assign the MPI address of the HMI device in the "Address" area. The MPI address must be unique throughout the MPI network. "Highest address" The "Highest address" area displays the highest address of the MPI network. "Transmission speed" The "Transmission speed" is determined by the slowest device connected to the network. The setting is identical throughout the network.
MPI parameters for the PLC MPI parameters for the PLC
An overview of the configured parameters can be found in the properties for the PLC.
2355
"Parameters"
"Interface type" Depending on the HMI device type, you have various interfaces to choose from. "Address" You assign the MPI address of the HMI device in the "Address" area. The MPI address must be unique throughout the MPI network. "Highest address" The "Highest address" area displays the highest address of the MPI network. "Transmission speed" The "Transmission speed" is determined by the slowest device connected to the network. The setting is identical throughout the network.
2356
10.8.6.5
Data exchange
Data exchange using area pointers General information on area pointers Introduction
You use an area pointer to access a data area in the PLC. During communication, the PLC and the HMI device alternately access these data areas for read and write operations.
2357
Use
Configure and enable the area pointer in "Communication > Connections" before you put it into use. You can create only one instance of the "Screen number" area pointer and only on one PLC. The screen number is always transferred to the PLC when a new screen is activated or when the focus within a screen changes from one screen object to another.
Structure
The area pointer is a data area in the memory of the PLC with a fixed length of 5 words.
15 1st word 2nd word 3rd word 4th word 5th word 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Current screen type Current screen number Reserved Current field number Reserved
2358
Note Note that when you enter the year, values 80 to 99 result in years 1980 through 1999 and the values 0 to 29result in the years 2000 through 2029.
2359
n+4 1) n+5 1)
Reserved Reserved
Reserved Reserved
1)
The two data words must exist in the data area to ensure that the data format corresponds to WinCC flexible and to avoid false information being read.
Note Note that when you enter the year, values 80 to 99 result in years 1980 through 1999 and the values 0 to 29 result in the years 2000 through 2029.
2360
Use
Note The HMI device always writes the entire coordination area when updating the area pointer. The control program can for this reason not make changes to the coordination area.
Startup bit
The startup bit is set briefly to "0" by the HMI device during startup. It sets the bit permanently to "1" when startup is completed.
Operating mode
The operating mode bit is set to 1 as soon as the user switches the HMI device offline. The status of the operating mode bit is "0" during normal operation of the HMI device. You can determine the current operating mode of the HMI device by reading this bit in the control program.
Life bit
The HMI device inverts the life bit at intervals of approximately one second. You can check whether or not there is still a connection to the HMI device by querying this bit in the control program.
2361
Use
To use this area pointer, set up the following during the configuration: Define the version of configuration. Possible values between 1 and 255. You enter the version in the editor "Runtime settings > General" in the "Identification" area. Data address of the value for the version that is stored in the PLC: Enter the data address in the "Communication > Connections" editor in "Address".
Connection failure
A connection failure to a device on which the "project ID" area pointer is configured results in all the other connections in the project being switched to "offline". This behavior has the following prerequisites: You have configured several connections in a project. You are using the "project ID" area pointer in at least one connection. The following causes which may set connections to "offline": The PLC is not available. The connection has been switched offline in the engineering system.
Data structure
The first word of the job mailbox contains the job number. Depending on the job mailbox, up to three parameters can be transferred.
Word n+0 n+1 n+2 n+3 Most significant byte 0 Parameter 1 Parameter 2 Parameter 3 Least significant byte Job number
The HMI device evaluates the job mailbox if the first word of this job is not equal to zero. This means that the parameters must be entered in the job mailbox first, followed by the job number.
2362
Job mailboxes
All job mailboxes and their parameters are listed below. The "No." column contains the job number of the job mailbox. Job mailboxes can only be triggered by the PLC when the HMI device is online.
No . Function
14 Setting the time (BCD coded) Parameter 1 Parameter 2 Parameter 3 15 Setting the date (BCD code) Parameter 1 Left byte: Right byte: hours (0-23) Left byte: minutes (0-59) Right byte: seconds (0-59) 3) 4)
Left byte: Right byte: weekday (1-7: Sunday-Saturday) Left byte: day (1-31) Right byte: month (1-12) Left byte: year
Logs the user on with the name "PLC user" at the HMI device with the group number transferred in parameter 1. The logon is possible only when the transferred group number exists in the project. Parameter 1 Parameter 2, 3 24 User logoff Logs off the current user. (The function corresponds to the "logoff" system function) Parameter 1, 2, 3 40 Transfer date/time to PLC (in the S7 format DATE_AND_TIME) An interval of at least 5 seconds must be maintained between two successive jobs in order to prevent overload of the HMI device. Parameter 1, 2, 3 41 Transfer date/time to PLC (In OP/MP format) An interval of at least 5 seconds must be maintained between two successive jobs in order to prevent overload of the HMI device. Parameter 1, 2, 3 46 Update tags Causes the HMI device to read the current value of the tagsfrom the PLC whose update ID matches the value transferred in parameter 1. (Function corresponds to the "UpdateTag" system function.) Group number 1 to 255 -
2363
14 Setting the time (BCD coded) Parameter 1 49 Delete alarm buffer Deletes all analog alarms and discrete alarms of the "Warnings" class from the alarm buffer. Parameter 1, 2, 3 50 Delete alarm buffer Deletes all analog alarms and discrete alarms of the "Errors" class from the alarm buffer. Parameter 1, 2, 3 51 Screen selection Parameter 1 Parameter 2 Parameter 3 69 Reading data record from PLC Parameter 1 Parameter 2 Parameter 3 70 Writing data record from PLC Parameter 1 Parameter 2 Parameter 3
1) 2) 2)
1 - 100
Recipe number (1-999) Data record number (1-65535) 0: Do not overwrite existing data record 1: Overwrite existing data record
1)
Only for devices supporting recipes. OP 73, OP 77A and TP 177A HMI devices also execute the "Screen selection" job mailbox if the on-screen keyboard is active. The weekday is ignored on HMI device KTP 600 BASIC PN. The weekday is ignored when you configure the "Date/Time PLC" area pointer.
3) 4)
2364
Reading values
When a read job is triggered, the values are read from the PLC addresses and transferred to the HMI device. Triggering by the operator in the recipe view: The values are downloaded to the HMI device. You can then, for example, process, edit, or save these values in the HMI device. Triggering by a function or job mailbox: The values are saved immediately to the data volume.
2365
Writing values
When a write job is triggered, the values are written to the PLC addresses. Triggering by the operator in the recipe view: The current values are written to the PLC. Triggering by a function or job mailbox: The current values are written to the PLC from the data medium.
Application
Synchronous data record transfer can be a useful solution, for example, when: The PLC is the "active partner" in the transfer of data records. The PLC evaluates the information about the recipe number and data record number. The transfer of data records is triggered by means of a Job mailbox.
Requirements
In order to synchronize transfer of data records between the HMI device and the PLC, the following requirements must be met during configuration: An area pointer has been set up: "Communication > Connections" editor in "Area pointer". The PLC with which the HMI device synchronizes transfer of data records is specified in the recipe: "Recipes" editor in the inspector window the option "Coordinated transfer of data records" under "General > Synchronization > Settings"
2366
Sequence of a transfer started by the operator in the recipe view Reading from the PLC started by the operator in the recipe view
Step 1 2 Yes The HMI device enters the recipe number to be read and the status "Transferring" in the data record and sets the data record number to 0. The HMI device reads the values from the PLC and displays them in the recipe view. If the recipes have synchronized tags, the values from the PLC are also written to the tags. 4 5 The HMI device sets the status "Transfer completed." The control program must reset the status word to zero in order to enable further transfers. Action Check: Status word = 0? No Abort with system event.
2367
Note The status word may only be set by the HMI device. The PLC may only reset the status word to zero. Note The PLC may only evaluate the recipe and data record numbers when data inconsistency is detected if one of the conditions outlined below has been met: The data mailbox status is set to "Transfer completed". The data mailbox status is set to "Transfer completed with error".
2368
Sequence when reading from the PLC with job mailbox "PLC DAT" (no. 69)
Step 1 2 3 4 Yes The HMI device enters the recipe and data record number specified in the job and the status "Transferring" in the data record. The HMI device reads the values from the PLC and saves these to the data record defined in the job mailbox. If "Overwrite" was selected in the job, an existing data record is overwritten without any prompt for confirmation. The HMI device sets the status "Transfer completed." If "Do not overwrite" was selected in the job, and the data record already exists, the HMI device aborts the job and enters 0000 1100 in the status word of the data mailbox. 5 The control program must reset the status word to zero in order to enable further transfers. Action Check: Status word = 0? No Abort without return message.
Sequence of writing to the PLC with job mailbox "DAT PLC" (no. 70)
Step 1 2 3 4 5 Yes The HMI device enters the recipe and data record number specified in the job and the status "Transferring" in the data mailbox. The HMI device fetches the values of the data record specified in the function from the data medium and writes the values to the PLC. The HMI device sets the status "Transfer completed." The control program can now evaluate the transferred data. The control program must reset the status word to zero in order to enable further transfers. Action Check: Status word = 0? No Abort without return message.
Sequence of the transfer when triggered by a configured function Reading from the PLC using a configured function
Step 1 2 Yes The HMI device enters the recipe and data record number specified in the function and the status "Transferring" in the data mailbox. The HMI device reads the values from the PLC and stores them in the data record specified in the function. Action Check: Status word = 0? No Abort with system event.
2369
4 5
Possible causes of error when transferring data records Possible causes of error
The section below shows possible error causes which lead to the cancellation of data record transfer: Tag address not set up on the PLC Overwriting data records not possible
2370
Trends Trends
A trend is the graphical representation of one or more values from the PLC. The value is read out time-triggered for Basic Panels. For additional information see: Configuring trend displays for values from the PLC (Page 2027)
Time-triggered trends
The HMI device reads in the trend values cyclically at an interval specified in the configuration. Time-triggered trends are suitable for continuous curves, such as the operating temperature of a motor.
2371
Data types
For connections with a SIMATIC communication driver, the following data types are supported:
PLC Discrete alarms SIMATIC S7 300/400 WORD, INT Permitted data types Analog alarms BYTE, CHAR, WORD, INT, DWORD, DINT, REAL, COUNTER, TIME
2372
2373
10.8.6.6
Permitted data types for SIMATIC S7 300/400 Permitted data types for connections with SIMATIC S7 300/400
The table lists the data types that can be used when configuring tags and area pointers.
Data type BOOL BYTE WORD DWORD CHAR INT DINT REAL TIME DATE TIME_OF_DAY, TOD S5TIME Length 1-bit 1 byte 2 bytes 4 bytes 1 byte 2 byte 4 bytes 4 bytes 4 bytes 2 bytes 4 bytes 2 bytes
2374
10.8.6.7
Procedure
1. Open the "Connections" editor of the HMI device. 2. Double-click "<Add>".
2375
4. Click the name of the connection. 5. Select a PROFINET interface of the HMI device in the Inspector window under "Parameters > Interface". 6. Set the IP addresses of the communication partners in the Inspector window: HMI device: "Parameters > HMI device > Address" PLC: "Parameters > PLC > Address"
2376
Procedure
1. Open the "Connections" editor of the HMI device. 2. Double-click "<Add>".
3. Select the driver in the "Communication driver" column. 4. Click the name of the connection. 5. Select the "MPI/DP" interface in the Inspector window under "Parameters > Interface".
2377
7. Set the addresses of the communication partners in the inspector window: HMI device: "Parameters > HMI device > Address" PLC: "Parameters > PLC > Address"
2378
Procedure
1. Open the "Connections" editor of the HMI device. 2. Double-click "<Add>".
3. Select the driver in the "Communication driver" column. 4. Click the name of the connection. 5. Select the "MPI/DP" interface in the Inspector window under "Parameters > Interface".
2379
7. Set the addresses of the communication partners in the inspector window: HMI device: "Parameters > HMI device > Address" PLC: "Parameters > PLC > Address"
Parameters for the connection Parameters for the connection (SIMATIC S7 300/400) Parameters to be set
To set the connection parameters, such as addresses and profiles, click the connection that you have created in the "Connections" editor. The communication partners are displayed schematically in the Inspector window under "Parameters". The "HMI device", "Network", and "PLC" areas are available for assigning parameters according to the interface used.
2380
2381
2382
2383
2384
2385
2386
10.8.7
10.8.7.1
Introduction
This section describes the communication between an HMI device and the SIMATIC S7 200 PLC. You can configure the following communication channels for the SIMATIC S7 200 PLC: PROFINET and Ethernet PROFIBUS MPI PPI
10.8.7.2
Introduction
You configure a connection to the SIMATIC S7 200 PLC in the "Connections" editor of the HMI device. The interfaces are named differently depending on the HMI device.
Requirements
A project is open. An HMI device has been created.
Procedure
1. Double-click the HMI device under "Devices" in the project tree. 2. Double-click the "Connections" item.
2387
2388
See the chapter "Parameters for the connection (Page 2389)" for additional details.
10.8.7.3
2389
2390
2391
2392
2393
2394
2395
10.8.7.4
Data exchange
Data exchange using area pointers General information on area pointers Introduction
You use an area pointer to access a data area in the PLC. During communication, the PLC and the HMI device alternately access these data areas for read and write operations. The PLC and the HMI device trigger defined interactions based on the evaluation of stored data.
2396
Application
Configure and enable the area pointer in "Communication > Connections" before you put it into use. You can create only one instance of the "Screen number" area pointer and only on one PLC. The screen number is always transferred to the PLC when a new screen is activated or when the focus within a screen changes from one screen object to another.
Structure
The area pointer is a data area in the memory of the PLC with a fixed length of 5 words.
15 1st word 2nd word 3rd word 4th word 5th word 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Current screen type Current screen number Reserved Current field number Reserved
Current screen type "1" for root screen or "4" for permanent window Current screen number 1 to 32767 Current field number 1 to 32767
2397
Note Note that when you enter the year, values 80 to 99 result in years 1980 through 1999 and the values 0 to 29result in the years 2000 through 2029.
2398
n+4 1) n+5
1)
Reserved Reserved
Reserved Reserved
1)
The two data words must exist in the data area to ensure that the data format matches WinCC flexible and to avoid reading false information.
Note Note that when you enter the year, values 80 to 99 result in years 1980 through 1999 and the values 0 to 29 result in the years 2000 through 2029.
Use
Note Each time the area pointer is updated by the HMI device, the entire coordination area is always written. For this reason, the PLC program must not make any changes in the coordination area.
2399
Startup bit
The startup bit is set briefly to "0" by the HMI device during startup. After startup, the bit is set permanently to "1".
Operating mode
As soon as the HMI device is switched offline by the user, the operating mode bit is set to 1. In normal operation of the HMI device, the state of the operating mode bit is "0". You can find out the current operating mode of the HMI device by querying this bit.
Life bit
The life bit is inverted by the HMI device at intervals of approximately one second. By querying this bit in the PLC program, you can check whether or not the connection to the HMI device still exists.
Use
To use this area pointer, set up the following during the configuration: Define the version of configuration. Possible value between 1 and 255. You enter the version in the editor "Runtime settings > General" in the "Identification" area. Data address of the value for the version that is stored in the PLC: You enter the data address in the editor "Communication > Connections" under "Address".
2400
Connection failure
A connection failure to a device on which the "project ID" area pointer is configured results in all the other connections in the project being switched to "offline". This behavior has the following requirements: You have configured several connections in a project. You are using the "project ID" area pointer in at least one connection. Causes which may set connections "offline": The PLC is not available. The connection has been switched offline in the engineering system.
Data structure
The first word of the job mailbox contains the job number. Depending on the job mailbox, up to three parameters can be transferred.
Word n+0 n+1 n+2 n+3 Most significant byte 0 Parameter 1 Parameter 2 Parameter 3 Least significant byte Job number
The HMI device evaluates the job mailbox if the first word of this job is not equal to zero. This means that the parameters must be entered in the job mailbox first, followed by the job number. When the HMI device accepts the job mailbox, the first word is set to 0 again. The execution of the job mailbox is generally not completed at this point in time.
2401
Job mailboxes
All job mailboxes and their parameters are listed below. The "No." column contains the job number of the job mailbox. Job mailboxes can only be triggered by the PLC when the HMI device is online. Note Please note that not all HMI devices support job mailboxes. TP 170A and Micro Panel do not support job mailboxes, for example.
No .
Function
14 Setting the time (BCD coded) Parameter 1 Parameter 2 Parameter 3 15 Set date (BCD code) Parameter 1
3)
Left byte: Right byte: hours (0-23) Left byte: minutes (0-59) Right byte: seconds (0-59) Left byte: Right byte: weekday (1-7: Sunday-Saturday) Left byte: day (1-31) Right byte: month (1-12) Left byte: year
Logs the user on with the name "PLC user" at the HMI device with the group number transferred in parameter 1. The logon is possible only when the transferred group number exists in the project. Parameter 1 Parameter 2, 3 24 User logoff Logs off the current user. (The function corresponds to the "logoff" system function) Parameter 1, 2, 3 40 Transfer date/time to PLC (in the S7 format DATE_AND_TIME) An interval of at least 5 seconds must be maintained between two successive jobs to prevent overload of the HMI device. Parameter 1, 2, 3 41 Transfer date/time to PLC (In OP/MP format) An interval of at least 5 seconds must be maintained between successive jobs in order to prevent overload of the HMI device. Parameter 1, 2, 3 46 Update tags Group number 1 to 255 -
2402
14 Setting the time (BCD coded) Causes the HMI device to read the current value of the tagsfrom the PLC whose update ID matches the value transferred in parameter 1. (Function corresponds to the "UpdateTag" system function.) Parameter 1 49 Delete alarm buffer Deletes all analog alarms and discrete alarms of the "Warnings" class from the alarm buffer. Parameter 1, 2, 3 50 Delete alarm buffer Deletes all analog alarms and discrete alarms of the "Errors" class from the alarm buffer. Parameter 1, 2, 3 51 Screen selection Parameter 1 Parameter 2 Parameter 3 69 Reading data record from PLC Parameter 1 Parameter 2 Parameter 3 70
2)
1 - 100
Recipe number (1-999) Data record number (1-65535) 0: Do not overwrite existing data record 1: Overwrite existing data record
Writing data record from PLC 1) Parameter 1 Parameter 2 Parameter 3 Recipe number (1-999) Data record number (1-65535) -
1) 2)
Only devices supporting recipes OP 73, OP 77A and TP 177A HMI devices also execute the "Screen selection" job mailbox if the on-screen keyboard is active. The weekday is ignored on HMI device KTP 600 BASIC PN.
3)
2403
Sequence of a transfer started by the operator in the recipe view Reading from the PLC started by the operator in the recipe view
Step 1 2 Yes The HMI device enters the recipe number to be read and the status "Transferring" in the data record and sets the data record number to 0. The HMI device reads the values from the PLC and displays them in the recipe view. If the recipes have synchronized tags, the values from the PLC are also written to the tags. 4 5 The HMI device sets the status "Transfer completed." The control program must reset the status word to zero in order to enable further transfers. Action Check: Status word = 0? No Abort with system event.
2404
Note The status word may only be set by the HMI device. The PLC may only reset the status word to zero. Note The PLC may only evaluate the recipe and data record numbers when data inconsistency is detected if one of the conditions outlined below has been met: The data mailbox status is set to "Transfer completed". The data mailbox status is set to "Transfer completed with error".
2405
Sequence when reading from the PLC with job mailbox "PLC DAT" (no. 69)
Step 1 2 3 4 Yes The HMI device enters the recipe and data record number specified in the job and the status "Transferring" in the data mailbox. The HMI device reads the values from the PLC and saves these to the data record defined in the job mailbox. If "Overwrite" was selected in the job, an existing data record is overwritten without any prompt for confirmation. The HMI device sets the status "Transfer completed." If "Do not overwrite" was selected in the job, and the data record already exists, the HMI device aborts the job and enters 0000 1100 in the status word of the data mailbox. 5 The control program must reset the status word to zero in order to enable further transfers. Action Check: Status word = 0? No Abort without return message.
Sequence of writing to the PLC using job mailbox "DAT PLC" (no. 70)
Step 1 2 3 4 5 Yes The HMI device enters the recipe and data record number specified in the job and the status "Transferring" in the data mailbox. The HMI device fetches the values of the data record specified in the job from the data medium and writes the values to the PLC. The HMI device sets the status "Transfer completed." The control program can now evaluate the transferred data. The control program must reset the status word to zero in order to enable further transfers. Action Check: Status word = 0? No Abort without return message.
2406
Sequence of the transfer when triggered by a configured function Reading from the PLC using a configured function
Step 1 2 Yes The HMI device enters the recipe and data record number specified in the function and the status "Transferring" in the data mailbox. The HMI device reads the values from the PLC and stores them in the data record specified in the function. If "Yes" was selected for the "Overwrite" function, an existing data record is overwritten without any prompt for confirmation. The HMI device sets the status "Transfer completed." If "No" was selected for the "Overwrite" function and the data record already exists, the HMI device aborts the job and enters 0000 1100 in the status word of the data mailbox. 5 The control program must reset the status word to zero in order to enable further transfers. Action Check: Status word = 0? No Abort with system event.
3 4
4 5
Possible causes of error when transferring data records Possible causes of faults
The section below shows possible causes of errors which lead to a data record transfer being terminated with errors: Tag address not set up on the PLC Overwriting data records not possible
STEP 7 Basic V11.0 SP2 System Manual, 12/2011,
2407
2408
Reading values
When a read job is triggered, the values are read from the PLC addresses and transferred to the HMI device. Triggering by the operator in the recipe view: The values are downloaded to the HMI device. You can then process, edit, or save these values, for example. Triggering by a function or job mailbox: The values are saved immediately to the data volume.
Writing values
When a write job is triggered, the values are written to the PLC addresses. Triggering by the operator in the recipe view: The current values are written to the PLC. Triggering by a function or job mailbox: The current values are written to the PLC from the data medium.
Application
Synchronous data record transfer can be a useful solution, for example, when: The PLC is the "active partner" in the transfer of data records. The PLC evaluates the information about the recipe number and data record number. The transfer of data records is triggered by means of a Job mailbox.
Requirements
In order to synchronize transfer of data records between the HMI device and the PLC, the following requirements must be met during configuration: An area pointer has been set up: "Communication > Connections" editor in "Area pointer". The PLC with which the HMI device synchronizes transfer of data records is specified in the recipe: "Recipes" editor in the Inspector window the "Coordinated transfer of data records" option under "General > Synchronization > Settings".
2409
Status The status word (word 4) can adopt the following values:
Value Decimal 0 2 4 12 Binary 0000 0000 0000 0010 0000 0100 0000 1100 Transfer permitted, data record free Transferring Transfer completed without error Transfer completed with error Meaning
Trends Trends
A trend is the graphical representation of one or more values from the PLC. The value is read out time-triggered for Basic Panels. For additional information see: Configuring trend displays for values from the PLC (Page 2027)
Time-triggered trends
The HMI device reads in the trend values cyclically at an interval specified in the configuration. Time-triggered trends are suitable for continuous curves, such as the operating temperature of a motor.
2410
Data types
For connections with a SIMATIC communication driver, the following data types are supported:
PLC Discrete alarms SIMATIC S7 PLCs WORD, INT Permitted data types Analog alarms BYTE, CHAR, WORD, INT, DWORD, DINT, REAL, TIMER
2411
2412
10.8.7.5
Permitted data types for SIMATIC S7 200 Permitted data types for connections with SIMATIC S7 200
The table lists the data types that can be used when configuring tags and area pointers.
Data type Bool Byte Char Word Int DWord DInt Real StringChar Timer Array Length 1 bit 1 byte 1 byte 2 bytes 2 bytes 4 bytes 4 bytes 4 bytes -2 bytes --
2413
Note Disconnection with a PPI network If you are using arrays in the configuration, an array size of approximately 1000 bytes may cause an interruption of the connection. Use smaller arrays in your configuration.
10.8.8
10.8.8.1
Introduction
Communication with other PLCs is communication with PLCs that are not in the SIMATIC family. These PLCs have proprietary protocols for data exchange. The protocols are configured as communication drivers in WinCC.
Communication drivers
The following communication drivers are supported in WinCC and are already installed: Allen-Bradley Allen-Bradley EtherNet/IP Allen-Bradley DF1 Mitsubishi Mitsubishi MC TCP/IP Mitsubishi FX Modicon Modbus Modicon Modbus TCP/IP Modicon Modbus RTU Omron Omron Host Link
2414
10.8.8.2
10.8.8.3
Communication drivers
2415
Data exchange
Data is exchanged by means of tags or area pointers. Tags The PLC and the HMI device use process values for data exchange. You create tags in the configuration that point to addresses in the PLC. The HMI device reads the value from the defined address, and then displays it. The operator may also enter values on the HMI device, which are then written to the address in the PLC. Area pointers Area pointers are used to exchange specific data and are only set up when these data are used.
Requirements
A project is open. An HMI device has been created.
Procedure
1. Double-click the HMI device under "Devices" in the project tree. 2. Double-click the "Connections" item.
2416
2417
5. Select all necessary connection parameters for the interface in the Inspector window under "Parameters".
2418
2419
2420
Connection
Connection with the following PLCs is approved with Allen-Bradley EtherNet/IP: CPU type: "ControlLogix, Compact Logix" ControlLogix 556x(1756-L6x) with Ethernet module 1756-ENBT Guard Logix-System ControlLogix 556xS(1756-L6xS) with Ethernet module 1756-ENBT CompactLogix 533xE(1769-L3xE) with Ethernet interface onboard 532xE(1769-L2xE) with Ethernet interface onboard 534x (1768-L4x) with Ethernet module 1768-ENBT CPU type: "SLC, MicroLogix" MicroLogix 1100 (with Ethernet interface onboard) MicroLogix 1400 (with Ethernet interface onboard) SLC 5/05 (with Ethernet interface onboard)
Performance features of communication Permitted data types for Allen-Bradley EtherNet/IP Permitted data types
The table lists the data types that can be used when configuring tags and area pointers.
2421
* Any changed value of certain defined bits is written back to the PLC. There is no check to determine whether any other bits have changed. The PLC (or other PLCs) may only read access the value.
Note Strings in RSLogix 5000 have a default length of 82 characters. A maximum of 80 characters can be displayed in WinCC. Always use strings which do not exceed the maximum length of 80 characters. Permitted data types - arrays
Address Array Permitted data types Int, UInt, DInt, UDInt, Real
2422
2423
2424
Note Bit addressing with the data types Bool, Real and String is not permitted and will cause an addressing fault.
2425
Array elements
Elements of one-dimensional, two-dimensional and three-dimensional arrays in the PLC are indexed by setting an index and the corresponding notation in the tag editor. Array addressing starts at element "0", with arrays of all basic types being valid for element addressing. Read/ write operations are only carried out at the addressed element, and not for the entire array.
Structures
User-defined data types are created by means of structures. These structures group tags of different data types. Structures may consist of basic types, arrays and of other structures. In WinCC, only structure elements are addressed and not entire structures.
Structure elements
Structure elements are addressed by means of the name of the structure and of the required structure element. This addressing is separated by point. In addition to basic data types, the
2426
2427
Access to an element of a 2- Arraytag[Dim1,Dim2] dimensional array Element of structure array (1- Arraytag[Dim1].structureelement dimensional) Bit in element basic type array (2-dimensional) Arraytag[Dim1,Dim2]/Bit Structuretag.arraytag Structuretag.structure2.arraytag [element]/ bit
Structure
Note Program tags are addressed by leading the address with the program name derived from the PLC with colon delimiter. Example: Programname:arraytag[Dim1,Dim2]
2428
Example 2:
Connection with a PLC in remote Allen-Bradley racks. Two Allen-Bradley racks are networked on Ethernet. 1,2,2,190.130.3.101,1,5
Number 1 2 2 190.130.3.101 1 5 Meaning Backplane connection Stands for the CPU slot number of the second Ethernet module. Stands for an Ethernet connection. IP address of a remote AB rack on the network in particular the third Ethernet module Backplane connection Slot number of the CPU
2429
Operand type
You have the following options under operand type: I O S B C T R F N ST A
File number
Select the number between two limits under file number: Low limit High limit The limit values depend on the selected operand type.
Child element
You can select a child element when you have selected one of the following operand types: R C T
2430
Screens
The refresh rate of screens is determined by the type and volume of data to be visualized. Only configure short acquisition cycles for objects which actually require shorter refresh cycles. This procedure reduces update times.
2431
Trends
The HMI device always updates all bit-triggered trends whose group bit is set in the "Trend transfer area". It resets the bits in the next cycle. The group bit in the PLC program can only be set again after the HMI device has reset all bits.
Job mailboxes
A high rate and volume of job mailboxes transferred may lead to overload in communication between the HMI device and the PLC. The HMI device confirms acceptance of the job mailbox by entering the value zero in the first data word of the job mailbox. The HMI device now processes the job for which it requires a certain time slice. It may take the HMI device some time to process a new job mailbox which is transferred in immediate succession to the job mailbox. The next job mailbox is only accepted if sufficient computing resources are available.
Requirements
A project is open. An HMI device has been created.
Procedure
1. Double-click the HMI device under "Devices" in the project tree. 2. Double-click the "Connections" item.
2432
2433
5. Select all necessary connection parameters for the interface in the Inspector window under "Parameters".
2434
2435
2436
RS-232 X X X X X
1) Processors released for PLC-5: PLC-5/11, PLC-5/20, PLC-5/30, PLC-5/40, PLC-5/60, and PLC-5/80.
2437
Connectable PLCs
The Allen Bradley DF1 communication driver is available for the following Allen-Bradley PLCs:
DF1 (point-to-point) PLC SLC500 SLC501 SLC502 SLC503 SLC504 SLC505 MicroLogix PLC-5
1)
RS 232 X X X
2) 2) 2)
X 2) X
1)
2)
Only the following processors are approved for PLC-5: PLC-5/11, PLC-5/20, PLC-5/30, PLC-5/40, PLC-5/60 und PLC-5/80. For HMI devices which only have an RS 422/485 interface and the communication partner is an RS 232 interface, the RS 422/232 converter is tested and approved. Order number: 6AV6 671-8XE00-0AX0
2438
DF1 protocol with multi-point connection Point-to-point connection with DF1 protocol
Only point-to-point connections can be established with the DF1 protocol.
1) 2) 3)
Only RS 232 is possible for Panel PC and PC. A point-to-point connection to the SLC500, SLC501, and SLC502 PLCs via DF1 is not possible. For MicroLogix ML1500 LRP, Channel 1 (9-pin Sub D) is also possible.
Connecting cable
HMI panel interface used For connection to PLC5x For connection to SLC5/03, SLC5/04, SLC5/05 Allen-Bradley cable 1747-CP3 For connection to MicroLogix Allen-Bradley cable 1761-CBL-PM02
Refer to the relevant device manual to determine which HMI device interface is to be used. The cable pin assignments can be found in Section "Connecting cables for Allen-Bradley".
2439
DF1 protocol with multi-point connection via KF2 module DF1 protocol with multi-point connection via KF2 module to DH+ LAN
The use of a KF2 protocol interface module enables a connection to be made to PLCs in the DH+ LAN (Data Highway Plus Local Area Network).
Connecting cable
HMI panel interface used RS 232 9-pin RS 422 9-pin For connection to KF2 interface module Allen-Bradley cable 1784-CP10 and 25-pin socket/socket adapter 9-pin Sub D RS 422 connecting cable and 25-pin female/female adapter
Refer to the Allen-Bradley documentation for the cable connection from the PLCs to the DH+ data bus. Refer to the relevant device manual to determine which HMI device interface is to be used. The cable pin assignments can be found in Section "Connecting cables for Allen-Bradley".
2440
DF1 protocol with multi-point connection via KF3 module DF1 protocol with multi-point connection via KF3 module to DH485 LAN
1)
Connecting cable
HMI panel interface used For connection to KF3 interface module RS 232 9-pin Allen-Bradley cable 1784-CP10 and 25-pin socket/socket adapter
Refer to the relevant device manual to determine which HMI device interface is to be used. The cable pin assignments can be found in Section "Connecting cables for Allen-Bradley".
Connecting cables for Allen-Bradley DF1 Connecting cable 9-pin Sub D RS 422 for Allen-Bradley Connecting cable 9-pin Sub D RS 422
For interconnecting the HMI device (RS 422, 9-pin sub D) - PLC5x, KF2, KF3 You require an additional 25-pin, female / female adapter (gender changer) for interconnections with KF2 and KF3.
2441
Shield with large-area contact to housing at both ends, interconnected shield contacts Cable: 3 x 2 x 0.14 mm2, shielded, max. length 60 m
2442
Screen connected with housing over large area on both sides max. length 15 m
2443
Screen connected with housing over large area on both sides max. length 3 m
2444
Screen connected with housing over large area on both sides max. length 15 m
Performance features of communication Permitted data types for Allen-Bradley DF1 Permitted data types for Allen-Bradley DF1
The table lists the user data types that can be used when configuring tags and area pointers.
Data type ASCII Bool Int DInt UInt UDInt Real Operand type A
1)
N, R, C, T, B, S, I, O N, R, C, T, S N, D
2)
N, R, C, T, B, I, O, D N, D 2) N, F
1)
2445
Selectable depending on the selected CPU type. Only for PLC5 CPU type
Abbreviations
In WinCC, formats of the data types are abbreviated as follows: UNSIGNED INT = UInt UNSIGNED LONG = UDInt SIGNED INT = Int SIGNED LONG = DInt
2446
Addressing Addressing
The addressing is entered in the following order in the Allen-Bradley DF1 communication driver: Operand type File number Element number
2447
The address then appears in the following format without spaces: File type file number : Element number . Child element e.g. T8:2.ACC
Operand type
You have the following options under operand type: I O S B T C R N A D only for PLC5 CPU type
File number
Select the number between two limits under file number: Low limit High limit
2448
Child element
You can select a child element when you have selected one of the following data types: R C T
2449
Screens
The refresh rate of screens is determined by the type and volume of data to be visualized. Only configure short acquisition cycles for objects which actually require shorter refresh cycles. This procedure reduces update times.
Trends
The HMI device always updates all bit-triggered trends whose group bit is set in the "Trend transfer area". It resets the bits in the next cycle. The group bit in the PLC program can only be set again after the HMI device has reset all bits.
Job mailboxes
A high rate and volume of job mailboxes transferred may lead to overload in communication between the HMI device and the PLC. The HMI device confirms acceptance of the job mailbox by entering the value zero in the first data word of the job mailbox. The HMI device now processes the job for which it requires a certain time slice. It may take the HMI device some time to process a new job mailbox which is transferred in immediate succession to the job mailbox. The next job mailbox is only accepted if sufficient computing resources are available.
Data exchange Area pointers for Allen-Bradley Area pointers for connections using an Allen-Bradley communication driver
You use an area pointer to access a data area in the PLC. For more detailed information on area pointers and their configuration, refer to Section "Data exchange using area pointers".
2450
See also
Data exchange using area pointers (Page 2521)
Trends Trends
A trend is the graphical representation of one or more values from the PLC. The value is read out time-triggered for Basic Panels. For additional information see: Configuring trend displays for values from the PLC (Page 2027)
Time-triggered trends
The HMI device reads in the trend values cyclically at an interval specified in the configuration. Time-triggered trends are suitable for continuous curves, such as the operating temperature of a motor.
2451
Restrictions
Only tags whose "File type" is "N", "O", "I", "S" and "B" are allowed for use as a "trigger tag" for discrete alarms. These tags are only valid for the data types "Int" and "UInt".
Data types
For connections with an Allen-Bradley communication driver, the following data types are supported:
Communication drivers Allen-Bradley DF1 PLC SLC500, SLC501, SLC502, SLC503, SLC504, SLC505, PLC5, MicroLogix ControlLogix, CompactLogix, SLC, Micrologix Int, UInt Permitted data types Discrete alarms Analog alarms Int, UInt, Long, ULong, Real
Allen-Bradley EtherNet/IP
Int, UInt
2452
See also
Alarm system in WinCC (Page 2028)
2453
2454
Data exchange
Data is exchanged by means of tags or area pointers. Tags The PLC and the HMI device use process values for data exchange. You create tags in the configuration that point to addresses in the PLC. The HMI device reads the value from the defined address, and then displays it. The operator may also enter values on the HMI device, which are then written to the address in the PLC. Area pointers Area pointers are used to exchange specific data and are only set up when these data are used.
Requirements
A project is open. An HMI device has been created.
Procedure
1. Double-click the HMI device under "Devices" in the project tree. 2. Double-click the "Connections" item.
2455
2456
5. Select all necessary connection parameters for the interface in the Inspector window under "Parameters".
2457
2458
2459
2460
Connectable PLCs
Connections can be implemented for the following Mitsubishi PLCs:
Mitsubishi FX (PG protocol) PLC MELSEC FX1n, FX2n MELSEC FX3U, FX3UC, FX3G with communication module FX3U-ENET MELSEC System Q Q-series with the communication module QJ71E71-100 QnUDEH CPU with Ethernet interface onboard Yes No No No Yes Yes Mitsubishi MC TCP/IP
2461
Q PLCs Procedure
1. Click "Edit network parameters". 2. Select the network type: Ethernet The network number and the group / station number are not evaluated and can be freely assigned
2462
2463
Performance features of communication Permitted data types for Mitsubishi MC TCPI/IP Permitted data types
The table lists the data types that can be used when configuring tags and area pointers.
Data type 4-bit block 8-bit block 12-bit block 16-bit block 20-bit block 24-bit block 28-bit block 32-bit block Bool Operand type M, X, Y, B, F M, X, Y B, F M, X, Y B, F M, X, Y B, F M, X, Y B, F M, X, Y B, F M, X, Y B, F M, X, Y B, F M, D, X, Y B, F Length 1 byte 1 byte 2 bytes 2 bytes 4 bytes 4 bytes 4 bytes 4 bytes 1-bit
2464
1) 2)
The "String" and "Real" data types are not available for all CPUs. Operand types B, F and W are only available for CPU type "Q".
Note Note the following for write accesses: Tags can only be written if "Enable online changes" or "Enable write operations during RUN" was selected when parameterizing the Mitsubishi communication modules. For data type "Bool" in operand type "D", the entire word is written back to the PLC following a change to the specified bit. There is no check to determine whether any other bits in the word have changed. As a result, the PLC only has read access to the specified word. Note Array elements in I/O fields cannot be used in communication with a Mitsubishi PLC.
2465
Addresses for Mitsubishi MC TCP/IP Address areas for connections via Mitsubishi MC TCP/IP
The address area boundaries differ for the different series; refer to the Mitsubishi Computerlink manuals for this information. Examples of address area boundaries dependent on the CPU and communication format:
Name Output/Input Bit memory Data register Operand type Y/X M D Max. address FX3 Octal X/Y 0 - 267 M0 - M3071 and M8000 - M8255 D0 - 7999 D8000 - D8255 C0 - 255 T0 - 255 ---Max. address Q-Series HEX X/Y 0 - 7FF M/L/S 0 - 8191 D0 - 8191 D9000 - D9255 becomes SD1000 SD1255 C0 - 1023 T0 - 2047 Hex: W0 - FFF Hex: B0 - FFF F0 - 2047
C T W B F
2466
Screens
The refresh rate of screens is determined by the type and volume of data to be visualized. Only configure short acquisition cycles for objects which actually require shorter refresh cycles. This procedure reduces update times.
Trends
The HMI device always updates all bit-triggered trends whose group bit is set in the "Trend transfer area". It resets the bits in the next cycle. The group bit in the PLC program can only be set again after the HMI device has reset all bits.
Job mailboxes
A high rate and volume of job mailboxes transferred may lead to overload in communication between the HMI device and the PLC. The HMI device confirms acceptance of the job mailbox by entering the value zero in the first data word of the job mailbox. The HMI device now processes the job for which it requires a certain time slice. It may take the HMI device some time to process a new job mailbox which is transferred in immediate succession to the job mailbox. The next job mailbox is only accepted if sufficient computing resources are available.
2467
Requirements
A project is open. An HMI device has been created.
Procedure
1. Double-click the HMI device under "Devices" in the project tree. 2. Double-click the "Connections" item. 3. Double-click "<Add>" in the "Connections" editor.
2468
5. Select all necessary connection parameters for the interface in the Inspector window under "Parameters".
2469
2470
2471
Connectable PLCs
Connections can be implemented for the following Mitsubishi PLCs:
Mitsubishi FX (PG protocol) PLC MELSEC FX1n, FX2n MELSEC FX3U, FX3UC, FX3G with communication module FX3U-ENET MELSEC System Q Q-series with the communication module QJ71E71-100 QnUDEH CPU with Ethernet interface onboard Yes No No No Yes Yes Mitsubishi MC TCP/IP
Connecting cable
The following connecting cables are available to connect the HMI device to the PLC.
Interface to HMI device or adapter RS 232, 9-pin RS 422, 9-pin
1)
Mitsubishi Electric PLC via FX protocol FX1n, Fx2n, Mini DIN, 8pin Mitsubishi SC-09 1) Connecting cable RS422-2P
Since the Mitsubishi PLCs communicate via RS 422 as a standard, the Mitsubishi programming cable SC09 with integrated RS 422/RS 232 adaptor is necessary for connecting a HMI device via RS 232.
Note Applies only to RS 232: Cable length is restricted to 0.32 m. Refer to the relevant device manual to determine which HMI device interface is to be used.
2472
Connecting cables for Mitsubishi FX Connecting cable RS 422 2P, for Mitsubishi Connecting cable RS422-2P
Shield with large-area contact to housing at both ends Cable: 3 x 2 x 0.14 mm2, shielded, max. length 500 m
Performance features of communication Permitted data types for Mitsubishi FX Permitted data types
The table lists the data types that can be used when configuring tags and area pointers.
Data type 4-bit block 8-bit block 12-bit block 16-bit block 20-bit block 24-bit block 28-bit block 32-bit block Bool DWord Real String Word Operand type M, X, Y M, X, Y M, X, Y M, X, Y M, X, Y M, X, Y M, X, Y M, X, Y D, M, X, Y D, C-32 bit D D D, T, C-16 bit Length 1 byte 1 byte 2 bytes 2 bytes 4 bytes 4 bytes 4 bytes 4 bytes 1-bit 4 bytes 4 bytes 1 to 50 characters 2 bytes
2473
Note Note the following for write accesses: For data type "Bool" in operand type "D", the entire word is written back to the PLC following a change to the specified bit. There is no check to determine whether any other bits in the word have changed. As a result, the PLC only has read access to the specified word. Note Array elements in I/O fields cannot be used in communication with a Mitsubishi PLC.
2474
Screens
The refresh rate of screens is determined by the type and volume of data to be visualized. Only configure short acquisition cycles for objects which actually require shorter refresh cycles. This procedure reduces update times.
Trends
The HMI device always updates all bit-triggered trends whose group bit is set in the "Trend transfer area". It resets the bits in the next cycle. The group bit in the PLC program can only be set again after the HMI device has reset all bits.
Job mailboxes
A high rate and volume of job mailboxes transferred may lead to overload in communication between the HMI device and the PLC. The HMI device confirms acceptance of the job mailbox by entering the value zero in the first data word of the job mailbox. The HMI device now processes the job for which it requires a certain time slice. It may take the HMI device some time to process a new job mailbox which is transferred in immediate succession to the job mailbox. The next job mailbox is only accepted if sufficient computing resources are available.
2475
Data exchange Area pointers for Mitsubishi Area pointers for connections via Mitsubishi communication drivers
You use an area pointer to access a data area in the PLC. For more detailed information on area pointers and their configuration, refer to Section "Data exchange using area pointers".
Mitsubishi FX restrictions
You cannot use the D operand type for configuring area pointers.
See also
Data exchange using area pointers (Page 2521)
2476
Trends Trends
A trend is the graphical representation of one or more values from the PLC. The value is read out time-triggered for Basic Panels. For additional information see: Configuring trend displays for values from the PLC (Page 2027)
Time-triggered trends
The HMI device reads in the trend values cyclically at an interval specified in the configuration. Time-triggered trends are suitable for continuous curves, such as the operating temperature of a motor.
2477
Data types
For connections with a Mitsubishi communication driver, the following data types are supported:
PLC Discrete alarms FX1n, FX2n, FX3 series, QSeries, iQ-Series Word, Int 1) Permitted data types Analog alarms 4 bit-block, 8 bit-block, 12 bit-block, 16 bit-block, 20 bit-block, 24 bit-block, 28 bit-block, 32 bit-block, Word, DWord, Int 1), DInt 1), Real,
1)
Left byte 8 8 7 7
Right byte 0 0
Restrictions on alarms
Mitsubishi MC TCP/IP Only tags of operand type "D" and data types "Word" and "Int" are permitted as trigger tags for discrete alarms. You can use array tags (operand type: "D"; data types: "ARRAY [x..y] of Word" or "ARRAY [x..y] of Int") for discrete alarms. Mitsubishi FX Only tags of operand type "D" and data type "Word" are permitted as trigger tags for discrete alarms. You can use array tags (operand type "D"; data type "ARRAY [x..y] of Word") for discrete alarms."
2478
2479
Data exchange
Data is exchanged by means of tags or area pointers. Tags The PLC and the HMI device use process values for data exchange. You create tags in the configuration that point to addresses in the PLC. The HMI device reads the value from the defined address, and then displays it. The operator may also enter values on the HMI device, which are then written to the address in the PLC. Area pointers Area pointers are used to exchange specific data and are only set up when these data are used.
Modicon Modbus TCP/IP Configuring a connection via Modicon Modbus TCP/IP Introduction
You configure a connection to one of the PLCs with Modicon Modbus TCP/IP communication driver in the "Connections" editor of the HMI device.
2480
Requirements
A project is open. An HMI device has been created.
Procedure
1. Double-click the HMI device under "Devices" in the project tree. 2. Double-click the "Connections" item. 3. Double-click "<Add>" in the "Connections" editor.
2481
5. Select all necessary connection parameters for the interface in the Inspector window under "Parameters".
2482
2483
2484
Connecting HMI device to PLC Connections via Modicon Modbus TCP/IP Connection
The HMI device can be connected to the Modicon Modbus PLC using the following components: Existing Ethernet network that also contains the PLCs Cross-over Ethernet cable connected directly to the Ethernet interface of the CPU or the communication module The connection of the HMI device to a Modicon Modbus PLC is limited primarily to the physical connection of the HMI device. Special blocks for the connection are not required in the PLC. Note Timeout response with TCP/IP (Ethernet) Due to the use of the TCP/IP protocol, the breakdown of a connection is detected at the earliest after approximately one minute. Communication failure cannot be reliably detected if no tags are requested, for example, no output tags in the current screen. Configure area pointer coordination for each PLC. This setting ensures that a communication failure is recognized after approximately two minutes, even in the aforementioned scenario.
2485
Restrictions
The coupling of the HMI device to PLCs of other manufacturers who offer a Modbus TCP/IP interface is not system-tested and thus, not enabled. However, if another PLC is to be used, observe the following instructions: Use the following CPU types, because these operate without address offset and in the usual bit count manner. Unity, PL7: Premium, Micro, Quantum, M340 The following function codes are used for the respective data areas:
Reading function codes 01 02 03 ReadCoilStatus ReadInputStatus ReadHoldingRegisters Address range 0x / %M 1x / %I 4x / %MW DIGITAL_OUT DIGITAL_IN USERDATA
2486
Address range 4x / %MW 4x / %MW 0x / %M 0x / %M 6x / USERDATA Single USERDATA Multiple DIGITAL_OUT with BIT DIGITAL_OUT with 16 BIT GROUP EXTENDEDMEMORY (not for all CPUs)
16 (10Hex)
1)
15 (0FHex) 21 (15Hex)
1)
Connectable PLCs
Connections can be implemented for the following Modicon Modbus PLCs:
Modicon Modbus PLC Modicon Modbus RTU 2) TSX Compact TSX Quantum Momentum Premium Micro M340 20X0 (without 2010)
1) 2)
Only via Ethernet TCP/IP Modbus Plus Bridge Communication via RS 232 is tested and enabled for the PLC. In the HMIs that only have a RS 422/485 interface, the RS 422/232 converter with the order number 6AV6 671-8XE00-0AX0 was tested and enabled.
2487
Performance features of communication Permissible data types for Modicon Modbus TCP/IP Permitted data types
The table lists the data types that can be used when configuring tags and area pointers. Note If you change the Modicon Modbus RTU communication driver to Modicon Modbus TCP/IP, the string in the "String" data type may be different.
Permitted data types for CPU type "Unity, PLC: Premium, Micro, Quantum M340"
Data type +/- Double +/- Int 16-bit group ASCII Bit Double Float Int Operand type %MW %MW, %IW %MW, %I %MW %MW, %IW, %M, %I %MW %MW %MW, %IW Length 4 bytes 2 bytes 2 bytes 0 to 80 characters 1-bit 4 bytes 4 bytes 2 bytes
Note The ranges "%I" and "%IW" are not supported for the following CPU types: Premium Micro M340
Permitted data types for CPU type "Concept, ProWORX: Compact, Quantum, Momentum"
Data type +/- Double +/- Int 16-bit group ASCII Bit Operand type 4x, 6x 3x, 4x, 6x 0x, 1x 4x, 6x 0x, 1x, 3x, 4x, 6x Length 4 bytes 2 bytes 2 bytes 0 to 80 characters 1-bit
2488
2489
Screens
The refresh rate of screens is determined by the type and volume of data to be visualized. Only configure short acquisition cycles for objects which actually require shorter refresh cycles. This procedure reduces update times.
2490
Trends
The HMI device always updates all bit-triggered trends whose group bit is set in the "Trend transfer area". It resets the bits in the next cycle. The group bit in the PLC program can only be set again after the HMI device has reset all bits.
Job mailboxes
A high rate and volume of job mailboxes transferred may lead to overload in communication between the HMI device and the PLC. The HMI device confirms acceptance of the job mailbox by entering the value zero in the first data word of the job mailbox. The HMI device now processes the job for which it requires a certain time slice. It may take the HMI device some time to process a new job mailbox which is transferred in immediate succession to the job mailbox. The next job mailbox is only accepted if sufficient computing resources are available.
Modicon Modbus RTU Configuring a connection via Modicon Modbus RTU Introduction
You configure a connection to a PLC with a Modicon Modbus RTU communication driver in the "Connections" editor of the HMI device. The interfaces are named differently depending on the HMI device.
Requirements
A project is open. An HMI device has been created.
Procedure
1. Double-click the HMI device under "Devices" in the project tree. 2. Double-click the "Connections" item.
2491
2492
5. Select all necessary connection parameters for the interface in the Inspector window under "Parameters".
2493
2494
Connecting HMI device to PLC Connections via Modicon Modbus RTU Connection
Connect the HMI device to the Modicon Modbus RTU interface of the Modicon Modbus RTU slave. The connection of the HMI device to Modicon is limited primarily to the physical connection of the HMI device. Special blocks for the connection are not required in the PLC.
Connection cable
The following connecting cables are available to connect the HMI device to Modicon Modbus.
Modicon PLC directly via Modbus interface (RS232) 9-pin Sub D male connector PP1 Via MB Bridge (RS 232) PP1 directly via Modbus interface (RS232) 8-pin RJ45 connector PP2
The cable pin assignments can be found in Section "Connecting cables for Modicon Modbus RTU".
2495
Restrictions
The connection of the HMI device to PLCs of other manufacturers which offer a Modicon Modbus interface is not system-tested and therefore not approved. If you use another PLC nevertheless, observe the following information: These drivers only work for tags with the bit counting method typical for Modicon PLCs from left (bit1 = most significant bit) to right (bit16 = least significant bit in data type INT). The address offset displayed in the configuring is subtracted at protocol level in the message frame. E.g. in Holding Register 4x the offset "40001". The configured address "40006" therefore becomes address "5" in the message frame. The address (e.g. "5") transferred in the message frame is transformed to the PLC-specific address range in the different Non-Modicon PLCs. A reply message frame without "ExceptionCode" is expected within 500 ms. The following function codes are used for the respective data areas:
Reading function codes 01 02 03 04 20 (14Hex) ReadCoilStatus ReadInputStatus ReadHoldingRegisters ReadInputRegisters ReadGeneralReference Address range 0x 1x 4x 3x 6x DIGITAL_OUT DIGITAL_IN USERDATA ANALOG_IN EXTENDEDMEMORY (not for all CPUs)
2496
Connectable PLCs
Connections can be implemented for the following Modicon Modbus PLCs:
Modicon Modbus PLC Modicon Modbus RTU TSX Compact TSX Quantum Momentum Premium Micro M340 20x0 (without 2010)
1) 2)
2)
Only via Ethernet TCP/IP-Modbus Plus Bridge Communication via RS 232 is tested and enabled for the PLC. In the HMI devices which only have an RS 422/485 interface, the RS 422/232 converter with the order number 6AV6 671-8XE00-0AX0 was tested and approved.
2497
Connecting cables for Modicon Modbus RTU Connecting cable PP1, RS-232, for Modicon Point-to-point cable 1: PLC > PC ...
2498
Connecting cable PP2, RS-232, for Modicon Point-to-point cable 2: PLC (TSX Compact) > PC...
2499
Performance features of communication Permitted data types for Modicon Modbus RTU Permitted data types
The table lists the data types that can be used when configuring tags and area pointers.
Data type +/- Double +/- Int 16-bit group ASCII Bit 1) Double Float Int
1)
Operand type 4x, 6x 3x, 4x, 6x 0x, 1x 4x, 6x 0x, 1x, 3x, 4x, 6x 4x, 6x 4x, 6x 3x, 4x, 6x
Note the following for write accesses: For data type "Bit" with the operand types "4x" and "6x", the entire word is written back to the PLC following a change to the specified bit. There is no check to determine whether any other bits in the word have changed. As a result, the PLC only has read access to the specified word.
The usual bit counting method (16 LSB - 1 MSB) in the following CPU types is only used in the "HMI tags" editor with the selected "Bit" data type: Concept ProWORX: Compact, Quantum The following bit location assignment applies:
Left byte Counting with tags 1 2 3 4 5 6 7 8 9 Right byte 10 11 12 13 14 15 16
2500
2501
Screens
The refresh rate of screens is determined by the type and volume of data to be visualized. Only configure short acquisition cycles for objects which actually require shorter refresh cycles. This procedure reduces update times.
Trends
The HMI device always updates all bit-triggered trends whose group bit is set in the "Trend transfer area". It resets the bits in the next cycle. The group bit in the PLC program can only be set again after the HMI device has reset all bits.
Job mailboxes
A high rate and volume of job mailboxes transferred may lead to overload in communication between the HMI device and the PLC. The HMI device confirms acceptance of the job mailbox by entering the value zero in the first data word of the job mailbox. The HMI device now processes the job for which it requires a certain time slice. It may take the HMI device some time to process a new job mailbox which is transferred in immediate succession to the job mailbox. The next job mailbox is only accepted if sufficient computing resources are available.
Data exchange Area pointers for Modicon Modbus Area pointers for connections via Modicon Modbus communication drivers
You use an area pointer to access a data area in the PLC. For more detailed information on area pointers and their configuration, refer to Section "Data exchange using area pointers (Page 2521)".
2502
Trends Trends
A trend is the graphical representation of one or more values from the PLC. The value is read out time-triggered for Basic Panels. For additional information see: Configuring trend displays for values from the PLC (Page 2027)
Time-triggered trends
The HMI device reads in the trend values cyclically at an interval specified in the configuration. Time-triggered trends are suitable for continuous curves, such as the operating temperature of a motor.
2503
Data types
For connections with a Modicon Modbus communication driver, the following data types are supported:
PLC All Modicon series Int, +/-Int Permitted data types Discrete alarms Analog alarms 16 Bit Group, Int, +/-Int, Double, +/-Double, Float
2504
2505
Data exchange
Data is exchanged by means of tags or area pointers. Tags The PLC and the HMI device use process values for data exchange. You create tags in the configuration that point to addresses in the PLC. The HMI device reads the value from the defined address, and then displays it. The operator may also enter values on the HMI device, which are then written to the address in the PLC. Area pointers Area pointers are used to exchange specific data and are only set up when these data are used.
2506
Omron Host Link Configuring a connection via Omron Host Link Introduction
You configure a connection to a PLC with an Omron Host Link communication driver in the "Connections" editor of the HMI device. Note Connection with Omron Host Link A connection will not automatically be established when runtime is started if you have configured a connection via Omron. A tag which is in the valid PLC memory area must be configured in the runtime start screen. The connection will otherwise only be established once a corresponding screen has been selected. This tag will be accessed when runtime is started and a connection will then be established. The interfaces are named differently depending on the HMI device.
Requirements
A project is open. An HMI device has been created.
Procedure
1. Double-click the HMI device under "Devices" in the project tree. 2. Double-click the "Connections" item.
2507
2508
5. Select all necessary connection parameters for the interface in the inspector window under "Parameters".
2509
2510
Connecting HMI device to PLC Connections via Omron Host Link Connection
The connection of the HMI device to an OMRON PLC is limited primarily to the physical connection of the HMI device. Special blocks for the connection are not required in the PLC.
Connection cable
The following connecting cables are available to connect the HMI device to an Omron PLC.
Interface to the HMI device RS232, 9-pin Omron PLC RS232, 9-pin PP1 RS232 I/O port Programming cable (standard cable of Omron) RS422, 9-pin RS422, terminals/ pins
PP2
Refer to the relevant device manual to determine which HMI device interface is to be used.
2511
Multipoint connection
A multipoint connection to the up to 4 approved OMRON PLCs in a RS422-four-wire connection can be implemented with communication modules on the PLCs and is system-tested and approved by Siemens AG. Note The HMI device can only be operated as a master. Exactly one master is possible in the RS422-four-wire-Multidrop connection.
Connecting cable Connecting cable MP1, RS-232, over converter, for Omron Multipoint cable 1: MP/TP/PC > PLC
1)
Connecting cable MP2, RS-422, for Omron Multipoint cable 2: RS422, MP/TP/PC > SPS_
2512
Connecting cable PP1, RS-232, for Omron Point-to-point cable PP1, PC/TP/OP - PLC
Connecting cable PP2, RS-422, for Omron Point-to-point cable PP2, RS-422
Performance features of communication Permissible data types for Omron Host Link Permitted data types
The table lists the data types that can be used when configuring tags and area pointers.
Data type Bool Byte DInt Int Real String UDInt UInt Operand type I/O, HR, AR, LR, DM, T/ C bit, CPU status CPU type HR, AR, LR, DM I/O, HR, AR, LR, DM, T/ C Val HR, DM HR, AR, LR, DM HR, AR, LR, DM I/O, HR, AR, LR, DM, T/ C Val Length 1-bit 1 byte 4 bytes 2 bytes 4 bytes 0 to 80 characters 4 bytes 2 bytes
2513
Note Read and write operations of all data areas in the OMRON PLC can only be reliably carried out in "STOP" or "MONITOR" mode. "I/O" refers either to the IR/SR area or the CIO area depending on the PLC series. The operand types "LR", "HR" and "AR" are not available in all PLC series. Note Note the following for write accesses: For the "Bool" data type with the operand types "I/O", "HR", "AR", "LR" and "DM", the entire word is written back into the PLC when the specified bit is changed. There is no check to determine whether any other bits in the word have changed. As a result, the PLC only has read access to the specified word.
Operand type old PLC CPU Status I/O HR AR LR DM T/C CPU type
Operand type CS and CJ PLC CPU Status CIO H Range 0-511 A n/a 1) D T/C CPU type
1)
You do not get an error message when you read or write the LR area in the following PLCs CS CJ CP
2514
2515
Screens
The refresh rate of screens is determined by the type and volume of data to be visualized. Only configure short acquisition cycles for objects which actually require shorter refresh cycles. This procedure reduces update times.
2516
Trends
The HMI device always updates all bit-triggered trends whose group bit is set in the "Trend transfer area". It resets the bits in the next cycle. The group bit in the PLC program can only be set again after the HMI device has reset all bits.
Job mailboxes
A high rate and volume of job mailboxes transferred may lead to overload in communication between the HMI device and the PLC. The HMI device confirms acceptance of the job mailbox by entering the value zero in the first data word of the job mailbox. The HMI device now processes the job for which it requires a certain time slice. It may take the HMI device some time to process a new job mailbox which is transferred in immediate succession to the job mailbox. The next job mailbox is only accepted if sufficient computing resources are available.
Data exchange Area pointers for Omron Area pointers in connections via Omron communication drivers
You use an area pointer to access a data area in the PLC. For more detailed information on area pointers and their configuration, refer to Section: "Data exchange using area pointers".
See also
Data exchange using area pointers (Page 2521)
Trends Trends
A trend is the graphical representation of one or more values from the PLC. The value is read out time-triggered for Basic Panels. For additional information see: Configuring trend displays for values from the PLC (Page 2027)
2517
Time-triggered trends
The HMI device reads in the trend values cyclically at an interval specified in the configuration. Time-triggered trends are suitable for continuous curves, such as the operating temperature of a motor.
Data types
For connections with an Omron communication driver, the following data types are supported:
PLC CP1, CJ1, CJ2, CS1, CPM Uint, int Permitted data types Discrete alarms Analog alarms UInt, Int, UDInt, DInt
2518
Left byte 8 8 7 7
Right byte 0 0
Only tags for the "DM", "I/O", "HR", "AR", and "LR" file types are allowed for use as a trigger tag for discrete alarms.
2519
2520
10.8.8.4
Active Enables the area pointer. Pointer name Name of the area pointer specified by WinCC. PLC tag Here you select the PLC tag or the tag array that you have configured as the data area for the area pointer. Address No address is entered into this field because of the symbolic access. Length WinCC specifies the length of the area pointer.
2521
Use
Configure and enable the area pointer in "Communication > Connections" before you put it into use. You can create only one instance of the "Screen number" area pointer and only on one PLC. The screen number is always transferred to the PLC when a new screen is activated or when the focus within a screen changes from one screen object to another.
2522
Structure
The area pointer is a data area in the memory of the PLC with a fixed length of 5 words.
15 1. word 2. word 3. word 4th word 5. word 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Current screen type Current screen number Reserved Current field number Reserved
Current screen type "1" for root screen or "4" for permanent window Current screen number 1 to 32767 Current field number 1 to 32767
2523
Note Note that when you enter the year, values 80 to 99 result in years 1980 through 1999 and the values 0 to 29result in the years 2000 through 2029.
n+4 1) n+5
1)
Reserved Reserved
Reserved Reserved
1)
The two data words must exist in the data area to ensure that the data format matches WinCC and to avoid reading false information.
Note Note that when you enter the year, values 80 to 99 result in years 1980 through 1999 and the values 0 to 29result in the years 2000 through 2029.
2524
Use
Note The HMI device always writes the entire coordination area when updating the area pointer. The control program may not make changes to the coordination area for this reason.
Startup bit
The startup bit is set briefly to "0" by the HMI device during startup. It sets the bit permanently to "1" when startup is completed.
Operating mode
The operating mode bit is set to 1 as soon as the user switches the HMI device offline. The state of the operating mode bit is "0" during normal operation of the HMI device. You can determine the current operating mode of the HMI device by reading this bit.
Life bit
The HMI device inverts the life bit at intervals of approximately one second. You can check whether or not the connection to the HMI device is still up by querying this bit in the control program.
2525
Use
To use this area pointer, set up the following during the configuration: Define the version of configuration. Possible values between 1 and 255. You enter the version in the editor "Runtime settings > General" in the "Identification" area. Data address of the value for the version that is stored in the PLC: You enter the data address in the editor "Communication > Connections".
Connection failure
A connection failure to a device on which the "project ID" area pointer is configured results in all the other connections in the project being switched to "offline". This behavior has the following prerequisites: You have configured several connections in a project. You are using the "project ID" area pointer in at least one connection. Causes which may set connections "offline": The PLC is not available. The connection has been switched offline in the engineering system.
2526
Data structure
The first word of the job mailbox contains the job number. Depending on the job mailbox, up to three parameters can be transferred.
Word n+0 n+1 n+2 n+3 Left byte 0 Parameter 1 Parameter 2 Parameter 3 Right byte Job number
The HMI device evaluates the job mailbox if the first word of this job is not equal to zero. This means that the parameters must be entered in the job mailbox first, followed by the job number. When the HMI device accepts the job mailbox, the first word is set to 0 again. The execution of the job mailbox is generally not completed at this point in time.
Job mailboxes
All job mailboxes and their parameters are listed below. The "No." column contains the job number of the job mailbox. Job mailboxes can only be triggered by the PLC when the HMI device is online. Note Please note that not all HMI devices support job mailboxes.
No .
Function
14 Setting the time (BCD coded) Parameter 1 Parameter 2 Parameter 3 15 Parameter 1 Left byte: Right byte: hours (0-23) Left byte: minutes (0-59) Right byte: seconds (0-59) Left byte: Right byte: weekday (1-7: Sunday-Saturday) Left byte: day (1-31) Right byte: month (1-12) Left byte: year
Logs the user on with the name "PLC user" at the HMI device with the group number transferred in Parameter 1. The logon is possible only when the transferred group number exists in the project. Parameter 1 Parameter 2, 3 Group number 1 to 255 -
2527
14 Setting the time (BCD coded) User logoff Logs off the current user. (The function corresponds to the "logoff" system function) Parameter 1, 2, 3 40 Transfer date/time to PLC (in the S7 format DATE_AND_TIME) An interval of at least 5 seconds must be maintained between two successive jobs to prevent overload of the HMI device. Parameter 1, 2, 3 41 Transfer date/time to PLC (In OP/MP format) An interval of at least 5 seconds must be maintained between successive jobs in order to prevent overload of the HMI device. Parameter 1, 2, 3 46 Update tags Causes the HMI device to read the current value of the tagsfrom the PLC whose update ID matches the value transferred in parameter 1. (Function corresponds to the "UpdateTag" system function.) Parameter 1 49 Delete alarm buffer Deletes all analog alarms and discrete alarms of the "Warnings" class from the alarm buffer. Parameter 1, 2, 3 50 Delete alarm buffer Deletes all analog alarms and discrete alarms of the "Errors" class from the alarm buffer. Parameter 1, 2, 3 51 Screen selection Parameter 1 Parameter 2 Parameter 3 69 Read data record from PLC Parameter 1 Parameter 2 Parameter 3 70 Write data record to PLC Parameter 1 Parameter 2 Parameter 3
1)
1)
1 - 100
Screen number Field number Recipe number (1-999) Data record number (1-65535) 0: Do not overwrite existing data record 1: Overwrite existing data record Recipe number (1-999) Data record number (1-65535) -
OP 73, OP 77A and TP 177A HMI devices also execute the "Screen selection" job mailbox if the on-screen keyboard is active.
2528
2529
Reading values
When a read job is triggered, the values are read from the PLC addresses and transferred to the HMI device. Triggering by the operator in the recipe view: The values are downloaded to the HMI device. You can then process, edit, or save these values, for example. Triggering by a function or job mailbox: The values are saved immediately to the data volume.
Writing values
When a write job is triggered, the values are written to the PLC addresses. Triggering by the operator in the recipe view: The current values are written to the PLC. Triggering by a function or job mailbox: The current values are written to the PLC from the data medium.
Application
Synchronous data record transfer can be a useful solution, for example, when: The PLC is the "active partner" in the transfer of data records. The PLC evaluates the information about the recipe number and data record number. The transfer of data records is triggered by means of a Job mailbox.
Requirements
In order to synchronize transfer of data records between the HMI device and the PLC, the following requirements must be met during configuration: An area pointer has been set up: "Communication > Connections" editor in "Area pointer". The PLC with which the HMI device synchronizes transfer of data records is specified in the recipe: "Recipes" editor in the inspector window the option "Coordinated transfer of data records" under "General > Synchronization > Settings"
2530
Status The status word (word 4) can adopt the following values:
Value Decimal 0 2 4 12 Binary 0000 0000 0000 0010 0000 0100 0000 1100 Transfer permitted, data record free Transferring. Transfer completed without error Transfer completed with error Meaning
Sequence of a transfer started by the operator in the recipe display Reading from the PLC started by the operator in the recipe view
Step 1 2 Yes The HMI device enters the recipe number to be read and the status "Transferring" in the data record and sets the data record number to 0. The HMI device reads the values from the PLC and displays them in the recipe view. If the recipes have synchronized tags, the values from the PLC are also written to the tags. 4 5 The HMI device sets the status "Transfer completed." The control program must reset the status word to zero in order to enable further transfers. Action Check: Status word = 0? No Abort with system event.
2531
Note The status word may only be set by the HMI device. The PLC may only reset the status word to zero. Note The PLC may only evaluate the recipe and data record numbers when data inconsistency is detected if one of the conditions outlined below has been met: The data mailbox status is set to "Transfer completed". The data mailbox status is set to "Transfer completed with error".
2532
Sequence when reading from the PLC with job mailbox "PLC DAT" (no. 69)
Step 1 2 3 4 Yes The HMI device enters the recipe and data record number specified in the job and the status "Transferring" in the data record. The HMI device reads the values from the PLC and saves these to the data record defined in the job mailbox. If "Overwrite" was selected in the job, an existing data record is overwritten without any prompt for confirmation. The HMI device sets the status "Transfer completed." If "Do not overwrite" was selected in the job, and the data record already exists, the HMI device aborts the job and enters 0000 1100 in the status word of the data record. 5 The control program must reset the status word to zero in order to enable further transfers. Action Check: Status word = 0? No Abort without return message.
Sequence of writing to the PLC with job mailbox "DAT PLC" (no. 70)
Step 1 2 3 4 5 Yes The HMI device enters the recipe and data record number specified in the job and the status "Transferring" in the data record. The HMI device fetches the values of the data record specified in the function from the data medium and writes the values to the PLC. The HMI device sets the status "Transfer completed." The control program can now evaluate the transferred data. The control program must reset the status word to zero in order to enable further transfers. Action Check: Status word = 0? No Abort without return message.
2533
Sequence of the transfer when triggered by a configured function Reading from the PLC using a configured function
Step 1 2 Yes The HMI device enters the recipe and data record number specified in the function and the status "Transferring" in the data record. The HMI device reads the values from the PLC and stores them in the data record specified in the function. If "Yes" was selected for the "Overwrite" function, an existing data record is overwritten without any prompt for confirmation. The HMI device sets the status "Transfer completed." If "No" was selected for the "Overwrite" function and the data record already exists, the HMI device aborts the job and enters 0000 1100 in the status word of the data record. 5 The control program must reset the status word to zero in order to enable further transfers. Action Check: Status word = 0? No Abort with system event.
3 4
4 5
Possible causes of error when transferring data records Possible causes of error
The section below shows possible error causes which lead to the cancellation of data record transfer: Tag address not set up on the PLC Overwriting data records not possible
STEP 7 Basic V11.0 SP2 System Manual, 12/2011,
2534
10.9
10.9.1
Introduction
The HMI device wizard will automatically start when you create a new HMI device in your project.
2535
10.9.2
10.9.2.1
Introduction
WinCC enables you to export data from a project and import it into another project. You export or import the following project data:
2536
See also
Exporting alarms (Page 2541) Exporting tags (Page 2549) Exporting text lists (Page 2554)
2537
10.9.2.2
Requirements
The WinCC project for the export is open. Recipes have been created in a project. The "Recipes" editor is open.
Exporting recipes
1. In the "Recipes" editor, select the recipe with the data records you want to export. . 2. Click The "Export" dialog box opens.
The selected recipe is shown under "Recipe selection". 3. Under "Content selection", specify if all or only selected data records are to be exported. 4. Under "File selection", specify the file in which the recipe data is to be stored. 5. Specify the list separator and decimal separator under "Data separation". 6. Click "Export." The export will start.
STEP 7 Basic V11.0 SP2 System Manual, 12/2011,
2538
Result
The exported data has been written to a CSV file. The CSV file will be stored in the specified directory.
See also
Exporting alarms (Page 2541) Importing and exporting project data (Page 2536) Exporting tags (Page 2549) Exporting text lists (Page 2554)
Requirements
A CSV file containing at least one recipe has been created. The WinCC project for the import is open. The "Recipes" editor is open with at least one recipe.
2539
Importing a recipe
1. In the "Recipes" editor, select the recipe with the data records you want to import. . 2. Click The "Import" dialog box opens.
The selected recipe is shown under "Recipe selection". 3. Select the file you want to import under "File selection". 4. Under "Strategy", specify if existing data records should be overwritten by records of the same name. 5. Under "Data separation", select the list separator and the decimal separator to use in the CSV file. 6. Click "Import". The import will start.
Result
The data records are created in the selected recipe. Depending on the setting for "Strategy", existing data records are overwritten by records with the same name from the CSV file. Existing data records with the same name will also be imported from the CSV file if you deactivate the "Overwrite existing data records" option.
2540
ID of the language
Use the "Windows language ID" in decimal notation, e.g. "1033" for English. Additional information is available in the documentation for the Windows operating system.
See also
Exporting recipes (Page 2538)
10.9.2.3
2541
Requirements
The WinCC project for the export is open. Alarms have been created in the project. The "HMI alarms" editor is open.
Exporting alarms
button in "Discrete alarms" or "Analog alarms". 1. Click the The "Export" dialog box opens.
2. Click the "..." button and specify in which file the data are saved. 3. Specify whether you want to export "Disrete alarms" or "Analog alarms". 4. Click "Export". The export will start.
Result
The exported data has been written to an xlsx file. The xlsx file will be stored in the specified folder.
See also
Importing alarms (Page 2543) Format of the analog alarm data (Page 2544) Format of the discrete alarm data (Page 2547) Exporting recipes (Page 2538) Exporting tags (Page 2549) Importing and exporting project data (Page 2536)
2542
Requirements
An xlsx file with alarms has been created. The structure of the xlsx file meets the requirements. The WinCC project for the import is open. The "HMI alarms" editor is open.
Importing alarms
1. Click the button in "Discrete alarms" or "Analog alarms". The "Import" dialog box opens.
2. Click the "..." button and select the file that you want to import. 3. Click on the "Import" button. The import will start. A progress bar indicates the progress of the import operation.
Result
The corresponding alarms including alarm texts are created in WinCC on the basis of the import data. Alarms relating to the import operation are displayed in the output window. A log file is saved in the source directory of the import files. The log file has the same name as the respective import file but with the "*.xml" extension. Check when importing the data whether there are any links to objects, for example, dynamic parameters such as tags. If an object with the same name already exists, the existing object is used. If no object of the same name yet exists, create an object with the relevant name or create a new link.
2543
Note The syntax of the import file is checked during xlsx file import. The meaning of the properties or dependencies between the properties is not checked. It is possible to assign a trigger tag of an incorrect type, such as string, to an alarm. An error will be reported during compilation.
See also
Exporting alarms (Page 2541)
2544
Table 10-13 Meaning of the entries List entry ID Meaning The alarm number is used to reference an alarm. The alarm number is unique. Alarms with identical alarm numbers are overwritten during import. An alarm without an existing alarm number is created. Name of the analog alarm Displays the alarm text. The field designation contains a language ID. Alarm texts must be assigned a language ID for import. An expression with a reference ID will be added to the alarm text if the text has a dynamic parameter. Example: text <field ref="0" />. Use the ID to assign dynamic parameters to alarm texts. FeldInfo Specifies whether the alarm text contains dynamic parameters. The settings are separated by a semicolon ";". Example of dynamic parameters: Tag: <ref id = 0; type = AlarmTag; Tag = Tag1; DisplayType = Decimal; Length = 5;> Text list: <ref id = 1; type = CommonTextList; TextList = Textlist1; Tag = tag 2; Length = 5;> Class The class of an alarm determines whether or not the alarm must be acknowledged. It can also be used to determine how the alarm appears when it is displayed on the HMI device. The alarm class also determines whether and where the corresponding alarm will be logged. Indicates the allocation to an alarm group. If an alarm belongs to a group with other alarms, it can be acknowledged together with these alarms of the same group in a single operation. Specifies the tag monitored for limit value violation. Specifies the delay time. The alarm is not triggered until the duration of the limit value violation equals the specified delay time.
Group
2545
Table 10-14 Meaning of the entries List entry Alarm ID Meaning Alarm number The alarm number is used to reference an alarm. The alarm number is unique. Alarms with identical alarm numbers are overwritten during import. An alarm without an existing alarm number is created. Limit mode Limit type Limit value Trigger mode Indicates the method used for monitoring the limit value. Specifies the limit that will be monitored. Both a tag and a constant can be used as limit value. Limit value Indicates the tag or constant monitored for limit violation.
2546
Note "No value" in the table Entries in the table which have the value "No value" delete the corresponding values in an existing alarm of the same name.
See also
Exporting alarms (Page 2541)
2547
Table 10-15 Meaning of the entries List entry ID Meaning The alarm number is used to reference an alarm. The alarm number is unique. Alarms with identical alarm numbers are overwritten during import. An alarm without an existing alarm number is created. Name of the analog alarm Displays the alarm text. The field designation contains a language ID. For import, a language ID must be assigned to alarm text. An expression with a reference ID will be added to the alarm text if the text has a dynamic parameter. Example: text <field ref="0" />. Use the ID to assign dynamic parameters to alarm texts. FeldInfo Specifies whether the alarm text contains dynamic parameters. The settings are separated by a semicolon ";". Example of dynamic parameters: Tag: <ref id = 0; type = AlarmTag; Tag = Tag1; DisplayType = Decimal; Length = 5;> Text list: <ref id = 1; type = CommonTextList; TextList = Textlist1; Tag = tag 2; Length = 5;> Class The class of an alarm determines whether or not the alarm must be acknowledged. It can also be used to determine how the alarm appears when it is displayed on the HMI device. The alarm class also determines whether and where the corresponding alarm will be logged. Indicates the allocation to an alarm group. If an alarm belongs to a group with other alarms, it can be acknowledged together with these alarms of the same group in a single operation. Specifies the tag containing the bit that triggers the alarm. Specifies the number of the bit that triggers the alarm. Specifies the tag containing the bit that is set by the operator upon acknowledgment. Only available if the selected alarm class requires alarm acknowledgment. Specifies the number of the bit that is set when the operator acknowledges the alarm.
Group
Acknowledgment bit
2548
PLC acknowledgment bit Delay time value Delay time unit Report
Note "No value" in the table Entries in the table which have the value "No value" delete the corresponding values in an existing alarm of the same name.
See also
Exporting alarms (Page 2541)
10.9.2.4
Requirements
The WinCC project for the export is open. Tags have been created in the project. The "HMI tags" editor is open.
2549
Exporting tags
button in the "HMI Tags" tab. 1. Click on the The "Export" dialog box opens.
2. Click the "..." button and specify in which file the data are saved. 3. Click "Export". The export will start.
Result
The exported data has been written to an xlsx file. The xlsx file will be stored in the specified folder.
See also
Importing tags (Page 2550) Exporting alarms (Page 2541) Importing and exporting project data (Page 2536) Exporting text lists (Page 2554) Exporting recipes (Page 2538) Format of the tag data (Page 2551)
Requirements
An xlsx file with tags has been created. The structure of the xlsx file meets the requirements. The WinCC project for the import is open. The "HMI tags" editor is open.
2550
Importing tags
1. Click on the button. The "Import" dialog box opens.
2. Click the "..." button and select the file that you want to import. 3. Click on the "Import" button. The import will start.
Result
The relevant tags have been created in WinCC. Alarms relating to the import operation are displayed in the output window. A log file is saved in the source directory of the import files. The log file has the same name as the respective import file but with the "*.xml" extension. Check when importing the data whether there are any links to objects, for example, dynamic parameters such as tags. If an object with the same name already exists, the existing object is used. If no object of the same name yet exists, create an object with the relevant name or create a new link. Note The syntax of the import file is checked during xlsx file import. The meaning of the properties or dependencies between the properties is not checked. It is possible to assign a tag a trigger tag of the wrong type, for example, string. An error will be reported during compilation.
See also
Exporting tags (Page 2549)
2551
Table 10-16 Meaning of the entries List entry Name Path PLC Tag Connection Data type Meaning Indicates the configured name of an HMI tag. Specifies which folders in the project tree contain the tag. The folder structure is represented by "\" : "FolderName1\FolderName2\TagName". Indicates whether the tag is linked to a PLC tag. Indicates the name of the connection to the PLC. Specifies the data type of a tag. The data types allowed depend on the communication driver being used. See the "Communication" section of the documentation for additional information on the data types permitted for the various communication drivers. Specifies the length of the tag. This entry is only useful for data types with a dynamic length such as strings; it is left empty for all other data types.
Length
2552
2553
Table 10-17 Meaning of the entries List entry Name Index Multiplex Tag Meaning Indicates the configured name of an HMI tag which uses indirect addressing. The HMI tag must be available in the "HMI Tags" worksheet. Shows the value which governs which tag is selected. Displays the tag from the tag list corresponding to the index value.
Note "No value" in the table Entries in the table which have the value "No value" delete the corresponding values in an existing tag of the same name.
See also
Exporting tags (Page 2549)
10.9.2.5
2554
Requirements
The WinCC project for the export is open. Text lists have been created in the project. The "Text & graphics lists" editor is open.
2. Click the "..." button and specify in which file the data are saved. 3. Click "Export". The export will start.
Result
The exported data has been written to an xlsx file. The xlsx file will be stored in the specified folder.
See also
Importing text lists (Page 2555) Importing and exporting project data (Page 2536) Exporting tags (Page 2549) Exporting recipes (Page 2538) Format of text list data (Page 2556)
Requirements
An xlsx file with text lists has been created. The structure of the xlsx file meets the requirements.
2555
2. Select the file you want to import under "File selection". 3. Click on the "Import" button. The import will start.
Result
You have now imported the text lists. The relevant text lists have been created in WinCC. Alarms relating to the import operation are displayed in the output window. A log file is saved in the source directory of the import files. The log file has the same name as the respective import file but with the "*.xml" extension. Check when importing the data whether there are any links to objects, for example, dynamic parameters such as tags. If an object with the same name already exists, the existing object is used. If no object of the same name yet exists, create an object with the relevant name or create a new link.
See also
Exporting text lists (Page 2554)
2556
Table 10-18 Meaning of the entries List entry Name ListRange Meaning Shows the name of the text list. Shows the text list range: Number = Bit number (0-31) Range = value/range (...-...) Bit = Bit (0;1) Any comments on the text list. You can use up to 500 characters
Comment
2557
Table 10-19 Meaning of the entries List entry Name Parent DefaultEntry Value Text Meaning Shows the name of the text list entry. Specifies the name of the corresponding text list. Indicates whether the text list entry is a default entry. The default entry is always displayed when the tag has an undefined value. Specifies the tag integer values or value ranges which are assigned to the text entries in the text list. Shows the text list entry. The field designation contains a language ID. Text list entries must be assigned a language ID for import. An expression with a reference ID will be added to the text if the text list entry has a dynamic parameter. Example: text <field ref="0" />. Use the ID to assign the dynamic parameter to a text list entry. FeldInfo Specifies whether the text list contains dynamic parameters. The settings are separated by a semicolon ";". Example of dynamic parameters: Tag: <ref id = 0; type = CommonTagDisplayFormat; Tag = tag 1; DisplayType = Decimal; DisplayFormat = 9;> Text list: <ref id = 1; type = CommonTextList; TextList = Textliste_1; Tag = tag 2; Length = 5;> PLC tag: <ref id = 0; type = CommonControlTagDisplayFormat; DisplayType = Decimal; DisplayFormat = 9;>
2558
See also
Exporting text lists (Page 2554)
10.9.2.6
Requirements
At least two languages have been enabled in the "Project languages" editor, for example, Italian and French.
2559
5. From the "Source language" drop-down list, select the language from which you wish to translate, for example Italian. 6. From the "Target language" drop-down list, select the language into which the texts are to be translated, for example, French. 7. Enter a file path and a file name for the export file in the "Export file" input field. 8. Click "Export".
Result
The texts selected in the "Project texts" editor are written to an xlsx file. The xlsx file will be stored in the specified folder.
2560
See also
Importing project texts (Page 2561)
Requirements
At least two languages have been enabled in the "Project languages" editor, for example, Italian and French.
Result
You have imported the project texts.
See also
Exporting project texts (Page 2559)
2561
10.9.3
10.9.3.1
Using cross-references
General information about cross references
Introduction
The cross-reference list provides an overview of the use of objects within the project.
Uses of cross-references
The cross-reference list offers you the following advantages: When creating and changing a program, you retain an overview of the objects, tags, and alarms etc. you have used. From the cross-references, you can jump directly to the object location of use. You can learn the following when debugging: The objects used in a specific screen. The alarms and recipes shown in a specific display. The tags used in a specific alarm or object. As part of the project documentation, the cross-references provide a comprehensive overview of all object, alarms, recipes, tags and screens.
10.9.3.2
Introduction
Details on the use of objects can be found in the cross-reference list. You can show crossreferences for HMI devices, folders and all editors in the project tree. The detail view also lets you select individual objects of the editors.
Requirement
You have created a project. Several objects have been created.
Procedure
1. Select the required entry in the project tree or detail view. 2. Select "Cross-references" in the shortcut menu. The cross-reference list is opened in the work area. 3. Open the "Used by" tab to display where the objects shown in the cross-reference list are used. 4. Open the "Used" tab to view the users of the objects displayed in the cross-reference list.
2562
Result
The cross-reference list for the selected object is displayed in the work area.
10.9.3.3
Depending on the installed products, additional columns or different columns are displayed for the cross-references.
2563
10.9.3.4
Introduction
The Inspector window displays cross-reference information about a selected object in the "Info > Cross-references" tab. The Inspector window displays the cross-reference information in tabular format.
Requirement
You have created a project. Several objects have been created.
2564
Procedure
1. Select an object in a screen or a tabular editor. 2. Select "Cross-reference information" in the shortcut menu. The cross-references are opened in the Inspector window.
Result
The instances where and the other objects by which the selected object is being used are displayed. The table below shows the additional information listed in the "About > Cross-reference" tab:
Column Object Meaning Name of the object that uses the lower-level objects or that is being used by the lower-level objects. Number of uses Each location of use, for example an object or event Function of the referenced objects, for example tag for data record or process value PLC tag with which the object is connected. Type of object Path of object
Depending on the installed products, additional columns or different columns are displayed for the cross-references.
2565
10.9.4
10.9.4.1
Managing languages
Languages in WinCC
Project languages
The following languages are differentiated within the project languages: Reference language The reference language is the language that you use to configure the project initially. During configuration, you select one of the project languages as the reference language. You use the reference language as a template for translations. All of the texts for the project are first created in the reference language and then translated. While you are translating the texts, you can have them displayed simultaneously in the reference language. Editing language You produce translations of the texts in the editing language. Once you have created your project in the reference language, you can translate the texts into the remaining project languages. Select a project language respectively as an edit language and edit the texts for the appropriate language variant. You can change the editing language at any time. Note When switching the project languages, the assignment to the keys on the keyboard also changes. For some languages (for example, Spanish), the operating system does not allow you to switch to the corresponding keyboard assignment. In this case, the keyboard assignment is switched to English. Runtime languages Runtime languages are those project languages that are transferred to the HMI device. You decide which project languages to transfer to the HMI device depending on your project requirements. You must provide appropriate controls so that the operator can switch between languages in runtime.
2566
See also
Language settings in the operating system (Page 2567) Operating system settings for Asian languages (Page 2568) Selecting the user interface language (Page 2569) "Graphics" editor (Page 2580) Languages in Runtime (Page 2584) Example: Configuring a button for language switching (Page 2591)
10.9.4.2
Introduction
The configuration PC operating system settings influence WinCC language management in the following areas: Selection of project languages Regional format of dates, times, currency, and numbers Displaying ASCII characters
See also
Languages in WinCC (Page 2566) Operating system settings for Asian languages (Page 2568)
2567
10.9.4.3
See also
Languages in WinCC (Page 2566) Language settings in the operating system (Page 2567)
2568
10.9.4.4
Procedure
1. Select "Options > Settings" in the menu. The "Settings" dialog box is opened. 2. Select the desired user interface language under "General > General settings".
Result
WinCC will use the selected language as user interface language.
See also
Enable project languages (Page 2569) Selecting the reference language and editing language (Page 2570) Languages in WinCC (Page 2566)
2569
See also
Selecting the user interface language (Page 2569) Selecting the reference language and editing language (Page 2570)
Requirements
The "Project languages" editor is open. Several project languages have been activated.
2570
Result
You have now selected the editing and reference languages. If you change the editing language, all future text input will be stored in the new editing language.
See also
Selecting the user interface language (Page 2569) Enable project languages (Page 2569)
2571
10.9.4.5
See also
Project text basics (Page 2573) Translating texts directly (Page 2574) Translating texts using reference texts (Page 2576) Exporting project texts (Page 2577) Importing project texts (Page 2579)
2572
Translating texts
There are two ways of translating texts. Translating texts directly You can enter the translations for the individual project languages directly in the "Project texts" editor. Translating texts using reference texts You can change the editing language for shorter texts. You can enter the new texts in the editing language while the texts of the reference language are displayed.
2573
See also
Working with multiple languages (Page 2572) Translating texts directly (Page 2574) Translating texts using reference texts (Page 2576) Exporting project texts (Page 2577) Importing project texts (Page 2579)
Requirements
You are in the project view. A project is open. You have selected at least two further project languages.
2574
Procedure
Proceed as follows to translate individual texts: 1. Click on the arrow to the left of "Languages & resources" in the project tree. The elements below this are displayed. 2. Double-click on "Project texts". A list with the texts in the project is displayed in the work area. There is a separate column for each project language.
3. To group identical texts and translate them simultaneously, click on the " toolbar. 4. To hide texts that do not have a translation, click on the 5. Click on an empty column and enter the translation.
Result
You have translated individual texts in the "Project texts" editor. The texts will then be displayed in the runtime language.
2575
See also
Working with multiple languages (Page 2572) Exporting project texts (Page 2577) Project text basics (Page 2573) Importing project texts (Page 2579)
Requirement
There is at least one translation into a different project language for an input field.
Procedure
To display the translation of an input cell in a reference language, follow these steps: 1. Select "Tasks > Languages & resources" in the task card. 2. Select a reference language from the "Reference language" drop-down list.
Result
The reference language is preset. If you click in a text block, translations that already exist in other project languages are shown in the "Tasks > Reference text" task card.
See also
Working with multiple languages (Page 2572) Exporting project texts (Page 2577) Project text basics (Page 2573) Importing project texts (Page 2579)
2576
Requirements
At least two languages have been enabled in the "Project languages" editor, for example, Italian and French.
2577
5. From the "Source language" drop-down list, select the language from which you wish to translate, for example Italian. 6. From the "Target language" drop-down list, select the language into which the texts are to be translated, for example, French. 7. Enter a file path and a file name for the export file in the "Export file" input field. 8. Click "Export".
Result
The texts selected in the "Project texts" editor are written to an xlsx file. The xlsx file will be stored in the specified folder.
2578
See also
Working with multiple languages (Page 2572) Translating texts using reference texts (Page 2576) Translating texts directly (Page 2574) Project text basics (Page 2573) Importing project texts (Page 2579)
Requirements
At least two languages have been enabled in the "Project languages" editor, for example, Italian and French.
Result
You have imported the project texts.
2579
See also
Exporting project texts (Page 2577) Working with multiple languages (Page 2572) Project text basics (Page 2573) Translating texts directly (Page 2574) Translating texts using reference texts (Page 2576)
10.9.4.6
Work area
The work area displays all configured graphic objects in a table. There is a separate column in the table for each project language. Each column in the table contains the versions of the graphics for one particular language. In addition, you can specify a default graphic for each graphic to be displayed whenever a language-specific graphic for a project language does not exist.
Preview
The preview shows you how the graphics will look on various devices.
See also
Storing external graphics in the graphics library (Basic, Advanced, Professional) (Page 2582) Storing graphics in the graphics library (Basic, Advanced, Professional) (Page 2581) Languages in WinCC (Page 2566)
2580
Requirement
The language-dependent versions of a graphic are available. Multiple languages have been enabled in the "Project languages" editor. The "Graphics" editor is open.
Inserting graphics
1. Click "Add" in the "Graphics library" table. A dialog box opens. 2. Select the required graphic file. 3. Click "Open" in the dialog box. The graphic will be imported to the project and displayed in all cells in this row in the "Graphics" editor. 4. Click in the corresponding cell of a language for which a language-dependent version of this graphic exists. 5. Select "Add graphic" from the shortcut menu. A dialog box opens. 6. Select the desired graphic file and click "Open." The language-dependent version is inserted in the table in place of the reference language graphic. 7. Then, in the "Default graphic" column, import a graphic to be displayed in runtime for those languages for which there is no language-specific graphic. You can also drag&drop a graphic from Windows Explorer to the relevant position in the "Graphics library" table.
Result
The graphics added are available in the "Graphics" editor. The graphic assigned to the respective editing language will be displayed during editing. The default screen will be displayed in all editing languages for which no screen has been imported.
2581
See also
"Graphics" editor (Page 2580)
Storing external graphics in the graphics library (Basic, Advanced, Professional) Introduction
To display graphics that have been created in an external graphics program in your screens, you will first have to store these graphics in the graphics browser of the WinCC project.
Requirement
Multiple languages have been enabled in the "Project languages" editor. The "Graphics" editor is open. There is a graphic in the "Graphics" editor.
2582
Result
The OLE objects added are available in the "Graphics" editor. Versions of the graphics for the current editing language are displayed in the "Screens" editor. The default graphic is displayed in all editing languages for which no screen has been imported. The graphic is displayed in runtime in the set runtime language. The default graphic is displayed in all runtime languages for which no graphic has been imported. You can double-click OLE objects in your library to open them for editing in the corresponding graphic editor.
See also
"Graphics" editor (Page 2580)
2583
10.9.4.7
Languages in runtime
See also
Methods for language switching (Page 2584) Enabling the runtime language (Page 2585) Setting the runtime language order for language switching (Page 2587) Setting the default font for a runtime language (Page 2589) Selecting the log language (Page 2590) Languages in WinCC (Page 2566)
2584
See also
Languages in Runtime (Page 2584) Selecting the log language (Page 2590) Enabling the runtime language (Page 2585) Setting the runtime language order for language switching (Page 2587) Setting the default font for a runtime language (Page 2589)
Requirements
Multiple languages have been enabled in the "Project languages" editor.
2585
Procedure
1. Double-click on "Runtime settings" in the project tree. 2. Click on "Language & Font". 3. Select the following languages: German Chinese French
Result
You have now set three runtime languages. A number is automatically assigned to each language in the "Order" column. The enabled runtime languages are transferred with the compiled project to the HMI device. If the number of languages selected exceeds the number that can be transferred to the HMI device, the table background changes color.
2586
See also
Languages in Runtime (Page 2584) Selecting the log language (Page 2590) Setting the runtime language order for language switching (Page 2587) Methods for language switching (Page 2584)
Requirements
Multiple languages have been enabled in the "Project languages" editor. "Language & Font" is open in the editor and three runtime languages have been set in the following order: 1. German 2. Chinese 3. French
2587
Procedure
1. Select the runtime language "German". button. The runtime language "German" will move down a place. The number 2. Click the will automatically be changed to "2" in the "Order" column.
Result
You have changed the order of runtime languages. The first time runtime starts, the project will be displayed in the language with the smallest number, in other words Chinese. If the language is switched, this will happen in numerical order.
See also
Languages in Runtime (Page 2584) Selecting the log language (Page 2590) Enabling the runtime language (Page 2585) Setting the default font for a runtime language (Page 2589) Methods for language switching (Page 2584)
2588
Requirements
Multiple languages have been enabled in the "Project languages" editor. Three runtime languages have been enabled in the "Language & Font" editor. 1. Chinese 2. German 3. French
Procedure
1. Double-click on "Runtime settings" in the project tree. 2. Click on "Language & Font". The table shows the runtime languages and fonts set. 3. Click in the "French" row in the "Default font" column. 4. Select the font to be used by default if a font cannot be selected for a given text.
Result
The project texts for the runtime language "French" are displayed on the HMI device in the selected font. These fonts are transferred to the HMI device during a transfer operation. The default font is also used for the representation of dialogs in the operating system of the HMI device. Select a smaller font as default if the full length of the dialog texts or headers is not displayed.
See also
Languages in Runtime (Page 2584) Selecting the log language (Page 2590) Setting the runtime language order for language switching (Page 2587) Methods for language switching (Page 2584)
2589
Requirements
The languages used in your project are activated in the "Project languages" editor, for example "German" and "English" .
Procedure
1. Double-click on "Runtime settings" in the project tree. 2. Click on "Language & Font". 3. Activate the runtime languages, for example, "German" and "English". 4. Specify the "order": 1 German 2 English 5. Click on "Runtime settings > General". 6. Select "German" for "Logs > Log language".
Result
After loading, the project will start in the runtime language "German". The logs are now written in German. During runtime, the operator switches the runtime language to English. The logs will still to be written in German.
See also
Languages in Runtime (Page 2584) Setting the default font for a runtime language (Page 2589) Setting the runtime language order for language switching (Page 2587) Methods for language switching (Page 2584) Enabling the runtime language (Page 2585)
2590
10.9.4.8
Requirements
You have completed the "Configuring a button in multiple languages" example. The "Screen_1" screen is open. The button on the screen has been selected.
Procedure
1. In the Inspector window, select "Properties > Events > Press". 2. Click on "Add function" in the table. 3. Select the "SetLanguage" system function.
Result
You have assigned the button the function "SetLanguage". Pressing the button during runtime will switch the runtime language. The runtime languages are switched in the order specified by the number sequence in the "Languages and fonts" editor.
See also
Example: Configuring a button in multiple languages (Page 2591) Example: Configuring a button for language switching for each runtime language (Page 2592) Languages in WinCC (Page 2566)
2591
Requirements
The languages "German" and "English" have been enabled in the "Project languages" editor. German has been set as editing and reference language. You have created and opened the "Screen_1" screen. The Inspector window is open.
Procedure
1. Drag-and-drop a button from the "Tools" task card into the screen. The button will be added to the screen. 2. In the Inspector window, open "Properties > Properties > General". 3. Enter the text ""Sprache umschalten" under "Text > off". 4. Press <Enter> to confirm. The button is named. 5. Open the "Tasks" task card. 6. Select "English" under "Languages & Resources > Editing language". 7. Enter the label "Switch Language" under "Properties > Properties > General > Text > Off" in the Inspector window.
Result
The button name is configured in German and English language. The button name corresponding with the current Runtime language is shown in Runtime.
See also
Example: Configuring a button for language switching (Page 2591) Example: Configuring a button for language switching for each runtime language (Page 2592)
Example: Configuring a button for language switching for each runtime language Introduction
In this example, you configure a "Sprache umschalten" button in German and "Switch language" button in English.
2592
Requirements
The following languages have been enabled in the "Project languages" editor German English Italian All languages have been set as runtime languages in the "Runtime settings > Language & Font" editor. You have created and opened the "Screen_1" screen. Three buttons have been created on the screen: Button_1 labelled "Deutsch" Button_2 labelled "English" Button_3 labelled "Italiano" The Inspector window is open.
Procedure
1. Select "Button_1". 2. In the Inspector window, select "Properties > Events > Press". 3. Click on <Add function> in the table. 4. Select the "SetLanguage" system function. 5. Click on the "Switch" field. 6. Click on the button. 7. Select "Runtime language". The field will be highlighted in red. 8. Select "German" from the drop-down list. 9. Repeat steps 1 - 8 for the other two buttons and select the corresponding runtime language.
Result
You have configured three buttons for switching language in runtime. Each button will switch to a different runtime language. For example, clicking on the "English" button during runtime will switch the runtime language to English.
See also
Example: Configuring a button for language switching (Page 2591) Example: Configuring a button in multiple languages (Page 2591)
2593
10.9.5
10.9.5.1
Replacing devices
Basics
Introduction
You can use existing configurations for new devices and optimize these configurations with little manual effort. All data configured by you is retained in the configuration data. This means you do not need to copy individual objects of one device and paste them to another.
Principle
The following applies when you replace devices: Only functions supported by the new device are available. Only configuration data supported by the new device are displayed. This affects recipes, objects available on the screens, available system functions, available communication logs, etc. The number of supported objects, such as screens or tags, may be limited on the new device. If the existing objects exceed the limitations on the new device, the objects are displayed in full. The objects are, however, highlighted in color in the individual editors. An error is generated when the project data is compiled. Manual post processing is required when switching to a device with fewer features. Example: Limited number of connections All connections will be highlighted in color as invalid if fewer connections are supported on the new device than have been configured. Delete any excess connections. Note If you replace a Panel and select a PC Station as your new device, for example, WinCC Runtime Advanced will automatically be moved below the PC Station in the project tree.
See also
Device-specific functions (Page 2595) Screen adjustment options (Page 2598) Key assignment when replacing devices (Page 2596) Engineering system (Page 2685) Basic Panel (Page 2687)
2594
10.9.5.2
Device-specific functions
See also
Basics (Page 2594)
2595
2596
2597
See also
Basics (Page 2594) Screen adjustment options (Page 2598)
10.9.5.3
None
The screens are not scaled. The objects in the screen retain their position and size. This option may result in objects being outside the configurable area if the display of the new device is smaller than the old one.
2598
Note The aspect ratio is not adjusted for objects with a fixed aspect ratio, for example, gauge, circle. The objects are displayed on the new device with the same aspect ratio as prior to the replacement of the device.
2599
See also
Specifying the position of screen objects (Page 2601) Fit objects to contents (Page 2600) Basics (Page 2594) Key assignment when replacing devices (Page 2596)
If "Disable 'fit to size' for text objects" is activated, automatic fit to size is ignored in the text object properties. If you have activated "Fit screen to window height", the text field along with the other objects is scaled in accordance with the height of the new device. If "Disable 'fit to size' for graphic objects" is activated, automatic fit to size is ignored in the graphic object properties. If you have activated "Fit screen to window width", the graphics view along with the other objects is scaled in accordance with the width of the new device. Note The settings have no effect on screen objects whose size cannot be changed, such as alarm indicators or screen objects with a fixed aspect ratio. "Disable 'fit to size' for text objects" and "Disable 'fit to size' for graphic objects" have no effect if:
2600
See also
Specifying the position of screen objects (Page 2601) Screen adjustment options (Page 2598)
Select position
Adjust the position of the screen objects to the new device in the menu under "Options > Settings > Visualization > Fit to size screen > Select position".
Example
The following option aligns the objects with the top left edge.
The following object centers the objects in the middle of the screen.
2601
See also
Fit objects to contents (Page 2600) Screen adjustment options (Page 2598)
10.9.6
10.9.6.1 Basics
2602
Note Exception to this basic rule Copying and pasting of an alarm class that has been generated from project-wide alarm class is handled differently than with this basic rule. When the copied alarm class already exists in the target HMI device within the same project, the "Paste" command is not performed.
See also
Unsupported objects and functionalities (Page 2603)
Unsupported objects
Objects that are not supported in the target HMI device cannot be pasted. Note When you copy a screen containing objects which are not supported by the destination HMI device, the objects remain in the background. When you copy the screen again and the new device supports the objects, they are displayed again.
2603
Invalid objects
The following objects become invalid once they have been pasted into the target HMI device: Referenced objects that do not exist in the target HMI device. Objects with settings that are not supported in the target HMI device. System functions that were configured for objects and that are not supported in the target HMI device. Invalid objects are highlighted by a color coding. Select a supported object or create a new one. If you retain an invalid object, an error will be displayed when the project data is compiled.
See also
Basics (Page 2602)
10.9.6.2
2604
See also
Copying recipes within an HMI device (Page 2605) Copying objects with linked objects (Page 2606) Linked objects copied automatically (Page 2606)
"Tags" editor
You can drag-and-drop a tag to a recipe element in the "Tag" column. The tag is linked to the recipe element. If a tag is already linked, an error message will be generated.
"Screens" editor
If you drag-and-drop a recipe to a screen, a new recipe display will be created and linked to the recipe.
See also
Copying screens (Page 2604) Copying objects with linked objects (Page 2606) Linked objects copied automatically (Page 2606)
2605
Simple pasting
The linked object is not copied. The linked object is transferred and handled as follows in the target HMI device: If an object with the same name exists, the existing object with its settings is used. If no object with the same name exists, the name of the object will be displayed. The object becomes invalid. For some objects, linked objects are pasted automatically during simple pasting.
Extended pasting
Select the "Extended paste" command in the shortcut menu to paste the linked objects as well. If objects of the same name exist in the target HMI device, you need to decide whether or not to overwrite each of these objects.
See also
Copying screens (Page 2604) Copying recipes within an HMI device (Page 2605)
2606
See also
Copying screens (Page 2604) Copying recipes within an HMI device (Page 2605)
2607
10.10
10.10.1
Definition of terms
The term "project" has two different meanings in the contexts of compilation and loading. "Project" is the WinCC project on the configuration PC. "Project" is also the Runtime project you create by compiling the configuration data of an HMI device and download to the HMI device. WinCC project: contains the configuration data of one or more HMI devices Runtime project: contains the compiled configuration data of an HMI device The figure below illustrates the link between WinCC projects and Runtime projects using the example of the "Compile and load" process:
2608
2609
Requirement
A project is open.
Procedure
Proceed as follows to compile a project: 1. If you want to compile several HMI devices at the same time, select all the relevant HMI devices with multiple selection in the project tree. 2. Compile the project: For delta compilation of the project, select the "Compile > Software" command from the shortcut menu of the HMI device. To compile all project data, select the "Compile > Software (compile all)" command from the shortcut menu.
Result
The configuration data of all selected HMI devices is compiled. Any errors that occur during compilation are shown in the Inspector window.
2610
2611
Requirement
You have created an HMI device in the project. The HMI device is connected to the configuration PC. Transfer mode is set in the HMI device.
Procedure
Proceed as follows to load a project: 1. To download a project simultaneously to several HMI devices, select the HMI devices by means of multiple selection in the project navigation. 2. Select the "Download to device > Software" command from the shortcut menu of the HMI device. 3. If the "Extended loading" dialog is open, configure the "Settings for loading". Make sure that the "Settings for loading" correspond to the "Transfer settings in the HMI device". Select the protocol used, for example, Ethernet or HTTP. Configure the relevant interface parameters on the configuration PC. Make any interface-specific or protocol-specific settings required in the HMI device. Click "Download". You can call the "Extended loading" dialog at any time with the menu command "Online > Advanced download to device...". The "Load preview" dialog opens. The project is compiled at the same time. The result is displayed in the "Load preview" dialog.
2612
Result
The project is loaded to all selected HMI devices. Any existing project is replaced. The data for user administration and / or recipes is replaced in accordance with the settings in the "Load preview" dialog. If errors or warnings occur during the download, corresponding alarms are displayed under "Info > Load" in the Inspector window. On completion of the successful download of the project, you can execute it on the HMI device.
See also
Backing up and restoring data of the HMI device (Page 2621) Updating the HMI device operating system (Page 2623) Error messages during loading of projects (Page 2625) Adapting the project for another HMI device (Page 2626) Establishing a connection to the HMI device (Page 2628)
2613
Requirement
WinCC Runtime is installed on the HMI device.
Procedure
The "RT Loader" application is started on a panel. The project loaded is started automatically after expiration of the configured delay. If the project does not start automatically: 1. To select the project file, click "Settings" and enter the path to the project file under "Configuration file". 2. Click "OK" and then "Start".
10.10.2
Simulating projects
2614
Requirements
The simulation/runtime component is installed on the configuration PC.
Field of application
Use the simulator to test various functions of the operator control and monitoring system, such as: Checking limit levels and alarm outputs Consistency of interrupts Configured interrupt simulation Configured warnings Configured error messages Check of status displays Interconnection and screen layout
See also
Simulating a project (Page 2616)
2615
Requirement
Simulation without a connected PLC: Tags have been created Simulation with a connected PLC but no active process: A project with tags and area pointers has been created
Procedure
To simulate a project using the tag simulator, follow these steps: 1. Open the project on the configuration PC. 2. Select the "Online > Simulation > With tag simulator" menu command. For initial project simulation, the simulator is started with a new, empty table. The project is opened simultaneously in Runtime. Toggle between the tag simulator and Runtime using the <Alt +Tab> key combination. 3. To simulate a process value, select the corresponding "tag" from the tag simulator. The table lists all configured tags. You can simulate up to 300 tags simultaneously. 4. Select the simulation mode in the "Simulation" column. 5. Change the value of tags and area pointers in the respective columns. 6. Activate the "Start" check box to start the simulation for this tag. 7. To save the simulation, select the menu command "File > Save" and enter a descriptive name, for example, "Mixing". The file name is assigned the extension "*.cors".
2616
Result
The process values are simulated in Runtime. The tag values are created at random, or incremented, depending on the simulation mode. To specify tag values, change the simulation mode to "<Display" and enter a value at "Set value". The following figure shows a tag simulator with four tags whose values can be determined at random in a range of values from 10 to 1000:
Deleting a tag
To delete a tag from the tag simulator, follow these steps: 1. Select the cell that contains the tag name. 2. Select the "Edit > Cut" menu command. The tag is removed from the table.
2617
See also
Simulation basics (Page 2614) Working with the tag simulator (Page 2618)
10.10.2.3 Working with the tag simulator About the tag simulator
The tag simulator has the following columns:
Column Tag Data type Current value Format Description Specifies the tags for the simulation. Shows the data type of the selected tag. Shows the simulated value of the defined tags. Specifies the selected format in which the tag values are simulated: Decimal (1, 2, 3, 4, ...) Hexadecimal (03CE, 01F3, ...) Binary (0 and 1) Write cycle Simulation Set value minValue maxValue Period Start Specifies the selected time interval at which the current tag values are simulated. If you enter "2", for example, the current value of the tag will be shown every 2 seconds. Shows the method by which the tag values are processed during simulation. Sets the selected value for the respective tag. The simulation start with the specified value. Specifies the value range of the tag. You set a minimum and maximum value for this range. The default values are -32768 for the minimum and 32767 for the maximum. Contains the period during which the value of the tag is repeated for the "Increment" and "Decrement" simulation modes. Starts simulation of the tag based on the previously entered information.
Simulation modes
The simulator has six different simulation modes. The configured tags are supplied with nearly realistic values during the simulation.
Simulation mode Sinusoidal Random Increment Description Changes the tag value to form a sinusoidal curve. The value is visualized as a periodic, non-linear function. Provides randomly generated values. The tag value is changed by means of a random function. Increases the value of the tag continuously up to a specified maximum value. Begins again at the minimum after the maximum has been reached. The value trend corresponds to a positive saw-tooth curve. Reduces the value of the tag continuously down to a specified minimum value. Begins again at the maximum after the minimum has been reached. The value curve corresponds to a negative saw-tooth curve.
Decrement
2618
Result
The simulator tests the selected tag bit-by-bit as follows:
Simulation values Set start value 1. Simulation value 2. Simulation value 3. Simulation value .... Byte for alarms 00000001 00000010 00000100 00001000 ...
See also
Simulating a project (Page 2616)
2619
10.10.3
Functional scope
ProSave provides all of the functions needed to transfer files to the HMI device. Data backup and restoration of backed-up data Operating system update Communication settings
See also
Backup of HMI data (Page 2620) Updating the operating system (Page 2622)
2620
See also
Backing up and restoring data of the HMI device (Page 2621) ProSave (Page 2620)
Requirements
The HMI device is connected to the configuration PC The HMI device is selected in the project navigation. If a server is used for data backup: The configuration PC has access to the server
2621
Backup/Restore from the "Backup/Restore" dialog in the control panel of the HMI device
The "Backup/Restore" function is enabled for MMC, SD memory cards and USB mass storage devices.
See also
Backup of HMI data (Page 2620)
2622
See also
Updating the HMI device operating system (Page 2623) ProSave (Page 2620)
Requirements
The HMI device is connected to the configuration PC or the PC with ProSave. The HMI device is selected in the project navigation.
2623
Result
The operating system of the HMI device is updated to the latest version.
See also
Updating the operating system (Page 2622)
2624
10.10.4
Reference
10.10.4.1 Error messages during loading of projects Possible problems during the download
When a project is being downloaded to the HMI device, status messages regarding the download progress are displayed in the output window. Usually, problems arising during the download of the project to the HMI device are caused by one of the following errors: Wrong operating system version on the HMI device Incorrect download settings on the HMI device Incorrect HMI device type in the project The HMI device is not connected to the configuration PC. The most common download failures and possible causes and remedies are listed below.
2625
2626
Linking references
References to linked objects are included in the copying. The references are linked again once the linked objects are copied. Example: You copy a screen in which objects are linked to tags. The tag names are entered at the individual objects after the screen is added to the new HMI device. The tag names are marked in red because the references are open. When you then copy the tags and insert them into the new HMI device, the open references are closed. The red marking for the tag names disappears. For complete references to connected objects in the PLC, you first need to configure a connection to the PLC.
2627
Important settings
Check the connection settings and in particular the following parameters: Network and station addresses Selected transmission rate Master on the bus; as a general rule, only one master is permitted. If using a configurable adapter for the connection, check the adapter settings, for example, transmission rate, master on the bus.
2628
10.11
10.11.1
Operating in Runtime
Basics
Figure 10-1
2629
System functions
These default system functions are used to implement many tasks in Runtime, such as: Calculations, e.g. increasing a tag value by a specific or variable amount. Logging functions, e.g. starting a process value log. Settings, e.g. PLC changes, or setting a bit in the PLC. Alarms, e.g after a different user logs on.
Events
The object and the selected function determine the event that can be defined as a trigger for executing a system function. For example, the "Change value", "Low limit violated" and "Upper limit exceeded" events are associated with the "Tag" object. The "Loaded" and "Cleared" events are associated with the "Screen" object.
2630
10.11.2
Commissioning projects
Dialog fonts
The dialog text will be shown in the standard font. Define the default font under "Language & Font" in the "Device Settings" editor.
Screen saver
A screensaver is no longer required for most modern screens and can, in fact, even cause damage. These monitors switch to hibernate mode as soon as the video signal has not changed for a specified time. A conventional screensaver would prevent this and thus reduce the service life of your monitor. Note Approved screensavers If you do want to use a screensaver, note that only the standard Windows screensavers are approved for use in Runtime.
2631
The configuration software and the Runtime software are installed on the same system
If the configuration software and the Runtime software are installed on the same system, proceed as follows: 1. Create and compile your project. 2. Start Runtime directly from the active configuration software. Select the "Start Runtime" command from the "Online" menu. 3. You may test and operate the project online with the controller if you have configured the corresponding communication.
The configuration software and the Runtime software are installed on different systems
If the configuration software and the Runtime software are installed on different systems, proceed as follows: 1. Create and compile your project. For additional information, refer to "Compiling a project". 2. To download the file via cable: Connect the HMI device to the configuration computer using a standard cable to match the desired transfer mode and then switch on the HMI device.
2632
Requirement
A project is open on the Engineering Station.
Procedure
Proceed as follows to start Runtime on the Engineering Station: 1. Select the desired HMI device in the project tree. 2. Select the menu command "Online > Start Runtime". 3. If you want to edit project data after Runtime was started on the Engineering Station, select the "Compile > Software" command in the shortcut menu of the HMI device. The updated project is displayed in the Runtime on the Engineering Station.
2633
Requirements
WinCC Runtime is installed on the HMI device.
Procedure
The "RT Loader" application is started on a panel. The project loaded is started automatically after expiration of the configured delay. If the project does not start automatically: 1. To select the project file, click "Settings" and enter the path to the project file under "Configuration file". 2. Click "OK" and then "Start".
2634
Procedure
Proceed as follows to simulate a project without a PLC connection to the configuration PC: 1. Create a project as it is going to be run later with an interconnected PLC. 2. Save and compile the project. 3. Start the Simulator directly from the active configuration software. Select the menu command "Online > Simulate Runtime > With tag simulator". When you simulate the project for the first time, the simulator is started with a new, empty simulation table. If you have already created a simulation table for your project, it is opened. The simulation table "*.six" contains all the settings required for the simulation. For additional information, refer to "Working with the tag simulator". 4. Make any changes to the tags and area pointers of your project in the simulation table. Toggle between the simulation table and Runtime using the <ALT+TAB> key shortcut. Save the settings for the simulation using the menu command "File > Save." Enter a name to save the file.. The file name is automatically assigned the extension "*.six".
2635
Procedure
Exit Runtime as follows: 1. When Runtime is running, you can close it using the close symbol or the Task Manager. 2. When Runtime is running, press the relevant button to close Runtime. The close of Runtime is especially configured.
Requirement
The HMI device is interconnected with the Engineering Station or the computer is connected with ProSave. The HMI device whose data should be backed up or restored is selected in the project tree. The settings for loading are correctly set in the properties of the HMI device. When using a special storage medium, such as a data server: The HMI device is connected to the storage medium.
Procedure
Proceed as follows to back up the data: 1. Select the "Backup" command from the "Online > Device maintenance" menu. 2. Select the scope of the backup: "Complete backup," "Recipes," or "User administration." 3. Click "...", select the storage location in the "Select backup file" dialog, and specify a file name. 4. Click "OK." This starts the data backup. The backup can take some time.
2636
10.11.3
Languages in runtime
Requirement
Multiple languages are enabled in the "Project languages" editor.
Procedure
1. Open the "Language & Font" editor under "Device settings". 2. In the "Runtime language" column, select the the languages to be used when runtime first starts. The selected language is assigned the number "0" in the "Language order" column.
2637
4. Select additional languages in the order in which they are to be activated when the language is switched. If the number of languages selected exceeds the number that can be loaded on the HMI device, the table background changes in color. 5. If you want to change the order of a language, select the desired row and then select the shortcut menu command "Move up" or "Move down".
Result
The enabled runtime languages are transferred with the compiled project to the HMI device. When runtime starts the first time, the project is displayed in the language with the lowest number in the "Language order." If language switching by means of the "SetLanguage" system function has been configured, the specified number sequence determines the order in which the languages are switched.
2638
Requirement
Multiple languages are enabled in the "Project languages" editor.
Procedure
1. Open the "Language & Font" editor under "Device settings". 2. Enable the languages to be displayed on the HMI device in the "Runtime language" column. In the "Fixed font 0" column, WinCC shows the fonts used by default in runtime. 3. In the "Configured font 0" column, select another font for each language you want to have available during configuration. These fonts are transferred to the HMI device during a transfer operation. 4. In the "Standard font" column, select the font to be used by default if a font cannot be selected for a text.
Result
The project texts for the selected language are displayed in the selected font on the HMI device.
2639
2640
10.11.4
Operating projects
2641
Invisible buttons The focus of invisible buttons is by default not indicated following selection. No optical operation feedback is provided in this case. The configuration engineer may, however, configure invisible buttons so that their outline appears as lines when touched. This outline remains visible until you select another operator control. I/O fields A screen keyboard appears as visual feedback after you touched an I/O field, for example, to enter a password. Depending on the HMI device and the configured operator control, the system displays different screen keyboards for entering numerical or alphanumerical values. The screen keyboard is automatically hidden again when input is complete.
2642
The screen keyboard appears on the HMI device touch screen when you touch an operator control that requires input. The screen keyboard of the KTP400 features four views. You can change the view while making entries using the buttons in the fourth row of the screen keyboard:
Button Changes to the view Entering text, characters "A" to "M" Entering text, characters "N" to "Z" Entering numbers, "0" to "9," signed or unsigned and with or without decimal places Entering special characters Entering text, shift to lower case letters
2643
Note Job mailbox has no effect PLC job 51 "Select screen" has no effect while the screen keyboard is open. Key assignment The alphanumerical keyboard layout is monolingual. A language change within the project does not have any effect on the layout of the alphanumerical screen keyboard.
2644
Entering data on the KTP600, KTP1000, TP1500 Basic Alphanumerical screen keyboard
The screen keyboard appears on the HMI device touch screen when you touch an operator control that requires input.
Note Job mailbox has no effect PLC job 51 "Select screen" has no effect while the screen keyboard is open. Key assignment The alphanumerical keyboard layout is monolingual. A language change within the project does not have any effect on the layout of the alphanumerical screen keyboard.
2645
2646
Procedure
Proceed as follows to open the tooltip for operator controls: 1. Touch the required operating element. The screen keyboard opens. The representation of the key indicates whether a tooltip was configured for the operating element or for the current screen. 2. Touch the key of the on-screen keyboard. The tooltip for the operating element is displayed. If there is no tooltip for the selected screen object, the tooltip for the current screen is displayed if it has been configured. You can scroll through the contents of long tooltips using the and buttons. Note Switching between displayed tooltips The configuration engineer can configure tooltips for an I/O field and the associated screen. You can switch between two tooltips by touching the tooltip window. 3. Close the displayed tooltip by pressing .
Alternative procedure
Depending on your configuration, tooltips can also be called via a configured operating element.
2647
Requirement
The required language for the project must be available on the HMI device. The language switching function must be logically linked to a configured operating element such as a button.
Selecting a language
You can change project languages at any time. Language-specific objects are immediately output to the screen in the new language when you switch languages. The following options are available for switching the language: A configured operating element switches from one language to the next in a list. A configured operating element directly sets the desired language.
2648
Layout
The layout of the bar depends on the configuration: The bar may feature a scale of values The configured limit values can be indicated by lines Color changes can signal when a limit value has been exceeded or has not been reached
Layout
The appearance of the date/time field depends on the language set in the HMI device. The date can be displayed in detail (e.g. Tuesday, 31 December 2003) or in short form (31.12.2003).
Operation
Depending on the configuration, you can operate the date/time field in the following ways: Standard operation: Change date and time.
Runtime behavior
When the operator ignores the syntax when entering values, or enters illegal values, the system rejects these. Instead, the original values (plus the time that has elapsed in the meantime) appears in the date/time field and a system alarm is displayed on the HMI device.
2649
Key operation
according to the configured Activate the date/time field, for example, with one or several tab sequence. A color frame signals the selected state of the field content.
Procedure
Proceed as follows to operate the date/time field: 1. Position the cursor using the cursor keys and enter the value. . The object changes to the special editing mode. Only one character at any time 2. Press is marked in the field. Use the cursor keys Use the cursor keys 3. Confirm your entry with / / to scroll a character table. to move the cursor to the next or previous input position. .
, or discard it with
2650
Layout
The appearance of the I/O field depends on the configuration: Numeric I/O field For input of numbers in decimal, hexadecimal or binary format. Alphanumeric I/O field For input of character strings. I/O field for date and time For input of calendar dates or time information. The format depends on the set configuration. I/O field for password entry For concealed entry of a password. The entered character string is displayed with placeholders (*).
Operation
Depending on the configuration, you can operate the I/O field in the following ways: Standard operation: Enter a value in the I/O field. Event: An event is triggered when you operate the I/O field, for example, when you activate it. The processing of a function list can be configured to the event.
Runtime behavior
Limit value test of numerical values Tags can be assigned limit values. If you enter a value that lies outside of this limit, it will not be accepted; for example, 80 with a limit value of 78. In this case the HMI device will deliver a system alarm, if an alarm window is configured. The original value is displayed again. Decimal places for numerical values The configuration engineer can define the number of decimal places for a numerical text box. The number of decimal places is checked when you enter a value in this type of I/O field. Decimal places in excess of the limit are ignored. Empty decimal places are filled with "0". Hidden input A "*" is displayed for every character during hidden input. The data format of the value entered cannot be recognized. Behavior when switching between input fields When you change to another input field within the same screen, and the screen keyboard appears, the "Exit field" event is not executed for the previous field unless you close the screen keyboard.
2651
Key operation
according to the tab sequence Activate the IO field,for example, with one or several configured. A color frame signals the selection of the field content.
Procedure
Proceed as follows to operate the IO field: 1. Position the cursor using and a cursor key. 2. This step cancels the field content selection. Enter the desired value. . The object will change to special editing mode. Only one character at any time 3. Press is marked in the field. Use the cursor keys Use the cursor keys 4. Confirm your entry with Note Enable the input of hexadecimal characters "A" to "F" for numerical values by toggling the input keys to character mode using the key . / / to scroll a character table. to move the cursor to the next or previous input position. .
, or discard it with
2652
Layout
The appearance of the graphic depends on the configuration. The graphic view, for example, adapts automatically to the size of the graphic. Note If you use bitmaps with the "Transparent color" setting in WinCC screens, requires highperformance display on the Panel HMI devices. Performance is enhanced by disabling the "Transparent color" setting in the properties of the respective graphic object. This restriction applies in particular when bitmaps are used as background image.
Operation
The graphic display is for display only and cannot be operated.
2653
Operation
Depending on the configuration, you can operate the graphic IO field in the following ways: Standard operation: Select an entry from the graphic list. Event: An event is triggered when you operate the graphic IO field, e.g. when you activate it. The processing of a function list can be configured to the event.
Runtime behavior
If the graphic IO field displays a cactus image, you have not defined a graphic to be output for a specific value in your project. The contents of the graphic IO field change color to show that it is now activated. The frame in 3D is only shown graphically in an output field.
2654
Key operation
How to use a graphic IO field on the keyboard device:
Step 1 2 3 4 Select the graphic IO field Enable the selection mode Select an entry Accept selection or Cancel selection
ESC
ENTER
Procedure e.g.
ENTER
The graphic IO field is marked. The selection mode is now enabled. Moves the cursor by lines. The entry selected is now valid. The selection mode is closed. The original value is restored.
Layout
The layout of the trend view is based on the configuration. A trend view can show multiple curves simultaneously to allow the user, for example, to compare different process sequences. If the displayed process value exceeds or falls below the configured limit values, the violation of the limit can be displayed by a change of color in the curve. A ruler can also simplify the reading of the process values from the trend view. The ruler displays the Y-value that belongs to an X-value.
2655
Operation
Depending on the configuration you can: The displayed time section extends. The displayed time section reduces. Scroll back by one display width. Scroll forwards by one display width. Stop or continue the trend recording.
Operator controls
The buttons have the following functions:
Operator control Function Scrolls back to the start of trend recording. The start values of the trend recording are displayed there. Zooms the displayed time section Zooms out of the displayed time section Moves the ruler backwards (to the left). Moves the ruler forward (to the right). Scrolls back by one display width (to the left). Scrolls forward by one display width (to the right). Shows or hides the ruler. The ruler displays the X-value associated with a Y-value. Stops or continues trend recording
Procedure
Select the trend view with the
TAB
2656
Function Scrolls back to the start of trend recording. The start values of the trend recording are displayed there. Enlarges the time section displayed. Reduces the time section displayed.
ALT ALT
+ + + + + +
+ +
Moves the ruler backwards (to the left). Moves the ruler forward (to the right). Scrolls back by one display width (to the left). Scrolls forward by one display width (to the right).
Layout
The layout of the button depends on the button type. Button with text: The text shown on the button gives information regarding the status of the button. Button with graphic: The graphic shown on the button gives information regarding the status of the button. Invisible: The button is not visible during Runtime.
Operation
Depending on the configuration, you can operate the button in the following ways: Standard operation: Click the button. Event: An event is triggered when you operate the button, e.g. when you click it. The processing of a function list can be configured to the event.
Runtime behavior
The operation may be followed with a optical feedback. However, note that the optical feedback only indicates a completed operation and not whether the configured functions were actually executed.
2657
Procedure
How to operate a button on the keyboard device: 1. Select the button using a cursor key, e.g. 2. Next, press the
ENTER
or the
key.
Layout
The layout of the switch depends on the switch type. Switches: The switch has a slider. The position of this slider gives information about the status of the switch. Switch with text: The text shown on the switch gives information regarding the status of the switch. Switch with graphic: The graphic shown on the switch gives information regarding the status of the switch.
Operation
Depending on the configuration, you can operate the switch in the following ways: Standard operation: Click the switch. Event: An event is triggered when you operate the switch, e.g. when you click it. The processing of a function list can be configured to the event.
2658
Runtime behavior
A switch has two stable states: When you activate the switch, it changes to the other state. The switch retains this state until the next operation.
Key operation
How to operate a switch on the keyboard device: Select the switch using a cursor key, e.g. Next, press the
ENTER
or the
key.
2659
Operation
The following options of operating the symbolic IO field are available, depending on the configuration: Standard operation: Select an entry from the text list. Event: You trigger an event by operating the symbolic IO field, e.g. by enabling it. The processing of a function list can be configured to the event.
Runtime behavior
The selection list of the symbolic IO field displays an empty text line if a corresponding entry was not defined in project data. The active state is indicated on the HMI device by changing the color of contents of the symbolic IO field.
Key operation
How to operate a symbolic IO field on the keyboard device:
Step 1 2 3 4 Select the symbolic IO field Open selection list Select an entry Accept the selection Or Canceling the selection
ESC
ENTER
Procedure e.g.
ENTER
The symbolic IO field is marked. The drop down list box opens. Moves the cursor by lines. The entry selected is now valid. The selection list is closed. The original value is restored. The selection list is closed.
2660
Logoff times
A logoff time is specified in the system for each user. If the time between any two user actions, such as entering a value or changing screens, exceeds this logoff time, the user is automatically logged off. The user must then log on again to continue to operate objects assigned access protection.
2661
Note The "Simple user view" object cannot be operated dynamically with a script.
Layout
The appearance depends on the authorizations. All users on the HMI device are displayed in the User view to the administrator or to a user with administrator authorizations. When user administration authorization is lacking, only the personal user entry is displayed.
2662
Operation
Depending on the configuration you can: Manage users, e.g. create, delete. Change existing user data. Export or import user data. Note On an HMI device the number is limited to 100 users and one PLC user. This restriction does not apply to PCs. On a PC, the maximum number of users is restricted by the physical memory.
The logon dialog opens in the following cases: You use an operator control with access protection. You press an operator control that was configured for displaying the logon dialog. You enable the "<ENTER>" entry in the simple user view. You enable a blank entry in the extended user view. The logon dialog will be automatically displayed when the project is started, depending on the configuration.
Requirement
The logon dialog is open.
2663
Result
After successful logon to the security system, you can execute functions on the HMI device which are access protected and for which you have authorization. An alarm is output if an incorrect password has been entered and if an alarm view was configured.
Procedure
You have the following options for logging off: You press an operator control that was configured for logoff. You will be logged off automatically if you are not operating the project and if the logoff time has been exceeded. You will also be automatically logged off if you enter an incorrect password.
Result
You are no longer logged into the project. In order to use an operator control with access protection, you first have to log on again.
2664
2. Enter the desired user name and password. Touch the corresponding text box. The alphanumerical on-screen keyboard is displayed. 3. Click on the text box of the group. A dialog opens. 4. Assign the user to a group. Select and to scroll the selection list. 5. Touch the required entry in the drop down list box. The selected entry is accepted as input. 6. Touch the text box "Logoff time". The on-screen keyboard is displayed. 7. Enter a logoff time between 0 and 60 minutes. The value 0 stands for "no automatic logoff." 8. Confirm your entries with "OK."
Result
The new user is created.
2665
2666
Result
User data have been changed.
Result
The user has been deleted and may no longer log onto the project.
2667
Alarm classes
Alarms are assigned to various alarm classes. The selection depends on the HMI device. "Warnings" Alarms of this class usually indicate states of a plant such as "Motor switched on." Alarms in this class do not require acknowledgment. "Errors" Alarms in this class must always be acknowledged. Alarms normally indicate critical errors within the plant such as "Motor temperature too high". "System" System alarms indicate states or events which occur on the HMI device. System alarms provide information on occurrences such as operator errors or communication faults. "Diagnosis Events" SIMATIC diagnostic alarms show states and events in the SIMATIC S7 controllers.
2668
Note Availability for specific devices Diagnostic alarms are not available for Basic Panels. STEP 7 alarm classes The alarm classes configured in STEP 7 are also available to the HMI device. Note Availability for specific devices STEP 7 alarm classes are not available for Basic Panels. Custom alarm classes The properties of this alarm class must be defined in the configuration.
Alarm buffer
Alarm events are saved to an internal buffer. The size of this alarm buffer depends on the HMI device type.
Alarm report
When alarm report is enabled in the project, alarm events are output directly to the connected printer. You can set the reporting function separately for each alarm. The system outputs "Incoming" and "Outgoing" alarm events to the printer. The output of alarms of the "System" alarm class to a printer must be initiated by means of the corresponding alarm buffer. This outputs the complete content of the alarm buffer to the printer. To be able to initiate this print function, you need to configure a corresponding control object in the project. Note Availability for specific devices Alarm reports are not available for Basic Panels.
Alarm log
Alarm events are stored in an alarm log, provided this log file is configured. The capacity of the log file is limited by the storage medium and system limits. Note Availability for specific devices Alarm logs are not available for Basic Panels.
2669
Alarm view
The alarm view shows selected alarms or alarm events from the alarm buffer or alarm log. Whether alarms have to be acknowledged or not is specified in your configuration. By means of configuration, the display can be filtered in such a way that only alarms that contain a specific character string will be shown.
Alarm window
If configured, an alarm window shows all pending alarms or alarms awaiting acknowledgment of a particular alarm class. The alarm window is displayed as soon as a new alarm occurs. You can configure the order in which the alarms are displayed. Either the current alarm or the oldest alarm is displayed. The alarm window can also be set to indicate the exact location of the fault, including the date and time of the alarm event. By means of configuration, the display can be filtered in such a way that only alarms that contain a specific character string will be shown.
Alarm indicator
The alarm indicator is a graphic icon that is displayed on the screen when an alarm of the specified alarm class is incoming. The alarm indicator can assume one of two states: Flashing: At least one unacknowledged alarm is pending. Static: The alarms are acknowledged but at least one of them is not yet deactivated. The number displayed indicates the number of pending alarms.
2670
Layout
Depending on the configuration, in the alarm view different columns with information regarding an alarm or an alarm event are displayed. To differentiate between the different alarm classes, the first column in the alarm view contains an icon:
Icon ! (empty) (depends on the configuration) $ Alarm class "Errors" "Warnings" Custom alarm classes "System"
Operation
Depending on the configuration you can: Acknowledge alarms Edit alarms
Control elements
The buttons have the following functions:
Button Function Acknowledge alarm Edit alarm Display infotext for an alarm Shows the full text of the selected alarm in a separate window, the alarm text window. In the alarm text window, you can view alarm text that requires more space than is available in the alarm view. Close the alarm text window with . Scrolls one alarm up Scrolls one page up in the alarm view
2671
Alarm indicator
The alarm indicator is a graphic symbol indicating pending alarms or alarms requiring acknowledgment, depending on the configuration.
Figure 10-2
2672
Layout
The alarm indicator can assume one of two states: Flashing: The alarm indicator flashes as long as alarms are pending for acknowledgment. The number displayed indicates the number of pending alarms. The project engineer can configure specific functions to be executed by operating the alarm indicator. Static: The alarms are acknowledged but at least one of them is not yet deactivated.
Displaying dialogs
The displayed alarm indicator view is covered, for example, by the logon dialog, help dialog or alarm text windows. The alarm indicator is visible once you close these dialogs.
2673
Alternative operation
Depending on the configuration, you can also acknowledge an alarm with a function key.
Result
The alarm is acknowledged. If the alarm belongs to an alarm group, all the alarms of the associated group are acknowledged.
Requirement
The alarm to be edited is displayed in the alarm window or the alarm view.
2674
. keys.
END
or
3. Continue to press the key TAB until the button in the extended alarm view. 4. Confirm your entry by pressing the key
ENTER
Result
The system executes the additional functions of the alarm. Additional information on this topic may be available in your plant documentation.
2675
Recipe data records
Recipes for a fruit juice plant Orange flavored drinks Grape flavored drinks Apple flavored drinks Cherry flavored drinks
The drawers of the file cabinet are filled with suspension folders. The suspension folders in the drawers represent records required for manufacturing various product variants. Example: Product variants of the flavor apple might be a soft drink, a juice or nectar, for example.
Drawer Suspension
folder Suspension folder Suspension folder
Recipe Product variants of apple flavored drinks Recipe data record Apple drink Recipe data record Apple nectar Recipe data record Apple juice
2676
Elements
In the figure showing the file cabinet, each suspension folder contains the same number of sheets. Each sheet in the suspension folder corresponds to an element of the recipe data record. All the records of a recipe contain the same elements. The records differ, however, in the value of the individual elements. Example: All drinks contain the same components: water, concentrate, sugar and flavoring. The records for soft drink, fruit juice or nectar differ, however, in the quantity of sugar used in production.
2677
Data flow
The following figure shows the data flow in a project with recipes:
Editing, saving or deleting a recipe data record Display recipe data record Synchronize or do not synchronize recipe tags Display and edit recipe tags in the recipe screen Write records from the recipe view to the PLC or read records from the PLC and display them in the recipe view. Recipe tags are to the PLC online or offline Export or import recipe data record to memory card
2678
Figure 10-3
In the simple recipe view, each area is shown separately on the HMI device. You can use the shortcut menu to operate each of these display areas. The simple recipe view always begins with the recipe list.
Operation
You can use the simple recipe view as follows, depending on the configuration: Create, change, copy or delete recipe data records Read recipe data records from the PLC or transfer to the PLC
2679
Element list
Menu command Save To PLC From PLC Save as Displaying infotext Rename Previous Keys Function The selected record is renamed. The displayed values of the selected data record are transferred from the HMI device to the PLC. The recipe values from the PLC are displayed in the recipe view of the HMI device. The data record is saved under a new name. A dialog box opens where you can enter the name. Displays the infotext configured for the simple recipe view. Renames the selected data record. A dialog box opens where you can enter the name. The data record list opens.
2680
6. Alternatively, press the number of the desired menu command. The menu command is executed.
Requirement
A screen with a simple recipe view is displayed.
Procedure
Proceed as follows to create a recipe data record: 1. If the recipe list contains several recipes: Select the recipe for which you want to create a new recipe data record. 2. Open the recipe list menu.
2681
Result
The new recipe data record is saved to the selected recipe.
Requirement
A screen with a recipe view is displayed.
Procedure
Proceed as follows to copy a recipe data record: 1. If the recipe list contains several recipes: Select the recipe which contains the relevant recipe data record. 2. Open the data record list. 3. Select the recipe data record you want to edit. 4. Open the element list. 5. Edit the element values as required. 6. Save your changes using menu command "0 Save".
2682
Result
The edited recipe data record is saved to the selected recipe.
Requirement
A screen with a simple recipe view is displayed.
Result
The data record is deleted.
2683
Requirement
A screen with a simple recipe view is displayed.
Procedure
To transfer a recipe data record to the PLC, proceed as follows: 1. If the recipe list contains several recipes: Select the recipe which contains the relevant recipe data record. 2. Select the element list of the recipe data record to which you want to apply the values from the PLC. 3. Open the menu. 4. Select menu command "2 From PLC". The values are read from the PLC. 5. Save the displayed values to the HMI device using menu command "0 Save".
Result
The values were read from the PLC, are visible on the HMI device and were saved to the selected recipe data record. Note Basic Panels With Basic Panels, the "From PLC" menu command can also be configured for the data record list: In this case, you can also select the "From PLC" menu command in the data record list.
2684
Requirement
A screen with a simple recipe view is displayed.
Procedure
To transfer a recipe data record to the PLC, proceed as follows: 1. If the recipe list contains several recipes: Select the recipe which contains the relevant recipe data record. 2. Select the element list of the recipe data record whose values you want to transfer to the PLC. 3. Open the menu. 4. Select menu command "1 To PLC".
Result
The values of the recipe data record were transferred to the PLC and are active in the process. Note Basic Panels With Basic Panels, the "To PLC" menu command can also be configured for the data record list: In this case, you can also select the "To PLC" menu command in the data record list.
10.12
10.12.1
Performance features
Engineering system
Engineering system
The following tables help you assess whether your project still meets the performance specifications of the Engineering System. In addition to the specified limits, allowances must also be made for restrictions imposed by main memory resources. WinCC uses up to 2 GB of RAM, depending on the operating system. It is nonetheless useful to install more than 2 GB of main memory on the PC if running many applications with high memory requirements in parallel.
2685
35 80.000 8.000
3)
Number of logging tags Number of blocks (faceplates, user data types) Number of screens Number of screen objects per screen Number of screen objects Number of alarms Number of texts
3) 2) 3)
Number of text lists and graphic lists 3) Number of entries per text list Number of languages Number of global libraries
3)
1) 2) 3)
Including logging tags. With an average of 5 texts and a dynamic parameter Including the objects configured in the "Program PLC" area
80.000 8.000 500 1000 3.000 320.000 30.000 50.000 1.000 500 20.000 1.000 10.000 100.000 1.000 3.000
Number of recipes Number of recipe elements Number of texts Number of text lists and graphic lists Number of entries per text list
2686
1) 2)
10.12.2
Basic Panel
Basic Panel
The following table helps you assess whether your project meets the performance features of the HMI device. The specified maximum values are not additive. It cannot be guaranteed that configurations running on the devices at the full system limits will be functional. In addition to the specified limits, allowances must be made for restrictions imposed by configuration memory resources.
Tags
KP300 Basic Number of tags in the project Number of PowerTags Number of elements per array Number of local tags 250 -100 -KP400 Basic 500 -100 -KTP400 Basic 250 -100 -KTP600 Basic 500 -100 -KTP1000 Basic 500 -100 -TP1500 Basic 500 -100 --
Alarms
KP300 Basic Number of alarm classes Number of discrete alarms Number of analog alarms 32 200 15 KP400 Basic 32 200 15 KTP400 Basic 32 200 15 KTP600 Basic 32 200 15 KTP1000 Basic 32 200 15 TP1500 Basic 32 200 15
2687
Screens
KP300 Basic Number of screens Number of fields per screen Number of tags per screen Number of complex objects per screen 1) Number of array elements per screen 2) 50 30 30 5 100 KP400 Basic 50 30 30 5 100 KTP400 Basic 50 30 30 5 100 KTP600 Basic 50 30 30 5 100 KTP1000 Basic 50 30 30 5 100 TP1500 Basic 50 30 30 5 100
1) 2)
Complex objects include: bars, sliders, symbol library, clock, and all objects from the Controls area. Array elements contained in recipes are included in the count.
Recipes
KP300 Basic Number of recipes Number of elements per recipe1) User data length in bytes per data record Number of data records per recipe Reserved memory for data records in the internal Flash 5 20 -20 40 KB KP400 Basic 5 20 -20 40 KB KTP400 Basic 5 20 -20 40 KB KTP600 Basic 5 20 -20 40 KB KTP1000 Basic 5 20 -20 40 KB TP1500 Basic 5 20 -20 40 KB
1)
If arrays are used, each array element counts as one recipe element
Logs
KP300 Basic Number of logs Number of entries per log (including all log segments) 1) --KP400 Basic --KTP400 Basic --KTP600 Basic --KTP1000 Basic --TP1500 Basic ---
2688
1)
The number of entries for the "segmented circular log" logging method is the maximum number for all segmental circular logs. The product of the number of segmental circular logs and the number of data records per segmental circular log may not exceed the system limit.
Trends
KP300 Basic Number of trends 25 KP400 Basic 25 KTP400 Basic 25 KTP600 Basic 25 KTP1000 Basic 25 TP1500 Basic 25
Scripts
KP300 Basic Number of scripts -KP400 Basic -KTP400 Basic -KTP600 Basic -KTP1000 Basic -TP1500 Basic --
Communication
KP300 Basic Number of connections 4 Number of connections based on "SIMATIC -HMI HTTP" KP400 Basic 4 -KTP400 Basic 4 -KTP600 Basic 4 -KTP1000 Basic 4 -TP1500 Basic 4 --
2689
Help system
KP300 Basic Number of characters in a help text 320 KP400 Basic 320 KTP400 Basic 320 KTP600 Basic 320 KTP1000 Basic 320 TP1500 Basic 320
Languages
KP300 Basic Number of runtime languages 5 KP400 Basic 5 KTP400 Basic 5 KTP600 Basic 5 KTP1000 Basic 5 TP1500 Basic 5
Scheduler
KP300 Basic Time-triggered tasks 1) -KP400 Basic -KTP400 Basic -KTP600 Basic -KTP1000 Basic -TP1500 Basic --
1)
User administration
KP300 Basic Number of user groups Number of authorizations Number of users 50 32 50 KP400 Basic 50 32 50 KTP400 Basic 50 32 50 KTP600 Basic 50 32 50 KTP1000 Basic 50 32 50 TP1500 Basic 50 32 50
Project
KP300 Basic Size of the project file "*.srt" 512 kB KP400 Basic 512 kB KTP400 Basic 512 kB KTP600 Basic 512 kB KTP1000 Basic 1024 kB TP1500 Basic 1024 kB
2690
10.12.3
See also
Printer list (http://support.automation.siemens.com/WW/llisapi.dll? aktprim=0&lang=en&referer=%2fWW %2f&func=cslib.csinfo&siteid=csius&caller=view&extranet=standard&viewreg=WW&nodeid0 =10805558&objaction=csopen)
Restrictions
The HMI device provides 39 KB of memory space for recipes. This memory space may not be exceeded. The total memory space for recipes is calculated as follows: Total of all recipes + recipe with highest memory requirement. Each recipe may not exceed a maximum memory space of 19 KB.
2691
10.13
10.13.1
2692
10.13.2
Libraries
WinCC flexible enables you to create two library types: Project library Global library A library can contain all the WinCC flexible objects, such as screens, tags, graphic objects, or alarms.
2693
Both the "Project library" and the "Global library" contain the two folders, "Copy templates" and "Types". You can create or use the library objects as a copy template, or as a type. Copy templates Use copy templates to create independent copies of the library object. Types Create instances of objects of the "Types" folder and use the instances in your project. The instances are bound to their respective type. Changes to an instance also change all other instances. Types are marked by a green triangle in the "Libraries" task card. Managing the library objects You can only copy and move library objects within the same library. For more detailed information, see: Libraries in WinCC (Page 1948)
2694
10.13.3
The project has a template for every HMI device. You can centrally configure the function keys and objects for your project in these templates. Every screen based on this template will contain the function keys and objects that you configured in the template. Changes to an object or of a function key assignment in the template are applied to the object in all the screens, which are based on this template.
2695
Excluding the controls, the screens are displayed in runtime in the following order:
2696
11
PID control
Principles for control
Controlled system and actuators
Controlled system
Room temperature control by means of a heating system is a simple example of a controlled system. A sensor measures the room temperature and transfers the value to a controller. The controller compares the current room temperature with a setpoint and calculates an output value (manipulated variable) for heating control.
A properly set PID controller reaches this setpoint as quickly as possible and then holds it a constant value. After a change in the output value, the process value often changes only with a time delay. The controller has to compensate for this response.
Actuators
The actuator is an element of the controlled system and is influenced by the controller. Its function modifies mass and energy flows. The table below provides an overview of actuator applications.
Application Liquid and gaseous mass flow Solid mass flow, e.g., bulk material Flow of electrical power Actuator Valve, shutter, gate valve Articulated baffle, conveyor, vibrator channel Switching contact, contactor, relay, thyristor Variable resistor, variable transformer, transistor
2697
11.1.1.2
Controlled systems
The properties of a controlled system can hardly be influenced as these are determined by the technical requirements of the process and machinery. Acceptable control results can only be achieved by selecting a suitable controller type for the specific controlled system and adapting the controller to the time response of the controlled system. Therefore, it is is indispensable for the configuration of the proportional, integral and derivative actions of the controller to have precise knowledge of the type and parameters of the controlled system.
2698
2699
11.1.1.3
The time response can be determined by approximation using the variables Delay time Tu, Recovery time Tg and Maximum value Xmax. The variables are determined by applying tangents
2700
Tt Tu Tg y x
Dead time Delay time Recovery time Output value Process value
The controllability of a self-regulating controlled system with dead time is determined by the ratio of Tt to Tg. Tt must be small compared to Tg. Rule: Tt/Tg 1
2701
11.1.1.4
Pulse controller
2702
Yh w
2703
Tu Tg XSd
Response characteristic without controller Response characteristic with two-step controller Delay time Recovery time Switching difference
2704
Three-step controllers
Three-step controllers are used for heating / cooling. These controllers have two switching points as their output. The control-action results are optimized through electronic feedback structures. Fields of applications for such controllers are heating, low-temperature, climatic chambers and tool heating units for plastic-processing machines. The following diagram shows the characteristic of a three-step controller
Output value, e.g. y11 = 100% heating y12 = 0% heating y21 = 0% cooling y22 = 100% cooling
x w xSh
Physical quantity of the process value, e.g., temperature in C Setpoint Distance between Switching Point 1 and Switching Point 2
2705
11.1.1.5
x w
Response to disturbances
The setpoint is influenced by disturbance variables. The controller has to eliminate the resulting control deviations in the shortest time possible. The response to disturbances is improved by minimizing fluctuation of the process value and the time required to reach the new setpoint.
2706
11.1.1.6
2707
Control deviation Output value of a continuous controller Output value of a pulse controller
Equation for proportional action controller Output value and control deviation are directly proportional, meaning: Output value = proportional gain control deviation y = GAIN x
2708
TM_LAG
Control deviation Output value of a continuous controller Output value of a pulse controller Delay of the Derivative action
Equation for PD-action controller The following applies for the step response of the PD-action controller in the time range:
t = time interval since the step of the control deviation The derivative action generates a output value as a function of the rate of change of the process value. A derivative action by itself is not suitable for controlling because the output value only
2709
2710
Control deviation Output value of a continuous controller Output value of a pulse controller
An integral action in the controller adds the control deviation as a function of the time. This means that the controller corrects the system until the control deviation is eliminated. A sustained control deviation is generated at controllers with proportional action only. This effect can be eliminated by means of an integral action in the controller. In practical experience, a combination of the proportional, integral and derivative actions is ideal, depending on the requirements placed on the control response. The time response of the individual components can be described by the controller parameters proportional gain GAIN, integral action time TI (integral action), and derivative action time TD (derivative action). Equation for PI-action controller
2711
2712
TM_LAG Ti
Control deviation Output value of a continuous controller Output value of a pulse controller Delay of the Derivative action Integral action time
Equation for PID controller The following applies for the step response of the PID controller in the time range:
2713
w x
Controllers with PI and PID action have the advantage that the process value does not have any deviation from the setpoint value after settling. The process value oscillates over the setpoint during approach.
2714
11.1.1.7
The table below provides an overview of suitable combinations of a controller structure and physical quantity.
Physical quantity P Temperature Controller structure PD PI PID Sustained control deviation Well suited For low performance requirements and proportional action controlled systems with Tu/ Tg < 0,1 Suitable, if the delay time is inconsiderable Unsuitable, because required GAIN range is usually too large Unsuitable No sustained control deviation The most suitable controller structures for high performance requirements (except for specially adapted special controllers)
Pressure
The most suitable controller structures for high performance requirements (except for specially adapted special controllers) Suitable, but integral action controller alone often better Hardly required
Flow rate
Unsuitable
2715
11.1.1.8
Instead of vmax = x / t , you can use Xmax / Tg. In the case of controllers with PID structure the setting of the integral action time and differentialaction time is usually coupled with each other. The ratio TI / TD lies between 4 and 5 and is optimal for most controlled systems. Non-observance of the differential-action time TD is uncritical at PD controllers. In the case of PI and PID controllers, control oscillations occur if the integral action time TI has been select by more than half too small. An integral action time that is too large slows down the settling times of disturbances. One cannot expect that the control loops operate "optimally" after the first parameter settings. Experience shows that adjusting is always necessary, when a system exists that is "difficult to control" with Tu / Tg > 0.3.
11.1.2
11.1.2.1
Introduction
For the configuration of a software controller, you need an instruction with the control algorithm and a technology object. The technology object for a software controller corresponds with the instance DB of the instruction. The configuration of the controller is saved in the technology object. In contrast to the instance DBs of other instructions, technology objects are not stored by the program resources, but rather under PLC > Technology objects.
2716
PID_Compac PID_Compact t PID_3Step CONT_C CONT_S TCONT_CP TCONT_S PID_CP PID_ES TUN_EC TUN_ES PID_3Step CONT_C CONT_S TCONT_CP TCONT_S PID_CP PID_ES TUN_EC TUN_ES
See also
Display instance DB of a technology object. (Page 2722)
11.1.2.2
2717
Requirement
A project with a CPU has been created.
Procedure
To add a technology object, proceed as follows: 1. Open the CPU folder in the project tree. 2. Open the "Technology objects" folder. 3. Double-click "Add new object". The "Add new object" dialog box opens. 4. Click on the "PID" button. All available PID-controllers for this CPU are displayed. 5. Select the instruction for the technology object, for example, PID_Compact. 6. Enter an individual name for the technology object in the "Name" input field. 7. Select the "Manual" option if you want to change the suggested data block number of the instance DB. 8. Click "Further information" if you want to add own information to the technology object. 9. Confirm with "OK".
Result
The new technology object has been created and stored in the project tree in the "Technology objects" folder. The technology object is used if the instruction for this technology object is called in a cyclic interrupt OB. Note You can select the "Add new and open" check box at the bottom of the dialog box. This opens the configuration of the technology object after adding has been completed.
11.1.2.3
2718
Configuration window
For each technology object, there is a specific configuration window in which you can configure all properties. To open the configuration window of the technology object, follow these steps: 1. Open the "Technology objects" folder in the project tree. 2. Open the technology object in the project tree. 3. Double-click the "Configuration" object.
Symbols
Icons in the area navigation of the configuration and in the Inspector window show additional details about the completeness of the configuration:
The configuration contains default values and is complete. The configuration exclusively contains default values. With these default values the use of the technology object is possible without further changes. The configuration contains values defined by the user and is complete All input fields of the configuration contain valid values and at least one default setting was changed. The configuration is incomplete or faulty At least one input field or a collapsible list contains no or one invalid value. The corresponding field or the drop-down list box has a red background. When clicked the roll-out error message indicates the cause of the error.
The properties of a technology object are described in detail in the chapter for the technology object.
11.1.2.4
2719
Requirement
The cyclic interrupt OB is created and the cycle time of the cyclic interrupt OB is correctly configured.
Procedure
Proceed as follows to call the instruction in the user program: 1. Open the CPU folder in the project tree. 2. Open the "Program blocks" folder. 3. Double-click the cyclic interrupt OB. The block is opened in the work area. 4. Open the "Technology" group in the "Instructions" window and the "PID Control" folder. The folder contains all instructions for software controllers that can be configured on the CPU. 5. Select the instruction and drag it to your cyclic interrupt OB. The "Call options" dialog box opens. 6. Select a technology object or type the name for a new technology object from the "Name" list.
Result
If the technology object does not exist yet, it is added. The instruction is added in the cyclic interrupt OB. The technology object is assigned to this call of the instruction.
11.1.2.5 Procedure
To open the "Commissioning" work area of the technology object, follow these steps: 1. Open the "Technology objects" folder in the project tree. 2. Open the technology object in the project tree. 3. Double-click the "Commissioning" object. The commissioning functions are specific for each controller and are described there.
2720
11.1.2.6
Loading to CPU
A new or modified configuration of the technology object must be downloaded to the CPU for the online mode. The following menu and shortcut menu commands are available for the download: Menu command Online > Download to device Downloads the configuration of the technology object, the compiled hardware data and the remaining software project data to the device. Menu command Online > Extended download to device Sets up an online connection to the selected device and downloads the compiled hardware and software project data, including the configuration of a technology object to the device.
11.1.2.7
Requirement
An online connection to the CPU is established and the CPU is in "RUN" mode. The functions of the commissioning window have been enabled by means of the "Start" button.
2721
Procedure
1. Open the CPU folder in the project tree. 2. Open the "Technology objects" folder. 3. Open a technology object. 4. Double click on "Commissioning". 5. Click on the icon "Upload PID parameters". 6. Save the project.
Result
The currently active PID parameters are stored in the project data. When reloading the project data in the CPU, the optimized parameters are used.
11.1.2.8
Procedure
To display the instance DB of a technology object, proceed as follows: 1. Open the CPU folder in the project tree. 2. Open the "Technology objects" folder. 3. Highlight a technology object. 4. Select the command "Open DB editor" in the shortcut menu.
11.1.3
11.1.3.1
PID control
Using PID_Compact
2722
Additional information
Steps for the configuration of a software controller (Page 2716) Add technology objects (Page 2717) Configure technology objects (Page 2718) Configuring PID Compact (Page 2723)
2723
Control logic
Select the check box "Invert control logic" to reduce the process value with a higher output value. Examples Opening the drain valve will reduce the level of a container's contents. Increasing cooling will reduce the temperature.
Setpoint Procedure
Proceed as follows to define a fixed setpoint: 1. Select "Instance DB". 2. Enter a setpoint, e.g. 80 C. 3. Delete any entry in the instruction. Proceed as follows to define a variable setpoint:
2724
Process value
PID_Compact will scale the value of the analog input to the physical quantity if you use the analog input value directly. You will need to write a program for processing if you wish first to process the analog input value. The process value is, for example, not directly proportional to the value at the analog input. The processed process value must be in floating point format.
Procedure
Proceed as follows to use the analog input value without processing: 1. Select the entry "Input_PER" in the drop-down list "Input". 2. Select "Instruction" as source. 3. Enter the address of the analog input. Proceed as follows to use the processed process value in floating point format: 1. Select the entry "Input" in the drop-down list "Input". 2. Select "Instruction" as source. 3. Enter the name of the variable in which the processed process value is saved.
Output value
PID_Compact offers three output values. Your actuator will determine which output value you use. Output_PER The actuator is triggered via an analog output and controlled with a continuous signal, e.g. 0...10V, 4...20mA. Output The output value needs to be processed by the user program, for example because of nonlinear actuator response. Output_PWM The actuator is controlled via a digital output. Pulse width modulation creates minimum ON and minimum OFF times.
2725
Procedure
Proceed as follows to use the analog output value: 1. Select the entry "Output_PER (analog)" in the drop-down list "Output". 2. Select "Instruction". 3. Enter the address of the analog output. Proceed as follows to process the output value using the user program: 1. Select the entry "Output" in the drop-down list "Output". 2. Select "Instruction". 3. Enter the name of the variable you are using to process the output value. 4. Transfer the processed output value to the actuator via a digital or analog CPU output. Proceed as follows to use the digital output value: 1. Select the entry "Output_PWM" in the drop-down list "Output". 2. Select "Instruction". 3. Enter the address of the digital output.
2726
See also
Monitoring process value (Page 2727) PWM limits (Page 2728) Output value limits (Page 2729) PID parameters (Page 2729)
Example
Process value high limit = 98 C; warning high limit = 90 C Warning low limit = 10 C; process value low limit = 0 C PID_Compact will respond as follows:
Process value > 98 C 98 C and > 90 C 90 C and 10 C InputWarning_H TRUE TRUE FALSE InputWarning_L FALSE FALSE FALSE Operating mode Inactive Automatic mode Automatic mode
2727
See also
Process value settings (Page 2726) PWM limits (Page 2728) Output value limits (Page 2729) PID parameters (Page 2729)
PWM limits
In the "PWM limits" configuration window, configure the valid minimum ON and OFF times for the actuator. Extend the minimum ON and OFF times if you want to reduce the switching frequency. The configuration of the PWM limitations affects output parameter "Output_PWM". The output value is switched to "Output_PWM" by means of pulse-width modulation. The output value is scaled internally to a value from 0.0 to 100.0%. If you are using the output value outputs "Output" or "Output_PER", you must configure the value 0.0 for the minimum ON and OFF times. The figure below illustrates the correlation between the sampling time PID_Compact, the sampling time PID_Algorithm, the minimum on/off times, as well as the resultant pulse duration/ interval.
1 2 3 4 5
Minimum ON time Sampling time PID_Compact Minimum OFF time Sampling time PID algorithm Minimum pulse duration Interval
The "Minimum ON time" or "Minimum OFF time" corresponds to a multiple of the sampling time PID_Compact. The sampling time of the PID algorithm is set to the higher of the ON and OFF time values.
STEP 7 Basic V11.0 SP2 System Manual, 12/2011,
2728
See also
Process value settings (Page 2726) Monitoring process value (Page 2727) Output value limits (Page 2729) PID parameters (Page 2729)
PID_Compact sets the output value to 0.0 if an error occurs. 0.0 must therefore always be within the output value limits. You will need to add an offset to Output and Output_PER in the user program if you want an output value low limit of greater than 0.0.
See also
Process value settings (Page 2726) Monitoring process value (Page 2727) PWM limits (Page 2728) PID parameters (Page 2729)
PID parameters
The PID parameters are displayed in the "PID Parameters" configuration window. The PID parameters will be adapted to your controlled system during controller tuning. You do not need to enter the PID parameters manually. The following equation is used to calculate the output value.
2729
y = Kp
[ (b w - x) + T s
I
(w - x) +
(c w - x)
Symbol y Kp s b w x TI a TD c
Description Output value Proportional gain Laplace operator Proportional action weighting Setpoint Process value Integral action time Derivative delay coefficient (T1 = a TD) Derivative action time Derivative action weighting
The diagram below illustrates the integration of the parameters into the PID algorithm:
Proportional gain
The value specifies the proportional gain of the controller.
2730
2731
Basic handling
Select the desired sampling time in the "Sampling time" drop-down list. All values in the commissioning window are updated in the selected update time. Click the "Start" icon in the measuring group if you want to use the commissioning functions. Value recording is started. The current values for the setpoint, process value and output value are entered in the trend view. Operation of the commissioning window is enabled. Click the "Stop" icon if you want to end the commissioning functions. The values recorded in the trend view can continue to be analyzed. Closing the commissioning window will terminate recording in the trend view and delete the recorded values.
2732
See also
Pretuning (Page 2733) Fine tuning (Page 2734) Using the trend view (Page 2736) "Manual" mode (Page 2739) Save optimized PID parameter in the project (Page 2740)
Pretuning
The pretuning function determines the process response to a setpoint jump and scans the system for the point of inflection. The optimized PID parameters are calculated as a function of the maximum slope and dead time of the controlled system. The higher the stability of the process value, the easier it is to calculate the PID parameters and increase precision of the result. Noise on the process value can be tolerated as long as the rate of rise of the process value is significantly higher compared to the noise. The PID parameters are backed up before being recalculated.
Requirement
The "PID_Compact" instruction is called in a cyclic interrupt OB. ManualEnable = FALSE PID_Compact is in "inactive" or "manual" mode. The setpoint may not be changed during controller tuning. PID_Compact will otherwise be deactivated. The setpoint and the process value lie within the configured limits (see "Process value monitoring" configuration). The difference between setpoint and process value is greater than 30% of the difference between process value high limit and process value low limit. The distance between the setpoint and the process value > 50% of the setpoint.
2733
Procedure
Proceed as follows to carry out "pretuning": 1. Double-click on "PID_Compact > Commissioning" in the project tree. 2. Select the entry "Pretuning" in the "Tuning mode" drop-down list. 3. Click the "Start" icon. An online connection will be established. Value recording is started. Pretuning is started. The "Status" field displays the current steps and any errors that may have occurred. The progress bar indicates the progress of the current step. Note Click the "Stop" icon when the progress bar has reached 100% and it is to be assumed the controller tuning function is blocked. Check the configuration of the technology object and, if necessary, restart controller tuning.
Result
The PID parameters will have been optimized if pretuning has been executed without errors. PID_Compact changes to automatic mode and uses the optimized parameters. The optimized PID parameters will be retained during power OFF and a restart of the CPU. If pretuning is not possible, PID_Compact will change to "Inactive" mode.
See also
Parameters State and sRet.i_Mode (Page 1674) Commissioning (Page 2732) Fine tuning (Page 2734) Using the trend view (Page 2736) "Manual" mode (Page 2739) Save optimized PID parameter in the project (Page 2740)
Fine tuning
Fine tuning generates a constant, limited oscillation of the process value. The PID parameters are optimized for the operating point from the amplitude and frequency of this oscillation. All PID parameters are recalculated on the basis of the findings. PID parameters from fine tuning usually have better master control and disturbance behavior than PID parameters from pretuning. PID_Compact automatically attempts to generate an oscillation greater than the noise of the process value. Fine tuning is only minimally influenced by the stability of the process value. The PID parameters are backed up before being recalculated.
2734
Requirement
The PID_Compact instruction is called in a cyclic interrupt OB. ManualEnable = FALSE The setpoint and the process value lie within the configured limits (see "Process value monitoring" configuration). The control loop has stabilized at the operating point. The operating point is reached when the process value corresponds to the setpoint. No disturbances are expected. The setpoint may not be changed during controller tuning. PID_Compact is in inactive mode, automatic mode or manual mode.
2735
Procedure
Proceed as follows to carry out "fine tuning": 1. Select the entry "Fine tuning" in the "Tuning mode" drop-down list. 2. Click the "Start" icon. An online connection will be established. Value recording is started. The process of fine tuning is started. The "Status" field displays the current steps and any errors that may have occurred. The progress bar indicates the progress of the current step. Note Click the "Stop" icon in the "Tuning mode" group when the progress bar has reached 100% and it is to be assumed the controller tuning function is blocked. Check the configuration of the technology object and, if necessary, restart controller tuning.
Result
The PID parameters will have been optimized if fine tuning has been executed without errors. PID_Compact changes to automatic mode and uses the optimized parameters. The optimized PID parameters will be retained during power OFF and a restart of the CPU. If errors occurred during "fine tuning", PID_Compact will change to "inactive" mode.
See also
Parameters State and sRet.i_Mode (Page 1674) Commissioning (Page 2732) Pretuning (Page 2733) Using the trend view (Page 2736) "Manual" mode (Page 2739) Save optimized PID parameter in the project (Page 2740)
2736
Selection of the display mode Trend view Area for moving and scaling the axes Ruler Legend with the trend values at the ruler
2737
Trend view
The trends for the setpoint (Setpoint), process value (Input) and output value (Output) are displayed in the trend view. In addition to different colors, the trends are identified by symbols (refer to legend).
2738
Move the mouse to the left edge of the trend area and watch out for the transition of the mouse pointer. Drag a vertical ruler onto the measuring trend that you want to analyze. To insert further rulers, press CTRL, click on the ruler and drag the new ruler into the trend area. The trend values are output left-aligned on the ruler. The time of the ruler position is displayed at the base of the ruler. The trend values of the active ruler are displayed in the legend. If several rulers are dragged to the trend area, the respectively last ruler is active. The active ruler is indicated by the correspondingly colored symbol. You can reactivate an inactive ruler by clicking it. Use the shortcut ALT+Click to remove rulers which are no longer required.
See also
Commissioning (Page 2732) Pretuning (Page 2733) Fine tuning (Page 2734) "Manual" mode (Page 2739) Save optimized PID parameter in the project (Page 2740)
"Manual" mode
The following section describes how you can use the "Manual" operating mode in the commissioning window of the "PID Compact" technology object.
Requirement
The "PID_Compact" instruction is called in a cyclic interrupt OB. An online connection to the CPU has been established and the CPU is in the "RUN" mode. The functions of the commissioning window have been enabled via the "Start" icon.
2739
Procedure
Use "Manual mode" in the commissioning window if you want to test the process by specifying a manual value. To define a manual value, proceed as follows: 1. Select the check box "Manual mode" in the "Online status of the controller" area. PID_Compact operates in manual mode. The most recent current output value remains in effect. 2. Enter the manual value in the "Output" field as a % value. 3. Click the control icon .
Result
The manual value is written to the CPU and immediately goes into effect. Note PID_Compact continues to monitor the process value. If the process value limits are exceeded, PID_Compact is deactivated. Clear the "Manual mode" check box if the output value is to be specified again by the PID controller. The change to automatic mode is bumpless.
See also
Parameters State and sRet.i_Mode (Page 1674) Commissioning (Page 2732) Pretuning (Page 2733) Fine tuning (Page 2734) Using the trend view (Page 2736) Save optimized PID parameter in the project (Page 2740)
Requirement
An online connection to the CPU is established and the CPU is in "RUN" mode. The functions of the commissioning window have been enabled by means of the "Start" button.
2740
Procedure
1. Open the CPU folder in the project tree. 2. Open the "Technology objects" folder. 3. Open a technology object. 4. Double click on "Commissioning". 5. Click on the icon "Upload PID parameters". 6. Save the project.
Result
The currently active PID parameters are stored in the project data. When reloading the project data in the CPU, the optimized parameters are used.
See also
Commissioning (Page 2732) Pretuning (Page 2733) Fine tuning (Page 2734) Using the trend view (Page 2736) "Manual" mode (Page 2739)
11.1.3.2
Using PID_3Step
2741
Additional information
Steps for the configuration of a software controller (Page 2716) Add technology objects (Page 2717) Configure technology objects (Page 2718) Configuring PID_3Step (Page 2742)
2742
Control logic
Select the check box "Invert control logic" to reduce the process value with a higher output value. Examples Opening the drain valve will reduce the level of a container's contents. Increasing cooling will reduce the temperature.
Setpoint Procedure
Proceed as follows to define a fixed setpoint: 1. Select "Instance DB". 2. Enter a setpoint, e.g. 80 C. 3. Delete any entry in the instruction. Proceed as follows to define a variable setpoint:
2743
Process value
PID_3Step will scale the value of the analog input to the physical quantity if you use the analog input value directly. You will need to write a program for processing if you wish first to process the analog input value. The process value is, for example, not directly proportional to the value at the analog input. The processed process value must be in floating point format.
Procedure
Proceed as follows to use the analog input value without processing: 1. Select the entry "Input_PER" in the drop-down list "Input". 2. Select "Instruction" as source. 3. Enter the address of the analog input. Proceed as follows to use the processed process value in floating point format: 1. Select the entry "Input" in the drop-down list "Input". 2. Select "Instruction" as source. 3. Enter the name of the variable in which the processed process value is saved.
Position feedback
Position feedback configuration depends upon the actuator used. Actuator without position feedback Actuator with digital endstop signals Actuator with analog position feedback Actuator with analog position feedback and endstop signals
2744
Output value
PID_3Step offers an analog output value (Output_PER) and digital output values (Output_UP, Output_DN). Your actuator will determine which output value you use. Output_PER The actuator is triggered via an analog output and controlled with a continuous signal, e.g. 0...10V, 4...20mA. Output_UP, Output_DN The actuator is controlled via two digital outputs.
Procedure
Proceed as follows to use the analog output value: 1. Select the entry "Output (analog)" in the drop-down list "Output". 2. Select "Instruction". 3. Enter the address of the analog output. Proceed as follows to use the digital output value:
2745
2746
Reaction to errors
PID_3Step is preset so that the controller stays active in most cases in the event of an error. If errors occur frequently in controller mode, this default reaction has a negative effect on the control response. In this case, check the Errorbits parameter and eliminate the cause of the error. PID_3Step generates a programmable output value in response to an error:
2747
2748
Example
Process value high limit = 98 C; warning high limit = 90 C Warning low limit = 10 C; process value low limit = 0 C PID_3Step will respond as follows:
2749
PID parameters
The PID parameters are displayed in the "PID Parameters" configuration window. The PID parameters will be adapted to your controlled system during controller tuning. You do not need to enter the PID parameters manually. The following equation is used to calculate the output value.
y = K p s (b w - x) +
1 TI s (w - x) +
TD s a TD s + 1
(c w - x)
Symbol y Kp s b w x TI a TD c
Description Output value Proportional gain Laplace operator Proportional action weighting Setpoint Process value Integral action time Derivative delay coefficient (T1 = a TD) Derivative action time Derivative action weighting
The diagram below illustrates the integration of the parameters into the PID algorithm::
2750
Proportional gain
The value specifies the proportional gain of the controller.
2751
Deadband width
The deadband suppresses the noise component in the steady controller state. The deadband width specifies the size of the deadband. The deadband is off if the deadband width is 0.0.
Basic handling
Select the desired sampling time in the "Sampling time" drop-down list. All values in the tuning working area are updated in the selected update time. Click the "Start" icon in the measuring group if you want to use the commissioning functions. Value recording is started. The current values for the setpoint, process value and output value are entered in the trend view. Operation of the commissioning window is enabled.
2752
Selection of the display mode Trend view Area for moving and scaling the axes Ruler Legend with the trend values at the ruler
2753
Trend view
The trends for the setpoint (Setpoint), process value (Input) and output value are displayed in the trend view. In addition to different colors, the trends are identified by symbols (refer to legend).
2754
Move the mouse to the left edge of the trend area and watch out for the transition of the mouse pointer. Drag a vertical ruler onto the measuring trend that you want to analyze. To insert further rulers, press CTRL, click on the ruler and drag the new ruler into the trend area. The trend values are output left-aligned on the ruler. The time of the ruler position is displayed at the base of the ruler. The trend values of the active ruler are displayed in the legend. If several rulers are dragged to the trend area, the respectively last ruler is active. The active ruler is indicated by the correspondingly colored symbol. You can reactivate an inactive ruler by clicking it. Use the shortcut ALT+Click to remove rulers which are no longer required.
Pretuning
The pretuning function determines the process response to a setpoint jump and scans the system for the point of inflection. The optimized PID parameters are calculated as a function of the maximum slope and dead time of the controlled system. The higher the stability of the process value, the easier it is to calculate the PID parameters and increase precision of the result. Noise on the process value can be tolerated as long as the rate of rise of the process value is significantly higher compared to the noise. The PID parameters are backed up before being recalculated.
2755
Requirement
The PID_3Step instruction is called in a cyclic interrupt OB. ManualEnable = FALSE PID_3Step is in "inactive" or "manual" mode. The setpoint and the process value lie within the configured limits (see "Process value settings" configuration).
Procedure
Proceed as follows to carry out pretuning: 1. Double-click on "PID_3Step > Commissioning" in the project tree. 2. Select the entry "Pretuning" in the "Tuning mode" drop-down list in the working area "Tuning". 3. Click the "Start" icon. An online connection will be established. Value recording is started. Pretuning is started. The "Status" field displays the current steps and any errors that may have occurred. The progress bar indicates the progress of the current step. Note Click the "Stop" icon when the progress bar has reached 100% and it is to be assumed the controller tuning function is blocked. Check the configuration of the technology object and, if necessary, restart controller tuning.
Result
The PID parameters will have been optimized if pretuning has been executed without errors. PID_3Step changes to automatic mode and uses the optimized parameters. The optimized PID parameters will be retained during power OFF and a restart of the CPU. If pretuning is not possible, PID_3Step changes to "Inactive" mode.
Fine tuning
Fine tuning generates a constant, limited oscillation of the process value. The PID parameters are optimized for the operating point from the amplitude and frequency of this oscillation. All PID parameters are recalculated on the basis of the findings. PID parameters from fine tuning usually have better master control and disturbance behavior than PID parameters from pretuning.
2756
Requirement
The PID_3Step instruction is called in a cyclic interrupt OB. ManualEnable = FALSE The motor transition time has been configured or measured. The setpoint and the process value lie within the configured limits (see "Process value settings" configuration). The control loop has stabilized at the operating point. The operating point is reached when the process value corresponds to the setpoint. No disturbances are expected. PID_3Step is in inactive mode, automatic mode or manual mode.
2757
Procedure
Proceed as follows to carry out "fine tuning": 1. Select the entry "Fine tuning" in the "Tuning mode" drop-down list. 2. Click the "Start" icon. An online connection will be established. Value recording is started. The process of fine tuning is started. The "Status" field displays the current steps and any errors that may have occurred. The progress bar indicates the progress of the current step. Note Click the "Stop" icon in the "Tuning mode" group when the progress bar has reached 100% and it is to be assumed the controller tuning function is blocked. Check the configuration of the technology object and, if necessary, restart controller tuning.
Result
The PID parameters will have been optimized if fine tuning has been executed without errors. PID_3Step changes to automatic mode and uses the optimized parameters. The optimized PID parameters will be retained during power OFF and a restart of the CPU. If errors occurred during fine tuning, PID_3Step will change to "inactive" mode.
Result
PID_3Step changes to automatic mode and controls using the current PID parameters.
2758
Result
The actuator is moved from the starting position to the target position. Time measurement starts immediately and ends when the actuator reaches the target position. The motor transition time is calculated according to the following equation: Motor transition time = (output value high limit output value low limit) Measuring time / AMOUNT (target position starting position). The progress and status of transition time measurement are displayed. The transition time measured is saved in the instance data block on the CPU and displayed in the "Measured transition time" field. PID_3Step will change to "Inactive" mode once transition time measurement is complete. Note "Load measured transition time" to load the motor transition time Click on the icon measured to the project.
2759
Result
The actuator is moved in the selected direction. Time measurement will start once the actuator has reached the first endstop and will end when the actuator reaches this endstop for the second time. The motor transition time is equal to the time measured divided by two. The progress and status of transition time measurement are displayed. The transition time measured is saved in the instance data block on the CPU and displayed in the "Measured transition time" field. PID_3Step will change to "Inactive" mode once transition time measurement is complete.
2760
11.2
11.2.1
11.2.1.1
Motion Control
Using S7-1200 Motion Control
Introduction
See also
Hardware components for motion control (Page 2762) Integration of the axis technology object (Page 2774) Use of the command table technology object (Page 2802) Command table technology object tools (Page 2802)
2761
CPU S7-1200:
CPU S7-1200 combines the functionality of a programmable logic controller with motion control functionality for operation of stepper motors and servo motors with pulse interface. The motion control functionality takes over the control and monitoring of the drives. The DC/DC/DC variants of the CPU S7-1200 have onboard outputs for direct control of drives. The relay variants of the CPU require one of the signal boards described below to control a drive.
Signal board
You add further inputs and outputs to the CPU with the signal boards. The digital outputs can be used as pulse and direction outputs for controlling drives as required. In CPUs with relay outputs, the pulse signal cannot be output on the on-board outputs because the relays do not support the necessary switching frequencies. A signal board with digital outputs must be used to enable you to work with the PTO (Pulse Train Output) on these CPUs. When a DC/DC/DC variant of the CPU S7-1200 is used together with a signal board, the maximum number of controllable drives is limited to "2".
2762
PROFINET
Use the PROFINET interface to establish the online connection between the CPU S7-1200 and the programming device. In addition to the online functions of the CPU, additional commissioning and diagnostic functions are available for motion control.
2 -
Ordering information
The order information listed below applies to the currently installed product phase (without any installed Hardware Support Packages) of the TIA Portal.
Name CPU 1211C DC/DC/DC CPU 1211C AC/DC/RLY CPU 1211C DC/DC/RLY CPU 1212C DC/DC/DC CPU 1212C AC/DC/RLY CPU 1212C DC/DC/RLY CPU 1214C DC/DC/DC CPU 1214C AC/DC/RLY MLFB (order no.) 6ES7211-1AD30-0XB0 6ES7211-1BD30-0XB0 6ES7211-1HD30-0XB0 6ES7212-1AD30-0XB0 6ES7212-1BD30-0XB0 6ES7212-1HD30-0XB0 6ES7214-1AE30-0XB0 6ES7214-1BE30-0XB0
2763
Use a Hardware Support Package (HSP) to install new hardware components. The hardware component will then be available in the hardware catalog.
See also
Motion functionality of the CPU S7-1200 (Page 2761) CPU outputs relevant for motion control (Page 2764)
11.2.1.2
CPU outputs relevant for motion control Pulse and direction output
The CPU provides one pulse output and one direction output for controlling a stepper motor drive or a servo motor drive with pulse interface. The pulse output provides the drive with the pulses required for motor motion. The direction output controls the travel direction of the drive. Pulse and direction outputs are permanently assigned to one another. Onboard CPU outputs or outputs of a signal board can be used as pulse and direction outputs. You select between onboard CPU outputs and outputs of the signal board during device configuration under Pulse generators (PTO/PWM) on the "Properties" tab. The following table shows the address assignment of the pulse and direction outputs:
CPU S7-1200: Without signal board Outputs PTO1 Pls. CPU 1211C, CPU 1212C, CPU 1214C (DC/DC/DC) Ax.0 Dir. Ax.1 Outputs PTO2 Pls. Ax.2 Dir. Ax.3 Signal boards DI2/DO2 *) Outputs PTO1 Pls. Ax.0 Ay.0 Dir. Ax.1 Ay.1 Outputs PTO2 Pls. Ax.2 Dir. Ax.3 Pls. Ax.0 Ay.0 Signal boards DO4 **) Outputs PTO1 Dir. Ax.1 Ay.1 Outputs PTO2 Pls. Ax.2 Ay.2 Dir. Ax.3 Ay.3
2764
Ay.0
Ay.1
Ay.0
Ay.1
Ay.2
Ay.3
x = Initial byte address of onboard CPU outputs (default value = 0) y = Initial byte address of signal board outputs (default value = 4) * If a DC/DC/DC CPU variant is used together with a DI2/DO2 signal board, the signals of the PTO1 can be generated via the onboard CPU outputs or via the signal board. ** If a DC/DC/DC CPU variant is used together with a DO4 signal board, the signals for PTO1 and PTO2 can be generated via the onboard CPU outputs or via the signal board.
Drive interface
For motion control, you can optionally parameterize a drive interface for "Drive enabled" and "Drive ready". When using the drive interface the digital output for the drive enable and the digital input for "drive ready" can be freely selected. Note The firmware will take control via the corresponding pulse and direction outputs if the PTO (Pulse Train Output) has been selected and assigned to an axis. With this takeover of the control function, the connection between the process image and I/ O output is also disconnected. While the user has the possibility of writing the process image of pulse and direction outputs via the user program or watch table, this is not transferred to the I/O output. Accordingly, it is also not possible to monitor the I/O output via the user program or watch table. The information read reflects the value of the process image and does not match the real status of the I/O output. For all other CPU outputs that are not used permanently by the CPU firmware, the status of the I/O output can be controlled or monitored via the process image, as usual.
2765
See also
How the pulse interface works (Page 2766) Relationship between the travel direction and voltage level at the direction output (Page 2767) Hardware and software limit switches (Page 2768) Jerk limit (Page 2769) Homing (Page 2770) Hardware components for motion control (Page 2762) Integration of the axis technology object (Page 2774) Tools of the axis technology object (Page 2776)
(The statements made here also apply to servo motors with pulse interface.)
See also
CPU outputs relevant for motion control (Page 2764) Relationship between the travel direction and voltage level at the direction output (Page 2767) Hardware and software limit switches (Page 2768) Jerk limit (Page 2769) Homing (Page 2770) Integration of the axis technology object (Page 2774) Tools of the axis technology object (Page 2776)
2766
Relationship between the travel direction and voltage level at the direction output
The direction output of the CPU specifies the travel direction of the drive. You configure the direction signal under "Mechanics" in the axis configuration. The relationships between configuration, direction output, and travel direction are presented in the following diagram:
If "Invert direction signal" is deactivated in the configuration, a level of 5 V / 24 V will be output at the direction output for a positive travel direction (the voltage depends on the hardware used). A 0 V level will be output at the direction output for positive travel direction if "Invert direction signal" is activated in the configuration.
2767
See also
CPU outputs relevant for motion control (Page 2764) How the pulse interface works (Page 2766) Hardware and software limit switches (Page 2768) Jerk limit (Page 2769) Homing (Page 2770) Integration of the axis technology object (Page 2774) Tools of the axis technology object (Page 2776)
Hardware limit switches are limit switches that limit the maximum "permitted traversing range" of the axis. Hardware limit switches are physical switching elements that must be connected to interrupt-capable inputs of the CPU. Software limit switches limit the "working range" of the axis. They should fall inside the hardware limit switches relative to the traversing range. Since the positions of the software limit switches can be flexibly set, the working range of the axis can be adapted on an individual basis, depending on the current traversing profile. In contrast to hardware limit switches, software limit switches are implemented exclusively via the software and do not require their own switching elements. Hardware and software limit switches must be activated prior to use in the configuration or in the user program.. Software limit switches are only active after homing the axis.
2768
See also
CPU outputs relevant for motion control (Page 2764) How the pulse interface works (Page 2766) Relationship between the travel direction and voltage level at the direction output (Page 2767) Jerk limit (Page 2769) Homing (Page 2770) Integration of the axis technology object (Page 2774) Tools of the axis technology object (Page 2776) Position limits (Page 2784)
Jerk limit
With the jerk limit you can reduce the stresses on your mechanics during an acceleration and deceleration ramp. The acceleration and deceleration value is not changed abruptly when the jerk limiter is active; it is gradually increased and decreased. The figure below shows the velocity and acceleration curve without and with jerk limit.
Travel without jerk limit Travel with jerk limit
The jerk limit gives a "smoothed" velocity profile of the axis motion. This ensures soft starting and braking of a conveyor belt for example.
2769
See also
Behavior of the axis when using the jerk limit (Page 2793) CPU outputs relevant for motion control (Page 2764) How the pulse interface works (Page 2766) Relationship between the travel direction and voltage level at the direction output (Page 2767) Hardware and software limit switches (Page 2768) Homing (Page 2770) Integration of the axis technology object (Page 2774) Tools of the axis technology object (Page 2776)
Homing
Homing means matching the axis coordinates of the technology object to the real, physical location of the drive. For position-controlled axes the entries and displays for the position refer exactly to these axis coordinates. Therefore, agreement between the axis coordinates and the real situation is extremely important. This step is necessary to ensure that the absolute target position of the axis is also achieved exactly with the drive. In the S7-1200 CPU, axis homing is implemented with the motion control instruction, "MC_Home". The following homing modes exist:
Homing modes
Active homing In active homing mode, the motion control instruction "MC_Home" performs the required reference point approach. When the homing switch is detected, the axis is homed according to the configuration. Active traversing motions are aborted. Passive homing During passive homing, the motion control instruction "MC_Home" does not carry out any homing motion. The traversing motion required for this step must be implemented by the user via other motion control instructions. When the homing switch is detected, the axis is homed according to the configuration. Active traversing motions are not aborted upon start of passive homing. Direct homing absolute The axis position is set regardless of the homing switch. Active traversing motions are not aborted. The value of input parameter "Position" of motion control instruction "MC_Home" is set immediately as the reference point of the axis. Direct homing relative The axis position is set regardless of the homing switch. Active traversing motions are not aborted. The following statement applies to the axis position after homing: New axis position = current axis position + value of parameter "Position" of instruction "MC_Home".
2770
See also
CPU outputs relevant for motion control (Page 2764) How the pulse interface works (Page 2766) Relationship between the travel direction and voltage level at the direction output (Page 2767) Hardware and software limit switches (Page 2768) Jerk limit (Page 2769) Integration of the axis technology object (Page 2774) Tools of the axis technology object (Page 2776) Homing (technology object "Axis" as of V2.0) (Page 2795)
11.2.1.3
Requirements
To use the "Axis" technology object, you must create a project with a CPU S7-1200.
Procedure
Follow the steps below in the order given to use motion control with the CPU S7-1200. Use the following links for this purpose: 1. Add technological object Axis (Page 2778) 2. Working with the configuration dialog (Page 2779) 3. Download to CPU (Page 2819) 4. Function test of the axis in the commissioning window (Page 2821) 5. Programming (Page 2823) 6. Diagnostics of the axis control (Page 2839)
11.2.1.4
Overview of versions
The relationship between the relevant versions for S7-1200 Motion Control can be found in the following table:
Technology version
You can check the technology version currently selected in Task Card Instructions > Technology > Motion Control > S7-1200 Motion Control and in the "Add new object" dialog. Select the technology version in Task Card Instructions > Technology > Motion Control >
2771
2772
Compatibility list
Technology V1.0 CPU V1.0, V2.0, V2.1, V2.2 Technology object Axis V1.0 Motion Control Instruction MC_Power V1.0 MC_Reset V1.0 MC_Home V1.0 MC_Halt V1.0 MC_MoveAbsolute V1.0 MC_MoveRelative V1.0 MC_MoveVelocity V1.0 MC_MoveJog V1.0 V2.0 Innovations: Jerk control Command table MC_ChangeDynamic V2.1, V2.2 Axis V2.0, Command table V2.0 MC_Power V2.0 MC_Reset V2.0 MC_Home V2.0 MC_Halt V2.0 MC_MoveAbsolute V2.0 MC_MoveRelative V2.0 MC_MoveVelocity V2.0 MC_MoveJog V2.0 MC_CommandTable V2.0 MC_ChangeDynamic V2.0 V3.0 Innovation: Load in RUN operating mode V2.2 Axis V3.0, Command table V3.0 MC_Power V3.0 MC_Reset V3.0 MC_Home V3.0 MC_Stop V3.0 MC_MoveAbsolute V3.0 MC_MoveRelative V3.0 MC_MoveVelocity V3.0 MC_MoveJog V3.0 MC_CommandTable V3.0 MC_ChangeDynamic V3.0
2773
11.2.1.5
2774
CPU hardware
The physical drive is controlled and monitored by the CPU hardware.
Drive
The drive represents the unit of power unit and motor. Stepper motors or servo motors with a pulse interface may be used.
User program
You start motion control instructions jobs in the CPU firmware with the user program. The following jobs for controlling the axis are possible: Position axis absolutely Position axis relatively Move axis with velocity set point Run axis jobs as movement sequence (as of technology V2.0) Move axis in jog mode Stop axis Reference axis; set reference point Acknowledge error You determine the command parameters with the input parameters of the Motion Control instructions and the axis configuration. The output parameters of the instruction give you up to date information about the status and any errors of the command. Before starting a command for the axis, you must enable the axis with the motion control instruction "MC_Power". You can read out configuration data and current axis data with the tags of the technology object. You can change single, changeable tags of the technology object (e.g. the current acceleration) from the user program.
2775
CPU firmware
The motion control jobs started in the user program are processed in the CPU firmware. When using the axis control table, Motion Control jobs are triggered by operating the axis control table. The CPU firmware performs the following jobs depending on the configuration: Calculate the exact motion profile for motion jobs and emergency stop situations Control the drive enable and the pulse and direction signal Monitor the drive and the hardware and software limit switches Up to date feedback of status and error information to the motion control instructions in the user program Writing of current axis data into the data block of the technology object
See also
CPU outputs relevant for motion control (Page 2764) Relationship between the travel direction and voltage level at the direction output (Page 2767) Tools of the axis technology object (Page 2776) Hardware and software limit switches (Page 2768) Homing (Page 2770) Tag of the Axis technology object (Page 2866)
2776
Reading and writing of configuration data of the technology object; Drive control via the technology object; Reading axis status for display on the control panel Readout of the current status and error information of the technology object.
Configuration
Use the "Configuration" tool to configure the following properties of the "Axis" technology object: Selection of the PTO to be used and configuration of the drive interface Properties of the mechanics and the transmission ratio of the drive (or machine or system) Properties for position monitoring, dynamics, and homing Save the configuration in the data block of the technology object.
2777
Commissioning
Use the "Commissioning" tool to test the function of your axis without having to create a user program. When the tool is started, the axis control table will be displayed. The following commands are available on the axis control table: Releasing and blocking the axis Move axis in jog mode Position axis in absolute and relative terms Home axis Acknowledge errors The dynamic values can be adjusted accordingly for the motion commands. The axis control table also shows the current axis status.
Diagnostics
Use the "Diagnostics" tool to keep track of the current status and error information for the axis and drive.
See also
CPU outputs relevant for motion control (Page 2764) Relationship between the travel direction and voltage level at the direction output (Page 2767) Integration of the axis technology object (Page 2774) Hardware and software limit switches (Page 2768) Homing (Page 2770) Configuring the axis technoloogy object (Page 2779) Commissioning the axis - Axis control panel (Page 2821) Axis - Diagnostics (Page 2839)
Requirements
A project with a CPU S7-1200 has been created.
Procedure
1. Open the CPU folder in the project tree. 2. Open the technology objects folder.
2778
Result
The new technology object is created and saved to the "Technology objects" folder in the project tree.
See also
Guidelines on use of motion control (Page 2771)
Configuring the axis technoloogy object Working with the configuration dialog
You configure the properties of the technology object in the configuration window. Proceed as follows to open the configuration window of the technology object: 1. Open the group of the required technology object in the project tree. 2. Double-click the "Configuration" object. The configuration is divided into the following categories: Basic parameters The basic parameters contain all the parameters which must be configured for a functioning axis. Extended parameters The advanced parameters include parameters to adapt to your drive or your plant.
2779
See also
Guidelines on use of motion control (Page 2771) Basic parameters (Page 2780) Extended parameters (Page 2782)
Axis name:
Define the name of the axis or the name of the "Axis" technology object in this box. The technology object is listed under this name in the project navigation.
Hardware interface
The pulses are output to the power unit of the drive by fixed assigned digital outputs.
2780
2781
4. In the "Pulse generator as:" dropdown list select the "PTO" entry. 5. In the "Output source:" dropdown list select the "Integrated CPU output" or "Signal board output" entry. The "Signal board output" entry can only be selected for PTO1 or for PTO1 and PTO2 depending on the plugged signal board. For more detailed information, see chapter: CPU outputs relevant for motion control (Page 2764) 6. Go back to the axis configuration. Unless the corresponding fast counter has already been used elsewhere, the PTO boxes of the "General" axis configuration are not shaded red. Correct the configuration based on the error messages if this is not the case.
User unit
Select the desired unit for the dimension system of the axis in the dropdown list. The selected unit is used for the further configuration of the "Axis" technology object and for the display of the current axis data. The values at the input parameters (Position, Distance, Velocity, ...) of the Motion Control instructions also refer to this unit. NOTICE Later changing of the dimension system may not be converted correctly in all the configuration windows of the technology object. In this case check the configuration of all axis parameters. The values of the input parameters of the Motion Control instructions may have to be adapted to the new unit of measurement in the user program.
2782
See also
Configuration - Mechanics (Page 2783) Position limits (Page 2784) Dynamics (Page 2788) Homing (technology object "Axis" as of V2.0) (Page 2795)
Configuration - Mechanics
Configure the mechanical properties of the drive in the "Mechanics" configuration window.
2783
See also
Configuration - Drive interface (Page 2782) Position limits (Page 2784) Dynamics (Page 2788) Homing (technology object "Axis" as of V2.0) (Page 2795) Relationship between the travel direction and voltage level at the direction output (Page 2767)
See also
Configuration - Position limits (Page 2784) Behavior of axis when position limits is tripped (Page 2785) Changing the position limits configuration in the user program (Page 2787)
2784
Active level
In the drop-down list, select the signal level available at the CPU when the hardware limit switch is approached. "Low level" selected 0 V (FALSE) at CPU input corresponds to hardware limit switch approached "High level" selected 5 V / 24 V (TRUE) at the CPU input = hardware limit switch approached (the actual voltage depends on the hardware used)
See also
Requirements for hardware limit switches (Page 2784) Behavior of axis when position limits is tripped (Page 2785) Changing the position limits configuration in the user program (Page 2787) Configuration - Homing - Active (Page 2797)
Behavior of axis when position limits is tripped Behavior of axis when hardware limit switches are approached
When the hardware limit switches are approached, the axis brakes to a standstill at the configured emergency stop deceleration. The specified emergency stop deceleration must be
2785
The axis brakes to a standstill at the configured emergency stop deceleration. Range in which the HW limit switches signal the status "approached".
The "HW limit switch approached" error is displayed in the motion control instruction to be initiated, in "MC_Power", and in the technology object tags. Instructions for eliminating errors can be found in the Appendix under "List of ErrorIDs and ErrorInfos".
2786
The "SW limit switch reached" error is displayed in the motion control instruction to be initiated, in "MC_Power", and in the technology object tags. Instructions for eliminating errors can be found in the Appendix under "List of ErrorIDs and ErrorInfos". The circumstances under which the "SW limit switch exceeded" error is displayed can be obtained in the topics "Software limit switches in conjunction with a homing operation (Page 2850)" and "Software limit switches in conjunction with dynamic changes (Page 2855)". Use additional hardware limit switches if a mechanical endstop is located after the software limit switches and there is a risk of mechanical damage.
See also
Requirements for hardware limit switches (Page 2784) Configuration - Position limits (Page 2784) Changing the position limits configuration in the user program (Page 2787)
2787
See also
MC_ChangeDynamic: Changing the dynamic settings for the axis (as of technology object "Axis" V2.0) (Page 1739) Requirements for hardware limit switches (Page 2784) Configuration - Position limits (Page 2784) Behavior of axis when position limits is tripped (Page 2785)
2788
Rampup time =
Deceleration time =
Motion jobs started in the user program are performed with the selected acceleration / deceleration. Limit values: The limits indicated below refer to the "Pulses/s2" units of measurement:
2789
2790
Motion jobs started in the user program are performed with the selected jerk. Limit values: The limits indicated below refer to the Pulses/s3 units of measurement: 0.04 jerk 1.5e8 The limits for other units of measurement must be converted to conform to the given mechanics.
See also
Behavior of the axis when using the jerk limit (Page 2793) Configuration - Dynamics emergency stop (Page 2791) Changing the configuration of dynamics in the user program (Page 2794)
Velocity limits
The velocity values configured in the "General dynamics" configuration window are once again displayed in this information area.
Deceleration
Set the deceleration value for emergency stop in the "Emergency stop deceleration" or "Emergency stop ramp-down time" field. The relation between emergency stop deceleration time and emergency stop deceleration is shown in the following equation:
2791
See also
Configuration - General dynamics (Page 2788) Changing the configuration of dynamics in the user program (Page 2794)
2792
t v a
2793
The example shows travel in which the deceleration value is twice the acceleration value . The resulting ramp-down time trd is therefore only half the length of the ramp-up time tru. Acceleration and deceleration change abruptly without a jerk limit. Acceleration and deceleration change gradually with activated jerk limiter. As the jerk applies to entire motion, the rate is the same for the increase and decrease in acceleration and deceleration. The step value j becomes infinitely high as soon as the change is made without jerk limit. The step is limited to the configured value when the jerk limit is activated. The smoothing time tju given in the configuration applies to the acceleration ramp. The deceleration ramp smoothing time tju is calculated using the configured jerk value and the configured deceleration.
See also
Configuration - General dynamics (Page 2788)
2794
See also
MC_ChangeDynamic: Changing the dynamic settings for the axis (as of technology object "Axis" V2.0) (Page 1739) Configuration - General dynamics (Page 2788) Configuration - Dynamics emergency stop (Page 2791)
2795
See also
Sequence - Active homing (Page 2800)
2796
Approach/homing direction
With the direction selection, you determine the approach direction used during active homing to search for the homing switch, as well as the homing direction. The homing direction specifies the travel direction the axis uses to approach the configured side of the homing switch to carry out the homing operation.
Velocity
In this field, specify the velocity at which the homing switch is to be searched for during the reference point approach. Limits (independent of the selected unit of measurement):
2797
Homing velocity
Specify in this field the velocity at which the homing switch is to be approached for homing. Limits (independent of the selected unit of measurement): Start/stop velocity Homing velocity Maximum velocity
Home position
The position for which parameters were assigned in the Motion Control instruction "MC_Home" is used as the reference point position.
2798
2799
2800
See also
Configuration - Homing - General (Page 2795)
Passive homing
You can change the side of the homing switch for passive homing during the user program runtime. Use the following technology object tag for this purpose: <Axis name>.Config.Homing.SidePassiveHoming for changing the side of the homing switch Please refer to the description of the technology object tags in the Appendix for information on when changes to the configuration parameter become effective.
Active homing
You can change the direction of approach, the side of the homing switch, the approach velocity, the homing velocity, and the home position offset for active homing during the program runtime of the user program. Use the following technology object tags for this purpose: <Axis name>.Config.Homing.AutoReversal for changing "auto reverse at the HW limit switch" <Axis name>.Config.Homing.Direction for changing "approach / homing direction" <Axis name>.Config.Homing.SideActiveHoming for changing the "side of the homing switch" <Axis name>.Config.Homing.FastVelocity for changing the "velocity" <Axis name>.Config.Homing.SlowVelocity for changing the "homing velocity" <Axis name>.Config.Homing.Offset for changing "home position offset" Please refer to the description of the technology object tags in the Appendix for information on when changes to the configuration parameter become effective.
See also
MC_ChangeDynamic: Changing the dynamic settings for the axis (as of technology object "Axis" V2.0) (Page 1739)
2801
11.2.1.6
2802
Configuration
Configure the following properties of the "Command Table" technology object with the "Configuration" tool: You can create one or more movement sequences by configuring individual jobs. You can configure the graphic display to check your movement sequence using an axis already configured or a configurable default axis. The movement sequence data are saved in the data block of the technology object.
Prerequisites
A project with a CPU S7-1200 has been created. The CPU firmware version is V2.1 or higher
Procedure
1. Open the CPU folder in the project tree. 2. Open the technology objects folder. 3. Double-click "Add new object". The "Add new object" dialog opens. 4. Select the "Motion" technology. 5. Open the "Motion Control" folder. 6. Open the "S7-1200 Motion Control" folder 7. Select the version "V2.0" of the "S7-1200 Motion Control" folder (click on the entry for the version). 8. Select the "TO_CommandTable" object. 9. Change the name of the command table in the "Name" input field to suit your needs. 10.Select the "Manual" option if you want to change the suggested data block number. 11.Click "More information" if you want to supplement user information for the technology object. 12.Click "OK" to add the technology object. Click "Cancel" to discard your entries.
Result
The new technology object is created and saved to the "Technology objects" folder in the project tree.
2803
Configuring the command table technology object Working with the configuration dialog
You configure the properties of the technology object in the configuration window. Proceed as follows to open the configuration window of the technology object: 1. Open the group of the required technology object in the project tree. 2. Double-click the "Configuration" object. The configuration is divided into the following categories: Basic parameters The basic parameters contain all parameters which must be configured for a functional command table. Extended parameters The extended parameters contain the parameters of the default axis or display the parameter values of the axis selected.
See also
Guidelines on use of motion control (Page 2771) Basic parameters (Page 2804) Extended parameters (Page 2817)
2804
Name
Define the name of the command table or the name of the "Command table" technology object in this field. The technology object will be listed under this name in the project tree.
See also
Configuration - Command table (Page 2805) Shortcut menu commands - Command table (Page 2808) Working with the trend diagram (Page 2810) Shortcut menu commands - Curve chart (Page 2814) Transition from "Complete command" to "Blend motion" (Page 2815) Changing the command table configuration in the user program (Page 2816)
Activate warnings
Activate the display of warnings in the command table with this checkbox.
Column: Step
Shows the step number of the command.
2805
Column: Position
Enter the position or travel path for the selected command in this column: Command "Positioning relative" The command will move the axis by the the given travel path. Command "Positioning absolute" The command will move the axis by the the given position. Separator The value given specifies the start position for the graphic display. Limit values (independent of the selected user unit): -1.0e12 position / distance -1.0e-12 1.0e-12 position / distance 1.0e12 Position / travel path = 0.0
2806
Column: Velocity
In this column, you enter the velocity for the selected command: Command "Positioning relative" The command will move the axis at the the given velocity. The given velocity will not be reached if the travel path selected is not large enough. Command "Positioning absolute" The command will move the axis at the the given velocity. The given velocity will not be reached if the target position is too close to the starting position. Command " Velocity setpoint" The command will move the axis at the the given velocity. The given velocity will not be reached during the command if too short a runtime is selected. Limit values (independent of the selected user unit): For the jobs: "Positioning relative" and "Positioning absolute" 1.0e-12 velocity 1.0e12 For the command: "Velocity setpoint" -1.0e12 velocity -1.0e-12 1.0e-12 velocity 1.0e12 Velocity = 0.0
Column: Duration
Enter the duration of the selected command in this column: Command " Velocity setpoint" The command will move the axis for the specified duration. The duration includes both the acceleration phase and the constant travel phase. The next command will be processed once the duration is over. Command "Wait" Waits until the given duration is over. Limit values (independent of the selected user unit):
2807
See also
Configuration - General (Page 2804) Shortcut menu commands - Command table (Page 2808) Working with the trend diagram (Page 2810) Shortcut menu commands - Curve chart (Page 2814) Transition from "Complete command" to "Blend motion" (Page 2815) Changing the command table configuration in the user program (Page 2816)
2808
Cut
Removes the selected lines or content of the selected cell and saves them/it in the clipboard. Selected lines will be deleted and the subsequent lines of the command table shifted up.
Copy
Copies the selected lines or content of the selected cell and saves them/it in the clipboard.
Paste
Selected lines: Pastes the lines from the clipboard into the table above the selected line. Selected cell: Pastes the content of the clipboard into the selected line. This shortcut menu command can only be executed if there are enough empty lines at the end of the command table.
Replace
Replaces the selected lines with the lines in the clipboard.
2809
Delete
Deletes the selected lines. The lines below in the command table shift up.
See also
Configuration - General (Page 2804) Configuration - Command table (Page 2805) Working with the trend diagram (Page 2810) Shortcut menu commands - Curve chart (Page 2814) Transition from "Complete command" to "Blend motion" (Page 2815) Changing the command table configuration in the user program (Page 2816)
2810
Curve section of a selected command Ruler Ruler position marking Software limit switch position Start/stop velocity Position axis scale range Time axis scale range Velocity axis scale range Scroll bar, position axis Scroll bar time axis Scroll bar, velocity axis Selecting the grid
Selecting commands
Commands can be selected in the trend view and in the command table: Click on a point on the velocity or position curve in the trend view. The corresponding command will be highlighted in the command table. Select a command in the command table. The corresponding section of curve will be highlighted.
2811
Range which the curve values and / or limits are within. (see Selecting in the shortcut menu) Selected range to be shown in the trend window. You set the range with the margin cursor at the right-hand and left-hand margin.
You set the position within range with the drag cursor.
Selecting the section to be shown with the mouse: Drag a section of the trend view by clicking and dragging with the mouse. The section of curve selected will be enlarged once you release the mouse.
2812
Undoing the last change to the section: Select the shortcut command "Undo zoom" to undo the last change to the section.
2813
See also
Configuration - General (Page 2804) Configuration - Command table (Page 2805) Shortcut menu commands - Command table (Page 2808) Shortcut menu commands - Curve chart (Page 2814) Transition from "Complete command" to "Blend motion" (Page 2815) Changing the command table configuration in the user program (Page 2816)
Zoom 100%
Selects a zoom factor which will show 100% of the curve values and / or limits.
Undo zoom
Undoes the last zoom change.
Scale to curves
Scales the axes so the position and velocity curves are visible.
Show ruler
Fades the ruler in / out Use the ruler when you want to see the individual values of the curves.
2814
See also
Configuration - General (Page 2804) Configuration - Command table (Page 2805) Shortcut menu commands - Command table (Page 2808) Working with the trend diagram (Page 2810) Transition from "Complete command" to "Blend motion" (Page 2815) Changing the command table configuration in the user program (Page 2816)
1. Job "Positioning Relative" or "Positioning Absolute" 2. Job "Velocity set point" 2. Job "Positioning Relative" or "Positioning Absolute"
2815
See also
Configuration - General (Page 2804) Configuration - Command table (Page 2805) Shortcut menu commands - Command table (Page 2808) Working with the trend diagram (Page 2810) Shortcut menu commands - Curve chart (Page 2814) Changing the command table configuration in the user program (Page 2816)
2816
See also
Configuration - General (Page 2804) Configuration - Command table (Page 2805) Shortcut menu commands - Command table (Page 2808) Working with the trend diagram (Page 2810) Shortcut menu commands - Curve chart (Page 2814) Transition from "Complete command" to "Blend motion" (Page 2815)
Unit of measurement
Enter the unit of measurement for the default axis in this field. If a preconfigured axis has been selected under "Use axis parameters of", the unit of measurement configured in these parameter will be displayed.
2817
Configuration - Dynamics
Configure the acceleration and deceleration and the jerk limit for the default axis in the "Dynamics" configuration window. Note If the default axis has been selected under "Use axis parameters of", the following fields can be edited. If a configured axis has been selected, the values of this axis will be displayed.
Acceleration / deceleration
Set the desired acceleration of the default axis in the "Acceleration" field. The desired deceleration can be set in the "Deceleration" field. Motion jobs configured in the command table will be calculated with the selected acceleration / deceleration. Limit values: 1.0e-12 acceleration 1.0e12 1.0e-12 deceleration 1.0e12
Step
Set the desired step for ramping up and ramping down in the "Step" field. Motion jobs configured in the command table will be calculated with the selected step. Limit values: 1.0e-12 jerk 1.0e12
2818
11.2.1.7
Download to CPU
When loading to the CPU S7-1200 always ensure that the project files are consistent after the online and offline loading. It is not possible to load single blocks. When selecting single blocks, all new and modified blocks are always loaded. The following object groups can be loaded to the CPU:
Context menu command "Download to device" All Hardware configuration Software Software (all blocks)
Description Download all new and modified blocks and a new or modified hardware configuration Download a new or modified hardware configuration Download all new and modified blocks Download all blocks
2819
Download in CPU S7-1200 RUN operating mode (from firmware version V2.2)
For CPU S7-1200 from firmware version V2.2, when loading in CPU RUN operating mode it is checked whether it is possible to load without stopping the CPU. The following conditions apply when loading data blocks in RUN operating mode:
Download to load memory Data block modified values Data block modified structure New data block Data block deleted Yes No Yes Yes Download to work memory No No Yes Yes
From technology version V3.0, Motion Control technology objects (data blocks) can also be downloaded in CPU RUN operating mode. Technology objects after V3.0 cannot be downloaded in CPU RUN operating mode. Select one of the actions described below to download the modified version of a Motion Control technology object (from version V3.0) to the work memory: Technology object axis and command table Change the CPU operating mode from STOP to RUN. Technology object axis Disable the axis and execute a "Restart" using the Motion Control instruction "MC_Reset". Technology object command table Ensure that the command table is not being used. Download the data block of the command table to the work memory using the extended instruction "READ_DBL".
2820
Note In contrast to downloading in STOP operating mode, no actual parameters are overwritten in RUN operating mode. Modifications to the actual parameters only take place at the next change of operating mode from STOP to RUN.
See also
Guidelines on use of motion control (Page 2771) MC_Reset: Acknowledge error (Page 1714)
11.2.1.8
2821
"Enable" button
Click "Enable" to enable the axis in "Manual control" mode. When the axis is enabled, the axis control panel functions can be used. If the axis cannot be enabled because certain conditions are not met, note the error message in the "Error message" field. Information on eliminating errors is available in the Appendix under "List of ErrorIDs and ErrorInfos". After the error has been corrected, enable the axis again.
"Disable" button
Click "Disable" if you want to temporarily disable the axis in "Manual control" mode.
"Command" area
Operation in the "Command" area is only possible if the axis is enabled. You can select one of the following command inputs: Jogging This command is equivalent to motion control command "MC_MoveJog" in the user program. Positioning This command is equivalent to the motion control jobs "MC_MoveAbsolute" and "MC_MoveRelative" in the user program. The axis must be homed for absolute positioning. Homing This command is equivalent to motion control command "MC_Home" in the user program. The "Set reference point" button corresponds to Mode = 0 (direct homing absolute) The "Active homing" button corresponds to Mode = 3 (active homing) For active homing, the homing switch must be configured in the axis configuration. The values for approach velocity, homing velocity, and reference position offset are taken from the axis configuration unchanged. Depending on the selection, the relevant fields for entry of setpoints and the buttons for starting the command are displayed.
2822
Error message
The "Error message" field shows the current error. In "Manual control" mode, the error entry can be deleted by pressing the "Acknowledge" button once the error is eliminated. Note Initial values for velocity, acceleration / deceleration and jerk For safety reasons, the "Velocity", "Acceleration/deceleration" and "Jerk" parameters are initialized with values equivalent to only 10% of the configured values when the axis command table is activated. The "Jerk" parameter is only used for technology object "Axis" V2.0 and higher. The values in the configuration view displayed when you select "Extended parameters > Dynamics > General" are used for initialization. The "Velocity" parameter on the control panel is derived from the "Maximum velocity" and the "Acceleration/deceleration" parameters from "Acceleration" in the configuration. The "Velocity", "Acceleration/deceleration" and "Jerk" parameters can be changed in the axis command table; this does not affect the values in the configuration.
See also
Guidelines on use of motion control (Page 2771) Working with watch tables (Page 2842)
11.2.1.9
Programming
2823
See also
Creating a user program (Page 2824) Programming notes (Page 2827) Behavior of the Motion Control commands after POWER OFF and restart (Page 2829) Monitoring active commands (Page 2829) Error displays of the Motion Control statements (Page 2838)
Requirement
The technology object has been created and configured without errors. Before creating and testing the user program, it is advisable to test the function of the axis and the corresponding parts of the system with the axis command table.
Procedure
Proceed as follows to create the user program in accordance with the principles described below: 1. In the project tree, double-click your code block (the code block must be called in the cyclic program). The code block is opened in the programming editor and all available instructions are displayed. 2. Open the "Technology" category and the "Motion Control" and "S7-1200 Motion Control" folders. 3. Use a drag-and-drop operation to move the "MC_Power" instruction to the desired network of the code block. The dialog box for defining the instance DB opens.
2824
Parameters marked with "<???>" must be initialized; all other parameters are assigned default values. Parameters displayed in black are required for use of the Motion Control instruction.
2825
Following selection of the technology object data block, the following buttons are available:
Click the stethoscope icon if you want to open the diagnostics dialog for the technology object.
Click the toolbox icon if you want to open the configuration view of the technology object.
Click the arrow down icon to view additional parameters of the Motion Control instruction.
The grayed-out parameters now visible can be used optionally. 7. Add your choice of Motion Control instructions in accordance with steps 3 to 6.
Result
You have created the basic configuration for axis control in the user program.
STEP 7 Basic V11.0 SP2 System Manual, 12/2011,
2826
See also
Overview of the Motion Control statements (Page 2823) Programming notes (Page 2827) Behavior of the Motion Control commands after POWER OFF and restart (Page 2829) Monitoring active commands (Page 2829) Error displays of the Motion Control statements (Page 2838)
Programming notes
When creating your user program, note the following information: Cyclic call of utilized motion control instructions The current status of command execution is available via the output parameters of the motion control instruction. The status is updated with every call of the motion control instruction. Therefore, make sure that the utilized motion control instructions are called cyclically. Transfer of parameter values of a motion control instruction The parameter values pending for the input parameters are transferred with a positive edge at input parameter "Execute" when the block is called. The motion control command is started with these parameter values. Parameter values that are subsequently changed for the motion control instruction are not transferred until the next start of the motion control command. Exceptions to this are input parameters "StopMode" of motion control instruction "MC_Power" and "Velocity" of motion control instruction "MC_MoveJog". A change in the input parameter is also applied when "Enable" = TRUE, or "JogForward" and "JogBackward". .
2827
2828
See also
Overview of the Motion Control statements (Page 2823) Creating a user program (Page 2824) Behavior of the Motion Control commands after POWER OFF and restart (Page 2829) Monitoring active commands (Page 2829) Error displays of the Motion Control statements (Page 2838) Tracking jobs from higher priority classes (execution levels) (Page 2848)
Behavior of the Motion Control commands after POWER OFF and restart
A POWER OFF or CPU-STOP aborts all active motion control jobs. All CPU outputs, including pulse and direction outputs, are reset. After a subsequent POWER ON or CPU restart (CPU RUN), the technology objects and the motion control jobs will be reinitialized. All actual data of the technology objects as well as all status and error information of the previously active motion control jobs are reset to their initial values. Before the axis can be reused, it must be enabled again using the Motion Control instruction "MC_Power". If homing is required, the axis must be homed again with Motion Control instruction "MC_Home".
See also
Overview of the Motion Control statements (Page 2823) Creating a user program (Page 2824) Programming notes (Page 2827) Monitoring active commands (Page 2829) Error displays of the Motion Control statements (Page 2838)
2829
The job is started with a positive edge at the input parameter "Execute". Depending on the programming, "Execute" can still be reset to the value FALSE during the job, or the value TRUE can be retained until after completion of the job. While the job is active, the output parameter "Busy" indicates the value TRUE.
2830
Abort
Abort
With conclusion of the job (for example, for Motion Control instruction "MC_Home": Homing was successful), output parameter "Busy" changes to FALSE and "Done" to TRUE. If "Execute" retains the value TRUE until after completion of the job, then "Done" also remains TRUE and changes its value to FALSE together with "Execute". If "Execute" has been set to FALSE before the job is complete, "Done" indicates the value TRUE for only one execution cycle.
Abort job
If the motion control job is aborted during execution, this is indicated by the value TRUE in output parameter "CommandAborted". The signal status of the input parameter "Execute" influences the display duration in the output parameter "CommandAborted":
"Execute" changes its value to FALSE before the job is aborted. "Execute" changes its value to FALSE after the job is aborted.
Error
Error
The job is started with a positive edge at the input parameter "Execute". Depending on the programming, "Execute" can still be reset to the value FALSE during the job, or the value TRUE can be retained until after completion of the job. While the job is active, the output parameter "Busy" indicates the value TRUE. During job execution, the job is aborted by another motion control job. If the job is aborted, output parameter "Busy" changes to FALSE and "CommandAborted" to TRUE. If "Execute" retains the value TRUE until after the job is aborted, then "CommandAborted" also remains TRUE and changes its value to FALSE together with "Execute". If "Execute" has been set to FALSE before the job is aborted, "CommandAborted" indicates the value TRUE for only one execution cycle.
The job is started with a positive edge at the input parameter "Execute". Depending on the programming, "Execute" can still be reset to the value FALSE during the job, or the value TRUE can be retained until after completion of the job. While the job is active, the output parameter "Busy" indicates the value TRUE. An error occurred during job execution. When the error occurs, the output parameter "Busy" changes to FALSE and "Error" to TRUE.
2831
If "Execute" retains the value TRUE until after the error occurs, then "Error" also remains TRUE and only changes its value to FALSE together with "Execute". If "Execute" has been set to FALSE before the error occurs, "Error" indicates the value TRUE for only one execution cycle.
The job is started with a positive edge at the input parameter "Execute". Depending on the programming, "Execute" can be reset to the value FALSE event before the parameterized velocity is reached, or alternatively only after it has been reached. While the job is active, the output parameter "Busy" indicates the value TRUE. When the parameterized velocity is reached, the output parameter "InVelocity" changes to TRUE.
2832
Abort
Abort
If "Execute" retains the value TRUE even after the parameterized velocity has been reached, the job remains active. "InVelocity" and "Busy" retain the value TRUE and only change their status to FALSE together with "Execute". If "Execute" has been reset to FALSE before the parameterized velocity is reached, the job is complete when the parameterized velocity is reached. "InVelocity" indicates the value TRUE for one execution cycle and changes to FALSE together with "Busy".
The job is started with a positive edge at the input parameter "Execute". Depending on the programming, "Execute" can still be reset to the value FALSE during the job, or the value TRUE can be retained until after the job is aborted. While the job is active, the output parameter "Busy" indicates the value TRUE. During job execution, the job is aborted by another motion control job. If the job is aborted, output parameter "Busy" changes to FALSE and "CommandAborted" to TRUE. If "Execute" retains the value TRUE until after the job is aborted, then "CommandAborted" also remains TRUE and changes its status to FALSE together with "Execute". If "Execute" has been reset to FALSE before the job is aborted, "CommandAborted" indicates the value TRUE for only one execution cycle.
Note Under the following conditions, an abort is not indicated in output parameter "CommandAborted": The parameterized velocity has been reached, input parameter "Execute" has the value FALSE, and a new motion control job is initiated. When the parameterized velocity is reached and input parameter "Execute" has the value FALSE, the job is complete. Therefore, the start of a new job is not indicated as an abort.
2833
The job is started with a positive edge at the input parameter "Execute". Depending on the programming, "Execute" can still be reset to the value FALSE during the job, or the value TRUE can be retained until after the error has occurred. While the job is active, the output parameter "Busy" indicates the value TRUE. An error occurred during job execution. When the error occurs, the output parameter "Busy" changes to FALSE and "Error" to TRUE. If "Execute" retains the value TRUE until after the error has occurred, then "Error" also remains TRUE and only changes its status to FALSE together with "Execute". If "Execute" has been reset to FALSE before the error occurs, "Error" indicates the value TRUE for only one execution cycle.
Note Under the following conditions, an error is not indicated in output parameter "Error": The parameterized velocity has been reached, input parameter "Execute" has the value FALSE, and an axis error occurs (software limit switch is approached, for example). When the parameterized velocity is reached and input parameter "Execute" has the value FALSE, the job is complete. After completion of the job, the axis error is only indicated in the Motion Control instruction "MC_Power".
2834
The job is started with a positive edge at the input parameter "JogForward" or "JogBackward". While the job is active, the output parameter "Busy" indicates the value TRUE. When the parameterized velocity is reached, the output parameter "InVelocity" changes to TRUE. When the input parameter "JogForward" or "JogBackward" is reset to the value FALSE, the axis motion ends. The axis starts to decelerate. As a result, the axis no longer moves at constant velocity and the output parameter "InVelocity" changes its status to FALSE. If the axis has come to a standstill, the motion control job is complete and the output parameter "Busy" changes its value to FALSE.
2835
The job is started with a positive edge at the input parameter "JogForward" or "JogBackward". While the job is active, the output parameter "Busy" indicates the value TRUE. During job execution, the job is aborted by another motion control job. If the job is aborted, output parameter "Busy" changes to FALSE and "CommandAborted" to TRUE. When the input parameter "JogForward" or "JogBackward" is reset to the value FALSE, the output parameter "CommandAborted"" changes its value to FALSE.
Note The job abort is indicated in the output parameter "CommandAborted" for only one execution cycle, if all conditions below are met: The input parameters "JogForward" and "JogBackward" have the value FALSE (but the axis is still decelerating) and a new motion control job is initiated.
2836
The job is started with a positive edge at the input parameter "JogForward" or "JogBackward". While the job is active, the output parameter "Busy" indicates the value TRUE. An error occurred during job execution. When the error occurs, the output parameter "Busy" changes to FALSE and "Error" to TRUE. When the input parameter "JogForward" or "JogBackward" is reset to the value FALSE, the output parameter "Error" changes its value to FALSE.
Note An error occurrence is indicated in the output parameter "Error" for only one execution cycle, if all the conditions below are met: The input parameters "JogForward" and "JogBackward" have the value FALSE (but the axis is still decelerating) and a new error occurs (software limit switch is approached, for example).
2837
2838
See also
Overview of the Motion Control statements (Page 2823) Creating a user program (Page 2824) Programming notes (Page 2827) Behavior of the Motion Control commands after POWER OFF and restart (Page 2829) Monitoring active commands (Page 2829)
2839
Drive status
Status Drive ready Drive error Description The drive is ready for operation. (Tag of technology object: <Axis name>.StatusBits.DriveReady) The drive has reported an error after failure of its "Drive ready" signal. (Tag of technology object: <Axis name>.ErrorBits.DriveFault)
2840
Error messages
Error Low software limit switch has been reached Low software limit switch has been exceeded High software limit switch has been reached High software limit switch has been exceeded Low hardware limit switch was approached High hardware limit switch has been approached PTO and HSC already in use Description The low software limit switch has been reached. (Tag of technology object: <Axis name>.ErrorBits.SwLimitMinReached) The low software limit switch has been exceeded. (Tag of technology object: <Axis name>.ErrorBits.SwLimitMinExceeded) The high software limit switch has been reached. (Tag of technology object: <Axis name>.ErrorBits.SwLimitMaxReached) The high software limit switch has been exceeded. (Tag of technology object: <Axis name>.ErrorBits.SwLimitMaxExceeded) The low hardware limit switch has been approached. (Tag of technology object: <Axis name>.ErrorBits.HwLimitMin) The high hardware limit switch has been approached. (Tag of technology object: <Axis name>.ErrorBits.HwLimitMax) A second axis is using the same PTO (Pulse Train Output) and HSC (High Speed Counter) and is enabled with "MC_Power". (Tag of technology object: <Axis name>.ErrorBits.HwUsed) Configuration error The "Axis" technology object was incorrectly configured or editable configuration data were modified incorrectly during runtime of the user program. (Tag of technology object: <Axis name>.ErrorBits.ConfigFault) Internal error An internal error has occurred. (Tag of technology object: <Axis name>.ErrorBits.SystemFault)
See also
Motion status (Page 2841) StatusBits. tag (Page 2876) ErrorBits. tag (Page 2879)
Motion status
Use the "Motion status" diagnostic function to monitor the motion status of the axis in the TIA Portal. The diagnostic function display is available in online mode in "Manual control" mode and in "Automatic control" when the axis is active. The displayed status information has the following meaning:
Status Position Description The "Position" field indicates the current axis position. If the axis is not homed, the value indicates the position value relative to the enable position of the axis. (Tag of technology object: <Axis name>.MotionStatus.Position) Velocity The "Velocity" field indicates the current axis velocity. (Tag of technology object: <Axis name>.MotionStatus.Velocity)
2841
See also
Status and error bits (Page 2839) MotionStatus. tag (Page 2875)
Dynamics settings
Use the "Dynamics settings" diagnostic function to monitor the dynamic limit values of the axis in the TIA Portal. The diagnostic function display is available in online mode in "Manual control" mode and in "Automatic control" when the axis is active. The status information displayed has the following meaning:
Dynamic limit Acceleration Deceleration Emergency stop deceleration Step (as of technology object Axis V2.0) Description The "Acceleration" field indicates the currently configured acceleration of the axis. (Technology object variable: <Axis name>.Config.DynamicDefaults.Acceleration) The "Deceleration" field indicates the currently configured deceleration of the axis. (Technology object variable: <Axis name>.Config.DynamicDefaults.Deceleration) The "Emergency stop deceleration" field indicates the currently configured emergency stop deceleration of the axis. (Technology object variable: <Axis name>.Config.DynamicDefaults.EmergencyDeceleration) The "Velocity" field indicates the current axis step velocity configured. (Technology object variable: <Axis name>.Config.DynamicDefaults.Jerk)
Tip:
You can use a copy & paste operation to avoid entering long tag names.
2842
Procedure
To insert the tag names, follow the steps described below: 1. In the project tree, select the instance data block or the technology object of the axis. 2. Parameters of the motion control instruction Right-click and select the Open command in the shortcut menu. Tags of the technology object Right-click and select the Open in editor command in the shortcut menu. 3. Parameters of the motion control instruction Select the lines of the tags in the Input or Output area Tags of the technology object In the Static area, open the relevant structures and select the lines of the tags 4. Select the Edit > Copy menu command. 5. Double-click to open the watch table. 6. Select the line starting at which the tags are to be inserted 7. Select the Edit > Paste menu command. Insert the tags with their complete names in the watch table.
WARNING The watch table also gives you write access to tags whose use is blocked for safety reasons in the user program. Modifying these tags can result in damage to the current axis configuration and to undefined responses of the axis. Only modify those tags whose access is marked with "RW" in the tag list of the technology object.
See also
Commissioning the axis - Axis control panel (Page 2821)
2843
In this example, more than one "Axis" technology object, each with its own axis configuration, uses the same PTO. Each "Axis" must be called in the user program with a separate call of Motion Control instruction "MC_Power" with a separate instance data block. Only one "Axis" at a time may use the PTO. The axis that is currently using the PTO indicates this with tag <Axis name>.StatusBits.Activated = TRUE.
2844
The tags of the activated axis ("Axis_2" here) show the following typical indicators in the user program: <Axis name>.StatusBits.Activated = TRUE <Axis name>.ErrorBits.HwUsed = FALSE To switch to the "Axis" technology object, follow the steps described below. In the example, a switch is made from "Axis_2" to "Axis_1": 1. End any active traversing motions of activated "Axis_2" 2. Disable "Axis_2" with the associated Motion Control instruction "MC_Power" using input parameter Enable = FALSE 3. To verify that "Axis_2" has been disabled, use an AND operation of output parameter Status = FALSE of Motion Control instruction "MC_Power" and technology object tag <Axis name>.StatusBits.Enable = FALSE. 4. Deactivate the conditional call of the Motion Control instructions for "Axis_2". 5. Activate the conditional call of the Motion Control instructions for "Axis_1". On the first call of the corresponding Motion Control instruction "MC_Power", "Axis_2" becomes deactivated and "Axis_1" becomes activated. 6. Enable "Axis_1" with Motion Control instruction "MC_Power" using the input parameter Enable = TRUE 7. To verify that "Axis_1" has been enabled, use an AND operation of output parameter Status = TRUE of Motion Control instruction "MC_Power" and technology object tag <Axis name>.StatusBits.Enable = TRUE. It is also always possible to cyclically call all Motion Control instructions of all axes working with a single PTO.
2845
When an axis is enabled (here "Axis_2"), this axis becomes active. In contrast to the conditional call, the Motion Control instructions of the deactivated axes (here "Axis_1" and "Axis_x") will indicate errors. The tags of these axes indicate the status <Axis name>.StatusBits.Activated = FALSE and <Axis name>.ErrorBits.HwUsed = TRUE. Use the conditional call of the Motion Control instructions if you want to implement the user program without error indicators.
See also
Using multiple drives with the same PTO (Page 2847) Tracking jobs from higher priority classes (execution levels) (Page 2848) Special cases for use of software limit switches (Page 2850) List of ErrorIDs and ErrorInfos (technology objects as of V2.0) (Page 2857) Tag of the Axis technology object (Page 2866)
2846
The changeover between drives can be controlled, if required, by the user program via a digital output. If different axis configurations are required for the different drives, a changeover between these configurations is required for the PTO. For additional information on this topic, refer to "Using multiple axes with the same PTO (Page 2843)".
See also
Using multiple axes with the same PTO (Page 2843) Tracking jobs from higher priority classes (execution levels) (Page 2848) Special cases for use of software limit switches (Page 2850) List of ErrorIDs and ErrorInfos (technology objects as of V2.0) (Page 2857) Tag of the Axis technology object (Page 2866)
2847
2848
Depending on the frequency of the motion control jobs you want to start, you will have to generate a sufficient number of instance data blocks. Users determine which instance data block is currently used in the DBx_used tags.
2849
See also
Using multiple axes with the same PTO (Page 2843) Using multiple drives with the same PTO (Page 2847) Special cases for use of software limit switches (Page 2850) List of ErrorIDs and ErrorInfos (technology objects as of V2.0) (Page 2857) Tag of the Axis technology object (Page 2866)
Special cases for use of software limit switches Software limit switches in conjunction with a homing operation
Due to unfavorably parameterized homing jobs, the braking action of the axis may be influenced at the software limit switch. Take the following examples into consideration when developing your program.
2850
Example 1:
During a travel command, a homing job (for example, Set reference point) offsets the current axis position in the direction of the software limit switch. It is still possible to bring the axis to a standstill before reaching the software limit switch:
The green curve shows the motion without the homing job. The axis brakes at the configured deceleration and comes to a standstill at a position before the software limit switch. A new axis position is set as a result of the homing job. The area between the old and new axis position is thus "skipped". Based on the new axis position, the axis would theoretically be stopped with the configured deceleration at a position after the software limit switch (red curve). Because braking with the configured deceleration is no longer sufficient, the axis actually follows the blue curve. Following a constant motion, the axis brakes at the emergency stop deceleration and comes to a standstill at the position of the software limit switch.
Example 2:
During a travel command, a homing job (for example, Set reference point) offsets the current axis position in the direction of the software limit switch. In contrast to example 1, it is no longer
2851
The green curve shows the motion without the homing job. The axis brakes at the configured deceleration and comes to a standstill at a position before the software limit switch. A new axis position is set as a result of the homing job. The area between the old and new axis position is thus "skipped". Based on the new axis position, the axis would theoretically be stopped with the configured deceleration at a position well after the software limit switch (red curve). Because braking with the configured deceleration is no longer sufficient, the axis actually follows the blue curve. The axis brakes at the emergency stop deceleration. However, the emergency stop deceleration is not sufficient to stop the axis at the position of the software limit switch. The position of the software limit switch is overrun.
2852
Example 3:
During a braking operation, a homing job (for example, Set reference point) offsets the current axis position in the direction of the software limit switch. It is still possible to bring the axis to a standstill before reaching the software limit switch:
The green curve shows the motion without the homing job. The axis brakes at the configured deceleration and comes to a standstill at a position before the software limit switch. A new axis position is set as a result of the homing job. The area between the old and new axis position is thus "skipped". Based on the new axis position, the axis would theoretically be stopped with the configured deceleration at a position after the software limit switch (red curve). Because braking with the configured deceleration is no longer sufficient, the axis actually follows the blue curve. Following a constant motion, the axis brakes at the emergency stop deceleration and comes to a standstill at the position of the software limit switch.
Example 4:
During a braking operation, a homing job (for example, Set reference point) offsets the current axis position in the direction of the software limit switch. In contrast to example 3, it is no longer possible to bring the axis to a standstill before reaching the software limit switch. The axis overruns the position of the software limit switch.
2853
The green curve shows the motion without the homing job. The axis brakes at the configured deceleration and comes to a standstill at a position before the software limit switch. A new axis position is set as a result of the homing job. The area between the old and new axis position is thus "skipped". Based on the new axis position, the axis would theoretically be stopped with the configured deceleration at a position well after the software limit switch (red curve). Because braking with the configured deceleration is no longer sufficient, the axis actually follows the blue curve. The axis brakes at the emergency stop deceleration. However, the emergency stop deceleration is not sufficient to stop the axis at the position of the software limit switch. The position of the software limit switch is overrun.
See also
Software limit switches and software limit switch position changes. (Page 2854) Software limit switches in conjunction with dynamic changes (Page 2855) Behavior of axis when position limits is tripped (Page 2785)
2854
See also
Software limit switches in conjunction with a homing operation (Page 2850) Software limit switches in conjunction with dynamic changes (Page 2855) Behavior of axis when position limits is tripped (Page 2785)
Example 1:
During axis motion, an active motion job is overridden by another motion job with a lower deceleration:
2855
The green curve shows the motion of an active job without this job being overridden. The axis brakes at the configured deceleration and comes to a standstill at a position before the software limit switch. Based on the overriding motion job with lower deceleration, the axis would theoretically be stopped with the configured deceleration at a position after the software limit switch (red curve). Because braking with the configured deceleration of the overriding motion job is no longer sufficient, the axis actually follows the blue curve. Following a constant motion, the axis brakes at the emergency stop deceleration and comes to a standstill at the position of the software limit switch.
Example 2:
During braking of the axis, an active motion job is overridden by another motion job with a lower deceleration:
The green curve shows the motion of an active job without this job being overridden. The axis brakes at the configured deceleration and comes to a standstill at a position before the software limit switch. Based on the overriding motion job with lower deceleration, the axis would theoretically be stopped at a position well after the software limit switch (red curve). Because braking with the configured deceleration of the overriding motion job is no longer sufficient, the axis actually follows the blue curve. Following a constant motion, the axis brakes at the emergency stop deceleration and comes to a standstill at the position of the software limit switch.
2856
See also
Software limit switches in conjunction with a homing operation (Page 2850) Software limit switches and software limit switch position changes. (Page 2854) Behavior of axis when position limits is tripped (Page 2785)
2857
16#000F
16#0010
16#8003
PTO/HSC are already being used by another axis The axis was configured incorrectly: Correct the configuration of the PTO (Pulse Train Output) / HSC (High Speed Counter) and download it to the controller More than one axis is to run with one PTO: Another axis is using the PTO/HSC. If the current axis is to assume the control, the other axis must be disabled with "MC_Power" Enable = FALSE. (see also Using multiple axes with the same PTO (Page 2843))
A communication error in the control panel has occurred A timeout has occurred It is not possible to release the axis Restarting Executing loading process in RUN mode Wait until the axis restart is complete. Wait until the loading process is complete. Check the cable connection and press the "Manual control" button again.
2858
The maximum number of simultaneously active motion control commands has been exceeded (maximum of 200 commands for all motion control technology objects) Reduce the number of simultaneously active jobs; restart the command A command is active if parameter "Busy" = TRUE in the Motion Control instruction.
Axis is currently operated in "Manual control" (axis command table) Axis is not homed Home the axis with instruction "MC_Home"; restart the command Exit "Manual control"; restart the command
The axis is currently controlled by the user program (the error is only displayed in the axis command table) The axis is released in the user program. Disable axis with instruction "MC_Power" and select "Manual control" again in the axis command table Release the axis with instruction "MC_Power" Enable = TRUE or release the axis in the axis command table. Wait for active homing to finish or abort active homing with a motion command, for example, "MC_Halt". Wait until direct or passive homing is complete.
16#8206 16#0001
16#8207 16#0016
Command rejected Active homing is running; another homing method cannot be started. The axis cannot be moved with a command table whilst it is being directly or passively homed. The axis cannot be directly or passively homed whilst a command table is being processed.
16#0018
16#0019
Wait for command table to finish or abort the command table with a motion command, for example, "MC_Halt". Correct the value; restart the command
Difference between maximum and start/stop velocity is invalid Number format of value is invalid Value is less than or equal to 0 Invalid acceleration for technology object "Axis" Number format of value is invalid Value is less than or equal to 0 It is not possible to restart the axis The axis is released in the user program. Block the axis with the "MC_Power" instruction; restart again Correct the value; restart the command
2859
2860
16#8407 16#0001 16#8408 16#001A 16#001B 16#001C 16#8409 16#001A 16#001B 16#001C 16#840A 16#000A 16#001D 16#001E 16#840B 16#000A 16#001E 16#840C 16#0002 16#000A 16#840D 16#0002 16#000A 16#840E 16#0002 16#000A 16#840F 16#0002 16#000A
Switching to another axis with instruction "MC_Power" is only permitted after disabling the active axis. -
Invalid value at parameter "Axis" of the Motion Control instruction The specified value does not match the required technology object version The specified value does not match the required technology object type The specified value is not a Motion Control technology data block Invalid value at parameter "CommandTable" of the Motion Control instruction The specified value does not match the required technology object version The specified value does not match the required technology object type The specified value is not a Motion Control technology data block Invalid value at parameter "StartStep" of the Motion Control instruction Value is less than or equal to 0 The start step is greater than the end step Value is greater than 32 Invalid value at parameter "EndStep" of the Motion Control instruction Value is less than or equal to 0 Value is greater than 32 Invalid value at parameter "RampUpTime" of the Motion Control instruction Number format of value is invalid Value is less than or equal to 0 Invalid value at parameter "RampDownTime" of the Motion Control instruction Number format of value is invalid Value is less than or equal to 0 Invalid value at parameter "EmergencyRampTime" of the Motion Control instruction Number format of value is invalid Value is less than or equal to 0 Invalid value at parameter "JerkTime" of the Motion Control instruction Number format of value is invalid Value is less than or equal to 0 Correct the value; restart the command Correct the value; restart the command Correct the value; restart the command Correct the value; restart the command Correct the value; restart the command Correct the value; restart the command Correct the value; restart the command
2861
16#8603 16#000B
16#8604 16#000A
Invalid "Pulses per motor revolution" value Value is less than or equal to zero
16#8605 16#0002 16#0005 16#000A 16#8606 16#0002 16#0003 16#0004 16#0007 16#8607 16#0002 16#0003 16#0004 16#8608 16#0002 16#0003 16#0004
Invalid "Load distance per motor revolution" value Number format of value is invalid The value is outside the number range (greater than 1e12) Value is less than or equal to zero Invalid "Start / stop velocity" value Number format of value is invalid Value exceeds the high hardware limit Value is less than the low hardware limit The start/stop velocity is greater than the maximum velocity Invalid "maximum velocity" value Number format of value is invalid Value exceeds the high hardware limit Value is less than the low hardware limit Invalid "Acceleration" value Number format of value is invalid Value exceeds the high hardware limit Value is less than the low hardware limit Download error-free configuration to the controller; release the axis again with instruction "MC_Power" Correct the incorrect value online; acknowledge error with instruction "MC_Reset" and if necessary restart the command Download error-free configuration to the controller; release the axis again with instruction "MC_Power" Download error-free configuration to the controller; release the axis again with instruction "MC_Power"
16#8609
2862
Invalid "Emergency stop deceleration" value Number format of value is invalid Value exceeds the high hardware limit Value is less than the low hardware limit
Value for position of the low SW limit switch is invalid Number format of value is invalid The value is outside the number range (greater than 1e12) The value is outside the number range (less than -1e12) The position value of the low software limit switch is greater than that of the high software limit switch Number format of value is invalid The value is outside the number range (greater than 1e12) The value is outside the number range (less than -1e12) Invalid address of the low HW limit switch 16#000C 16#000D The address of the falling edge is invalid The address of the rising edge is invalid Invalid address of the high HW limit switch 16#000C 16#000D The address of the falling edge is invalid The address of the rising edge is invalid Invalid "home position offset" value 16#0002 16#0005 16#0006 Number format of value is invalid The value is outside the number range (greater than 1e12) The value is outside the number range (less than -1e12) Invalid "approach velocity" value Download error-free configuration to the controller; release the axis again with instruction "MC_Power" Correct the incorrect value online; acknowledge error with instruction "MC_Reset" and if necessary restart the command Download error-free configuration to the controller; release the axis again with instruction "MC_Power" Download error-free configuration to the controller; release the axis again with instruction "MC_Power"
Value for position of the high SW limit switch is invalid Download error-free configuration to the controller; release the axis again with instruction "MC_Power" Correct the incorrect value online; acknowledge error with instruction "MC_Reset" and if necessary restart the command
16#860E
16#860F
16#8610
2863
During active homing, direction reversal at the hardware limit switch is activated although the hardware limit switches are not configured Download error-free configuration to the controller; release the axis again with instruction "MC_Power" Correct the incorrect value online; acknowledge error with instruction "MC_Reset" and if necessary restart the command
Invalid "Jerk" value Number format of value is invalid Value is greater than the maximum jerk Value is less than the minimum jerk Download error-free configuration to the controller; release the axis again with instruction "MC_Power" Correct the incorrect value online; acknowledge error with instruction "MC_Reset" and if necessary restart the command Download error-free configuration to the controller; release the axis again with instruction "MC_Power"
16#8615 16#0011
2864
Value for "Next step" in the command table is invalid The selection value is invalid The command transition is not permitted for this command
Internal errors
ErrorID 16#8FFF 16#F0** ErrorInfo Description Internal error POWER OFF and POWER ON the CPU If this does not work, contact Customer Support. Have the following information ready: ErrorID ErrorInfo Diagnostic buffer entries Remedy
2865
See also
Using multiple axes with the same PTO (Page 2843) Using multiple drives with the same PTO (Page 2847) Tracking jobs from higher priority classes (execution levels) (Page 2848) Special cases for use of software limit switches (Page 2850) Tag of the Axis technology object (Page 2866)
Legend Data type of the tag Start value of tag The initial value can be overwritten by the axis configuration. Access to the tag in the user program: RW R The tag can be read and written in the user program. The tag can be read in the user program. The tag cannot be used in the user program.
Effective HMI
Specifies when a change in the tag takes effect. The tag can be used in an HMI system.
<Axis name>.Config.General.PTO Tag cannot be evaluated in the user program. Data type DWORD Start value DW#16#00000000 Access Effective HMI -
<Axis name>.Config.General.HSC Tag cannot be evaluated in the user program. Data type DWORD Start value DW#16#00000000 Access Effective HMI -
2866
Config.DriveInterface. tag
Legend Data type of the tag Start value of tag The initial value can be overwritten by the axis configuration. Access to the tag in the user program: RW R The tag can be read and written in the user program. The tag can be read in the user program. The tag cannot be used in the user program.
Effective HMI
Specifies when a change in the tag takes effect. The tag can be used in an HMI system.
<Axis name>.Config.DriveInterface.EnableOutput... Tags cannot be evaluated in the user program. Data type Start value Access Effective HMI -
<Axis name>.Config.DriveInterface.ReadyInput... Tags cannot be evaluated in the user program. Data type Start value Access Effective HMI -
2867
Config.Mechanics. tag
Legend Data type of the tag Start value of tag The initial value can be overwritten by the axis configuration. Access to the tag in the user program: RW R The tag can be read and written in the user program. The tag can be read in the user program. The tag cannot be used in the user program.
Effective HMI
Specifies when a change in the tag takes effect. The tag can be used in an HMI system.
<Axis name>.Config.Mechanics.PulsesPerDriveRevolution) Increments per motor revolution Data type DInt Start value L#1000 Access R Effective HMI X
<Axis name>.Config.Mechanics.LeadScrew Load distance per motor revolution (specified in the configured unit of measurement) Data type Real Start value 1.0E+001 Access R Effective HMI X
<Axis name>.Config.Mechanics.InverseDirection Invert direction signal Data type Bool Start value FALSE Access R Effective HMI X
Config.DynamicLimits. tag
Legend Data type of the tag Start value of tag The initial value can be overwritten by the axis configuration. Access to the tag in the user program: RW R The tag can be read and written in the user program. The tag can be read in the user program. The tag cannot be used in the user program.
2868
<Axis name>.Config.DynamicLimits.MinVelocity Start/stop velocity of axis (specified in the configured unit of measurement) Data type Real Start value 1.0E+001 Access R Effective HMI X
<Axis name>.Config.DynamicLimits.MaxVelocity Maximum velocity of axis (specified in the configured unit of measurement) Data type Real Start value 2.5E+002 Access R Effective HMI X
Config.DynamicDefaults. tag
Legend Data type of the tag Start value of tag The initial value can be overwritten by the axis configuration. Access to the tag in the user program: RW R The tag can be read and written in the user program. The tag can be read in the user program. The tag cannot be used in the user program. When axis is activated (tag <Axis name>.StatusBits.Activated changes from FALSE -> TRUE), blocked or released When axis is enabled The next time a MC_MoveAbsolute-, MC_MoveRelative, MC_MoveVelocity, MC_MoveJog, MC_Halt, MC_CommandTable or active MC_Home-command is started (Mode = 3). When a MC_MoveJog command is stopped
Effective
HMI
<Axis name>.Config.DynamicDefaults.Acceleration Acceleration of axis (specified in the configured dimension unit) Data type Real Start value 4.8E+001 Access RW Effective 5 1, 5, 6 CPU Firmware V1.0 CPU firmware as of V2.0 HMI X
2869
<Axis name>.Config.DynamicDefaults.JerkActive ("Axis" technology object as of V2.0) TRUE = the jerk limit is activated Data type Bool Start value FALSE Access RW Effective 1, 5 HMI X
<Axis name>.Config.DynamicDefaults.Jerk ("Axis" technology object as of V2.0) Jerk during axis acceleration and deceleration ramp (specified in the configured unit of measurement) Data type Real Start value 1.92E+002 Access RW Effective 1, 5 HMI X
Config.PositionLimits_SW. tag
Legend Data type of the tag Start value of tag The initial value can be overwritten by the axis configuration. Access to the tag in the user program: RW R The tag can be read and written in the user program. The tag can be read in the user program. The tag cannot be used in the user program.
2870
<Axis name>.Config.PositionLimits_SW.Active TRUE = The software limit switches are activated Data type Bool Start value FALSE Access RW Effective 4 1, 5, 6 <Axis name>.Config.PositionLimits_SW.MinPosition Position of low software limit switch (specified in the configured unit of measurement) Data type Real Start value -1.0E+004 Access RW Effective 4 1, 5, 6 <Axis name>.Config.PositionLimits_SW.MaxPosition Position of high software limit switch (specified in the configured unit of measurement) Data type Real Start value 1.0E+004 Access RW Effective 4 1, 5, 6 CPU Firmware V1.0 CPU firmware as of V2.0 HMI X CPU Firmware V1.0 CPU firmware as of V2.0 HMI X CPU Firmware V1.0 CPU firmware as of V2.0 HMI X
Config.PositionLimits_HW. tag
Legend Data type of the tag Start value of tag The initial value can be overwritten by the axis configuration. Access to the tag in the user program: RW R The tag can be read and written in the user program. The tag can be read in the user program. The tag cannot be used in the user program.
2871
<Axis name>.Config.PositionLimits_HW.Active TRUE = The hardware limit switches are active. Data type Bool Start value FALSE Access RW Effective 3, 4 1, 5, 6 <Axis name>.Config.PositionLimits_HW.MinSwitchedLevel TRUE = 24 V at CPU input corresponds to low hardware limit switch approached FALSE = 0 V at CPU input corresponds to low hardware limit switch approached Data type Bool Start value FALSE Access R Effective HMI X CPU Firmware V1.0 CPU firmware as of V2.0 HMI X
<Axis name>.Config.PositionLimits_HW.MinFallingEvent Tag cannot be evaluated in the user program. Data type DWord Start value DW#16#00000000 Access Effective HMI -
<Axis name>.Config.PositionLimits_HW.MinRisingEvent Tag cannot be evaluated in the user program. Data type DWord Start value DW#16#00000000 Access Effective HMI -
<Axis name>.Config.PositionLimits_HW.MaxSwitchedLevel TRUE = 24 V at CPU input corresponds to high hardware limit switch approached FALSE = 0 V at CPU input corresponds to high hardware limit switch approached Data type Bool Start value FALSE Access R Effective HMI X
2872
<Axis name>.Config.PositionLimits_HW.MaxRisingEvent Tag cannot be evaluated in the user program. Data type DWord Start value DW#16#00000000 Access Effective HMI -
Config.Homing. tag
Legend Data type of the tag Start value of tag The initial value can be overwritten by the axis configuration. Access to the tag in the user program: RW R The tag can be read and written in the user program. The tag can be read in the user program. The tag cannot be used in the user program. When axis is activated (tag <Axis name>.StatusBits.Activated changes from FALSE -> TRUE), blocked or released When a passive homing command is started When an active homing command is started
Effective
HMI
<Axis name>.Config.Homing.AutoReversal TRUE = Direction reversal at hardware limit switch enabled (active homing) FALSE = Direction reversal at hardware limit switch disabled (active homing) Data type Bool Start value TRUE Access R RW effective 1, 8 Technology object "Axis" V1.0 Technology object "Axis" V2.0 HMI X
<Axis name>.Config.Homing.Direction TRUE = Positive approach direction to search for homing switch and positive homing direction (active homing) FALSE = Negative approach direction to search for homing switch and positive homing direction (active homing) Data type Start value Access effective HMI
2873
<Axis name>.Config.Homing.SideActiveHoming ("Axis" technology object as of V2.0) TRUE = Homing on high side of the homing switch (active homing) TRUE = Homing on lower side of the homing switch (active homing) Data type Bool Start value TRUE Access RW Effective 1, 8 HMI X
<Axis name>.Config.Homing.SidePassiveHoming ("Axis" technology object as of V2.0) TRUE = Homing on high side of the homing switch (passive homing) TRUE = Homing on lower side of the homing switch (passive homing) Data type Bool Start value TRUE Access RW Effective 1, 7 HMI X
<Axis name>.Config.Homing.RisingEdge (as of technology object "Axis" V1.0) TRUE = Homing with negative signal edge of the homing switch (active homing) FALSE = Homing with positive signal edge of the homing switch (active homing) For information on the effect of the tag on passive homing, refer to the description in "Configuration - Homing". Data type Bool Start value FALSE Access R Effective HMI X
<Axis name>.Config.Homing.Offset Home position offset /specified in the configured unit of measurement (active homing) Data type Real Start value 0.0 Access R RW Effective 1, 8 Technology object "Axis" V1.0 Technology object "Axis" V2.0 HMI X
<Axis name>.Config.Homing.FastVelocity Approach velocity / specified in the configured unit of measurement (active homing) Data type Real Start value 2.0E+002 Access R RW Effective 1, 8 Technology object "Axis" V1.0 Technology object "Axis" V2.0 HMI X
2874
<Axis name>.Config.Homing.FallingEvent Tag cannot be evaluated in the user program. Data type DWord Start value DW#16#00000000 Access Effective HMI -
<Axis name>.Config.Homing.RisingEvent Tag cannot be evaluated in the user program. Data type DWord Start value DW#16#00000000 Access effective HMI
MotionStatus. tag
Legend Data type of the tag Start value of tag Access to the tag in the user program: RW R The tag can be read and written in the user program. The tag can be read in the user program. The tag cannot be used in the user program.
Effective HMI
Specifies when a change in the tag takes effect. The tag can be used in an HMI system.
<Axis name>.MotionStatus.Position Current position of the axis (specified in the configured unit of measurement) If the axis is not homed, the tag indicates the position value relative to the enable position of the axis. Data type Real Start value 0.0 Access R Effective HMI X
<Axis name>..MotionStatus.Velocity Current velocity of the axis (specified in the configured unit of measurement) Data type Real Start value 0.0 Access R Effective HMI X
2875
<Axis name>.MotionStatus.TargetPosition Target position of axis (specified in the configured unit of measurement) The value of the tag is only valid during execution of a positioning command with "MC_MoveAbsolute" or "MC_MoveRelative" or of the axis command table. Data type Real Start value 0.0 Access R Effective HMI X
See also
Motion status (Page 2841)
StatusBits. tag
Table 11-10 Legend Data type Start value Access Data type of the tag Start value of tag Access to the tag in the user program: RW R Effective HMI The tag can be read and written in the user program. The tag can be read in the user program. The tag cannot be used in the user program.
Specifies when a change in the tag takes effect. The tag can be used in an HMI system.
<Axis name>.StatusBits.Activated TRUE = The axis is activated. It is connected to the assigned PTO (Pulse Train Output). The data of the technology data block will be updated cyclically. Data type Bool Start value FALSE Access R Effective HMI X
<Axis name>.StatusBits.Enable TRUE = The axis is enabled and ready to take on Motion Control jobs. Data type Bool Start value FALSE Access R Effective HMI X
2876
<Axis name>.StatusBits.Done TRUE = No Motion Control command is active on the axis. Data type Bool Start value FALSE Access R Effective HMI X
<Axis name>.StatusBits.Error TRUE = An error occurred in the axis technology object. Detailed information about the error is available in automatic mode in the ErrorID" and ErrorInfo" parameters of the motion control instructions. In manual mode, the "Error message" field of the axis command table displays detailed information about the cause of error. Data type Bool Start value FALSE Access R Effective HMI X
<Axis name>.StatusBits.StandStill TRUE = The axis is at a standstill. Data type Bool Start value FALSE Access R Effective HMI X
<Axis name>.StatusBits.PositioningCommand TRUE = The axis is executing a positioning command. Data type Bool Start value FALSE Access R Effective HMI X
<Axis name>.StatusBits.SpeedCommand TRUE = The axis is executing a travel command at predefined velocity. Data type Bool Start value FALSE Access R Effective HMI X
<Axis name>.StatusBits.Homing TRUE = The axis is executing a homing command of the "MC_Home" Motion Control instruction or axis command table. Data type Bool Start value FALSE Access R Effective HMI X
2877
<Axis name>.StatusBits.ConstantVelocity TRUE = The axis travels at constant velocity. Data type Bool Start value FALSE Access R Effective HMI X
<Axis name>.StatusBits.Acceleration TRUE = The axis accelerates. Data type Bool Start value FALSE Access R Effective HMI X
<Axis name>.StatusBits.Deceleration TRUE = The axis decelerates (slows down). Data type Bool Start value FALSE Access R Effective HMI X
<Axis name>.StatusBits.ControlPanelActive TRUE = The "Manual control" mode has been enabled in the axis command table. The axis command table has control priority over the "Axis" technology object. The axis cannot be controlled from the user program. Data type Bool Start value FALSE Access R Effective HMI X
<Axis name>.StatusBits.DriveReady TRUE = The drive is ready. Data type Bool Start value FALSE Access R Effective HMI X
<Axis name>.StatusBits.RestartRequired TRUE = Values were modified in the load memory. To download the values in the CPU RUN operating mode to the work memory, you need to restart the axis. Use the Motion Control instruction MC_Reset to do this. Data type Bool Start value FALSE Access R Effective HMI X
See also
Status and error bits (Page 2839)
2878
ErrorBits. tag
Table 11-11 Legend Data type Start value Access Data type of the tag Start value of tag Access to the tag in the user program: RW R Effective HMI The tag can be read and written in the user program. The tag can be read in the user program. The tag cannot be used in the user program.
Specifies when a change in the tag takes effect. The tag can be used in an HMI system.
<Axis name>.ErrorBits.SystemFault TRUE = Internal system error. Data type Bool Start value FALSE Access R Effective HMI X
<Axis name>.ErrorBits.ConfigFault TRUE = Incorrect configuration of axis. Data type Bool Start value FALSE Access R Effective HMI X
<Axis name>.ErrorBits.DriveFault TRUE = The drive has reported an error after failure of its "Drive ready" signal. Data type Bool Start value FALSE Access R Effective HMI X
<Axis name>.ErrorBits.SwLimitMinReached TRUE = The low software limit switch has been reached. Data type Bool Start value FALSE Access R Effective HMI X
<Axis name>.ErrorBits.SwLimitMinExceeded TRUE = The low software limit switch has been exceeded. Data type Bool Start value FALSE Access R Effective HMI X
<Axis name>.ErrorBits.SwLimitMaxReached TRUE = The high software limit switch has been reached. Data type Bool Start value FALSE Access R Effective HMI X
2879
<Axis name>.ErrorBits.HwLimitMin TRUE = The low hardware limit switch has been approached. Data type Bool Start value FALSE Access R Effective HMI X
<Axis name>.ErrorBits.HwLimitMax TRUE = The high hardware limit switch has been approached. Data type Bool Start value FALSE Access R Effective HMI X
<Axis name>.ErrorBits.HwUsed TRUE = A second axis is using the same PTO (Pulse Train Output) and is enabled with "MC_Power". Data type Bool Start value FALSE Access R Effective HMI X
See also
Status and error bits (Page 2839)
Internal. tag
The "Internal" tags contain no user-relevant data; these tags cannot be accessed in the user program.
ControlPanel tag
The "ControlPanel" tags contain no user-relevant data; these tags cannot be accessed in the user program.
2880
Table 11-12 Legend Data type Start value Access Data type of the tag Start value of tag The start value can be overwritten by the configuration of the command table. Access to the tag in the user program: RW R Effective HMI The tag can be read and written in the user program. The tag can be read in the user program. The tag cannot be used in the user program.
Specifies when a change in the tag takes effect. The tag can be used in an HMI system.
<Axis name>.Config.Command.Command[x].Type Command type 0 = "Empty" command 2 = "Hold" command 5 = "Relative positioning" command 6 = "Absolute positioning" command 7 = "Velocity setpoint" command 151 = "Wait" command Data type Int Start value 0 Access RW Effective HMI X
<Axis name>. Config.Command.Command[x].Position Command target position / travel path Data type Real Start value Access RW Effective HMI X
<Axis name>. Config.Command.Command[x].Velocity Command velocity Data type Real Start value 0.0 Access RW Effective HMI X
2881
<Axis name>. Config.Command.Command[x].BufferMode Value for command "Next step" 0 = "Complete command" 1 = "Blend movement" Data type Int Start value 0 Access RW Effective HMI X
<Axis name>. Config.Command.Command[x].StepCode Command step code Data type Word Start value 0 Access RW Effective HMI X
Documentation for functions from previous versions Configuration - Homing (technology object "Axis" V1.0)
Configure the parameters for active and passive homing in the "Homing" configuration window. The homing method is set using the "Mode" input parameter of the motion control instruction. Here, Mode = 2 means passive homing and Mode = 3 means active homing.
2882
Permitting direction reversal after reaching the HW limit switch (active homing only)
Activate the check box to use the hardware limit switch as a reversing cam for the reference point approach. The hardware limit switches must be activated for direction reversal. If the CPU firmware V1.0 is used, both hardware limit switches must be configured. If CPU firmware as of V2.0 is used, only the hardware limit switches in the approach direction must be configured. If the hardware limit switch is reached during active homing, the axis brakes at the configured deceleration (not with the emergency stop deceleration) and reverses direction. The homing switch is then sensed in reverse direction. If the direction reversal is not active and the axis reaches the hardware limit switch during active homing, the reference point approach is aborted with an error and the axis is braked at the emergency stop deceleration. NOTICE Use one of the following measures to ensure that the machine does not travel to a mechanical endstop in the event of a direction reversal: Keep the approach velocity low Increase the configured acceleration/deceleration Increase the distance between hardware limit switch and mechanical stop
2883
2884
Home position
The position for which parameters are assigned in the Motion Control instruction "MC_Home" is used as the home position.
2885
16#000F
16#0010
16#8003
PTO/HSC are already being used by another axis The axis was configured incorrectly: Correct the configuration of the PTO (Pulse Train Output) / HSC (High Speed Counter) and download it to the controller More than one axis is to run with one PTO: Another axis is using the PTO/HSC. If the current axis is to assume the control, the other axis must be disabled with "MC_Power" Enable = FALSE. (see also Using multiple axes with the same PTO (Page 2843))
The maximum number of simultaneously active motion control jobs was exceeded (maximum of 200 jobs for all motion control technology objects) Reduce the number of simultaneously active jobs; restart the command A command is active if parameter "Busy" = TRUE in the motion control instruction.
2886
The axis is currently controlled by the user program (the error is only displayed in the axis command table) Disable axis with instruction "MC_Power" and select "Manual control" again in the axis command table Enable the axis with instruction "MC_Power" Enable = TRUE or enable the axis in the axis command table. Wait for active homing to finish or abort the active homing with a motion command, for example, "MC_Halt". The other homing type can then be started.
16#8206 16#0001
16#8207 16#0016
Command rejected Active homing is running; another homing method cannot be started.
2887
16#8407 16#0001
Switching the axis with Motion Control instruction "MC_Power" is only permitted after disabling the axis. Disable the active axis; it is then possible to switch to the other axis and enable it.
Configuration error
ErrorID 16#8600 16#000B 16#8601 16#000B 16#8602 16#000D 16#8603 16#000D 16#8604 16#000A 16#8605 16#0002 16#000A 16#8606 ErrorInfo Description Address is invalid Remedy Correct the configuration of the PTO (Pulse Train Output) and download it to the controller Correct the configuration of the HSC (High Speed Counter) and download it to the controller Correct the configuration and download it to the controller Correct the configuration and download it to the controller Correct the configuration and download it to the controller Correct the configuration and download it to the controller
Parameterization of the high-speed counter (HSC) is invalid Address is invalid Invalid parameter assignment of "Enable output" Address is invalid Invalid parameter assignment of "Ready input" Address is invalid Invalid "Pulses per motor revolution" value The value is less than or equal to zero
Invalid "Load distance per motor revolution" value Number format of value is invalid The value is less than or equal to zero Invalid "Start / stop velocity" value
2888
Invalid "Deceleration" value Number format of value is invalid Value exceeds the hardware limit Value is less than the hardware limit
Invalid "Emergency stop deceleration" value Number format of value is invalid Value exceeds the hardware limit Value is less than the hardware limit
16#860B 16#0002 16#0005 16#0006 16#0007 16#860C 16#0002 16#0005 16#0006 16#860D
Value for position of the low SW limit switch is invalid Number format of value is invalid The value is outside the number range (greater than 1e12) The value is outside the number range (less than -1e12) The position value of the low SW limit switch is greater than that of the high SW limit switch Number format of value is invalid The value is outside the number range (greater than 1e12) The value is outside the number range (less than -1e12) Invalid address of the low HW limit switch
Value for position of the high SW limit switch is invalid Download error-free configuration to the controller; enable the axis again with instruction "MC_Power" Correct the incorrect value online; acknowledge error with instruction "MC_Reset" and restart the command, if necessary
2889
During active homing, direction reversal at the hardware limit switch is activated although the hardware limit switches are not configured Correct the configuration and download it to the controller
Internal errors
ErrorID 16#8FFF 16#F0** ErrorInfo Description Internal error POWER OFF and POWER ON the CPU If this does not work, contact Customer Support. Have the following information ready: ErrorID ErrorInfo Diagnostic buffer entries Remedy
See also
Using multiple axes with the same PTO (Page 2843)
2890
12
Online mode
In online mode, there is an online connection between your programming device / PC and one or more devices. An online connection between the programming device/PC and the device is required, for example, for the following tasks: Testing user programs Displaying and changing the operating mode of the CPU Displaying and setting the date and time of day of the CPU Displaying module information Comparing blocks Hardware diagnostics Before you can establish an online connection, the programming device/PC and the device must be physically or remotely connected. As an alternative, some devices support a simulation mode. In this case, a connection to the device is simulated via the PLCSIM virtual interface. After establishing a connection, you can use the Online and Diagnostics view or the "Online tools" task card to access the data on the device. The current online status of a device is indicated by an icon to the right of the device in the project tree. You will find the meaning of the individual status icons in the relevant tooltip. Note Some online functions depend on the range of the installed software or whether a project is open.
2891
Using online and diagnostics functions 12.1 General information about online mode
See also
View in online mode (Page 2893)
2892
12.2
Online displays
After the online connection has been established successfully, the user interface changes. The following figure shows a device connected online and the corresponding user interface:
The title bar of the active window now has an orange background. The title bars of inactive windows for the relevant station now have an orange line below
them. An orange, pulsing bar appears at the right-hand edge of the status bar. If the connection has been established but is functioning incorrectly, an icon for an interrupted connection is displayed instead of the bar. You will find more information on the error in "Diagnostics" in the Inspector window.
2893
Operating mode symbols or diagnostics symbols for the stations connected online and
their underlying objects are shown in the project tree. A comparison of the online and offline status is also made automatically. Differences between online and offline objects are also displayed in the form of symbols. The "Diagnostics > Device information" area is brought to the foreground in the Inspector window.
See also
General information about online mode (Page 2891) Basics of project data comparison (Page 200)
12.3
Online access
2894
"Online access" folder in the project tree All interfaces installed in the programming device/PC are displayed in the "Online access" folder. Status display for the interfaces The current status of an interface is indicated by an icon to the right of the name. You can see the meaning of the icon in the tooltip. Updating the list of accessible devices. This function is available for each hardware interface of the programming device/PC. Software interfaces, such as a remote connection, do not offer this function. Devices connected via the respective interface with the programming device/PC The type of the respective device and its status are displayed by the preceding icon.
2895
See also
Opening the properties of an interface (Page 2898)
12.4
Accessible devices
Accessible devices are all devices connected to an interface of the programming device / PC and that are turned on. Devices that allow only restricted configuration using the currently installed products or that cannot be configured at all can also be displayed.
2896
Displaying accessible devices on an interface of the programming device / PC in the project tree
To display accessible devices on a single interface of the programming device / PC, follow these steps: 1. Open the "Online access" folder in the project tree. 2. Click on the arrow to the left of the interface to show all the objects arranged below the interface. 3. Double-click on the "Update accessible devices" command below the interface. All devices that are accessible over this interface are displayed in the project tree.
2897
Using online and diagnostics functions 12.6 Establishing and canceling an online connection
Displaying additional information about the accessible devices in the project tree
To display additional information on the accessible devices in the project tree, follow these steps: 1. Click on the arrow to the left of one of the accessible devices in the project tree. All data available online, for example blocks and system data, is displayed for known devices.
12.5
Introduction
For each interface, you can display and, in some cases, modify properties, for example the network type, address, and status.
Procedure
To open the properties, follow these steps: 1. Right-click on the required interface below "Online access" in the project tree. 2. Select the "Properties" command from the shortcut menu. A dialog containing the properties of the interface opens. On the left of the dialog, you will see the area navigation. You can view the current parameter settings in the individual entries in the area navigation and, if necessary, change them.
12.6
Requirement
At least one PG/PC interface is installed and is physically connected to a device, for example with an Ethernet cable. As an alternative, it is also possible to establish a virtual connection using PLCSIM.
Go online
To establish an online connection, follow these steps: 1. In the project tree, select one or mote devices to which you want an online connection to be established. 2. Select the "Go online" command in the "Online" menu. If the device was already connected to a specific PG/PC interface, the online connection is automatically established to the previous PG/PC interface. In this case, you can ignore the following steps. If there was no previous connection, the "Go online" dialog opens.
2898
Using online and diagnostics functions 12.6 Establishing and canceling an online connection
3. Select the type of interface from the "Type of the PG/PC interface" drop-down list. The "PG/ PC interface" drop-down list then shows only the interfaces of the programming device / PC that match the selected interface type. 4. Select the required interface of the programming device / PC from the "PG/PC interface" drop-down list, for example an Industrial Ethernet adapter. 5. In the "Connection to subnet" drop-down list, select the subnet via which the device is connected to the PG/PC interface. If the device is connected directly to the PG/PC interface, select the "(local) TCP/IP" setting. In this case, a direct connection is established to the device, without a network node, for example, an interposed switch. If you selected an MPI or PROFIBUS subnet, the bus parameters configured in the programming device/PC interface are applied at this point. 6. If the device is accessible via a gateway, select the gateway that connects the two subnets involved in the "1st gateway" drop-down list. If no devices are available on the interface, a broken connecting line is displayed between the programming device / PC and the device. If devices are accessible, an unbroken connecting line is shown and the devices accessible on the selected interface of the programming device / PC are displayed in a list. 7. Optional: Click the "Update" button to redisplay the list of accessible devices. 8. Optional: Click the "Flash LED" button on the left of the graphic to run an LED flash test. With this function, you can check that you have selected the correct device. The LED flash test is not supported by all devices. 9. Select your device in the "Accessible devices in the target subnet" table and confirm your selection with "Go online". The online connection to the selected target device is established.
Result
After the online connection has been established, the title bars of the editors change to orange. An orange activity bar is also shown in the title bar of an editor and in the status bar. In the project tree, status symbols show the difference between online and offline objects. The connection path is stored for future connection attempts. It is no longer necessary to open the "Go online" dialog unless you want to select a new connection path. Note If no accessible device is displayed, select a different network access for the PG/PC interface or check the settings of the interface.
2899
Using online and diagnostics functions 12.7 Connecting online with several devices
See also
Connecting online with several devices (Page 2900) View in online mode (Page 2893) Assigning a temporary IP address (Page 2905) Influence of user rights (Page 169)
12.7
Requirement
No device must be selected At least one PG/PC interface is installed and is physically connected to a device, for example with an Ethernet cable. As an alternative, it is also possible to establish a virtual online connection using PLCSIM or a remote connection.
Procedure
To establish an online connection to several devices at the same time, follow these steps: 1. Select the "Go online" command in the "Online" menu. The "Select devices" dialog opens with a table of all available devices. 2. Select the devices to which you want to establish an online connection in the "Go online" column. 3. Click the "Go online" button.
Result
Without any further prompt for confirmation, a connection is established to all selected devices if a connection was already established to the selected devices at least once. If there was no previous online connection, the "Go online" dialog opens. In this case, first configure the online connection as described in the section "Go online and disconnect online connection (Page 2898)".
See also
Establishing and canceling an online connection (Page 2898) Assigning a temporary IP address (Page 2905)
2900
12.8
See also
Setting parameters for the Industrial Ethernet interface (Page 2902) Setting parameters for the MPI and PROFIBUS interfaces (Page 2907)
12.9
Adding interfaces
You have the option of installing additional interfaces after installation of the TIA Portal.
Procedure
To install an interface at a later time and add it to the TIA Portal, follow these steps: 1. Install or update the drivers in the operating system once you have installed the interface hardware. 2. Close the TIA Portal if it is still open. 3. Open the Windows control panel. 4. Open the entry "Setting the PG/PC Interface" in the Control Panel. The "Setting the PG/PC Interface" dialog opens. 5. Make any necessary changes to the interface configuration and confirm them with "OK". You have to click "OK", even if you have not made any changes. 6. Restart the TIA Portal.
2901
Using online and diagnostics functions 12.10 Setting parameters for the Ethernet interface
Result
The newly installed interface is now displayed in the project tree under the "Online access" folder.
12.10
12.10.1
2902
Using online and diagnostics functions 12.10 Setting parameters for the Ethernet interface
See also
Basics of assigning parameters for the PG/PC interface (Page 2901) Displaying operating system parameters (Page 2903) Connecting the PG/PC interface to a subnet (Page 2904) Setting parameters for the Ethernet interface (Page 2904) Assigning a temporary IP address (Page 2905) Managing temporary IP addresses (Page 2905) Influence of user rights (Page 169)
12.10.2
See also
Setting parameters for the Ethernet interface (Page 2904)
2903
Using online and diagnostics functions 12.10 Setting parameters for the Ethernet interface
12.10.3
Procedure
To select the subnet to which the Ethernet interface is connected, follow these steps: 1. Select the Ethernet interface in the project tree in "Online access". 2. Select the "Properties" command in the shortcut menu of the interface. The dialog for configuring the interface opens. 3. Go to "General > Assignment" and select the subnet to which you want to connect the Ethernet interface of the programming device / PC in the "Connection to subnet" drop-down list. 4. Close the dialog with "OK".
12.10.4
Requirement
You must have adequate user rights. See also: Influence of user rights (Page 169).
Procedure
To change parameter settings relating to the network protocol, follow these steps: 1. Select the Ethernet interface in the project tree in "Online access". 2. Select the "Properties" command in the shortcut menu of the interface. The dialog for configuring the interface opens. 3. Select "Configurations > IE-PG access" to adapt the protocol settings relevant to network management. Select the "Fast acknowledge" check box to achieve faster reaction times with smaller network packets. From the "Timeout" drop-down list, select the maximum time that can elapse before a network node is detected.
2904
Using online and diagnostics functions 12.10 Setting parameters for the Ethernet interface
4. To activate the LLDP protocol and discover the network topology more accurately, set the "LLDP active" check box in "Configurations > LLDP". 5. Select "Configurations > TCP/IP" to adapt the TCP/IP protocol for network traffic during runtime. Select the "Fast acknowledge" check box to achieve faster reaction times with smaller network packets. From the "Timeout" drop-down list, select the maximum time that can elapse before there is a timeout during communication with a network node.
See also
Influence of user rights (Page 169) Displaying operating system parameters (Page 2903)
12.10.5
See also
Managing temporary IP addresses (Page 2905)
12.10.6
2905
Using online and diagnostics functions 12.10 Setting parameters for the Ethernet interface
You can display all temporarily assigned addresses and delete them. Note that IP addresses that you manually assigned in the operating system are not displayed in the TIA Portal.
Requirement
To delete, you require adequate permissions.
Procedure
To display and delete temporarily assigned addresses, follow these steps: 1. Select the Ethernet interface in the project tree in "Online access". 2. Select the "Properties" command in the shortcut menu of the interface. The dialog for configuring the interface opens. 3. Select "Configurations > IE-PG access". A table with the assigned IP addresses is displayed. 4. Click the "Delete project-specific IP addresses" button to delete all the IP addresses at one time.
See also
Influence of user rights (Page 169)
12.10.7
Procedure
To restore the TCP/IP configuration to the default settings, follow these steps: 1. Select the Ethernet interface in the project tree in "Online access". 2. Select the "Properties" command in the shortcut menu of the interface. The dialog for configuring the interface opens. 3. Select "Configurations > TCP/IP". 4. Click the "Standard" button to reset all the settings.
2906
Using online and diagnostics functions 12.11 Setting parameters for the MPI and PROFIBUS interfaces
12.11
12.11.1
See also
Basics of assigning parameters for the PG/PC interface (Page 2901)
2907
Using online and diagnostics functions 12.11 Setting parameters for the MPI and PROFIBUS interfaces
12.11.2
Requirement
Masters that distribute bus parameters cyclically are connected to the bus. In PROFIBUS networks, the cyclic distribution of the bus parameters must be enabled.
Procedure
To enable automatic bus parameter detection, follow these steps: 1. Select the interface in the project tree. 2. Select the "Properties" command in the shortcut menu of the interface. The dialog for configuring the interface opens. 3. Go to "General > Configurations > Active configuration" and select the setting "Automatic protocol detection". 4. Go to "Configurations > Auto configuration > Local settings" and select the address of the PG/PC interface in the "Own address" drop-down list. 5. If you then want to display the current bus settings, click the "Network detection" button.
See also
Setting parameters for the MPI interface (Page 2908) Setting parameters for the PROFIBUS interface (Page 2910)
12.11.3
2908
Using online and diagnostics functions 12.11 Setting parameters for the MPI and PROFIBUS interfaces
2909
Using online and diagnostics functions 12.11 Setting parameters for the MPI and PROFIBUS interfaces
Is only master An additional verification function to prevent bus disruptions when connecting the PG/PC to the network is disabled because the programming device or PC is the only master on the bus. Do not enable this option unless you have only connected slaves to your programming device or PC. If the "Is only master" check box is enabled, it is not possible to identify the directly connected device in the "Accessible devices" window. Own address This setting relates to the programming device or PC on which you call up the parameter settings of the interface. Set the local device address of your programming device or PC here. This address must be unique throughout the network. The programming device or PC is addressed using this address in the MPI network. Check This enables an additional safety function to prevent bus disruptions when connecting the PG/PC to the network. The driver checks whether the local address is already being used by another station. Active as well as passive stations are taken into consideration in this case. The driver monitors this on the PROFIBUS. The connection of the PG/PC to the network will take longer with the automatic check. To use the check, the driver must support the function. Furthermore, the "Is only master" option must not be selected. Timeout Set a higher timeout value if, for example, you have problems with long response times on the network. You can set the following network-related parameters: Highest address: Select the configured highest device address. Make sure that the same highest device address is set for all devices of a PROFIBUS or MPI network. Transfer rate: Here, you select the transmission speed to be used on the MPI network.
See also
Setting MPI or PROFIBUS interface parameters automatically (Page 2908)
12.11.4
2910
Using online and diagnostics functions 12.11 Setting parameters for the MPI and PROFIBUS interfaces
2911
Using online and diagnostics functions 12.11 Setting parameters for the MPI and PROFIBUS interfaces
Is only master An additional verification function to prevent bus disruptions when connecting the PG/PC to the network is disabled because the programming device or PC is the only master on the bus. Do not enable this option unless you have only connected slaves to your programming device or PC. If the "Is only master" check box is enabled, it is not possible to identify the directly connected device in the "Accessible devices" window. Own address This setting relates to the programming device or PC on which you call up the parameter settings of the interface. Set the local device address of your programming device or PC here. This address must be unique throughout the network. The programming device or PC is addressed using this address in the PROFIBUS network. Check This enables an additional safety function to prevent bus disruptions when connecting the PG/PC to the network. The driver checks whether the local address is already being used by another station. Active as well as passive stations are taken into consideration in this case. The driver monitors this on the PROFIBUS. The connection of the PG/PC to the network will take longer with the automatic check. To use the check, the driver must support the function. Furthermore, the "Is only master" option must not be selected. Timeout Set a higher timeout value if, for example, you have problems with long response times on the network. You can set the following network-related parameters: Highest address: Select the configured highest device address. Make sure that the same highest station address is set for all devices of a PROFIBUS network. Transfer rate: Here, you select the transmission speed to be used on the PROFIBUS network. Profile: You have a choice of four alternatives for the PROFIBUS settings. "DP", "Standard" and "Universal (DP/FMS)" are predefined settings that you cannot change. If you select "Userdefined", you can adapt the bus parameters yourself. If you have selected "User-defined", go to "Configurations > PROFIBUS > Bus parameters" in area navigation. If you have selected one of the defaults (DP, Standard or Universal (DP/FMS)), you should select the "Include" check box in "Configurations > PROFIBUS > Bus parameters > Additional parameters". You can then set the number of masters and slaves on the bus. This allows a more precise calculation of the bus parameters and potential bus disruptions can be prevented. The option cannot be selected with a user-defined profile.
2912
Using online and diagnostics functions 12.11 Setting parameters for the MPI and PROFIBUS interfaces
See also
Overview of the bus parameters for PROFIBUS (Page 2913) Setting MPI or PROFIBUS interface parameters automatically (Page 2908)
12.11.5
Introduction
The PROFIBUS subnet will only function problem-free if the parameters for the bus profile are matched to one another. You should therefore only change the default values if you are familiar with how to configure the bus profile for PROFIBUS. It may be possible for the bus parameters to be adjusted depending on the bus profile. The offline values of the bus parameters are always shown even if you are online and linked to the target system. The displayed parameters are valid for the entire PROFIBUS subnet.
2913
Using online and diagnostics functions 12.11 Setting parameters for the MPI and PROFIBUS interfaces
Tid2: Idle time 2 Idle time 2 specifies the delay time after sending a call without a response. Ttr: Target rotation time The target rotation time is the maximum time made available for a token rotation. During this time, all active devices (masters) receive the token once. The difference between the desired token round-trip time and the actual token round-trip time decides how much time is left for masters to send data frames to the slaves. As the minimum target rotation time (Ttr), select a value = 5000 times the HSA (Highest Station Address). Watchdog: Watchdog The watchdog time specifies the time after which a device must be addressed. As the minimum watchdog time, select a value = 6250 times the HSA. Note If you want to create a user-defined bus profile, please note that the minimum target rotation time (Ttr) should be 5000 times the HSA (highest PROFIBUS address). The minimum watchdog time should also be 6250 times the HSA.
See also
Setting parameters for the PROFIBUS interface (Page 2910)
12.11.6
Procedure
To restore the MPI or PROFIBUS configuration to the default settings, follow these steps: 1. Select the MPI/PROFIBUS interface in the project tree in "Online access". 2. Select the "Properties" command in the shortcut menu of the interface. The dialog for configuring the interface opens. 3. Select "Configurations > MPI" or "Configurations > PROFIBUS", depending on the interface properties you want to reset. 4. Click the "Standard" button to reset all the settings.
2914
Using online and diagnostics functions 12.12 Establishing a remote connection with TeleService
12.12
12.12.1
Scope of functions
TeleService allows you to use the range of TIA portal functions via a telephone network by establishing a remote connection to a remote system. The online connection allows you to edit a remote system in the usual way with the TIA Portal.
Advantages
Using TeleService offers the following advantages: You can easily access even remote sections of plants and include them in a complete system. You can offer rapid help and support in the event of faults in a remote system without having to go there yourself. You can employ your resources effectively. It significantly reduces costs. It can significantly reduce plant downtimes. It improves the efficiency of your plant.
See also
TeleService functionality (Page 2916)
2915
Using online and diagnostics functions 12.12 Establishing a remote connection with TeleService
See also
Basics of using a TS adapter (Page 2920) Supported telephone networks and modems (Page 2917)
2916
Using online and diagnostics functions 12.12 Establishing a remote connection with TeleService
You can enter any number of plants in a phone book. Systems contain the data required for establishing a remote connection, for example, the name and location of the device and the phone number to be dialed, along with all country specific details. The respective TS adapters used are distinguished by color, depending on if a TS Adapter MPI or a TS Adapter IE is used for establishing the connection.
See also
Working with the phone book (Page 2941)
12.12.2
12.12.2.1 Supported telephone networks and modems Telephone networks which can be used
TeleService can be used with digital networks (ISDN), analog networks and radio networks (with GSM technology). The table below shows the transmission duration scaled to the transmission duration of the MPI card (CP 5611 = 1x) and as a function of the TS Adapter MPI used:
Connection: Direct connection (COM, 19.2 Kbps) Direct connection (USB) ISDN network (64 Kbps) Analog network (28.8 Kbps) Radio network (9.6 Kbps) with TS Adapter I V5.0: 8x 16 x 32 x 150 x with TS Adapter I V5.1/V5.2: 8x 11 x 14 x 40 x with TS Adapter II V1.0: 2.5 x 8x 11 x 30 x
Restrictions
Communication with the TS Adapter via the CAPI interface is not possible with internal ISDN cards or with PCMCIA cards unless you have a virtual COM interface from the modem manufacturer.
Modem support
TeleService has been implemented to be independent of the modem. This means that all standard modems (Hayes-compatible/AT commands) which can be installed in the Windows Control Panel can also be used by TeleService. The basic requirement is for a physical/virtual COM interface. The choice of modem type is determined primarily by the existing hardware of the programming device/PC and the telephone network to be used.
2917
Using online and diagnostics functions 12.12 Establishing a remote connection with TeleService
Gateways
Gateways between the various telephone networks are in principle possible. Remote connections from an ISDN adapter to an analog modem and vice versa only function with special ISDN telephone adapters.
Procedure
Proceed as follows: 1. Make sure your programming device/PC and the modem are switched off. 2. Physically connect the external modem to a COM or USB interface on your programming device/PC. You can also install an internal modem or a PCMCIA card in accordance with the manufacturer's specifications. 3. Now switch on the modem and then the programming device or the PC.
2918
Using online and diagnostics functions 12.12 Establishing a remote connection with TeleService
Result
Plug-and-play modems are recognized and installed automatically by the operating system. Dialogs will take you through the installation procedure. Note Modems without plug-and-play If your modem is not recognized automatically when switched on, you will have to install it yourself using the Control Panel. Please refer to the information in the documentation supplied with your modem.
2919
Using online and diagnostics functions 12.12 Establishing a remote connection with TeleService
Note Please note the following information on configuring the remote modem: The default parameters for the modem and the serial port set in the TS Adapter should in most cases ensure successful operation; changes in the parameter assignment will only be needed in rare cases. You need only change the parameter assignment of the TS Adapter if a modem connection is not established or if factory settings are to be adapted or optimized. TS Adapter parameter assignment can be changed via either a direct or a remote connection.
12.12.3
2920
Using online and diagnostics functions 12.12 Establishing a remote connection with TeleService
With the function "export adapter parameter", different parameter sets can be saved in external files, and reloaded in the TS Adapter via the function "import adapter parameter". The figure below shows how a remote connection can be established with variousTS Adapter:
Figure 12-1
You can choose between a number of different TS Adapters, each of which offers a different functionality and different connection options.
See also
Short description of the TS adapter MPI (Page 2922) Short description of the TS adapter IE (Page 2929) Exporting adapter parameters (Page 2928) Importing adapter parameters (Page 2928)
2921
Using online and diagnostics functions 12.12 Establishing a remote connection with TeleService
12.12.3.3 TS adapter MPI Short description of the TS adapter MPI TS Adapter MPI:
The designation "TS Adapter MPI" is a collective term for allTS Adapter with an MPI/DP interface. The TS Adapter MPI comes in the following versions: As TS Adapter I (parameters cannot be assigned via the TIA portal) as TS Adapter II The tables below provide a short description of the functionalities. For detailed information on your TS Adapter, please refer to the documentation supplied with it.
TS Adapter I Direct connection via the serial port. The firmware cannot be replaced. Version: V3.0 V5.0 V5.1 V5.2 TS Adapter II: Direct connection via the Universal Serial Bus (USB). Replaceable firmware. Modem integrated or external. The TS Adapter II switches automatically between the modems. As long as no external modem is connected, the adapter will use the internal modem. There are two variants: With internal analog modem. An external modem can also be connected to the RS232 port. With internal ISDN adapter. An external modem can also be connected to the RS232 port. Main expansions: Access protection Access protection, network type AUTO Access protection, network type AUTO, sending SMS messages
2922
Using online and diagnostics functions 12.12 Establishing a remote connection with TeleService
How the TS adapter MPI works How the TS Adapter MPI Works
In line with the configuration, the TS Adapter MPI connects the serial port or USB port of your programming device/personal computer (direct connection) or the serial port of a modem (modem connection) to the MPI/PROFIBUS network of your automation system. The TS Adapter MPI has a non-volatile memory. Parameters for the following functions are stored in this memory: The MPI/PROFIBUS network (network parameters) The mode of the modem used The serial port to the modem Access protection
Operating a TS adapter MPI in direct connection mode Direct connection with TS Adapter MPI
The direct connection is used to assign the parameters of the TS adapter MPI. The same configuration also allows you to go online in the TIA portal and thereby check the assigned MPI/PROFIBUS parameters for bus compatibility. This means that (as with a PC adapter) SIMATIC S7/C7 systems can be accessed via the MPI/DP interface without an MPI/ PROFIBUS module occupying a slot for a programming device/PC.
2923
Using online and diagnostics functions 12.12 Establishing a remote connection with TeleService
Access protection for the TS Adapter is not active in direct connection configuration. This means that the parameter assignment of the TS Adapter can be changed without any problems, for example by importing adapter parameters. Note Display the TS adapter MPI in the TIA portal As soon as you have connected a TS adapter MPI with the PG/PC via the UBS interface, the folder "TS adapter" is displayed in the project navigation. When you open the folder, you can assign the parameters of the connected TS adapter MPI via the following dialog.
Operating a TS adapter MPI in modem connection mode Introduction to the modem connection with TS Adapter MPI
This configuration allows you to dial into a remote system. To do this, you establish a remote connection to a remote system using TeleService on a telephone network. You can then work with the selected system as usual, with the TIA portal, over the established modem connection.
2924
Using online and diagnostics functions 12.12 Establishing a remote connection with TeleService
Note Parallel operation between direct and modem connection The TS adapter II has two connections for communication with PG/PC, both of which can be connected at the same time. At the same time, connect the USB interface with the PG/PC and the modem interface with the telephone network. In this configuration you can either use the direct or the modem connection. A parallel operation is not possible!
TS adapter MPI configuration options Useful information on configuring the TS Adapter MPI
The TS Adapter MPI can be configured in both direct connection mode and via an existing remote connection. The following parameter assignment options are available: Reconfiguration (Page 2926) Restoring default parameter assignment (Page 2927) Importing adapter parameters (Page 2928) Exporting adapter parameters (Page 2928) Setting up access protection (Page 2936)
2925
Using online and diagnostics functions 12.12 Establishing a remote connection with TeleService
Parameter assignment
Configure your TS Adapter in accordance with the documentation supplied with the TS Adapter. It will detail the exact procedure for parameter assignment. Note Please note the following when configuring the TS Adapter MPI If you change the current parameter settings when there is an established remote connection, there is a risk it will not subsequently be possible to establish a modem connection with the modified parameters. The TS Adapter MPI can in this case only be configured in direct connection mode. This means that either parameter assignment must be carried out with a programming device/personal computer at the plant location or the TS Adapter MPI must be brought to the location of the local programming device/personal computer in order to be configured.
Positive acknowledgement
During parameter assignment, the data is written to the non-volatile memory of the TS Adapter MPI. The parameter assignment process is not acknowledged positively until all precautions have been taken to ensure that parameter changes have been carried out correctly and will thus survive a power failure.
Requirement
A TS Adapter MPI is connected to your computer and the folder "TS adapter" is displayed in the project tree under "Online access".
2926
Using online and diagnostics functions 12.12 Establishing a remote connection with TeleService
Procedure
To assign the parameters for the TS Adapter MPI im Direktanschluss please proceed as follows: 1. In the project tree, double-click on the "TS adapter" folder under "Online access". 2. Select the command "Assign TS Adapter MPI parameters". The "Assign TS Adapter MPI parameters" dialog opens. 3. Set the desired parameters in the individual tabs of the dialog. 4. Confirm your entries with "OK".
Result
The configured parameters are saved in the non-volatile memory of the TS adapter MPI. Parameter assignment is then complete.
Requirement
A TS Adapter MPI is connected to your computer and is displayed in the project tree under "Online access" in the "TeleService" folder.
Procedure
Proceed as follows to restore default parameters for the TS Adapter MPI: 1. Open the "TeleService" folder in project tree. 2. Double-click the "TS Adapter MPI" folder. 3. Select the command "Assign TS Adapter MPI parameters". The "Assign TS Adapter MPI parameters" dialog opens. 4. Click the "Reset" button under "General". 5. Confirm your entries with "OK".
Result
The TS Adapter MPI default parameters set on delivery are restored.
See also
TS adapter MPI configuration options (Page 2925)
2927
Using online and diagnostics functions 12.12 Establishing a remote connection with TeleService
Requirement
A TS Adapter MPI is connected to your computer and is displayed in the project tree under "Online access" in the "TeleService" folder.
Procedure
To export the adapter parameters of a TS Adapter MPI: 1. Open the "TeleService" folder in project tree. 2. Double-click the "TS Adapter MPI" folder. 3. Select the command "Assign TS Adapter MPI parameters". The "Assign TS Adapter MPI parameters" dialog opens. 4. Click the "Export" button. 5. A window will open in which you can select the file to which you wish to export the configuration of the TS Adapter MPI. 6. Confirm with "Save".
Result
The parameters of the TS Adapter MPI are saved in the specified file (*.tap). The export of the adapter parameters is now complete.
2928
Using online and diagnostics functions 12.12 Establishing a remote connection with TeleService
Requirement
A TS Adapter MPI is connected to your computer and is displayed in the project tree under "Online access" in the "TeleService" folder.
Procedure
To import the adapter parameters of a TS Adapter MPI: 1. Open the "TeleService" folder in project tree. 2. Double-click the "TS Adapter MPI" folder. 3. Select the command "Assign TS Adapter MPI parameters". The "Assign TS Adapter MPI parameters" dialog opens. 4. Click the "Import" button. 5. A dialog will open in which you can select the file to which you wish to import the configuration of the TS Adapter MPI. 6. Confirm the next dialog with "Yes".
Result
The parameters selected are saved in the non-volatile memory of the TS Adapter MPI. Adapter parameter import is then complete.
2929
Using online and diagnostics functions 12.12 Establishing a remote connection with TeleService
TS Adapter IE Basic: Direct connection over Industrial Ethernet (IE). Replaceable firmware. Plug-in modules. Parameters are assigned via a Web interface. There are 4 variants: TS Adapter IE Basic MODEM: Basic device TS Adapter IE Basic with TS Module MODEM for operation on the analog telephone network. TS Adapter IE Basic ISDN: Basic device TS Adapter IE Basic with TS Module ISDN for operation on ISDN telephone systems. TS Adapter IE Basic GSM: Basic device TS Adapter IE Basic with TS Module GSM for operation on the GSM radio network. TS Adapter IE Basic RS232: Basic device TS Adapter IE Basic with TS Module RS232 for connecting an external modem.
2930
Using online and diagnostics functions 12.12 Establishing a remote connection with TeleService
Direct connection
In the direct connection to the PG/PC, you can set the TS Adapter IE Basic through Ethernet. Note The operation of the TS Adapter IE Basic without a TS module is not permitted.
Figure 12-2
Direct connection
Figure 12-3
2931
Using online and diagnostics functions 12.12 Establishing a remote connection with TeleService
More information about the TS modules can be found in the TS Adapter modular manual.
Figure 12-4
More information about the TS modules can be found in the TS Adapter modular manual.
Figure 12-5
More information about the TS modules can be found in the TS Adapter modular manual.
2932
Using online and diagnostics functions 12.12 Establishing a remote connection with TeleService
TS Adapter IE parameter assignment options Useful information for configuring the TS Adapter IE
The TS Adapter IE is configured via a Web interface. Web help associated with the parameter assignment interface is made available for the configuring the TS Adapter IE. The following parameter assignment options are available: Reconfiguration Restoring default parameter assignment Importing adapter parameters Exporting adapter parameters Note Parameter assignment Configure your TS Adapter in accordance with the documentation supplied with the TS Adapter. It will detail the exact procedure for parameter assignments.
Requirement
There is a LAN connection to your TS Adapter IE Basic. The TS Adapter IE Basic is connected to the power supply.
Procedure
To assign the parameters for the TS Adapter IE please proceed as follows:: 1. In the project tree of the TIA portal, open the "Online access" folder. 2. Double-click on the Ethernet port of your computer. 3. Double-click on the "Display accessible nodes" command. The TS adapter IE is then displayed.
2933
Using online and diagnostics functions 12.12 Establishing a remote connection with TeleService
4. Double-click on the <TS adapter IE> folder and then on "Online and diagnostic", and assign the desired IP address to the TS adapter IE in the following dialogs. Please note that the IP address of the PG/PC interface card is located in the same subnet as the IP address that you issue for the TS adapter IE. 5. Update the view in the project tree for the "Accessible nodes", so that the TS adapter IE is displayed with the newly allocated IP address. 6. Open the folder <TS adapter IE> in the node list. 7. Double-click the command "Assign TS adapter IE parameters". The allocated web-interface opens for assigning the TS adapters IE parameter. 8. Complete the "logon" for the web interface. 9. Set the desired parameters in the individual tabs of the dialog. 10.Confirm your entries with "Save settings".
Result
The configured parameters are saved in the non-volatile memory of the TS adapter IE. Parameter assignment is then complete.
12.12.4
2934
Using online and diagnostics functions 12.12 Establishing a remote connection with TeleService
For a modem connection, only an administrator can define the two users and change and, if necessary, delete their settings. Those logged in as users can only change their own passwords and their own callback numbers. However, with the TS adapter MP you can access the process of assigning parameters of the TS adapter in direct connection, without restriction.
Advantages
Access protection offers the following advantages: Unauthorized access by persons outside the system is almost impossible. The plant operator bears most of the telephone costs.
2935
Using online and diagnostics functions 12.12 Establishing a remote connection with TeleService
Level of access protection 1 2 Administrator/User password enter enter Callback number do not enter enter
Logging on to TS Adapter
When you log on to the TS Adapter and after you have set up access protection, enter your user name, the corresponding password and, if desired, a callback number:
Level of access protection 1 2 Administrator/User password enter enter Callback number do not enter or enter any callback number do not enter
If you have entered a callback number during connection establishment (access protection level 1) or stored a callback number in the TS Adapter (access protection level 2), the modem connection will be terminated and the TS Adapter will call back the given number.
12.12.4.4 Setting up access protection and callback number for the TS adapter Introduction
During the parameter assignment for the TS adapter MPI in TeleService, you can set up access protection and a callback number for the parameter assignment of the adapter and connection to the remote system. The following describes the parameter assignment for a TS adapter MPI. The parameter assignment of a TS adapter IE is carried out in analog. The specific method is described in the web help of this adapter.
Requirement
A TS Adapter MPI is connected to your computer and is displayed in the project tree under "Accessible nodes".
Procedure
To set up access protection for the TS adapter, proceed as follows: 1. Click on the command "Assign TS Adapter MPI parameters" in the project tree. 2. Open the "Access security" tab.
2936
Using online and diagnostics functions 12.12 Establishing a remote connection with TeleService
3. Enter a password for your user name and/or number that you want the modem to call back following logon. If you are an administrator, you can change all the settings for administrators and users, and delete or create users. If you are logged on as a user, you can only change your own settings (password and callback number). 4. Confirm all entries before exiting the dialog with "OK". 5. Click the "Yes" button to confirm the following query.
Result
The parameter assignment for the access protection and the callback number is saved in the non-volatile memory of the TS adapter MPI.
Note Important points to note when setting up access protection: The settings in the "Modem" tab must correspond to the conditions at the plant if callback functionality is to be guaranteed. Entering an incorrect callback number in the role of "ADMIN" user will mean you are no longer able to access the TS Adapter MPI over a remote connection! Test the callback number before you enter it as the "ADMIN" user by calling the given callback number during connection establishment (access protection level 1).
2937
Using online and diagnostics functions 12.12 Establishing a remote connection with TeleService
5. Select the telephone network under "Network" if it is not already selected. 6. Select the modem you are using under "Local Settings". 7. Enter the phone number to be dialed in the appropriate box or open the phone book by clicking on the button behind it and take the desired phone number from the phone book. 8. Enter your user name and associated password of the TS adapter. 9. If you want a "Connection setup with callback", select the appropriate option button. 10.Click the "Dial" button to establish the desired remote connection. This button only becomes active when you have entered all the parameters needed establishing a remote connection. Any remote connection is displayed under "Status". 11.Enter the desired callback number in the dialog that follows.
Result
The remote connection to the desired system is made with callback. The connected system is shown with the corresponding icon in the project tree. Note This procedure is useful if the costs of the modem connection are to be borne by the plant operator and if the actual callback number is not fixed, i.e. callback is not always to the same receiver. It is particularly useful for mobile users.
Result
Callback to a number stored on the TS adapter has been established. If a remote connection is established, the callback occurs from the remote system. Note This procedure offers the highest level of access protection. However, it does pose a risk: if the callback number stored on the TS Adapter is not correct, it will no longer be possible to access the TS Adapter over a modem connection. The device can in such a case only be put back into operation by changing the parameter settings on site.
2938
Using online and diagnostics functions 12.12 Establishing a remote connection with TeleService
12.12.5
Requirements
A local modem is installed and configured. The TS adapter is located in the remote system. A remote modem is installed and parameters have been assigned.
Proceed as follows:
1. In the project tree of the TIA Portal, open the "Online access" folder. 2. Then click the "TeleService" folder contained within. 3. Double-click the "Set up/close remote connection" entry. The "Set up remote connection to the remote system" dialog opens. 4. Select the adapter type used in the "TS Adapter" drop down list. 5. Select the telephone network under "Network". 6. Select the modem you are using under "Local Settings". 7. Enter the phone number to be dialed in the appropriate box or open the phone book by clicking on the button behind it and take the desired phone number from the phone book. 8. Enter the your user name and associated password. 9. If you want a "Connection setup with callback", select the appropriate option button. 10.Click the "Dial" button to establish the desired remote connection. This button only becomes active when you have entered all the parameters needed establishing a remote connection. Any remote connection is displayed under "Status".
Result
The remote connection to the desired plant is established. In "Status" the progress of establishing the connection is displayed: First "Select", then "Authenticate". The dialog closes once the remote connection is established. The message appears in the TIA portal status line: "Remote connection is established". You can now use the remote connection with TIA portal and communicate with the automation system.
2939
Using online and diagnostics functions 12.12 Establishing a remote connection with TeleService
12.12.5.2 Terminating a remote connection To disconnect an active remote connection, proceed as follows:
1. Double-click the "Set up/close remote connection" entry.
Result
The connection will be terminated immediately. "Offline" status will be displayed in the status row again once the remote connection has been terminated. Note You should go offline in the TIA Portal before you terminate the remote connection.
2940
Using online and diagnostics functions 12.12 Establishing a remote connection with TeleService
Enable the log file option in the advanced properties. The next attempt to establish a connection will then be recorded in a file in the Windows directory. Ensure that the ISDN TAs used work with the same B and D channel protocol.
12.12.6
12.12.6.1 Basics on working with the phone book Working with the phone book
You have the following options when working with a phone book: Open phone book Save phone book Import phone book data Export phone book data Printing the phone book Use phone book data to establish a remote connection. You can implement these functions simply and easily using the buttons in the toolbar. Note Access to phone books The phonebook is user specific in TeleService. However, it is not possible to access the global telephone book with more than one instance of the TIA portal at the same time.
2941
Using online and diagnostics functions 12.12 Establishing a remote connection with TeleService
See also
Open phone book (Page 2943) Saving phone book (Page 2943) Importing phone book data (Page 2943) Exporting phone book data (Page 2944) Printing the phone book (Page 2945)
2942
Using online and diagnostics functions 12.12 Establishing a remote connection with TeleService
12.12.6.4 Manage phone book Open phone book Opening phone books
To open the phone book, proceed as follows: 1. In the project tree, double-click on the "Phone book" folder under "Online access" > "TeleService". 2. The phone book opens so that you can enter or edit the desired plant data.
2943
Using online and diagnostics functions 12.12 Establishing a remote connection with TeleService
Requirement
You have already created an import-capable phone book file under TeleService.
Procedure
Proceed as follows to import the phone book data: 1. Open the "TeleService" folder in project tree. 2. Double-click on the "Phone book" folder. 3. Click the "Import" button in the toolbar. 4. Confirm the prompt asking if you want to save the current state of the phone book with "Yes" when applicable, and specify the location for storing the phone book in the dialog that follows. 5. If you do not want save the current state of the phone book, answer the prompt with "No". In the subsequent dialog, select the phone book file to which in the current phone book should be stored. 6. Close the dialog box with "OK".
Result
The imported phone book data is displayed in the global phone book.
Requirement
You have already created a phone book under TeleService with the corresponding plant data.
Procedure
Proceed as follows to export the phone book data: 1. Open the "TeleService" folder in project tree. 2. Double-click on the "Phone book" folder. 3. Click the "Export" button in the toolbar. 4. In the next dialog, select where the current phone book is to be exported. 5. Close the dialog box with "OK".
2944
Using online and diagnostics functions 12.12 Establishing a remote connection with TeleService
Result
The exported phone book data are saved in the specified export file.
Proceed as follows:
1. Open the telephone book. 2. Select the Phone book > Print menu command or click on the appropriate button in the toolbar. The "Print" dialog will open. 3. Specify whether you wish to print the complete phone book or just part of it and set all other options. 4. Start the print job with "OK".
Result
The phone book data is printed on the default printer. If the printout is more than one page long, an identifier is printed after the page number at the bottom right corner of the page to indicate that there is another page. The last page does not have this symbol, indicating that no more pages are to follow.
12.12.7
2945
Using online and diagnostics functions 12.12 Establishing a remote connection with TeleService
Communications instruction "AS_DIAL": Establish remote connection to AS Communications instruction "AS_MAIL": Transfer email
12.12.7.2 Establishing a connection from and to remote systens (PG-AS-remote coupling) Remote plant access to a programming device/personal computer Introduction
You can establish a remote connection to and communicate with a remote system using the application TeleService and a TS Adapter MPI. The initiative for establishing the remote connection comes from the programming device/personal computer. However, events which require rapid intervention often occur at a remote system. In such cases, the automation system can initiate a remote connection to a programming device/ personal computer if an asynchronous event occurs. The graphic below shows the components which are required for establishing a connection from a plant to a programming device/personal computer.
2946
Using online and diagnostics functions 12.12 Establishing a remote connection with TeleService
Figure 12-6
Hardware requirements:
The only hardware required for establishing a remote connection from a remote system to a programming device/personal computer is that needed for accessing the remote system from the programming device/personal computer. Your user program calls the communication instruction "PG_DIAL" to establish the connection. This can only be executed on an S7-300 or S7-400 CPU on which S7 basic communication is implemented. A TS Adapter I , version 5.0 or later, or a TS Adapter II must be used.
2947
Using online and diagnostics functions 12.12 Establishing a remote connection with TeleService
12.12.7.3 Data exchange between remote systems (AS-AS-remote coupling) AS-AS remote link basics Introduction
The AS-AS remote link allows two automation systems to exchange process data via the telephone network.
Requirement
Communication instruction "AS_DIAL" is available if you use a CPU from the S7-300/400 family.
2948
Using online and diagnostics functions 12.12 Establishing a remote connection with TeleService
Figure 12-7
Hardware requirements
The only hardware you need for transferring process data from a local to a remote automation system is that also needed for accessing the respective automation system from the programming device/personal computer. To establish and terminate the remote connection, the TIA Portal user program of the local CPU calls a communication instruction. This communication instruction can be executed on an S7-300/400 CPU or a C7 CPU. The communication instruction requires S7 basic communication to be implemented on the CPU. The remote CPU must also support S7 basic communication. A TS Adapter I, version V5.1 or later, or a TS Adapter II must be used.
Software requirements
The "AS_DIAL" communication instruction is included in the product package of TeleService, and is integrated into the library of the TIA Portal during the installation in the communication instructions folder of the Task Card under TeleService. In order to establish and terminate a
2949
Using online and diagnostics functions 12.12 Establishing a remote connection with TeleService
remote connection to a remote automation system from a local automation system, call the communication instruction "AS_DIAL" in the TIA Portal user program of the local CPU.
Figure 12-8
12.12.7.4 Send SMS from a system Requirements for sending an SMS Introduction
Certain hardware and software requirements must be fulfilled before a plant can send an SMS. These requirements are detailed below.
Hardware requirements
To send an SMS from a plant, you will require a GSM radio modem and a TS Adapter MPI. A TS Adapter I, version V5.2 or later, or a TS Adapter II must be used.
2950
Using online and diagnostics functions 12.12 Establishing a remote connection with TeleService
communication instructions folder of the Task Card under TeleService. If a plant is to send an SMS, the user program of the plant must call the communication instruction "SMS_SEND".
Figure 12-9
12.12.7.5 Send an email from a system Requirements for sending e-mails Introduction
The following hardware and software requirements must be fulfilled if a plant is to send an email:
Hardware requirements
To send e-mail from a plant, you will need a TS Adapter IE and a CPU 31x2 PN/DP, firmware version V2.5 or higher, or a CPU 41x-3 PN/DP.
2951
Using online and diagnostics functions 12.12 Establishing a remote connection with TeleService
The "Use gateway/router" property must also be set for the Ethernet interface in the configuration of the CPU on which the communication instruction "AS_MAIL" runs. (See: Hardware configuration > PROFINET IO (PN-IO) > General > Properties > Parameters). The IP address of the Ethernet interface of the TS Adapter IE should be specified as the "Address".
2952
Using online and diagnostics functions 12.12 Establishing a remote connection with TeleService
12.12.8
Troubleshooting
See also
Remote connection to the TS adapter is not established (Page 2954) Remote connection from the TS adapter is not established (Page 2955) Modem connection is interrupted (Page 2956) Modem alarms (Page 2957) Recording a log file for the modem (Page 2953)
2953
Using online and diagnostics functions 12.12 Establishing a remote connection with TeleService
Procedure:
Proceed as follows: 1. Activate the properties dialog of the modem used via the "Phone and modem options" option in the Control Panel. 2. Check the settings of the "Log" option in the "Diagnostics" tab and if necessary change the log file settings so that the file is recorded.
Result:
Activity between the programming device/personal computer and the modem are entered in the log file. If there are problems establishing the connection, you can evaluate the data recorded in the log file to determine the cause of the error.
12.12.8.3 Remote connection to the TS adapter is not established Remote connection to TS Adapter is not established
The table below sets out possible causes and how to eliminate them if no remote connection to the TS Adapter can be established.
Possible cause Cabling faulty Dial parameters for main telephone line and extension incorrectly set Check/Remedy Are all the connecting cables connected correctly? Are the connectors loose? Are the modem properties and dial parameters set for your modem correct for the phone connection (main telephone line or extension)? Do not specify a dial-out code in the "Dial parameters" dialog if you operate your modem on a local loop (main telephone line). The fields for the dial-out code for local calls and long-distance calls must be empty. Dialing mode incorrectly set Is the correct dialing mode (tone/pulse) set in the dialog for the dial parameters of your modem? Use a connected telephone to check the connection on which you want to operate the modem. You should hear crackling noises on the telephone during pulse dialing and tones of varying pitches during tone dialing. Set the corresponding dialing mode in the modem dial parameters.
2954
Using online and diagnostics functions 12.12 Establishing a remote connection with TeleService
Possible cause Dial disable active Check/Remedy The dial disable function is a country-specific modem property which, depending on the modem, becomes effective after one or more unsuccessful attempts to establish a connection. If your modem still does not respond after several attempts to dial, the dial disable function may be active. Characters are still sent to the modem after the dial command but the modem does not start the dialing process. The driver receives a general error message. Refer to the modem documentation for information on how the dial disable function is implemented for your modem. Create a log file (Page 2953) (modemlog.txt) in which the activities between the programming device/personal computer and modem are recorded. Then check whether the file contains an entry caused by dial disable (e.g. DELAYED). Phone connection defective or busy Connect a phone and check whether a dial tone can be heard on this connection. Any analog phone connected on the same connection must be hung up. You cannot establish an additional modem connection on this connection if there is an existing phone connection. Serial parameters set incorrectly Are the correct values entered in the "Settings" tab for modem properties (8 data bits, no parity, 1 stop bit)? Is the correct COM interface set in the "General" tab for the modem properties? Familiarize yourself with the modem initialization string requirements (Page 2920) and set the string accordingly. Procedure for configuring the TS Adapter IE (Page 2930) Adapt the modem settings. Useful information on configuring the TS Adapter MPI (Page 2925) Restoring the default parameter assignment of a TS Adapter MPI (Page 2927) Procedure for configuring the TS Adapter IE (Page 2926)
Initialization string of the TS Adapter is not suitable for the modem. Settings for error correction between the modem at the TS Adapter and the modem at the PC/programming device are not compatible.
12.12.8.4 Remote connection from the TS adapter is not established No callback from TS Adapter
The table below sets out possible causes and how to eliminate them if there is no callback from the TS Adapter.
Possible cause Errors in the location or call settings in the TS Adapter Check/Remedy Check the TS Adapter parameter assignment: Are the dialing mode and dial-out code set correctly for your phone connection? Does the modem at the TS Adapter support the characters configured for the dialout code? Is "Wait for dial tone before dialing" deactivated for an extension? Initialization of modem insufficient Check the string for modem initialization: The modem may require a further initialization in order to establish a remote connection. Properties of the modem initialization string for the TS Adapter MPI Callback number is incorrect Check the configuration of the callback number you assigned.
2955
Using online and diagnostics functions 12.12 Establishing a remote connection with TeleService
Set the modem initialization string in accordance with the following requirements: For further details, see: Requirements of the modem initialization string for TS Adapter MPI Options for the process of assigning parameters for the TS Adapter IE
2956
Using online and diagnostics functions 12.12 Establishing a remote connection with TeleService
See also
Initialization string requirements (Page 2920) TS adapter MPI configuration options (Page 2925) TS Adapter IE parameter assignment options (Page 2933)
Try again later. Refer to the modem documentation for information on how the dial disable function is implemented for your modem and if necessary remove it.
2957
Index
A
add external graphic , 2582 add graphic to graphics library, 2581 Absolute value, 1210, 1371 Compiling Project, 2609 Connection parameter assignment General, 347 External source file Editing, 980 Opening, 980 Module Inserting, 298 SetColorBackgroundLighting, 2207 SIMATIC PC station Load, 57 STARTUP Warm restart, 505 Zoom in/out, (See Zoom) Ability to read back connection parameters, 362 ABS, 1210, 1371, 1480 Absolute Addressing of a tag, 1992, 2266 Absolute value, 1210, 1480 Access protection, 2142 Access protection level 1, 2935 Access protection level 2, 2935 Advantages, 2935 Configuring, 2146 Factory state, 2934 User administration, 2141 Validity, 2934 Access to operands, 662, 663, 664, 665, 666, 667, 669, 670, 671, 672, 675, 676 Access to phone books, 2941 Accessible devices, 468, 2291, 2341 ACK, 2672 Acknowledge, 2032, 2228, 2231 Alarm, 2674 Error alarm, 2674 AcknowledgeAlarm, 2191 Acknowledgment, 2034 Configuring, 2058, 2059, 2060 Acknowledgment concept Alarm with simple acknowledgment, 2036 Alarm without acknowledgment, 2036 Acknowledgment model, 2036 ACOS, 1227, 1388, 1496 Acquisition cycle Area pointer, 2271 Tag, 2008, 2015, 2025 Acquisition mode Tag, 2008 Actions Basics of redoing actions, 221 Basics of undoing, 221 Redoing, 224 Undoing, 223 Activate Project language, 2570 ActivateCleanScreen, 2167 ActivatePreviousScreen, 2168 ActivateScreen, 2165 ActivateScreenByNumber, 2166
"
"WWW" instruction, 414
*
*.bmp, 1886 *.emf, 1886 *.gif, 1886 *.ico, 1886 *.jpeg, 1886 *.jpg, 1886 *.tif, 1886 *.wmf, 1886
:
:P, 516
3
32-bit down counter, 570
2959
Index
Active Area pointer, 2271 Adapting a project For a different HMI device, 2627 Add, 1201, 1361 Objects to the group, 1892 ADD, 1201, 1361 Add empty line, 2809 Add separator line, 2809 Adding Adding times with T_ADD, 1569 Additional field devices (PROFIBUS and PROFINET), 444, 471 Address Area pointer, 2271 Mitsubishi, 2466 Omron Host Link, 2515 Address multiplexing with absolute addresses, 2016 with symbolic addresses, 2016 Address packing, 438 Address range Changing, 392 Address register, 674 Addresses Assigning, 393 Interrupt with packed, 442 Pack, 438 Unpack, 438 Addressing, 516 Addressing tags indirectly, 2012, 2013 Allen-Bradley Ethernet IP, 2423 Changing, 392 General, 391 MPI, 2357 Multiplexing, 2012 Addressing operands, 662, 663, 664, 665, 666, 667, 669, 670, 671, 672, 675, 676 Adjust, 2225 AdjustContrast, 2164 Admin, 2667
Alarm Acknowledge, 2674 Alarm data type, 1104 Components, 1101, 2037 Configuring, 2043, 2049 Displaying, 1972 Editing, 2674 Exporting, 2541 Formal parameter, 1104 Importing, 2543 in Runtime, 2668 In runtime, 2061 Inspector window, 47 System function, 2066 Alarm blocks, 1101 Alarm buffer in Runtime, 2669 In runtime, 2062 Alarm buffer overflow, 2230 Alarm class, 2037 Copying, 1117 Creating, 1117 Editing, 1117 in Runtime, 2668 In runtime, 2061 Layout, 2063, 2671 Alarm classes, 2033 Custom, 2033 Name change through migration, 105 Predefined, 2033 Use, 2033 Alarm configuration Additional text, 1110 Deleting an associate value, 1114 Entering text, 1110 Info text, 1110 Introduction, 1100 Locking an attribute, 1111 Locking text, 1111 Unlocking an attribute, 1112 Unlocking text, 1111
2960
Index
Alarm display, 497 "Active alarms" view, 499 Acknowledging an alarm, 501 Archive view, 498 Clear archive, 499 Export archive, 499 Ignoring alarms, 501 Layout of the alarms in the "Active alarms" view, 500 Layout of the alarms in the archive view, 498 Receiving alarms, 499 Using the keyboard, 502 Alarm editor Structure, 1105 Alarm event Acknowledge, 2032 Incoming, 2032 Outgoing, 2032 Alarm group, 2036, 2038 Configuring, 2041 Creating, 2041 Migration, 104 Alarm indicator, 47, 1977, 2052, 2064, 2672 Alarm classes, 1978 Application, 2064 Configuring, 2056 Events, 1978 in Runtime, 2670 In runtime, 2062 Layout, 1978, 2065 Operation, 2065 Alarm log in Runtime, 2669 Alarm message Acknowledgment by the PLC, 2317, 2373, 2412, 2453, 2479, 2505, 2519 Acknowledgment on the HMI device, 2318, 2373, 2412, 2454, 2479, 2505, 2520 Configure acknowledgment, 2317, 2373, 2412, 2453, 2478, 2505, 2519 Alarm number, 2037 Assigning, 1101 Alarm status, 2038 Acknowledged, 2032 Incoming, 2032 Outgoing, 2032 Alarm system, 2029 Alarm text, 2038 Formatting, 2047 Output fields, 51 Removing format settings, 2047 Special characters, 51
Alarm type, 1103 Editing, 1108 Alarm types, 2030 Alarm view, 47, 1972, 1975, 2052, 2064, 2672 Alarm text window, 2064, 2672 Column, 1974 Configuring, 2054 Configuring the layout, 2055 Control element, 1974 Layout, 1973, 2063, 2671 Operation, 2064, 2672 Alarm window, 47, 2052 Configuring, 2056 in Runtime, 2670 In runtime, 2062 Alarm with simple acknowledgment, 2036 Alarm without acknowledgment, 2036 Alarms Output of a tag value, 2046 AlarmViewAcknowledgeAlarm, 2190 AlarmViewEditAlarm, 2189 AlarmViewShowOperatorNotes, 2191 AlarmViewUpdate, 2190 Align Object flush, 1876 Allen-Bradley, 2414, 2437, 2438 Allen-Bradley DF1 communication driver, 2437, 2438 Analog alarm, 2452 Basic Panel, 2275 Communication drivers, 2415 Data type, 2452 DF1, 2415 EtherNet/IP, 2415 Mitsubishi, 2478 Allen-Bradley Area pointer, 2450 Allen-Bradley DF1 Configuring a connection, 2432 Connection, 2432, 2436 Connection parameters, 2434 CPU type, 2447 KF2 module, 2437, 2438 KF3 module, 2437, 2438 Migrating data types, 117 Valid data type, 2445 Allen-Bradley Ethernet IP Address multiplexing, 2427 Addressing, 2423 Addressing type, 2425 Migrating data types, 117
2961
Index
Allen-Bradley EtherNet/IP Configuring a connection, 2416 Connection, 2416, 2420 Connection parameters, 2418 Analog alarm, 2030 Allen-Bradley, 2452 Configuring, 2043, 2050 Limit value exceeded, 2006 Mitsubishi, 2478 Omron, 2518 Analog alarm types, 2030 Analog alarms Configuring, 2039 AND, 1275, 1298, 1300, 1437 Logic operation, 1128, 1130, 1134 Animation Configuring, 1918 Diagonal movement, 1923 Direct movement, 1923 Green arrow in Overview, 1919 Horizontal movement, 1921 Multiple selection, 1926 Object group, 1926 Overview, 1919 Vertical movement, 1923 ANY, 701 Appearance Dynamization of an object, 1919 Application, 473 Alarm indicator, 2064 Button, 2657 Date/time field, 2649 Graphic IO field, 2653 Graphic view, 2653 IO field, 2650 Recipe view, 1980 Simple alarm view, 2063 simple alarm window, 2063 Switch, 2658 Symbolic IO field, 2659 Trend view, 2655 User view, 1960 Arccosine, 1227, 1388, 1496 Arcsine, 1226, 1387, 1495 Arctangent, 1497 Arctangent value, 1228, 1390 Area of unplugged modules, 292
Area pointer, 2300, 2357, 2396, 2521 Acquisition cycle, 2271 Active, 2271 Address, 2271 Allen-Bradley, 2450 Basic Panel, 2278 Comment, 2271 Configuring, 2272 Connection, 2270, 2274 Connections editor, 2270 Coordination, 2304, 2360, 2399, 2525 Creating, 2272 Data record, 2094, 2309, 2364, 2403, 2529 Date/time, 53, 2301, 2302, 2397, 2523 Date/time PLC, 53, 2359, 2398, 2524 Job mailbox, 2307, 2362, 2401, 2526 Length, 2271, 2273 PLC tag, 2271 Pointer name, 2271 Project ID, 2306, 2361, 2400, 2526 Screen number, 2305, 2358, 2397, 2522 Tab, 2271 Area pointers, 2269 Date/time, 2359 Arrange Object in the screen, 1869 Arrangement of byte sequence, 1408, 1506 Array, 50, 2022, 2024 Creating, 2024 Indirect addressing, 2012, 2022 see ARRAY, 815, 952 ARRAY Indirect addressing of components, 671 Addressing, 665 Declaration in global data blocks, 952 Declaration in PLC data types, 970 Declaration in the block interface, 815 Example, 697, 698 Format, 697 Array element Location of use of HMI tag, 50 Name, 50 Array elements, 2022 ARRAY limits, 915 Array tag, 2022 Char, 50 AS interface, 446 ASCII code table, 365 ASCII TSAP, 365
2962
Index
Asian characters Input on the HMI device, 2640 Interpretation, 2640 Memory requirements, 2640 Asian languages Configuration, 2640 Font size, 2640 Text field length, 2640 Asian operating system, 2568 ASIN, 1226, 1387, 1495 Assign Object of a layer, 1942 Assign symbol, 393 Assign tag, 393 Assigning a function to a function key, 1934 a graphic to a function key, 1937 Function key, 1929, 1931, 1933 Assigning an IP address, 37 Assigning parameters Hardware, 284 Assignment, 914, 1131, 1134, 1144, 1305 Negate, 1145, 1306 Assignment list Enabling the display of retentive bit memories, 1029 Assignment list Meaning of symbols, 1023 Defining filter, 1026 Delete filter, 1026 Displaying, 1024 Example for displaying bit memory, 1022 Example for displaying inputs and outputs, 1022 Filter options, 1026 Filtering, 1027 Introduction, 1021 Setting view options, 1025 Structure, 1022 Asynchronous Transferring data, 2310, 2365, 2408, 2529 Asynchronous error event Delaying with DIS_AIRT, 1639 Enabling with EN_AIRT, 1640 AT, 38 AT , 667 ATAN, 1228, 1390, 1497
Authorization, 2661 Assignment, 2127, 2148 Changing the name, 2132 configuring, 2140 Creating, 2126, 2145 Deleting, 2132 Managing, 2131 Autocompletion Function, 804 Insert tag, 804, 805 Inserting an instruction, 805 Automation system, 2244, 2251 Local, 2948 Remote, 2948 Setting up, 2244 Autonegotiation, 467, 2290, 2340 Availability Object for Basic Panels, 1958 Availability for specific devices Screen, 1853 AWP command, 404 AWP_In_Variable, 407 AWP_Out_Variable, 405 Axis technology object: Active homing, 2800 Axis technology object: Add new object, 2779 Axis technology object: Axis name configuration, 2780 Axis technology object: Basic parameters, 2779 Axis technology object: Changing the configuration parameters for dynamics in the user program, 2794 Axis technology object: Changing the configuration parameters for homing in the user program, 2801 Axis technology object: Commissioning overview, 2778 Axis technology object: Config.DriveInterface. tag, 2867 Axis technology object: Config.DynamicDefaults tag, 2869 Axis technology object: Config.DynamicLimits tag, 2869 Axis technology object: Config.General. tag, 2866 Axis technology object: Config.Homing tag, 2873 Axis technology object: Config.Mechanics tag, 2868 Axis technology object: Config.PositionLimits_HW tag, 2872 Axis technology object: Config.PositionLimits_SW tag, 2871 Axis technology object: Configuration overview, 2777 Axis technology object: Configuration window icons, 2780
2963
Index
Axis technology object: Configuring acceleration, 2789 Axis technology object: Configuring active homing, 2797 Axis technology object: Configuring approach/ homing direction, 2797 Axis technology object: Configuring deceleration, 2789 Axis technology object: Configuring distance per motor revolution, 2783 Axis technology object: Configuring home position offset, 2798 Axis technology object: Configuring invert direction signal, 2783 Axis technology object: Configuring jerk limiter, 2790 Axis technology object: Configuring maximum velocity / start/stop velocity, 2789 Axis technology object: Configuring passive homing, 2796 Axis technology object: Configuring permit auto reverse at the hardware limit switch, 2797 Axis technology object: Configuring pulses per motor revolution, 2783 Axis technology object: Configuring ramp-down time, 2789 Axis technology object: Configuring ramp-up time, 2789 Axis technology object: Configuring reference point position, 2796, 2798 Axis technology object: Configuring smoothing time, 2790 Axis technology object: Configuring the homing speed, 2798 Axis technology object: Configuring the reference point switch input, 2796 Axis technology object: Configuring the side of the reference point switch, 2796, 2797 Axis technology object: Configuring the velocity limiting unit configuration, 2788 Axis technology object: Diagnosis overview, 2778 Axis technology object: Drive enable configuration, 2783 Axis technology object: Drive ready configuration, 2783 Axis technology object: Drive signal configuration, 2782 Axis technology object: Emergency stop deceleration configuration, 2791 Axis technology object: ErrorBits tag, 2879 Axis technology object: Extended parameters, 2779 Axis technology object: General dynamics configuration, 2788
Axis technology object: Hardware and software components, 2774 Axis technology object: Hardware interface configuration, 2780 Axis technology object: Mechanics configuration, 2783 Axis technology object: MotionStatus tag, 2875 Axis technology object: Passive homing, 2798 Axis technology object: PTO and HSC configuration, 2781 Axis technology object: Response when jerk limiter is activated, 2793 Axis technology object: StatusBits tag, 2876 Axis technology object: Tools, 2776 Axis technology object: Updating the tags, 2880 Axis technology object: User unit configuration, 2782
B
Background color Dynamization, 1919 Backing up, 2662 HMI device data, 2636 Backup Data of the HMI device, 2620, 2621 Bar, 1959, 2648 Color transition, 1959 Display limit lines, 1959 Bar segment Defining, 1959 Basic mode, 1056 Basic Panel Area pointer, 2278 Communication drivers, 2275 Display and operating element, 1958 ETHERNET, 2277 HTTP protocol, 2275 IF1B, 2277 Interface, 2277 Mitsubishi, 2275 Modicon Modbus, 2275 Omron, 2275 OPC, 2275 Runtime start, 2613, 2634 S7 1200, 2275 S7 200, 2275 S7 300, 2275 S7 400, 2275 Basics Migration, 94
2964
Index
Behavior Button, 2657 Date/time field, 2649 Graphic IO field, 2654 IO field, 2651 Simple recipe view, 2112, 2680 Switch, 2659 Symbolic IO field, 2660 Benefits of using TeleService, 2915 Bit (0, 1) Graphics list, 1913 Text list, 1906 Bit field Resetting, 1149, 1310 Setting, 1148, 1309 Bit logic instruction AND logic operation, 1128, 1130, 1134 Assignment, 1131, 1134 Normally closed contact, 1122, 1123, 1126 Normally open contact, 1122, 1123, 1126 OR logic operation, 1128 Output coil, 1123, 1126 Query positive signal edge of an operand, 1122, 1130 Reset output, 1122, 1128, 1130 Set output, 1122, 1128, 1130 Bit logic operations AND, 1298, 1300 EXCLUSIVE OR, 1303 Insert input, 1303 OR, 1300, 1301 Bit memories Enabling the display of retentive bit memories, 1029 Bit number (0 - 31) Graphics list , 1915 Text list, 1907 Bit strings, 681, 682
Block Changing passwords for know-how protected blocks, 1019 Closing, 793 Comparing, 985, 986 Comparing code blocks, 983 Comparing data blocks, 984 Comparison, 981 Compiling, 1000 Compiling in the program editor, 1002 Compiling in the project tree, 1002 Consistency check, 1000, 1034, 1039, 1040 Consistency check in the call structure, 1035 Copying, 782, 783 Deleting offline, 794 Deleting online, 795 Displaying properties, 791 Downloading blocks to a memory card, 1012 Downloading blocks to an accessible node, 1009 Downloading to device, 1004, 1006 Downloading to device in RUN operating mode, 1005 Editing properties, 791 Entering a comment, 785 Entering a title, 784 exporting to an external source file, 978 Fill, 1503 Fill uninterruptible, 1245, 1406, 1504 Filling, 1243, 1404 Inserting, 782 Know-how protection, 1013 Leave, 1546 Move, 1499 Move operation, 1400 Move uninterruptible, 1241, 1402, 1501 Moving, 1239 Opening, 792 Opening know-how protected blocks, 1017 Optimized access, 640 Pasting, 784 Printing know-how protected blocks, 1018 Properties, 787 Removing copy protection, 1015 Renaming, 794 Saving, 793 Setting up copy protection, 1015 Time stamp, 789 Types, 635 Uploading blocks from a memory card, 1013 Uploading blocks from an accessible device, 1011 Uploading blocks from device, 1010 Uploading from device, 1004 Using a library, 781 2965
Index
BLOCK, 704 Block access Data block, 957 Block call Basics, 641 Calling as single instance or multi-instance, 642 Correcting the call type, 850, 890 Inserting, 848, 887, 929, 930, 932, 933, 934, 935 Multi-instance, 644 Nesting depth, 642 Single instance, 643 Updating, 849, 889, 937 Block comment Hiding, 803 Showing, 803 Block comparison Basics, 981 Carrying out offline/offline comparisons, 986 Changing the block, 998 Comparing code blocks, 983 Comparing data blocks, 984 Comparing online-offline, 985 Comparison editor, 988 Detailed comparison, 994 Execute action, 993 Filtering the comparison editor view, 991 Navigation, 997 Representation of the detailed comparison, 995 Specifying actions, 992 Synchronize scrolling, 998 Updating comparison results, 992, 999 Block consistency Checking, 1035 Checking in the dependency structure, 1040 Block folder, 777 Block interface Declaring ARRAY, 815 Declaring PLC data type, 816 Declaring STRUCT, 816 Declaring tags, 812, 813, 817 Hiding, 803 Importing and exporting tags, 826 Multi-instance, 818 Purpose of tag declaration, 807 Retentivity, 821 Showing, 803 Structure, 808 Tag properties, 820, 822 Updating, 819 Valid data types, 810
Block parameters, 646, 647, 648, 649, 650, 651, 652, 653 Basics, 554 Block interface, 808 Block property Displaying, 791 Editing, 791 Function, 786 Overview, 787 BLOCK_DB_TO_WORD, 753 Bookmarks Deleting, 922 Function, 920 Navigating, 921 Setting, 921 BOOL, 680, 713, 729 Borders Insert background image, 214 Placeholder for document information, 216 Specifying the print area, 215 Boundaries, 468, 2291, 2341 Boundary reached Event, 2231 Brackets, 913 Branch, 1535, 1537 Closing, 866 Definition, 864, 903 Deleting, 866, 904 Inserting, 865, 904 Rules, 865 Rules , 903 Button, 1982, 2657 Application, 2657 Behavior, 2657 Configuring, 2146 Configuring access protection, 2142 Define hotkey, 1983 Graphic, 1982 Layout, 2657 Mode, 1982 Operation, 2657 Text, 1982 Buttons and Switches Library, 1949 BYTE, 681, 714, 730 Bytes Swap, 1506 Swap, 1247, 1408
C
Cabling rules (PROFINET), 467, 2290, 2340
2966
Index
CALC, 1197, 1358 Calculate, 851, 890, 1197, 1358 CALCULATE, 851, 890 CalibrateTouchScreen, 2178 Call hierarchy, 642 Call structure, 1029 Meaning of symbols, 1031 Displaying, 1033 Introduction, 1029 Setting view options, 1033 Structure, 1032 Callback to a number specified during connection establishment, 2937 Canceling printing, 221 Cascaded counting function, 570 CASE, 1537 CEIL, 1251, 1413, 1526 Change word order Modicon MODBUS TCP/IP, 2484 ChangeConnection, 2215 Changeover contact, 583 Changeover contact sensor type, 583 Changing Displayed name of user group, 2132 Logoff time in runtime, 2137 Name of the user, 2137 Object size, 1874 Password, 2130 Password in runtime, 2137 User group in runtime, 2138 Users, 2666 Changing and displaying operating mode (example), 2158 Changing the name Authorization, 2132 User group, 2131 Users, 2130 Char Array tag, 50 CHAR, 695, 728, 751 Character, 695
Character string, 695 Combining character strings with CONCAT, 1590 Converting from a hexadecimal number with HTA, 1588 Converting number to character string with VAL_STRG, 1582 Converting numeric character string with STRG_VAL, 1580 Converting to a hexadecimal number with ATH, 1586 Converting with S_CONV, 1579 Copy character string to characters with Strg_TO_Chars, 1584 Copying characters to character string with Chars_TO_Strg, 1585 Deleting characters with DELETE, 1593 Determining length with LEN, 1590 Finding a character with FIND, 1596 Inserting characters with INSERT, 1594 Moving/copying with S_CONV, 1578 Reading out left character with LEFT, 1591 Reading out middle character with MID, 1592 Reading out right character with RIGHT, 1592 Replacing character with REPLACE, 1595 Checklist for troubleshooting the modem, 2940 Circle, 1969 Radius, 1969 CJ1, 2515 CJ2, 2515 ClearAlarmBuffer, 2187 ClearAlarmBufferProTool, 2188 ClearAlarmBufferProtoolLegacy, 2188 cleared, 2224 Click, 2229 Clock memory, 523, 544 Closing Runtime, 2635 CMP <, 1190, 1352 CMP <=, 1187, 1349 CMP <>, 1184, 1346 CMP ==, 1182, 1345 CMP >, 1189, 1351 CMP >=, 1185, 1348 Coil, 1144 Negate, 1145 Output coil, 1123 Color Diagnostics of Ethernet cables, 596 Diagnostics of ports, 596 Color transition Bar, 1959
2967
Index
Column Alarm view, 1974 Comfort Panel S7-1200, 57 Comment Area pointer, 2271 Comments Inserting in SCL program, 937 Commissioning HMI device, 2630 communication Via the point-to-point port with MB_SLAVE, 39 Communication, 2243 Basics, 2244 Definition, 2243 S7 1200, 2279 S7 200, 2387 S7 300, 2328 S7 400, 2328 Third-party drivers, 2414 using area pointers, 2250 Communication drivers, 2250 Allen-Bradley, 2415 Basic Panel, 2275 Mitsubishi, 2454 Modicon Modbus, 2480 Omron, 2506 Communication network, 2251 PROFINET, 2252 Communication partners HMI device, 2243 Networking, 2255 PLC, 2243 SIMATIC S7, 2328, 2384, 2393, 2396 Communication via PUT/GET instructions Basic information on PUT/GET instructions, 367 Creating and assigning parameters to a connection, 372 Deleting an interconnection, 373 Overview of connection parameter assignment, 368 Requirements, 368 Starting connection parameter assignment, 371 Communications Cycle load, 528 Communications instruction "AS_DIAL", 2916, 2948, 2949 "AS_MAIL", 2916, 2951 "PG_DIAL", 2916, 2946, 2947 "SMS_SEND", 2916, 2950 Communications load, 523, 528 Communications module (CM), 1762
Communications modules, 536 Properties, 536 Communications port Configuring, 536 Communications processor Operation, 33 SIMATIC NET DVD, 32 Communications protocol Defining, 540 Overview, 39, 539 Compact, 2489, 2501 CompactLogix, 2423 Comparator Greater than or equal to, 1131 Less than or equal to, 1131 Compare Equal, 1182, 1345 Greater or equal, 1185, 1348 Greater than, 1189, 1351 Less or equal, 1187, 1349 Less than, 1190, 1352 Not equal, 1184, 1346 Compare offline/online Automatic device assignment, 387 Compile Address parameters, 56 Compiling Block, 1002 Blocks, 1000 Consistency check, 1000 Correcting compilation errors, 1003 Migrated project, 98 With disabled pulse generator, 37 Components Alarm, 2037 Configuration Downloading to device, 476 DP slave, 433 DP slave, simple, 425 Hardware, 284 Tag, 2001 Uploading to programming device/PC, 477 Configuration phase, 2629 Configure a PROFIBUS subnet Matching parameters to one another, 317 Setting bus parameters, 317 Configure acknowledgment Alarm message, 2317, 2373, 2412, 2453, 2478, 2505, 2519 Configured Loop-in alarm, 2047
2968
Index
configuring Authorization, 2140 Configuring, 2043, 2051 Access protection, 2146 Alarm acknowledgment, 2058, 2059, 2060 Alarm group, 2041 Alarm view, 2054 Analog alarm, 2043, 2050 Analog alarms, 2039 Connections, 2375, 2376, 2378, 2387 Controller alarms, 2039 Discrete alarm, 2041, 2049 Discrete alarms, 2039 Event-driven tasks, 2045 I slave, 434 Layout of the alarm view, 2055 Multiple tags, 2002 Recipe view, 2108 Rectangle, 1899 System events, 2039 Trend view for values from the PLC, 2027 Configuring a connection Allen-Bradley DF1, 2432 Allen-Bradley EtherNet/IP, 2416 Mitsubishi FX, 2468 Mitsubishi MC TCP/IP, 2455 Modicon Modbus RTU, 2491 Modicon Modbus TCP, 2480 Omron Host Link, 2507 Configuring a PROFIBUS subnet Meaning of the bus parameters, 318 Configuring the network with Ethernet, 322, 2287, 2337 Creating private subnets, 324, 2288, 2338 Linking networks, 324, 2288, 2338 Relationship between IP address and subnet mask, 323, 2287, 2337 Setting the IP address, 323, 2287, 2337 Setting the subnet mask, 323, 2287, 2337 Configuring the remote modem, 2919 Connecting PLC, 2420, 2459, 2472, 2485, 2511 Connecting a TS Adapter with an external modem, 2919 Connecting a TS Adapter with an internal modem, 2919 Connecting cable 6XV1440 - 2P for Mitsubishi PG protocol, 2473 Allen-Bradley cable 1784-CP10, 2442 Mitsubishi FX, 2472
Connecting cables Point-to-point cable 1, Point-to-point cable 2, 2499 Connection, 325, 337, 2249 Address details, 631 Allen-Bradley DF1, 2432, 2436 Allen-Bradley EtherNet/IP, 2416 Area pointer, 2270, 2274 Configuring, 2256, 2260, 2416, 2432, 2455, 2468, 2480, 2491, 2507 Configuring a connection when there is no or no clear network assignment, 330 Creating, 354, 2256, 2260 Deleting, 356 Integrated, 2256 integrated connection, 1992, 2266 Mitsubishi MC TCP/IP, 2455 Modicon, 2495 Modicon Modbus RTU, 2491 Modicon Modbus TCP, 2480 offline, 2306, 2362, 2401 Omron Host Link, 2507 Parameters, 2418, 2434, 2457, 2469, 2482, 2493, 2509 S7 200, 2387 Table, 2255 Connection cable Allen-Bradley cable 1747-CP3, 2443 Allen-Bradley cable 1761-CBL-PM02, 2444 Modicon, 2495 Multipoint cable 1:MP/TP/PC, 2512 Multipoint cable 2:RS422, MP/TP/PC, 2512 Omron Host Link, 2511 Point-to-point cable PP2 for Omron, 2513 Connection description Changing parameter values, 362 Data block , 359 Structure, 359 Connection details, 630 Connection diagnostics Detailed, 629 Overview, 627 Connection information, 629 Connection parameter assignment Connection parameters, 351 Overview, 349 Starting, 353 Connection parameter assignment of PUT/GET instructions, 371
2969
Index
Connection parameters Allen-Bradley DF1, 2434 Allen-Bradley EtherNet/IP, 2418 Mitsubishi FX, 2469 Mitsubishi MC TCP/IP, 2457 Modicon Modbus RTU, 2493 Modicon Modbus TCP, 2482 Omron Host Link, 2509 Connection parameters of PUT/GET instructions, 370 Connection resource, 325, 337 SIMATIC S7 1200, 55 Connection resources, 629 Connection status Displaying using icons, 628 Connections Allen-Bradley DF1, 2437, 2438 Configuring, 2375, 2376, 2378, 2387 Editor, 2375, 2376, 2378 Consistency Slot rules, 286 Consistency check, 1034, 1035, 1039, 1040 Introduction, 1034, 1039 Constant Basics, 656 Declaring, 769 Entering, 676 PLC tag table, 759 Properties, 771, 772 Rules, 768 Context filter, 287 CONTINUE, 1543 Control element Alarm view, 1974, 1976 Recipe view, 1980 simple alarm view, 2671 Simple alarm view, 2064 Trend view, 1970 Controller alarms Configuring, 2039 ControlLogix, 2423 Conversion, 710 Explicit, 729, 730, 734, 736, 738, 740, 742, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753 Explicit , 731, 732 Implicit, 39, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729 Conversion operations Converting times with T_CONV, 1568 Convert, 1249, 1410, 1517, 1518 CONVERT, 1249, 1410, 1517 Converted name (PROFINET), 455
Converting A character string to a hexadecimal number with ATH, 1586 Character strings with S_CONV, 1579 Converting number to numeric character string with VAL_STRG, 1582 Converting numeric character string to number with STRG_VAL, 1580 Converting times with T_CONV, 1568 Copy numerical character string to characters with Strg_TO_Chars , 1584 Copying characters to numerical character string with Chars_TO_Strg, 1585 Hexadecimal number to character string with HTA, 1588 Converting an unspecified CPU, 127 Cookie, 408 Coordinated transfer, 2094 With PLC, 2094 Coordination, 2250 Copy Block, 1239, 1499 Block uninterruptible, 1241, 1501 Screen, 1858 Tag, 2000 Template, 1864 Value, 1232 Copy protection, 1015 Copy template Library, 1947 Copying Adjusting screen size, 2604 Alarm indicator, 47 Alarm view, 47 Alarm window, 47 Color, 2604 Font, 2604 Function key, 2604 Hardware component, 301 HMI device, 43 Invalid object, 2603 Linked objects, 2606 Principle, 2602 Screen, 2604 User-defined folders, 2603 COS, 1223, 1384, 1492 Cosine, 1223, 1384, 1492 Count Down, 1178, 1340, 1474 Up, 1176, 1338 Up and down, 1179, 1342, 1477 Count (8 DI NAMUR), 568
2970
Index
Counter Count up and down, 1123, 1131 COUNTER, 704 Counter input, 532 Counter mode, 532 Counter operations Control high-speed counters, 1741 High-speed counters, 1741 Counter, high-speed, 530 Counting Up, 1472 Up and Down, 1123, 1131 Cover page Insert background image, 214 Placeholder for document information, 216 CP1, 2515 CPM, 2515 CPU Displaying the current LED status, 603 Fill level of all types of memory, 604 Inserting a signal board, 395 Properties, 522 Reading date and time-of-day with RD_SYS_T, 1573 Reading out a diagnostics buffer, 606 Selecting from the hardware catalog, 293 Setting time-of-day with WR_SYS_T, 1572 Switching operating mode, 610 CPU control panel Display area, 604 CPU memory area Displaying, 1044 CPU properties, 523 CPU type Allen-Bradley DF1, 2447 Allen-Bradley EtherNet/IP, 2423 FX3 series, 2465 Mitsubishi FX, 2474 Mitsubishi MC TCP/IP, 2465 Modicon Modbus RTU, 2501 Modicon Modbus TCP, 2489 Omron Host Link, 2515 Create Connection, 2281 Global library, 1955 Group, 1890 Template, 1863
Creating, 2101 Alarm group, 2041 Array, 2024 Connection, 2256, 2260, 2330 External tag, 1995 Infotext, 2043, 2045 Internal tag, 1998 Recipe, 2101 Recipe data record, 2681 Recipe data record on the HMI device, 2114, 2115 Screen, 1857 User group, 2126, 2148 Users, 2128, 2149, 2663, 2665 Users in runtime, 2135 Creating a print preview, 216 Creating a watch table, 1059 Crossing Definition, 867 Deleting, 868 Inserting, 867 rearranging, 868 Cross-reference Inspector window, 47 Cross-reference list, (See cross-references), (See cross-references) Displaying, 1047, 2562 Overview, 1047, 2562 Settings, 1045, 2563 Sorting columns, 1045, 2563 Structure, 1045, 2563 Views, 1045, 2563 Cross-references Displaying, 1047, 2562, 2565 Introduction, 1045, 2562 Uses, 1045, 2562 CS1, 2515 CSV file, 2538, 2539, 2549 CTD, 1178, 1340, 1474 CTRL_HSC, 1741 CTU, 1176, 1338, 1472 CTUD, 1123, 1131, 1179, 1342, 1477 Custom alarm classes, 2033 Custom web pages, 400, 414 Cycle load, 528 Cycle monitoring time, 1548 Cycle time, 523, 527 display configured, 599 display measured, 602 Cyclic Continuous, 2009 In operation, 2009
2971
Index
Cyclic interrupt OB Assigning parameters, 556 Description, 550 Querying parameters with QRY_CINT, 1628 Setting parameters with SET_CINT, 1627 Cyclic OB Description, 548 Cyclic operation, 2386, 2389 Cyclic program execution Options for interrupting, 548 Programming, 548
D
Data areas Area pointer, 2272, 2522 Reading, 2272, 2522 Writing, 2272, 2522 Data backup, 71 HMI device, 2620, 2636 Data bit (DBX), 511 Data block Based on a PLC data type , 954 Creating, 779, 949 Declaration table, 948 Declaring ARRAY, 952 Declaring STRUCT, 953 Declaring tags, 954 Define start values, 955, 956 Displaying values, 967 Global data block, 638, 946 Importing and exporting tags, 965 Instance data block, 639, 946 Monitoring data values online, 965, 966 Optimized access, 640 Programming, 946, 951 Reading from load memory with READ_DBL, 1661 Retentive behavior, 957, 958 Tag properties, 959, 960, 961 Updating, 950 Writing to load memory with WRIT_DBL, 1663 Data byte (DBB), 511 Data consistency, 1802 Data double word (DBD), 511 Data exchange, 2243 DP slave, 425 I slave - DP master, 426 using area pointers, 2250 Data exchange over the AS-AS remote link Communication instruction "AS_DIAL", 2948 Data flow, 2678
Data flow control, 538 Data log, 399 Closing with DataLogClose, 1659 Creating with DataLogCreate, 1653 Creating with DataLogNewFile, 1660 Creating with DataLogWrite, 1657 Opening with DataLogOpen, 1656 Data mailbox For recipes, 2094 Data record, 2250 Reading, 2115 Reading with RDREC, 1597 Transfer, 2116 Transferring with WRREC, 1598 Data record list, 2097
2972
Index
Data type Convert explicit, 1410 Convert explicitly, 1517 Explicit conversion, 1249 Allen-Bradley, 2452 ANY, 701 ARRAY, 697 BOOL, 680, 713, 729 BYTE, 681, 714, 730 CHAR, 695, 728, 751 Conversion, 39, 710, 716, 724, 726, 727 Convert explicitly, 1518 DATE, 691, 727, 748 DINT, 686, 721, 742 Discrete alarm, 2452, 2478, 2518 DT, 692 DTL, 693, 725, 750 DWORD, 682, 716, 732 Explicit conversion, 729, 730, 731, 732, 734, 736, 738, 740, 742, 744, 745, 746, 747, 748, 749, 750, 751, 752 Implicit conversion, 713, 714, 715, 717, 718, 719, 720, 721, 722, 723, 724, 725, 728, 729 INT, 684, 719 Internal tag, 1995, 2268 LREAL, 688, 724, 746 Mitsubishi, 2478 Mitsubishi FX, 2473 Mitsubishi MC TCP/IP, 2421, 2464 Modicon Modbus RTU, 2500 Modicon Modbus TCP, 2488 Omron, 2518 Omron Host Link, 2513 PLC data type, 705, 967 POINTER, 700 REAL, 687, 723, 745 S5TIME, 690 SCL instruction, 925, 926, 927 SINT, 683, 717, 734 STRING, 695, 729, 752 STRUCT, 699 TIME, 689, 724, 747 TIME_OF_DAY, 692 TOD, 726, 749 UDINT, 687, 722, 744 UINT, 685, 720, 740 USINT, 684, 718, 736 Valid, 2421, 2464, 2473, 2488, 2500, 2513 Validity, 677 VARIANT, 703 WORD, 681, 715, 731
Data types Migration, 116 S7 1200 V1, 2318, 2319 S7 200, 2413 S7 300/400, 2374 Valid, 2318, 2319, 2374, 2413 Data word (DBW), 511 Date, 691, 692, 693 DATE, 691, 727, 748 Date/time, 2250 Area pointer, 2301 Date/time field, 1961 Application, 2649 Behavior, 2649 Display system time, 1961 Format, 1962 Layout, 2649 Operation, 2649 Using tags, 1961 Date/time PLC, 2250 DATE_AND_TIME, 692 DB variable Definition, 655 Deactivate, 2227 Deadband Setting, 2045 DEC, 1209, 1370 Decimal places, 31, 1230, 1391, 1498, 2645, 2646 DECO, 1281, 1444, 1553 Decode, 1281, 1444, 1553 DecreaseFocusedValue, 2213 DecreaseTag, 2214 Decrement, 1209, 1370 Default font, 2589, 2638 Defective devices, 591 Defective license, 72 Define Reference object, 1875 Define hotkey, 1983 Defining For the assignment list, 1026 Delay time Setting, 2045 Delete Template, 1864
2973
Index
Deleting Authorization, 2132 Filter in the assignment list, 1026 Hardware component, 300 Object, 1871 Recipe data record, 2683 Screen, 1858 Tag, 2001 User group, 2132 Users, 2131, 2667 Deleting a connection, 131 Demultiplex, 1288, 1450, 1559 DEMUX, 1288, 1450, 1559 Dependency structure, 1035 Introduction, 1035 Meaning of symbols, 1037 Setting view options, 1039 Structure, 1037 Dependency structure Displaying, 1038 Designation TS Adapter, 2921 TS Adapter, 2923, 2930 Designing a background, 1882 Designing a frame, 1882 Details view, 158 Determine diagnostics status, 605 Determining time of day, 612 Device Adding to a hardware configuration , 295 Copying, 43, 301 Defective devices, 591 Deleting, 300 Inserting, 2245 Moving, 302 Renaming, 387 Device address, 391 Device information, 207, 591 Device name, 450, 452, 455 Device number, 451 Device overview Address range, 391 Device replacement without exchangeable medium, 469 Device Tool, 474, 475
Device view Area of unplugged modules, 292 Edit parameters, 304 Edit properties, 304 Hardware and network editor, 272 Inserting a signal board, 395 Inserting module, 297 Racks, 288 Device wizard, 2535 Devices Connecting, 2249 Networking, 2248, 2255 Devices & Networks, 2248, 2255 Devices and networks, 2248, 2255 Connections, 2256 HMI connections, 2256 Diagnose repeater, 624 Diagnostic data Reading out with GET_DIAG, 1645 Diagnostic error interrupt OB, 553 Diagnostics, 579 DP slave, reading diagnostics data with DPNRM_DG, 1621 Diagnostics buffer Basics, 515, 618 Organization, 618 Diagnostics status Determine and display online, 592 Diagonal movement Animation, 1923 DINT, 686, 721 DINT , 742 Direct access to the I/O, 516 Direction output and travel direction: relation, 2767 Disabling Project language, 2570 Discrete alarm, 2030, 2031 Allen-Bradley, 2452 Configuring, 2041, 2049 Mitsubishi, 2478 Omron, 2518 Discrete alarm types, 2030 Discrete alarms Configuring, 2039 display Tooltip, 2647 Display object Availability for Basic Panels, 1958 Display PDF files, 63 Display system time, 1961 Display the memory types of a CPU, 604 Display Welcome Tour, 63
2974
Index
Displaying Call structure, 1033 Assignment list , 1024 CPU memory area, 1044 Cross-reference, 2565 Cross-references, 1047, 2562 Dependency structure , 1038 Load memory, 1044 Maximum load memory available, 1044 Program information, 1020 Displaying a force table, 1082 Displaying alarms, 497 Displaying or hiding variable information, 863, 902 Displaying the online status, 2899 Displaying values As a trend, 2026 Distribute Objects evenly, 1877 Distributed I/O, 423, 577 DIV, 1205, 1365 Divide, 1205, 1365 Documentation editor Structure, 211 Documentation function Using frames and cover pages, 209 Double word, 682 double-click, 2227 Download Error messages, 2625 Extended download to device, 57 Project, 2612, 2629 Downloading Downloading blocks to device, 1006, 1007 to the device, 476 Downloading data to the PLC Error message, 56 DP, 2299, 2349 DP interface, 428 DP master, 564 Add DP master system, 431 Devices and modules, 428 Disconnection from DP master system, 430 Display on DP slave, 429 DP interface, 428 DP master system Add DP slave, 432 Creating, 424, 426, 428 Disconnect DP slave, 432 Disconnection from subnet, 430 Edit properties, 431 Highlight, 429 Node disconnection, 430
DP slave Add to DP master system, 432 Assign DP master system, 433 configuring, 425, 433 Data exchange, 425 Disconnect from DP master system, 432 DP master display, 429 Hardware catalog, 424 Intelligent, (See I slave) Networking, 426 Reading diagnostics data with DPNRM_DG, 1621 Types, 431 With preprocessing, (See I slave) DP standard slave, 444 DP standard slaves Reading consistent data with DPRD_DAT, 1617 Writing consistent data with DPWR_DAT, 1619 DP/DP coupler, 425 DPV1 Configuring an ET 200S, 442 Drive signals, 2765 DT, 692 DTL, 693, 725, 750 DTL data type Restriction, 53 Duration, 690, 1336 DWORD, 682, 716, 732 Dynamization Color of an object, 1919 Flashing, 1919 Object, 1916 Dynamize Appearance of an object, 1919 Direct movement, 1923 Green arrow in Overview, 1919 Movement of an object, 1921
E
Eastern characters Input on the HMI device, 2640 Edge Negative, 1154, 1156, 1159, 1315, 1318, 1320 Positive, 1152, 1155, 1157, 1314, 1316, 1319 Query positive signal edge of an operand, 1122, 1130 Edit Object within a group, 1894 Edit networking Disconnecting from a network, 314 EditAlarm, 2170
2975
Index
Editing Alarm, 2674 Folder link, 1886 Function list, 2157 Recipe data record, 2682 Editing language, 2566 Selecting, 2570 Editing networking Copying a subnet, 314 Copying subnets and devices, 315 Editor Connection, 2260 Connections, 2375, 2376, 2378 Graphics, 2580 Element list, 2097 Ellipse Horizontal radius, 1964 Vertical radius, 1964 Ellipse , 1964 ELSE, 1537 E-mail Transferring e-mail with TM_MAIL, 1843 Empty box Inserting a LAD element, 843 Inserting an FBD element, 883 EN/ENO mechanism Basics, 753 FBD example, 755 LAD example, 755 SCL example, 756 STL example, 757 enable, 2224 Enable autonegation, 466, 2289, 2339 ENCO, 1283, 1445, 1555 Encode, 1283, 1445, 1555 End of discovery of accessible devices, 468, 2291, 2341 End of sync domain, 468, 2291, 2341 End of topology discovery, 468, 2291, 2341 Engineering system Performance features, 2685 Enumeration types, 410 Error alarm Acknowledge, 2674 Error analysis with RET_VAL, 1138 Error handling, 945 Basics, 942 GetError, 1269, 1431, 1548 GetErrorID, 1273, 1435, 1551 Local error handling, 943 Error information, 943, 1138, 1269, 1273, 1431, 1435, 1548, 1551
Error message Downloading data to the PLC, 56 Error messages Download, 2625 Establishing a connection from a remote system ("PG_DIAL"), 2947 Establishing a remote connection, 2939 Procedure, 2939 ET 200eco, 562 ET 200eco PN, 562, 577 ET 200iSP, 561 ET 200iSP distributed I/O station Definition, 563 ET 200L, 561 ET 200M, 561 ET 200pro, 562 ET 200R, 562 ET 200S, 561 DPV1 mode, 442 Option handling, 440 Positioning module, 36 Pulse generator module, 36 Reference junctions, 436 Slot rules, 435 ET 200S COMPACT, 561 Ethernet S7 200, 2326, 2382, 2391 ETHERNET Basic Panel, 2277 Ethernet interface Displaying parameters, 2903 Ethernet module, 36 Removal/insertion, 34
2976
Index
Event Acknowledge, 2228, 2231 Adjust, 2225 Alarm buffer overflow, 2230 Assigning organization block (OB) with ATTACH, 1625 Boundary reached, 2231 Canceling assignment to organization block (OB) with DETACH, 1626 cleared, 2224 Click, 2229 Deactivate, 2227 double-click, 2227 Enable, 2224 Execute, 2225 For function lists, 2014 Free space critically low, 2234 Incoming, 2229 Inspector window, 47 Limit , 2230, 2231 Loop-In-Alarm, 2229 Low free storage space, 2233 Outgoing, 2229 Overflow, 2233 Press, 2228 Press key, 2232 release, 2230 Runtime Stop, 2232 Screen change, 2226 Selection changed, 2225 Switch off, 2233 Switch on, 2233 Tags, 2014 Time expired, 2234 User change, 2226 Value change, 2234 When dialog is closed, 2226 When dialog is opened, 2226 Event trigger, 2239, 2242 Event-driven tasks Configuring:event-driven tasks, 2043 Example Application for alarm classes, 2033 Changing and displaying operating mode, 2158 For displaying bit memory in the assignment list, 1022 For displaying inputs and outputs in the assignment list, 1022 For entering force values in the force table, 1085 Modify values in the watch table, 1063 System alarm, 2030
Example: Discrete alarm, 2031 Examples Detecting the direction of a conveyor belt using bit logic instructions, 1122, 1130 Controlling a conveyor belt using bit logic instructions, 1121, 1128 Controlling room temperature using timer and bit logic instructions, 1126, 1134 Detecting the fill level of a storage area using counter and comparison instructions, 1123, 1131 Exchangeable medium, 469 EXCLUSIVE OR, 1301, 1303 Bit logic operations, 1301 Execute, 2225 Exit User program, 1269, 1431, 1547 EXIT, 1544 EXP, 1220, 1382, 1490 Expanded mode, 1056 Expanding and collapsing sections of code, 920 Exponential value, 1220, 1382 Exponentiate, 1231, 1393 Export Alarm, 2541 Project texts, 2559, 2577 Recipe, 2538 Tag, 2549 Text list, 2554 Expression Basics, 908 Logical expression, 912 Operator precedence, 913 Relational expressions, 911 Expression Arithmetic expression, 909 EXPT, 1231, 1393 Extended download to device, 57 Extended status information, 915 External graphic Edit folder, 1885 Link folder, 1886 Removing the folder link, 1885 Rename folder, 1885 External image file add to graphics library, 2582 Managing, 1869 Storing in the image browser, 1887
2977
Index
External source file Basics, 977 Exporting blocks, 978 inserting, 979 Linking file types to an editor, 980 Rules for programming, 978
F
FAQs, 282 Favorites Adding, 846, 885, 927 Hiding, 803 Removing, 847, 887, 929 Showing, 803 Using, 846, 886, 928 FB, 637 FBD, 871 FBD element Copying, 894 Cutting, 895 Deleting, 899 Inserting, 882, 883 Inserting an operand , 900 pasting from the clipboard, 896 Replacing, 897 Rules for inserting, 881 Selecting, 894 FBD network Branch, 903 Deleting a branch, 904 Inserting a block call, 848, 887 Inserting a branch, 904 Program status display, 1051 Rules for branches, 903 FC, 636 Field, 697 Field device, 444, 471 Fill Block, 1243, 1404, 1503 Block uninterruptible, 1245, 1406, 1504 FILL_BLK, 1243, 1404, 1503 Filter Defining for the assignment list, 1026 Delete, 1026 Hardware catalog, 287 In the assignment list, 1026 Selecting, 1027 Filters Assignment list , 1027
Find and replace, 225 Additional options for searching, 225 Replacing search keys, 226 Start search, 226 Using the search function, 225 Firmware update memory card, 509 Flash test, 623 Flashing, 1919 Flip Object, 1869 Flip-flop Reset/set, 1151, 1312 Set/reset, 1150, 1311 Floating-point number, 687, 688 Check invalidity, 1196, 1357 Check validity, 1195, 1356 FLOOR, 1253, 1415, 1527 Flow control, 36 Flutter monitoring, 584 Folder link Editing, 1886 Removing, 1886 Renaming, 1886 Font settings Migrate, 102 Font size Asian languages , 2640 FOR, 1539 Force Force all, 1096 Stop forcing, 1098, 1099 Force job On SD card, 29
2978
Index
Force table Meaning of the icons, 1081 "Monitor once and now" command for tags, 1090 Basic mode, 1080 Display, 1082 Expanded mode, 1080 Functionality, 1077 Layout, 1079 Meaning of the columns, 1079 Monitoring and modifying modes, 1066 Opening, 1082 Overview of the display formats, 1086 Overview of the test options, 1077 Permitted operands, 1084 Permitted operands for force values, 1085 Saving, 1082 Switching between basic mode and expanded mode, 1080 Syntax check, 1083 Test options, 1077 Force value Permitted operands, 1085 Forcing tags Safety precautions, 1078, 1092 Foreground color Dynamization, 1919 Form exponential value, 1490 Format, 1962 Formatting Alarm text, 2047 FRAC, 1230, 1391, 1498 Fragment, 411, 416 Free space critically low, 2234 Free-form comments Deleting, 854, 893 Editing, 853, 892 Inserting, 852, 892 Introduction, 852, 891 Frequency meter, 574, 577 Function Assigning to a function key, 1934 Function (FC) Creating, 778 Definition, 636 exporting to an external source file, 978 Function block (FB) Creating, 778 Definition, 637 exporting to an external source file, 978 Instance data block, 637 Function Block Diagram, 871
Function key, 1929 Assigning a function, 1934 Assigning a graphic, 1937 Global assignment, 1931 Global screen, 1861 Local assignment, 1862, 1933 protect with password, 1936 Use global assignment, 1862 used for screen navigation, 1939 Function list, 2014, 2153, 2238 Asynchronous execution, 2158 Execution, 2155 Execution in Runtime, 2158 Synchronous execution, 2158 System function, 2155 User-defined functions, 2155 Function lists Editing, 2157 Functional scope ProSave, 2620 Functionality of the force table, 1077 Functions Updating tag value, 1992, 2266 FX1 series, 2474 FX2 series, 2474 FX3 series, 2465
G
Gateways, 2918 General information on troubleshooting, 2953 Generation of packed addresses, 438 GetError, 944, 945, 1269, 1431, 1548 GetError , 943 GetErrorID, 943, 944, 945, 1273, 1435, 1551 GetGroupNumber, 2185 GetPassword, 2185 GetUserName, 2184 Global assignment Of a function key, 1929, 1931 Global data block, 638 Configuring, 2273 Creating, 2273 Retentive behavior, 958
2979
Index
Global library, 1946 Adding a copy template, 254 Adding types, 255 Basics, 246 Closing, 252 Create, 1955 Creating, 247 Creating folders, 253 Deleting, 253 Editing elements, 259 Migrating, 109 opening, 1957 Opening, 248 Removing elements, 261 Save, 1956 Saving, 251 Shared work, 247 Showing properties, 250 Using a supplied global library, 262 Using filter view, 246, 263 Using master copies, 256 Using the element and part views, 237 Using types, 257 Global screen, 1861 Function key, 1861 Template, 1862 Global softkey, 1931 Global tag, (See PLC tag) Global telephone book properties, 2916 Go online connecting several devices, 2900 Going offline, 623 Going online, 621 multiple TIA portal instances, 34 GOTO, 1545 GoToEnd, 2174 GoToHome, 2174 Graphic add to graphics library, 2581 Assigning to a function key, 1937 Button, 1982 Graphic view, 1965 Inserting, 1869 managing, 1885 Stretching, 1965, 1967 Using from the graphic browser, 1885 With transparent background, 1885 Graphic browser, 1885 Graphic browser , 2582 Graphic I/O field, 1966 Output graphics list, 1916
Graphic IO field, 2653 Application, 2653 Behavior, 2654 Operation, 2654 Graphic view, 1965, 2653 Application, 2653 Layout, 2653 Operation, 2653 transparent color, 1966 Graphics, 1887 Editor, 2580 Graphics list Application, 1908 Bit (0, 1), 1913 Bit number (0 - 31), 1915 Creating, 1909 Graphic I/O field, 1916 Outputting configuration data, 1915 Range (0 - 31), 1910 Range (... - ...), 1912 Greater than or equal to, 1131 group Cancel, 1891 Edit, 1890 Ungroup, 1891 Group Adding objects, 1892 Cancel, 1891 Creating, 1890 Editing, 1890 Removing an object, 1893 Ungroup, 1891 GSD files Configuring devices (PROFIBUS), 444 GSD revisions (PROFIBUS), 443 Installation, 444 GSD files (PROFINET), 470 Changing revision, 472 Installation, 471 GSDML, (See GSD files (PROFINET))
H
Handshaking, 538 Hardware Configurimg and assign parameters, 284 Detection, 37 Edit parameters, 304 Edit properties, 304
2980
Index
Hardware and network editor Device view, 272 Network view, 269 Topology view, 274 Hardware and software limit switches: Function, 2768 Hardware catalog Adding device, 295 Browsing, 287 DP slave, 424 DP/DP coupler, 425 I slave, 424 Selecting the hardware component, 293 Task card, 280 Hardware configuration Adding device, 295 Adding module, 297 Hardware configuration for Motion Control S7-1200, 2762 Hardware diagnostics, 590 Hardware editor Components, 267 Function, 267 Hardware catalog, 280 Inspector window , 279 Hardware ID, 391 Hardware interrupt OB Assigning parameters, 555 Description, 551 Hardware requirements, 64 Communication instruction "AS_MAIL", 2951 Communication instruction "SMS_SEND", 2950 Communications instruction "PG_DIAL", 2947 Hardware requirements for AS-AS remote link Communication instruction "AS_DIAL", 2949 Hardware support package Installing, 78 Hardware-controlled data flow control, 538 Harmonize Object size, 1877 HART, 565
Help Browsing, 175 Call topic from favorites, 176 Delete topic from favorites, 177 Find keywords, 175 Full-text search, 175 Identification of Help topics, 172 Open, 174 Open tooltip cascades automatically, 178 Printing help topics, 177 Save topics in favorites, 176 Use index, 175 Help indicator, 1968 Hibernate, 29 Hidden input, 1963 Hidden parameters, 862, 901 High-speed counter Configuring, 533 General, 530 How it works, 531 HMI connection, 128, 337, 2249 Creating, 2281, 2330 MPI, 2350 MPI parameters, 2352 PROFIBUS, 2343 PROFIBUS parameters, 2294, 2344 PROFINET, 2280, 2281, 2329, 2330 PROFINET parameters, 2282, 2332 S7 1200, 2281 S7 300/400, 2330 HMI connections Devices & Networks, 2256 HMI device, 69 Changing the device type, 2627 Commissioning, 2630 Data backup, 2620, 2621, 2636 MPI parameters, 2354 Performance features, 2687 PROFIBUS parameters, 2296, 2346 PROFINET parameters, 2284, 2333 Recommissioning, 2630 Reset to factory settings, 2624 Restoring data, 2620, 2622, 2636 System limits, 2687 HMI device licensing Non-PC-based, 69 HMI device replacement, 43 HMI device type Changing, 2627 HMI device wizard, 2535 Homing: Homing modes, 2770 Horizontal radius, 1964
2981
Index
How the frequency meter works, 575 HSC, 530 HSP, (See Support package) HTTP protocol Basic Panel, 2275 HTTPS, 398
I
I address, 391 I slave, 426, 433 configuring, 434 Data access, 434 Data exchange, 426 Hardware catalog, 424 I/O Direct access to, 516 I/O access error, 514 I/O address, 391, 516 I/O field, 1962 Data format, 1963 Decimal format, 49 Display format, 49 Hidden input, 1963 Mode, 1963 I/O input, 511 I/O output, 511 I/Os, 662 Icon For comparison, 594 For comparison status, 628 for connection status, 628 For diagnostics, 593 for operating mode, 595 Overlay icon, 595 Icons in TeleService, 2943 Icons in the force table, 1081 Icons in the watch table, 1057 IE/AS-i link PN IO, 446 IEC check Setting, 712 IEC Check, 710 IEC time, 689 IEEE tag, 564 IF, 1535 IF1B Basic Panel, 2277 Image file Storing in the image browser, 1887 Storing in the image browser , 2582
Import Alarm, 2543 Analog alarm structure, 2544 Project texts, 2561, 2579 Recipe, 2539 Structure of discrete alarms, 2547 Structure of recipe data, 2541 Tag, 2551 Text list, 2556 Importing a recipe Structure for the import, 2541 Importing analog alarms Structure for the import, 2544 Importing discrete alarms Structure for the import, 2547 in the screen Arrange object, 1878 IN_RANGE, 1192, 1353 INC, 1208, 1369 Incoming, 2032, 2229 IncreaseFocusedValue, 2172 IncreaseTag, 2173 Increment, 1208, 1369 Indenting and outdenting Lines, 919 Index tag, 2012, 2013 Indirect addressing, 669, 670, 671, 672, 675 Indirect addressing , 2012 Industrial Ethernet, 2251 Information system Components of the information system, 171 Roll-out, 172 Tooltip, 173 Infotext, 2038 Creating, 2043, 2045 Initialization (custom web pages), 400 Initialization of the modem, 2920 Initialization string requirements, 2920 Input Inserting, 858, 1303 remove, 859, 898 Input (I), 511 Input byte (IB), 511 Input word (IW), 511 Insert Library object, 1955 Insert empty line, 2809 Insert input, 897 Insert separator line, 2809
2982
Index
Inserting Graphic, 1869 Object, 1869 Rectangle, 1899 Inspector window Cross-reference, 47 Event, 47 Layout, 154 Reducing automatically, 149 Inspector window Diagnostics tab, 591 Hardware and network editor, 279 Installation Displaying software, 78 Licenses, 33, 73 Log, 74 Modifying products, 79 ProSave, 56 Repairing products, 81 Starting, 75 Support package, 78 System requirements, 63 Target directory, 31 Updating products, 79 Installing support packages, 78 Installing the local modem, 2918 Instance data block Creating, 639 Definition, 639 Retentive behavior, 957 Instance DB Creating, 1108 Instruction Copying, 939 Cutting, 939 Deleting, 940 Inserting, 939 Rules, 923 Versions, 828 Instructions for configuring a remote modem, 2920 INT, 684, 719, 738 Integer, 1254, 1416, 1529 16-bit, 684, 685 32-bit, 686, 687 8-bit, 683, 684 Integrated Connection, 2256, 2260 Integrated connection, 1992, 2266
Integrated project Converting an unspecified CPU, 127 Creating an integrated HMI connection, 128 Deleting an unspecified connection, 131 Linking HMI tags, 130 Migrating, 113, 123 Post-editing, 125 Integrating texts from text lists in alarms, 1116 Example, 1116 Intelligent DP slave, (See I slave) Interconnecting ports Graphic view, 384, 386 In the Inspector window, 463 Table view, 385, 386 Interface, (See block interface) Adding, 2901 Basic Panel, 2277 Displaying, 600 Renaming, 387 Interface properties, 600 Interrupt event Delaying with DIS_AIRT, 1639 Enabling with EN_AIRT, 1640 Interrupts Activating time-of-day interrupt with ACT_TINT, 1632 Canceling time-delay interrupt with CAN_DINT, 1637 Canceling time-of-day interrupt with CAN_TINT, 1632 Querying time-delay interrupt with QRY_DINT, 1638 Querying time-of-day interrupt with QRY_TINT, 1633 Receiving from I/O module with RALRM, 1601 Setting time-of-day interrupt with SET_TINTL, 1630 Starting time-delay interrupt with SRT_DINT, 1636 With packed addresses, 442 INV, 1280, 1442 Invalid license With a time zone change, 72 InverseLinearScaling, 2177 Invert, 1144, 1304 InvertBit, 2175 InvertBitInTag, 2176 Inverting, 1280, 1442 InvertLinearScaling, 2177
2983
Index
IO device Networking, 461 Update time, 464 Watchdog time, 464 IO field, 2650 Application, 2650 Behavior, 2651 Changing between input fields, 2651 IO field, 2652 Layout, 2651 Operation, 2651 Touch operation, 2652 IO system, 460 Creating, 461 Send clock cycle, 463 IO-Link, 475 IP address, 29, 450 Assigning, 613 IP address parameters, 451 IP configuration Change parameters from the user program, 1835 IP parameters, 601 IQ sense, 586 iQ series, 2465 ISO-on-TCP Characteristics, 358 TSAP, 363
Keyboard shortcuts Changes in assignment, 28 Editing texts, 168 Project editing, 166 Project tree, 167 Tables, 167 Window, 167 Keyword highlighting, 915 Keywords, 657 Know-how protection Changing a password, 1019 Converting blocks from V10.5, 38 Introduction, 1013 Opening blocks, 1017 Printing block, 1018 remove, 1019 Setting up, 1016
L
LABEL, 1262, 1424 LAD, 829 LAD element Copying, 855 Cutting, 856 Deleting, 860 Inserting, 842, 843 Inserting an operand, 861 pasting from the clipboard, 856 Replacing, 857 Rules for inserting, 840 Selecting, 854 LAD network Branch, 864 Closing a branch, 866 Crossing, 867 Deleting a branch, 866 Deleting a crossing, 868 Insert crossing, 867 Inserting a block call, 848, 887 Inserting a branch, 865 Program status display, 1050 Prohibited interconnections, 842 Rearranging a crossing, 868 Rules for simultaneous branches, 865 Ladder Logic, 829
J
Jerk limiter: Function, 2769 JMP, 1260, 1422 JMP_LIST, 1262, 1424 JMPN, 1261, 1423 Job mailbox, 2250 Transferring data, 2312, 2368, 2405, 2532 Jump, 1260, 1261, 1262, 1264, 1267, 1422, 1423, 1424, 1426, 1429 Jump distributor, 1264, 1426 Jump label, 1262, 1424, 1545 Jump list, 1262, 1424
K
Key operation Date/time field, 2650 IO field, 2652
2984
Index
Language Activate project language, 2570 Asian languages, 2568 Asian operating system, 2568 Disabling the project language, 2570 Editing language, 2570 Language support, 2568 Language-dependent format, 2567 Language-specific graphic, 2580 Log, 2590 multilingual project , 2572 Reference language, 2570 Regional format of the date, time, currency, and numbers, 2567 Language abbreviation, 420 Language behavior Screen keyboard, 58 Language switching, 420, 2584, 2639 Log, 2590 Runtime language, 2587 Languages Migrating, 107 Layer Assigning objects to a layer, 1942 Layout Alarm indicator, 1978, 2065 Alarm view, 1972, 1973, 1976, 2063, 2671 Bar, 1959 Button, 1982, 2657 Circle, 1969 Date/time field, 1961, 2649 Ellipse, 1964 Graphic I/O field, 1966 Graphic view, 1965, 2653 I/O field, 1962 IO field, 2651 Line, 1972 Recipe view, 1980 Rectangle, 1979 Simple recipe view, 2111, 2679 Simple user view, 2662 Switch, 1981, 2658 Symbolic I/O field, 1984 Text field, 1985 Trend view, 1970, 2655 User view, 1960 Layout of the force table, 1079 LED ACK, 2672 LED status Reading out with LED, 1641 Length Area pointer, 2271, 2273
Less than or equal to, 1131 Library, 1946 Adding and using a block, 781 Basics, 233 Buttons and Switches, 1949 Copy template, 1947 Copying a library object, 1948, 1953 Deleting a library object, 1953 Global libraries, 246 opening, 1957 Project library, 238 Save, 1956 Storing an object, 1954 Task card, 235 Type, 1948 Types, 233 Using filter view, 246, 263 Using the element and part views, 237 Library object, 1946, 1947 Inserting, 1955 License Defective, 72 Defective license, 73 Starting without valid license, 69 License key, 71 Working with license keys, 71 License Manager Panel plug-in, 69 Licenses, 33, 73 LIMIT, 1215, 1376, 1484 Limit , 2230, 2231 Limit frequencies of pulse outputs, 2763 Limit range Tag, 2005 Limit value, 1215, 1376, 1484, 2038 Tag, 2006 Limit value check, 2644, 2646 Limit value exceeded Analog alarm, 2006 Line, 1971 design, 1882 Line end, 1882, 1972 Line start, 1972 Line break, 580 Line end Line, 1972 Line start Line, 1972 Linear programming, 634 LinearScaling, 2186 Link folder External graphic, 1886
2985
Index
Linked objects Copying, 2606 Linking HMI tags, 130 LLDP (Link Layer Discovery Protocol), 468, 2291, 2341 LN, 1219, 1380, 1488 Load from a device, 38 In programming device/PC, 477 SIMATIC PC station, 57 Load memory, 511, 1041 Displaying, 1044 Load window layout Loading additional window layouts, 163 Loading via quick access, 163 Loading Blocks to the device, 1005 Downloading blocks to a memory card, 1012 Downloading blocks to an accessible device, 1009 Downloading project data to the device, 196 Downloading to a memory card, 198 from a device, 199 General information, 195 in RUN operating mode, 1005 Uploading blocks from a memory card, 1013 Loading projects with connected HMI device, 2611 Local assignment Of a function key, 1929, 1933 Local data bit (L), 511 Local data byte (LB), 511 Local data double word (LD), 511 Local data word (LW), 511 Local error handling, 943 Error information, 943 Instructions, 943 Priorities, 944 Local tag, 807 Local time, 523 Calculating with SET_TIMEZONE, 1574 Reading out with RD_LOC_T, 1574 Log Language switching, 2590 Runtime language, 2590 Log file Modem alarms , 2957 Log language, 2590 Logarithm, 1219, 1380, 1488
Logic operation AND, 1275, 1437 EXCLUSIVE OR, 1278, 1441 OR, 1277, 1439 Logic path Deleting, 907 Inserting, 906 Use, 905 Logoff, 2164 Users, 2664 LogOff, 2164 Logoff time, 2661 Changing, 2130 Changing in runtime, 2137 Logon, 2169 Logon failed, 2139 Reporting, 2143 Users, 2138 Logon dialog Configuring access protection, 2142 Logon for web server, 397 Logon web server, 397 Loop, 1535, 1539, 1541, 1542, 1543, 1544 Loop-in alarm Configured, 2047 Loop-In-Alarm, 2229 Low free storage space, 2233 LREAL, 688, 724, 746
M
managing Graphic, 1885 Managing User group, 2131 Users, 2130 Users in runtime, 2136 Manual fragment, 416 Manuals, 282 Math functions CALCULATE, 851, 890 MAX, 1213, 1374, 1483 Maximum, 1213, 1374, 1483 Maximum cycle time, 508, 527, 1269, 1431 Maximum length Tag, 58 Maximum load memory available Displaying, 1044 Maximum number of controllable drives, 2763 MB_SLAVE, 39 MC_ChangeDynamic: Instruction, 1739 MC_ChangeDynamic: Parameter, 1739
2986
Index
MC_CommandTable: Instruction, 1737 MC_CommandTable: Parameter, 1738 MC_Halt: Function chart, 1721 MC_Halt: Instruction, 1718 MC_Halt: Parameter, 1719 MC_Home: Instruction, 1715 MC_Home: Parameter, 1716 MC_MoveAbsolute: Function chart, 1724 MC_MoveAbsolute: Instruction, 1722 MC_MoveAbsolute: Parameter, 1723 MC_MoveJog: Function chart, 1736 MC_MoveJog: Instruction, 1733 MC_MoveJog: Parameter, 1734 MC_MoveRelative: Function chart, 1728 MC_MoveRelative: Instruction, 1725 MC_MoveRelative: Parameter, 1726 MC_MoveVelocity: Function chart, 1732 MC_MoveVelocity: Instruction, 1729 MC_MoveVelocity: Parameter, 1730 MC_Power: Function chart, 1713 MC_Power: Instruction, 1709 MC_Power: Parameter, 1710 MC_Reset: Instruction, 1714 MC_Reset: Parameter, 1714 Meaning of the columns in the force table, 1079 Measuring window (GATE), 577 Memory area Load memory, 511 Retentive memory areas, 513 Work memory, 511 Memory bit (M), 511 Memory byte (MB), 511 Memory card, 509, (See Memory Card) Accessing, 232 Adding a card reader, 231 Introduction, 231 Removal/insertion, 34 Showing properties, 233 Memory double word (MD), 511 Memory requirements Recipe, 2691 Memory reset, 509 Making, 612 Memory word (MW), 511 Menu command Simple recipe view, 2112, 2680 Message Sending, 542 Specifying the end, 543 Specifying the start, 542 Micro, 2489 MicroLogix, 2423, 2447
Migrated project Compiling, 98 Migrating projects Procedure, 91 Requirements, 91 Migration Adaptations beforehand, 99 Alarm groups, 104 Allen-Bradley DF1 data types, 117 Allen-Bradley Ethernet IP data types, 117 Basics, 94 Data types Modicon Modbus, 118 Data types Modicon Modbus TCP/IP, 119 Data types Omron Hostlink/Multilink, 119 Data types SIMATIC S7 200, 120 Data types SIMATIC S7 300/400, 120 Displaying a log file, 93 Displaying history, 92 Excluding the hardware configuration, 88 Font settings, 102 Global library, 109 Integrated project, 123 Introduction, 93 Introduction to migration, 87 Migrating an integrated project, 113, 123 Migrating projects, 97, 114 Mitsubishi FX data types, 118 of external tags, 116 of languages, 107 of project text, 107 Project library, 109 Recipe data, 110 Runtime data, 110 Supported HMI devices, 99 Supported products, 87 Tags, 103 Text, 107 The migration process, 87 User administration, 110 Migration tool, 95 Connecting the hardware configuration, 89 Creating a migration file, 90 Distribution and sources, 84 Removing, 85 System requirements, 84 Using the migration tool, 88 MIN, 1212, 1373, 1481 Minimum, 1212, 1373, 1481 Minimum cycle time, 508, 527
2987
Index
Mitsubishi, 2414 Address, 2466 Analog alarm, 2478 Basic Panel, 2275 Communication drivers, 2454 Connection interruption, 53 FX, 2454 TCP/IP, 2454 Mitsubishi FX Configuring a connection, 2468 Connection, 2468, 2472 Connection parameters, 2469 CPU type, 2474 Data type, 2473 Migrating data types, 118 Mitsubishi MC TCP/IP Configuring a connection, 2455 Connection, 2455, 2459 Connection parameters, 2457 CPU type, 2465 Data type, 2421, 2464 MOD, 1206, 1367 Modbus communication as a slave with MB_SLAVE, 1782 as Modbus master with MB_MASTER, 1774 Configuring a port with MB_COMM_LOAD, 1772 Mode, 1982 Graphic I/O field, 1967 I/O field, 1963 Modem Local, 2918 Problem, 2953 Remote, 2919 Modem alarms Log file, 2957 Modem connection cannot be established, 2940 Modem connection is closed, 2941 Modem connection is interrupted, 2956 Causes and solutions, 2956 Modem support, 2917 Modem types / media, 2918 Modems without plug-and-play, 2919 Modicon Approved communication with Modbus RTU, 2496 Connection, 2495 Connection cable, 2495 Restrictions with Modbus RTU, 2496 Modicon M340, 2489
Modicon Modbus, 2414 Basic Panel, 2275 Communication drivers, 2480 Migrating data types, 118 RTU, 2480 TCP, 2480 Modicon Modbus RTU, 2501 Configuring a connection, 2491 Connection, 2491 Connection parameters, 2493 Data type, 2500 Modicon Modbus TCP, 2489 Configuring a connection, 2480 Connection, 2480, 2485 Connection parameters, 2482 Data type, 2488 Modicon MODBUS TCP/IP Change word order, 2484 Modicon Modbus TCP/IP Migrating data types, 119 Modify High-speed counters, 1741 Modify value Permitted operands, 1063 Modifying mode, 1066 Module Addressing, 391 Configuring and assigning, 34 Copying, 301 Deleting, 300 Determine diagnostics status, 605 Inserting, 34, 299 Moving, 302 Outputting status information with ModuleStates, 1644 Outputting status of an IO system with DeviceStates, 1642 Removing, 34 Replacing, 303 Select, 290 Time of day on a module, 612 Module addressing, 515 Module arrangement, 287 Module replacement, 127 Module titles, 289 Module version Updating, 306 Momentum, 2489, 2501 Monitor, 466, 2289, 2339
2988
Index
Monitoring "Monitor all" command, 1068, 1089 "Monitor now" command, 1090 "Monitor once and now" command, 1069 Monitoring and modifying modes, 1066 Monitoring mode, 1066 Monitoring window, 584 Mono-master system, 425 Motion Control CPU S7-1200 Guidelines, 2771 Move Screen, 1858 MOVE, 1232, 1394 Move operation Block, 1400 Block uninterruptible, 1402 Value, 1394 Move view Keyboard shortcuts, 283 Overview navigation, 270, 273, 275 MOVE_BLK, 1239, 1400, 1499 Moving Hardware components, 302 MPI, 2251 Addressing, 2357 Connection, 2378 HMI connection, 2350 Network, 2253 Network architecture, 2254 Parameters, 2352, 2354, 2355 S7 200, 2385, 2394 S7 300/400, 2350 MPI address S7 300, 2357 S7 400, 2357 MPI communication S7 300/400, 2350 MPI parameters S7 300/400, 2352, 2354, 2355 MUL, 1203, 1364 Multi-instance, 664 Correcting the call type, 850, 890 Declaring, 818 Definition, 644 Multiple selection, 290, 1874 Multiplex, 1286, 1448, 1557 Multiplexing, 39, 2012 Address multiplexing, 2016 Address multiplexing Allen-Bradley Ethernet IP, 2427 with absolute addresses, 2016 with symbolic addresses, 2016
Multiply, 1203, 1364 Multi-point connection Allen-Bradley DF1, 2440, 2441 MUX, 39, 1286, 1448, 1557
N
N, 1154, 1156, 1315, 1318 N_TRIG, 1159, 1320 Name Array element, 50 Names of alarm classes Change through migration, 105 NEG, 1207, 1368 Negate, 1207, 1368 Nesting depth, 642 Network, 2243 Closing, 836, 877 Copying, 835, 876 Deleting, 836, 876 Entering a comment, 838, 879 Entering a title, 837, 878 Ethernet, 2252 Inserting, 833, 835, 874, 876 MPI, 2253 Navigating blocks, 839, 880 Opening, 836, 877 PPI, 2254 PROFIBUS, 2253 PROFINET, 2252 Selecting, 834, 875 Using, 833, 874 Network access Opening the properties, 2898 Network architecture PPI, 2255 Network card, 36 Network comments Hiding, 803 Showing, 803 Network drive, 30 Network editor Components, 267 Function, 267 Hardware catalog, 280 Inspector window , 279 Network overview Basic functions, 311 Basic functions for editing the network overview table, 311
2989
Index
Network view, 2255 Adding device, 295 Hardware and network editor, 269 Networking Communication partners, 2255 Devices, 2255 Networking devices Basics of configuring networks, 307 Editing interface parameters, 313 Editing network parameters, 313 Networking several interfaces at the same time, 309 Networking with an existing subnet, 310 Networking without an existing subnet, 308 Networks within a project, 307 Requirements, 312 Types of communication, 307 Networking in the device view Networking options, 311 Procedure, 312 Non-integrated Connection, 2260 Non-licensed mode Engineering system, 69 HMI devices, 70 NORM_X, 1258, 1419, 1533 Normalize, 1258, 1419, 1533 Normally closed contact, 1122, 1123, 1126, 1143 Normally open contact, 1121, 1122, 1123, 1126, 1142 NOT, 1144 NOT_OK, 1196, 1357 Null pointer, 39
O
O, 2891 OB 1, 548 OB 80, 552 OB 82, 553 object Group, 1890 Paste, 1882 Rotate, 1880
Object Arrange, 1869, 1878 Assigning to a layer, 1942 Availability for Basic Panels, 1958 Creating a new OLE object, 1869 Creating an OLE object from a file, 1869 Customizing default properties, 1869 Deleting, 1871 Design, 1882 Dynamization, 1916 Dynamization of the appearance, 1919 Dynamize direct movement, 1923 editing within a group, 1894 Evenly distributing, 1877 Flip, 1869 Flush alignment, 1876 Grouping, 1890 Inserting, 1869 Inserting of the same type, 1869 Inserting several times, 1882 Multiplying, 1882 outside the area, 1879 Paste, 1869 Repositioning and resizing multiple objects, 1869, 1884 Repositioning objects, 1869, 1872 Resize, 1874 Resizing, 1869 Rotate, 1869, 1880 Select multiple objects, 1874 Selecting multiple objects, 1869 Storing in a library, 1954 Tab sequence, 1869 Object group Animation, 1926 Editing an object within a group, 1894 Removing an object, 1893 Object list Tag, 1997 Object names Uniqueness, 94 Object size Harmonizing, 1877 Obtaining user rights Logging on to the operating system with administrator privileges, 170 With Windows user account control, 170 OF, 1537 Off delay, 1164, 1170, 1325, 1466 OK, 1195, 1356
2990
Index
OLE object create from a file, 1869 Recreate, 1869 Save in Graphics, 1887 Storing in the image browser , 2582 Omron, 2414 Analog alarm, 2518 Basic Panel, 2275 Communication drivers, 2506 Host Link, 2506 Omron Host Link, 2515 Address, 2515 Configuring a connection, 2507 Connection, 2507, 2511 Connection cable, 2511 Connection parameters, 2509 Data type, 2513 Omron Hostlink/Multilink Migrating data types, 119 On delay, 1162, 1169, 1323, 1463 On demand, 2009 Ones complement, 1280, 1442 Online access, 2894 Online and Diagnostics view, 590 Online connection, 2891 multiple TIA portal instances, 34 Online displays Orange color, 596 Online mode, 2891 Canceling an online connection, 2899 Display of the online mode, 2893 Displaying accessible devices on an interface, 2897 Displaying all accessible devices as a list, 2897 Go online, 2898 Standby or hibernation of the programming device / PC, 2891 Online operation, 34 Online Tools, 590, 598 OP 73 Baud rate on PROFIBUS, 2327, 2383, 2385, 2392, 2394, 2395 OP 77A Baud rate on PROFIBUS, 2327, 2383, 2385, 2392, 2394, 2395 OP73 Loading a project, 57 OP77A Loading a project, 57 OPC Basic Panel, 2275
Open Global library, 1957 Open User Communication Changing parameter values, 362 Ability to read back, 362 Changing IP configuration parameters with T_CONFIG, 1835 Connection description, 359 Connection establishment, 347 Connection parameter assignment, 347, 349 Connection parameters, 351 Creating a connection, 354 Deleting an interconnection, 356 Establishing a communications connection with TCON, 1819 Establishing a connection and reading data with TRCV_C, 1814 Establishing a connection and sending data with TSEND_C, 1810 General, 346 Instructions, 347 Port numbers, 362 Protocols used, 357 Receiving data via UDP with TURCV, 1833 Receiving data with TRCV, 1826 Sending data via UDP with TUSEND, 1830 Sending data with TSEND, 1823 Starting connection parameter assignment, 353 TCON_Param, 359 Terminating a communications connection with TDISCON, 1821 TSAP, 363 Opening a force table, 1082 Opening a watch table, 1059 Opening phone books, 2943 Operand, 654, 656, 657, 662, 663, 664, 665, 666, 667, 669, 670, 671, 672, 675, 676 Inserting, 861, 900 Operand area, 511 Operating behavior Enabling system memory, 545 Using clock memory, 544 Using time-of-day functions, 529 Operating element Availability for Basic Panels, 1958 Operating mode Introduction, 502 RUN, 508 STARTUP, 504 STOP, 508 Transitions, 503
2991
Index
Operating recipes Creating a recipe data record, 2114 Creating recipe data records, 2114, 2115 Read recipe data record, 2115 Transfer data record, 2116 Operating system Asian language setting, 2568 Setting to Western, 2568 Updating, 2624 Operating system , 633 Operation Alarm indicator, 2065 Button, 2657 Date/time field, 2649 Graphic IO field, 2654 Graphic view, 2653 IO field, 2651 simple alarm view, 2671 Simple alarm view, 2064 Simple recipe view, 2111, 2679 Simple user view, 2663 Switch, 2658 Symbolic IO field, 2660 Trend view, 2656 Operator control Trend view, 2656 Operator input in the recipe view Transferring data, 2311, 2367, 2404, 2531 Operators, 913 Optimized access, 640 Optimizing the configuration Allen-Bradley DF1, 2431, 2449, 2467, 2475, 2490, 2501, 2516 Option handling, 440 Options for establishing the connection S7-1200 CPUs, 2946 S7-300/400 CPUs, 2945 OR, 1277, 1300, 1301, 1439 Logic operation, 1128 Organization block (OB) Assigning event with ATTACH, 1625 Canceling event assignment with DETACH, 1626 Creating, 777 Cyclic interrupt OB, querying parameters with QRY_CINT, 1628 Cyclic interrupt OB, setting parameters with SET_CINT, 1627 exporting to an external source file, 978 Function, 636 Start information, 636
Other PLCs Addressing, 2415 Data types, 2415 Special features, 2415 OUT_RANGE, 1194, 1355 Outgoing, 2032, 2229 Output Inserting, 858, 897 remove, 859, 898 Resetting, 1122, 1128, 1130 Setting, 1122, 1128, 1130 Output (O), 511 Output byte (QB), 511 Output coil, 1126 Output double word (QD), 511 Output fields Multiplex tag, 51 Output word (QW), 511 Overflow, 581, 2233 Overlay icon, 595 Overlaying Tag, 38, 667 Overlaying tags, 817, 954, 973 Overview using the display formats in the force table, 1086 via the display formats in the watch table, 1064 Overview navigation, 270, 273, 275 Overview of the cross-reference list, 1047 Overview of TS Adapters that can be used, 2921 Overview window, 44, 159 Comparing objects, 161 Showing and hiding columns, 162
P
P, 1122, 1130, 1152, 1155, 1314, 1316 P_TRIG, 1157, 1319 PageDown, 2202 PageUp, 2202 Pane mode, 158 Panning, (See move view) Parallel installation, 67 Parameter For CPU, 523 Hidden parameters, 862, 901 Parameter transfer, 646, 647, 648, 649, 650, 651, 652, 653 Rules, 647 Parameter types, 704
2992
Index
Parameters Connection, 2418, 2434, 2457, 2469, 2482, 2493, 2509 MPI, 2352, 2354, 2355 PROFIBUS, 2294, 2296, 2298, 2344, 2346, 2347 S7 200, 2324, 2326, 2327, 2380, 2382, 2383, 2385, 2390, 2391, 2392, 2394, 2395 Password, 2661 Backing up, 2662 Changing, 2130 Changing in runtime, 2137 for function key, 1936 Hierarchy levels, 2124 Password aging, 2125 Password complexity, 2125 Restoring, 2662 Password list, 2661 Password protection, 397, 523, 546 Protection concept, 201 Revoking access rights, 202 Pasting Adjusting screen size, 2604 Color, 2604 Font, 2604 Function key, 2604 Invalid object, 2603 Principle, 2602 Performance features Engineering system, 2685 HMI device, 2687 Performance in telephone networks, 2918 Permitted characters User view, 58 Permitted operands for the force table, 1084 Permitted operands for the watch table, 1062 PG/PC interface Connecting online, 2899 Modifiable MPI interface parameters, 2907 Modifiable PROFIBUS interface parameters, 2907 Phone book Printing, 2945 PID_3Step Input parameters, 1688 Instruction, 1681 Output parameters, Static variables, 1691 PID_Compact Input parameters, 1668 Instruction, 1665 Output parameters, Static variables, 1670
Pin assignment 6XV1440 - 2P for Mitsubishi PG protocol, 2473 Allen-Bradley cable 1747-CP3, 2443 Allen-Bradley cable 1761-CBL-PM02, 2444 Allen-Bradley cable 1784-CP10, 2442 Multipoint cable 1:MP/TP/PC, 2512 Multipoint cable 2:RS422, MP/TP/PC, 2512 Point-to-point cable 1, Point-to-point cable 2, 2499 Point-to-point cable PP1 for Omron, 2513 Point-to-point cable PP2 for Omron, 2513 PLC Connecting, 2420, 2459, 2472, 2485, 2511 MPI parameters, 2355 PROFIBUS parameters, 2298, 2347 PROFINET parameters, 2285, 2335 Reading recipe data record, 2683 Tag, 2012 Transferring recipe data record, 2684 PLC alarm Creating, 1106 Deleting, 1108 Editing, 1107 PLC data type Addressing, 666 Creating, 969 Declaration in data blocks, 954 Declaration in the block interface, 816 Declaration table for PLC data types, 968 Declaring, 972, 973 Declaring ARRAY, 970 Declaring STRUCT, 971 Definition, 705, 967 Deleting, 969 Offline/offline comparison, 985 Overlaying tags, 973 Programming the structure, 970 Tag properties, 974
2993
Index
PLC tag Importing and exporting, 1118, 1119, 1120 Automatically filling in cells, 775 Carrying out offline/offline comparisons, 986 Comparing a PLC tag table, 985 Comparison, 981 Comparison editor, 988 Copying, 773 Declaring, 765, 766 Definition, 655 Filtering the comparison editor view, 991 Monitor, 772 Offline/offline comparison, 985 Permissible addresses and data types, 765 PLC tag table, 758, 759, 761, 762 Properties, 770 reconnecting, 2004 Retentive behavior, 767 Rules, 765 Sorting rows, 774 Updating comparison results, 992 PLC tags, 404, 405, 407 PLC5, 2447 PN/PN couplers Grouping, 473 Linking Ethernet subnets, 473 Pointer ANY, 701 POINTER, 700 VARIANT, 703 POINTER, 700 Pointer name Area pointer, 2271 Point-to-point communication (PtP), 535 Freeport protocol, 536 Point-to-point connection Allen-Bradley DF1, 2439 Configuring communication parameters with PORT_CFG, 1743 Configuring receive parameters with RCV_CFG, 1747 Configuring serial transmission parameters with SEND_CFG, 1746 Deleting receive buffer with RCV_RST, 1756 Enable receiving with RCV_PTP, 1755 Initiating data transfer with SEND_PTP, 1753 Querying the signal state with SGN_GET, 1757 Setting output signals with SGN_SET, 1758 Port Renaming, 387 Port numbers, 362
Port options, 467, 2290, 2340 Enable autonegation, 466, 2289, 2339 Monitor, 466, 2289, 2339 Transmission medium/duplex, 466 Transmission rate / duplex, 2289, 2339 Portal view, 139 Position an object , 1869 Editing multiple objects, 1884 Of objects, 1872 Possible cause of error Transferring data, 2314, 2370, 2407, 2534 PPI, 2251 Network, 2254 Network architecture, 2255 S7 200, 2395 Predefined alarm classes, 2033, 2034 Premium, 2489 Press, 2228 Press key, 2232 PressButton, 2199 Print scope, 204 Printable contents, 203 Printing Changing the settings, 204 Creating a cover page, 209 Creating borders, 208 Documentation function, 202 Elements in the library, 208 Elements in the project tree, 207 Non-printable contents, 203 Non-printable objects, 204 Print contents, 206 Printing device view, 276 Printing network view, 276 Process a cover page, 210 Process borders, 210 Specify layout, 205 Specify print layout, 205 Specifying the print area, 215 Structure of printout, 203 Use borders, 207 Use borders and cover pages, 203 Use cover page, 206 Printing a project, 220 Printing of alarms Configuring:printing of alarms, 2051 Printing phone books, 2945 Priorities Local error handling, 944 Process control phase, 2629
2994
Index
Process data area Module addressing, 515 Module start address, 515 Process image, 516 Basics, 513 I/O access error, 514 Updating, 514 Product support, 282 Enabling, 282 PROFIBUS, 319, 2251, 2299, 2349 Connection with PROFINET, 446 ET 200S in DPV1 mode, 442 HMI connection, 2293, 2343 Network, 2253 OP 73, 2327, 2383, 2385, 2392, 2394, 2395 OP 77A, 2327, 2383, 2385, 2392, 2394, 2395 Parameters, 2294, 2296, 2298, 2344, 2346, 2347 S7 1200, 2292, 2293 S7 200, 2327, 2383, 2392 S7 300/400, 2342, 2343 Standard, 2299, 2349 Universal, 2299, 2349 PROFIBUS cable configuration Optical ring, 321 PROFIBUS communication S7 1200, 2292 S7 300/400, 2342 PROFIBUS DP, 426, 2253 Connection, 2376 PROFIBUS parameters S7 1200, 2294, 2296, 2298 S7 300/400, 2344, 2346, 2347 PROFIBUS profile, 319, 2299, 2349 Different profiles on the same subnet, 319, 2299, 2349 Effect on the transmission rate, 319, 2299, 2349 Meaning of profiles, 320, 2300, 2349 Profile, (See bus profile) PROFINET, 2251 Connection, 2375 Connection with PROFIBUS, 446 Device replacement without exchangeable medium, 469 HMI connection, 2280, 2281, 2329, 2330 S7 1200, 2280 S7 300/400, 2329 PROFINET device name, 455 PROFINET interface, 523, 600 PROFINET IO, 445, 450, 451, 459, 461 Port options, 466, 2289, 2339
PROFINET IO device Assigning a name, 616 Name assignment from the project tree, 617 Name assignment from within the project context, 617 Name assignment via the "Online" menu, 617 PROFINET IO devices Reading consistent data with DPRD_DAT, 1617 Writing consistent data with DPWR_DAT, 1619 PROFINET IO system, 460 PROFINET parameters HMI connection, 2282, 2332 HMI device, 2284, 2333 PLC, 2285, 2335 S7 1200, 2282, 2285 S7 300/400, 2332, 2333, 2335 PROFINET RT class, 446 Program control operations, 1269, 1431, 1547 Program editor "Instructions" task card, 798 Block interface, 798 Enlarging the programming window, 802 Favorites, 798 Function, 796 General settings, 135, 137, 138, 806 Programming window, 798 Structure, 797 Testing task card, 798 Toolbar, 797 Using the keyboard, 799 Program execution Cyclic, 548 Program information Displaying, 1020 In the assignment list, 1021 In the call structure, 1029 In the dependency structure, 1035 in the tab , 1041 Views, 1020 Program resources, 777 Program status Editing blocks, 1054 FBD, 1051 Function, 1050 LAD, 1050 Modify tag, 1055 SCL, 1052 Switching off, 1053 Switching on, 1053 Programming Linear, 634 Structured, 634
2995
Index
Programming language Changeover, 942 FBD, 871 LAD, 829 Rules for changing, 941 Programming window Customizing, 917 SCL, 916 Project Basics, 181 Closing, 185 Comparing data, 200 compile (overview), 2608 Compiling , 2609 Compiling project data, 194 Creating, 182 Deleting, 185 Download, 2612, 2629 download (overview), 2608 Migrating, 97, 114 multilingual, 2572 multiple connections, 2306, 2362 Multiple connections, 2401 Opening, 182 Saving, 184 Showing properties, 184 Simulation with a tag simulator, 2616 Project data Compiling, 194 Downloading to a memory card, 198 Export alarm, 2541 Export text list, 2554 Exporting a recipe, 2538 Exporting tag, 2549 Importing alarms, 2543 Information on compiling, 193 Information on loading, 195 Loading, 196 Loading to an accessible device, 197 Uploading from a device, 199 Project ID, 2250 Project language, 2566 Activate, 2570 Disabling, 2570 Project languages Changing the editing language, 188 Specifying project languages, 188 System texts, 186, 2573 Use, 186 User texts, 186, 2573
Project library, 44, 1946 Adding a copy template, 239 Adding types, 240 Basics, 238 Creating folders, 238 Editing elements, 243 Migrating, 109 Removing elements, 245 Using filter view, 246, 263 Using master copies, 241 Using the element and part views, 237 Using types, 242 Project text Exporting, 2559, 2577 Project texts Application example, 192 Compiling project texts, 189 Displaying reference text, 189, 2576 Exporting all texts, 191 Exporting individual texts, 191 Importing, 192, 2561, 2579 Migrating, 107 Translating individual texts, 2574 Translation into project languages, 186, 2573 Project tree Adding device, 295 Function, 143 Hiding, 802 Keyboard shortcuts, 167 Reducing automatically, 149 Showing, 802 Project view, 141 Properties (CPU), 523 ProSave, 2620 Installation, 56 Protect Function key with password, 1936 Protection concept Introduction, 201 Revoking access rights, 202 Protection level, 546 Revoking access rights, 202 PT, 1336 Pulse, 1160, 1167, 1321, 1460 Pulse and direction output, 2764 Pulse generator Compiling hardware, 37 Enabling/disabling with CTRL_PWM, 1650 Pulse interface: Principle, 2766 Pulse stretching, 584
2996
Index
Q
Q address, 391 Q series, 2465 Quantum, 2489
R
R, 319, 1121, 1122, 1128, 1130, 1146, 1307 Racks, 288 Inserting a module, 298 Radius, 1969 Range Value outside range, 1194, 1355 Value within range, 1192, 1353 Range (... - ...) Graphics list, 1912 RE_TRIGR, 1269, 1431, 1548 Read continuously Tag, 2009 READ_DBL, 40 Reading from a data block in load memory with READ_DBL, 1661 Reading data From DP standard slaves/PROFINET IO devices with DPRD_DAT, 1617 From remote CPU with GET, 1805 Reading out LED status with LED, 1641 Local time with RD_LOC_T, 1574 Recipe data record, 2683 Reading out a diagnostics buffer, 606 Reading tags, 405 Read-only, 546 REAL, 687, 723, 745
Recipe, 2088, 2090, 2091, 2541, 2675 Application example: Machine parameter assignment, 2090 Application example:Batch production, 2090 Basics, 2088, 2090 Control, 2677 Creating new, 2101 Data flow, 2678 Data record, 2091, 2676 Entry, 2091 Exporting, 2538 Importing, 2539 Memory requirements, 2691 Use, 2090 Use of text lists, 2096 Recipe data Migration, 110 Recipe data record Create on the HMI device, 2114, 2115 Creating, 2681 Creating new, 2101 Creating on the HMI device, 2114 Deleting, 2683 Editing, 2682 Reading from PLC, 2683 Synchronize with PLC, 2682 Transferring the project, 59 Transferring to PLC, 2684 Use of text lists, 2096 Recipe element Creating new, 2101 Recipe list, 2097 Recipe view, 2097 Application, 1980 Behavior with screen change, 2098 Configuring, 2108 Control element, 1980 Layout, 1980 Operation using the function key, 2098 Recipe data record, 2092, 2099 Simple, 2097 Updating, 2098 RecipeViewBack, 2197 RecipeViewClearDataRecord, 2193 RecipeViewGetDataRecordFromPLC, 2192 RecipeViewMenu, 2193 RecipeViewNewDataRecord, 2192 RecipeViewOpen, 2194 RecipeViewRenameDataRecord, 2196 RecipeViewSaveAsDataRecord, 2195 RecipeViewSaveDataRecord, 2195 RecipeViewSetDataRecordToPLC, 2194
2997
Index
RecipeViewShowOperatorNotes, 2196 Recommissioning HMI device, 2630 Reconnecting Tag, 2004 Reconnecting a PLC tag, 2004 Recording a log file for the modem, 2953 Rectangle Configuring, 1899 Inserting, 1899 Inserting and configuring, 1898 Radius corners X, 1979 Radius corners Y, 1979 Redoing actions Basics of redoing actions, 221 Redoing actions, 224 Reference junction, 436, 566, 581 Reference language, 2566 Selecting, 2570 Reference object Defining, 1875 release, 2230 ReleaseButton, 2199 Remainder of division, 1206, 1367 Remote connection cannot be established, 2940 Remote connection from the TS Adapter is not established, 2955 Remote connection to the TS Adapter is not established, 2954 Remote system access to a programming device/ personal computer, 2946 Remove Object from the group, 1893 Removing Folder link, 1886 Formatting in the alarm text, 2047 Rename Screen, 1858 Tag, 2000 Template, 1864 REPEAT, 1542 Replacing Module, 303 Replacing devices Limitations on connections, 2594 Principle, 2594 Report System Errors, (See System diagnostics) Created error OBs, 481 Requirements for establishing a remote connection, 2939 Requirements for sending an SMS, 2950
Requirements for sending e-mails, 2951 Required communication instructions, 2952 Reset Bit field, 1149, 1310 IEC timer, 1173 Operand, 1146, 1151, 1307, 1312 Output, 1128 Reset output, 1121 Reset to factory settings, 2623 RESET_BF, 1149, 1310 ResetBit, 2197 ResetBitInTag, 2198 Resetting the MPI/PROFIBUS settings, 2914 Resetting the TCP/IP settings, 2906 Resetting the user interface layout, 165 Resource SIMATIC S7 1200, 55 Resources, 1041 Introduction, 1041 Load memory, 1041 Retentive memory, 1041 Retentive memory data, 1041 Work memory, 1041 Resources tab Structure, 1043 Restore process Authorization, 70 License key, 70, 71 Restore window layout, 164 Restoring, 2662 Data of the HMI device, 2620, 2622 HMI device data, 2636 Restoring data HMI device, 2620, 2622, 2636 Restrictions due to user rights, 169, 170 Recognizing, 169 RET, 1267, 1429 Retentive behavior Bit memory, timers, counters, 767 Retentive bit memories Enabling the display, 1029 Retentive memory, 1041 Retentive on delay, 1126, 1134 Retentivity, 513, 640 Bit memory, timers, counters, 767 Block interface, 821 Data block, 957 Data block , 958 PLC tag, 767 RETURN, 1546 RLO Invert, 1144, 1304
2998
Index
ROL, 1296, 1458, 1566 Root, square, 1487 ROR, 1294, 1456, 1564 Rotate Left, 1296, 1458, 1566 Object, 1869 Right, 1294, 1456, 1564 Round, 1250, 1251, 1253, 1254, 1412, 1413, 1415, 1416, 1525, 1526, 1527 ROUND, 1250, 1412, 1525 RS, 1151, 1312 RS-232/PIP multi-master cable, 540 RT, 1173 RT class, 446 Rules for configuring MPI networks Rules for assigning the MPI address, 315 Rules for network configuration for PROFIBUS networks Assigning device addresses, 315, 316 RUN, 508 Rung Deleting, 871 Inserting, 870 Use, 869 Runtime Execution of the function list, 2158 Mouse wheel, 59 Simulating, 2614 Start screen, 1859 Runtime data Migration, 110 Runtime language, 2566, 2584, 2637 Font, 2589, 2638 Log, 2590 Order for language switching, 2587 Selecting, 2585, 2637 Runtime meters Handling with RTM, 1576 Runtime settings User administration, 2123 Runtime start Basic Panel, 2613, 2634 Runtime Stop, 2232
S
S, 1121, 1122, 1128, 1130, 1147, 1308 S5TIME, 690
S7 1200 Basic Panel, 2275 Communication, 2279 HMI connection, 2281 PROFIBUS, 2292, 2293 PROFIBUS parameters, 2294, 2296, 2298 PROFINET, 2280 S7 1200 V1 Data types, 2318 S7 1200 V2 Data types, 2319 S7 200 Communication, 2387 Connection, 2387 Connection parameters, 2324, 2390 Data types, 2413 Ethernet, 2326, 2382, 2391 MPI, 2385, 2394 Parameters, 2324, 2326, 2327, 2382, 2383, 2385, 2390, 2391, 2392, 2394, 2395 PPI, 2395 PROFIBUS, 2327, 2383, 2392 S7 300 Basic Panel, 2275 Communication, 2328 MPI address, 2357 S7 300/400 Connection parameters, 2380 Data types, 2374 HMI connection, 2330 MPI, 2350 MPI parameters, 2352, 2354, 2355 Parameters, 2380 PROFIBUS, 2342, 2343 PROFIBUS parameters, 2344, 2346, 2347 PROFINET, 2329 PROFINET parameters, 2332, 2333, 2335 S7 400 Basic Panel, 2275 Communication, 2328 MPI address, 2357 S7 connection, 325 TSAP, 336 S7 CPU Work memory, 511 Load memory, 511 Operand area, 511 S7-1200, 35 S7-1200 modules, 35 S7-PCT, 475 Safety guidelines, 178
2999
Index
Safety instruction Changing the recipe data record in the background, 2098 Switching tooltip, 2647 Safety precautions when forcing tags, 1078, 1092 Save Global library, 1956 Save table layout, 162 Save user interface Save layout in editors, 162 Save window layout, 162 Save window layout, 163 Saving a force table, 1082 Saving a watch table, 1060 Saving the user interface, 162 Scale, 1256, 1417, 1530 SCALE_X, 1256, 1417, 1530 Scaling Applying linear scaling to a tag, 2009, 2011 Scheduler, 2234 Deactivated task, 2239 Event trigger, 2239, 2242 Function list, 2238 Triggers, 2238 Work area, 2237 SCL, 907 Programming window, 916 SCL instruction Changing the data type, 926, 927 Data type basics, 925 Inserting, 924, 925 Rules, 923 Selecting, 939 SCL program Inserting a block call, 929, 930, 932, 933, 934, 935 Inserting an instruction, 924, 925 Inserting comments, 937 Program status display, 1052 Selecting an instruction, 939
Screen Availability for specific devices, 1853 Copy, 1858 Copying, 2604 Creating, 1857 Deleting, 1858 Font, 1853 Inserting, 1858 Move, 1858 Rename, 1858 Use template, 1865 Working steps in creating, 1857 Zooming, 1856 Screen change, 2226 Screen keyboard Alphanumerical, 2644, 2646 Key assignment, 2644, 2645 KTP400 Basic, 2643 KTP600, KTP1000, TP1500 Basic, 2645 Language behavior, 58 Numerical, 2644, 2646 Screen number, 2250 Screen object Dynamic movement, 1921 Screen saver, 29 Screen template, 1931 ScreenObjectCursorDown, 2171 ScreenObjectCursorUp, 2170 ScreenObjectPageDown, 2172 ScreenObjectPageUp, 2171 Script Updating tag value, 1992, 2266 SD card Open force job, 29 Search Hardware catalog, 287 Security system, 2661 Segment diagnostics Graphic display, 625 Icons, 625 Text display, 625 SEL, 1284, 1446, 1556 Select, 1284, 1446, 1556 Multiple objects, 1874 Selecting Multiple objects, 1869 Selection changed, 2225 Send clock cycle, 463, 464 Service & Support, 282 Enabling, 282 Servo motor, 2762
3000
Index
Set Bit field, 1148, 1309 Operand, 1147, 1150, 1308, 1311 Output, 1128 Set limit value, 1215, 1376, 1484 Set output, 1121 SET_BF, 1148, 1309 SetBit, 2204 SetBitInTag, 2204 SetBitWhileKeyPressed, 2205 SetColorBackgroundLighting, 2207 SetConnectionMode, 2209 SetDeviceMode, 2203 SetLanguage, 2207 SetTag, 2208 Setting Deadband, 2045 Delay time, 2045 Language, 2648 Languages in the operating system, 2567 View options for the assignment list, 1025 View options for the dependency structure, 1039 Setting AS-i network configuration parameters, 324 Setting ENO automatically, 915 Setting language, 2648 Setting parameters for the Ethernet interface, 2904 Adding a dynamic IP address, 2905 Connecting to a subnet, 2904 Deleting dynamic IP addresses, 2906 Modifiable parameters, 2902 Options in the parameter settings, 2902 Setting the communication load, 322 Setting the font, size and color , 918 Setting the mnemonics, 827 Setting the tab spacing , 918 Settings Changing, 139, 807, 832, 874, 916 FBD, 832, 873 General, 135, 137, 138, 806 LAD, 832, 873 SCL, 915 Settings for the PG/PC interface, 2901 Automatic bus parameter detection, 2908 Setting parameters for the MPI interface, 2908 Setting parameters for the PROFIBUS interface, 2910 Shift Left, 1292, 1454, 1563 Right, 1290, 1452, 1561 SHL, 1292, 1454, 1563 Show Limit lines on the bar, 1959
Show line numbers, 918 ShowAlarmWindow, 2218 Showing and hiding absolute operands, 918 Showing and hiding columns, 775, 826, 964, 977 ShowLogonDialog, 2216 ShowOperatorNotes, 2217 SHR, 1290, 1452, 1561 Shutting down Windows XP, 29 Sign, 1210, 1371 Signal board, 395 Inserting, 395 SIMATIC NET DVD for communications processors, 32 SIMATIC S7 Communication partners, 2328, 2384, 2393, 2396 SIMATIC S7 1200 Connection resource, 55 Resource, 55 SIMATIC S7 200 Migrating data types, 120 SIMATIC S7 300/400 Migrating data types, 120 simple alarm view, 2670 Control element, 2671 Operation, 2671 Use, 2670 Simple alarm view, 2063 Control element, 2064 Operation, 2064 Use, 2063 simple alarm window Application, 2063 Use, 2670 Simple recipe view, 2097 Behavior, 2112, 2680 Layout, 2111, 2679 Menu command, 2112, 2679, 2680 Operation, 2111, 2679 Simple user view, 2662 Layout, 2662 Operation, 2663 Use, 2662 Simulate hardware, 264 Simulate modules, 264 Simulate software, 264 SimulateTag, 2211 Simulating Project with tag simulator, 2616 Simulating devices, 264
3001
Index
Simulation, 59 PLC connection, 59 Runtime, 2614 SIN, 1222, 1383, 1491 Sine, 1222, 1383, 1491 Single instance Correcting the call type, 850, 890 Definition, 643 Example, 643 SINT, 683, 717, 734 Size An object, 1869 Editing multiple objects, 1884 SLC, 2447 Slot Racks, 289 Select, 290 Slot rules, 286 ET 200S, 435 Smoothing, 580 Softkey, 1929, 1933 global, 1931 Software requirements at the plant end Communication instruction "AS_MAIL", 2951 Communication instruction "SMS_SEND", 2951 Communications instruction "PG_DIAL", 2947 Software requirements for AS-AS remote link Communication instruction "AS_DIAL", 2950 Software requirements for the programming device/ personal computer Communications instruction "PG_DIAL", 2948 Software-controlled data flow control, 539 Special characters Alarm text, 51 Special tag (web server), 408 SQR, 1486 SQR , 1217, 1378 SQRT, 1218, 1379, 1487 Square, 1217, 1378, 1486 Square root, 1218, 1379, 1487 SR, 1150, 1311 Stamping, 1882 Standard PROFIBUS, 2299, 2349 Standard device, 470 Standard slave, 444 Standby Mode, 29 Standby module Substitute value, 441 Start address, 391, 515 Start information, 636 Start screen, 1859
Start the online and diagnostics view, 596 Start the simulation, 265 Start value Tag, 2007, 2008 Starting removal, 83 Starting the migration tool, 90 Starting the topology view, 377 Startup Organization blocks, 547 STARTUP Function, 504 STARTUP activities, 506 Startup OB Description, 547 Start-up parameters, 507 Startup program, 547 Startup type, 523 Station Copying, 301 Deleting, 300 Moving, 302 Renaming, 387 Station name, (See device name) Status Module defective, 605 Status of the online connection, 621 Stepper motor, 2762 STL source Generating blocks, 980 STOP, 508 Stop forcing, 1098, 1099 StopRuntime, 2212 Storing External graphic, 1887 STP, 1269, 1431, 1547 STRING, 695, 729, 752 STRUCT Addressing, 665 Declaration in global data blocks, 953 Declaration in the block interface, 816 Declaring in a PLC data type, 971 Structure, 699 Structure Call structure, 1032 of the cross-reference list, 1045, 2563 Of the dependency structure, 1037 Resources tab, 1043 STRUCT, 699 Structure of the phone book, 2942 Structured programming, 634 SUB, 1202, 1363 Subnet mask, 451
3002
Index
Substitute value Standby module, 441 Subtract, 1202, 1363 Subtracting Subtracting times with T_SUB, 1570 Supported telephone networks and modems, 2917 Restrictions, 2917 SWAP, 1247, 1408, 1506 Swap bytes, 1247 Switch, 1981, 2658 Application, 2658 Behavior, 2659 Layout, 2658 Operation, 2658 Type, 1981 SWITCH, 1264, 1426 Switch off, 2233 Switch on, 2233 Switching between basic mode and expanded mode in the force table, 1080 Switching between basic mode and expanded mode in the watch table, 1057 Switching operating mode, 610 Switchover time, 541 Switchport, 467, 2290, 2340 Symbol Alarm classes, 2053 Symbolic addressing of a tag, 1993, 2267 Symbolic constants, 656 Symbolic I/O field, 1983 Mode, 1984 Text list, 1907, 1984 Symbolic IO field, 2659 Application, 2659 Behavior, 2660 Operation, 2660 Symbolic programming Displaying absolute addresses, 827 Symbols In the assignment list, 1023 In the call structure, 1031 In the dependency structure, 1037 Sync domain, 468, 2291, 2341 Synchronization (custom web pages), 401 Synchronizing user-defined web pages, 1841 Synchronous Transferring data, 2366, 2409, 2530 Syntax errors Basics, 940 Finding errors, 941 Syntax for AWP commands, 404
System alarm, 2030 Meaning, 2067, 2068, 2072, 2077 System block System blocks folder, 777 System diagnostics Created blocks, 481 General settings, 491 Introduction, 478 Send alarms, 491 Settings for "PLC in STOP", 494 Settings for configuring alarms, 492 System event, 2030 Meaning, 2067, 2068, 2071, 2072, 2074, 2076, 2077, 2078, 2079, 2081, 2083, 2084 Parameters, 2067 System events Configuring, 2039 System function Application, 2153 Function list, 2155 In the function list, 2153 Usage, 2152 Use, 2153
3003
Index
System functions, 2151 AcknowledgeAlarm, 2191 ActivateCleanScreen, 2167 ActivatePreviousScreen, 2168 ActivateScreen, 2165 ActivateScreenByNumber, 2166 AdjustContrast, 2164 AlarmViewAcknowledgeAlarm, 2190 AlarmViewEditAlarm, 2189 AlarmViewShowOperatorNotes, 2191 AlarmViewUpdate, 2190 Available, 2161 CalibrateTouchScreen, 2178 ChangeConnection, 2215 ClearAlarmBuffer , 2187 ClearAlarmBufferProTool , 2188 DecreaseFocusedValue, 2213 DecreaseTag, 2214 EditAlarm, 2170 GetGroupNumber, 2185 GetPassword, 2185 GetUserName, 2184 GoToEnd, 2174 GoToHome, 2174 IncreaseFocusedValue, 2172 IncreaseTag, 2173 InvertBit, 2175 InvertBitInTag, 2176 InvertLinearScaling, 2177 LinearScaling, 2186 Logoff, 2164 Logon, 2169 PageDown, 2202 PageUp, 2202 PressButton, 2199 RecipeViewBack, 2197 RecipeViewClearDataRecord, 2193 RecipeViewGetDataRecordFromPLC, 2192 RecipeViewMenu, 2193 RecipeViewNewDataRecord, 2192 RecipeViewOpen, 2194 RecipeViewRenameDataRecord, 2196 RecipeViewSaveAsDataRecord, 2195 RecipeViewSaveDataRecord, 2195 RecipeViewSetDataRecordToPLC, 2194 RecipeViewShowOperatorNotes, 2196 ReleaseButton, 2199 ResetBit, 2197 ResetBitInTag, 2198 ScreenObjectCursorDown, 2171 ScreenObjectCursorUp, 2170 ScreenObjectPageDown, 2172 ScreenObjectPageUp, 2171 SetBit, 2204 SetBitInTag, 2204 SetBitWhileKeyPressed, 2205 3004 SetConnectionMode, 2209 SetDeviceMode, 2203 SetLanguage, 2207 SetTag, 2208 ShowAlarmWindow, 2218
System limits HMI device, 2687 System memory, 523, 545 Diagnostics buffer, 515, 618 Operand areas, 511 process image input/output, 513 System requirement for WinCC Basic, 65 System requirements STEP 7 Basic, 64 System-defined text lists Editing, 230 Modifying texts, 230 System-relevant information Module information, 598 Vendor information, 598
T
Table Connection, 2255
Index
Tag absolute addressing, 1992, 2266 Acquisition cycle, 2008, 2015, 2025 Acquisition mode, 2008 Addressing, 1995 Changing the PLC, 2012 Comment, 1998 Configuration, 2001 Configuring several tags, 2002 Connection to PLC, 1995 Copy, 2000 Creating external tags, 1995 Creating internal tags, 1998 Data type, 1998 Deleting, 2001 Displaying values, 2026 Event, 2014 Exporting, 2549 External tag, 1991, 2265 Importing, 2551 in Runtime, 2008 Index tag, 2012, 2013 Indirect addressing, 2012, 2013 Internal tag, 1994, 2268 Length, 1998 Limit range, 2005 Limit value, 2006 Linear scaling, 2009, 2011 Maximum length, 58 Multiplexing, 2012 Name, 1998 Object list, 1997 Output in alarm, 2046 Overlaying, 667, 954 Overview, 654 PLC tag, 758 PLC tags and DB tags, 655 Read continuously, 2009 reconnecting, 2004 Rename, 2000 Start value, 2007, 2008 symbolic addressing, 1993, 2267 Update, 2009, 2015 Tag data Structure for the import, 2552, 2557
Tag declaration Automatically filling in cells, 775, 825, 964, 976 Based on a PLC data type, 954 Block interface, 808 Declaring ARRAY, 815 Declaring PLC data type, 816 Declaring STRUCT, 816 Declaring tags, 812, 813, 817, 954 Deleting a tag, 774, 824, 963, 976 Importing and exporting tags, 826, 965 Inserting a table row, 773, 824, 962, 975 Inserting table rows at the end, 824, 963, 975 Multi-instance, 818 Overlaying tags, 817, 954 Purpose of tag declaration, 807 Reserved key words, 657 Retentivity, 821 Showing and hiding columns , 775, 826, 964, 977 Sorting rows, 774 Tag properties, 820, 822, 959, 960, 961 Updating the block interface, 819 Valid data types, 810 Tag import Tag data structure, 2552, 2557 Tag list Indirect addressing, 2012, 2013 Tag simulator, 2618 Tag table Default, 1990, 2264 for HMI devices, 1990, 2264 user-defined, 1990, 2264 Tag value Output, 2026 Tags Basics, 1989, 2263 Migrating, 103 Migration, 116 Monitor all, 1068, 1089 Monitor now, 1090 Monitor once and now, 1069 Tan, 1493 TAN, 1224, 1386 Tangent, 1224, 1386, 1493 Task, 2236 Deactivate, 2239 Task card, 1854 Changing the pane mode, 158 Function, 156 Hardware catalog, 280 Reducing automatically, 149 Tools, 1865
3005
Index
Task Card Online Tools, 598 TCI (Tool Calling Interface), 474 TCON_Param, 359 TCP Characteristics, 358 Port numbers, 362 Technology object command table: Add new object, 2803 Technology object command table: Basic parameters, 2804 Technology object command table: Command table configuration, 2805 Technology object command table: Configuration window icons, 2804 Technology object command table: Configuring activate warnings, 2805 Technology object command table: Configuring duration, 2807 Technology object command table: Configuring position / travel path, 2806 Technology object command table: Configuring the command type, 2806 Technology object command table: Configuring the next step, 2808 Technology object command table: Configuring the step code, 2808 Technology object command table: Configuring use axis parameters of, 2805 Technology object command table: Configuring velocity, 2807 Technology object command table: Extended parameters, 2804 Technology object command table: General configuration, 2804 Technology object command table: Shortcut menu commands, 2808 Technology object command table: Tools, 2802 Technology object command table: Usage, 2802 Technology object, axis and command table: List of ErrorIDs and ErrorInfo, 2857 Technology objects PID_3Step, 2741 PID_Compact, 2722 Telephone book at TeleService, 2916 Telephone networks which can be used, 2917
TeleService Meaning of the icons, 2943 AS_DIAL, 2948 Callback variants, 2935 Establish connection to AS, 2948 Global telephone book, 2916 Transferring e-mail with TM_MAIL, 1843 TeleService callback options, 2937 TeleService functionality, 2916 TeleService telephone book, 2916 Temperature coefficient, 579 Temperature compensation, 566 template Template, 1864 Template, 1929 Copy, 1864 Creating, 1863 Deleting, 1864 Global screen, 1862 Inserting, 1864 Move, 1864 Rename, 1864 Use in screen, 1865 Terminal modules and electronic modules, 564 Terminating the remote connection, 2940 Test options in the force table, 1077 Text Button, 1982 Text field, 1985 Text field, 1985 Size, 1986 Text field length Asian languages , 2640 Text list Application, 1901 Bit (0, 1), 1906 Bit number (0 - 31), 1907 Creating, 1902 Exporting, 2554 Importing, 2556 Symbolic I/O field, 1907, 1984 Value/Range, 1904 Text lists Introduction, 227 System-defined, 228 Use in recipe data records, 2096 User-defined, 228 Text lists for alarms, 1115 Texts Migrating, 107
3006
Index
Third-party drivers Communication, 2414 Special features, 2415 TIA Portal Exiting, 135 Starting, 135 Time, 689, 690 Converting UTC time to local time with SET_TIMEZONE, 1574 Recording, 1171 TIME, 689, 724, 747 Time accumulator, 1165, 1327, 1469 Time duration, 1174 Time error interrupt OB, 552 Time expired, 2234 Time of day Setting the time of day in the Online and Diagnostics view, 612 Time stamp, 2038 Time stamping, 567 Time-delay interrupt Canceling with CAN_DINT, 1637 Instructions, 1635 Querying with QRY_DINT, 1638 Starting with SRT_DINT, 1636 Time-delay interrupt OB, 549 Time-of-day, 523, 692, 693 Calculating local time with SET_TIMEZONE, 1574 Reading time-of-day and date of CPU with RD_SYS_T, 1573 Setting for CPU with WR_SYS_T, 1572 Time-of-day function Basics, 529 Clock parameters, 530 Reading the time of day, 530 Setting the time of day, 530 Time-of-day format, 529 Time-of-day interrupt Activating with ACT_TINT, 1632 Canceling with CAN_TINT, 1632 Querying with QRY_TINT, 1633 Setting with SET_TINT, 1630 Time-of-day synchronization, 523 TIMER, 704 Timer instructions Retentive on delay, 1126, 1134 Times Adding with the instruction T_ADD, 1569 Converting with T_CONV, 1568 Determining difference with T_DIFF, 1571 Subtracting with T_SUB, 1570
TO_Axis_PTO, 2779 TOD, 692, 726, 749 TOF, 1164, 1170, 1325, 1466 Toggle Between runtime languages, 2639 Between Runtime languages, 2584 TON, 1162, 1169, 1323, 1463 TONR, 1126, 1134, 1165, 1171, 1327, 1469 Tool Calling Interface (TCI), 474 Toolbar Order, 1869, 1878 Tools, 1865 Tooltip display, 2647 Topology discovery, 468, 2291, 2341 Topology view Adding device, 295 Adopt devices identified online, 390 Adopt port interconnections identified online, 390 Compare offline/online, 382 Configured topology, 378, 379 Diagnostics status in the graphic view, 380 Diagnostics status in the table view, 381 Differences compared with the network view, 376 Functions, 376 Hardware and network editor, 274 Interconnecting ports, 383 Touch operation IO field, 2652 TP, 1160, 1167, 1321, 1460 TP177A Loading a project, 57 TraceUserChange, 2213 Transfer card, (See Memory Card) Transferring Recipe data record, 2684
3007
Index
Transferring data Area pointer, 2269, 2300, 2357, 2396, 2521 Area pointer screen number, 2305, 2358, 2397, 2522 Coordination area pointer, 2304, 2360, 2399, 2525 Data record are pointer, 2529 Data record area pointer, 2309, 2364, 2403 Date/time area pointer, 2301, 2302, 2359, 2397, 2523 Date/time PLC area pointer, 2359, 2398, 2524 Job mailbox, 2312, 2368, 2405, 2532 Job mailbox area pointer, 2307, 2362, 2401, 2526 Operator input in the recipe view, 2311, 2367, 2404, 2531 Possible cause of error, 2314, 2370, 2407, 2534 Project ID area pointer, 2306, 2361, 2400, 2526 Triggering by means of a configured function, 2314, 2369, 2407, 2534 With synchronization, 2366, 2409, 2530 Without synchronization, 2310, 2365, 2408, 2529 Transferring the project HMI device, 59 Recipe data record, 59 Translate Editor, 2572 Transmission medium/duplex, 466 Transmission rate / duplex, 2289, 2339 Transparency In graphic, 1885 transparent color, 1966 Display on panels, 1966 Display on the panel HMI, 2653 Trend view, 1969, 2655 Application, 2655 Button, 1970 Configuring for values from the PLC, 2027 Layout, 2655 Operation, 2656 Operator control, 2656 TrendViewBackToBeginning, 2184 TrendViewCompress, 2180 TrendViewExtend, 2180 TrendViewRulerLeft, 2181 TrendViewRulerRight, 2182 TrendViewScrollBack, 2179 TrendViewScrollForward, 2178 TrendViewSetRulerMode, 2182 TrendViewStartStop, 2183 Trigger tag, 2038
Triggering by means of a configured function Transferring data, 2314, 2369, 2407, 2534 Triggers, 2238 Event trigger, 2239, 2242 TRUNC, 1254, 1416, 1529 TS adapter, 59 TS Adapter Installing additional software, 2922 TS Adapter MPI Brief description, 2922 Default parameter assignment, 2923 Direct connection, 2923 Establishing a modem connection, 2924 Establishing the direct connection, 2924 Exporting adapter parameters, 2928 Importing adapter parameters, 2928 Modem connection, 2924 parameter Assignment, 2926 Parameter assignment , 2926 Parameter assignment options, 2925 Principle of operation, 2923 Restoring the default parameter assignments, 2927 Setting up access protection, 2936 TS Adapter IE Brief description, 2929 Default parameter assignment, 2930 parameter Assignment, 2933 Principle of operation, 2930 TS Adapter IE Basic Connection to the GSM network, 2932 Connection to the telephone network, 2931 Connection to the telephone network through an external modem, 2932 Connection types, 2931 TSAP ASCII code table, 365 Structure, 336, 363 TSAP assignment Examples, 365 Twos complement, 1207, 1368 Type Library, 1948 Types of DP slave, 431
U
UART data transmission, 535 UDINT, 687, 722, 744 UDP Characteristics, 358 Port numbers, 362
3008
Index
UFILL_BLK, 1245, 1406, 1504 UINT, 685, 720, 740 UMOVE_BLK, 1241, 1402, 1501 Underflow, 581 Undoing actions Basics of undoing, 221 Undoing last action, 223 Undoing multiple actions, 223 Uniqueness of object names, 94 Universal PROFIBUS, 2299, 2349 Universal Serial Interface Protocol, (See USS protocol) unlock Users, 2138 Unplugged module, 292 Unspecified CPU, 296 Update Tag, 2009, 2015 Update cycle, 2025 Update time, 464 UpdateTag, 2169 Updating Operating system, 2624 Updating the operating system, 2622 USB network card, 36 Use, 2090 Of recipes, 2090 Screen navigation function keys, 1939 simple alarm view, 2670 simple alarm window, 2670 Simple user view, 2662 System function, 2153 Use global assignment Function key, 1862 Useful information on configuring the TS Adapter MPI, 2925 User administration, 2119 Migration, 110 Object with access protection, 2141 Runtime settings, 2123 Setting up, 2144 User change, 2226, 2241 User data Area, 516 Backing up, 2662 Restoring, 2662 User diagnostic alarm Creating, 1109 Deleting, 1110 Editing, 1109
User group, 2661 Administer authorizations, 2131 Assigning, 2149 Assigning users, 2129 Change displayed name, 2132 Changing in runtime, 2138 Changing the name, 2131 Creating, 2148 Deleting, 2132 Managing, 2131 Unauthorized, 2139 User interface Details view, 158 Inspector window, 154 Maximizing the work area, 148 Minimizing the work area, 148 Overview window, 159 Portal view, 139 Project tree, 143 Project view, 141 Task card, 156 Views, 139 Work area, 146 User interface language, 2566 Selecting, 2569 User program Finding errors, 941 Function, 633 Testing, 1049 User view, 2133 Application, 1960 Configuring, 2134 Layout, 1960 Number of lines, 1960 Permitted characters, 58 Simple user view, 2133 User-defined functions In function lists, 2155 User-defined text lists Creating, 228 Editing, 229 Editing value ranges and texts, 230
3009
Index
Users, 2661 Admin, 2667 Assigning a user group, 2129 Changing, 2137 Changing the name, 2130 Changing, touch operation, 2666 Creating, 2128, 2149, 2663 Creating in runtime, 2135 Creating, touch operation, 2663, 2665 Deleting, 2131, 2667 Deleting in runtime, 2138 Logging logons, 2143 Logoff, 2664 Logon, 2138 Managing, 2130, 2136 Unlock, 2138 Updating after change of user, 2241 Using a TS Adapter for TeleService, 2920 Using frames and cover pages from the library, 209 Using tags, 1961 Using the keyboard Program editor, 799 Using the on-screen keyboard, 169 USINT, 684, 718, 736 USS communication Controlling a transmission to a drive with USS_PORT, 1764 Data exchange with drives via USS_DRV, 1765 Modifying parameters in the drive with USS_WPM, 1769 Reading parameters from the drive with USS_RPM, 1768 USS protocol Instructions, 1760 USS status codes, 1771
Vertical movement Animation, 1923 Vertical radius, 1964 View options For the assignment list, 1025 Setting the call structure, 1033 Setting the dependency structure, 1039 Views of the cross-reference list, 1045, 2563 VOID, 704
W
Warm restart, 505 Watch table Meaning of the icons, 1057 Basic mode, 1056 Copying, 1060 Creating, 1059 Example of filling out a watch table, 1061 Expanded mode, 1056 Layout, 1056 Loading data blocks during an active control job, 41 Meaning of the columns, 1056 Monitoring and modifying modes, 1066 Multiple access to the same CPU, 40 Opening, 1059 Overview of the display formats, 1064 Overview of the test options, 1055 Permitted operands, 1062 Permitted operands for modify values, 1063 Possible applications, 1055 Rounding floating-point numbers, 41 Saving, 1060 Switching between basic mode and expanded mode, 1057 Syntax check, 1061 Testing wiring, 1055 Watchdog time, 464 Web application, 400 Web Control DB, 415 Web pages in browser, 419 Web server, 396, 397, 400 Enable, 398 HTTPS, 398 When dialog is closed, 2226 When dialog is opened, 2226 WHILE, 1541 WinCC flexible project Migrating, 97, 114 WinCC flexible Runtime Closing, 2635
V
Valid Data type, 2421, 2464, 2473, 2488, 2500, 2513 Data types, 2318, 2319, 2374, 2413 Valid data type Allen-Bradley DF1, 2445 Value, 1371 Value assignment, 914 Value change, 2234 Value/Range Text list, 1904 Variable Displaying or hiding variable information, 863, 902 VARIANT, 703
3010
Index
Window layouts Changing order, 164 Deleting window layouts, 164 Wire break, 580 Wireless LAN/PB link, 446 Wiring tests, 1055 Wizard Device wizard, 2535 WORD, 681, 715, 731 WORD_TO_BLOCK_DB, 753 Work area Embedding floating elements, 151 Floating elements, 151 Function, 146 Maximizing, 148 Maximizing elements, 153 Minimizing, 148 Minimizing elements, 153 Saving a layout of editors and tables, 165 Splitting, 150 Switching between elements, 154 Using grouped elements, 151 Work memory, 511, 1041 Working step to create screens, 1857 Working with the phone book, 2941 WRIT_DBL, 40 Writing data in remote CPU with PUT, 1807 To DP standard slaves/PROFINET IO devices with DPWR_DAT, 1619 Writing tags, 407 WWW (instruction), 414 WWW Synchronizing user-defined web pages, 1841
X
xlsx file, 2543, 2550, 2554, 2555 XOFF, 36 XON, 36 XOR, 1278, 1301, 1303, 1441
Z
Zoom Adjusting the zoom setting, 270, 272, 275 Keyboard shortcuts, 283 Zooming Screen, 1856
3011