f



Parallel Processing in Simulink?

Hi All,

Does anyone know if Simulink supports parallel precessing / threading?
How can I run two models at the same time?

In particular, I have a model that waits for the response of an external device by means of an embedded MATLAB function. This causes the entire simulation process to stall just to wait for a response.
However, the model required to trigger that response is elsewhere in the model and therefore doesn't ever execute.. fail.

Is there a way of waiting for the response of that block WHILE continuing on with simulation?

Thanks!
0
anniecia (7)
6/4/2009 7:05:02 AM
comp.soft-sys.matlab 211266 articles. 23 followers. lunamoonmoon (257) is leader. Post Follow

5 Replies
416 Views

Similar Articles

[PageSpeed] 49

Hi Annie,

Are you trying to get two separate models to talk to each other? If so, there is no way to break up a Simulink model and run it separately.

If you want to model the communication behavior between two models, you may want to use model reference within a new model than will treat them as separate models. But they would need to be within one single model and would need to be part of every solver step. 

Hope this helps.

Saurabh





"Annie Chen" <anniecia@gmail.com> wrote in message <h07rmu$85t$1@fred.mathworks.com>...
> Hi All,
> 
> Does anyone know if Simulink supports parallel precessing / threading?
> How can I run two models at the same time?
> 
> In particular, I have a model that waits for the response of an external device by means of an embedded MATLAB function. This causes the entire simulation process to stall just to wait for a response.
> However, the model required to trigger that response is elsewhere in the model and therefore doesn't ever execute.. fail.
> 
> Is there a way of waiting for the response of that block WHILE continuing on with simulation?
> 
> Thanks!
0
6/4/2009 8:33:02 PM
Thank you Saurabh for your answer.

Actually, this is the way I would like my model to work:
I have two embedded MATLAB functions--
"query" sends a signal to a device connected through a serial forwarder;
"receive" waits for its response and returns that responding packet to Simulink. It stalls when no response comes from the device.
The paradox here is that if these two blocks operate at the same level in the model, "receive" stalls the simulation, therefore "query" will never send out a query and receive will never receive anything.
Is there an effective way to get around this? Thanks!

"Saurabh Mahapatra" <saurabh.mahapatra@mathworks.com> wrote in message <h09b1u$9eh$1@fred.mathworks.com>...
> Hi Annie,
> 
> Are you trying to get two separate models to talk to each other? If so, there is no way to break up a Simulink model and run it separately.
> 
> If you want to model the communication behavior between two models, you may want to use model reference within a new model than will treat them as separate models. But they would need to be within one single model and would need to be part of every solver step. 
> 
> Hope this helps.
> 
> Saurabh
0
anniecia (7)
6/4/2009 9:56:01 PM
If you haven't already figured this out, you might try looking up pseudomultitasking;  running Real-Time Workshop in multitasking mode.  I'm in a similar situation as yours, and this looks to be the way forward but I haven't done much reading on it yet.  I might post back here and describe my application if I don't get it figured out soon.

I hope this helps.

-Ryan



"Annie Chen" <anniecia@gmail.com> wrote in message <h07rmu$85t$1@fred.mathworks.com>...
> Hi All,
> 
> Does anyone know if Simulink supports parallel precessing / threading?
> How can I run two models at the same time?
> 
> In particular, I have a model that waits for the response of an external device by means of an embedded MATLAB function. This causes the entire simulation process to stall just to wait for a response.
> However, the model required to trigger that response is elsewhere in the model and therefore doesn't ever execute.. fail.
> 
> Is there a way of waiting for the response of that block WHILE continuing on with simulation?
> 
> Thanks!
0
8/25/2009 8:02:05 AM
Also the doc page "Running a Simulation Programmatically" looks promising..


> If you haven't already figured this out, you might try looking up pseudomultitasking;  running Real-Time Workshop in multitasking mode.  I'm in a similar situation as yours, and this looks to be the way forward but I haven't done much reading on it yet.  I might post back here and describe my application if I don't get it figured out soon.
0
8/25/2009 11:26:20 PM
I have simulink model that processs the image.
I divided image into block. i want to process each block in parallel.
I musing raspberry pi 2 hardware.





"Simulink Dude" wrote in message <h09b1u$9eh$1@fred.mathworks.com>...
> Hi Annie,
> 
> Are you trying to get two separate models to talk to each other? If so, there is no way to break up a Simulink model and run it separately.
> 
> If you want to model the communication behavior between two models, you may want to use model reference within a new model than will treat them as separate models. But they would need to be within one single model and would need to be part of every solver step. 
> 
> Hope this helps.
> 
> Saurabh
> 
> 
> 
> 
> 
> "Annie Chen" <anniecia@gmail.com> wrote in message <h07rmu$85t$1@fred.mathworks.com>...
> > Hi All,
> > 
> > Does anyone know if Simulink supports parallel precessing / threading?
> > How can I run two models at the same time?
> > 
> > In particular, I have a model that waits for the response of an external device by means of an embedded MATLAB function. This causes the entire simulation process to stall just to wait for a response.
> > However, the model required to trigger that response is elsewhere in the model and therefore doesn't ever execute.. fail.
> > 
> > Is there a way of waiting for the response of that block WHILE continuing on with simulation?
> > 
> > Thanks!
0
krishnat
6/14/2016 5:59:04 AM
Reply: