Is it possible to access/use sldd data within a stateflow without using a mask?

Hey folks,
is it possible to access/use sldd data within a state chart without using a mask?
Thanks in advance.

 Accepted Answer

Once the SLDD is specified for the model, its data can be used by the whole model. What is the issue?
In Stateflow, add a parameter, specify it as "inherit from Simulink".

5 Comments

Thank you very much for your answer.
I think I was missing the "inherit from Simulink".
Im gonna test it these days.
Ok it is "type: Inherit from Simulink".
But I don´t have the auto complition (when hitting TAB) when it is recognizing smth from the sldd, like I have it for e.g. const blocks within simulink itself.
To be accurate, it is to add a Parameter (not local data, not input, not output, etc.). Make the name match the variable name in SLDD.
The data type is usually set as "Inherit: same as Simulink".
Yes. The auto completion of the variable name is not available in Stateflow. I am verifying it in R2022b.
First of all it is working like you said. Thank you very much.
But no, in R2022b the auto completion is not available.
A auto completion would be nice, because this would give some kind of a feedback that the variable was found within the simulink without wating for the "update model".

Sign in to comment.

More Answers (0)

Categories

Products

Release

R2021b

Asked:

on 18 Jan 2023

Edited:

on 19 Jan 2023

Community Treasure Hunt

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

Start Hunting!