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 Edit tab, 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.
- Confirm your selected settings by clicking on OK.
- Then in the dialog Component configuration, click on Apply.
Image: Comparison configuration
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>.
- Use the radio buttons to select whether you want to exclude or include the variables values.
Example:
DB3.STRUCT.Variable DB3.STRUCT.Variable.* DB3.*.Variable.* |
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.
- Here you can use the checkboxes to select program parts you want to include or exclude from the comparison.
Image: Dialog Comparison configuration , area Included when comparing
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: ..\<vdServerArchive>\VD$A\Configuration\Compare\Classes.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 |
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
Adjust comparator configuration
|
Related topics |
---|
S7 multiprojects |
LibraryManagement |
AdminClient -> INI files |