Additional Settings for Communication Plug-ins
MERLIC provides some additional settings for communication plug-ins. Some of these settings are required if you want to configure communication plug-ins on a remote system or if you want to use custom communication plug-ins that you have implemented yourself.
All of these settings can be adjusted in the MERLIC configuration file, that is, in the INI file. You can change the settings in the default "MERLIC5.ini" file or in a separate INI file. If you want to set up different configurations for different use cases, you can create and maintain multiple INI files. You just have to make sure to start MERLIC RTE with the desired INI file if you want to use a different configuration than the one defined in "MERLIC5.ini". For more information on how to create a new INI file and how to start MERLIC RTE with a specific INI file, see Using Multiple MERLIC RTE Instances.
The following additional settings can be defined:
- Ports for remote configuration of communication plug-ins
- Location of communication plug-ins
- Configuration directory of communication plug-ins
Ports for Remote Configuration of Plug-ins
When connecting the MERLIC RTE Setup to a remote system to configure communication plug-ins, MERLIC uses ephemeral ports for the configuration services of the "Communication" tab.
If you want to use fixed ports instead, you can specify the desired ports in the INI configuration file or via the command line. You have to specify three ports to ensure that the remote configuration works correctly, for example, "10123;10124;10125". You may use ports in the range of 1024 to 65535.
When defining fixed ports, you have to ensure the following conditions are met:
- The specified ports must be free. Otherwise, MERLIC RTE will not start and the configuration in the MERLIC RTE Setup cannot be accessed.
- The specified ports should not overlap the ones defined for the configuration property "ImageSourceConfigurationPorts" in the [General] section of the INI configuration file. Otherwise, the configuration services cannot operate at the same time.
If the command line option "--plugin_config_ports" or the configuration property "PluginConfigurationPorts" in the INI file is used to define fixed ports, only one instance of MERLIC RTE can be started.
Defining the Ports in the INI File
The port settings for the remote configuration of communication plug-ins can be configured in the [Communicator] section of the INI file.
- Open the INI file you want to use.
- Check whether the INI file contains a [Communicator] section. If not, add the section by adding the heading [Communicator].
- Add the ports to the [Communicator] section as shown below. You can set port numbers in the range of 1024 to 65535.Copy
[Communicator]
PluginConfigurationPorts=<PORT1;PORT2;PORT3>
When MERLIC RTE is started, it will use the ports that are configured in the respective INI file. If you configured the port settings in the default INI file "MERLIC5.ini", they will be used automatically when starting MERLIC RTE without defining an INI file. If you configured the ports in a different INI file, you have to specify the desired INI file when starting MERLIC RTE. For this, you have to use the command line option "--ini". For more information, see Using Multiple MERLIC RTE Instances.
For more information on the available settings in the INI file, see The MERLIC INI File.
Defining the Ports via the Command Line
If you want to set the ports only for the current session of MERLIC RTE, you can define the ports in the command line when starting MERLIC RTE.
- Open a command prompt and change to the "bin\x64-win64" directory within the MERLIC installation path, for example, "%PROGRAMFILES%\MVTec\MERLIC-26.03\bin\x64-win64".
- Start MERLIC RTE and use the command line option "--plugin_config_ports" to the define the ports.Copy
merlic_rte.exe --plugin_config_ports <PORT1;PORT2;PORT3>The flag must be followed by the respective port number in the range of 1024 to 65535.
Location of Communication Plug-ins
If you implemented your own communication plug-ins, you might need to specify the location of the respective plug-in files for MERLIC RTE. By default, MERLIC searches the directory where the MERLIC executable files are located, for example, in "%PROGRAMFILES%\MVTec\MERLIC-26.03\bin\x64-win64". This is the directory where the provided communication plug-ins of MERLIC are located. If you implemented your own communication plug-in and placed the respective library in a different location, you have to specify the location of your custom plug-in for MERLIC RTE. Otherwise, the communication plug-in cannot be found and will not be available for use in the MERLIC RTE Setup.
If you need to add a new or different location to the plug-in directories, make sure to specify all directories in which communication plug-ins are located, including the default location of the communication plug-ins provided by MERLIC.
You can configure the list of plug-in directories in the INI configuration file. This way, you can use communication plug-ins from different directories in the same MERLIC RTE instance. All specified plug-in directories will be searched for plug-in libraries with the required "pmV" prefix for communication plug-ins. In the MERLIC RTE Setup, you will get a list of all communication plug-ins that have been found in the specified directories.
Defining the Plug-in Directories in the INI File
The plug-in directories can be configured in the [Communicator] section of the INI file.
- Open the INI file you want to use.
- Check whether the INI file contains a [Communicator] section. If not, add the section by adding the heading [Communicator].
- Add the plug-in directories to the [Communicator] section using the property "PluginDir" as shown in the example below. The list must be provided as a semicolon-separated list.Copy
[Communicator]
PluginDir=C:/communicator/plugins;C:/Program Files/MVTec/MERLIC-26.03/bin/x64-win64
This way, you can use communication plug-ins from different directories in the same MERLIC RTE instance. All specified plug-in directories will be searched for plug-in libraries with the required "pmV" prefix for communication plug-ins. In the "Communication" tab of the MERLIC RTE Setup, you will get a list of all communication plug-ins that have been found in the specified directories. If a plug-in with the same name appears in two or more of the specified plug-in directories, it is only listed once. When adding this plug-in to the MERLIC RTE Setup, the version in the directory which appeared first in the list of plug-in directories is used.
If you configured the plug-in directories in the default INI file "MERLIC5.ini", MERLIC will automatically search the specified plug-in directories when starting MERLIC RTE and all found plug-ins will be available in the MERLIC RTE Setup. If you configured the directories in a different INI file, you have to make sure that MERLIC RTE is using the configuration of the respective INI file. For this, you have to specify the desired INI file when starting MERLIC RTE using the command line option "--ini". For more information, see Using Multiple MERLIC RTE Instances.
Configuration Directory of Communication Plug-ins
MERLIC allows changing the location for the JSON configuration files of communication plug-ins. By default, the plug-in configuration files are located in "%AppData%\MVTec\Communicator\conf\" on Windows systems and "~/.config/MVTec/Communicator/conf" on Linux systems.
If you want to change the configuration directory, for example, because you have no write access to the default directory, you can specify the desired location in the INI configuration file.
Changing the Configuration Directory in the INI File
- Open the INI file you want to use.
- Check whether the INI file contains a [Communicator] section. If not, add the section by adding the heading [Communicator].
- Define the configuration directory in the [Communicator] section using the property "ConfigDir" as shown in the example below.Copy
[Communicator]
ConfigDir=D:/merlic/plugin_configuration
If the specified configuration directory doesn't exist, it will be created automatically when starting MERLIC RTE.
If you configured the location in the default INI file "MERLIC5.ini", the changes will be applied automatically when starting MERLIC RTE. The respective configuration files of the communication plug-ins will be automatically placed in the defined directory. If you configured the location in a different INI file, you have to make sure that MERLIC RTE is using the configuration of the respective INI file. For this, you have to specify the desired INI file when starting MERLIC RTE using the command line option "--ini". For more information, see Using Multiple MERLIC RTE Instances.
The configuration files of communication plug-ins can be configured by the user. However, we recommend that you only adapt these files manually if necessary because information may be overwritten by the "MVExpose" function.