You are on page 1of 66

Translated from Spanish to English - www.onlinedoctranslator.

com

MyOpenLab
Version 3.010

User's Guide
http://myopenlab.de

Prof. José Manuel Ruiz Gutiérrez

1
Index

1. Installing MyOpenLab

2. Basic description of the environment

3. Circuit Panel

4. Element Libraries: Circuit Panel

5. Display Panel

6. Element Libraries: Display Panel

7. Help

8. Organization of application files:

9. Creation of VM submodels (Sub-VM) to include within a


generic VM application.

10. Creation of new elements for MyOpenLab libraries.

11. Protection and personalization of our work

12. Plotting and monitoring the execution of a VM simulation.

13. Other Options and Information

2
1. Installing MyOpenLab

To have the application in its latest version you must search the Internet address
http://myopenlab.de (original page in German) andhttp://es.myopenlab.de (page in
Spanish) where the corresponding installation file will be downloaded.

The version 3.010 file does not contain an installer, so it will be enough to uncompact
it by extracting the files it contains in a folder that could be called

. . /myopenlab.

Once the file that we have downloaded from the corresponding website has been
decompressed, the appearance of the file structure that is created is as shown in the figure.

You can distinguish the folders where the projects are (which
contain the example VM applications) and the “Elements”
folder that contains the libraries of both the Circuit Panel and
the Front Panel.
The bat files are the ones that launch the application, taking into
account that “start with JDK.bat” is the one that starts the
application, allowing the possibility of compiling java code.

When we start the application for the first time, it will


ask us to select the language and also the place (folder)
where we want the new library elements that we can
create to be saved.

We must not forget that in any case the MyOpenLab


application requires having at least the java runtime
installed “jre-6u1-windows-i586-p” or the full application
“jdk-6u1-windows-i586-p” if we want to compile code.

Figure 1

The following figure shows the application information window where we


can find important information regarding the tools used, the credits and the
conditions of use.

The application can also work on the LINUX operating system, although this
manual will talk about the application running under Windows XP.

3
Fig.2

4
2. Basic description of the environment

MyOpenLab is an environment aimed at simulating circuits and systems with a


wide field of applications.

Its most important features are:

• Easy to use
• Extensive library of functions for both analog and digital signal
management.
• Treatment of data types and operations with them.
• Realization of applications through the use of function blocks.
• Ease of creating visualization screens that collect the status of the
variables and events of the simulations.
• Possibility of expanding your component library.
• Possibility of creating submodels that can be encapsulated in other
submodels.

Within the Virtual Instrumentation tools (VI Virtual Instruments) this tool is an
example of simplicity and power at the same time.

The applications made with MyOpenlab are calledV.M.(Visual Modeling).

Every application will consist of two very different parts:

Circuit (Circuit Panel)

Display Panel (Front Panel)

The circuitIt will be the set of functions and/or operators that, conveniently
linked, respond to a functionality related to an electronic circuit or a system of
any type. This set of functions is edited in the corresponding circuit editing
panel, which appears in the tab labeled“Circuit Panel”.

The Front Display Panel Partwill be the one that appears in the tab labeled
with“Front panel"in which the graphic display objects will be located that
associated with the circuit variables will allow the visualization of the evolution
of the simulation.

In Figure 3 we see what the screen looks like once the application is started and an
example is loaded. In it we can easily distinguish the following parts:

5
Figure 3

The most important parts into which the MyopenLab main screen is divided are:

Components Area:Where the active panel


libraries appear (Circuit Panel or Front
Panel). It is possible to navigate through
the libraries by clicking on the icons that
represent the folders where the different
elements are located. Fig.4

Figure 4

6
Component Properties Area: In this
window appears with the properties of
the object or function that we indicate.
Fig.5

Figure 5

Project Area.Where is the tree of


folders and files
VM applications. Fig. 6

Fig. 6

Circuit Panel:It is the one in which we design the circuit and carry out the wiring of all
the components, joining inputs and outputs. Fig. 7

Figure 7

7
Front panel: It is the one on which the objects that will show the results or from
which values will be collected in the simulation are deposited. Fig.8

Figure 8

We see that some elements are shown in the two panels. Exactly those that we
have taken from the visualization object libraries. Such is the case of the “Zoom X”
and “Zoom Y” potentiometers that appear on the circuit panel and on the front
panel as the “Frequency” and “Amplitude” controls.

Button Bar:This bar contains the buttons associated with the most important
functions of MyOpenLab. Figure 9

Figure 9

8
We see that from left to right the buttons are used to:

Create new Project: New Project

Open an already created Project: Open Project

Save the VM file currently being edited: Save VM

Undo last action: Undo

Reset undone action: Reset

Update the data of the active VM: VM Update

Allows you to configure Options: Options

Allows you to define and/or edit variables: Define Variables

Show window with information about the colors of


the data lines: Legend colors data types

Start Simulation: Start VM

Start simulation in debug mode: Start VM (Debug


Mode)

End simulation: End VM

Stop simulation: Stop VM

Continue simulation: Continue VM

Perform the simulation step by step: Step/step VM

Sample Numerical graphic window

Sample Digital Graphics Window

Shows Data Table window

Sample Data Output Console

Shows window with program information:


Information

Set simulation time

9
3. Circuit Panel

The Circuit Panel is the work area where each of the elements of the different
libraries that we are going to use in our project are placed. Figure10

Figure 10

The components once placed on this area are ready to be joined together using the
mouse. Simply bring the mouse pointer close to an input or output terminal of a
component for a label to appear that identifies the name of the terminal and in
parentheses the type of data it admits (if it is an input) or that it delivers (if it is a exit).
Figure 11

Fig. 11

We can also enable the so-called component window from the “Window”
drop-down menu.

Figure 12

10
Selecting a component

Items are selected from the libraries area at the top left of the screen. The
libraries are accessed by clicking on the folders and once the element we need
is located, we click with the left button and select it, then we go to the work
area of the panel and click again with the left button, leaving the element
placed. We can move it if we wish by simply keeping the left button pressed
on it and moving the mouse.

In figure 12 we see the Counter component next to its component window and its
properties window.

Note that this component only accepts data of typebooleanand the value it
returns isnumeric dbl.

It is very important that we look at the colors of the input and output lines of the
components since depending on their color and type (continuous or dotted) we can
determine their nature (see figure 13).

Fig. 13

Some components when placed in the Display panel will automatically appear in
this panel. For example the OK button, the switch and the display. The connection
of components cannot be made in the Display Panel, which is why the Input/
Output components of this panel must appear in the Circuit Panel in order to be
connected to the corresponding input or output.

eleven
Deleting a connection

If we want to delete a connection, we mark it with the mouse, and then with the
keyDELor in the menuEdit->Cutthe connection is removed. Figure 14

Figure 14

Placing a branch or splice node

If we want to place a knot to be able to derive a connection to two components, all we


have to do is place the mouse over the connection line and press the right button, a
menu will appear from which we will select add knot. Figure 15

Fig. 15

Component connection

To make the connection between components, simply mark the output with a
left-click and then mark the corresponding entry of the selected component.
Figure 16

zqui give and

Figure 16

We always have to connect an output to an input or the output of a node to an


input.

The label that appears On/Off is the indication of the Input Terminal.

To Delete Components

To delete one or more components or an entire area, simply select the area or
components with the mouse and then, once the area is shown in the highlighted video,
press the DEL key on the keyboard or select the “Cut” option from the Edit menu. .

12
In the edition you can mark component digits and copy and paste them, that way
we can carry out the editing more quickly. Figure 17

Figure 17

Copy and paste Components or entire areas.

If we want to duplicate an area or component, just select the area or component and
select the Edit menu, the “Copy” option and then the “Paste” option. Do not forget that
when pasting, the copied area or component is pasted over the original.

The copy operation can be done with CTRL+C keys and the paste operation with
CTRL+V.

Placing a SubVM Element in the Circuit Panel work area.

When we want to place a SubVM component in the work area, all we have to
do is drag it from the project area (selecting its name) and drag it into place.
This can be done as long as the subitem is in the same project folder as the
VM we are editing.

Components window.

Using the corresponding menu option we can make visible the structure of the
component we select.Window Menu -> Component Window.This window shows
the inputs and outputs, indicating each one its name and the data type in
parentheses. Figure 18

Figure 18

Context Menu on the component

While over a component, pressing the right mouse button, this menu
appears. Figure 19

13
Fig. 19

From this menu we can invoke the component's help file and also edit it. In
the same way, from the option“Code Editor”We can edit the Java code of the
component and modify it if we wish. This possibility makes MyOpenLab an
absolutely flexible and open tool.

14
4. Element Libraries: Circuit Panel

“Logical Panel” Element Libraries

Decoration Elements

Digital Operators

fifteen
Numerical Operators

Character Treatment

Analog Elements

Utilities

Input/Output Files

16
Comparisons

Image processing

Sound Treatment

Color

I/O pins

Vectors and matrices

17
Grouping of Elements

Graphic Objects “canvas”

Physics Library

Flowchart Library

Extras Library

Connections library between applications

User Defined Library

18
Automation Library

Interfaces

19
5. Front Panel

This panel is where the elements that will be used to enter the input values and/or
parameters (stimuli) of the application are placed, as well as the elements that allow
viewing the output data (output elements). It also allows us to place decorative
elements on it that have no relationship with the elements that make up the
application. In the figure we see the panel corresponding to the example that we have
used in the Circuit Panel. Figure 20

Figure 20

Figure 21 shows the componentnumerical outputwith the component window


and properties menu open. Let's not forget that the properties shown by a
component in this panel are different from those shown if we are in the Circuit
Panel.

Figure 21

In this panel, the components are placed seeking a harmonious form of visualization
since this will be the image that MyOpenLab will give us once we go from editing
mode to simulation mode. In figure 22 we see the appearance of the

panel once we have given simulation

twenty
Figure 22

Let's not forget that to stop the simulation all you have to do is click or in of the
on the menu button bar

If we want the window to appear with a title, all we have to do is write it


in the place indicated in figure 23.

Figure 23

In which case the panel, when the application runs, shows the name. Figure 24

Figure 24

The objects displayed in the View Panel can be resized as shown in figure
25.

twenty-one
Figure 25
To do this, all we do is stretch from the black point marked in the corners of the
component when it is marked.

The decoration objects are useful to make the panel since they allow us to get closer to
the graphic reality of an instrument, system, machine, etc...Figure 26

Figure 26

22
6. Element Libraries: Display Panel.

Front Panel Element Library

Decoration Elements

Numerical display elements

Digital activation elements

String Input and Output Elements

of characters

Input and output elements type


vectors and data matrices

23
Graphic display elements in
coordinate axes I

Graphic display elements in


coordinate axes II

Extra elements

Automation Elements

User Library Elements

2D robot

Figure 27

24
7. Help.

All you have to do is mark the component and press F1 to get a help window. It
can also be done with an option from the context menu that we just mentioned.

The help can be seen in any of the three languages (fig. 29) in which
MyOpenLab is programmed. To close the sale, just click on the icon:

Figure 29

The help file is written in HTML language and can be edited whenever we
want, just hover over the component and press the right key for a while and
select “Documentation Editor”. Figure 30

Figure 30

In figure 31 we see what the switch component help file editing window
looks like.

25
Fig.31

26
8. Organization of application files:

In MyOpenLab the organization of application files, also called VM files


(Visual Models), is done through file structures called "Projects".

The projects physically constitute folders within which the VM applications


are located.

When creating a new project (by pressing the right button while on the “Projects”
icon) a menu appears through which “New project” is selected, a window
appears in which we are asked for the name of the new project, we write the
name of the project and if we wish, we change the name of the main VM of the
project, which is called “Main.vlogic” by default.

Figure 32

This first VM created is presented in white (without any elements in either the
Circuit Panel or the Front Panel) and in it we can design our first application.

To create a new project can also be done by


selecting the option from the application's drop-
down menu (New Project)

Editing project folders can be done simply by placing


the mouse over the folder and using the context menu
(mouse stalk button).

We see that the operations that can be performed with a

Figure 33
project folder basically allow us to manipulate the VM application files
that we have there.

27
Figure 34

It is important to highlight among the operations that appear that of “Create


Distribution” and “Add Sub VM” which we will deal with later.

With the “Project Properties” option we can select the main VM of the
application, as shown in the figure.

With the “Copy”, “Cut” and “Paste” options we can change the folders of the
different VMs that we have created.

Example of creating a “Project Structure”.

Figure 35

Below we see an example of a project that we have created that includes


4 VM applications called a1, a2, a3, a4.

In the VM Main.vlogic we have placed four action buttons that invoke each of
them using the “Sub-VM Element” function.

28
In figure 37 we see the circuit and front panels of the VM Main showing each of
the invoked applications.

Once the configuration has been created, a “Distribution” of the application can
be created using the corresponding option in the project context menu..

Figure 36

Figure 36 shows the window for collecting the name of the VM that we want to associate with the
“Sub-VM Element” element.

Figure 37

29
Figure 38

In figure 37 we see the definition of the VM Main in which we can see the four
buttons that activate the applications.

In figure 38 we see the displayed application screens in “execution


mode”.

This method of creating projects allows us to structure our VM applications in themes in


a fairly comfortable way and to be able to group them all on the same screen from
which each of them can be opened.

30
9. Creation of VM submodels (Sub-VM) to include
within a generic VM application.

MyOpenLab, in cases where the model to be designed is very large, allows you to create
submodels that respond to several functions of the model and that are encapsulated in a
single component (Sub-VM).

These submodels are incorporated into the examples folder tree and can later
be incorporated into other new simulations (VM).

To explain the procedure, it is best that we make an example.

It is about creating a simulation of a digital circuit that we are going to integrate into two
submodels: SubDig1 and SubDig2

Creating a submodel can be done in several ways depending on where we go


within the environment.

Method 1

In our example we will do it by directly creating the submodels from the Projects
tree. Steps to follow:

1.- All we have to do is go to the name of the project folder in which we are
going to save the application and, by right-clicking, select “Create Sub-VM”
from the context menu.

Figure 39

2.- Next we select the number of input and output pins that our Sub-VM
will have, on the left (inputs) and on the right (outputs).

31
Figure 40

Upon accepting, once the number of Pins has been selected, the following structure will appear in
the “Circuit Panel”.

Figure 41

3.- What proceeds now is to select the components that will be part of the Sub-
VM and designate the nature of the input/output Pins. When defining the
pins we can also give each one the name “terminal label” which will help us
later identify each input/output.

32
Figure 42

4.- Once the complete Sub-VM schematic has been created, we proceed to
save it. Click on the red cross on the tab and press “Yes” and then save
the file as shown in the figure.

Figure 43

We see that the Sub-VM has placed it in a folder that has the same name as the
file itself (SubDig1) and has also created three .html files to be able to place the
help information that we want in the three MyOpenLab languages. as well as a
file (SubDig1.gif) that will be the icon that we can put on this Sub-VM.

33
Editing the SubDig1.html file

Figure 44

You can also edit the icon and change it to another one.

Editing the icon associated with Sub-VM SubDig1

Figure 45

3. 4
Finally we see what the created submodel would look like. It would be enough to
create a new VM and dragging the SubDig1.vlogic file to the “Circuit Panel” area, it
would be symbolized there with its new icon and as we see, its pins would be perfectly
identified in the “Component Window”, figure 46. If we want to see the content of the
SubDid1.vlogic element, all we have to do is place the right mouse button and display
the contextual menu that appears in the figure and select “Show VM”, opening the
complete diagram of this figure 47.

Figure 46

Figure 47

By clicking on “Show VM” we see the content of SubDig1.vlogic

In the Sub-VM created, display elements specific to the “Front Panel” may also
appear, such as an LED.

5.- Once the Subcircuits SubDig1 and SubDig2 have been created, to incorporate them into a
design, all you have to do is create a new VM and drag each of the elements over it.

In figure 48 we see what the Digital1.vlogic VM would look like.

35
Figure 48

App appearance VM Digital1.vlogic

In the following figure we see what the “Projects” tree would look like.

Figure 49

Method 2

Another way to create a Vm submodel structure is by using the “Create SubVM” option
from the MyOpenLab Extras menu, Figure 50.

Figure 50

The procedure would be the following.

1.- We create a new application, having marked the project folder in which we
want to deposit it, selecting

36
Figure 51

2.- On the “Circuit Panel” we place all the elements we need and make
the diagram as what will later be SubA1.

The selection of the area that we make will be the one that houses the components that
we are going to integrate into the new Sub-VM which we will call SubA1.

3.- The next step will be to define the input and output pins of the new element
created, taking care to define the name of the pin and the nature of the signal
that it will manage, whether it is input or output.

4.- Once the definition of the pins has been made, what corresponds is to save
the new Sub-VM that already has the name that we gave it previously SubA1.
We observe how it is incorporated into the project tree and the folder in
which we are working.

This new Sub-VM will be available when we need to use it.

37
Figure 52

Sub-VM SubA1.vlogic creation process

Figure 53

Designation of the input and output pins of the Sub-VM SubA1.vlogic

All you have to do is drag the Sub-Vm to the “Circuit Panel” work area and
we will have our new SubA1.vlogic.

38
Note that the component appears with its inputs and outputs labeled
perfectly.

Figure 54

Method 3

This third method consists of making use of the library component marked in the
following figure.

Figure 55

This component allows you to directly write the name of the file associated with the Sub-VM
and includes it in the model that we are creating.

39
Figure 56

40
10. Creation of new elements for MyOpenLab
libraries.

Method 1: Building using MyOpenLab resources

Next we are going to explain how to create new elements or function


blocks in libraries.

This option is very useful because it allows new libraries to be incorporated into
existing ones in order to facilitate their repetitive use, saving us work and
simplifying the execution of new simulations (VM ś).

Myopenlab has its libraries grouped into two large blocks:

Libraries for Circuit Panel


Libraries for Front Panel

Both are located in separate folders:

…\Distribution\Elements\CircuitElements
….\Distribution\Elements\FrontElements

In our case, the new elements that we will incorporate will be located in the folder
that we have designated for it using the corresponding option within the menu
Extras-> “Options”

Figure 57

We are going to save the components that we create in the folder:

…\Distribution\My Bookstore

Inside which will be the two folders

41
… \Distribution\My Library\CircuitElements …
\Distribution\My Library\FrontElements

Where the elements that we create will be saved.

Let us keep in mind that when creating a library component, if it does not contain
any elements corresponding to the For Front Panel library, it will be saved in the
folder corresponding to the Circuit Panel Library elements. If it contains any, it will
be recorded in the Front Panel Library.

Creation of an Element that calculates the average of two numbers.

We are going to create a library component that will be responsible for performing the
arithmetic average of two numbers that are entered in its two inputs. The numbers will be
in “dbl” format. It is therefore a purely mathematical calculation library and therefore will
not have any “visual” type component. Therefore, it will be recorded in the directory
corresponding to the “CircuitsElements” elements (elements of the Circuit Panel).

1. Creation of the corresponding VM

We will create a model like the one in the figure. Let us keep in mind that the inputs
and outputs will necessarily be connected to “Pin” type elements in which we will
define the nature of the data (in this case they are all of type “dbl” (by selecting
C_DOUBLE in the pin properties menu).

Figure 58

2. Save the file as an element.

Once the scheme is finished, we will proceed to save the file with the “Save VM
as Module” option.

42
Figure 59

A window will appear in which we will define several things:

Yam: The name of the Element


Caption:The texts in German, English and Spanish that will be shown when
we are on it in the bookstore block
Icon:The icon with which it will appear. It will be editable.

Figure 60

43
The component once created and if we place it in the Circuit Panel area
will appear as shown in the figure.

Figure 61

From this moment on, the “Media” Element is ready to be used in any VM that
we build... A simple application for use appears in the figure. If we wanted to
change the icon we could do so by simply editing it.

Figure 62

Let's not forget that the folder containing this new element has been created in
the corresponding place.

…\Distribution\My Library\CircuitElements\Media

Figure 63

In libraries it will look as shown in the following figure

44
Figure 64

Method 2: Creation by writing the component code in JAVA.

The component creation method explained below is aimed at those who


know the Java language and are capable of creating functions that relate the
input variables and the parameters involved in a component.
We will follow the following steps:

1. We select the Create Java Component option from the menu

Figure 65

2. Setting component parameters

The component parameters and configuration window shown below


appears immediately.

Four. Five
Figure 66

From this window we give the name of the Destination Directory of the
component being in the “Location” tab.

46
Figure 67

Through the “Settings” tab we define the parameters that refer to:

Name : “Component name” with which it will appear in the Circuit


Panel and in the Front Panel.
Resice Options: Options for modifying the size of the component
when it is in the panels
Border: Appearance of the edge of the component once placed on the
panels.
Pins: From here the pins (inputs/outputs) of the component are configured and
these can be on the right. Left, above and below the box with which the
component is represented. In the same way, the data types of each pin and
whether they are inputs or outputs (I/O) are defined.

In the Properties tab we can designate the Parameters of our


component using its “Name”, “Data Type” and “Min” and “Max” values.

47
Figure 68

Once we have defined the component parameters, we can save them in order
to be able to use the same model in other future components that we want to
create: Options “Loading Configuration” and “Recording Configuration”.

Next we select the option “generate new Java Element” and the base model
of the component is created, a warning window appears indicating that we
must compile it so that it can be available.

Figure 69

48
3. Editing and Compiling the created component.

The component that we just defined is not yet available to be used since all we
have done is create the structure of the Java program for said component.
Now what we have to do is write the Java code according to the function we
want the component to perform and then compile it.

The component has been created in the user library group as seen in the
following figure

Figure 70

It will be enough for us to place ourselves on the component icon and press
the right mouse button, the menu shown in the figure will appear and from
this we will be able to select each of the editing options shown.

The following image shows the “Element Definition Editor” window from which you
can modify several things, including the icon of the created Element. The Caption
option allows you to write the text that will appear when we hover the mouse over its
icon.

49
Figure 71

With the Edit Elements option, the java code editing window is displayed from which
we can write, adding to the basic code already written, the code that allows us to
carry out our function for this component.

Figure 72

Once the code has been written, we must press the “Compile” option, which will
definitively generate the usable component.

We can edit the component code as many times as we want.

fifty
In the following figure we see what the component that we have just created will look like,
where the identification of its terminals appears (Component Window) and the Properties
Editor where the parameter that we defined previously “Parameter 1” appears.

Figure 73

51
11. Protection and personalization of our work

In the new version of Myopenlab, the possibility appears to protect our VM ś


developments using a password so that when opening them, only the
corresponding Front Panel screen appears and not the Circuit Panel screen. In this
way, whoever uses the VM application will only be able to perform the simulation
but not modify it.

Figure 74

To protect a VM application we will proceed as follows:

We open the VM file and select the “Password Protection” option. A window will
appear in which we are asked for the password (minimum 6 characters), we write
it and select “OK”. The file is already protected, but let's not forget to save it when
we close it or exit the program.

Figure 75

When we try to open a protected file, the first thing we will be asked for is its password in
the corresponding window. If we write it correctly we will open it completely. If we click on
“CANCEL” we will open only the Front Panel.

52
Figure 76

If we want to remove the protection of a file we must select “Delete Protection


Password” from the menu. We select “YES” in the window and the file will be
completely open.

Figure 77

The following message window appears.

Figure 78

53
Identification of the author of a VM application

Figure 79

When creating an application with MyOpenlab, it is possible to indicate the author's


name, email address and website address. This is done through the VM -> “Properties”
Menu option. The following figure shows this option and the properties window that it
displays when it is activated.

54
12. Plotting and monitoring the execution of a VM
simulation.

When a model is designed and the simulation is carried out, it is sometimes


necessary to track (plot) the values that certain model signals adopt. To
achieve this objective MyOpenlab has the possibility of adding test points
“Add Testpoint”.

How to add a signal test point?

To add a signal test point, simply place yourself on the line from which we want to
collect the value of the variable and press the right mouse button. A contextual menu
will appear and we select “Add Testpoint”, leaving a mark in the indicated position that
will indicate that we have a test point there.

In the figure we see the steps to be carried out:

Figure 80

Enable the option to display Testpoint signal graphs in simulation mode.

In order to see the behavior of the signals that we have marked with the Testpoint
option in simulation mode, we must enable the “Demonstrate Toolbar” option from
the Front Panel properties menu.

Figure 81

55
Figure 82

With the “Demonstrate Toolbar” option disabled

Figure 83

With the “Demonstrate Toolbar” option disabled

With this option enabled, the upper display bar will be incorporated into the
simulation screen of the Front Panel, in which the following types of displays
appear:

Numerical Graphic Window

Digital Graphics Window

Data Table Window

Console

Stop VM Simulation
End VM Simulation
Continue VM Simulation
Adjust simulation time delay

56
The following figures show the information windows of the Testpoint points
located in a VM simulation.

It is also possible to open these windows from the application toolbar.

Numerical Graphic Window

Figure 84

Using the Frequency controls. Sampling. Freq. Refresh Buffer Trigger and
Clear can be configured to display both analog and digital data.

Digital Graphics Window

Figure 85

57
Data Table Window

Figure 86

Variable viewer

Sometimes it will be interesting to see the value that certain variables take
throughout the simulation of a VM application. We have already described the
possibilities of plotting data through analog, digital and table data graph
windows. In the explained way the simulation can run in continuous mode.

In the case that we are going to explain, we will use the data visualization window
called “Variable Viewer” and which appears in the “Window” drop-down menu, as seen
in the following figure.

Figure 87

Let's say in advance that in this case the simulations must be done in “Debug
Mode” as indicated in the following figure.

When defining variables it is necessary to do so expressly (the variables defined by


MyOpenlab are not accessible in this working mode) through the editor

58
of variables that is activated on the from the main window button bar
button or through the menu:

Figure 88

With this tool we define the variables by giving them a name and a data type. Keep
in mind that in the data type we can only define three: Integer, String and Double

Figure 89

When we select add, the window shown in the following figure appears and in it we
define the variable.

59
Figure 90

Once the variables we need have been defined, we will proceed to extract them from
the “Circuit Panel” using the “Get(i)” function found in the Diagrams library.

flow .

To extract the value of the variable from the corresponding line of the VM schema,
just “add node” (context menu function by clicking the right mouse button while
over the line where we want to include the node).

Figure 91

When we have defined the variables that we want to see, it will be enough for us to
start the VM simulation always in “Debug Mode”.

We open the “Variable Viewer” window and we can see a list of all the defined
variables and their values evolving depending on the stimuli received by the
model.

In the following figure we see the evolution of a simple example of an application with a
Flowchart that implements a counter from 0 to 10.

The variable in this example is “counter”

60
Figure 92

In the following example we see the simulation of an addition operation in which


we collect the values of the input variables “a” and “b” and the output variable
“sum”.

The “Variable Viewer” panel next to the simulation screen is indicated in the figure.

Figure 93

61
Execution in debug mode

In some applications, when carrying out the simulation we will be interested in


executing the simulation in “debub mode”. This means that we will be able to see
graphically how the input and output elements of values are activated and ultimately
will allow us to explore the data flow.

To understand this form of simulation, it is best to use an example in which there is a


flow chart because you can clearly see how the different blocks that constitute it are
activated in sequence.

The option is activated using the button . The simulation time setting is

perform with .

Figure 94

“Errors and Warnings” window.

This window shows us possible errors or warnings throughout the simulation or in


the event that invalid operations are carried out.

Figure 95

62
It can be accessed through the “window” menu, as seen in the figure.

Figure 96

“Console Output” window.

This window allows you to view the data that is sent to the console.

The orders that send data to the console, remember that they are:

Figure 97

The console window looks like the following figure, which corresponds to a
simple example:

63
Figure 98

64
13. Other Options and Information

General options

MyOpenlab has an option to configure some operating parameters. To


activate the options window (Figure 99), use the Extras menu option.
> Options.

Figure 99

By activating the different tabs that appear we can configure:

Raster:Sets the size of the grid in the “Front Panel” editing screen of the application and the
possibility of showing it or not and adjusting the fit of the components to it.

Editors:Allows you to select the HTML format editor to edit the component
help files.

Image editor:Allows you to select the image editor in case you modify the
library icons.

Userdefined Elements: Allows you to define the place (folder in which the Library
Elements that we can create will be saved.

Language modification

It is possible that MyOpenmlab supports three languages: English, German and Spanish. To do this,
go to the Extras-> Language option in the menu and modify it. It will be necessary to start the
program again so that it takes the selected language. Figure 100

65
Figure 100

66

You might also like