Configuring the Plug-in

The configuration of the MODICON®* plug-in can be adjusted in the "Communication" tab of the MERLIC RTE Setup. In the "Communication" tab, you can add an instance of the MODICON®* plug-in, configure the parameters, and you can start and stop the plug-in directly in the user interface.

Enabling the Configuration in the MERLIC RTE Setup

To enable the configuration of the plug-in in the "Communication" tab of the MERLIC RTE Setup, you first have to start MERLIC RTE and perform the following steps:

  1. Open the MERLIC RTE Setup and go to the "Communication" tab. If MERLIC RTE is not running, you can start it directly from the "Communication" tab.
  2. Add the MODICON®* plug-in to the list of plug-in instances on the left.

  3. Make sure that the plug-in is currently not running. Otherwise, the parameters are not available for the configuration. You can see the current state of the plug-in at the respective status icon in the list of plug-in instances. If the status shows the icon , the plug-in is running. In this case, you have to stop it by clicking the " Stop plug-in" button on the bottom of the MERLIC RTE Setup. If the status shows the icon instead, the plug-in is currently not running. In the example image below, the selected instance of the MODICON®* plug-in is currently not running and therefore the configuration is possible.

  4. Select the MODICON®* plug-in on the left to display its parameters and to start with the configuration.

The parameters of the selected MODICON®* plug-in are shown on the right of the "Communication" tab.

Plug-in Parameters

Parameters of this type represent general parameters for the communication plug-in that cannot be adjusted in the configuration area of the "Communication" tab. They may show the version number of the plug-in, the current parameter value for the log level, the access level of the plug-in, and the setting for the validation of the plug-in configuration. These values need to be set in different locations or with different methods, respectively.

Version

This parameter shows the version number that has been defined during the plug-in implementation. It consists of a major, minor, and maintenance version. It is also shown when adding a new plug-in instance. The version is optional. Therefore, it is possible that no version number has been defined during the implementation.

Log level

This parameter shows the log level of the plug-in instance. By default, the log level is set to the log level of the respective MERLIC RTE process when adding the plug-in instance in the MERLIC RTE Setup.

Access level

This parameter shows the access level that is set for the plug-in. For the MODICON®* plug-in, the access level is set to "monitor and control" by default. This means that the plug-in can receive "events" and send "actions". The access level correlates with the capability that is defined in the implementation of the plug-in. The access level cannot be adjusted in the MERLIC RTE Setup.

Supports rapid validation

This parameter shows whether the plug-in supports the immediate validation of the current plug-in configuration. For this plug-in, the check box is ticked indicating that "rapid validation" is supported. This means that the configuration of the plug-in is validated with each modification of any editable parameter in the "Communication" tab of the MERLIC RTE Setup. If the plug-in does not support "rapid validation", the configuration of the plug-in is validated only when saving the configuration.

User Parameters

The "User parameters" represent the set of parameters that can be configured for the plug-in. They are displayed in different categories which can be expanded or closed.

The following sections describe the parameters for each category.

Ethernet Connection Details

The parameters in this category define the settings for the connection to the PLC. For more information on how to set up the connection to the PLC, see Setting Up the Connection to the PLC.

The following image shows an overview of the parameters with the respective default setting. A detailed description of the parameters follows the image.

IP address

This parameter defines the Internet Protocol address (IP address) of the MODICON®* PLC to which you want to connect. By default, it is set to "127.0.0.1". The parameter supports only Internet Protocol version 4 (IPv4) addresses. The usage of host names is thereby not supported.

Port

This parameter defines the port used for the connection. By default, it is set to "502".

Result Handling Behavior

The parameters in this category define settings with respect to the retrieval of the results. For more information on the result handling of the different modes, see Result Modes.

The following image shows an overview of the parameters with the respective default setting. A detailed description of the parameters follows the image.

Result mode

This parameter allows you to select the mode of querying the results. You can choose between "Free-running" and "Dequeue from buffer". By default, the parameter is set to "Dequeue from buffer". In the following table, we give a short description for each mode.

Mode

Description

Free-running

In this mode, the results of a single or continuous execution are immediately written to the respective memory addresses of the PLC without any handshake mechanism. This mode is the fastest but it can also be the most error prone. Depending on the timing of both MERLIC and the PLC, it might be possible that some results get lost or overwritten before the PLC can collect them.

Dequeue from buffer

In this mode, an internal FIFO queue is used to save the incoming results after starting a single or continuous execution. If the PLC requests a result by setting the "GMV_REQCOMMANDCODE" to 10, the first result in the buffer is written to the respective memory address of the PLC. The requested result is then immediately removed from the queue.

Result buffer capacity

This parameter defines the size of the buffer which is used to temporarily store the results when using "Dequeue from buffer" as result mode. It represents the number of results that can be saved in the buffer. By default, it is set to 10.

This parameter is used only if "Dequeue from buffer" is set as result mode. It has no effect if "Result mode" is set to "Free-running". Therefore, it will be deactivated for configuration if the "Free-running" mode is selected.

DequeueResult command timeout

This parameter defines the timeout for the "Dequeue from buffer" mode when waiting for a new result. If the PLC requests a result and the respective result is not available yet, all other requests will be blocked until the result is available or until the specified timeout expired. By default, the timeout is set to 1000 ms.

This parameter is used only if "Dequeue from buffer" is set as result mode. It has no effect if "Result mode" is set to "Free-running". Therefore, it will be deactivated for configuration if the "Free-running" mode is selected.

Writing Data to PLC Memory

The parameters in this category define how many results can be transmitted to the PLC. You have to set the desired number for each data type separately. Make sure that the configuration fits to all MERLIC recipes you want to use, that is, to all MERLIC Vision Apps that are referenced in the recipes.

By default, no results will be transmitted to the PLC. Therefore, you first have to adjust the parameters in this category accordingly and set the desired number of results for each data type.

The following image shows an overview of the parameters. A detailed description of the parameters follows the image.

Head Holding Register address

This parameter defines the first "Holding Register Address" of the block that is reserved on the PLC. This block includes all values that are written by the plug-in and read by the PLC, for example, the current state and result values.

By default, it is set to 0 which corresponds to %MW0 on the PLC.

BOOL (Bit) result allocation

This parameter defines the number of Boolean results that can be transmitted to the PLC. For example, if you want to transmit up to five Boolean results, set the parameter to 5 or higher.

The PLC will reserve and map the register addresses for the required fields. The symbol of the fields will be composed of the prefix "GMV_RESULT_BOOL", followed by the index of the respective MVApp result. For example, "GMV_RESULT_BOOL_0" will be used for the first result of this data type.

By default, the parameter is set to 0 which means that no Boolean result will be transmitted.

Parameters of this data type require exactly one bit. Therefore, exactly one bit of a register address is mapped to the field of a Boolean result provided that up to 16 results are selected. The individual results within a given register are addressed using a hexadecimal digit, for example, %MW35:X0. If more than 16 Boolean results are returned, further register addresses are mapped to provide a field for each result.

INT (signed 16-bit integer) result allocation

This parameter defines the number of INT results that can be transmitted to the PLC. For example, if you want to transmit up to five INT results, set the parameter to 5 or higher.

The PLC will reserve and map the register addresses for the required fields. The symbol of the fields will be composed of the prefix "GMV_RESULT_INT", followed by the index of the respective MVApp result. For example, "GMV_RESULT_INT_0" will be used for the first result of this data type.

By default, the parameter is set to 0 which means that no INT result will be transmitted.

Parameters of this data type require exactly 16 bits which correspond to exactly one register address, for example, %MW36.

DINT (signed 32-bit integer) result allocation

This parameter defines the number of DINT results that can be transmitted to the PLC. For example, if you want to transmit up to five DINT results, set the parameter to 5 or higher.

The PLC will reserve and map the register addresses for the required fields. The symbol of the fields will be composed of the prefix "GMV_RESULT_DINT", followed by the index of the respective MVApp result. For example, "GMV_RESULT_DINT_0" will be used for the first result of this data type.

By default, the parameter is set to 0 which means that no DINT result will be transmitted.

Parameters of this data type require exactly 32 bits which correspond to exactly two register addresses. Therefore, two registers are reserved but only the address of the first will be mapped, for example, %MD37 if the addresses %MD37 and %MD38 are used. The prefix "%MD" of the address also indicates that parameters of this data type are mapped via a double word.

REAL (single-precision floating-point) result allocation

This parameter defines the number of REAL results that can be transmitted to the PLC. For example, if you want to transmit up to five REAL results, set the parameter to 5 or higher.

The PLC will reserve and map the register addresses for the required fields. The symbol of the fields will be composed of the prefix "GMV_RESULT_REAL", followed by the index of the respective MVApp result. For example, "GMV_RESULT_REAL_0" will be used for the first result of this data type.

By default, the parameter is set to 0 which means that no REAL result will be transmitted.

Parameters of this data type require exactly 32 bits which correspond to exactly two register addresses. Therefore, two registers are reserved but only the address of the first will be mapped, for example, %MF39 if the addresses %MF39 and %MF40 are used. The prefix "%MF" of the address also indicates that parameters of this data type are mapped via a double float word.

STRING[80] result allocation

This parameter defines the number of STRING[80] results that can be transmitted to the PLC. For example, if you want to transmit up to five STRING[80] results, set the parameter to 5 or higher. The PLC will reserve and map the register addresses for the required fields.

By default, the parameter is set to 0 which means that no STRING[80] result will be transmitted.

Parameters of this data type require exactly 80 bytes (640 bits) which corresponds to exactly 40 register addresses. They are mapped via a sequence of single WORDS, for example, %MW41 to %MW80, each corresponding to two bytes of ASCI characters. The symbols of the fields will be composed of several components. The first component is the prefix "GMV_RESULT_STRING80" which indicates that the field refers to a result of data type STRING[80]. The second component is the index of the respective MVApp result. The third and last component is a suffix which is composed of the character "W" and an index number which indicates to which of the 40 registers containing the STRING[80] value the respective field refers to.

For example, the field with symbol "GMV_RESULT_STRING80_0_W0" references the first register address which is reserved for the first STRING[80] result. Thus, it will be used for the value of the first two bytes of the first STRING[80] result. The fields "GMV_RESULT_STRING80_0_W0" to "GMV_RESULT_STRING80_0_W39" then represent the registers that are reserved for the value of the first STRING[80] result.

Reading Data from PLC Memory

The parameters in this category define how many iteration parameters can be provided per data type to the PLC. An iteration parameter represents a parameter that serves as argument for the execution of the MVApp to override the value of the corresponding MVApp parameter that is given in the prepared recipe. This allows you to run the MVApp with other input values without the need to change the recipe. Thus, the user parameters in this category define how many parameter values per data type can be overridden by the PLC for the execution.

By default, no iteration parameters will be available for configuration by the PLC. Therefore, you first have to adjust the parameters in this category accordingly and set the desired number of iteration parameters for each data type.

The following image shows an overview of the parameters. A detailed description of the parameters follows the image.

Head Input Register address

This parameter defines the first "Input Register Address" of the block that is reserved on the PLC. This block includes all values that are written by the PLC and read by the plug-in, for example, requested commands and values of iteration parameters. By default, it is set to 100 which corresponds to %MW100 on the PLC.

With the default setting of the corresponding parameter Head Holding Register address in the section "Writing Data to PLC Memory", 100 register addresses are available for the block of values that are written by the plug-in. However, these might not be enough in all use cases. For example, if a lot of results shall be transmitted with the execution of an MVApp and these results require more than 100 register addresses on memory, the "Head Input Register address" must be increased. Otherwise, the block written by the plug-in and the block written by the PLC would overlap because they attempt to write to the same addresses. To prevent this, the MERLIC RTE Setup shows an error if the "Head Input Register address" in "Reading Data from PLC Memory" is set too low.

Alternatively, you can also set the parameter to a large number to minimize the chances of a memory overlap. However, you have to avoid setting a register address outside the valid range. The amount of available memory depends on the PLC model and cannot be queried in advance from the plug-in. Therefore, the setting of this parameter will be checked first when starting the plug-in and attempting to communicate with the PLC. As soon as the PLC attempts to write a value to an unavailable register address, an error occurs. The error is emitted on the "GMV_ERRORCODE" and "GMV_ERRORCAUSE" fields and the errors will also be logged in the log file of MERLIC RTE.

Polling cycle time for ReqCommandCode

This parameter defines the cycle time in which the value of the field "GMV_REQCOMMANDCODE" is read.

By default, it is set to 10 ms which means that the plug-in checks every 10 ms whether a new command is requested by the PLC.

BOOL (Bit) iteration parameter allocation

This parameter defines the number of iteration parameters of data type Boolean that can be transmitted from the PLC to MERLIC. For example, if you want to allow the PLC to override the Boolean values of up to five MVApp parameters defined in the recipe, set the parameter to 5.

The PLC will reserve and map the register addresses for the required fields. The symbols of the fields will be composed of the prefix "GMV_ITPARAM_BOOL", followed by the index of the respective MVApp result. For example, "GMV_ITPARAM_BOOL_0" will be used for the value of the first iteration parameter of this data type.

By default, the parameter is set to 0 which means that no field will be added for any parameters of this data type.

Parameters of this data type require exactly 1 bit. Therefore, a single bit of a register address is mapped to the field of a Boolean parameter, up to 16 parameters. The individual iteration parameters within a given register are addressed using a hexadecimal digit, for example, %MW109:X0. If more than 16 Boolean parameters are defined, another register address is mapped to provide a field for each iteration parameter.

In addition, another field will be added: "GMV_ITPARAMUSEARRAY_BOOL_W0". This field is used by the PLC to indicate whether the provided parameter values in the recipe shall be overridden for the next execution by the values defined in the fields of the respective iteration parameters. The symbol of the field is composed of two components. The first component is the prefix "GMV_ITPARAMUSEARRAY_BOOL" which indicates that the field refers to iteration parameters of data type Boolean. The second component is the suffix "W0" which refers to the first of the two register addresses that were reserved.

For each available iteration parameter of this data type, the PLC needs to define bit by bit whether it should be used for the execution. For example, if you set this parameter to 2 and want to use both Boolean parameters in the next execution, the PLC needs to set the value of the "GMV_ITPARAMUSEARRAY_BOOL_W0" field to 0b11 (or 3 in decimal notation).

INT (signed 16-bit integer) iteration parameter allocation

This parameter defines the number of iteration parameters of data type INT that can be transmitted from the PLC to MERLIC. For example, if you want to allow the PLC to override the INT values of up to five MVApp parameters defined in the recipe, set the parameter to 5.

The PLC will reserve and map the register addresses for the required fields. The symbols of the fields will be composed of the prefix "GMV_ITPARAM_INT", followed by the index of the respective MVApp result. For example, "GMV_ITPARAM_INT_0" will be used for the value of the first iteration parameter of this data type.

By default, the parameter is set to 0 which means that no field will be added for any parameters of this data type.

Parameters of this data type require exactly 16 bits which correspond to exactly one register address, for example, %MW110.

In addition, another field will be added: "GMV_ITPARAMUSEARRAY_INT_W0". This field is used by the PLC to indicate whether the provided parameter values in the recipe shall be overridden for the next execution by the values defined in the fields of the respective iteration parameters. The symbol of the field is composed of two components. The first component is the prefix "GMV_ITPARAMUSEARRAY_INT" which indicates that the field refers to iteration parameters of data type INT. The second component is the suffix "W0" which refers to the first of the two register addresses that were reserved.

For each available iteration parameter of this data type, the PLC needs to define bit by bit whether it should be used for the execution. For example, if you set this parameter to 2 and want to use both INT parameters in the next execution, the PLC needs to set the value of the "GMV_ITPARAMUSEARRAY_INT_W0" field to 0b11 (or 3 in decimal notation).

DINT (signed 32-bit integer) iteration parameter allocation

This parameter defines the number of iteration parameters of data type DINT that can be transmitted from the PLC to MERLIC. For example, if you want to allow the PLC to override the DINT values of up to five MVApp parameters defined in the recipe, set the parameter to 5.

The PLC will reserve and map the register addresses for the required fields. The symbols of the fields will be composed of the prefix "GMV_ITPARAM_DINT", followed by the index of the respective MVApp result. For example, "GMV_ITPARAM_DINT_0" will be used for the value of the first iteration parameter of this data type.

By default, the parameter is set to 0 which means that no field will be added for any parameters of this data type.

Parameters of this data type require exactly 32 bits which correspond to exactly two register addresses. Therefore, two registers are reserved but only the address of the first will be mapped, for example, %MW111 if the addresses %MW111 and %MW112 are used.

In addition, another field will be added: "GMV_ITPARAMUSEARRAY_DINT_W0". This field is used by the PLC to indicate whether the provided parameter values in the recipe shall be overridden for the next execution by the values defined in the fields of the respective iteration parameters. The symbol of the field is composed of two components. The first component is the prefix "GMV_ITPARAMUSEARRAY_DINT" which indicates that the field refers to iteration parameters of data type DINT. The second component is the suffix "W0" which refers to the first of the two register addresses that were reserved.

For each available iteration parameter of this data type, the PLC needs to define bit by bit whether it should be used for the execution. For example, if you set this parameter to 2 and want to use both DINT parameters in the next execution, the PLC needs to set the value of the "GMV_ITPARAMUSEARRAY_DINT_W0" field to 0b11 (or 3 in decimal notation).

REAL (single-precision floating-point) iteration parameter allocation

This parameter defines the number of iteration parameters of data type REAL that can be transmitted from the PLC to MERLIC. For example, if you want to allow the PLC to override the REAL values of up to five MVApp parameters defined in the recipe, set the parameter to 5.

The PLC will reserve and map the register addresses for the required fields. The symbols of the fields will be composed of the prefix "GMV_ITPARAM_REAL", followed by the index of the respective MVApp result. For example, "GMV_ITPARAM_REAL_0" will be used for the value of the first iteration parameter of this data type.

By default, the parameter is set to 0 which means that no field will be added for any parameters of this data type.

Parameters of this data type require exactly 32 bits which correspond to exactly two register addresses. Therefore, two registers are reserved but only the address of the first will be mapped, for example, %MW113 if the addresses %MW113 and %MW114 are used.

In addition, another field will be added: "GMV_ITPARAMUSEARRAY_REAL_W0". This field is used by the PLC to indicate whether the provided parameter values in the recipe shall be overridden for the next execution by the values defined in the fields of the respective iteration parameters. The symbol of the field is composed of two components. The first component is the prefix "GMV_ITPARAMUSEARRAY_REAL" which indicates that the field refers to iteration parameters of data type REAL. The second component is the suffix "W0" which refers to the first of the two register addresses that were reserved.

For each available iteration parameter of this data type, the PLC needs to define bit by bit whether it should be used for the execution. For example, if you set this parameter to 2 and want to use both REAL parameters in the next execution, the PLC needs to set the value of the "GMV_ITPARAMUSEARRAY_REAL_W0" field to 0b11 (or 3 in decimal notation).

STRING[80] iteration parameter allocation

This parameter defines the number of iteration parameters of data type STRING[80] that can be transmitted from the PLC to MERLIC. For example, if you want to allow the PLC to override the STRING[80] values of up to five MVApp parameters defined in the recipe, set the parameter to at least 5.

By default, the parameter is set to 0 which means that no field will be added for any parameters of this data type.

Parameters of this data type require exactly 80 bytes (640 bits) which corresponds to exactly 40 register addresses. They are mapped via a sequence of single WORDS, for example, %MW115 to %MW154, each corresponding to two bytes of ASCI characters. The symbols of the fields will be composed of several components. The first component is the prefix "GMV_ITPARAM_STRING80" which indicates that the field refers to an iteration parameter of data type STRING[80]. The second component is the index of the respective MVApp parameter. The third and last component is a suffix which is composed of the character "W" and an index number which indicates to which of the 40 registers, reserved for the STRING[80] parameter value, the respective field refers to. For example, the field with symbol "GMV_ITPARAM_STRING80_0_W0" references the first register address which is reserved for the first STRING[80] iteration parameter. Thus, it will be used for the value of the first two bytes of the first STRING[80] iteration parameter. The fields "GMV_ITPARAM_STRING80_0_W0" to "GMV_ITPARAM_STRING80_0_W39" then represent the WORDS reserved for the value of the first iteration parameter of data type STRING[80].

In addition, another field will be added: "GMV_ITPARAMUSEARRAY_STRING80_W0". This field is used by the PLC to indicate whether the provided parameter values in the recipe shall be overridden for the next execution by the values defined in the fields of the respective iteration parameters. The symbol of the field is composed of two components. The first component is the prefix "GMV_ITPARAMUSEARRAY_STRING80" which indicates that the field refers to iteration parameters of data type STRING[80]. The second component is the suffix "W0" which refers to the first of the two register addresses that were reserved.

For each available iteration parameter of this data type, the PLC needs to define bit by bit whether it should be used for the execution. For example, if you set this parameter to 2 and want to use both STRING[80] parameters in the next execution, the PLC needs to set the value of the "GMV_ITPARAMUSEARRAY_STRING80_W0" field to 0b11 (or 3 in decimal notation).

Export Symbols

The parameters in this category define the location and name of the file that is exported when starting the plug-in. The file is based on the configuration of the plug-in and contains the global symbols of all fields that shall be reserved by the PLC. It contains some standard symbols that are always exported such as the symbol for requesting commands and also the symbols for the number of results and iteration parameters that are defined in the configuration of the plug-in.

The file is formatted as a CSV file (comma-separated values file) and can be imported to the project of the PLC program.

The following image shows an overview of the parameters with the respective default setting. A detailed description of the parameters follows the image.

Output directory

This parameter defines the directory in which the file will be saved. You can select the directory from the file system via the button (on local systems) or you can type the path directly into the text field. By default, it is set to "%LOCALAPPDATA%/Temp" on Windows systems and to "/tmp" on Linux systems.

Output file name

This parameter defines the name of the exported file. You can change the name directly in the text field. By default, it is set to "gMV_Symbols".

The file extension is automatically appended to the file name. If any other file extension is added manually, it is replaced with the compatible extension.


* Modicon® is a registered trademark of Schneider Electric USA, Inc.