MC_DATA Struct Reference

Parameters used by the motor controller. More...

Data Fields

fixed current_max
 The maximum current to the motor.
fixed current_min
 The minimum current to the motor (often -1 * current_max).
fixed dt
 Time in seconds between calls to mc_get_thermal_limiter.
unsigned int error_limit
 Maximum number of current out of bounds errors allowed before error shutoff.
FIXED_VOID_F get_current
 A function that returns the motor current as a fixed point value in amps.
FLOAT_VOID_F get_position
 A function that returns the motor position as a floating point number in radians.
FLOAT_VOID_F get_velocity
 A function that returns the motor velocity as a floating point number in radians.
fixed integral
 The integral value of the PID current controller.
fixed kd
 The derivative constant of the PID current controller.
fixed ki
 The integral constant of the PID current controller.
fixed kp
 The proportional constant of the PID current controller.
fixed max_integral
 Maximum integral value allowed by PID current controller, to avoid over-saturation.
int max_pwm
 Maximum PWM allowed to go to the motor.
float motor_voltage_max
 The maximum voltage to the motor.
MC_OPERATION operation
 The operation of the motor controller.
fixed smart_error_limit
 Maximum integral of errors allowed before error shutoff.
fixed smart_error_limit_inverse
 I need to divide by this number so I inverted it to multiply instead.
fixed target_max
 Maximum current commanded using mc_set_target_current or mc_set_target_current_fixed.
fixed target_min
 Minimum current commanded using mc_set_target_current or mc_set_target_current_fixed.
fixed tau_inv
fixed thermal_diff
fixed thermal_limit
 Temperature limit for the motor.
fixed thermal_safe
 Temperature above which current will be multiplied by a thermal limiting factor < 1.

Detailed Description

Parameters used by the motor controller.

Initialized and set up by mc_init. Can be changed at runtime with mc_get_parameters (note that most are in fixed point value though).

Definition at line 46 of file motor_controller.h.


Field Documentation

The maximum current to the motor.

Definition at line 48 of file motor_controller.h.

Referenced by mc_init(), and mc_smart_check_current().

The minimum current to the motor (often -1 * current_max).

Definition at line 49 of file motor_controller.h.

Referenced by mc_init(), and mc_smart_check_current().

fixed MC_DATA::dt

Time in seconds between calls to mc_get_thermal_limiter.

 1.0 / (SCHED_SPEED * 1000) 

.

Definition at line 56 of file motor_controller.h.

Referenced by mc_get_thermal_limiter(), and mc_init().

unsigned int MC_DATA::error_limit

Maximum number of current out of bounds errors allowed before error shutoff.

Definition at line 57 of file motor_controller.h.

Referenced by mc_init().

FIXED_VOID_F MC_DATA::get_current

A function that returns the motor current as a fixed point value in amps.

Definition at line 67 of file motor_controller.h.

Referenced by mc_init(), and mc_pid_current().

FLOAT_VOID_F MC_DATA::get_position

A function that returns the motor position as a floating point number in radians.

Definition at line 68 of file motor_controller.h.

Referenced by mc_compliant_control(), and mc_init().

FLOAT_VOID_F MC_DATA::get_velocity

A function that returns the motor velocity as a floating point number in radians.

Definition at line 69 of file motor_controller.h.

Referenced by mc_compliant_control(), and mc_init().

The integral value of the PID current controller.

Definition at line 63 of file motor_controller.h.

Referenced by mc_init(), and mc_pid_current().

fixed MC_DATA::kd

The derivative constant of the PID current controller.

Definition at line 62 of file motor_controller.h.

Referenced by mc_init().

fixed MC_DATA::ki

The integral constant of the PID current controller.

Definition at line 61 of file motor_controller.h.

Referenced by mc_init(), and mc_pid_current().

fixed MC_DATA::kp

The proportional constant of the PID current controller.

Definition at line 60 of file motor_controller.h.

Referenced by mc_init(), and mc_pid_current().

Maximum integral value allowed by PID current controller, to avoid over-saturation.

Definition at line 64 of file motor_controller.h.

Referenced by mc_init(), and mc_pid_current().

Maximum PWM allowed to go to the motor.

Definition at line 65 of file motor_controller.h.

Referenced by mc_init(), mc_pid_current(), and mc_set_pwm().

The maximum voltage to the motor.

Definition at line 47 of file motor_controller.h.

Referenced by mc_init().

MC_OPERATION MC_DATA::operation

The operation of the motor controller.

See also:
MC_OPERATION.

Definition at line 66 of file motor_controller.h.

Referenced by mc_init(), and mc_set_pwm().

Maximum integral of errors allowed before error shutoff.

Definition at line 58 of file motor_controller.h.

Referenced by mc_init(), and mc_smart_check_current().

Maximum current commanded using mc_set_target_current or mc_set_target_current_fixed.

Definition at line 50 of file motor_controller.h.

Referenced by mc_init(), and mc_set_target_current_fixed().

Minimum current commanded using mc_set_target_current or mc_set_target_current_fixed.

Definition at line 51 of file motor_controller.h.

Referenced by mc_init(), and mc_set_target_current_fixed().

 1.0/thermal_time_constant 

of the motor.

Definition at line 54 of file motor_controller.h.

Referenced by mc_get_thermal_limiter(), and mc_init().

Definition at line 55 of file motor_controller.h.

Referenced by mc_get_thermal_limiter(), and mc_init().

Temperature limit for the motor.

If motor_temp > thermal limit, motor will be shutoff.

Definition at line 53 of file motor_controller.h.

Referenced by mc_get_thermal_limiter(), and mc_init().

Temperature above which current will be multiplied by a thermal limiting factor < 1.

Definition at line 52 of file motor_controller.h.

Referenced by mc_get_thermal_limiter(), and mc_init().


The documentation for this struct was generated from the following file:
Generated on Tue Jun 29 16:36:15 2010 by  doxygen 1.6.3