필터 지우기
필터 지우기

why do I receive error like"The input must be a built-in integer or fixed-point data type"

조회 수: 4 (최근 30일)

답변 (2개)

Sathvik
Sathvik 2023년 11월 27일
Hi
I understand that you are trying to resolve the error while using the NCO block in your Simulink model.
The error you have received suggests that the output data type of the Gain block in your Simulink model is a ‘double’ while the NCO Block expects a ‘built-in’ integer or ‘fixed-point’ data type.
The data types supported for the input to the NCO block are:
int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64 | fixed point
You can use information overlays in your model to ensure that you are providing an integer input to the NCO block.
In the Simulink Editor, go to Debug -> Information Overlays -> Ports -> Base Data Types, to identify the output data type of the source block and change the output data type of the source block in your Simulink Model from ‘double’ to one of the supported data types.
Please refer to the following documentation for the NCO Block for more information regarding the input port to the NCO Block
Hope this helps!
  댓글 수: 4
Sathvik
Sathvik 2023년 11월 29일
As I can see from the screenshot attached, you are getting a different error from what you have received earlier.
The error message is asking you to specify the 'Output Minimum' and 'Output Maximum' for the Gain block. To do this, open the block dialog, select the 'Signal Attributes' tab, and specify the minimum and maximum values that the output signal will likely use.
The system is attempting to provide reccomended data types based on the range on the signals and will need the specifications above.

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


Walter Roberson
Walter Roberson 2023년 11월 28일
Put in a type conversion block https://www.mathworks.com/help/simulink/slref/datatypeconversion.html

카테고리

Help CenterFile Exchange에서 Data Types에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by