Data acquisition problem in Simulink model

조회 수: 1 (최근 30일)
Chiara Mancinelli
Chiara Mancinelli 2021년 4월 26일
답변: Pratyush 2024년 5월 27일
Hello,
I have created a Simulink model in order to acquire temperature measurements from a sensor. I launch the simulation and it runs even for several hours without problems until I decide to stop it. The strange thing happens when I relaunch the simulation: the software seems to read only one measurement and then it automatically stops without errors.
The only solution I found is to rewrite from zero the model. What does it mean? Could be a corrupted file or something?
Can anyone help me? Thank you
Chiara

답변 (1개)

Pratyush
Pratyush 2024년 5월 27일
Hi Chiara,
The issue where a Simulink model stops running properly after the first successful execution could be due to several factors, not necessarily a corrupted file. Consider these potential causes and solutions:
  • Ensure hardware resources are properly released after simulation. Add cleanup commands for hardware interfaces.
  • Check for initialization steps that may not repeat on subsequent runs. Use the "StartFcn" callback for necessary re-initialization.
  • Review and adjust solver settings. Ensure settings are correctly applied for each run.
  • Update your Simulink and MATLAB to the latest version to avoid known bugs.
  • Less likely if the model runs correctly initially. Regularly back up your model and try exporting it to a new file.
  • Simplify the model to pinpoint the problem.
These steps should help diagnose and potentially resolve the unusual behavior of your Simulink model.

카테고리

Help CenterFile Exchange에서 Multicore Processor Targets에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by