C/C++

Installation "Microsoft Windows Driver Kit 7 (WDK)"

 
 
Note
WDK installation from 4024.0 optional
The WDK installation described here is optional as of TwinCAT 3.1 Build 4024.0.

Overview

The Microsoft Windows Driver Kit (WDK) enables the development of Windows kernel drivers. TwinCAT C++ drivers are based on this WDK.

TwinCAT 3.1 4022:
The implementation of TwinCAT 3 C++ modules requires parts of the Windows Driver Kit 7 (WDK 7) up to TwinCAT 3.1 4022.
TwinCAT 3.1 4024:
From Build 4024, the WDK is no longer required, as TwinCAT provides the required components. If the environment variable WINDDK7 (as described below) exists, the WDK is used, otherwise not.
The use of the WDK can also be configured project-related via the TwinCAT C++ project.

Installation of WDK 7 for TwinCAT 3.1. 4022 and earlier

The installation is only necessary for the TwinCAT 3 engineering environment in order to be able to create and edit C++ modules. The WDK installation is not required on the target system (XAR).

1.
Download the Windows Driver Kit 7.1 from the Microsoft Download Center https://www.microsoft.com/en-us/download/details.aspx?id=11800.
 
2.
Following the download, either burn a CD of the downloaded ISO image or use a virtual (software-based) CD drive.
3.
Start KitSetup.exe of the ISO image that has been downloaded or burnt on CD (on Windows 7 PCs, start the installation with Run As Administrator...).
4.
Select the option Build Environment – none of the other components are required by TwinCAT 3 – and click on OK to continue.
 tc3-xar-cpp-winddk-optionw
5.
After accepting the Microsoft EULA license, select the destination folder for the installation.
By default the root folder "C:\" will be selected - therefore "C:\WinDDK\7600.16385.1" will be suggested.
The digits "7600…." may be different in the case of a newer version of the Windows Driver Kit.
6.
Start the installation with OK.
 tc3-xar-cpp-winddk-installtarget
7.
In future TwinCAT 3 will take care of the following step, but for now it must be done manually: Navigate to Start-> Control Panel -> System and select Advanced system settings.
8.
Select the Advanced tab and then click on Environment Variables…
9.
In the lower area of System variables, select New.. and enter the following information:
Variable name "WINDDK7"
Variable value "C:\WinDDK\7600.16385.1"
The path may differ with a different version of the Windows Driver Kit or if a different installation path is specified.
 tc3-xar-cpp-winddk-addsystemenvresult
10.
Following the installation, log in again or restart the PC to confirm the new environment variable settings.