Accessing details

The Properties view

The Properties view displays the properties of the selected model element. In figure "The YAKINDU Model Viewer workbench", you can find it at the bottom, marked with a red rectangle.

If you select a block, the block’s type, name, and navigation path are displayed at the top of the Properties view. You can copy the navigation path to the clipboard by pressing [Ctrl+C] on the keyboard.

The "Properties" view

The Properties view

Below the navigation path, the block’s properties are listed as a table. On the left-hand side of the properties view, you can toggle between the General and the Other tab. The General tab shows only the most important data of a block, whereas the Other tab displays additional properties, like its graphical information or the block’s ID.

If you select another model element, the properties view changes to reflect the selected element’s properties. However, you can „pin” the current properties by clicking on the properties view’s pin button button "pin properties". As long as the properties view is pinned, it doesn’t change its contents, no matter which elements you select. In this mode, the properties view has an additional line below the view’s title, telling which element’s properties are shown.

Click on the pin button button "pin properties" again to unpin the properties view.

The _Properties_ view in pinned mode

The Properties view in pinned mode

Displaying parameter values in blocks

When browsing Simulink models in the YAKINDU Model Viewer, it can be helpful to see the values of parameters directly in the model. However, Matlab maintains parameter values in the Matlab workspace, not in the model. Thus, YAKINDU Model Viewer cannot access them directly when opening the model file.

However, YAKINDU Model Viewer implements a solution to circumvent this obstacle. Here’s an outline of what you can do:

  • Maintain parameter values in Matlab as usual.
  • Execute a Matlab script to export all parameters and values to a separate file ( .ymvd file).
  • When YAKINDU Model Viewer opens the model file, it also opens that .ymvd file and displays the parameter values.

The subsequent sections explain how to setup and run the export script and make use of parameter values in blocks.

Currently, this feature is supported for constant blocks only.

Installing the export script

The export script that extracts parameters and their values from the Matlab workspace and exports them to a .ymvd file is bundled with YAKINDU Model Viewer. You will find it as a zip-compressed archive file YAKINDU_Export.zip in the scripts subfolder of the YAKINDU Model Viewer installation directory.

  • Unzip that file to a directory of your choice.
  • Add the script directory to the Matlab search path. This is required to be able to execute the script from the Matlab command window.

Initializing the Matlab workspace

Open Matlab Simulink and initialize your Simulink workspace completely. That is, execute all required Matlab Simulink scripts, especially those that initialize any parameter values. The parameter values must be set before the export script can be run.

Please ensure that Simulink can find all needed libraries. If any libraries are missing, please include them in the Matlab search path.

Executing the export script

Now that all parameter values are set, you can run the script to export them. Go to Matlab Simulink, enter the following into the command window, and hit [Return].

YAKINDU_export('modelname')

Entering the export command on the Matlab command-line

Entering the export command on the Matlab command-line

The export command executes, logs what it does to the command window, and creates a file besides the model file. That file comes with the same basename as the model file, but with a .ymvd filename extension.

The export script creates an ".ymvd" file alongside the model file.

The export script creates an .ymvd file alongside the model file.

If you specify just the model name in the export command, Simulink expects the model to reside in the Matlab search path. However, your model file might reside somewhere else. In this case, please also specify the path to the model. That path is relative to the current folder.

YAKINDU_export('some/path/modelname')

Displaying parameter values in YAKINDU Model Viewer

Now open the Simulink model in YAKINDU Model Viewer. The tool will notice the .ymvd file besides your model file, read it, and display the parameters.

Parameter names are shown inside the block, and – in parenthesis – their associated values. The label below the block displays the block’s name. Parameter names and values can also be seen in the properties view.

Constant blocks with parameter values displayed in YAKINDU Model Viewer

Constant blocks with parameter values displayed in YAKINDU Model Viewer