Main Content

List of Files Generated for Model Reference Hierarchies

Since R2025a

When you generate IEC 61131-3 Structured Text code for a model reference hierarchy, Simulink® PLC Coder™ creates a plcsrc subfolder in your current working directory that contains the generated code for the top model. In addition, Simulink PLC Coder creates a slprj > plc > Release Name > model name subfolder in your current working folder, and places the generated Structured Text code for the referenced models in these folders. If your top model contains multiple referenced models, there are multiple folders under slprj > plc > Release Name > with each folder named after the referenced model name.

Generated Files for the Top Model

In a model reference hierarchy, Simulink PLC Coder generates these Structured Text files for the top model:

  • top_model_name.* — IEC61131-3 Structured Text code for the top model top subsystem

  • top_model_name_symbols.* — Symbol file that contains the global symbol definition for both the top and referenced models. To use the generated code, you must import the generated code files and the symbol file into your target IDE.

This table lists the file extensions by integrated development environment (IDE) for the files generated for the top model:

IDE NameGenerated File Names

CODESYS 2.3

  • top_model_name.exp

  • top_model_name_symbols.exp

CODESYS 3.5

  • top model name.xml

  • top_model_name_symbols.xml

Rockwell Automation® Studio 5000 IDE: Routine

  • top_model_name.L5X

  • top_model_name_symbols.L5X

Siemens® TIA Portal IDE

  • top_model_name.scl

  • top_model_name_symbols.scl

Siemens TIA Portal Double IDE

  • top_model_name

  • top_model_name_symbols.scl

KW-Software MULTIPROG® 5.0

  • top_model_name.xml

  • top_model_name_symbols.xml

Phoenix Contact® PC WORX™ 6.0

  • top_model_name.xml

  • top_model_name_symbols.xml

Generic

  • top model name.st.st

  • top_model_name_symbols.st

Generated Files for the Referenced Models

In a model reference hierarchy, Simulink PLC Coder generates these Structured Text files for the referenced models:

  • reference_model_name.*— IEC 61131-3 Structured Text code for the referenced model subsystem

This table lists the file extensions by IDE for the files generated for the referenced models:

IDE NameGenerated File Names

CODESYS 2.3

referenced_model_name.exp

CODESYS 3.5

referenced_model_name.xml

Rockwell Automation Studio 5000 IDE: Routine

referenced_model_name.L5X

Siemens TIA Portal IDE

referenced_model_name.scl

Siemens TIA Portal Double IDE

referenced_model_name.scl

KW-Software MULTIPROG 5.0

referenced_model_name.xml

Phoenix Contact PC WORX 6.0

referenced_model_name.xml

Generic

referenced_model_name.st

If there are multiple referenced models, Simulink PLC Coder generates a Structured Text code file for each referenced model.

See Also

Topics