Page MenuHomec4science

sbcp_mdv.h
No OneTemporary

File Metadata

Created
Sun, Dec 1, 00:54

sbcp_mdv.h

/*
* File: sbcp_mdv.h
* Author: tuleu
*
* Created on September 12, 2012, 6:09 PM
*/
#ifndef SBCP_MDV_H_
#define SBCP_MDV_H_
#include <sbcp.h>
enum sbcp_mdv_mX_register {
MX_STATUS_AND_CONTROL_MODE = 0,
MX_GOAL_POSITION = 1,
MX_TARGETED_POSITION = 2,
MX_PRESENT_POSITION = 3,
MX_GOAL_SPEED = 4,
MX_TARGETED_SPEED = 5,
MX_PRESENT_SPEED = 6,
MX_TARGETED_TORQUE = 7,
MX_PID_PGAIN = 8,
MX_PID_IGAIN = 9,
MX_PID_DGAIN = 10,
MX_COMPLIANCE_PRELOAD = 11,
MX_COMPLIANCE_STIFFNESS = 12,
MX_COMPLIANCE_DAMPING = 13,
MX_MAX_ACCELERATION = 14,
MX_MAX_SPEED = 15,
MX_MAX_TORQUE = 16,
MX_GEAR_MULT = 17,
MX_GEAR_DIV = 18,
MX_LIMIT_POS_CW = 19,
MX_CALIBRATION_REGION_MIN = 20,
MX_CALIBRATION_REGION_MAX = 21,
MX_CALIBRATION_OFFSET = 22,
MX_SMOOTH_POSITION_UPDATE = 23,
MX_REGISTER_SIZE = 24
};
typedef enum sbcp_mdv_mx_register sbcp_mdv_mX_register;
enum sbcp_mdv_meX_register {
MEX_POSITION = 0,
MEX_GEAR_MULT = 1,
MEX_GEAR_DIV = 2,
MEX_REGISTER_SIZE = 3
};
enum sbcp_mdv_lcX_register {
LCX_TORQUE = 0,
LCX_REGISTER_SIZE = 1
};
enum sbcp_mdv_Sine_register {
SINE_FREQUENCY = 0,
SINE_AMPLITUDE = 1,
SINE_OFFSET = 2,
SINE_REGISTER_SIZE
};
enum sbcp_mdv_register {
MDV_ME_Q1 = SBCP_SPECIFIC_REG_START, // 3 dec
MDV_ME_Q2 = MDV_ME_Q1 + MEX_REGISTER_SIZE, // 6 dec
MDV_ME_Q3 = MDV_ME_Q2 + MEX_REGISTER_SIZE, // 9 dec
MDV_LC_AXIS_1 = MDV_ME_Q3 + MEX_REGISTER_SIZE, //12 dec
MDV_LC_AXIS_2 = MDV_LC_AXIS_1 + LCX_REGISTER_SIZE, // 13 dec
MDV_LC_AXIS_3 = MDV_LC_AXIS_2 + LCX_REGISTER_SIZE, // 14 dec
MDV_M1 = MDV_LC_AXIS_3 + LCX_REGISTER_SIZE, // 15 dec
MDV_M2 = MDV_M1 + MX_REGISTER_SIZE, // 39 dec
MDV_SINE_1 = MDV_M2 + MX_REGISTER_SIZE, // 63 dec
MDV_SINE_2 = MDV_SINE_1 + SINE_REGISTER_SIZE // 66 dec
};
typedef enum sbcp_mdv_register sbcp_mdv_register;
enum sbcp_mdv_instruction {
SBCP_MDV_CALIBRATE_MOTORS = SBCP_INST_DEVICE_SPECIFIC_START,
SBCP_MDV_UNCALIBRATE_MOTORS = SBCP_INST_DEVICE_SPECIFIC_START + 1
};
#define sbcp_mdv_reg(mdv,reg) (sbcp_reg_table[mdv->address_start + reg])
#define sbcp_me_reg(me,reg) (sbcp_reg_table[me + reg])
#define sbcp_lc_reg(lc,reg) (sbcp_reg_table[lc + reg])
void init_sbcp_mdv_registers();
void init_sbcp_mdv_instructions();
#endif /* SBCP_MDV_H */

Event Timeline