Tab: Software metrics for license determination
A metric in this environment is the "value" (number) of units relevant to the license calculation. Depending on the product, this can be, for example, the size of the user code (in bytes) or the number of axes, I/O channels, or fieldbus instances.
The tab of the device editor displays a tree structure containing the metrics which are available for the application. In this way, you can view the current measured values and check whether or not more code is downloaded to a controller than the license allows. The license is issued for each controller and is therefore located on the controller. The license check is also performed there.
The metrics are transferred to the controller during the download. They are refreshed when you click for the active application.
Read current metrics from device | Gets and transfers the metrics from the controller and displays them in the Value on Device column. |
Generate code to calculate metrics | The code must be generated to calculate the metrics. |
Show licenses | Opens the Licenses dialog The dialog shows the license required for the project. The Open all in Store and close dialog command opens the suggested product in CODESYS Store International. If you want to display the product in CODESYS Store North America, then you need to select the North America store in the CODESYS options. |
Metric | Metric types per application |
Value in Project | Number of tags used in the development system. The value is measured during code generation ( command). For details about the calculation, see the Calculation of the values section. Note: If you delete the compile information of the application, then the values will be reset to 0. |
Max. allowed by License | Allowed maximum values for each application according to the license on the controller |
Value on Device | Actual measured value, read from the controller Note: To determine these values, the communication has to be working. |
Calculation of the values
Metric | Determined Value |
|---|---|
Size of User Code | Value (in bytes) Only user-programmed code (implementation) is evaluated. Code which has not been compiled with the IEC compiler is not evaluated. The number and size of variables in the declaration is not relevant. IEC libraries developed by the user are evaluated for the code size. Standard libraries, system libraries, and communication stacks of the CODESYS GmbH are not evaluated. |
Task Group Assignment | For the configuration of IEC task groups in the task configuration, a "Task Group Assignment" license is required in many cases if the IEC tasks are executed on different CPU cores. No: No license is required for the following configurations:
Yes: A license is required for the following configurations:
|
Fieldbus, I/O channels | Number of mapped channels with basic data type ( ImportantIf you have selected the Always update variables option, then all channels will be taken into account in the calculation, regardless of whether or not they are assigned to a specific IEC variable. |
Instances of CANopen, Modbus, PROFIBUS, SAE J1939 | Used fieldbus stack instances of this type A Master/Controller or a Slave/Device is counted as one instance in the device configuration. The devices which are linked to these Masters/Slaves in the device tree are not counted. These are counted via the I/O channels. Fieldbus gateways are also counted as an instance (exception: CANopen Gateway). For more information, see the following: Fieldbuses – Licensing |
Instances of EtherCAT, EtherNet/IP, PROFINET | |
Number of visualization tags | |
SoftMotion | |
Communication |
Information about the license packages for the application-based licenses can be found in the CODESYS Store.
Fieldbuses are licensed based on the number of created instances of the respective fieldbus type. Each generated fieldbus stack instance is added to the software metrics needed to determine your license.
A client (master, controller) of a fieldbus created in the device tree
A standalone remote server or local server (slave, device) created in the device tree
Fieldbus stack instances which are created programmatically via the respective library
Fieldbus gateways, with the exception of CANopen gateways
All servers (slaves) in the device tree which are configured below a client (master). These are taken into account via the I/O channels used.
As a result, the number of instances corresponds to the number of fieldbus stack instances of a type which are actually used.
The example uses a Modbus to explain how to determine the number of instances which are needed to determine the appropriate license for you.

The following instances are displayed in the device tree:
(1) | Two server devices are inserted below a client device. The client is counted as one instance, and the two servers assigned to it are not. This adds up to a total of 1 instance. |
(2) | An instance is instantiated locally as a server. The data can be accessed by multiple clients. The server is counted as 1 instance. |
(3) | A TCP client which is assigned to the remote TCP servers is counted as one instance. The inserted remote TCP servers do not apply as an instance and are therefore not counted. The TCP client is counted as 1 instance. |
(4) | These local TCP servers each represent one instance. Their data can be accessed by multiple TCP clients. This adds up to a total of 2 instances. |
(5) | |
Result: For this example configuration, 5 instances are counted. | |
PROGRAM PLC_PRG VAR FB_Client_TCP: ModbusFB.ClientTCP; // = Modbus_Client_TCP - count license + FB_Server_TCP_Local: ModbusFB.ServerTCP;// = Modbus_Server_TCP_Local - count license + FB_Server_TCP_Local2: ModbusFB.ServerTCP;// = Modbus_Server_TCP_Local2 - count license + FB_Read_Write: ModbusFB.ClientRequestReadWriteMultipleRegisters; // = Modbus-Server Remote FB_Read: ModbusFB.ClientRequestReadHoldingRegisters; // = Modbus-Server Remote FB_Write: ModbusFB.ClientRequestWriteMultipleRegisters ; // = Modbus-Server Remote END_VAR
The Modbus instances of server and client created in the example are created programmatically via the ModbusFB library (declaration).
The declaration includes:
2 instances of a server
1 instance of a client
Result: In this example, 3 instances are counted.

To refresh the display, the project must be compiled. In the example, there are a total of 8 instances can be seen on the Software metrics for license determination tab in the Instances of CANopen, Modbus, PROFIBUS,SAE J1939 area.
A total of 8 Modbus instances are counted, resulting in the following required license package in this example:
CODESYS Control Standard M