'Set Attributes' SimEvents Block Functionality in R2016a

3 visualizzazioni (ultimi 30 giorni)
I have a few signals in my R2016a Simulink/SimEvents model that I want to assign as attributes as I create entities. In the previous version it looked like the 'Set Attributes' block provided a signal input to achieve this. Any idea how I do this in R2016a?

Risposte (1)

Sebastian Castro
Sebastian Castro il 8 Apr 2016
In R2016a, you should be able to use the "Event Actions" tab in the Entity Generator block to set the attributes of your entities.
Here, you can enter MATLAB code or call Simulink Functions to pick up signals on entity generation events and assign them to your entity.
- Sebastian
  3 Commenti
Sebastian Castro
Sebastian Castro il 11 Apr 2016
Modificato: Sebastian Castro il 11 Apr 2016
I don't blame you -- it can be a bit tricky to get a grasp for MATLAB/Simulink functions.
Also, the other tricky thing is that SimEvents works with intergeneration time, so you actually have to specify the difference in time between two entities.
Easiest thing I could do is attach an example model in a ZIP file. Give it a look! In particular:
  • View the contents of the Simulink functions, which contain MATLAB functions inside that extract an index of your data and then increment to the next index.
  • The first column, which is the entry time, is in the getEntryTime function. This is used in the Entity Generation tab of the Entity Generator block.
  • The second and third columns, which are the SMS_UID and Case_UID attributes, are in the getIDs function. This is used in the Event Actions > Generator section of the Entity Generator block.
- Sebastian
Hana Mejdi
Hana Mejdi il 16 Nov 2017
Hi ,I need help to assign attribute which its value is obtained from the memory block that adds one every time an entity passes through the set attribute block as shown in the attached image. how can i do it using the "Event Actions" tab in the Entity Generator block ..can anyone help me .? thank you

Accedi per commentare.

Community Treasure Hunt

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

Start Hunting!

Translated by