Specify Custom Names for Generated Files
The Simulink® PLC Coder™ software generates Structured Text code and stores it according to the target IDE platform. These platform-specific paths are default locations for the generated code. For more information, see Files Generated by Simulink PLC Coder.
To specify a different name for the generated files, set the Function name options parameter in the Subsystem block:
Right-click the Subsystem block for which you want to generate code and select
Subsystem Parameters
.In the Main tab, select the Treat as atomic unit check box.
Click the Code Generation tab.
From the Function Packaging parameter list, select
Reusable Function
.These options enable the Function name options and File name options parameters.
Select the option that you want to use for generating the file name.
Function name options Generated File Name Auto
Default. Uses the model name, as listed in Prepare Model for Structured Text Generation, for example, plcdemo_simple_subsystem
.Use subsystem name
Uses the subsystem name, for example, SimpleSubsystem
.User specified
Uses the custom name that you specify in the Function name parameter, for example, SimpleSubsystem
.