Tie logic nodes to serial numbers
Contents
1.
Introduction
1.1.
Application description
1.2.
System requirements
1.3.
Area of application
2.
Application 1: Logikbaustein_AES256
2.1.
Save location and help
2.2.
The interface
3.
Application 2: logicx
3.1.
Save location and help
3.2.
Call
4.
Using the applications
5.
Troubleshooting

## 1.Introduction

Using Logikbaustein_AES256.exe, which provides a graphical interface for processing, and logicx.exe, a command line application, you can tie logic nodes to a specific HomeServer/FacilityServer (serial number). This ensures that these logic nodes only work on the device with this serial number.

### 1.1.Application description

The applications split the logic node file into two new files:

- File 1 is legible and contains just the input and output definitions, as well as their designations. This file has the same name as the original from which it was generated!
- File 2 contains the actual code, bears the serial number of the activated HS/FS in the name and has the file extension `.hslx`. This file is not legible for the user.

Due to this splitting, the modules can be used in an unlimited way in the graphic logic editor (GLE) of the Expert software.

### 1.2.System requirements

The following system requirements apply:

- HomeServer or FacilityServer
- Start-up PC with Expert software from version 2.5

### 1.3.Area of application

The Logikbaustein_AES256.exe and logicx.exe applications are help software developed specifically for coupling logic nodes to a specific HomeServer/FacilityServer. Any other use of these applications is not possible and also not permitted.
Gira assumes neither legal responsibility nor provides a guarantee of any kind for problems resulting from the improper use of the applications.

## 2.Application 1: Logikbaustein_AES256

### 2.1.Save location and help

The setup program of the Expert software stores the application and the help in the tool directory of the Expert software. It also creates a link in the start menu for this directory.
You can find the exact path for the application in the "Readme" file in the Expert directory. There is also a link in the start menu for the "Readme" file.
Application name: Logikbaustein_AES256.exe

### 2.2.The interface

Start the application by double-clicking it.
As soon as you have specified a path under Source, a list of the logic nodes located in the directory is displayed in the area under Logic nodes. The display of the list is updated during entry or after selection of a folder using the "button".
Fig. 2.1: Interface of the Logikbaustein_AES256 application
Explanation of the application interface:

Field | Description
--- | ---
Source | This specifies the directory that stores the logic nodes to be coupled.
Destination | The converted logic nodes are stored to this directory.
Serial number | The serial number of the HomeServer/FacilityServer with which the modules are to work with is entered here. On the debug page, the serial number can be taken from the field Ident. No. in the section System.
Logic nodes | These logic nodes are located in the Source directory. Any number of logic nodes can be selected here by clicking on them.
Generate | All selected logic nodes are converted when this button is clicked. The converted modules are generated in the Destination directory. The modules in the Source directory remain unchanged.

## 3.Application 2: logicx

### 3.1.Save location and help

The setup program of the Expert software stores the application and the help in the tool directory of the Expert software and creates a link in the start menu for the help file.
You can find the exact path for the application in the "Readme" file in the Expert directory. There is also a link in the start menu for the "Readme" file.
There is also a text file (`logicx_readme.txt`) in the directory of the application which contains a brief description of the call parameters.
Application name: logicx.exe

### 3.2.Call

`logicx.exe -source [QELLE] -destination [ZIEL] -serialnumber [SERNR]`
or
`logicx.exe -help`
The parameters can be entered in any order as long as a parameter is directly followed by a corresponding value.
[SOURCE]: Path for a logic node file or for a directory containing the logic node files. If it is a directory path, a "`\`" must be specified at the end. All logic nodes in this directory are converted.
[DESTINATION]: Destination directory in which the generated *.hsl and *hslx files are created. This directory must exist. It is not created automatically by the application!
[SOURCE] and [DESTINATION]: This can be specified as an absolute or a relative path. In the latter case, the specified path or file name is below the directory in which the `logicx.exe` is located.
The path or file specification can be enclosed in quotation marks at any time. However, quotation marks are only mandatory if the path and/or file name contains spaces and/or other special characters.
If the specified directory or the file does not exist, the application reports that the corresponding path is missing. No conversion takes place.
[SERNR]: The serial number or MAC address of the HS/FS to which the logic node(s) are to be tied. When entering this, do not use any quotation marks!
-help: By specifying the `-help` parameter (see above), the short version of this help can be called.
As `logicx.exe` is a command line tool, no graphical user interface is available.
EXAMPLE of a call in which the source and destination directory are relative:
`logicx.exe -source logic\src\ -destination logic\dst\ -serialnumber 000AB1234567`
All logic node files in the directory `[Verzeichnis, in dem logicx.exe liegt]\logic\src` are converted. The results are stored in the directory `[Verzeichnis, in dem logicx.exe liegt]\logic\dst`.
EXAMPLE of a call in which a single source file (absolute) and no destination is specified:
`logicx.exe -serialnumber 000AB1234567 -source
"C:\Users\Public\Documents\Gira\HS+FS Experte 4.9\logic\10123_my_logic_module.hsl"`
The logic node file "10123_my_logic_module.hsl" is converted. The results are stored in the (default) directory `[Verzeichnis, in dem logicx.exe liegt]\destination`.

## 4.Using the applications

Since both applications work in the same way, the following information applies to both applications equally.
Important
Before starting the conversions, it is essential that you copy the entire directory "`[Experte-Verzeichnis]\logic`" to a secure place, or at least all the logic nodes that you want to convert!
(You can find the exact path of this directory in the Readme file in the "Public Documents" area, because it may vary according to the operating system used).
This is necessary because you must copy the first of the two new files (see here) created per logic node to the [Expert directory]\logic directory again after converting the logic nodes.
As the converted file has the same name as the “original “ logic node file, the original file is overwritten by this action.
Example:
Original file (source): 10123_my_logic_module.hsl
The following files are created under Destination:

- 10123_my_logic_module.hsl
- 10123_000AB1234567_my_logic_module.hslx

The file with the ".hsl" extension must be copied to the [Expert directory]\logic subdirectory in the "Public Documents" area thereby replacing the original logic node file.
The file with the ".hslx" extension must be copied to the \logicx subdirectory of each Expert project (in the "My Documents" area) in which it is to be used. If this directory does not exist there, it must be created.
Important
Restart the Expert software after you have copied the files to the directories named!

## 5.Troubleshooting

If errors occur with an encrypted logic node after restarting the HS/FS, the Master Error and Exceptions sections of the Debug page are the first places to check for troubleshooting.
If the logic node appears in the Master Error section, this indicates that an error occurred while encrypting the module, or that the module or the individual files were not copied correctly to the corresponding folders in the Expert directory.