Starting with Simulink 5.1 (R13SP1), when a tunable parameter is defined as a double data type in the workspace, Simulink treats this variable as an "undefined" data type variable. Thus, during an update or at the start of the Simulation, Simulink tries to find the data type definition in the model. The error message is a result of Simulink finding more than one conflicting data type declarations for the same parameter. This behavior is mentioned in the following Simulink 5.1 (R13SP1) release notes (execute the WEB command in MATLAB):
web([docroot '/toolbox/simulink/rn/bqmg7gg-1_1.html#bqmiupg-8'])
For the attached model, note that the Gain block defines the same parameter "u" to be a "uint32" data type variable. To see this, right click on the Gain block and select Gain Parameters -> Parameter Attributes. Thus, any of the following options should resolve the issue:
1. Modify / Remove the inconsistent data type definitions. In this example, either change the Output data type of the Constant block to "uint32" or the data type of the parameter in the Gain block to "double"
2. Declare the variable in the workspace as a non-double data type variable. MATLAB allows the creation of variables without declaring its data type. Although these variables are actually defined as double data types, it can also be interpreted as "undefined" data type variables. This is the same concept that Simulink tries to apply. Thus, in the example, declaring the variable "u" as a "uint32" data type variable also resolves the issue.
3. DO NOT specify "u" as a tunable parameter when the "Inline Parameters" option is enabled. This also resolves the issue since Simulink simply copies the value of the variable in the workspace and no longer treats it as an "undefined" data type variable.
Best Answer