Simulink bus object modification from Matlab script

조회 수: 2 (최근 30일)
Sourabh
Sourabh 2022년 8월 15일
댓글: Sourabh 2022년 8월 17일
I have a Simulink project with a subsystem. I am using Data store read and write so, the subsystem does not have inputs or outputs. For verifying the subsystem is functioning properly, I need to modify the values of the Simulink bus object which is in the data reads. For verifying functioanlity I often use a repeated sequence block or a matlab script but with data read block I haven't succeeded yet. The problem seems simply about accessing the objects. Has anyone succeeded in doing this before?
  댓글 수: 2
Benjamin Thompson
Benjamin Thompson 2022년 8월 15일
How is the Simulink bus object defined? In a data dictionary, or in the model workspace or MATLAB base workspace? Can you post some sample files?
Sourabh
Sourabh 2022년 8월 15일
Model workspace.
I am also curious to know how to access Simulink bus object in different situations such as data dictionary, model workspace,...

댓글을 달려면 로그인하십시오.

답변 (1개)

Benjamin Thompson
Benjamin Thompson 2022년 8월 15일
편집: Benjamin Thompson 2022년 8월 15일
This article explains some ways of modifying the model workspace. If you have more specific questions please ask them and post some sample files.
https://www.mathworks.com/help/simulink/ug/change-model-workspace-data.html?searchHighlight=programmatically%20edit%20model%20workspace&s_tid=srchtitle_programmatically%20edit%20model%20workspace_1

카테고리

Help CenterFile Exchange에서 Schedule Model Components에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by