
L-VIS User Manual
171
LOYTEC
Version 6.2
LOYTEC electronics GmbH
Starting with version 6.1 of the configuration software, these situations are handled
automatically to avoid broken templates and instances. Renaming a data point folder will
automatically adjust all affected base paths to use the new name, such that the change has
no negative effect on existing templates and instances. Converting a template to a different
base path is simply done by changing the base path on the template property page. All data
point references which are relative to the old base path will automatically be converted to
reference a suitable data point below the new base path. In case a suitable data point cannot
be found, the reference will be marked broken for manual inspection.
Also, base paths and remapped data points are constantly checked and template or instance
objects which contain errors are marked in the tree view with a small attention icon, to let
the user know that a template or template instance definition is broken.
9.15.5 Nested Templates
It is possible to build a nested hierarchy of templates by adding template instances to
templates. This can be useful to build a template for a room, which contains templates for
light, HVAC, and other subsystems, which again may use templates for individual devices
and so on. The system will make sure that no loops are built, where for example template A
contains an instance of template B, and template B would try to instantiate template A.
Whenever a template is instantiated inside another template, the base paths of the sub
template are derived from the base paths of the parent template. This is because the user
will only instantiate the top level template, and therefore only one set of base paths will be
available. As a consequence, all sub templates have to get their base paths relative to the
paths which were set for the top level instance. Based on the paths set for the instance of the
sub template and the paths set for the design of the top level template, the system will
automatically select the most suitable relative path. It is therefore important to use a
consistent set of paths during the template design. The paths used for the sub template
instances should normally be sub folders of paths which are used to design the parent
template. Although this is not strictly required and thus not enforced by the software, it is in
most cases the only meaningful configuration.
Consider the following example: The data point setup contains a set of data point folders,
one for each room (room1, room2, room3, and so on). Each room folder contains a sub
folder for lighting, for example room1/lighting or room2/lighting. Now a room template is
designed with room1 as the base folder and a sub template to handle the lighting is
instantiated. The sub template instance expects a base path for the lighting related data
points (contained in the lighting folders). The only meaningful setting is to select
room1/lighting as the base path for the lighting template instance. In this case, the sub
template will use a relative base path of $1(room1)/lighting, which means that it takes the
path which was set for slot 1 of the room template instance and searches for a sub folder
called lighting to access the lighting related data points.
If we would have selected room2/lighting as the base path for the instance of the lighting
template inside the room template, which we are designing based on room1, the relative
path for the lighting data points would become $1(room1)/../room2/lighting, which means
that the lighting template will take the base path 1 of the room template instance, move one
folder level up and search for room2/lighting to access the lighting related data points. In
most cases, this is not what we want and it is caused by inconsistent selection of base paths.
NOTE:
As a rule of thumb for selecting base paths for sub template instances, always stay within
the data point folder hierarchy which is set for the design of the parent template. If an
instance of the sub template actually needs data from an unrelated folder hierarchy, it is
usually required to add another base path to the parent template to make the new folder
hierarchy accessible and settable by the user when the template is instantiated.
The first part of any relative base path has the following notation:
$N(folder)