Contenido principal

Integrate Generated Code with Siemens IDE Project

You can integrate generated code with an existing Siemens® SIMATIC® STEP® 7 or Siemens TIA Portal project. For more information on:

Integrate Generated Code with Siemens SIMATIC STEP 7 Projects

  1. In the Siemens SIMATIC STEP 7 project, right-click the Sources node and select Insert New Object > External Source.

  2. Navigate to the folder containing the generated code and open the file.

    The custom file name unless assigned differently, is the model_name.scl. After you open the file, a new entry called model_name.scl appears under the Sources node.

  3. Double-click the new entry. The generated code is listed in the SCL editor window.

  4. In the SCL editor window, select Options > Customize.

  5. In the customize window, select Create block numbers automatically, and click OK.

    Symbol addresses are automatically generated for Subsystem blocks.

  6. In the SCL editor window, compile the model_name.scl file for the Subsystem block.

The new Function Block is now integrated and available for use with the existing Siemens SIMATIC STEP 7 project.

Integrate Generated Code with Siemens TIA Portal Projects

  1. In the Project tree pane, on the Devices tab, under the External source files node in your project, select Add new external file.

  2. Navigate to the folder containing the generated code and open the file.

    The custom file name unless assigned differently, is the model_name.scl. After you open the file, a new entry called model_name.scl appears under the External source files node.

  3. Right-click the new entry and select Generate blocks from source.

    The Siemens TIA Portal IDE compiles the new file and generates TIA Portal program blocks from the code. The program blocks appear under the Program blocks node. They are available for use with the existing Siemens TIA Portal project.