EasyCAT shield basic 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 program is a basic example that shows how to excange some I/O between the EtherCAT master and the EasyCAT slave.

Import programTestEasyCAT

EasyCAT shield basic test - EtherCAT slave example

Import libraryEasyCAT_lib

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

Revision:
1:1e7996e6c4a7
Parent:
0:31a727b65397
--- a/main.cpp	Tue Sep 12 17:14:08 2017 +0000
+++ b/main.cpp	Wed Jan 09 09:45:21 2019 +0000
@@ -12,6 +12,10 @@
 //******************************************************************************************** 
 
 
+// revision 2 - moved  "DigitalOut Led(LED1)"
+
+
+
 //----- EasyCAT shield application basic example for mbed boards 170912 ----------------------
 //----- Derived from the example project TestEasyCAT.ino for the AB&T EasyCAT Arduino shield
 
@@ -69,7 +73,7 @@
 DigitalIn In_2(D6);              // 
 DigitalIn In_3(D7);              //     
 
-DigitalOut Led(LED1);            //  
+
 
 
 
@@ -123,6 +127,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