필터 지우기
필터 지우기

Bus Assignment creates new copy of variable in generated code ?

조회 수: 4 (최근 30일)
Shivaputra Narke
Shivaputra Narke 2019년 2월 7일
댓글: Shivaputra Narke 2019년 5월 15일
Hi,
I have created one bus using Bus Creator and the output has been written to 'My_Signal' (Simulink.Signal object). That signal is fed to another subsystem through port.
I am using Bus Assignment to update one field of bus. Generated code looks like this,
My_Signal.Field_1= 5;
My_Signal.Field_2= 6;
...
...
...
% Subsystem2
rtb_My_Signal=My_Signal;
rtb_My_Signal.Field_2=10;
...
..
I do not understand why Embedded coder is creating new parameter ? Is it possible to reduce the unneccasry bus copy ?
I want the generated code looks like below
My_Signal.Field_1= 5;
My_Signal.Field_2= 6;
...
...
...
% Subsystem 2
My_Signal.Field_2=10;
  댓글 수: 3
Helia Pouyllau
Helia Pouyllau 2019년 5월 10일
Hello, I am facing the same issue, do you have some documentation about how to use tlc files to avoid the copy ?
Shivaputra Narke
Shivaputra Narke 2019년 5월 15일
Have you tried using Data Store Read and Data Store Write blocks ?

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Simulink Coder에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by