FAQ - frequently asked questions and answers
In this section frequently asked questions are answered, in order to facilitate your work with the TwinCAT Usermode Runtime. If you have any further questions, please contact our support team at support@beckhoff.com.
- How do I start the TwinCAT Usermode Runtime?
- What does the error message mean “Too little memory when using the PLC”?
- How can I access the Usermode Runtime remotely?
- How is a collision of the AmsNetId prevented?
- Is TwinCAT C++ and CriticalSections available in the Windows context?
How do I start the TwinCAT Usermode Runtime (without TwinCAT SysTray)?
All instances stored in the ProgramData are automatically displayed in the TwinCAT SysTray icon and can be started by clicking on them.
You can also start the user mode runtime via the "start.bat" in your respective ProgramData folder. It can then be selected as the target system via the Automation Interface and, like other systems, can also be used with regard to: Activate Configuration, changing the status, etc.
The user mode runtime knows different modes with which it can execute the application. This can be set via the "-f" parameter when starting up.
Up to version 1.18.3, mode 0x8 was used by default - this offers no support for External Control (TC1701) or Fast As Possible (TC1702), so that up to this version the parameter "-f 0x4" had to be added to the respective Start.bat.
As of version 1.19, this mode is the default, so this step can be omitted.
What does the error message mean “Too little memory when using the PLC”?
![]() | This adjustment is normally no longer necessary from version 1.19.1. New memory is allocated dynamically by the operating system. |

If you get the error (shown above) when logging in (or through the autostart), your application requires more memory than the Usermode Runtime provides by default.
A file 3.1/TcRegistry.xml is available in the ProgramData directory of the user mode runtime, which you can use to change this configuration. Insert a value "HeapMemSizeMB", which specifies a value in megabytes. Here it is 512 MB:

How can I access the Usermode Runtime remotely?
The Usermode Runtime has its own router component and its own AmsNetId. The Usermode Runtime logs on to the system router component so that it can be reached locally via its own AmsNetId.
If the Usermode Runtime is to be accessible from another system, the file 3.1\StaticRoutes.xml can be extended in its ProgramData directory, as described in the documentation TwinCAT 3 ADS-over-MQTT.
How is a collision of the AmsNetId prevented?
A Usermode Runtime requires a unique AmsNetId on the system. This is saved in the configuration in your ProgramData directory 3.1\TcRegistry.xml.
If a Usermode Runtime has already occupied this AmsNetId at startup, the 2nd byte is incremented: 199.4.42.250.1.1 thus becomes 199.5.42.250.1.1.
Is TwinCAT C++ and CriticalSections available in the Windows context?
The CriticalSections synchronization mechanism is not available in the Windows context for TwinCAT C++. It is not required if the state machine is used correctly. The EnterCriticalSection call is therefore ignored in these transitions. However, in Usermode Runtime, the call terminates the process via an exception to improve understanding. The following code queries this explicitly: if ( !InWindows() )
m_cs.EnterCriticalSection();
m_counter = 0x00u;
if (!InWindows() )
m_cs.LeaveCriticalSection();
However, it is important to familiarize yourself with the state machine of the C++ modules and to use it appropriately. Critical sections can be omitted in these steps.
