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

2 visualizzazioni (ultimi 30 giorni)
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

Risposta accettata

Guy Rouleau
Guy Rouleau il 13 Dic 2013
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:

Più risposte (1)

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

Categorie

Scopri di più su Configure and View Diagnostics in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by