Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93388013
sbcp_mdv.h
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, Nov 28, 09:55
Size
2 KB
Mime Type
text/x-c
Expires
Sat, Nov 30, 09:55 (2 d)
Engine
blob
Format
Raw Data
Handle
22628787
Attached To
R6619 Oncilla Motordriver Firmware
sbcp_mdv.h
View Options
/*
* File: sbcp_mdv.h
* Author: tuleu
*
* Created on September 12, 2012, 6:09 PM
*/
#ifndef SBCP_MDV_H_
#define SBCP_MDV_H_
#include <sbcp-uc/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_MISSED_CTRL_PTS
=
24
,
MX_MAX_CONSECUTIVE_MISSED_PTS
=
25
,
MX_OVERFILL_BUFFER_COUNT
=
26
,
MX_REGISTER_SIZE
=
32
};
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_UNUSED_START
=
3
,
MEX_REGISTER_SIZE
=
4
};
enum
sbcp_mdv_fsX_register
{
LCX_VALUE
=
0
,
LCX_UNUSED_START
=
1
,
LCX_REGISTER_SIZE
=
4
};
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
,
// 8 or 0x08
MDV_ME_Q2
=
MDV_ME_Q1
+
MEX_REGISTER_SIZE
,
// 12 or 0xc
MDV_ME_Q3
=
MDV_ME_Q2
+
MEX_REGISTER_SIZE
,
// 16 or 0x10
MDV_LC_AXIS_1
=
MDV_ME_Q3
+
MEX_REGISTER_SIZE
,
// 20 or 0x14
MDV_LC_AXIS_2
=
MDV_LC_AXIS_1
+
LCX_REGISTER_SIZE
,
// 24 or 0x18
MDV_LC_AXIS_3
=
MDV_LC_AXIS_2
+
LCX_REGISTER_SIZE
,
// 28 or 0x1c
MDV_M1
=
MDV_LC_AXIS_3
+
LCX_REGISTER_SIZE
,
// 32 or 0x20
MDV_M2
=
MDV_M1
+
MX_REGISTER_SIZE
,
// 64 or 0x40
MDV_Q2_Q3_CALIBRATION
=
MDV_M2
+
MX_REGISTER_SIZE
,
// 96 or 0x60
MDV_SINE_1
=
0x64
,
// 100 or 0x64
MDV_SINE_2
=
MDV_SINE_1
+
SINE_REGISTER_SIZE
// 103 or 0x67
};
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
Log In to Comment