Professional Documents
Culture Documents
com
MyOpenLab
Version 3.010
User's Guide
http://myopenlab.de
1
Index
1. Installing MyOpenLab
3. Circuit Panel
5. Display Panel
7. Help
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.
Figure 1
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
• 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 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:
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
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:
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
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
Figure 16
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
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.
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
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
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
17
Grouping of Elements
Physics Library
Flowchart Library
Extras 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
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
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
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.
Decoration Elements
of characters
23
Graphic display elements in
coordinate axes I
Extra elements
Automation 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:
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.
Figure 33
project folder basically allow us to manipulate the VM application files
that we have there.
27
Figure 34
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.
Figure 35
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.
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).
It is about creating a simulation of a digital circuit that we are going to integrate into two
submodels: SubDig1 and SubDig2
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.
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
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.
35
Figure 48
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
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.
37
Figure 52
Figure 53
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.
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 ś).
…\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
…\Distribution\My Bookstore
41
… \Distribution\My Library\CircuitElements …
\Distribution\My Library\FrontElements
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.
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).
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
Once the scheme is finished, we will proceed to save the file with the “Save VM
as Module” option.
42
Figure 59
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
44
Figure 64
Figure 65
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:
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.
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
Figure 74
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
Figure 77
Figure 78
53
Identification of the author of a VM application
Figure 79
54
12. Plotting and monitoring the execution of a VM
simulation.
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.
Figure 80
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
Figure 83
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:
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.
Figure 84
Using the Frequency controls. Sampling. Freq. Refresh Buffer Trigger and
Clear can be configured to display both analog and digital data.
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.
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.
60
Figure 92
The “Variable Viewer” panel next to the simulation screen is indicated in the figure.
Figure 93
61
Execution in debug mode
The option is activated using the button . The simulation time setting is
perform with .
Figure 94
Figure 95
62
It can be accessed through the “window” menu, as seen in the figure.
Figure 96
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
Figure 99
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