Handling entity attributes in discrete event charts (Stateflow)

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

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.

Sign in to comment.

Answers (0)

Categories

Find more on Discrete-Event Simulation in Help Center and File Exchange

Asked:

on 5 Mar 2019

Edited:

on 21 Feb 2022

Community Treasure Hunt

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

Start Hunting!