![]() |
EtherCAT Control Framework v0.9
Implementation of EtherCAT protocol using IgH EtherCAT library for robot controller.
|
#include "ecat_definitions.hpp"
Go to the source code of this file.
Macros | |
#define | NUM_OF_SLAVES 1 |
#define | CUSTOM_SLAVE 0 |
#define | FREQUENCY 1000 |
#define | MEASURE_TIMING 1 |
#define | DISTRIBUTED_CLOCK 0 |
#define | GEAR_RATIO 49 |
#define | ENCODER_RESOLUTION 1000 |
#define | INC_PER_ROTATION GEAR_RATIO*ENCODER_RESOLUTION*4 |
#define | FIVE_DEGREE_CCW int(INC_PER_ROTATION/72) |
#define | THIRTY_DEGREE_CCW int(INC_PER_ROTATION/12) |
#define | PERIOD_NS (g_kNsPerSec/FREQUENCY) |
#define | PERIOD_US (PERIOD_NS / 1000) |
#define | PERIOD_MS (PERIOD_US / 1000) |
Variables | |
const uint32_t | g_kNumberOfServoDrivers = 1 |
Number of connected servo drives. More... | |
static int8_t | g_kOperationMode = kProfileVelocity |
Select operation mode for motors, default: Profile Velocity. More... | |
const struct timespec | g_cycle_time = {0, PERIOD_NS} |
const struct timespec | g_half_cycle_time = {0, PERIOD_NS/2} |
#define CUSTOM_SLAVE 0 |
Set this to 1 if you have custom EtherCAT slave other than servo drive.
#define DISTRIBUTED_CLOCK 0 |
#define ENCODER_RESOLUTION 1000 |
#define FIVE_DEGREE_CCW int(INC_PER_ROTATION/72) |
#define FREQUENCY 1000 |
#define GEAR_RATIO 49 |
#define INC_PER_ROTATION GEAR_RATIO*ENCODER_RESOLUTION*4 |
#define MEASURE_TIMING 1 |
#define NUM_OF_SLAVES 1 |
#define PERIOD_MS (PERIOD_US / 1000) |
#define PERIOD_NS (g_kNsPerSec/FREQUENCY) |
#define PERIOD_US (PERIOD_NS / 1000) |
#define THIRTY_DEGREE_CCW int(INC_PER_ROTATION/12) |
const struct timespec g_cycle_time = {0, PERIOD_NS} |
const struct timespec g_half_cycle_time = {0, PERIOD_NS/2} |
const uint32_t g_kNumberOfServoDrivers = 1 |
Number of connected servo drives.
USER SHOULD DEFINE THIS AREAS ///
|
static |
Select operation mode for motors, default: Profile Velocity.