Comparing Libraries using the "Library Compare" Tool TIA Portal Openness / V14 SP1 https://support.industry.siemens.com/cs/ww/en/view/109749141 Siemens Industry Online Support
Warranty and Liability Warranty and Liability Note The Application Examples are not binding and do not claim to be complete regarding the circuits shown, equipping and any eventuality. The Application Examples do not represent customer-specific solutions. They are only intended to provide support for typical applications. You are responsible for ensuring that the described products are used correctly. These Application Examples do not relieve you of the responsibility to use safe practices in application, installation, operation and maintenance. When using these Application Examples, you recognize that we cannot be made liable for any damage/claims beyond the liability clause described. We reserve the right to make changes to these Application Examples at any time without prior notice. If there are any deviations between the recommendations provided in these Application Examples and other Siemens publications e.g. Catalogs the contents of the other documents have priority. We do not accept any liability for the information contained in this document. Any claims against us based on whatever legal reason resulting from the use of the examples, information, programs, engineering and performance data etc., described in this Application Example shall be excluded. Such an exclusion shall not apply in the case of mandatory liability, e.g. under the German Product Liability Act ( Produkthaftungsgesetz ), in case of intent, gross negligence, or injury of life, body or health, guarantee for the quality of a product, fraudulent concealment of a deficiency or breach of a condition which goes to the root of the contract ( wesentliche Vertragspflichten ). The damages for a breach of a substantial contractual obligation are, however, limited to the foreseeable damage, typical for the type of contract, except in the event of intent or gross negligence or injury to life, body or health. The above provisions do not imply a change of the burden of proof to your detriment. Any form of duplication or distribution of these Application Examples or excerpts hereof is prohibited without the expressed consent of the Siemens AG. Security information Siemens provides products and solutions with industrial security functions that support the secure operation of plants, systems, machines and networks. In order to protect plants, systems, machines and networks against cyber threats, it is necessary to implement and continuously maintain a holistic, state-of-the-art industrial security concept. Siemens products and solutions only form one element of such a concept. Customer is responsible to prevent unauthorized access to its plants, systems, machines and networks. Systems, machines and components should only be connected to the enterprise network or the internet if and to the extent necessary and with appropriate security measures (e.g. use of firewalls and network segmentation) in place. Additionally, Siemens guidance on appropriate security measures should be taken into account. For more information about industrial security, please visit http://www.siemens.com/industrialsecurity. Siemens products and solutions undergo continuous development to make them more secure. Siemens strongly recommends to apply product updates as soon as available and to always use the latest product versions. Use of product versions that are no longer supported, and failure to apply latest updates may increase customer s exposure to cyber threats. To stay informed about product updates, subscribe to the Siemens Industrial Security RSS Feed under http://www.siemens.com/industrialsecurity. Entry ID: 109749141, V1.0, 09/2017 2
Table of Contents Table of Contents Warranty and Liability... 2 1 Introduction... 4 1.1 Overview... 4 1.2 Components used... 4 2 Installation... 5 2.1 Requirements... 5 2.2 Installation of the tool... 5... 6 3.1 Interface... 6 3.1.1 Library selection... 7 3.1.2 Function bar... 8 3.1.3 Icons... 8 3.1.4 "Types" tab... 8 3.1.5 "Master Copies" tab... 10 3.2 Comparing libraries... 11 3.3 Result evaluation... 13 3.3.1 "Types" tab... 13 3.3.2 "Master Copies" tab... 17 3.4 Error handling... 17 4 Valuable Information... 18 4.1 Managing the user rights... 18 5 Annex... 19 5.1 Service and support... 19 5.2 Links and literature... 20 5.3 Change documentation... 20 Entry ID: 109749141, V1.0, 09/2017 3
1 Introduction 1 Introduction 1.1 Overview The "Library Compare" tool gives you the opportunity to compare libraries. Using the openness interface, the metadata (version, GUID, name, etc.) of the types and master copies are read out and a comparison is carried out. 1.2 Components used This application example was created with the following software components: Table 1-1 Component STEP 7 Professional V14 SP1 TIA Portal Openness / V14 SP1 Microsoft Visual Studio 2015 Numbe r Article number 1 6ES7822-1..04-.. Note 1 Included in the scope of delivery of STEP 7 Professional V14 SP1 or WinCC Advanced V14 SP1 1 -.NET Framework 4.6.1 This application example consists of the following components: Table 1-2 Component File name Note Documentation Openness Project 109749141_TIA_OpennessLibraryCompare_DOC_V10.pdf 109749141_TIA_OpennessLibraryCompare_PROJ_V11.zip Entry ID: 109749141, V1.0, 09/2017 4
2 Installation 2 Installation 2.1 Requirements 1. Install TIA Portal V14 SP1 Note TIA Portal Openness SP1 is included in the delivery of STEP 7 V14 SP1 or WinCC V14 SP1. 2. Install TIA Portal Openness V14 SP1. 3. Add your Windows user to the "Siemens TIA Openness" user group (see chapter 4.1). 2.2 Installation of the tool Load the following download file in a directory of your choice and unzip the zipped folder. "109749141_TIA_OpennessLibraryCompare_PROJ_V11.zip" The zipped download file includes: LibraryCompare SourceCode LibraryCompare application The Microsoft Visual Studio project with the TIA Portal Openness functions can be found in the download file in the folder "LibraryCompare-SourceCode". You find the executable file "LibraryCompare.exe" in the LibraryCompare application" folder. Entry ID: 109749141, V1.0, 09/2017 5
3.1 Interface Double-click the "LibraryCompare.exe" application. The following "Library Compare" user interface is compared. Figure 3-1 1 2 3 4 6 5 1. Function bar 2. Left library selection 3. Right library selection 4. Left comparison table 5. Right comparison table 6. Status and action area Entry ID: 109749141, V1.0, 09/2017 6
3.1.1 Library selection 1. Click the (2) button (see Figure 3-1) in order to select the 1st library. The file selection dialog opens. Figure 3-2 2 3 2. Select the appropriate file format: Project library: "TIA Portal V14 Project (*ap.14)" Global user library: "TIA Portal V14 Library (*al.14)" 3. Select your global user library "TIA Portal V14 Library (*al.14) or your project library "TIA Portal V14 Project (*ap.14). 4. Click the (3) button (see Figure 3-1) in order to select the 2nd library. The file selection dialog opens. 5. Select the appropriate file format: 6. Select your library to be compared. Further information about the types is available in the "STEP 7 Professional V14 SP1" manual in the chapter "Basics on libraries" https://support.industry.siemens.com/cs/ww/en/view/109747136/96131927691 Entry ID: 109749141, V1.0, 09/2017 7
3.1.2 Function bar Figure 3-3 1 2 3 4 1. View of the comparison table a. No Details b. Single Line c. All Details 2. Highlight outdated Elements 3. Start DetailCompare of selected types 4. Save compare Result to csv 3.1.3 Icons Figure 3-4 5 5. 1 2 3 4 1. Start the comparison process using button (5) (see chapter 3.2) 2. With the circular icons (1-4) you can show or hide the appropriate rows. For more information, refer to chapter 3.3 3.1.4 "Types" tab The library types are shown in the "Types" tab. Further information about the types is available in the "STEP 7 Professional V14 SP1" manual in the chapter "Basics on Types" https://support.industry.siemens.com/cs/ww/en/view/109747136/96048684683 Entry ID: 109749141, V1.0, 09/2017 8
Filtering comparative results You can filter the comparative results according to the following criteria: Show all types Types with pending changes Types with multiple versions Figure 3-5 The following elements can be compared as type in the project library or the global library: Blocks (Block) FB, FC PLC data types (PLC UDT) Screens Faceplates Scripts (C Script, VB Script) HMI data types (HMI UDT) HMI Style HMI Style Sheet Using the following selection dialog, you can filter the elements. Figure 3-6 In the "Name" input field, you can filter by entering a name. Entry ID: 109749141, V1.0, 09/2017 9
Comment language Using the following selection dialog, you set the language for comments that are enabled in the library. Figure 3-7 For more information about library languages, please refer to the "STEP 7 Professional V14 SP1" manual in the chapter "Defining library languages" https://support.industry.siemens.com/cs/ww/en/view/109747136/96249763979 3.1.5 "Master Copies" tab The master copies of the library are shown in the "Master Copies" tab. +Further information about the master copies is available in the "STEP 7 Professional V14 SP1" manual in the chapter "Basics on master copies" https://support.industry.siemens.com/cs/ww/en/view/109747136/96549105291 In the "Name" input field, you can filter by entering a name. Entry ID: 109749141, V1.0, 09/2017 10
3.2 Comparing libraries Note Close the global library in TIA Portal and close the TIA Portal. 1. Start the "Library Compare" tool. Figure 3-8 1 3 2 2. Click the buttons (1) and (2) in order to select your libraries. 3. Click on the button (3) to start the comparison. When you start the comparison for the first time, the following security message appears: Figure 3-9 4. Confirm the message with Yes to allow the access once and with Yes to all to always permit access to this application. Note If you start the application from Visual Studio, it can happen that you will receive the message, although you have already clicked Yes to all. To avoid this, follow the instructions in the FAQ Tips for TIA Portal Openness. https://support.industry.siemens.com/cs/en/en/view/109251656 If the comparison is done, it will say "Done" on the bottom left of the edge of the window and the results are displayed (see chapter 3.3). After this, the detailed comparison is possible. Entry ID: 109749141, V1.0, 09/2017 11
Detailed comparison Figure 3-10 1. Select the types you want to compare in detail. 2. Start the detailed comparison. 3. Confirm the following information. Figure 3-11 The TIA Portal project is created and displayed after completion by a confirmation window. Entry ID: 109749141, V1.0, 09/2017 12
4. Confirm with OK. Figure 3-12 There is now a TIA portal project in which you can perform the offline / offline comparison for a code-based comparison of the selected types. For more information on offline/offline comparison, please use the following link: https://support.industry.siemens.com/cs/ww/en/view/109747136/84733691915 3.3 Result evaluation The "Library Compare" tool compares the two libraries and presents the comparison results, as described in the following chapters. 3.3.1 "Types" tab The comparative results of the types are displayed. The types are compared by version and GUID. Versions of the objects are identical Identical objects are displayed with a green dot and "Equal". Figure 3-13 Entry ID: 109749141, V1.0, 09/2017 13
Conflict: Different content with same version Different contents and therefore different GUIDs with the same version are displayed with an orange point and "Diff". Figure 3-14 Versions of the objects are different The left library contains newer versions of the objects than the right library. This is indicated by a blue / white dot and "Left". Figure 3-15 Entry ID: 109749141, V1.0, 09/2017 14
The right library contains newer versions of the objects than the left library. This is indicated by a white / blue dot and "Right". Figure 3-16 Missing comparative element The object is missing in the left-hand library. This is shown with a gray dot and "None". Figure 3-17 Entry ID: 109749141, V1.0, 09/2017 15
"Dependents/Dependencies" tab Select the object from which you would like to display the dependency. In the example the FB LGF_PulseRelay is called in FB LGF_CalendarDayWeek. This is shown in the "Dependencies" tab, as shown in Figure 3-18, and in the Dependents tab, as shown in Figure 3-19. Figure 3-18 Figure 3-19 Entry ID: 109749141, V1.0, 09/2017 16
3.3.2 "Master Copies" tab In this tab you can check whether the master copies are included. Since the time stamp is changed for master copies with each copying and there is only the name and author available otherwise, a meaningful comparison is not possible. The differences are displayed with the same symbolism in the "Master Copies" as in the "Types" tab (see chapter 3.3.1). "Content Description" tab The "Content Description" tab shows what "Type" it is, for example Siemens.Engineering.SW.Blocks.FB Siemens.Engineering.HMI.Screen.ScreenTemplate Siemens.Engineering.HMI.RuntimeScripting.VBScript Figure 3-20 3.4 Error handling You can compare a project library with a user library, or compare two user libraries. Two project libraries cannot be compared. If you have selected two project library "TIA Portal V14 Project (*ap.14)" files, you will get the error message "Comparing 2 projects is not possible". Figure 3-21 Entry ID: 109749141, V1.0, 09/2017 17
4 Valuable Information 4 Valuable Information 4.1 Managing the user rights In order to use the user example, the Windows user has to be added to the "Siemens TIA Openness" user group. 1. Open the "Computer Management Windows 7: Right-click on "Computer" in the windows taskbar and select "Manage". Windows 10: Right-click on the Windows button or use the key combination "Window button + X". Click on "Computer Management in the open menu. 2. Open "Local Users and Groups > Users" and double-click on the Windows user. 3. Go to the "Member Of" tab and click "Add". 4. Enter "Siemens TIA Openness" and confirm by pressing "OK". 5. Close the opened dialog boxes and log in again. Entry ID: 109749141, V1.0, 09/2017 18
5 Annex 5 Annex 5.1 Service and support Industry Online Support Technical Support Do you have any questions or need support? Siemens Industry Online Support offers access to our entire service and support know-how as well as to our services. Siemens Industry Online Support is the central address for information on our products, solutions and services. Product information, manuals, downloads, FAQs and application examples all information is accessible with just a few mouse clicks at https://support.industry.siemens.com Siemens Industry's Technical Support offers quick and competent support regarding all technical queries with numerous tailor-made offers from basic support right up to individual support contracts. Please address your requests to the Technical Support via the web form: www.siemens.en/industry/supportrequest Service offer Our service offer comprises, among other things, the following services: Product Training Plant Data Services Spare Parts Services Repair Services On Site and Maintenance Services Retrofit and Modernization Services Service Programs and Agreements Detailed information on our service offer is available in the Service Catalog: https://support.industry.siemens.com/cs/sc Industry Online Support app Thanks to the "Siemens Industry Online Support" app, you will get optimum support even when you are on the move. The app is available for Apple ios, Android and Windows Phone: https://support.industry.siemens.com/cs/ww/en/sc/2067 Entry ID: 109749141, V1.0, 09/2017 19
5 Annex 5.2 Links and literature Table 5-1 No. \1\ Siemens Industry Online Support https://support.industry.siemens.com Topic \2\ Link to the entry page of the application example https://support.industry.siemens.com/cs/ww/en/view/109749141 \3\ TIA Portal Openness: Introduction and Demo Application https://support.industry.siemens.com/cs/en/en/view/108716692 \4\ Tips for TIA Portal Openness https://support.industry.siemens.com/cs/en/en/view/109251656 \5\ Using Libraries https://support.industry.siemens.com/cs/ww/en/view/109747136/96938581515 5.3 Change documentation Table 5-2 Version Date Modifications V1.0 09/2017 First version Entry ID: 109749141, V1.0, 09/2017 20