필터 지우기
필터 지우기

Serial Receive in Desktop Real-Time Kernel Mode

조회 수: 2 (최근 30일)
Kreis Oliver
Kreis Oliver 2022년 7월 25일
댓글: Antoni 2024년 6월 12일
I am trying to get an input from a serial input in Simulink Desktop Real-Time.
To do so I have a "Serial Configuration" block and a "Serial Receive" block which is connected to a "To Workspace" block. (see screenshot below)
I am able to run the model in "Conneceted IO Mode". However, if I change the mode to "Kernel Mode", the model does not work anymore. Simulink states:
Serial Failed Code genreation inofrmation file does not exist.
0 of 1 models built (0 models already up to date)
Build duration: 0h 0m 19.781s
Error(s) encountered while building "Serial_Read"
Is it possible to use serial inputs in "Kernel Mode"? If yes, how can I avoid getting this error?

답변 (1개)

Ayush
Ayush 2024년 4월 1일
편집: Ayush 2024년 4월 1일
Hi Kreis,
The error that you have mentioned seems to suggest that the problem lies with the code generation process of your Simulink model. There can be several reasons for this particular problem, however you can try some of these troubleshooting steps to resolve the issue:
  1. If there are any custom code or libraries included for code generation, you can ensure that it is not corrupted or following the format expected.
  2. You can also try clearing the build files to remove any unnecessary stale files either by manually deleting the contents of the folder that is being read or using MATLAB commands
  3. Verify that the MATLAB’s current working directory and any external project paths are present with proper path names especially for the file that the block is trying to read.
  4. To analyse and debug further about the error that you have received you can try to increase the details of the diagnostic messages by using “verbose build”. You can also refer to the documentation below to know more about “verbose build”: https://www.mathworks.com/help/releases/R2021b/rtw/ref/verbose-build.html
Additionally, you can also look at the below mentioned references to know more about “Kernel mode” and its limitations:
Hope this helps!

카테고리

Help CenterFile Exchange에서 Real-Time Simulation에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by