NA-MAAB — a
JMAAB — a
All
Chart block parameter Use Strong Data Typing with Simulink I/O shall be selected so that strong data typing between a Stateflow® chart and Simulink® is permitted.
Note
Use Strong Data Typing with Simulink
I/O is available only
whenChart block property
Action Language is set
to C
.
Not Applicable
Parameter Use Strong Data Typing with Simulink
I/O is selected, so the input and
output is set to uint8
type.
Parameter Use Strong Data Typing with Simulink
I/O is not selected, so the input and
output is set to double
type.
Sub ID a:
When parameter Use Strong Data Typing
with Simulink I/O is not selected,
the Simulink signal data type that can input and
output to a Stateflow
Chart is set to
double
type:
As a result, type conversion is required prior to input and after output, which increases the number of blocks and decreases readability.
However, input data of any type in a Stateflow Chart can connect directly with that signal. When these two signals have different data types, an implicit data type conversion occurs. By selecting the parameter, the implicit data type conversion does not take place and a data type inconsistency error is generated. This prevents misunderstandings due to differences in data type, thus improving readability.
Model Advisor check: Check for Strong Data Typing with Simulink I/O (Simulink Check)
R2020a
JMAAB guideline db_0122, which is available in Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow on the MathWorks® website.
Chart (Stateflow)
Strong Data Typing with Simulink Inputs and Outputs (Stateflow)
Differences Between MATLAB and C as Action Language Syntax (Stateflow)