The MERLIC .ini File
This topic describes the general configuration file of MERLIC. It is generated with the name "MERLIC5.ini" by default. It enables you to manually configure various settings for different components of MERLIC. The configuration properties are grouped in different sections. You can also create additional configuration files with customized settings for specific use cases.
If you want to use multiple instances of the MERLIC Communicator in the MERLIC process integration mode, you can also create a configuration file specifically for the MERLIC Communicator. For more information about the configuration file for the MERLIC Communicator, see the topic The Communicator .ini File in the MERLIC Communicator manual.
The following sections provide some general information such as on the location of the configuration file or how to define additional configuration files. In addition, you can find detailed information on the available configuration properties. We will refer to the configuration file in general simply as ".ini file" to avoid confusion which configuration file we are referring to.
General Information
Location
You can find the "MERLIC5.ini" file that is generated automatically in the following default directory: "C:\Users\<username>\AppData\Roaming\MVTec". You can also enter "%APPDATA%\MVTec" into your file explorer to reach that directory.
Versions
When updating to a new version of MERLIC, the backward compatibility of the .ini file may be compromised. Therefore, we recommend to save a copy of your .ini file and your MVApps before using them in a new version of MERLIC.
For this MERLIC version, the .ini file that is generated and used by default is called "MERLIC5.ini". For previous major versions of MERLIC, a different .ini file is used by default.
|
MERLIC version |
Name of .ini file |
|---|---|
|
≥ 5.0 |
MERLIC5.ini |
|
4.4.0 to 4.8.0 |
MERLIC4.ini |
|
< 4.4.0 |
MERLIC.ini |
There are two ways to find out your MERLIC version:
- Open the "About MERLIC" dialog in the MERLIC Creator via the menu entry "Help → About".
- Use the command line option "-V" or "--version" for the MERLIC executable "merlic_creator.exe". For more information about the available command line options, see the topic Starting the Frontend with MERLIC.
Using Additional .ini Files
By default, MERLIC is started with the configuration of the default "MERLIC5.ini" file. However, you can also create an additional .ini file with a different configuration and then start MERLIC with the new .ini file. This way, you can define different configurations for different use cases, e.g., if you want to use multiple instances of MERLIC at the same time with different configurations.
To create a new .ini file, you can copy the default "MERLIC5.ini", adjust the configuration as desired, and save it in any location.
To start a MERLIC with a specific .ini file, you have to use the command line as described below:
- Open a command prompt and change to the "bin\x64-win64" directory within the MERLIC installation path, for example, "%PROGRAMFILES%\MVTec\MERLIC-5.6\bin\x64-win64".
- Use the command line option "--ini" to specify the path and name of the .ini file you want to use as shown in the example below. If the .ini file does not exist, it is automatically created with this call.Copy
merlic_creator.exe --ini <FILE>
The same command line option "--ini" can also be used for the executable of other MERLIC applications:
- merlic_communicator.exe
- merlic_frontend.exe
- merlic_rte.exe
- merlic_rte_setup.exe
For more information on how to start the respective MERLIC application, see the following topics:
- Starting the Frontend with a Remote Connection
- Starting the Process Integration Mode
- The Communicator .ini File (in the MERLIC Communicator manual)
Overriding the Properties in the .ini File
If you start MERLIC via the command line, you have the possibility to override some properties of the .ini file. You can use the available command line options to define specific settings for the current session. The specified option in the command line will override the value that is set for respective property in the .ini file.
The same applies for additional .ini files. If MERLIC is started with a custom .ini file, the respective properties in the given .ini file will override the configuration of the default "MERLIC5.ini" file.
The hierarchy of the startup options is as follows:
- Command line options.
- Options of the .ini file that is specified in the command line.
- Options of the default "MERLIC5.ini" file.
- If no .ini file exists, MERLIC will create one in the default directory or in the directory that was defined in the command line during the start.
Structure and Encoding
The .ini file is structured in different sections that contain the settings for the respective component. The sections are added chronologically and may be reorganized automatically by MERLIC. The names of the sections are specified in square brackets [ ] in the .ini file. When editing the .ini file manually, you can add new sections anywhere above or below existing sections.
The .ini file requires an UTF-8 character encoding on all platforms. It is possible to use regular slashes "/" and backslashes "\" as path separators in the .ini file. Lines starting with "#" are ignored by MERLIC.
Sections
In the following, you can find detailed information on the available sections and properties for the .ini file. Currently, you may define properties in the following sections:
- General
- Colors
- Communicator
- Designer
- Frontend
- Logging
- ProcessIntegration
- RecentlyWorkedOn
- Server
- UserManagement
[General]
This section contains settings for the look and behavior of MERLIC. Some of these settings can also be defined in the preferences of the MERLIC Creator.
|
Property |
Default |
Description |
|---|---|---|
|
GuiLanguage |
|
This property stores your language choice from the MERLIC preferences in "Edit → Preferences → General → Language". The MERLIC Creator offers the following language options:
The MERLIC Frontend offers additional language options. For information about setting the language of the Frontend, see the topic Changing the Language of the MERLIC Frontend. |
|
HalconDisableCudnnOptimization |
true |
This property can be used to enable or disable the dynamic optimizations via the NVIDIA® CUDA® Deep Neural Network library (cuDNN). This optimization refers to MERLIC tools with deep learning technology, for example, Detect Anomalies. By default, this property is set to "true" which means that no additional optimization is performed. If it is set to "false", additional optimizations are performed when selecting a GPU as processing unit in a MERLIC tool. Depending on the capabilities of the selected GPU, the enabled optimization might take significantly more time, but it usually leads to better inference performance and thus, decreasing cycle times. With the optimization, the duration required for the following processes will be improved:
If you want to use the cuDNN optimization, make sure to update the driver of your GPU to the latest version. Otherwise, the optimization via the cuDNN library might not be supported. If this setting is changed, MERLIC needs to be restarted. This setting can also be configured in the MERLIC Creator. For more information, see the section "General" in the topic MERLIC Preferences. |
|
HDevelopDebugPort |
57786 |
This property defines the HDevelop debug port that is used to connect to MERLIC to debug custom tools in a special debug mode of HDevelop. |
|
HDevelopDebugServer |
false |
This property defines whether the HDevelop debug server that is required to debug custom MERLIC tools in a special debug mode of HDevelop is activated. You can set the following values:
|
|
|
This property can be used to define fixed ports for the configuration services of the Image Source Manager (ISM) when using the MERLIC RTE Setup on a remote system. You have to specify three ports to ensure that the remote configuration works correctly, e.g., "10123;10124;10125". You may use ports in the range of 1024 to 65535. If you are using this property to set the ports, you have to ensure the following conditions are met:
If this property is used to defined fixed ports, only one instance of MERLIC Creator and MERLIC RTE can be started. |
|
|
IniVersion |
5 |
This property is used by MERLIC to determine valid keys and values. For the current MERLIC version, it must be set to 5. |
|
LineWidth |
2 [px] |
This property stores the width of lines that are visualized in MERLIC. It is defined in pixel. You can change the value also in the MERLIC preferences under "Edit → Preferences → LineWidth". |
|
MainWindowGeometry |
|
This property stores the position and appearance of the MERLIC Creator window in a ByteArray. |
|
MainWindowMaximized |
false |
This property defines if the MERLIC Creator window is maximized when opened. You can set the following values:
|
|
MainWindowState |
|
This property stores the appearance and state of the components in the MERLIC Creator window in a ByteArray. For more information about personalizing your user interface, see the topic MERLIC Preferences. |
|
OpenUpdateDialog |
true |
This property defines if the dialog that notifies the user about an available update for MERLIC is shown upon startup. It is possible to disable the notifications, however it is not possible to disable the check for available updates. You can set the following values:
For more information about personalizing your user interface, see the topic MERLIC Preferences. |
|
ProceduresPath |
<empty> |
This property can be used to define the location of your custom MERLIC procedures (*.hdpl). The location must be defined as an absolute file path to the HDevelop procedure. If you want to specify multiple procedure paths, you can define the paths in a semicolon-separated list. |
|
ShowStartupDialog |
true |
This property defines if the start dialog in the MERLIC Creator is shown upon startup. It is possible to disable the start dialog. You can set the following values:
For more information about the start dialog and personalizing your user interface see the topics Start Dialog and MERLIC Preferences. |
|
true |
The following property defines if a server should be started. It is necessary to start a server for using MERLIC with process integration and a remote Frontend. You can set the following values:
|
|
|
StartupDialogState |
|
This property stores whether in the start dialog the sections "Recent MVApps" and "Examples" are expanded or collapsed as well as the position of the splitter between the two sections. |
|
ToolPath |
<empty> |
This property can be used to define the location of your custom MERLIC tools. The location must be defined as an absolute file path to the HDevelop procedure representing the custom tool. If you want to specify multiple tool paths, you can define the paths in a semicolon-separated list. MERLIC will then search the defined paths for files of the formats *.mvtools, *.hdpl and *.hdvp. Files of these formats will be loaded and integrated into MERLIC. For more information on integrating custom tools, see the MERLIC Tool Development manual. |
|
|
This property allows you to choose whether MERLIC highlights the tools that were not executed in the last iteration. It corresponds to the option "Highlight tools that were not executed" in the MERLIC preferences. You can set the following values:
For more information, see the topic Tool Flow. |
[Colors]
The properties in this section define the colors used in MERLIC to visualize the various tools and widgets in MERLIC. You can set basic colors in the MERLIC preferences via "Edit → Preferences → General → Colors".
Color values are either expressed as values in hexadecimal format or as named colors following to the HTML standard. User defined colors are possible. In this case, the settings "key" and "value" are the same.
|
Value |
Description |
|---|---|
|
accepted |
Color of the easyTouch handle over a region accepted by MERLIC. |
|
easy_touch |
Color of the preliminary result when using easyTouch before you confirm your choice with a click. |
|
fail |
This color for easyTouch is used in matching and code reading tools to preview areas where no code or matching can be found. |
|
ok |
This color for easyTouch is used to preview areas, where suitable data can be found by MERLIC to generate a result. |
|
region_input |
Color of regions that are used by certain tools. |
|
rejected |
This color for easyTouch is used by certain tools like Evaluate Defect Clusters to preview the quality of data contained in the selected area. |
|
roi_active |
Color of the active ROI. |
|
roi_inactive |
Color of the inactive ROI. |
|
warning |
This color for easyTouch is used by certain tools to preview that the selected area has insufficient data for a good result. |
[Communicator]
To make it easier to set up multiple instances of MERLIC RTE running on the same machine, the ports can be specified in the .ini file as well as via the command line options "--event_port" and "--command_port".
|
Property |
Default |
Description |
|---|---|---|
|
CommandPort |
21591 |
This property defines the command port that should be used for the communication of the MERLIC Communicator in MERLIC process integration mode. |
|
EventPort |
21590 |
This property defines the event port that should be used for the communication of the MERLIC Communicator in MERLIC process integration mode. |
|
|
This property defines fixed ports for the configuration services for Communicator plug-ins when using the MERLIC RTE Setup on a remote system. You have to specify three ports to ensure that the remote configuration works correctly, e.g., "10123;10124;10125". You may use ports in the range of 1024 to 65535 from the operating system. If you are using this property to set the ports, you have to ensure the following conditions:
If this property is used to define fixed ports, only one instance of MERLIC Communicator can be started. |
For more information about how to define the ports in an .ini file and how to start MERLIC with the respective .ini file, see the topic Starting the Process Integration Mode.
[Designer]
This section contains properties for the workspace of the MERLIC Designer. These settings can also be adjusted in the graphical user interface of the MERLIC Designer.
|
Property |
Default |
Description |
|---|---|---|
|
GridColor |
#ffff00 |
This property defines the color of the grid. If you set the color in the .ini file, you have to use the respective hexadecimal value. However, the color can also be set in the graphical user interface of the MERLIC Designer in the menu "Edit → Grid Properties". |
|
GridSize |
20 |
This property defines the size of the grid in pixels. The size can also be set in the graphical user interface of the MERLIC Designer in the menu "Edit → Grid Properties". |
|
ShowGrid |
true |
This property defines whether the grid is shown in the workspace or not. To deactivate the grid, set the property to "false". Alternatively, you can also change this setting via the graphical user interface of the MERLIC Designer using the menu entry "Edit → Show Grid". |
|
SnapToGrid |
true |
This property defines whether the widgets are snapped to the grid when moving them to a new position. To deactivate this mode, set the property to "false". Alternatively, you can also change this setting via the graphical user interface of the MERLIC Designer using the menu entry "Edit → Snap to Grid". |
[Frontend]
This section contains properties for connections to the Frontend and properties for connections between the Frontend and the MERLIC Creator. The MERLIC Frontend connects to the MERLIC Creator via the MERLIC server component. MERLIC server and MERLIC Frontend communicate via inter process communication.
Connection Settings
You can configure the following Frontend properties. Each of the properties has a predefined default value which is used if no value is specified in the .ini file or as command line argument:
|
Property |
Default |
Description |
|---|---|---|
|
CycleTime |
50 [ms] |
The MERLIC Frontend continuously polls the MERLIC server for new data. The "CycleTime" property defines the time that will at least pass between two polling requests. It is defined in milliseconds. This can be used to throttle the MERLIC Frontend and reduce the work load of the MERLIC server. |
|
GuiLanguage |
This property can be used to set the language in which the Frontend shall be started, e.g., "en_US". |
|
|
Host |
127.0.0.1 |
This property is used to set a hostname or an IP address. Thus you may configure to which computer the Frontend shall be connected. |
|
Port |
9090 |
This property defines the TCP/IP port to which the server listens. |
|
ReconnectInterval |
25 [s] |
This property is used if the connection to the server has been lost. Then a reconnection is attempted in a specific time interval. The "ReconnectInterval" defines the time that will pass until a reconnection is attempted. It is defined in seconds. |
Customization Settings
|
Property |
Default |
Description |
|---|---|---|
|
IconFile |
|
This property can be used to define a custom icon for the Frontend. It will be shown in the window title bar and the task bar instead of the default MERLIC icon. You have to define the absolute path and file name of the icon. |
|
HideMVTecMerlicInFrontendWindow |
false |
This property defines whether the name of MVTec and MERLIC is visible in the window title of the Frontend and in the status message that is shown in the Frontend while loading the Frontend design. To hide company and product name, set the property to "true". As soon as the Frontend has been loaded, the window title that is defined in the "Frontend Properties" of the MERLIC Designer will be shown. |
For more information about the settings of the Frontend or the required settings for starting a remote Frontend, see the following topics:
Miscellaneous Settings
In addition, you can configure the following properties for the Frontend:
|
Property |
Default |
Description |
|---|---|---|
|
AlwaysShowROIHandles |
true |
This property is specifically included for devices with a touch screen to facilitate the usage of ROIs. The property is useful if the Image Display widget in your MERLIC Frontend also shows a region of interest (ROI). It defines if the interaction handles of the ROI are always shown (true) or not (false). |
|
HideWindowTitleBar |
false |
If set to "true" the MERLIC Frontend will start without showing the title bar of the application window. This will also affect the keyboard shortcuts that can be used, e.g., to close the window. |
|
ROIHandleSize_mm |
4 [mm] |
This property is specifically included for devices with a touch screen to facilitate the usage of ROIs. The property is useful if the Image Display widget in your MERLIC Frontend also shows a region of interest (ROI). It defines the size of the interaction handles of the ROI. It is defined in millimeters. |
|
StartInFullscreen |
false |
This property defines whether the MERLIC Frontend is started in full screen mode. If you want to display the Frontend automatically in full screen mode each time you start it, you can set this option to "true". If you want to use this option only for a single session, you can start the Frontend via command line with the option "--fullscreen". |
|
TmpPath |
%AppData%\Local\Temp\<user_group>_<user_name> |
The MERLIC Frontend requires access to a writable directory on the hard disk of your computer to temporarily store files. You can set the path to the directory using the "TmpPath" property. If the directory does not exist, MERLIC will try to create the directory. You can use slashes (/), backslashes (\) or double backslashes (\\) for file paths in MERLIC .ini files. However, MERLIC will internally store the paths with slashes (/). |
|
WindowGeometry |
|
This property can be used to specify the position and size of the MERLIC Frontend as follows: @Rect(x y w h) The values x and y define the position of the upper left corner of the Frontend. The values w and h define the width and height of the Frontend. All values must be given in pixels. If the Frontend property "StartInFullscreen" is set to "true", the Frontend will be opened in full screen mode and the setting for "WindowGeometry" will be ignored. [Frontend] WindowGeometry=@Rect(10 20 750 500) |
[Logging]
This section contains properties regarding the path, size, and number of log files, as well as the message threshold. For more information about the configuration including logging information for MERLIC with process integration, see the topic Logging.
|
Property |
Default |
Description |
Setting in the preferences of the MERLIC Creator |
|---|---|---|---|
|
LogFilePath |
%LOCALAPPDATA%\MVTec\MERLIC\ %LOCALAPPDATA%\MVTec\MERLIC\ |
This property defines the path to the directory in which the log file is stored. You can use slashes (/), backslashes (\) or double backslashes (\\) for file paths in MERLIC .ini files. However, MERLIC will internally store the paths with slashes (/). |
Log file path |
|
LogFileSizeInBytes |
10 485 760 (= 10 MB) |
This property defines the maximum size of the log files in bytes. If the maximum size of the log file is reached and the property "LogFilesCount" > 1, MERLIC will start to log the new messages into a new file. In case the maximum number of allowed log files is reached, MERLIC will start to overwrite the oldest messages. Minimum value: 1 048 576 = 1 MB |
Maximum size of log files |
|
LogFilesCount |
10 |
This property defines the maximum number of log files that are kept in the log file directory. If the maximum size is reached for each log file, MERLIC will delete older log files. |
Maximum number of log files |
|
Threshold |
info |
This property defines the used log level. Logging of messages of a given level generally includes the logging of all messages of stricter levels. The available log levels are the following:
|
Minimum log level |
[Logging]
LogFilePath=C:/Users/Public/Documents/Log_Files/
LogFilesCount=5
LogFileSizeInBytes=2097152
Threshold=error
[ProcessIntegration]
|
Property |
Default |
Description |
|---|---|---|
|
DefaultRecipe |
−1 |
This property defines the index of the recipe file that is loaded automatically if MERLIC is started with process integration, i.e., from the command line with "merlic_rte.exe". If this option is not defined, the recipe must be loaded by the PLC. You can set the default recipe using the MERLIC RTE Setup.
|
|
LocalImageStorePath |
|
This property allows you to specify a custom location and file name for the database of the extended image storage. By default, the images are stored in a temporary folder on the local disk. If not enough space is available on your disk, you can use this property to define a different location with enough space for the image storage. It only applies if the extended image storage is enabled via "UseLocalImageStore". This setting can also be configured in the MERLIC Creator. For more information, see the section "Process Integration" in the topic MERLIC Preferences. |
|
LocalImageStoreSize |
100 |
This property defines the number of images that will be cached in the extended image storage. It only applies if the extended image storage is enabled via "UseLocalImageStore". This setting can also be configured in the MERLIC Creator. For more information, see the section "Process Integration" in the topic MERLIC Preferences. |
|
ResultBufferSize |
10 |
This property defines the maximum number of results that are stored for the process integration. Thus, it represents the number of iterations for which the results of a MERLIC Vision App execution can be stored. If the number of results exceeds the buffer size, the oldest results will be discarded. The same applies to data components stored along the results. This setting can also be configured in the MERLIC Creator. For more information, see the section "Process Integration" in the topic MERLIC Preferences. |
|
RTEStartupISMConfiguration |
|
This property can be used to define the ISM configuration that shall be used as RTE startup configuration. The defined ISM configuration is automatically loaded and activated when MERLIC RTE starts.The RTE startup configuration can also be set in the Image Sources of the MERLIC RTE. For more information, see the topics Basic Terms and Concepts and Adding New Configurations and Image Sources. |
|
StartCommunicator |
false |
This property defines if the Communicator should also be started when starting MERLIC in process integration mode using MERLIC RTE. This instance of the Communicator uses the same port settings as MERLIC RTE and will be stopped, when MERLIC RTE is stopped. To automatically start the Communicator set the parameter to "true". |
|
UseLocalImageStore |
false |
This property defines whether an extended image storage is used for MERLIC RTE. It can be used to ensure that result images will still be available when the number of results exceeds the size of the in-memory storage defined in "ResultBufferSize", that is, when MERLIC RTE starts removing the oldest results from the in-memory storage. To enable extended image storage, you have to set the value to "true". This setting can also be configured in the MERLIC Creator. For more information, see the section "Process Integration" in the topic MERLIC Preferences. |
Optional Properties
|
Property |
Description |
|---|---|
|
Device<n> |
This property stores the device you defined in the "I/O" tab of MERLIC RTE Setup that is used for communication with the PLC. |
|
DeviceSettingsMetadata<n> |
This property stores additional information about the hardware you have configured. The information is used to properly display the device in the GUI while the hardware is not connected. |
|
Recipe<n> |
This property stores the name and absolute path of the MERLIC recipe files A MERLIC recipe file is a crucial part for the MERLIC process integration. It is a separate file (with file ending .mrcp) that defines which MERLIC Vision App is loaded for the process integration. It also defines how the MVApp is parametrized because it contains a set of pre-defined input values for selected tool parameters. You can create multiple recipe files with individual sets of input values for one and the same MVApp. This enables you to reuse an MVApp with different parameter settings for various scenarios of your application. You can also use a recipe file to load an MVApp for a completely different image processing task. (.mrcp) you defined in the MERLIC Creator. The property identifier "Recipe" is to be followed by an index number, starting from 0. Use the "Recipes" tab of the MERLIC RTE Setup to set the index number for the property "Recipe<n>". [ProcessIntegration] Recipe0=C:/recipes/recipe0.mrcp For more information on MERLIC recipes, see the topic MERLIC Recipe Files. |
[RecentlyWorkedOn]
This section contains a list of up to 10 MVApps you opened most recently. You can access the MVApps in the MERLIC Creator via "File → Recently Opened".
[Server]
If the server is activated via the "StartServer" property in the [General] section, the settings for the server must be added to the section [Server]. The following settings are available:
|
Property |
Default |
Description |
|---|---|---|
|
AnonymizeFrontendLog |
false |
This property can be used to define if the logged data are stored together with the corresponding user who made the changes. If it is set to "false", the user name is also stored with the logging data. If it is set to "true", the data are logged without any user information. |
|
MaxConnections |
10 |
This property sets the maximum number of allowed simultaneous connected Frontends. |
|
TcpHost |
This property defines the local IP address on which the MERLIC Server listens for Frontends to connect. By default, no value is set and the server listens on all network interfaces for IPv4 and IPv6 connections. If the host is set to 0.0.0.0, only IPv4 is available. If it is set to localhost or 127.0.0.1, the server only listens for locally running Frontends to connect. |
|
|
TcpPortMax |
9099 |
This property determines the maximum port of a range of ports the server should listen for Frontends to connect. Normally the server listens on "TcpPortMin". In case this port is already used by another application, MERLIC server uses the next available port within the defined range up to "TcpPortMax". |
|
TcpPortMin |
9090 |
This property determines the minimum port of a range of ports the server should listen for Frontends to connect. Normally the server listens on "TcpPortMin". In case this port is already used by another application, the MERLIC Server uses the next available port within the defined range up to "TcpPortMax". |
|
WriteLockTimeout |
10000 [ms] |
This property sets the duration for the write lock of a Frontend if the user interaction in a concurrent Frontend has been finished. |
[UserManagement]
This section defines the look of the user management window in the MERLIC Designer.
|
Property |
Default |
Description |
|---|---|---|
|
SplitterPosition |
280 |
This property defines the position of the splitter control that divides the list view on the left side and the properties view on the right side of the MERLIC User Management dialog. |
|
Window |
Rect(100 100 1024 768) |
This property defines the position and size of the MERLIC User Management dialog. |
For more information about the user management, see the topic Setting up the User Management.