필터 지우기
필터 지우기

instance of bus object and data dictionary

조회 수: 6 (최근 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 CenterFile Exchange에서 Manage Design Data에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by