Receive Inputs into Simulink
1 view (last 30 days)
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.
- 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.
- 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.
- 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.
- 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.)
Monika Jaskolka on 28 Jan 2021
Edited: Monika Jaskolka on 28 Jan 2021
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.