4.5. Microsoft Windows

4.5.1. EcSimulatorHilDemo - Microsoft Windows

  1. Install EC-Simulator

    Run setup.exe from EC-Simulator package, which will guide you through the installation process.

  2. Determine the network interface

    For example the option -ndis 0 will be using the network adapter card with the IP address

  3. Connect EtherCAT Master

    The EtherCAT Master can be directly connected to the target system. In rare cases an interposing Ethernet switch helps reducing frame loss on Master startup due to triggered auto-negotiation.


    The local IT infrastructure should not be mixed with EtherCAT modules on the same Ethernet adapter. The EtherCAT Master sends many broadcast packets!

  4. Run the example application

    Execute <InstallPath>\Bin\Windows\<Arch>\EcSimulatorHilDemo.exe, with x86 or x64 for <Arch> accordingly. At least a Link Layer option has to be given.

    EcSimulatorHilDemo -ndis 0 -f exi.xml

See also

Running EcSimulatorHilDemo for a detailed description of the demo application.

4.5.2. OS Compiler settings

The following settings are necessary to build the example application for Windows.

Extra include paths
Extra source paths
Extra library paths to the main EtherCAT components

4.5.3. EcatDrv for Auxillary Clock

Due to the non-real-time behavior of Windows, it is not possible to get accurate timing when using the standard timer API. The EcatDrv implements an auxillary clock that is accurate enough to get DCM in sync. The EcatDrv does not guarantee response to the cycle’s deadline. Prerequisites of the EcatDrv Microsoft Windows: 32 bit or 64 bit?

On Windows the System Properties dialog contains the information about the PC’s architecture. The System type states if it is a 64-bit Operating System or 32-Bit. Disable CPU Power Management Driver

To prevent influences from the Intel-PPM-driver, the driver can be disabled. The registry file “intelppmOFF.reg” to disable the Intel-PPM-driver can be merged into the registry and is located in the <InstallPath>\Files\Windows-folder of the EC-Simulator installation directory. Merging “intelppmON.reg” would enable it again. Disable Local APIC usage of Windows

To make sure that there is no collision between Windows and the EcatDrv, disable the use of the Local APIC timer for Windows. This can be done by changing the boot configuration with the following command in the Windows console as an administrator:

bcdedit.exe /set {current} useplatformtick yes No Local APIC support since Windows 10

Since Windows 10, direct access to the local APIC timer is no longer allowed and can cause an BSOD. In this case the EcatDrv can use the Windows Kernel Timer as clock source. To use the Windows Kernel Timer an additional OS layer parameter EC_T_OS_PARMS::PlatformParms::bUseKernelTimerForAuxClk must be set before AuxClkInit():

OsMemset(&oOsParms, 0, sizeof(EC_T_OS_PARMS));
oOsParms.dwSignature = EC_OS_PARMS_SIGNATURE;
oOsParms.dwSize      = sizeof(EC_T_OS_PARMS);
oOsParms.PlatformParms.bUseKernelTimerForAuxClk = EC_TRUE;
OsInit(&oOsParms); Installing and configuring the EcatDrv on Windows

  1. Start the “Add Hardware Wizard” and click “Next”

    The Add Hardware Wizard shows up:

  2. Select “Install the hardware…” and proceed
  3. Select “System devices” and proceed
  4. Click to “Have Disk…” and proceed
  5. Enter the directory to the correct driver version (32 bit or 64 bit)

    The folder is <InstallPath>\Bin\Windows\<Arch>, with x86 or x64 for <Arch> accordingly.


    There are two different drivers available: 32 bit and 64 bit. The subfolder x86 contains the 32 bit driver files. The subfolder x64 contains the 64 bit driver files.

    Enter the correct directory at the input box:

    Press OK to proceed.

  6. Choose the EcatDrv and click “Next” and confirm the installation
  7. Continue on any warning about unsigned driver
  8. Configure the driver for local APIC usage


    This is not required for Windows 10 !

    • Open the Device Manager and open the properties of the EcatDrv

    • Uncheck “Use automatic settings”

    • Change “Current Configuration” to “Basic configuration 0001”

    • Double-click the “IRQ”-label and adjust the Interrupt Request Value until “No conflicts” is shown.

  9. Press “OK” to close and apply the settings

    Confirm the manual settings

  10. Restart the PC Enable Realtime Priority Class

In order to comply with the timing as best as possible, it is necessary that the application / EcSimulatorHilDemo runs with realtime priority. By default, an application on Windows can not be run with real-time priority. To allow this the Increase scheduling priority user rights policy setting must be set. Also, the application must be run as an administrator.

Increase scheduling priority setting

Local Security Policy ‣ User Rights Assignment ‣ Increase scheduling priority ‣ Add User or Group … ‣ Everyone