Getting Twincat XAE to function on MacBook Pro

I finally got sick and tired of all my windows laptops breaking physically one way or another. First there was ThinkPad Edge, then there was the ultrathin Sony Vaio (bought just before Sony sold the business and discontinued the thing).

Computer Says Yes: Intel Processor Identification Utility Says Yes

Developers, Linus Torvalds included, online seemed to agree that MacBooks are the best hardware on the market.

So bought one, and installed Windows 10 with Bootcamp. All was swell, until I decided to try the Beckhoff TwinCAT XAE environment for PLC (programmable logic) programming.

This is a guide for getting VT-x to actually be available for VMware and TwinCAT in a MacBook Pro. This does not always work, mind you. And it stops working the instant the laptop goes to sleep for the first time. Apparently this has been an issue for years. What’s taking so long, Apple? Seriously? Sheesh.

little-britain-usa-101-episode-1-avi_000229437

Step by step

The VT-x virtualization wasn’t enabled according to TwinCAT XAE environment. According to Intel’s tool, it was though.

Also according to Apple’s command line tool on OS X it was there (instructions).

Mac:~ user$ sysctl -a | grep machdep.cpu.features
kern.exec: unknown type returned
machdep.cpu.features: FPU VME DE PSE TSC MSR PAE MCE CX8 APIC SEP MTRR PGE MCA CMOV PAT CLFSH DS ACPI MMX FXSR SSE SSE2 SS HTT TM SSE3 MON VMX EST TM2 TPR PDCM
So something’s definitely fishy here.
But both VMware and TwinCAT seemed to agree it wasn’t there:

Ok, so maybe it is just disabled. How to enable it then?

Okay so this page tells me to first turn the laptop off, like bigtime hardcore turn it off – press the power key for ten seconds or more to really make it turn off.

 

After this, I was supposed to turn on OS X (which required me to press Alt key on startup since I had Windows setup as default for Boot Camp), and then from Finder menu boot to Windows. I did that, started up XAE, and magic! …. it didn’t work. But there was A DIFFERENT cryptical error message.

2016-05-26 15_50_28-DemoLaite - Microsoft Visual Studio

Ok, so I

  • pressed start key,
  • typed cmd,
  • pressed the command prompt item that appeared with two fingers (on macbook that’s a right click, you know),
  • selected Run as Administrator,
  • cd’d to that path c:\TwinCAT\3.1\System,
  • executed that BAT win8settick.bat file, it took a while to complete.

And rebooted.

Started up XAE again, Activated Configuration, and now COMPUTER SAYS YES! I am happy now.

2016-05-26 16_21_54-DemoLaite - Microsoft Visual Studio

 

Hey! What did you think?