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
댓글 수: 0
채택된 답변
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:
댓글 수: 0
추가 답변 (1개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Configure and View Diagnostics에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!