![]() |
EtherCAT Control Framework v0.9
Implementation of EtherCAT protocol using IgH EtherCAT library for robot controller.
|
Writes desired operational mode, to slave in specified index via SDO. More...
#include <iostream>#include <cstring>#include <limits.h>#include <stdlib.h>#include <pthread.h>#include <errno.h>#include <signal.h>#include <stdio.h>#include <string.h>#include <sys/resource.h>#include <sys/time.h>#include <sys/types.h>#include <unistd.h>#include <time.h>#include <sys/mman.h>#include <malloc.h>#include <sched.h>#include <chrono>#include <memory>#include "ecrt.h"#include "object_dictionary.hpp"Go to the source code of this file.
Classes | |
| struct | Controller |
| Opens, reads from and publishes joystick events. More... | |
| struct | OffsetPDO |
| offset for PDO entries to register PDOs. More... | |
| struct | ReceivedData |
| Received feedback data from slaves. More... | |
| struct | SDO_data |
| CKim - SDO_data Structure holding all data needed to send/receive an SDO object. More... | |
| struct | SdoRequest |
| EtherCAT SDO request structure for configuration phase. More... | |
| struct | ProfilePosParam |
| Parameters that should be specified in position mode. More... | |
| struct | CSPositionModeParam |
| Struct contains configuration parameters for cyclic sync. position mode. More... | |
| struct | VelControlParam |
| Struct containing 'velocity control parameter set' 0x30A2 Has 4 sub index. Default values are from EPOS4 firmware manual. More... | |
| struct | CSVelocityModeParam |
| Struct contains configuration parameters for cyclic sync. velocity mode. More... | |
| struct | CSTorqueModeParam |
| Struct contains configuration parameters for cyclic sync. torque mode. More... | |
| struct | HomingParam |
| Parameters that should be specified in homing mode. More... | |
| struct | ProfileVelocityParam |
| Parameters that should be specified in velocity mode. More... | |
Macros | |
| #define | TEST_BIT(NUM, N) ((NUM & (1 << N))>>N) |
| #define | SET_BIT(NUM, N) (NUM | (1 << N)) |
| #define | RESET_BIT(NUM, N) (NUM & ~(1 << N)) |
| #define | TIMESPEC2NS(T) ((uint64_t) (T).tv_sec * g_kNsPerSec + (T).tv_nsec) |
| Convert timespec struct to nanoseconds */. More... | |
| #define | DIFF_NS(A, B) (((B).tv_sec - (A).tv_sec) * g_kNsPerSec + (B).tv_nsec - (A).tv_nsec) |
| #define | CLOCK_TO_USE CLOCK_MONOTONIC |
| Using Monotonic system-wide clock. */. More... | |
Functions | |
| struct timespec | timespec_add (struct timespec time1, struct timespec time2) |
| Add two timespec struct. More... | |
| static std::string | GetErrorMessage (const int &err_code) |
Variables | |
| const uint32_t | g_kNsPerSec = 1000000000 |
| Object dictionary paramaters PDO index and default values in here. More... | |
| static volatile sig_atomic_t | sig = 1 |
| ec_master_t * | g_master |
| Extern global variable declaration. More... | |
| ec_master_state_t | g_master_state |
| ec_domain_t * | g_master_domain |
| ec_domain_state_t | g_master_domain_state |
| struct timespec | g_sync_timer |
| uint32_t | g_sync_ref_counter |
| static constexpr uint8_t | PRIMARY_STATE_UNKNOWN |
| static constexpr uint8_t | PRIMARY_STATE_UNCONFIGURED |
| static constexpr uint8_t | PRIMARY_STATE_INACTIVE |
| static constexpr uint8_t | PRIMARY_STATE_ACTIVE |
| static constexpr uint8_t | PRIMARY_STATE_FINALIZED |
| static constexpr uint8_t | TRANSITION_STATE_CONFIGURING |
| static constexpr uint8_t | TRANSITION_STATE_CLEANINGUP |
| static constexpr uint8_t | TRANSITION_STATE_SHUTTINGDOWN |
| static constexpr uint8_t | TRANSITION_STATE_ACTIVATING |
| static constexpr uint8_t | TRANSITION_STATE_DEACTIVATING |
| static constexpr uint8_t | TRANSITION_STATE_ERRORPROCESSING |
Writes desired operational mode, to slave in specified index via SDO.
| index | slave index |
| op_mode | desired operational mode. |
| #define CLOCK_TO_USE CLOCK_MONOTONIC |
Using Monotonic system-wide clock. */.
| #define DIFF_NS | ( | A, | |
| B | |||
| ) | (((B).tv_sec - (A).tv_sec) * g_kNsPerSec + (B).tv_nsec - (A).tv_nsec) |
| #define RESET_BIT | ( | NUM, | |
| N | |||
| ) | (NUM & ~(1 << N)) |
| #define SET_BIT | ( | NUM, | |
| N | |||
| ) | (NUM | (1 << N)) |
| #define TEST_BIT | ( | NUM, | |
| N | |||
| ) | ((NUM & (1 << N))>>N) |
| #define TIMESPEC2NS | ( | T | ) | ((uint64_t) (T).tv_sec * g_kNsPerSec + (T).tv_nsec) |
Convert timespec struct to nanoseconds */.
| enum ControlStructureBits |
Control structure configuration for control mechanism to select sensor structure specific to hardware.
| enum ErrorRegisterBits |
| enum ErrorType |
| enum MotorStates |
| enum OpMode |
| enum SensorConfig |
Sensor Configuration for motor for more information.
|
static |
|
inline |
Add two timespec struct.
| time1 | Timespec struct 1 |
| time2 | Timespec struct 2 |
| const uint32_t g_kNsPerSec = 1000000000 |
Object dictionary paramaters PDO index and default values in here.
IgH EtherCAT library header file the user-space real-time interface library. IgH, EtherCAT related functions and data types.
|
extern |
Extern global variable declaration.
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
static |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |