Skip to main content

Configuration

The CODESYS Mass Licenser is configured by means of a configuration file. The file must be named CML.cfg and be located in the C:\ProgramData\CODESYS CML\configuration\ directory.

The CODESYS Mass Licenser add-on will not start without the configuration file.

Important

Administrator permissions are required to create the CFG file.

There are basically two different license configurations:

  • Configuration for a license ticket which contains only one license.

  • Configuration for a license ticket for a bundle license for several products

    A bundle license always includes several, non-identical products. One example of this is an application-based runtime system license (CODESYS Control Basic). By default, this bundle license also includes the license for operating the TargetVisu and the WebVisu (CODESYS Visualization S) and the license for operating the symbol configuration, the communication manager, and the data source manager (CODESYS Communication S). It does not include a license for operating a soft PLC.

Example 1. Example

Configuration file for the license types: single license and bundle license

Single license

Bundle license

{
    "Settings" : [
        { "Username" : "admin" },
        { "Password" : "admin" },
        { "LicenseCentralUrl" : "https://license.codesys.com/gateways"},
        { "GatewayAddress" : "192.168.101.67" },
        { "FilterDeviceId" : "0x8041"},
        { "FilterNodeName" : "^MyDevice-*"},
        { "LogVerbose" : false},
        { "ConnectTimeout" : 0},
        { "LogRotateEntries" : 10000},
        { "KeepUserDB" : false },
        { "LicenseDongle" : false },
        { "LicensesFillLevel" : 10 },
        { "LicensesFillLevelAction" : "<FilePath>" },
    ],
    "Licenses" : [
        {
            "LicenseName" : "1stlicense",
            "LicenseFile" : "%APPDATA%\\CODESYS CML\\licenses\\CML_TestA_LicenseA.txt",
            "LicenseFirmCode"    : 6000437,
            "LicenseProductCode" : 20000,
            "LicenseFeatureMap"  : "",
        },
        {
            "LicenseName" : "2ndlicense",
            "LicenseFile" : "%APPDATA%\\CODESYS CML\\licenses\\CML_TestA_LicenseB.txt",
            "LicenseFirmCode"    : 6000437,
            "LicenseProductCode" : 20001,
            "LicenseFeatureMap"  : "0004",
         }
    ]
} 
{
    "Settings" : [
        { "Username" : "admin" },
        { "Password" : "admin" },
        {"LicenseCentralUrl" : "https://license.codesys.com/gateways"},
        { "GatewayAddress" : "192.168.101.67" },
        { "FilterDeviceId" : "0x8041"},
        { "FilterNodeName" : "^MyDevice-*"},
        { "LogVerbose" : false},
        { "ConnectTimeout" : 0},
        { "LogRotateEntries" : 10000},
        { "KeepUserDB" : false },
        { "LicenseDongle" : false },
        { "LicensesFillLevel" : 10 },
        { "LicensesFillLevelAction" : "<FilePath>" },
    ],
    "Licenses" : [
        {
            "LicenseName" : "1stlicense",
            "LicenseFile" : "%APPDATA%\\CODESYS CML\\licenses\\CML_TestA_LicenseA.txt",
            "LicenseFirmCode"    : 6000437,

            "LicenseBundle" :    [
                {
                    "LicenseProductCode" : 12290,
                    "LicenseFeatureMap"  : "2000"
                },
                {
                    "LicenseProductCode" : 12291,
                    "LicenseFeatureMap"  : "0800"
                },
                {
                    "LicenseProductCode" : 12292,
                    "LicenseFeatureMap"  : "0200"
                }
            ]
        }
    ]
}

Tip

More examples can be found under C:\ProgramData\CODESYS CML\configuration\ after installation.



Parameter description

Parameter

Description

Default Value

Data Type

Optional

Username

User name which the CODESYS Mass Licenser uses to create the temporary user management

CMLTool

STRING

Yes

Password

Password which the CODESYS Mass Licenser uses to create the temporary user management

Serial number of the device

STRING

Yes

GatewayAddress

Address of the gateway where the controllers can be reached

Localhost

STRING

Yes

FilterDeviceId

Filter for the device ID

Only devices with a suitable ID are considered by the CODESYS Mass Licenser. For hexadecimal values, specify the 0x prefix. You can either take the values from the device description or detect them by scanning in CODESYS.

STRING

Yes

FilterNodeName

Filter for the device name

Only devices with a suitable ID are considered by the CODESYS Mass Licenser. C# regex expressions are permitted.

STRING

Yes

LogVerbose

Detail level in the log output

FALSE: No details

TRUE: Output with details

FALSE

BOOL

Yes

ConnectTimeout

Time allowed to establish a connection

20 seconds

Integer

Yes

LogRotateEntries

Number of entries stored in the log file

After that, the entries are overwritten.

Integer

Yes

KeepUserDB

Specifies whether or not the user defined by user name and password is retained after the licensing process

For security reasons, this setting should only be used for devices with a preconfigured user administration. Otherwise, the user administration configured here, which has not been created directly by the user, is retained.

FALSE

BOOL

Yes

LicenseDongle

Specifies whether or not the license should is saved on a Wibu license dongle

Only one dongle may be plugged into the device at a time. By default, the license is saved in a soft container.

FALSE

BOOL

Yes

LicensesFillLevel

Specifies a minimum number of available licenses with a warning displayed beneath it.

10

Integer

Yes

LicensesFillLevelAction

Specifies a path to an executable file which is called when the minimum number of available licenses have been depleted

String

Yes

Under the "Licenses" field, enter the licenses which you want to activate on the controllers. Some parameters are required for this:

Parameter

Description

LicenseName

Name of the license

This parameter is only used for differentiation in log outputs.

LicenseFile

Directory where the text files with the respective licenses are stored

This has to exist in order for the CODESYS Mass Licenser to start.

LicenseFirmCode

Firm code of the respective license

The firm codes are listed in the table below.

LicenseProductCode

Product code of the respective license

The product codes are listed in the table below.

LicenseFeatureMap

Feature map of the respective license

The feature maps are listed in the table below.

LicenseBundle

Parameters for bundle licenses

LicenseFeatureMap and LicenseProductCode must be entered and grouped under this entry for bundle licenses.

Important

Note that all licenses must have the same firm code for successful licensing with CODESYS Mass Licenser.

If a license container is already available on your device, then make sure that the licenses to be imported have the same firm code. Moreover, you also need to configure the CODESYS Mass Licenser with the firm code of the available license container.

Important

For detailed information and an itemized list of all licenses and the respective firmcodes and product codes, contact us at sales@codesys.com.