EasyCAT test with SM synchronization - 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_SM_sync program is a basic example that shows how to excange some I/O between the EtherCAT master and the EasyCAT slave, using the Synchronization Manager synchronization.

Import programTestEasyCAT_SM_sync

EasyCAT test with SM synchronization - EtherCAT slave example

Import libraryEasyCAT_lib

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

Files at this revision

API Documentation at this revision

Comitter:
EasyCAT
Date:
Wed Jan 09 09:40:53 2019 +0000
Parent:
0:ec011e648d2e
Commit message:
revision 2 - moved "DigitalOut Led(LED1)"

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r ec011e648d2e -r a1411df7f601 main.cpp
--- a/main.cpp	Tue Sep 12 17:26:41 2017 +0000
+++ b/main.cpp	Wed Jan 09 09:40:53 2019 +0000
@@ -12,6 +12,9 @@
 //******************************************************************************************** 
 
 
+// revision 2 - moved  "DigitalOut Led(LED1)"
+
+
 //- EasyCAT shield application basic example 170912
 //- using SM syncronization for mbed boards 
 //
@@ -78,7 +81,7 @@
 DigitalIn In_2(D6);              // 
 DigitalIn In_3(D7);              //     
 
-DigitalOut Led(LED1);            //  
+  
 
 
 DigitalIn InterruptPin(D2);      // This pin receive the SM interrupt 
@@ -138,6 +141,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