Why do I receive error message "This requires the Fixed-Point Designer license." for a simple matlab function?

30 views (last 30 days)
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?

Accepted Answer

Dolf
Dolf on 18 Oct 2023
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"

More Answers (1)

Andy Bartlett
Andy Bartlett on 18 Oct 2023
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

Products


Release

R2022b

Community Treasure Hunt

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

Start Hunting!