How to import a Siemens Step7 configuration

The Smart Generator for Step7 allows you to import data from a Step7 project to generate the following PcVue configuration elements:

  • Data acquisition network, devices, and frames for the S7 Ip Industrial Ethernet driver.
  • I/O variables including mapping onto frames.

Prerequisites

  • You have installed the Step7 software on the same PC as PcVue. The Smart Generator is designed for pre-TIA Portal versions of Step7 and uses Step7's command interface and library (version 5.3 of Step7 Professional).

The Smart Generator for Siemens Step7 helps you automate configuration for communicating with Siemens S7-200, S7-300 and S7-400 PLCs using the S7 Ip Industrial Ethernet driver. See Siemens S7 Ip Industrial Ethernet for more information about the driver.

If you are using Siemens TIA Portal, check the Smart Generator for TIA Portal.

Refer to the overview topic Smart Generators overview to learn more.

Supported data types

Step7 data type PcVuevariable type Min value Max value
BOOL

Bit

   
BYTE

Register

0 255
WORD

Register

0 65,535
DWORD

Register

0 4,294,967,295
INT

Register

-32,768 32,767
DINT

Register

-2,147,483,648 2,147,483,647
REAL

Register

-3.402822E+38 3.402822E+38
CHAR

Text

   
STRING

Text

   

Selecting the source data

Before you start the import process, we recommend that you back up the PcVue variables configuration in case of any problems occurring during the import process. The variable configuration is stored in the file VAREXP.DAT in the project's C folder.

Make sure that PcVue is shut down before copying the file.

  1. Go to Configure then Smart Generators and click New STEP7 import. The Smart Generator STEP7 dialog opens with the Import name field specified. You can change this name.

  2. Select the project to import from the Step7 project drop-down. To only list the projects containing data blocks, select the option Display only programs containing blocks. ClosedShow picture

  3. Click the Advanced/Options button, then select a server list and a client list in the Networking list tab to define the behavior of PcVue variables for a multi-station project.

    The lists of servers and clients must already have been created in PcVue and the station from which you run the smart generator must be in the servers list.

  4. Select the Options tab, here you can configure the variables to be imported and communication frames via the following properties:

    • Command variables - If selected, it sets the command property for all variables imported. You can also specify the command level.

    • Data block variables branch - If selected, it generates a branch for each variable imported from a data block. The branch can contain the data block (DB) name, the program name and DB name, or the project name, program name and DB name.

    • Use DB symbolic name - If selected, it generates variables according to data block name (unselected) or data block symbolic name (selected).

    • Memory bit variables branch - If selected, it generates a branch for each variable imported from memory. The branch can contain either the program name or the project name and program name.

    • Add a leaf variable - If selected, it enables you to add a leaf variable when importing an array. For example if you choose a leaf called VALUE, VALVE_MOTOR[1] will be imported as VALVE.MOTOR.1.VALUE.

    • Communication frame size - If specified, it enables you to set the size, in bytes, of communication frames generated in PcVue.

Selecting blocks and configuring the equipment

After you have selected the source data and configured the networking lists and options of the import via the Select project dialog, the next step is to select blocks and configure the communication.

  1. Click Next, the Select blocks dialog opens, expand the blocks node and select the data blocks to be imported. Only data blocks of type instance, user type, or shared can be imported. You can also import memory variables by selecting the Memory variables node.

    For details of the selected program, click on the Information button next to Program field.

  2. Click Next, the Target equipment dialog opens, select a network and equipment device in the Equipment section. If there is no S7 Ip Industrial Ethernet network or device configured in the PcVue project, you are prompted to create one. The Properties section is populated with the selected device's configuration. You can modify the configuration of these properties if needed.

    An import deals with one device (PLC). If there is more than one, you must run a separate import for each device.

  3. Click Next, the Check mapping dialog opens, select a data block to display its tags and their addresses. To change an address, select the tag then click the Change Address button and enter the required address. ClosedShow picture

    Some blocks may be protected or locked. If such a block is used in a data block, the smart generator will be unable to extract the corresponding variables and their addresses. You can check and change the mapping for all data blocks to be imported.

Defining branches and selecting variables

After you have selected the source data and configured the networking lists and options of the import via the Select project dialog, the next step is to define the branches and select the variables you want to generate.

  1. Click Next, the variable import process is initialized and the Select import type dialog opens. Select the type of import you need:

    • Custom import if you want to access the Select variables dialog in which you can filter and manually select the list of variables to import.
    • Full import if you want to generate variables for all source data.
  2. (Custom import option) Adjust the filters to find the variables to import. The Name field allows to filter the list of variables according to the name in the source data. You can use wildcards, the asterisk (matches any number of characters) and the question mark (matches a single character).

    For example:
    'Pump1' would only match a source data named 'Pump1'.
    'Pump?' would match 'Pump1' or 'Pump2' etc. but not 'Pump10'.
    'Pump*' would match 'Pump1', 'Pump2' and 'Pump10' but also 'Pumpkin'.

    The variables that match the filter appear in the Available Items pane.

  3. (Custom import option) Select the variables filtered in the Available items pane for import and click the right-arrow -> button. The variables in the Selected items pane are to be imported and generated.

  4. ClosedShow picture

  5. Click Next, the Branch Management dialog opens. This step allows you to control how branches and variable names are derived from source data names so that the generated variables fit in the branching and naming logic of your project. First, you can enter a global branch if you want to prefix the name of all generated variables with a particular branch segment. You can also select branch separator options to control how source data names will be split into branch segments:

    • Use numeric characters as branch separator - If selected, a branch separator will be added after each numeric character. For example, a source data named MOT1DEFAULT1 will generate a variable named MOT1.DEFAULT1.

    • Use specific sequence character as branch separator - If selected, the sequence of characters you select will be replaced by a branch separator. For example, if you select the underscore ('_') as sequence character, a source data named CONTROLROOM_COMMAND will generate a variable named CONTROLROOM.COMMAND.

    A branch separator is not added when a numeric character is at the end of the name.

Renaming and generating variables

After you have defined the branch and selected variables to generate via the Select variables dialog, the next step offers the possibility to edit the variables you have selected and prepare them for generation.

If a variable is displayed in red, it means that it is invalid for use in PcVue and will not be generated. Use the Rename variables dialog to ensure variable name compliance:

  • The max length of a variable name is 255 characters.
  • The max number of branch elements in a variable name is 12.
  • The name of a branch element or the name of the leaf element cannot be empty (length =0) or exceed 255 characters.
  • The name of a variable can only include letters, digits, or the underscore.
  • Variable names shall be unique. Two variables cannot have the same name.
  1. Click Next. The Generate variables dialog opens, listing all variables selected for generation. To rename variables, either select variables and click Rename selected, or use the Rename invalid button. The Rename variables dialog displays variables in a grid and offers several actions.

  2. The Rename variables dialog is designed to make it easy to give a final polish to variable names and fix invalid ones, and also to bulk modify variable properties, to set the Command level or Alarm property for example.

    The following operations are available:

    • To modify a single variable, double click it, or select it and click Properties. You can edit its name in the General tab. Click OK to validate.
    • You can edit the variable properties in the Details tab. These properties can be its type, domain, nature etc.

    • To add a leaf to one or more variables (to add a .Cmd or .AlarmTmpHigh for example), select them, then click Suffix and enter the suffix to be added. Click OK to validate.
    • To replace characters in the name of one or more variables, select them, then click Replace to open the Replace dialog. Enter the strings to search and replace, then click OK.
    • To replace branch segments, select the variables, then select the branch segments to be replaced by clicking on the column header and click Replace to open the Replace dialog. Enter the strings to search and replace, then click OK.
    • To delete a branch segment, select the variables, then the branch segments to be removed by clicking on the column header and click Delete. The selected branch segments are then removed from the selected variables.
    • To merge branches, select the variables, then the branch segments to be merged by clicking on the column header and click Merge. The selected branch segments are then deleted for the selected variables. You can only merge consecutive branch segments.

    You can use Shift+click to select a group of adjacent variables and branches or Ctrl+click to select several individual variables.

    Once you are done editing the variables click OK to close the dialog.

  3. Click Finish and Yes in the Generation dialog to start the generation of variables in PcVue. A dialog is displayed indicating the progress. Any variables in the smart generator that already exist in PcVue are discarded. The corresponding variables in PcVue are not overwritten or updated in any way.

    Any variables appearing in red are invalid and will not be generated when clicking Finish.

Synchronizing an existing import

When you synchronize an import, the smart generator compares the configuration elements available in the import file with those that have been imported previously to PcVue.

The synchronizing process takes into account any filter that you may have used previously with the import. For example if there are 400 variables in the import file and the previous use of the import was with a filter and created 100 variables in PcVue, synchronization will inform you that there are 300 new variables available for import.

  1. Select the import to synchronize in the right pane of the Smart Generators dialog. A list with actions appears under the Import references pane. ClosedShow picture

  2. Click Synchronize. This will open the smart generator dialog in which you can reconfigure the import. If variables have been added to the import file since the last import, the smart generator will display the Import new variables dialog, inviting you to make either a full or a custom import of the remaining variables.

    • If you select full import, all variables not already in PcVue are imported.

    • If you select custom import, you can filter the variables using the Select variables dialog.

If the smart generator finds variables in PcVue that no longer exist in the import file, a list of the variables is displayed. Using this list, you can choose to remove some or all of the variables from PcVue.

You can choose to only remove imported configuration elements of a smart generator without removing the smart generator import itself. This can be done by right-clicking the import generated and selecting Remove all imported objects.