instance of bus object and data dictionary

2 visualizaciones (últimos 30 días)
Eugene
Eugene el 1 de Mayo de 2018
Editada: Eugene el 3 de Mayo de 2018
I use model referencing and data dictionary. One of data dictionary are described bus objects. It's hard to use BusCreator in Simulink for creating and initialization the instance of bus object. Does the way create instance of bus object without BusCreator using data dictionary?
May be I can use MATLAB Function but I can't find functions for that.
I can try explainit from C++.
1. Describing of object buses in a data dictionary is similar with header file which describe structure of struct.
2. Creating and initialization.
I know only one variant to create the instance of bus object, it's using BusCreator.
I want to create the instance of bus object with MATLAB Function using information of bus object from data dictionary.
Also I can init elements of the instance of bus object by default with MATLAB Function.
When I use C++ I create the instance of struct also I can use the constructor to init the instance of struct by default values.
3. Using
Then I use Bus Assignment for changing elements of the instance of bus object.
  1 comentario
Eugene
Eugene el 3 de Mayo de 2018
Editada: Eugene el 3 de Mayo de 2018
I find the answer of my question. I use Constant.
Using Bus Objects as the Output Data Type
The Constant block supports nonvirtual buses as the output data type. Using a bus object as the output data type can help simplify your model. If you use a bus object as the output data type, set the Constant value to 0 or to a MATLAB® structure that matches the bus object.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

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

Community Treasure Hunt

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

Start Hunting!

Translated by