Reason for Simulink.BusElement objects no longer supporting the SampleTime property

2 ビュー (過去 30 日間)
Dear Users,
I would like to raise a question on the following update starting from 2020b. regarding the Simulink.BusElement objects no longer support the SampleTime property:
"Simulink.BusElement objects no longer support the SampleTime property
The SampleTime property of Simulink.BusElement objects is no longer supported.
BusElement objects that specify a sample time cause an error during compile. To remove the sample time specification from a BusElement object, set its SampleTime to -1."
I am wondering why this has been established, since this modification makes serious incompatibility issues with respect to codes developed with earlier versions. I would like to grasp the rationale for this decision to understand whether this change helps solving hidden issues occurring before.
Thank you very much,
Stefano
  2 件のコメント
Andrea Colagrossi
Andrea Colagrossi 2023 年 1 月 20 日
I have the same doubt as the one made by Stefano. Defining the SampleTime in Bus Objects is common practice for space code production according to SAVOIR standards for automatic code generation.
Michele Bechini
Michele Bechini 2023 年 1 月 20 日
I struggled with the very same issue without finding a straightforward solution! I updated to 2021b, and now my code (that was compliant with SAVOIR standards) is completely broken... Is there a reason for this change in the SampleTime philosophy?

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

採用された回答

Amal Raj
Amal Raj 2023 年 3 月 15 日
The decision to remove Simulink's SampleTime property. BusElement objects were made to make it easier to handle sample times in bus signals. The use of sample times in bus signals can be complicated and error-prone, particularly when dealing with heterogeneous signals with varying sample times. By enforcing a consistent sample time across all elements of a bus signal, the removal of SampleTime from BusElement objects simplifies the handling of sample times in bus signals.
The change was also made to align the behavior of Simulink.BusElement objects with Simulink.Signal objects, which also do not support the SampleTime property. This makes the handling of sample times more consistent across different types of signals in Simulink.
Although this change may cause incompatibility issues with codes developed in earlier versions, it is necessary to ensure consistency and simplify the handling of sample times in bus signals. Users can modify their codes to remove the SampleTime property from BusElement objects to ensure compatibility with the updated version.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGeneral Applications についてさらに検索

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by