IMDHMIControls LibraryShop main store

Troubleshooting

Fix ctrlX PLC license invalid exceptions on download

PLC programming Published 6 min read

Short answer

The CmpApp invalid-license-metrics exception has two separate causes: a missing CODESYS IO-Link entitlement, shown by a demo-mode line in the log, or a known symbol-configuration bug cleared by Online > Reset Origin before the download. No Data Layer access license exists to buy.

On this page
  1. Read the exception before you buy anything
  2. The IO-Link branch and the two-hour window
  3. The symbol branch and the Reset Origin workaround
  4. Worked example: clearing both exceptions on a drive controller with two grippers
  5. What the activated licenses do and do not cover
  6. Download sequence that ends clean
  7. Questions asked

The exception has two different causes, and the download log tells you which one you have. If the log carries Demo mode for IO-Link started. Will expire and stop! License for IO-Link not installed., your mapped IO-Link variables are running on the demo window of a missing CODESYS IO-Link entitlement, and the fix is to license it. If the exception appears only when you enable a symbol or configure a Data Layer real-time variable, with no IO-Link line in the log, that is a known bug in the symbol configuration handling: run Online > Reset Origin on the controller, then download. There is no Data Layer access license to buy. The cases and fixes below are scoped to ctrlX OS 2.4 with ctrlX PLC Engineering 2.4.1.

Read the exception before you buy anything #

The message comes from CmpApp, the application manager of the runtime:

*#EXCEPTION* [License invalid] in application [Application]* - Application app=Application has invalid license metrics!

It states that the loaded application uses a feature the activated entitlements do not cover, so the runtime refuses to start it. The complaint is feature-level, not a verdict that your PLC entitlement is defective. How the underlying entitlement sizes itself from project contents is a separate question, covered in how the ctrlX PLC license calculates I/O data and core use; what matters at this message is which feature tripped it, and the log answers that.

Evidence in the same download log Cause Corrective branch
Demo mode for IO-Link started. Will expire and stop! License for IO-Link not installed. The IO-Link master function runs without its entitlement Install the CODESYS IO-Link license
Exception only after enabling a symbol or a Data Layer real-time variable, with no IO-Link line Known bug in symbol-configuration handling Online > Reset Origin, then download
Both lines present Both causes are active Clear both, each with its own fix

Hold one distinction: reading and writing the gripper variables from the engineering editor proves the communication path to the master works. It proves nothing about what the application is entitled to execute. Editor access and task execution are separate tests, and only the second raises this exception.

In the case this diagnosis is built around, the grippers sit behind an ifm AL1102 IO-Link master on PROFINET. Three entitlements were active on the controller, and the communication one among them covers the PROFINET-family controller role, which is why the editor reads work. The IO-Link master function inside the runtime is entitled separately, and none of the three covers it; the list further down names each one and its role.

Without its license, the CODESYS IO-Link function runs in demo mode for two hours, then stops until a manual restart. That gives you a signature: IO-Link data that dies at a fixed offset from the application start, on a bus reporting no fault, is the missing entitlement, not a PROFINET problem. The window is a signature, not an operating mode — the supported state for a machine running grippers on IO-Link is a licensed runtime.

The entitlement to buy is the CODESYS IO-Link SL single-device license. When this fault was diagnosed it had to be ordered directly from CODESYS, because it was not yet listed among the PLC add-ons in the ctrlX Store; check both channels when ordering, because the store lineup changes between releases. If your master sits on EtherCAT rather than PROFINET, the wiring and device-setup side of that integration is covered in route an IO-Link master to a ctrlX CORE over EtherCAT.

The symbol branch and the Reset Origin workaround #

The reproduction is precise: enable one variable in the symbol configuration and download, and the exception appears. Configure Data Layer real-time variables instead, and it appears again. It is reported on ctrlX PLC Engineering 2.2.0 and on 2.4.1, with the PLC entitlement active, which already tells you this branch is not solved by a purchase.

The workaround: bring the machine to a safe state, run Online > Reset Origin in ctrlX PLC Engineering, then download. The reset returns the application on the controller to its initial state and stops what is loaded, so it belongs in commissioning rather than mid-production. After it, the download lands on a clean controller and the exception does not return.

What there is not: a Data Layer access in-app license. The license-overview table that lists Data Layer interaction entitlements is outdated documentation; symbol exposure and real-time variables need nothing beyond the PLC entitlement you already hold. Once the download succeeds, the published symbols are what a client consumes when it is reading ctrlX CORE variables without an OPC UA server.

Worked example: clearing both exceptions on a drive controller with two grippers #

Inputs, each from the diagnosed case or the documentation:

  • Controller: a ctrlX Drive with integrated ctrlX Core, running ctrlX OS 2.4, programmed with ctrlX PLC Engineering 2.4.1.
  • Plant: two robot grippers behind an ifm AL1102 IO-Link master on PROFINET, with one task-assigned program using mapped IO-Link variables.
  • Log on download: the CmpApp invalid-license-metrics exception, plus the demo-mode line for IO-Link.
  • Trigger tests: symbol exposure alone raised the exception; real-time configuration alone raised it; the mapped IO-Link variable raised it with no Data Layer symbols configured.
  • Entitlements activated: 3, none of them the IO-Link one.
  • Documented demo behavior: 2 h without a license, then a manual restart.

Rule in words: count the entitlements against the features, and time the stops. A mapped IO-Link variable executed by a task requires the IO-Link entitlement. An exception that tracks symbol configuration alone requires the reset.

The arithmetic:

  • Entitlements covering IO-Link: 3 activated − 3 covering the PLC runtime, its version upgrade and PROFINET communication = 0, so 1 entitlement is missing.
  • Timing, with a download at 08:00 as an illustrative start: demo mode expires at 08:00 + 2 h = 10:00. A restart at 10:05 then runs to 12:05. Stops that sit two hours after each start confirm the licensing branch.

Result: with the IO-Link entitlement installed, followed by a reset and a fresh download, the log carries neither line and the gripper variables keep updating past the two-hour mark.

Decision: both log lines present means both fixes, in that order — license first, then reset and download. Either line alone means that branch only. Nothing is purchased for the Data Layer side.

What the activated licenses do and do not cover #

  • ctrlX OS License - PLC Standard (02VRS+ / add-on): the PLC runtime entitlement. It was already active, so it is not the missing one, and buying it again fixes nothing here.
  • ctrlX OS License - PLC Basic Version Upgrade (02VRS): the version step of the PLC entitlement. Not involved in either branch.
  • ctrlX OS License - CODESYS - Communication IEC61784 Family 3 Controller (add-on): the PROFINET-family controller role, proven working by the editor reads. It does not cover the IO-Link master function.
  • Not installed: the CODESYS IO-Link single-device entitlement, the only purchase either branch needs.

Download sequence that ends clean #

  1. Install and activate the IO-Link entitlement on the controller that runs the application, on the target itself rather than only in a license account.
  2. Bring the machine to a safe state.
  3. In ctrlX PLC Engineering, run Online > Reset Origin.
  4. Download the complete project, with the symbol configuration and the real-time variables included.
  5. Confirm the log shows neither the CmpApp exception nor the demo-mode line.
  6. Leave the application running more than two hours past the download and confirm the gripper variables still update; that is the pass test for the licensing branch.

Questions asked

Does the PROFINET communication license cover the IO-Link devices behind the master?

No. The IEC 61784 Family 3 entitlement covers the controller's PROFINET role, which is why reading and writing the gripper variables in the engineering editor works. The IO-Link master function inside the runtime is entitled separately, so repurchasing the communication add-on will not clear the exception. Mapped variables used by a task need the CODESYS IO-Link license as well.

Is there a Data Layer access license I need for symbol exposure?

No. The documentation table listing Data Layer interaction in-app licenses is outdated; if a vendor page still shows that row, treat it as obsolete. Symbols published through the symbol configuration and Data Layer real-time variables need nothing beyond the PLC entitlement. The exception those triggers raise is the configuration bug, and Online > Reset Origin before the download clears it.

What does Reset Origin do, and when should I avoid it?

It returns the application on the controller to its initial state and stops what is loaded, which is what the workaround for the symbol-configuration bug needs. Run it only in a controlled commissioning state with the machine safe, plan the download immediately after it, and never as a mid-production action on a running line.

How do I tell the two-hour demo stop from a genuine fieldbus fault?

Demo mode stops the IO-Link function exactly two hours after the application started, returns after a manual restart, and stops again two hours later. A fieldbus fault follows diagnostics, cable or device events instead of that fixed offset. Check the last download's timestamp against the stop time before touching the cable; repeated stops at the offset mean the license is missing, and the fix is to license it, not to keep restarting.

Will a newer ctrlX PLC Engineering version make the reset unnecessary?

That is not established. The symptom is reported on ctrlX PLC Engineering 2.2.0 and on 2.4.1, and the reset-before-download workaround cleared it on both. Until release notes for your version list the bug as fixed, keep the reset in the sequence after symbol configuration changes.

Keep reading

  • How-to

    Route an IO-Link master to a ctrlX CORE over EtherCAT

    Install the AL1930 ESI in ctrlX I/O Engineering, set channel one to the sensor's documented bytes (4 for a TS2289, 2 for a TP3231), deactivate unused slots, and download until the master reports OP. Cyclic TxPDO bytes feed the PLC, CXA_EthercatMaster blocks read vendor and product ID over AoE with the master NetID, and EoE routing for ifm Moneo or LR clients depends on the master firmware.

    PLC programming

  • Troubleshooting

    Fix STEP 7 V5.5 warning after TIA Portal wrote an S7-300

    Download the hardware configuration and blocks from a freshly created SIMATIC Manager project and the warning clears; a CPU 313C-2DP recovered exactly this way. Formatting the MMC with the mode switch (MRES held roughly 9 s until the STOP LED stays lit) does not clear the TIA-written state, so use it only when you also want the card empty.

    PLC programming

  • How-to

    How to run two TwinCAT PLC programs on one laptop

    Merge both PLC projects into one TwinCAT XAE system configuration and activate it once. The XAE assigns each PLC project its own ADS port (851 to the first, 852 to the next by default numbering), and both programs reach RUN on the local runtime. Changing the port in one of two separate XAE projects does not work, because one activation replaces the other.

    PLC programming