This repository provides usage examples for the Motion Master static C++ libraries. Included are:
- The SOEM library for communicating with Synapticon SOMANET devices via EtherCAT.
- The SPoE library, which implements a custom protocol for communicating with Synapticon SOMANET Integro devices over Ethernet.
For full documentation on the Motion Master libraries, please visit our official documentation.
Clone the repository with all submodules:
git clone --recursive https://github.com/synapticon/motion_master_lib_examples.git
cd motion_master_lib_examples
- Git – Version control system
- CMake – Build system generator
- Ninja – Fast build tool
- GCC – Compiler toolchain for Linux
- Visual Studio 2022 – Compiler and IDE for Windows 11
To temporarily enable cl.exe
in your PowerShell 7 (x64) session, follow these steps:
-
Open PowerShell 7 (x64).
-
Run the following command to initialize the Visual Studio environment:
cmd /c '"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" x64 && powershell'
-
Once the new PowerShell session starts, verify that cl.exe is available by running:
cl
ℹ️ The previous steps are necessary because the Developer Command Prompt for VS 2022 may default to the 32-bit toolset, causing linker failures in 64-bit builds. You can verify this by running
cl
and checking if the output includes for x86.
To compile:
cmake --preset x64-windows-debug
cmake --build --preset x64-windows-debug --parallel
The compiled executables will be located in: ./build/x64-windows-debug/
First, install the required build tools:
sudo apt update
sudo apt install -y git cmake ninja-build build-essential
To compile:
cmake --preset x64-linux-debug
cmake --build --preset x64-linux-debug --parallel
The compiled executables will be located in: ./build/x64-linux-debug/