Unknown warning in Model Advisor

3 visualizaciones (últimos 30 días)
John Fiaschetti
John Fiaschetti el 21 de Feb. de 2022
Respondida: Sanchari el 5 de En. de 2024
Hi,
I receive the following error when running the Code Inspector compatibility checks in Model Advisor:
One or more output signals of the following blocks do not have their custom storage class Type set to 'Unstructured', or do not have their Data initialization set to 'None', or specify a signal object with a non-empty InitialValue.
I have not seen a storage class that is "Unstructured". I am specifying the data types of the operations in the block it flags, and when I run Code Inspector, it cannot process these blocks.
What does this mean?

Respuestas (1)

Sanchari
Sanchari el 5 de En. de 2024
Hello John,
I understand that you encounter an error when you run Code Inspector Compatibility checks. The error you are facing is indicating that there are blocks in your Simulink model that has issues with the configuration of custom storage classes or data initialization settings.
Here's a breakdown of the message:
  1. Custom Storage Class Type 'Unstructured': A custom storage class specifies the type of data that should be stored in the generated code. However, "Unstructured" is not a standard storage class name in Simulink. It's possible that the message is referring to a custom storage class that has been explicitly defined, or it might be a misinterpretation of the requirements.
  2. Data Initialization 'None': This suggests that the data initialization setting should be set to 'None’ for certain blocks, meaning that the generated code will not include explicit initialization for the corresponding variables.
  3. Signal Object with a Non-Empty ‘InitialValue’: This indicates that there may be signal objects associated with the blocks that have an initial value set, which might not be compatible with the Code Inspector.
To address this error, here are some steps you can take:
  1. Review Custom Storage Classes: If you're using custom storage classes, ensure they are defined correctly. Otherwise, you may need to set the storage class to a standard option like 'Auto' or 'ExportedGlobal', depending on the need.
  2. Check Data Initialization Settings: For the blocks mentioned in the error, go to the Signal Attributes or Block Parameters dialog, and ensure that the data initialization is set to 'None'. This setting can be found under the 'Code Generation' section of the block parameters.
  3. Inspect Signal Objects: If you're using signal objects, check their properties and ensure that the ‘InitialValue’ property is either empty or set to a value that is compatible with your code generation settings.
  4. Upgrade MATLAB Version: Please consider upgrading to MATLAB version ‘R2023b Update 5’ as there were similar bugs fixed in this update.
You can also refer the following links for further information:
  1. Create Storage Classes by using the Custom Storage Class Designer: https://www.mathworks.com/help/ecoder/ug/design-custom-storage-classes-and-memory-sections.html?searchHighlight=custom%20storage%20class%20type&s_tid=srchtitle_support_results_2_custom%20storage%20class%20type
  2. Control Data Representation for a storage class: https://www.mathworks.com/help/ecoder/ug/define-advanced-custom-storage-classes-types.html?searchHighlight=custom%20storage%20class%20type&s_tid=srchtitle_support_results_1_custom%20storage%20class%20type
Hope this information is helpful to you!

Categorías

Más información sobre Model Compatibility en Help Center y File Exchange.

Productos


Versión

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by