How do i store Data types of Input and Outputs of a block in Simulink in a data dictionary ?

3 visualizaciones (últimos 30 días)
I have created a Data Dictionary for a block model in Simulink ? I have an array where i have stored all the INouts and Outputs with the data types of each Input and Output.
I have used the addEntry(MyDictionaryObject ,Input_Output , DataTypes) , but this command gives me a data dictionary with the names( in one column i.e which is nothing but the 'Input_Output') and the value on the side as Data types .
I want to have the DataTypes in the Data types column in the data dictionary . IS there any command which i can use in script by which i put all the data types in the Dat types column in the dictionary.
Thank you in advance

Respuestas (1)

Rajanya
Rajanya el 12 de Feb. de 2025 a las 9:58
You can achieve the same if the entries are provided as Simulink parameters, like:
parameter = Simulink.Parameter;
parameter.DataType = entryDataType; % entryDataType stores the required dataType for 'entryName'
addEntry(dictDesignDataObj, entryName, parameter); % added as a parameter obj (for 'entryName')
The following Inputs and Outputs, when added to a dictionary like above, alligns their data types in the respective column -
To know more about Simulink parameters, you can refer to its documentation page by executing the following from MATLAB Command Window -
doc Simulink.Parameter
Hope this answers. Thanks!

Categorías

Más información sobre Manage Design Data en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by