4.12. Microsoft Windows
4.12.1. EcMasterDemo - Microsoft Windows
- Install EC-Master
Run
setup.exe
from EC-Master package, which will guide you through the installation process.
- 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.
- 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!
- 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
- Open the Workspace
Please find the solution including the C#-project for VS2005 at
Workspace/WindowsVS2005/EcMasterDemoDotNet/EcMasterDemoDotNet.sln
Compile the application
- 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
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
to NeverSet
to Off
- Performance Options
Select
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
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
- Start the “Add Hardware Wizard” and click “Next”
-
The Add Hardware Wizard shows up:
- Select “Install the hardware…” and proceed
- Select “System devices” and proceed
- Click to “Have Disk…” and proceed
- 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.
- Choose the EcatDrv and click “Next” and confirm the installation
- Continue on any warning about unsigned driver
- 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.
- Press “OK” to close and apply the settings
Confirm the manual settings
Restart the PC
4.12.6. EcatDrv for Optimized Link Layer
As alternative to the NDIS based or Pcap based Link Layer, an optional Real-time Link Layer on Windows can be installed. The Link Layer replaces the original Windows driver and also requires an extra license.
To use the optimized Link Layers under Windows, it is necessary to install the EcatDrv driver included in the optimized Link Layer delivery:
- Start the “Device Manager”
- Assign EcatDrv to the network adapter
Click on “Browse my computer for driver”
Click on “Let me pick…”
Click on “Have Disk…”
Enter the directory of EcatDrv
The default folder if not changed when installing the EC-Master is under
C:/Program Files/acontis_technologies/EC-Master/Bin/Windows
.Attention
Two different versions are available: 32 bit (subfolder x86) and 64 bit (subfolder x64).
Enter the correct directory at the input box and press OK to proceed.
- Choose the EcatDrv and click “Next” and confirm the installation
Optionally modify search location for Optimized Link Layers
Search locations for Optimized Link Layers can be adjusted using the PATH environment variable.