Why I cannot use 64 Bit datatype in Stateflow with MATLAB Action Language in R2020a?

7 views (last 30 days)
Why I cannot use 64 Bit datatype in Stateflow with MATLAB Action Language in R2020a?
I have a Simulink Parameter with int64 datatype and now in the Diagnostic Viewer I can see the following error:
'paramChartInt64' has a value of an unsupported type.'
In R2019a and R2019b there was no error.
I use the following code to specify the parameter:
paramChartInt64 = Simulink.Parameter;
paramChartInt64.DataType = 'int64';
paramChartInt64.Value =1;

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 23 Dec 2022
Edited: MathWorks Support Team on 23 Jan 2023
In R2019a and R2019b we unintentionally allowed to use 'int64' datatype in Stateflow charts. This was fixed in R2020a and now it correctly shows an error, because it is not supported.
Our development team currently plans to include this functionality in a future release.
In the meantime you can use the following workaround:
paramChartInt64 = Simulink.Parameter;
paramChartInt64.Value = fi(-1, 1, 64, 0);
64-bit datatypes are allowed in Stateflow starting in R2021a and are represented as a standard builtin type (not a fixed type alias).

More Answers (0)

Categories

Find more on Stateflow in Help Center and File Exchange

Products


Release

R2020a

Community Treasure Hunt

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

Start Hunting!