EasyCAT LAB - EtherCAT master legacy example
Dependencies: SOEM SPI_STMPE610 SPI_TFT_ILI9341 TFT_fonts
The EasyCAT LAB is a complete educational and experimental EtherCAT® system, composed of one master and two slaves .
- It is provided as a kit by AB&T Tecnologie Informatiche, to allow everybody to have an educational EtherCAT® system up and running in a matter of minutes.
- This repository contains a demo software for the EtherCAT® master, that runs on the Nucleo STM32F767ZI board.
- It uses the SOEM (Simple Open EtherCAT® Master) library by rt-labs, that has been ported in the ecosystem by AB&T Tecnologie Informatiche.
- The slaves are based on the EasyCAT SHIELD and the Arduino UNO.
Diff: config.h
- Revision:
- 2:7d4fd6354015
- Parent:
- 0:7077d8f28b3e
--- a/config.h Tue Jun 11 10:35:44 2019 +0000 +++ b/config.h Tue Jun 11 10:46:17 2019 +0000 @@ -9,14 +9,7 @@ #define LAB_1 1 #define LAB_2 2 -/* -#define EK1100 3 -#define EL2004 4 -#define EL1014 5 -*/ - #define SLAVE_NUM 2 -//#define SLAVE_NUM 5 //------------------------------------------------------------------------------ @@ -50,32 +43,6 @@ uint8_t Buttons; }in_LAB_2t; -/* -//------------------------------------------------------------------------------ - -typedef struct __attribute__((__packed__)) -{ - uint8_t Out_0:1; - uint8_t Out_1:1; - uint8_t Out_2:1; - uint8_t Out_3:1; - uint8_t PAD:4; -}out_EL2004t; - -//------------------------------------------------------------------------------ - -typedef struct __attribute__((__packed__)) -{ - uint8_t In_0:1; - uint8_t In_1:1; - uint8_t In_2:1; - uint8_t In_3:1; - uint8_t PAD:4; -}in_EL1014t; - - -//------------------------------------------------------------------------------ -*/ out_LAB_1t *out_LAB_1; in_LAB_1t *in_LAB_1; @@ -83,11 +50,6 @@ out_LAB_2t *out_LAB_2; in_LAB_2t *in_LAB_2; -/* -out_EL2004t *out_EL2004; - -in_EL1014t *in_EL1014; -*/ //------------------------------------------------------------------------------ @@ -102,12 +64,6 @@ out_LAB_2 = (out_LAB_2t*)((char *)ec_slave[LAB_2].outputs - &IOmap[0] + &IOmapSafe[0]); in_LAB_2 = (in_LAB_2t*)((char *)ec_slave[LAB_2].inputs - &IOmap[0] + &IOmapSafe[0]); - -/* - out_EL2004 = (out_EL2004t*)((char *)ec_slave[EL2004].outputs - &IOmap[0] + &IOmapSafe[0]); - - in_EL1014 = (in_EL1014t*)((char *)ec_slave[EL1014].inputs - &IOmap[0] + &IOmapSafe[0]); -*/ } @@ -126,17 +82,6 @@ else if (strcmp(ec_slave[LAB_2].name,"LAB_2")) return 0; -/* - else if (strcmp(ec_slave[EK1100].name,"EK1100")) - return 0; - - else if (strcmp(ec_slave[EL2004].name,"EL2004")) - return 0; - - else if (strcmp(ec_slave[EL1014].name,"EL1014")) - return 0; -*/ - return 1; }