4.12. Microsoft Windows

4.12.1. EcMasterDemo - Microsoft Windows

  1. Install EC-Master

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

  2. Determine the network interface

    For example the option -winpcap 192.168.1.1 1 will be using the network adapter card with the IP address 192.168.1.1.

  3. Connect EtherCAT modules

    Any EtherCAT module can be directly connected to the target system. EtherCAT requires a 100 Mbit/s connection. If the Ethernet adapter card does not support this speed, an Ethernet switch must be used.

    Warning

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

  4. Run the example application

    Execute <InstallPath>/Bin/Windows/<Arch>/EcMasterDemo.exe. At least a Link Layer option has to be given.

    EcMasterDemo -winpcap 192.168.1.1 1 -f D:/eni.xml
    

See also

Running EcMasterDemo for a detailed description of the demo application.

4.12.2. EcMasterDemoDotNet (.NET) - Microsoft Windows

  1. Open the Workspace

    Please find the solution including the C#-project for VS2005 at Workspace/WindowsVS2005/EcMasterDemoDotNet/EcMasterDemoDotNet.sln

  2. Compile the application

  3. Copy DLLs in the executables folder

    To run the EcMasterDemoDotNet.exe, copy EcMaster.dll, EcWrapperDotNet.dll and emllNdis.dll from Bin/Windows/x86 to the executables folder

  4. Run/Debug EcMasterDemoDotNet.exe

4.12.3. OS Compiler settings

Besides the general settings from Compiling the EcMasterDemo the following settings are necessary to build the example application for Windows.

Extra include paths
<InstallPath>/SDK/INC/Windows
<InstallPath>/Examples/Common/Windows
Extra source paths
<InstallPath>/Examples/Common/Windows
<InstallPath>/Sources/OsLayer/Windows
Extra library paths to the main EtherCAT components
<InstallPath>/SDK/LIB/Windows

4.12.4. OS optimizations

Power Options
  • Set Hard disk ‣ Turn off hard disk after ‣ Setting to Never

  • Set PCI Express ‣ Link State Power Management ‣ Setting to Off

Performance Options
  • Select Visual Effects ‣ Adjust for best performance

See also

Windows 10 Real-time Optimization in the acontis developer center

4.12.4.1. Enable Realtime Priority Class

In order to comply with the timing as best as possible, it is necessary that the application / EcMasterDemo 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

4.12.5. 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.

4.12.5.1. Prerequisites of the EcatDrv

4.12.5.1.1. 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.

4.12.5.1.2. 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 Files/Windows-folder of the EC-Master installation directory, e.g. C:/Program Files/acontis_technologies/EC-Master/Files/Windows. Merging “intelppmON.reg” would enable it again.

4.12.5.1.3. 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

4.12.5.1.4. 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():

EC_T_OS_PARMS oOsParms;
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);

4.12.5.2. 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 default folder if not changed when installing the EC-Master is under C:/Program Files/acontis_technologies/EC-Master/Bin/Windows.

    Attention

    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

    Attention

    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