Encrypting Modules
TwinCAT C++ modules loaded via the TwinCAT Loader (TMX files) can be encrypted, i.e. a key protects the content of the driver against manipulation and reverse engineering at file level.
![]() | No debugging Encrypted modules cannot be searched for errors. Encrypted modules are not displayed in the debugger. |
Module encryption is enabled as follows:
- The TwinCAT software protection must be configured.
- A TwinCAT user certificate with Sign UserDB rights is required.
- 1. In the system tree, select the Solution User DB Key as the Boot File Encryption Key.
- 2. Select the C++ project and activate encryption there:
- 3. To start, an encrypted module must be loaded with the TwinCAT Loader (not the operating system).
- For non-versioned drivers: The drivers are encrypted during transfer to the _deployment directory of the project.
- For versioned TMX: The drivers are stored unencrypted in XAE and encrypted when they are activated on the target system.
- If the function is used with versioned C++ projects, the TMX files are stored in the repository as usual.
TwinCAT C++ modules can be started in two ways:
- Operating system: The operating system starts the TwinCAT module as a normal driver.
It is recommended to migrate to the TwinCAT Loader with TMX files. - TwinCAT Loader: The TwinCAT Loader starts the TwinCAT module.
- The TwinCAT Loader requires a signature with TwinCAT user certificate.
- This option is mandatory for encrypted modules.
- The TwinCAT Loader is required for the versioned C++ projects.
Via System -> TcCOM Modules -> Class Factories tab you can see whether the TwinCAT Loader or the operating system is used: