Receive Inputs into Simulink

16 ビュー (過去 30 日間)
Mitch Lautigar
Mitch Lautigar 2021 年 1 月 28 日
コメント済み: Anuj 2025 年 3 月 10 日
Hello all,
I have been tasked with finding a way to build my programming/simulink model in such a way that someone who doesn't know much about the project can run my model and test it. I've got two ideas in mind, but i'm not sure how to go about doing it.
  1. I'd like to have a matlab parameter set function in which the user can specify inputs. There would be math in this script as well, but the end goal is to use this function to create an organized parameter set to move values back and forth from the workspace.
  2. I'd like to have the user have a numerical input (basically just a block that is easy to click and edit) for each individual needed input on the simulink model. I am aware MATLAB can programatically transfer the numbers, but for this project I can't rely on that.
I welcome other suggestions, but I truly am just trying to have a very organized and pretty simulink model that can have all the values set in the model and transpose back and forth between the workspace. Please note the following conditions before replying.
  1. This is a government research project, meaning I cannot share the actual code. However, I could share example mockups of what i'm trying to do if needed.
  2. While I'd logically assume I'd be writing instructions on a separate document for someone to use, I have to assume that this program has to be simple enough to be used by a technician who's never used my program before (meaning I can assume they have some knowledge of programming, but don't know the in's and out's of my programming which I would prefer they didn't know anyways.)

回答 (1 件)

Monika Jaskolka
Monika Jaskolka 2021 年 1 月 28 日
編集済み: Monika Jaskolka 2021 年 1 月 28 日
Have you taken a look at FromWorkspace and ToWorkspace blocks? If you have the user create all the data in the Matlab workspace (or have a script that will create the data in the workspace), you just have to add in a FromWorkspace block with the same name into the Simulink model in order to be able to read the data into the model.
  5 件のコメント
Mitch Lautigar
Mitch Lautigar 2021 年 3 月 19 日
@Monika Jaskolka and @Pat Gipper Both your solutions are viable solutions and I appreciate your input. I ended up creating a mini-gui on my simulink file that allowed input as needed.
Anuj
Anuj 2025 年 3 月 10 日
Hey, how did you make the GUI? Did you use the in built app designer that Matlab offers? If so, how did you link the Simulink file with that?
Thanks

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

カテゴリ

Help Center および File ExchangeSignal Import and Export についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by