Parameterization in Simulink®

Using Embedded Coder® together with TwinCAT

Set the system target file to TwinCatErt.tlc.

Command Line Interface (CLI): TwinCAT.ModuleGenerator.Simulink.ModelExportConfig.ShowModelParam(modelName,'SystemTargetFile','TwinCatErt.tlc');

Or in the User Interface (UI) via the Configuration Parameters in the Simulink® model at
Code Generation > System target file.

Parameterization in Simulink® 1:

Sample in MATLAB®: SIMD instruction set extensions

In the „Simulink® Instruction Set Extensions“ sample, you will learn how to create a Simulink® model with the TwinCAT 3 Target for Embedded Coder, which uses SIMD instruction set extensions to accelerate model execution time.

Parameterization in Simulink® 2:
TwinCAT.ModuleGenerator.Samples.Start('Simulink Instruction Set Extensions')
Parameterization in Simulink® 3:

CPU of the target system must support instruction sets

Make sure that the target system on which you want to execute the generated object supports the set instruction set extension. When the object is loaded, the TwinCAT runtime checks the availability of the instruction sets and compares them with the instruction sets used in the object. If the CPU does not meet the requirements, the object is not loaded and a corresponding error message is issued in TwinCAT XAE.

The model can be built after parameterization via
Apps > Embedded Coder > Generate Code.