28 All About HALCON Licenses
5.3.3 License Bound to a Remote Dongle
Starting with HALCON 21.05, you can also use a dongle connected to a remote computer over the network.
The remote dongle must be plugged into a computer with a running CodeMeter Runtime, version 6.50 or later, that
is configured to allow remote clients to acquire licenses. For security reasons, MVTec recommends using version
7.10 or later. Please see the CodeMeter Runtime documentation on how to configure the CodeMeter Runtime
correctly.
Make sure the communication between client and server is possible, i.e., not blocked by a firewall. By default,
TCP port 22350 is used.
You must also tell HALCON how to contact the dongle. This is done by adding the server=<hostnames> tag to
the end of the license string for the dongle in the license file. <hostnames> is a comma-separated list of hostnames
to contact. These can be either fully qualified domain names, IP addresses, or the special keyword _local. _local
instructs HALCON to use a dongle connected to the local computer.
The following example license file shows a HALCON runtime license for the dongle ID 3-3668597. HALCON
first looks for the dongle locally, then attempts to contact the CodeMeter Runtime at the IPv4 address 10.0.0.5 and,
if this fails, contacts the CodeMeter Runtime at license.example.com:
LICENSE MVTec_HALCON 24.05 MODULES=fc123bdomit ID=CM:3-3668597 \
FLAGS=PROGRESS_OK SESSIONS=1 SIGNATURE="F155 C6B7 5E24 5FAF 224D B779 \
93D7 65B1 1F0C CCD9 CE94 03D0 0D79 066D C66F F869 A92D EC52 B7A2 04A7 \
874C B503 BE19 B150 C9C1 592F 41EB C808 8479 380C CE95 1408" \
server=_local,10.0.0.5,license.example.com
Note that the hhostid tool and the get_system(’hostids’) HALCON operator call can only find dongles con-
nected directly to the computer on which HALCON is running and will not find remote dongles.
5.4 Runtime Licenses
In contrast to a development license, a runtime license only allows you to run HALCON applications. Further-
more, a runtime license can be restricted to a set of selected modules if your application does not require the full
functionality of HALCON.
5.4.1 Getting a Runtime License Restricted to Specific Modules
In the following we list the steps to determine the used modules, obtain an appropriate runtime license and install
it.
Step 1: Extract the required modules
To extract the modules that are used by an application proceed as follows:
1. If the application is running in HDevelop, select the menu item File . Properties, which will open a
dialog. In its tab Used Modules the used modules are listed (see the HDevelop User’s Guide, section 6.14
on page 111, for more information). Figure 5.1 shows the result for an OCR application.
If you click Copy to Clipboard, the required modules are saved in the clipboard, from where you can
insert them in other applications.
Please note that this method determines the list of used modules by inspecting all operators of the current
program, no matter if they can be reached or not. If the program contains operator calls that are never
executed, it is recommended to deactivate the corresponding program lines using F4 before opening this
dialog to get a correct list of used modules.
2. If the application is written in a programming language (C, C++, C#, VB.NET, etc.), insert the operator
get_modules (see the corresponding entry in the HALCON Reference Manuals for more information) at
the end of the program. Note that the operator get_modules will only return the correct modules if all!
HALCON operators used in the application are executed at least once.