Comparing projects
To modify the comparator settings for S7 projects, proceed as follows:
- Open the UserClient.
- In the Project tree, select a S7 component.
- In the Edittab, click on Edit component configuration.
- Then click on Comparator configuration.
- The S7 program dialog will then open.
- Select the program you want then confirm by clicking on OK.
- The dialog Comparison configuration will open. 1.1.Image: Comparison configuration
- Confirm your selected settings by clicking on OK.
- Then in the dialog Component configuration, click on Apply.
Note
The settings in the comparator configuration are only transferred to the server when a new version of the component has been created. To ensure that the comparison results from jobs and versions match, a new version needs to be created and checked-in.
Changes in Step 7 properties blocks
The comparator settings of the S7 component need to be changed to ensure that the changes, made in properties blocks, are displayed. Proceed as follows.
- In the dialog Comparison configuration, check the option compare content. This is located in the section DB compare.
- Once a new version of the component is created, the change will be detected in properties blocks.
Code timestamp in the comparison
Starting with version 3.2, the code timestamp is not used when comparing two blocks. This is because a new code timestamp is assigned to blocks created with external editors (for example, SCL) during each compilation process.
Excluding and including initial and current values of variables
- In the Comparison configuration dialog, activate the option compare content. This is located in the DB compare section.
- The Variables section will now be activated.
- In the text field, specify the variables whose initial and current values you want to exclude and include. The variables are specified in the format * *
<name of DB>
.<name of variable>
**. - Example:
- DB3.STRUCT.Variable
- DB3.STRUCT.Variable.*
- DB3..Variable.
- Use the radio buttons to select whether you want to exclude or include the variables values.
Consider additional program parts
- In the dialog Comparison configuration, select More options.
- In the lower part of the dialog, the area Included when comparing will be displayed.
- 1.Image: Dialog Comparison configuration , area Included when comparing
- Here you can use the checkboxes to select program parts you want to include or exclude from the comparison.
Include STL sources in all clients as standard
The comparison of STLÂ sources can be activated in the section Included when comparing by checking the checkbox STL source.
You can also specify on the server side that STL sources are to be compared by default. To do so, proceed as follows:
- Start the AdminClient.
- Click on INI files.
- The dialog Edit INI file will then open.
- Select the file Classes.ini.Path to the file:
..
VD$AConfigurationCompareClasses.ini)
- Select the section [SimaticS7]. If this section is not present, you will need to create one at the end of the file.
- Assign the value Y to the key 7169 .
- [SimaticS7]
- 7169=Y
Note
- Possible values are: Y (STL sources are taken into account in the comparison) and N (STL sources are ignored in the
comparison) .The default value is N.
Comparing an ESÂ Drive
To perform an S7 comparison of ES Drive, you will require an up to date and licensed version of Microsoft Access including the ** ODBC driver**.
Comparing security programs
For security programs, the checksum generated by the SIMATIC S7 Manager is compared and displayed in addition to the date of the last compilation of the F program part. Information on CRC and timestamp are stored in a special database, whose number can vary. It can be identified by its name (F_GLOBDB) and its creation language (F_DB). Generally, the blocks managed by the SIMATIC S7 Manager are ignored during the comparison. These include:
- Blocks in the languages F_AWL and F_CALL.
- Blocks in the language F_DB, if the name of the author has the format FALG{NNNN}. N can be a digit from 0-9 or a hyphen.
- Blocks in the language F_DB with the name F_GLOBDB. The checksum and timestamp are extracted and displayed as described above.
Comparing with the LibraryManagement add-on
In the LibraryManagement, the following comparisons can be carried out:
- Blocks: according to content and properties
- Sources: according to content and properties
- CFC: according to content or name
- SFC: according to content or name
Comparing blocks with activated Know-how protection
When comparing blocks that are protected with the S7 Block Privacy add-on, differences will be detected. The differences will not be shown in detail.
Differences in messages
Differences in messagesare not displayed.
Differences in the declaration lists of blocks
Differences in the declaration lists of two data blocks are ignored under certain conditions to prevent the difference declaration list from being displayed more than once if the declaration list has been changed and the instance DBs have been properly trailed. The differences are ignored under following circumstances:
- the two data blocks instance DBs and the numbers of the assigned function blocks are identical and
- both function blocks are present and the respective declaration lists of FB/DB are identical.
Initial values when connecting blocks in CFCs
When a block is connected in a CFC, the initial values are ignored during comparison if they have the attribute S7_server with the value alarm_archive. This is because the initial value is managed by the SIMATIC S7 Manager. Meaning, that copying the CFC, when assigning the message number, will usually result in a different number than in the source block. This would in turn mistakenly lead to the detection of differences between the blocks if the initial values are taken into account.
Changes in Step 7 HW config
The hardware configurations made in Step 7 HW config must be accepted using the save and compile command before they can be recognized during versioning.
Why is it not possible to create a new version although the SIMATIC S7 program has already been compiled several times?
For SIMATIC S7 programs that are compiled without changes, only the timestamp of the last compilation is changed. When using the default setting of the S7 comparator, this difference is detected during job execution (backup comparison) but not when creating a new version or comparing two versions (version comparison).
If you still want to create a new version, you can either create a version without difference or adjust comparator configuration. Proceed as follows:
Version without difference
- Go to the UserClientand click on the extras tab.
- In the project tree, select the S7component that you want to create a version of.
- Then click on the tab Extras**> Special functions >**Version without difference.
Adjust comparator configuration
- Start the AdminClientand open the module component type editor.
- In the Component type library, select the element Siemens -> SPS -> Simatic S7.
- Add the following entries to the table Compare these files.
- Specification
- Comparator
- Subdirectory
- Gs7prot.out
- Binary
- Include
- *.log
- Binary
- Include
- Save the changes.