5.3. Compiling the EcMonitorDemo

The following main rules can be used to generate the example applications for all operating systems.

  • <OS> is a placeholder for the operating system used.

  • <ARCH> for the architecture. If different architectures are supported.

5.3.1. Software Development Kit (SDK)

The EC-Monitor development kit is needed to write applications based on the EC-Monitor core. The EC-Monitor core is shipped as a library which is linked together with the application.

The following components are supplied together with an SDK:

  • /Bin: Executables containing the EC-Monitor core

  • /Doc: Documentation

  • /Examples: Example applications as source code

  • /SDK: EtherCAT® Software Development Kit containing libraries and header files to build C/C++-applications

  • /SDK/INC: Header files to be included with the application

  • /SDK/LIB: Libraries to be linked with the application

  • /SDK/FILES: Additional files for platform integration

  • /Sources/Common: Shared source code

5.3.2. Include search path

The header files are located in the following directories:

<InstallPath>/SDK/INC/<OS>/<ARCH>
<InstallPath>/SDK/INC
<InstallPath>/Sources/Common

5.3.3. Libraries

The libraries are delivered as static, dynamic or both. This is depending on the operating system. They are located in the following directories:

Static libraries
<InstallPath>/SDK/LIB/<OS>/<ARCH>
EC-Monitor core
libEcMonitor.a
EC-Monitor RAS server (optional)
libEcMonitorRasServer.a
Dynamic libraries
<InstallPath>/Bin/<OS>/<ARCH>
EC-Monitor core
libEcMonitor.so
EC-Monitor RAS server (optional)
libEcMonitorRasServer.so

Whether it is a Shared Object *.so or a Dynamic Link Library *.dll depends on the operating system.

5.3.4. Preprocessor definitions

The following preprocessor directives must be set in the build environment or project:

EC_MONITOR

Exclude the EC-Daq support in the demo:

EXCLUDE_DAQ_SUPPORT