Using Simulink Previous page   Next Page

Tunable Parameters

Many block parameters are tunable. A tunable parameter is a parameter whose value can be changed without recompiling the model (see Model Compilation for more information on compiling a Simulink model). For example, the gain parameter of the Gain block is tunable. You can alter the block's gain while a simulation is running. If a parameter is not tunable and the simulation is running, Simulink disables the dialog box control that sets the parameter.

It should be pointed out that parameter changes do not immediately occur, but are queued up and then applied at the start of the next time step during model execution. Returning to our example of the constant block, the function it defines is signal(t) = ConstantValue for all time. If we were to allow the constant value to be changed immediately, then the solution at the point in time at which the change occurred would be invalid. Thus we must queue the change for processing at the next time step.

You can use the Inline parameters option on the Optimization pane of the Model Parameter Configuration Dialog Box to specify that all parameters in your model are nontunable except for those that you specify. This can speed up execution of large models and enable generation of faster code from your model. See Model Parameter Configuration Dialog Box for more information.


Previous page  Block Parameters Block Sample Times Next page

© 1994-2005 The MathWorks, Inc.