Configuration module for EtherCAT master. More...
#include <stdio.h>
#include <string.h>
#include <sys/time.h>
#include <unistd.h>
#include "ethercattype.h"
#include "nicdrv.h"
#include "ethercatbase.h"
#include "ethercatmain.h"
#include "ethercatcoe.h"
#include "ethercatsoe.h"
#include "ethercatconfig.h"
Go to the source code of this file.
Data Structures | |
struct | ec_configlist_t |
Slave configuration structure. More... | |
Defines | |
#define | EC_PRINT(...) do {} while (0) |
#define | EC_DEFAULTMBXSM0 0x00010026 |
standard SM0 flags configuration for mailbox slaves | |
#define | EC_DEFAULTMBXSM1 0x00010022 |
standard SM1 flags configuration for mailbox slaves | |
#define | EC_DEFAULTDOSM0 0x00010044 |
standard SM0 flags configuration for digital output slaves | |
Functions | |
int | ec_findconfig (uint32 man, uint32 id) |
Find slave in standard configuration list ec_configlist[]. | |
int | ec_config_init (uint8 usetable) |
Enumerate and init all slaves. | |
int | ec_config_map_group (void *pIOmap, uint8 group) |
Map all PDOs in one group of slaves to IOmap. | |
int | ec_config_map (void *pIOmap) |
Map all PDOs from slaves to IOmap. | |
int | ec_config (uint8 usetable, void *pIOmap) |
Enumerate / map and init all slaves. | |
int | ec_recover_slave (uint16 slave) |
Recover slave. | |
int | ec_reconfig_slave (uint16 slave) |
Reconfigure slave. |
Configuration module for EtherCAT master.
After successful initialisation with ec_init() or ec_init_redundant() the slaves can be auto configured with this module.
Definition in file ethercatconfig.c.
#define EC_DEFAULTDOSM0 0x00010044 |
standard SM0 flags configuration for digital output slaves
Definition at line 106 of file ethercatconfig.c.
#define EC_DEFAULTMBXSM0 0x00010026 |
standard SM0 flags configuration for mailbox slaves
Definition at line 102 of file ethercatconfig.c.
#define EC_DEFAULTMBXSM1 0x00010022 |
standard SM1 flags configuration for mailbox slaves
Definition at line 104 of file ethercatconfig.c.
#define EC_PRINT | ( | ... | ) | do {} while (0) |
Definition at line 67 of file ethercatconfig.c.
int ec_config | ( | uint8 | usetable, | |
void * | pIOmap | |||
) |
Enumerate / map and init all slaves.
[in] | usetable | = TRUE when using configtable to init slaves, FALSE otherwise |
[out] | pIOmap | = pointer to IOmap |
Definition at line 907 of file ethercatconfig.c.
int ec_config_init | ( | uint8 | usetable | ) |
Enumerate and init all slaves.
[in] | usetable | = TRUE when using configtable to init slaves, FALSE otherwise |
Definition at line 139 of file ethercatconfig.c.
int ec_config_map | ( | void * | pIOmap | ) |
Map all PDOs from slaves to IOmap.
[out] | pIOmap | = pointer to IOmap |
Definition at line 896 of file ethercatconfig.c.
int ec_config_map_group | ( | void * | pIOmap, | |
uint8 | group | |||
) |
Map all PDOs in one group of slaves to IOmap.
[out] | pIOmap | = pointer to IOmap |
[in] | group | = group to map, 0 = all groups |
Definition at line 474 of file ethercatconfig.c.
Find slave in standard configuration list ec_configlist[].
[in] | man | = manufacturer |
[in] | id | = ID |
Definition at line 119 of file ethercatconfig.c.
int ec_reconfig_slave | ( | uint16 | slave | ) |
Reconfigure slave.
[in] | slave | = slave to reconfigure |
Definition at line 962 of file ethercatconfig.c.
int ec_recover_slave | ( | uint16 | slave | ) |
Recover slave.
[in] | slave | = slave to recover |
Definition at line 921 of file ethercatconfig.c.