Configuration
The entire configuration of the TwinCAT 3 Usermode Runtime is carried out in the \3.1 directory. The structure of the directories is described at File storage.
Here you will find the usual files that are also used for the real-time runtime. On the one hand, this concerns the boot directory, which contains the program to be executed by enabling a configuration. On the other hand, the target directory, which for example also contains the route information via StaticRoutes.xml for the Usermode Runtime.
Under Windows, TwinCAT saves a number of settings in the system-wide Windows registry. Because the Usermode Runtime may have different settings than the real-time runtime, the TcRegistry.xml file is provided locally in the \3.1 directory for this purpose.

The following XML entries in the TcRegistry.xml are of particular interest for the TwinCAT 3 Usermode Runtime:
- The structure used is similar to the Windows registry, so that adaptations can also be derived for other components.
- HeapMemSizeMB (see example below): Total size of the memory used.
In real-time runtime, it corresponds to the nonpaged pool of Windows, but in Usermode Runtime, it is allocated completely at startup. The memory must be sufficient for - Router memory: Is defined via the Engineering Realtime-Tab->Settings->Router Memory. This value is stored as
LockedMemSize
(in bytes) in the TcRegistry.xml. - Application memory: Memory that is allocated by the runtime itself, the PLC, TMX modules or also dynamically by the application.
<?xml version="1.0"?>
<TcRegistry>
<Key Name="HKLM">
<Key Name="Software">
<Key Name="Beckhoff">
<Key Name="TwinCAT3">
<Value Name="CurrentVersion" Type="SZ">3.1</Value>
<Key Name="System">
<Value Name="RunAsDevice" Type="DW">1</Value>
<Value Name="AmsNetId" Type="BIN">C0A804010101</Value>
<Value Name="HeapMemSizeMB" Type="DW">512</Value>
</Key>
[…]