instance of bus object and data dictionary

3 ビュー (過去 30 日間)
Eugene
Eugene 2018 年 5 月 1 日
編集済み: Eugene 2018 年 5 月 3 日
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 件のコメント
Eugene
Eugene 2018 年 5 月 3 日
編集済み: Eugene 2018 年 5 月 3 日
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.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeManage Design Data についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by