If you want to write TwinCAT 3 software and run it, it’s not obvious how to get TwinCAT 3 to run on your desktop machine, be it directly on the machine or inside a virtual machine. The primary reason for this is because TwinCAT 3 is running in something called kernel space. While I was bored recently on a late afternoon, I discovered that Beckhoff had quietly added some files in the TwinCAT 3 folder in one of the newer releases of TwinCAT 3, that might change all of this.
How you may wonder? Let’s find out!
I hope you are bored again any time soon 😉 Many thanks, Jacob, you shared this information with us! This is great news going on.
I guess Beckhoff needs this feature for themselves too for their Cloud-Engineering plattform*, which (I hope for them) is based on instances of virtual machines.
*https://www.beckhoff.com/en-us/products/automation/cloud-engineering/
Hi! Haha yes, luckily I’m bored quite often! You are correct, the cloud engineering is probably another good use-case for it!
Thanks so much for finding and sharing this.
Beckhoff announced this feature last summer for 4026 and we have been waiting for it since then.
Trying it myself the runtime crashed when I ran my program. I could trace the issue back to FB_S_UPS_CX51x0. Calling an instance of that function block, seems to do something the user mode runtime can’t handle. After skipping the call, everything works smothly so far.
Another funny thing is, that the Runtime seems to pretend to be running on a BSD system, when reading the system details.
Keep up the good work!
There is an official product announcement for this feature:
https://www.beckhoff.com/en-en/products/automation/twincat/tc1xxx-twincat-3-base/tc1701.html
Thank you for discovering this nice feature.
I tried this out and for a small example it’s working fine. But when trying to run a more realistic project, the XAE stated that ther is not enough memory on device.
Did you or anyone else already find out how the available memory could be increased?
The physical amount of memory should not be the problem on my Notebook.
Hi! You need to adjust the amount of router memory available for TwinCAT. I don’t have my computer with TwinCAT/BSD available now, but I think it’s possible to configure the amount of router memory via an XML file in the folder for the UM-TwinCAT.
I asked Beckhoff support about this problem and found a solution:
You need to add a “registry” value in the file “C:\TwinCAT\3.1\Runtimes\\3.1\TcRegistry.xml”.
In “HKLM/Software/Beckhoff/TwinCAT3/System/” you need to add
1400
The value is in Hexadecimal format, with this setting 1400 you reserve more than 1GB.
Increasing the Router Memory is counter productive, since it takes away memory from the heap.
@Jakob: In my previous Post are the xml tags missing. Looks like sharp brackets and the text within are not supported in comments.
Can you restore them?
Hey Sem,
could you repost the XML tags, maybe using a placeholder for the sharp brackets? Thanks in advance.
Could you please repost at least the name of the registry variable under the System key, which configures the amount of memory?
I have the same issue, and according to Beckhoff’s support, this error message is not related to the router memory, but to the data segment (.data) of the binary. It will be fixed with the release of build 4026.
Interesting. I wonder if this will allow cyclic communication between user space and real time. I miss the R3IO api in Tc2 that allowed for cyclically updating task image data to synchronize with soft-real-time user program.
Did anyone try to run MOTION/NC project in User-Mode? When I try to start a project with an NC-Axis, I get the error message: „[..] LoadDrv for driver >TcNc< failed [..]”
Is this not supported (yet)? I am using TwinCAT 4024.47.