I have found the problem. The data type going into the gain blocks is Int32. When multiplied by 0.01, the output data type is sfix64_En37 by default. This caused the fixed-point issue later in the script. Solved this by setting the gain signal attributes -> output data type to "Inherit: Same as input"
Why do I receive error message "This requires the Fixed-Point Designer license." for a simple matlab function?
조회 수: 29 (최근 30일)
이전 댓글 표시
Hello all,
I have included a Matlab Function block in my Simulink model with a very simple script. The script checks if a certain limit is exceeded and adjusts input values until it no longer exceeds the limit.
The funcion looks like this:
function adapter_angles = fcn(total_angle,support_angle,adapter_angles)
for i = 1:length(total_angle)
while total_angle(i) > 85
adapter_angles(i) = adapter_angles(i-1);
total_angle(i) = support_angle + adapter_angles(i);
end
end
total_angle is calculated before this script and is simply support_angle + adapter_angles. adapter_angles is a 1x4 array and support_angle is a constant.
When I try to run the Simulink model, Simulink throws the error message "This requires the Fixed-Point Designer license." I don't understand why this simple script would require an additional license. I am using Matlab Simulink version 10.6(R2022b). I am not using any exotic data types.
the Simulink submodel looks like this:
Has anyone encountered this problem before? How do I get around this?
댓글 수: 0
채택된 답변
추가 답변 (1개)
Andy Bartlett
2023년 10월 18일
Showing the data types on the Simulink signal lines can be very helpful when investigating.
Open the model in question
Then at the MATLAB command line do
set_param(bdroot,'ShowPortDataTypes',1)
On the next simulation, code generation, etc. the data types used will be displayed on each signal line.
This can also be set via a model's toolstrip.
DEBUG tab
Diagnostics group
Information Overlays
Ports
Base Data Types
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Fixed-Point Designer에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!