L-VIS User Manual
169
LOYTEC
Version 6.2
LOYTEC electronics GmbH
data points. The way to make this possible is to distinguish between fixed data points which
will be the same for every instance of the template, and variable data points which will be
replaced by different data points for every instance.
This is done on the property page of the template by selecting up to four data point folders,
which will be considered a base path for relative data point references. This means that any
data point in the template object which is located below any of these base folders will be
considered a variable data point, whereas all other data points will remain fixed.
NOTE:
If there are multiple choices of base folders, select any one of them and make sure to use
the data points of the selected folder to create the data points. For example, if the data
points for 10 devices of the same type were already created and organized in 10 folders,
one for each device, and a template should be designed for a device of this type, pick the
folder containing the data points of device 1 and use these data points to design the
template. If a data point would be selected from the folder of device 2 while the base path is
set to device 1, this data point would be considered fixed and not relative, since it would not
be located below the selected base path.
Consider the following when designing a new template:
Try to place the controls at the position which is most likely the desired final
position when the template is instantiated. This avoids the need to move each
template instance to the desired location.
Determine which data points are needed for the template. For variable data
points, make sure they are organized in folders which can later be replaced for
each template instance. When creating data points from a network scan, this kind
of organization is usually done automatically, since a new folder will be created
for each device. Add each of the variable data point folders from which the
template is using data points to the list of data point base paths.
If the template will be using instances of other templates, check which base paths
these templates require and add them to the list of base paths for your own
template, if they are not already covered by one of your existing base paths. Note
that sub-folders are automatically covered. This is because the system will
always try to find the best way to derive the base paths of template instances in a
template from the available base paths of the parent template. For example, if the
top level template uses base path A/B and there is a template instance which was
designed for folder A/B/C, the base path of the sub-template will be set to C,
relative to whatever the instance of the top level template uses for A/B. If the top
level template is instantiated and the base path is changed from A/B to X/Y, the
sub-template will use X/Y/C as its base path.
If the template requires a set of internal data points, like registers, place them in a
separate folder and add it to the base paths. Later on, this register folder must be
copied for each template instance and the base path must be changed, so that each
instance will access its private set of register data points.
9.15.3 Instantiating a Template
There are a few different methods to create actual instances of one or more templates on a
page of the project:
In the tree view, drag the template object and drop it on the page on which a new
instance of this template is desired.
From the context menu of the page, select
Add Template Instance
. A new
template instance object will be created, but it will not be connected to a template
yet. To assign a template to the instance, drop the desired template on the