Simulink: Source (from workspace) running order
2 views (last 30 days)
Show older comments
I need to have a From Workspace block running AFTER other blocks are evaluated in simulink. I use From WS to get ARMAX results.
How can I implement a sort of sequence of evaluations? As From WS block has no input, I cannot rely on wires to get the correct runnning order.
I'm used to LabVIEW environment and there I can place a sequence structure.
Thanks, Gabriele
0 Comments
Accepted Answer
More Answers (3)
Kaustubha Govind
on 5 Nov 2012
I'm confused about why you need a From Workspace block at all if you simply need the output of other Simulink blocks. If the signal you actually need is a MATLAB function of other Simulink signals, why not use an Interpreted MATLAB Function block, a MATLAB Function block or a MATLAB S-function block to directly call your MATLAB function within the flow of your Simulink model. Please refer to these blocks' corresponding rows on the Comparison of Custom Block Functionality page to choose the block that is correct for your application.
0 Comments
Gabriele Fantechi
on 5 Nov 2012
1 Comment
Kaustubha Govind
on 5 Nov 2012
Gabriele: I don't have experience with the ARMAX block, but should you really be using the output of this block continuously in a serial connection with other Simulink blocks? I'm guessing that the ARMAX block only writes to the workspace after the model finishes execution and not during execution. It seems to be that you should first finish running the ARMAX model and then use those results in a new simulation. You can do this using the SIM command to first simulate the ARMAX model, which writes to the workspace. You can perform MATLAB operations (like M.A) to extract the required information, and then, issue another SIM command to the second model which will use the From Workspace block to read the extracted information.
See Also
Categories
Find more on Sources in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!