Can the IC (Initial condition) block in Simulink take a Simulink.Bus object as a parameter from the base workspace?

2 ビュー (過去 30 日間)
Hello folks,
I hope you are doing well!
I have been trying to use the IC (initial condtion) block to initialise an input in my Simulink model as I am looping an output to a input via a unit delay block (to prevent an alegbraic loop error), but I am having issues with this as I keep getting an error: Invalid setting in 'Nameofmodel/IC' for parameter 'Value'.
I am trying to feed the IC block a Simulink.Bus object that I have created using the Simulink.Bus.createObject() (struct to bus) in the MATLAB workspace. I have read the IC block documentation and the block characteristics have 'bus' as a data type so I wanted to confirm with someone in the Mathworks community whether if you can successfully use a bus objects as a parameter for an IC block in Simulink?
Thank you for taking the time to read my question and I would appreciate any help with resolving my issue.

採用された回答

Paras Gupta
Paras Gupta 2024 年 5 月 15 日
編集済み: Paras Gupta 2024 年 5 月 15 日
Hey Sungwoo,
I understand that you receive an error when setting a 'Simulink.Bus' object as an 'Inital Value' parameter in the IC block.
The block characteristics which have the data type 'bus' listed indicate the data type of the input/output signal of the block. The input 'Port_1' and output 'Port_1' of the IC block support the 'bus' data type as per documentation.
However, the 'Initial Value' parameter does not support a 'Simulink.Bus' object. Please refer to the description of 'Initial Value' under the 'Parameters' section in the following link.
Hope this answers your query.
  1 件のコメント
Sungwoo David
Sungwoo David 2024 年 5 月 15 日
Thank you for taking the time to answer my question Paras Gupta!
Very well articulated.

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

その他の回答 (0 件)

カテゴリ

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

製品


リリース

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by