The EasyCAT shield board converts an Arduino as an EtherCAT slave. This is a low cost solution to synchronize simple sensors with other devices with much elaborated communication protocols. In addition it allows multiple Arduinos to be connected in series (daisy-chained) thus increasing the possibility of interacting with more sensors/setups.
The libraries and configuration gui for the EasyCAT shield board are better organized in this repository for easy testing.
Whole content of this repositry (Libraries and Examples) are all taken from Easy CAT webpage.
-
Arduino (Uno, Mega, Due, M0Pro, Zero, 101, Nano)
Here are the steps to run a slightly modified example code to interact with the BUILTIN
led from the arduino.
-
Connecting the shield board.
-
Put the EasyCAT shield on top of the Arduino.
-
Connect the Arduino to the PC via the serial cable.
-
Connect the EasyCAT shield to the computer via an ethernet cable connected in the port IN.
-
-
Setting up the EtherCAT IOs in the shield board
-
Clone this repository.
-
In the PC open the
configurator
folder and run theEasyCAT_Config_GUI.exe
executable located in the Exe folder. -
In the EasyCAT configurator, in Project → Open, browse the folder
examples/TestEasyCAT_Custom
and open the projectTestEasyCAT_Custom.prj
. -
Click on “Create files” (Files would be created in the same project folder).
-
Once the files are created click on “Write EEPROM“ to download the changes to the EasyCAT board. (If it fails to find a slave try again until the config file is written)
-
-
Setting up the Arduino project
-
Testing the EtherCAT communication
-
Open the EtherCAT configurator (Click on Evaluate)
-
Right-click in I/O Devices and click in Append Device. Append an EtherCAT master.
-
Select the Ethernet adaptor where the EasyCAT is connected. Right-click in the master and “Scan Boxes“
-
Check if it is working by checking the
Bit16_RisingTestRamp
Input → “Online“ tab (It should show a rising ramp). To test the Output toggle theLeds
Output in the “Online” tab (Click Write and set a value of 0 or 1) such that the Built In led in the Arduino toggles.
-
-
Use the EasyCAT configurator to setup your custom input/outputs and generate the files (See EasyCAT setup for reference).
-
Start a new project – Or copy an existing one – and save it to your Arduino project folder (Where your
.ino
file is). -
Modify your custom input/outputs.
-
Create the files (This should generate the files in the Arduino folder!)
-
Write the configuration to the EEPROM.
-
-
In Arduino IDE, be sure that for a new project you copy the folder
libraries
from this repository and put it the root of your Arduino sketchbook (See Arduino setup for reference).- Verify and Upload.
-
Test your code with the EtherCAT Configurator (See EtherCAT test)
- Easy CAT webpage