Change model parameters at runtime
Can I change model parameters during runtime in TwinCAT?
Yes, please note the following settings:
- Optimization > Default parameter behavior: Tunable
If the parameter is set in this way, model parameters can be set at runtime. See also Parameterization of a module instance. - Interface > Code interface packaging
You have the options "Nonreusable function", "Reusable function" and "C++ Class" here. The settings affect whether you can instantiate multiple instances of a TcCOM in TwinCAT and whether you can then also set their model parameters individually or dependent on each other. See also Parameterization of several module instances.