ethercatconfig.c File Reference
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 "ethercatconfig.h"
#include "ethercatconfiglist.h"
Detailed Description
Configuration module for EtherCAT master.
After successful initialisation with ec_init() or ec_init_redundant() the slaves can be auto configured with this module.
Define Documentation
#define EC_DEFAULTDOSM0 0x00010044 |
standard SM0 flags configuration for digital output slaves
#define EC_DEFAULTMBXSM0 0x00010026 |
standard SM0 flags configuration for mailbox slaves
#define EC_DEFAULTMBXSM1 0x00010022 |
standard SM1 flags configuration for mailbox slaves
Function Documentation
int ec_config |
( |
uint8 |
usetable, |
|
|
void * |
pIOmap | |
|
) |
| | |
Enumerate / map and init all slaves.
- Parameters:
-
[in] | usetable | = TRUE when using configtable to init slaves, FALSE otherwise |
[out] | pIOmap | = pointer to IOmap |
- Returns:
- Workcounter of slave discover datagram = number of slaves found
int ec_config_init |
( |
uint8 |
usetable |
) |
|
Enumerate and init all slaves.
- Parameters:
-
[in] | usetable | = TRUE when using configtable to init slaves, FALSE otherwise |
- Returns:
- Workcounter of slave discover datagram = number of slaves found
int ec_config_map |
( |
void * |
pIOmap |
) |
|
Map all PDOs from slaves to IOmap.
- Parameters:
-
[out] | pIOmap | = pointer to IOmap |
- Returns:
- IOmap size
Find slave in standard configuration list ec_configlist[]
- Parameters:
-
[in] | man | = manufacturer |
[in] | id | = ID |
- Returns:
- index in ec_configlist[] when found, otherwise 0
Variable Documentation
buffer for EEPROM FMMU data
buffer for EEPROM SM data