You are on page 1of 20

Getting Started with the Esmacat Master

Software in Windows
I. Overview
Introduction
This document presents the setup of the Esmacat Master Software development environment in
Windows. At the end of this tutorial, you should be able to build the Esmacat Master Software in your
system.

What is Esmacat?
Esmacat is an easy yet powerful EtherCAT solution for robot mechatronics. It provides a full EtherCAT
hardware and software solution for Master and Slave devices and allows engineers to set up and run
an EtherCAT application within minutes. It also supports Power-over-EtherCAT (POE) technology which
allows high-speed communication and logic-power supply over a single Ethernet cable simplifying the
cabling and wiring needs of the system significantly.

What is the Esmacat Master?


The Esmacat Master supports the seamless high-speed communication between an EtherCAT master
and one/more slaves. It also includes support for controlling all Esmacat Slaves such as the Analog
Input slave, Motor-Driver slave, EtherCAT Arduino Shield by Esmacat (EASE) among others. In
addition, it supports the creation of drivers from third-party EtherCAT slaves. Example applications
using various Esmacat slave topologies are also included.

Harmonic Bionics Inc. V1.00


Esmacat Tutorial 1
Esmacat
Tutorial Title Subject to change without prior notice
Contents
I. Overview................................................................................................................................ 1

Introduction .............................................................................................................................. 1

What is Esmacat? ....................................................................................................................... 1

II. Requirements for this Tutorial............................................................................................... 3

Hardware .................................................................................................................................. 3

Software ................................................................................................................................... 3

III. Setting up the project and viewing the code .......................................................................... 9

Cloning the git repository .......................................................................................................... 11

Download the repository ............................................................................................................. 9

IV. Building the Code .............................................................................................................. 14

V. Other Useful and Relevant Tutorials ....................................................................................... 18

VI. Legal Disclaimer ................................................................................................................ 19

VII. Contact Information ........................................................................................................... 19

VIII. Version History............................................................................................................... 20

Harmonic Bionics Inc. V1.00


Esmacat Tutorial 2
Esmacat
Tutorial Title Subject to change without prior notice
II. Requirements for this Tutorial
The PC with Windows will be the EtherCAT Master of the system. Ensure that your Master is connected
to a display, keyboard and mouse for the implementation of this tutorial.

Hardware
• 1 x PC with Windows OS installed and with Ethernet capability
• USB Keyboard and mouse
• Monitor with HDMI input

Software
• Windows OS (Tested on Windows 10)
• CMake 2.8.0 or later (https://cmake.org/ )
o Choose the file with the .msi extension as shown in the image below and run the setup
file.

o When installing CMake, add CMake to the system path, unless you are an advanced
user.

Harmonic Bionics Inc. V1.00


Esmacat Tutorial 3
Esmacat
Tutorial Title Subject to change without prior notice
o To check if the installation is complete open a command prompt and type in the
following commands,
▪ “cmake” to check if the installation is complete and
▪ “cmake --version” to check the installed CMake version.

The system used to run the above commands as shown in the image has a CMake
version of 3.16.0 installed.

o While running the above commands if the following error is obtained,

Harmonic Bionics Inc. V1.00


Esmacat Tutorial 4
Esmacat
Tutorial Title Subject to change without prior notice
“cmake is not recognized as an internal or external command, operable program or a
batch file” - the cmake variable has to be added to be system path variables. This is done
by following the steps described below,

▪ In the search bar type “edit the system environment variables” and press Enter.
A dialog box similar to the one in the image below opens. Click on the
“Environment Variables” option in the System Properties dialog box.

▪ A dialog box similar to the image below opens. Double click on the “Path” option.

Harmonic Bionics Inc. V1.00


Esmacat Tutorial 5
Esmacat
Tutorial Title Subject to change without prior notice
▪ A list of environment variables opens. Click on the “New” Option and add the
path to the “bin” folder of the CMake Installation in the text field and click “OK”.

Harmonic Bionics Inc. V1.00


Esmacat Tutorial 6
Esmacat
Tutorial Title Subject to change without prior notice
• Visual Studio 2019 or other IDE (https://visualstudio.microsoft.com/vs/ )
o When installing Visual Studio, install “Desktop development with C++”

Harmonic Bionics Inc. V1.00


Esmacat Tutorial 7
Esmacat
Tutorial Title Subject to change without prior notice
• WinPcap installed (https://www.winpcap.org/ )
• (optional) Doxygen (to view the generated documentation)
(http://www.doxygen.nl/download.html )
• (optional) Git (https://www.atlassian.com/git/tutorials/install-git )

Harmonic Bionics Inc. V1.00


Esmacat Tutorial 8
Esmacat
Tutorial Title Subject to change without prior notice
III. Setting up the project and viewing the code
Download the repository
Skip this section if you like to use Git for downloading the source code.

1. Navigate to the Harmonic Bionics Public repository for the Esmacat Master Software code:
https://bitbucket.org/harmonicbionics/esmacat_master_software/src/master/

2. Select ‘Download’ on the left navigation bar.

Harmonic Bionics Inc. V1.00


Esmacat Tutorial 9
Esmacat
Tutorial Title Subject to change without prior notice
3. Click on ‘Download repository’

4. Save the zip file by clicking ‘OK’ on the popup window.

Harmonic Bionics Inc. V1.00


Esmacat Tutorial 10
Esmacat
Tutorial Title Subject to change without prior notice
5. Extract the zip folder into your desired project folder.

Cloning the git repository


NOTE: If you already have downloaded the source code, please skip this section.

1. Navigate to the Harmonic Bionics Public repository for the Esmacat Master Software code:
https://bitbucket.org/harmonicbionics/esmacat_master_software/src/master/

Harmonic Bionics Inc. V1.00


Esmacat Tutorial 11
Esmacat
Tutorial Title Subject to change without prior notice
2. Click on ‘Clone’ on the upper right corner and copy the git command that appears. Click ‘Close’.

3. Open the ‘Command Prompt’ in Windows. Navigate to the location where you’d like the
repository to be cloned using the command:

Harmonic Bionics Inc. V1.00


Esmacat Tutorial 12
Esmacat
Tutorial Title Subject to change without prior notice
cd <pathname>
In this example, the location is MyRepositories\Esmacat.
4. Paste the command that was copied and click ‘Enter’. A new folder called
‘esmacat_master_software will be created in the selected location- this is now the project
folder.

Harmonic Bionics Inc. V1.00


Esmacat Tutorial 13
Esmacat
Tutorial Title Subject to change without prior notice
IV. Building the Code
1. Launch Visual Studio or other IDE that will be used for building and executing the code. Select
‘Open a Local Folder’ and navigate to the project folder (which in our example is
MyRepositories\Esmacat\esmacat_master_software) and click ‘Select Folder’.

Harmonic Bionics Inc. V1.00


Esmacat Tutorial 14
Esmacat
Tutorial Title Subject to change without prior notice
2. Visual Studio should automatically run CMake and the following should be visible at the output
screen located at the bottom of the Visual Studio window

Harmonic Bionics Inc. V1.00


Esmacat Tutorial 15
Esmacat
Tutorial Title Subject to change without prior notice
3. If CMake is not run automatically, you can force Visual Studio to generate the Cache as follows,
by right-clicking the CMakeLists.txt file in Solution Explorer:

Harmonic Bionics Inc. V1.00


Esmacat Tutorial 16
Esmacat
Tutorial Title Subject to change without prior notice
4. Right-click the CmakeLists.txt file again and click ‘Build’

Harmonic Bionics Inc. V1.00


Esmacat Tutorial 17
Esmacat
Tutorial Title Subject to change without prior notice
5. Your project should build successfully, and the results are visible at the output screen located at
the bottom of the Visual Studio window

V. Other Useful and Relevant Tutorials


1. Esmacat Master Software Structure
2. Getting Started with Esmacat Master Software in Linux

More tutorials are available at https://esmacat.com

Harmonic Bionics Inc. V1.00


Esmacat Tutorial 18
Esmacat
Tutorial Title Subject to change without prior notice
VI. Legal Disclaimer
The content of this datasheet may contain technical inaccuracies or typographical errors. Although we
constantly edit our content, Harmonic Bionics does not take responsibility for any information or
content. The use of the information on our datasheet and website is the sole responsibility of the end
user. Harmonic Bionics, Inc. assumes no responsibility for damages resulting from data usage or similar
situations.

Esmacat is the registered trademark of Harmonic Bionics, Inc.

EtherCAT is the registered trademark of Beckhoff Automation GmbH.

Arduino is the trademark of Arduino AG

VII. Contact Information


Please contact Harmonic Bionics, Inc. for any technical questions or business-related topics.

Phone: 1+512-770-1088
Email: info@esmacat.com
Product website: www.esmacat.com
Company website: www.harmonicbionics.com
Address: 1300 E Braker Ln, Austin, TX 78753, USA

Harmonic Bionics Inc. V1.00


Esmacat Tutorial 19
Esmacat
Tutorial Title Subject to change without prior notice
VIII. Version History

Version Release date Changes

v0p95 October 29th, 2019 • The first beta version document.


• More detailed explanation has been added for the
v0p96 November 1st, 2019 required software

v0p97 November 3rd, 2019 • Minor formatting changes


• Release
V1p00 November 5th, 2019

Harmonic Bionics Inc. V1.00


Esmacat Tutorial 20
Esmacat
Tutorial Title Subject to change without prior notice

You might also like