MATLAB: How to control the length of the S-function file names generated by Real-Time Workshop when using the S-function target

%sfunctionlengthnamesimulink codertargettruncated

I use the S-function target to generate S-functions from my Simulink subsystems. Some of these subsystems have long names that are truncated in the generated files. I would like to control the length of the file names so that they are not truncated.

Best Answer

As of Real-Time Workshop 6.2 (R14SP2), the length of the name generated for an S-function depends on the value of the "Maximum identifier length" option on the Real-Time Workshop -> Symbols pane of the Configuration Parameters dialog box.
The ability to control the length of the name for a generated S-function is not available in Real-Time Workshop 6.1 (R14SP1) and earlier versions. The name length limit is hard-coded to the first 16 characters of the subsystem name. This limit cannot be changed.
Related Question