# Microsoft Windows ## EcMasterDemo 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 -ndis 192.168.1.1 1 will be using the network adapter card with the IP address 192.168.1.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! 1. Run the example application : Execute EcMasterDemo.exe from `/Bin/Windows//`. At least an Ethernet Driver option has to be given. ```doscon C:\> EcMasterDemo -ndis 192.168.1.1 1 -f D:/eni.xml -sp ```
![EcMasterDemo running on Windows showing console output of the EtherCAT master demo application](../../OsLayer/Media/EcMasterDemo_Windows.png) #### SEE ALSO [Running EcMasterDemo](gettingstarted_running-demo.html.md#running-ecdemo) for a detailed description of the demo application. ## EcMasterDemoDotNet (.NET) - Microsoft Windows Install and run > 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 –link ndis 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 `/Bin/Windows//EcMasterDemoDotNet.exe`. At least an Ethernet Driver option has to be given. > ```doscon > C:\> EcMasterDemoDotNet -mode 1 -file eni.xml -link "ndis 192.168.1.1 1" -sp 6000 (-help will show usage) > ``` >
> ![EcMasterDemoDotNet running on Windows showing console output of the .NET EtherCAT master demo application](../Media/EcMasterDemoDotNet_Windows.png) Compile and debug > 1. Copy `*.dll`s from `/Bin/Windows/` to `/Bin/Windows//Debug` and `/Bin/Windows//Release`. > > #### HINT > > By copying the DLLs, they can be loaded on startup and original files are not overwritten and are retained. > 1. Open `/Workspace/WindowsVS2015/EcMasterDemoDotNet/EcMasterDemoDotNet.csproj` in VS2015 or higher > 2. Specify command line arguments for the project as shown above > 3. (Adapt code,) compile, run, debug as usual ## EcMasterDemoGuiDotNet (.NET) - Microsoft Windows 1. Prerequisites : To run the `EcMasterDemoGuiDotNet.exe`, the libraries `EcMaster.dll`, `EcMasterRasServer.dll`, `EcWrapperDotNet.dll`, `EcWrapper.dll` and `emllNdis.dll` from `Bin/Windows/x64` are needed in `Bin/Windows/x64/Release`, `Bin/Windows/x64/Debug` 2. Visual Studio C#-project : The C#-project for VS2015 or higher is located at `Workspace/WindowsVS2015/EcMasterDemoGuiDotNet/EcMasterDemoGuiDotNet.csproj` 3. If the reference EcWrapperDotNet is missing, it must be re-added from `Bin/Windows/x64/EcWrapperDotNet.dll` 4. EcMasterDemoGuiDotNet is now prepared for Run/Debug ## OS Compiler settings Besides the general settings from [Compiling the EcMasterDemo](gettingstarted_compiling.html.md#compile-ecdemo) the following settings are necessary to build the example application for Windows. Extra include paths : ```default \SDK\INC\Windows \Examples\Common\Windows ``` Extra source paths : ```default \Examples\Common\Windows \Sources\OsLayer\Windows ``` Extra library paths to the main EtherCAT® components : ```default \SDK\LIB\Windows ``` ## RtaccDevice for Real-time Ethernet Driver As alternative to the NDIS based or Pcap based Ethernet Driver, an optional Real-time Ethernet Driver on Windows can be installed. The Real-time Ethernet Driver replaces the original Windows driver and also requires an extra license. To **use the Real-time Ethernet Driver under Windows**, it is necessary to install the RtaccDevice driver included in the Real-time Ethernet Driver delivery: 1. Start the “Device Manager” : ![Windows Device Manager showing the network adapter where the RtaccDevice Real-time Ethernet Driver will be installed](../../OsLayer/Media/ecatdrv-net-step1.png) 2. Assign RtaccDevice to the network adapter : ![Windows Device Manager context menu on the network adapter showing the Update driver option](../../OsLayer/Media/ecatdrv-net-step2.png) ![Windows Update Drivers dialog for assigning RtaccDevice to the network adapter](../../OsLayer/Media/ecatdrv-net-step3.png)![Windows Update Drivers dialog showing the Browse my computer for drivers option](../../OsLayer/Media/ecatdrv-net-step4.png) Click on “Browse my computer for drivers” ![Windows driver search showing the Let me pick from a list of available drivers option](../../OsLayer/Media/ecatdrv-net-step5.png) Click on “Let me pick…” ![Windows driver list showing the Have Disk option for installing RtaccDevice from a specific directory](../../OsLayer/Media/ecatdrv-net-step6.png) Click on “Have Disk…” 3. Enter the directory of RtaccDevice Driver The default folder if not changed is `\Bin\Windows\x64` ![Windows Have Disk dialog for entering the RtaccDevice driver directory path such as the InstallPath Bin Windows x64 folder](../../OsLayer/Media/ecatdrv-net-step7.png) Enter the correct directory at the input box and press OK to proceed. 4. Choose the RtaccDevice Driver and click “Next” and confirm the installation : ![Windows driver selection list showing RtaccDevice ready to be chosen for the network adapter](../../OsLayer/Media/ecatdrv-net-step8.png)![Windows driver installation confirmation dialog for the RtaccDevice Real-time Ethernet Driver](../../OsLayer/Media/ecatdrv-net-step9.png) Optionally modify the search location of the Real-time Ethernet Driver Search locations for Real-time Ethernet Driver can be adjusted using the PATH environment variable. \\newpage The RtaccDevice must be assigned to the network adapter for Real-time Ethernet Driver usage on Windows. In this case it is exclusively bound for EtherCAT® usage. The assignment can be reverted using the following steps: 1. Open the Windows device manager (Computer Management), then go to System devices. The RtaccDevice should be listed there: > ![Windows Computer Management showing the System devices node where RtaccDevice is listed](../../Common/Media/Rtacc_Computer_Management_01.jpg)![Windows Computer Management zoomed view of the RtaccDevice Ethernet Controller in System devices](../../Common/Media/Rtacc_Computer_Management_02.jpg) 1. Right click on the RtaccDevice Ethernet Controller, then click on Properties: > ![Windows Device Properties dialog for the RtaccDevice Ethernet Controller accessed via right-click Properties](../../Common/Media/Rtacc_Ethernet_Controller_Properties_Driver.jpg) 1. Switch to the tab “Driver”, then click the button “Update driver”: > ![Windows Device Properties Driver tab showing the Update driver button for reverting the RtaccDevice assignment](../../Common/Media/Rtacc_Update_Driver.jpg) 1. Click on “Browse my computer for drivers”: > ![Windows Update Drivers dialog showing the Browse my computer for drivers option to revert RtaccDevice](../../Common/Media/Rtacc_Search_for_Driver.jpg) 1. Click on “Let me pick from a list of available drivers on my computer”: > ![Windows driver selection dialog showing the original network adapter driver to restore after removing RtaccDevice](../../Common/Media/Rtacc_Select_Device.jpg) > Select the network adapter and click “Next”. The assignment is now reverted.