A FW18 CODESYS 3.5 project image was auto-installed onto a new PFC200 via an SD card. Because the FW is 18, the Codesys 3.5 license was purchased separately and installed via the CODESYS License Manager. However, the controller continually stopped working after 2 hours, requiring a power cycle to resume operation.
Upon reviewing the CODESYS control log via SSH (cat /tmp/codesyscontrol.log), it stated that the license was not active and was in demo mode:
The Codesys 3.5 license is reconciled against some internal HW serial numbers. This is done by Codesys to prevent users from building a licensed system, cloning it, and skirting the cost. This means when you clone a manually licensed PFC to a new piece of HW it will kill the license. So when you try to add an additional license via Codesys License Manager you’ll get a second empty softcontainer. This leads to an unlicensed PFC (it can only handle one container).
The best way to avoid this is to remove the Codesys license from the PFC before creating the SD card image.
However, if this is not an option the solution is:
Immediately after auto-installing the project image onto the new PFC, delete (rm -r) the /var/opt/codesys/cmact_licenses directory and content of it.