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

2 ビュー (過去 30 日間)
Claus
Claus 2013 年 12 月 12 日
回答済み: Claus 2013 年 12 月 17 日
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 Center および File ExchangeConfigure and View Diagnostics についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by