TwinCAT in user space

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!

  • Share on:

6 Comments, RSS

  1. Kowalevskaja

    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/

  2. David

    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!

  3. Bruno

    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.

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.