0
votes

Good day all, I am currently having trouble with my Simulink model. There are 2 subsystems A and B. I would like to make subsystem A run first then using the data produced, run subsystem B. Is there a function of Simulink block i could use to execute this?

I have tried using trigger and enable with a step input of 10sec before subsystem B but it didn't work. I have tried a store memory but it didn't work too. A Variant subsystem is considered but as the input to both subsystems A and B are different, i assume it would not work as well.

I would appreciate the help and support i can get from you guys! Thank you very much!

1
I think we need more information here, some simple examples of your subsystems. Because usually you just put them one by one and then B uses A's results. So I assume your problem is that you need some data arrays, which created for some time period and then route it to sub B. It's a bit harder but it can be done with enabled subsystems. We need more information to answer.Mikhail_Sam
If subsystem A feeds into subsystem B then Simulink will automatically (and by definition) order the execution such that A executes before B. That will happen at every time step. Are you asking for A to run for a certain amount of time and then for B to execute? And when you say "it didn't work", be more explicit about what didn't work. What happened, and what was wrong with what happened.Phil Goddard
Thanks for the reply. I have attached my Simulink model in the link below. Hopefully it will be clearer. Basically I need my PV configuration to run first. Then i will use my subsystem B to scan through the V-P graph of the PV. Thanks again! dropbox.com/sh/asononvm9hgnlig/AABrIsRZRfH2OCMBLMDx9Af1a?dl=0nauyishok
Hi Phil, basically i need subsystem A to run completely then run Subsystem B. When i tried it with a trigger operator with a step input to control the trigger, this error surfaced. "Simulink does not have enough information to determine output sizes for this block. If you think the errors below are inaccurate, try specifying types for the block inputs and/or sizes for the block outputs."nauyishok
Why aren't they 2 different models? It's still not clear whether a) P,V and I should be input to Subsystem B at each time step, b) they should be buffered and input to subsystem B at given/triggered time steps, or c)you should have 2 models, getting the results of P, V and I first, then running model B.Phil Goddard

1 Answers

-1
votes

What you might need is to understand how to assign priorities to certain blocks in Simulink, also known as changing the sorted order in your model. You can do this either programmatically or interactively. Check this page from the documentation for more detailed information.