필터 지우기
필터 지우기

Accessing specific bus elements

조회 수: 2 (최근 30일)
Vit Valek
Vit Valek 2020년 9월 15일
답변: Vit Valek 2020년 9월 15일
Hello,
I create bus (PS_controller) with 2 elements. After that I insert Data Store Memory block into model. I create new data (Create and Resolve...) with PS_controller data type. When I use Data Store Read to read specific element, this error occurs:
Accessing dis-contiguous memory regions is supported only at non-bus nodes. This was specified for the region of memory 'MyData.Kp' associated with the block 'DataStoreMemory_bus/Data Store Read'
I attached model and file for my bus. Thanks for any advice, which solve my issue.
Vit V.

채택된 답변

Vit Valek
Vit Valek 2020년 9월 15일
I have solved it. Error occurs due to wrong initialization MyData. I have found 2 solutions:
1) In the initial value use struct('Kp',1,'Ki',2) instead of [1 2].
2) Use Initialize Function block. In this block use Data Store Write for specific element assignments.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Deployment, Integration, and Supported Hardware에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by