Handling entity attributes in discrete event charts (Stateflow)
Show older comments
Hi everybody,
I modeled a machine in a SimEvents model with a Stateflow chart. Entities enter the machine and take different paths depending on their attributes.
How can I read the attribute value of an entity into a Stateflow chart?
Thanks
1 Comment
Saeed Bonab
on 21 Feb 2022
Edited: Saeed Bonab
on 21 Feb 2022
Assuming you want to access attribute "att1" of entity "En" in your Stateflow chart, you can use En.data.att1.
Also make sure that the entity type name in the Entity Generator is default, i.e., "Entity". I am not sure why this should be the case. Seems to be a bug.
Answers (0)
Categories
Find more on Discrete-Event Simulation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!