Using Simulink Signals as Simulink Block Parameters

3 ビュー (過去 30 日間)
Kyle Smith
Kyle Smith 2022 年 10 月 5 日
回答済み: Mark McBroom 2022 年 10 月 15 日
Hello: I am wondering how, or if it is possible, to use a simulink signal as a block parameter that doesn't have an input? In my case I have a tapped delay block, which only has one inport, the value(s) being delayed. Another block parameter is "number of delays", but this does not have an inport, it needs to be a value or variable of some sort.
I can't create a variable in Matlab, store it to the workspace, and use that in the tapped delay block. The value that I want the "number of delays" to be set to, is calculated in another part of the model. I tried to save a signal to the model workspace by logging the data but evidently it doesn't get saved there, it just appears in the data inspector tool.
Can this be done? I've seen some things on the MathWorks webpage about calling variables from other functions and using objects like Simulink.Signal or Simulink.ModelWorkspace. It seems there is a simple answer to this, or it is just not doable.
Some help would be appreciated! I am stuck.

採用された回答

Mark McBroom
Mark McBroom 2022 年 10 月 15 日
I do not think this is possible. You may need to build your own verision of a tapped delay block that has as an input the number of delays.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeProgrammatic Model Editing についてさらに検索

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by