Data types mismatch in Simulink

조회 수: 8 (최근 30일)
Sergei
Sergei 2025년 4월 18일
편집: Sergei 2025년 4월 22일
Dear all,
in the attached file you can find a project, obtained by following the instructions in SoC Blockset User's Guide, page 2-34 (Create an SoC Project Application).
When I run the project I get the following Errors:
Could you please help me to solve the issue?
  댓글 수: 2
Walter Roberson
Walter Roberson 2025년 4월 18일
You forgot to attach the project.
Sergei
Sergei 2025년 4월 22일
Thank you! ;D That is true, I attached it now

댓글을 달려면 로그인하십시오.

채택된 답변

SACHIN KHANDELWAL
SACHIN KHANDELWAL 2025년 4월 21일
Hi @Sergei,
I understand that when running the model you are encountering data type mismatch issues.
Regarding the second error - "Data type mismatch". It is clearly stated that Input port 2 expects a signal of data type 'double', but the currently it is 'uint8'. I recommend you to refer the following MATLAB Answer post : https://www.mathworks.com/matlabcentral/answers/92959-why-do-i-receive-a-data-type-mismatch-error-when-using-a-model-reference-in-simulink
Also, Could you please attach the model file/project for better recommendation.
  댓글 수: 1
Sergei
Sergei 2025년 4월 22일
편집: Sergei 2025년 4월 22일
Sorry for the confusion - attached the project now.
I chiked the Data types to the best of my knowledge - everything seems right, but the multiplication block inside the FPGA algorithm wrapper seems to expect double instead of int8, that is provided from the Register Channel

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

제품


릴리스

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by