Configuration Options for MERLIC RTE

You can configure various port settings for MERLIC RTE such as the ports for "events" and commands that are transmitted during the process integration. The ports for the configuration services of the Image Source Manager (ISM) can also be adjusted. This might be required if you want to configure image sources on a remote system and want to use fixed port settings.

The following configuration options are available:

Ports for "Events" and Commands

MERLIC uses specific default ports for "events" (21590) and commands (21591), that is, "actions". If no other ports are defined in the used INI file, MERLIC tries to use the default ports when starting MERLIC RTE. If one or both ports are already in use, MERLIC will use random ports instead, that is, two different ephemeral ports. The selected ports will be logged on startup in the respective MERLIC RTE log file.

To avoid using random ports for "events" and commands, you can adjust the port settings to use specific ports. The ports can be configured in the INI configuration file or via the command line.

Defining the Ports in the INI File

The port settings for "events" and commands can be configured in the [Communicator] section of the INI file.

  1. Open the INI file you want to use.
  2. Check whether the INI file contains a [Communicator] section. If not, add the section by adding the heading [Communicator].
  3. Add the ports to the [Communicator] section as shown below. You can set port numbers in the range of 1 to 65535.
    Copy
    [Communicator]
    EventPort=<event port>
    CommandPort=<command port>

When MERLIC RTE is started, it will use the ports that are configured in the respective INI file for "events" and commands. 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 for "events" and commands only for the current session of MERLIC RTE, you can define the ports in the command line when starting MERLIC RTE.

  1. Open a command prompt and change to the "bin\x64-win64" directory within the MERLIC installation path, for example, "%PROGRAMFILES%\MVTec\MERLIC-5.8\bin\x64-win64".
  2. Start MERLIC RTE and use the command line options "--event_port" and "--command_port" to the define the ports.
    Copy
    merlic_rte.exe --event_port <PORT1> --command_port <PORT2>

    Each flag Command line flags specify options for command line programs. Get more information about availlable flags by using "--help", e.g., "merlic_creator.exe --help". must be followed by the respective port number in the range of 1 to 65535.

Ports for Remote Configuration of Image Sources

By default, MERLIC uses ephemeral ports for the configuration services of the Image Source Manager (ISM) when connecting to a MERLIC RTE Setup on a remote system.

If you want to use fixed ports instead, you can adjust the port settings. The ports can be configured in the INI configuration file using the property "ImageSourceConfigurationPorts" or via the command line option "--image_source_config_ports".

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.

If you define 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 property PluginConfigurationPorts in the [Communicator] section. Otherwise, the configuration services cannot operate at the same time.

Defining the Ports in the INI File

The port settings for remote configuration services of the Image Source Manager can be configured in the [General] section of the INI file.

  1. Open the INI file you want to use.
  2. Add the ports to the [General] section as shown below. You may use ports in the range of 1024 to 65535.
    Copy
    ImageSourceConfigurationPorts=<PORT1;PORT2;PORT3>

When MERLIC RTE is started, it will use the ports that are configured in the respective INI file for the ISM configuration services. 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.

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.

  1. Open a command prompt and change to the "bin\x64-win64" directory within the MERLIC installation path, for example, "%PROGRAMFILES%\MVTec\MERLIC-5.8\bin\x64-win64".
  2. Start MERLIC RTE and use the command line options "--image_source_config_ports" to the define the ports.
    Copy
    merlic_rte.exe --image_source_config_ports <PORT1;PORT2;PORT3>

    The flag must be followed by the respective port numbers in the range of 1024 to 65535.

If the command line option "--image_source_config_ports" or the configuration property "ImageSourceConfigurationPorts" in the INI file is used to define fixed ports, only one instance of MERLIC RTE can be started.