Slow down Simulink to synchronize it with external session (JADE)

1 次查看(过去 30 天)
Hi, I am working on a Simulink-Jade Simulation and I am trying to send data from Simulink via TCP-Send to the Jade environment. The JADE Agents use the input data and create if their code allows it messages for Simulink which are imported via the TCP/IP Receive block. The Problem is that the JADE Agents cant process the data fast enough with the result that there is a delay between Simulink and Jade (to slow, I can compare the simulationtime from both systems).
Is there a possibility to hold/pause the Simulink simulation till Jade sends via TCP IP a signal that the last data has been successfully processed and the Simulink simulation can move on? Or is there a something to slow down Simulink by command? During my work I tried to limit the sended data with a triggered Subsystem from every timestep to every second or every third timestep. That helped, but only on my machine and for a small version of my simulation. Now I am looking forward to a strong solution where I can ensure that both systems are synchronized.
I searched a lot different helping topics and I cant afford to slow it down to real time, I am doing week and year lasting simulations^^
Thanks for your help, Claus

采纳的回答

Guy Rouleau
Guy Rouleau 2013-12-13
It is not clear how you interface with the external tool, but it looks lik an S-function is the way to go.
In an S-Function (C or MATLAB depending on your preference and requirements), you can implement whatever logic you want. For example you can write code that will wait until it receives a confirmation from the third party tool that it is time to move forward.
You can find a very simple example of this concept in this submission:

更多回答(1 个)

Claus
Claus 2013-12-17
Thank you very much... that is the base where I can build my system around

类别

Help CenterFile Exchange 中查找有关 Large-Scale Modeling 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by