3

I am currently running Twincat 3.1..4022.16 on Hyper V virtual machine. I am able to correctly build my project but when activating configuration I am getting realtime startup isolated cpu fail.

Attached is my Realtime setting and the error.

enter image description here

Any leads to solution will be highly appreciated.

DeC
  • 2,226
  • 22
  • 42
sami.khan
  • 31
  • 1
  • 1
  • 3
  • 1
    Did you click on Read from target to get the actual core configuration? Did you restart your machine after isolating the cores? – Filippo Boido Dec 24 '19 at 17:50

7 Answers7

7

I got the following errors when trying to activate my configuration using TwinCAT 4024.10.

Severity Description
Error 'TwinCAT System' (10000): Sending ams command >> Init4\RTime: Start Interrupt: Ticker started >> AdsError: 4132 (0x1024, RTIME: incompatible software detected) << failed!
Error 'TCRTIME' (200): start of real-time avoided by "HyperV"

error messages visual studio

Solution

The issue was caused by the fact that I had earlier tried to get Docker working on my laptop. In order to get Docker to work I had to enable a bunch of Hypervisor options. After realizing this I reverted these by doing the following:

  1. Press the windows key and start typing "Turn Windows features on or off"

    windows features

  2. In the following menu, make sure "Virtual Machine Platform" and "Windows Hypervisor Platform" are deselected. In case either option was selected, deselect it and restart your computer for it to take effect.

    turn off windows hypervisor features

Roald
  • 2,459
  • 16
  • 43
1

I found this on the Beckhoff website:

The runtime environment cannot be started inside a Hyper-V environment. This refers in particular to virtual Hyper-V machines, which are run in a privileged Hyper-V machine. As soon as a component of the computer uses Hyper-V, only the engineering environment (XAE) can be used on this computer, not the runtime environment (XAR). Apart from software solutions for virtual machines, you can also use operating system means (Device Guard, Credential Guard, virtualization-based security, etc.) or other Hyper-V programs.

Link

Filippo Boido
  • 1,136
  • 7
  • 11
1

Read available number of CPUs from the Target, then change number of Isolated Cores from 0 to any higher number (most cases 1) and decrease number of Cores that are dedicated to Windows. After that click Set on target.

Here's link to detailed article about Twincat and Virtualization alltwincat.com/2018/06/14/twincat-virtualization/

MIHOW
  • 21
  • 4
  • A link to a solution is welcome, but please ensure your answer is useful without it: [add context around the link](https://meta.stackexchange.com/a/8259) so your fellow users will have some idea what it is and why it’s there, then quote the most relevant part of the page you're linking to in case the target page is unavailable or changes. [Answers that are little more than a link may be deleted](https://stackoverflow.com/help/deleted-answers). – coreuter Jun 09 '21 at 17:05
1

This is a supplement to Roald's answer.

If you already deactivated Virtual Machine Platform, Windows Hypervisor Platform and Microsoft Defender Platform Guard and still doesn't work, chances are you have virtualization-based security enabled. You can check it by typing msinfo on windows search box.

Check if VBS is enabled

To deactivate it, type Core Isolation on the windows search box and deactivate Memory Integrity. Restart the machine and run ms info again to make sure that VBS is off.

By deactivating memory integrity you disable Virtualization-Based Security

Go to Twincat, activate your project and witness a miracle!

Felipe Cunha
  • 166
  • 1
  • 5
1

Supplement to Felipe's and Roald's answer: latest offender prohibiting TwinCAT from starting is yet another virtualization feature: Windows Sandbox. Can be turned toggled in the Windows Features dialog accessible from Start->Turn Windows features on or off.

stijn
  • 34,664
  • 13
  • 111
  • 163
0

If none of the above solutions worked, try to uncheck the below settings in Windows 11:

Privacy & security > Windows security > device security > core isolation > memory integrity >> off

RiveN
  • 2,595
  • 11
  • 13
  • 26
0

Further supplement to the solutions above. I did all above, but "Virtualization-based security" was still "Enabled" in System Information (see Felipe's answer).

I had to turn off SystemGuard in regedit by setting "Enabled" to "0". Registry path: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\SystemGuard

After reboot "Virtualization-based security" was correctly "Not enabled".

regedit

Kolc
  • 1