EasyCAT shield loopback test - EtherCAT slave example

Dependencies:   mbed EasyCAT_lib

The EasyCAT Shield and /static/img/mbed.gif boards

/media/uploads/EasyCAT/easycat_onnucleo.jpg

  • The EasyCAT Shield is an Arduino shield, designed and manufactured in Italy by AB&T Tecnologie Informatiche, that allow us to build a custom EtherCAT® slave in an easy way.
  • The TestEasyCAT_LoopBack is a test program that transmits back to the EtherCAT master the data that the EtherCAT slave receives.

Import programTestEasyCAT_LoopBack

EasyCAT shield loopback test - EtherCAT slave example

Import libraryEasyCAT_lib

EasyCAT shield library - It allows you to make an EtherCAT slave

Revision:
1:c342bace09db
Parent:
0:739b2b5ca0f6
--- a/main.cpp	Tue Sep 12 17:32:00 2017 +0000
+++ b/main.cpp	Wed Jan 09 09:42:33 2019 +0000
@@ -12,6 +12,10 @@
 //******************************************************************************************** 
 
 
+// revision 2 - moved  "DigitalOut Led(LED1)"
+
+
+
 //---- AB&T EasyCAT shield loopback test 170912 ---------------------------------------------  
 //
 // Derived from the example Arduino project TestEasyCAT_LoopBack.ino 
@@ -49,7 +53,7 @@
 
 //---- pins declaration ------------------------------------------------------------------------------
 
-DigitalOut Led(LED1);          
+         
 
 
 //---------------------------------------------------------------------------------------------
@@ -72,6 +76,8 @@
                                                         // The most common reason is that the SPI 
                                                         // chip select choosen on the board doesn't 
                                                         // match the one choosen by the firmware
+                                                            
+    DigitalOut Led(LED1);                               //                                                            
                                                                   
     while (1)                                           // stay in loop for ever
     {                                                   // with the led blinking