Comparing projects

To modify the comparator settings for S7 projects, proceed as follows:

  1. Open the UserClient.
  2. In the Project tree, select a S7 component.
  3. In the Edit tab, click on Edit component configuration.
  4. Then click on Comparator configuration.
  5. The S7 program dialog will then open.
  6. Select the program you want then confirm by clicking on OK.
  7. The dialog Comparison configuration will open.

  8. Image: Comparison configuration

  9. Confirm your selected settings by clicking on OK.
  10. Then in the dialog Component configuration, click on Apply.

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.

  1. In the dialog Comparison configuration, check the option compare content. This is located in the section DB compare.
  2. 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

  1. In the Comparison configuration dialog, activate the option compare content. This is located in the DB compare section.

  2. The Variables section will now be activated.

  3. 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>.

  4. Example:

    DB3.STRUCT.Variable

    DB3.STRUCT.Variable.*

    DB3.*.Variable.*

  5. Use the radio buttons to select whether you want to exclude or include the variables values.

 

Consider additional program parts

  1. In the dialog Comparison configuration, select More options.
  2. In the lower part of the dialog, the area Included when comparing will be displayed.

  3. Image: Dialog Comparison configuration , area Included when comparing

  4. 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:

  1. Start the AdminClient.
  2. Click on INI files.
  3. The dialog Edit INI file will then open.
  4. Select the file Classes.ini.
    Path to the file: ..\<vdServerArchive>\VD$A\Configuration\Compare\Classes.ini)
  5. Select the section [SimaticS7]. If this section is not present, you will need to create one at the end of the file.
  6. Assign the value Y to the key 7169 .
  7. [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:

 

Comparing with the LibraryManagement add-on

In the LibraryManagement, the following comparisons can be carried out:

 

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:

 

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

  1. Go to the UserClient and click on the extras tab.
  2. In the project tree, select the S7 component that you want to create a version of.
  3. Then click on the tab Extras > Special functions > Version without difference.

Adjust comparator configuration

  1. Start the AdminClient and open the module component type editor.
  2. In the Component type library, select the element Siemens -> SPS -> Simatic S7.
  3. Add the following entries to the table Compare these files.
  4. Specification Comparator Subdirectory

    Gs7prot.out

    Binary

    Include

    *.log

    Binary

    Include

  5. Save the changes.

 

To FAQ list

 

Related topics
S7 multiprojects
LibraryManagement
AdminClient -> INI files