Export SimEvents Attribute Scope

Hi everyone,
In my SimEvents file (2015b) my entities have some attributes and I use a "get attribute" along with a "attribute scope" block to plot those attributes versus simulation time. I would like to export those data to the workspace.
Note: "Number of points plotted" in scope statistics is not giving me what I want.

2 comentarios

Teresa Hubscher-Younger
Teresa Hubscher-Younger el 11 de Mayo de 2016
Hi,
With a 2015b SimEvents file, you can export attribute data to the workspace by using a Get Attribute block, sending the data to a scope (or terminator), and logging that signal line. (To log a signal line, right click on the line and go to Signal Properties. In the Signal Properties, choose to log the data. Make sure to name the signal line. I would also go to your Model Configuration Parameters, just to make sure in the Data Import/Export area that signal logging is turned on and a meaningful name is given to the logged parameters (the default should be logsout).
If that's all set up, you can run the model, and it will log the data in MATLAB. You will need to use a get method to get to the Attribute data, i.e. x=logsout.get('Attribute1'). But once, you have it, you'll be able to plot it against simulation time.
I would highly recommend upgrading to SimEvents 16a. Logging data is much easier in 16a and you can use Simulink Data Inspector (as well as other cool features, such as MATLAB Event Actions, MATLAB Discrete Event System Block and Discrete Event Charts and other features - 16a was a major release for the product).
Hope this helps,
Teresa
Alizée Belamaric
Alizée Belamaric el 18 de Mayo de 2016
Thank you for your reply Theresa. I tried what you suggested and figured out that using a "Get attribute" block along with a "to workspace" block would give me what I was looking for as well. All the best, Alizée

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Discrete-Event Simulation en Centro de ayuda y File Exchange.

Preguntada:

el 11 de Mayo de 2016

Comentada:

el 18 de Mayo de 2016

Community Treasure Hunt

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

Start Hunting!

Translated by