Parameter Tuning with C

Tunable block and global parameter updating, parameter sweeps, extreme value tests

Query and modify tunable block and global parameters from your C program in your real-time application as it is running. Perform parameter sweeps and extreme value tests. See Tunable Block Parameters and Tunable Global Parameters.

C/C++ API

xPCGetNumParamsReturn number of tunable parameters
xPCGetParamDimsGet row and column dimensions of parameter
xPCGetParamIdxReturn parameter index
xPCGetParamNameGet name of parameter
xPCSetParamChange value of parameter
xPCGetParamGet parameter value and copy it to array
xPCLoadParamSetRestore parameter values
xPCSaveParamSetSave parameter values of real-time application

Topics

Parameter Tuning

Tunable Block Parameters and Tunable Global Parameters

Changing tunable block parameters and tunable global parameters during real-time execution.

C Interface

Simulink Real-Time C API

Complying with the coding requirements of the Simulink® Real-Time™ C API library.

Using the C API

Complying with the requirements for using the Simulink Real-Time C API.

C API Error Messages

Interpreting error codes produced by the C API.

Limitations

Troubleshoot Parameters Not Accessible by Name

Investigate issues that prevent you from observing or tuning some parameters in the real-time application.

Troubleshoot Instance-Specific Parameters Not Saved

Investigate issues that prevent saving instance-specific parameters and parameters with custom storage classes to a MAT file.

Troubleshoot Instrument Label Not Present

Investigate issues that produce error 'The given key was not present in the dictionary' for instrument labels.

Internationalization Issues

Learn about Simulink Real-Time support for internationalization.