| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Real-Time Workshop |
| Contents | Index |
| Learn more about Real-Time Workshop |
This section describes how to avoid and resolve certain conflicts that can arise when using parameter and signal objects.
As explained in Simulink Data Object Considerations and Using the Model Parameter Configuration Dialog Box, two methods are available for controlling the tunability of parameters. You can
Define them as Simulink.Parameter objects in the MATLAB workspace
Use the Model Parameter Configuration dialog box
The next figures show how you can use each of these methods to control the tunability of parameter Kp. The first figure shows Kp defined as Simulink.Parameter in the Model Explorer. You control the tunability of Kp by specifying the parameter's storage class.
Parameter Object Kp with Auto Storage Class in Model Explorer

The next figure shows how you can use the Model Parameter Configuration dialog box to specify a storage class for numeric variables in the MATLAB workspace.
Parameter Kp Defined with SimulinkGlobal Storage Class

Note The MathWorks™ recommends that you not use both methods for controlling the tunability of a given parameter. If you use both methods and the storage class settings for the parameter do not match, an error results. |
If a signal is defined in the Signal Properties dialog box and a signal object of the same name is defined by using the command line or in the Model Explorer, the potential exists for ambiguity when the Simulink engine attempts to resolve the symbol representing the signal name. One way to resolve the ambiguity is to specify that a signal must resolve to a Simulink data object. To do this, select the Signal name must resolve to Simulink signal object option in the Signal Properties dialog box. When you do this, you no longer can specify the Storage class property in the Real-Time Workshop pane of the Signal Properties dialog box, as the next figure shows.

As the preceding figure shows, the Storage class menu is disabled because it is up to the SinSig Simulink.Signal object to specify its own storage class.
The signal and signal objects SinSig both have SimulinkGlobal storage class. Therefore, no conflict arises, and SinSig resolves to the signal object SinSig.
Note The rules for compatibility between block states/signal objects are identical to those given for signals/signal objects. |
![]() | Using Signal Objects to Initialize Signals and Discrete States | Customizing Code for Parameter and Signal Objects | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |