Starting the Communicator and Plug-ins

There are different ways to start the Communicator, a Communicator plug-in, and the process integration mode of MERLIC, i.e. MERLIC RTE MERLIC RTE (Runtime Environment) is the name of the application that is used to start MERLIC in process integration mode. It can be started either via the Windows start menu or via the command line with the executable "merlic_rte.exe".. You can start the Communicator on its own or together with a Communicator plug-in. It is also possible to start the Communicator and MERLIC RTE in one step.

To start a Communicator plug-in, the Communicator itself must already be running. Therefore, if you start the plug-in separately from the Communicator, you have to make sure that the Communicator is already running. Otherwise, the plug-in cannot be started. Provided that the Communicator is running, a plug-in can be started and stopped at any time, regardless if MERLIC RTE is running unless stated otherwise in the plug-in. If the Communicator is running, you can also access the configuration of a plug-in in the MERLIC RTE Setup. For more information on the configuration in the MERLIC RTE Setup, see the topic Configuring Communicator Plug-ins. Beside the configuration of Communicator plug-ins, you can also start and stop the plug-ins in the MERLIC RTE Setup.

The following sections describe the different ways to start and stop the Communicator, Communicator plug-ins, and MERLIC in process integration mode.

Starting the Communicator

The following sections describe the different ways to start the Communicator. The easiest way is to use the Windows start menu. However, in some cases it might be useful to start the Communicator via the command line and make use of the available command line options.

If you want to start the Communicator with specific settings, e.g., the used ports, you can either set these in an .ini file or with command line options. For more information, see the topic Changing Communicator and Plug-in Settings.

Starting the Communicator via the Windows Start Menu
  1. Open the Windows start menu.
  2. Navigate to "MVTec MERLIC 5.6 > MERLIC 5.6 Communicator" to start the Communicator.
Starting the Communicator from the Command Line

To start the Communicator via the command line, change to the "bin\x64-win64" directory within the MERLIC installation and use the following command:

Copy
merlic_communicator.exe

This command starts the Communicator without any plug-in. To start a plug-in with the Communicator, you can use the "--plugin" option as described in the section Starting the Plug-in from the Command Line.

There are also some further command line options available that enable you to set specific settings for the Communicator. They are described in detail in the drop-down menu below. See also the topic Changing Communicator and Plug-in Settings for more information on how to define specific settings for the Communicator

Starting the Process Integration Mode with the Communicator

You can also start the process integration mode, i.e., MERLIC RTE, and the Communicator in one step either via the Windows start menu or via the command line. In some cases it might be useful to use the command line and make use of the available command line options, e.g., if you want to use specific ports.

Starting MERLIC RTE and the Communicator in One Step via the Windows Start Menu
  1. Open the Windows start menu.
  2. Navigate to "MVTec MERLIC 5.6 > MERLIC 5.6 RTE with Frontend + Communicator" to start MERLIC RTE, the respective Frontend, and the Communicator.
Starting MERLIC RTE and the Communicator in One Step via the Command Line

To start MERLIC RTE and the Communicator via the command line, change to the "bin\x64-win64" directory of the MERLIC installation and start MERLIC RTE, i.e., "merlic_rte.exe", with the command line option "--communicator" or "-c".

Copy
merlic_rte.exe --communicator

If you also want to start the respective Frontend, you can add the command line option "--frontend" or "-f". This would be equivalent to the option via the Windows start menu.

For more information about how to start MERLIC RTE and the available command line options, see the topic Starting the Process Integration Mode in the MERLIC manual.

If you want to change default settings for MERLIC RTE, e.g., the used ports, you can use the .ini file for MERLIC (MERLIC5.ini) to set the desired values. When starting MERLIC process integration via the start menu, the settings in the MERLIC5.ini file will be used. For more information about the MERLIC5.ini file, see the topic The MERLIC .ini File in the MERLIC manual.

If you start the Communicator and MERLIC RTE via the command line and define the ports for "events" and commands with the command line options "--event_port" and "--command_port", you have to make sure that the port settings of "merlic_rte.exe" and "merlic_communicator.exe" match to establish a connection.

Starting and Stopping a Communicator Plug-in

You can start a Communicator plug-in in the "Communication" tab of the MERLIC RTE Setup and via the command line. In the MERLIC RTE Setup, you can also access the configuration of a plug-in instance. If you change the configuration, you can immediately start the plug-in from the MERLIC RTE Setup.

Starting the Plug-in in the MERLIC RTE Setup
  • Select the desired plug-in from the list of plug-in instances on the left side and click on the button " Start plug-in" at the bottom of the MERLIC RTE Setup.
  • Alternatively, you can use the menu of the respective plug-in instance.

To get more detailed information about how to start and stop a Communicator plug-in in the MERLIC RTE Setup, see the topic Starting and Stopping Communicator Plug-ins in the MERLIC manual.

Starting the Plug-in from the Command Line

To start one or multiple plug-ins with the Communicator, change to the "bin\x64-win64" directory within the MERLIC installation and use the following command:

Copy
merlic_communicator.exe --plugin <NAME1> [--plugin <NAME2> ...]

The Communicator will be started and the plug-in will be loaded and started automatically. For more information on the available command line options for "merlic_communicator.exe", see the section Starting the Communicator from the Command Line.

When starting the plug-in via the command line, some side effects and restrictions need to be considered. Therefore, we recommend to start the plug-in in the "Communication" tab of the MERLIC RTE Setup.

Stopping a Communicator Plug-in

You can stop a plug-in instance in the "Communication" tab in the following ways:

  • Select the desired plug-in from the list of plug-in instances on the left side and click on the button " Stop plug-in" at the bottom of the MERLIC RTE Setup.
  • Alternatively, you can use the menu of the respective plug-in instance.

Result Format

To get information about the format in which the results are returned, see the topic Result Format in the reference documentation of the Communicator API.

Stopping the Communicator

To stop the Communicator, open the respective command shell and press "Ctrl+C". You can end and restart MERLIC or the Communicator at any time.

Stopping MERLIC While the Communicator is Running

If MERLIC is ended safely while the Communicator is still running, the respective plug-ins receive the information that MERLIC changed to the "Halted" state. When MERLIC is started again, the information about the changes of the MERLIC states are forwarded to the plug-ins via the events. The connection to the plug-ins is restored.

Stopping the Communicator While MERLIC is Running

If the Communicator is stopped while MERLIC is still running, only the plug-ins are closed. MERLIC keeps running. When the Communicator is started again, it reconnects automatically with MERLIC. The plug-ins will be reopened and are ready to receive events.

All events that are sent while the Communicator is not connected are lost. They are not stored in any way.