Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 6:8a0711631f0a, committed 2022-04-25
- Comitter:
- haddad1995
- Date:
- Mon Apr 25 12:22:00 2022 +0000
- Parent:
- 5:1e68e0c4fd50
- Commit message:
- update;
Changed in this revision
| EasyCAT.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/EasyCAT.h Fri Mar 11 09:18:03 2022 +0000
+++ b/EasyCAT.h Mon Apr 25 12:22:00 2022 +0000
@@ -67,7 +67,7 @@
//----- CUSTOM_MODE example -------
//
-#define CUST_BYTE_NUM_OUT 0 // total number of bytes in output
+#define CUST_BYTE_NUM_OUT 8 // total number of bytes in output
#define CUST_BYTE_NUM_IN 24 // total number of bytes in input
// We can also customize names and data types for the PDOs
@@ -335,12 +335,13 @@
#if CUST_BYTE_NUM_OUT > 0 //----- Custom data types example -----
//
struct // Here we can define our custom
- { // data types and names for the outputs
- //uint8_t EtherCAT; //
- //double Running_Time_T ; // The total number of bytes declared
- //uint8_t State_Step_T ; // in this structure must be equal
- //uint8_t Status_Driver_T ; // to the value assigned to CUST_BYTE_NUM_OUT
- //uint8_t END_T ; // In this case 1+ 4+4+4+ 4+4+4+ 4+4+4+ 4+4+4 = 49
+ { float Running_Time_T ; // data types and names for the outputs
+ //
+ // The total number of bytes declared
+ uint8_t State_Step_T ; // in this structure must be equal
+ uint8_t Status_Driver_T ; // to the value assigned to CUST_BYTE_NUM_OUT
+ uint8_t END_T ;
+ uint8_t EtherCAT ; // In this case 1+ 4+4+4+ 4+4+4+ 4+4+4+ 4+4+4 = 49
}Cust; //
#endif //
@@ -355,21 +356,27 @@
#if CUST_BYTE_NUM_IN > 0 //----- Custom data types example ------
//
struct // Here we can define our custom
- { // data types and names for the inputs
+ { float Standing_Time_T ;
+ float Step_Time_T ;
+ float Wait_COM_Tr_Time_T ;
+ float COM_Tr_Threshold_T ;
+
+ // data types and names for the inputs
+ int8_t Enable;
+ int8_t EnableLateral;
+ int8_t QuickStop;
+ int8_t ClearFault;
+
+
+
int8_t Stand;
int8_t Start;
int8_t Stepping;
int8_t EndStep;
- int8_t Enable;
- int8_t EnableLateral;
- int8_t QuickStop;
- int8_t ClearFault;
+
- float Standing_Time_T ;
- float Step_Time_T ;
- float Wait_COM_Tr_Time_T ;
- float COM_Tr_Threshold_T ;
+
}Cust; //
//