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?
25 次查看(过去 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:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1514029/image.png)
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!