convert most 'axis.#.*' and 'motion.*' params to pins
based on a patch by Michał Geszkiewicz
This commit is contained in:
parent
80040a08e2
commit
af317701df
4 changed files with 120 additions and 126 deletions
|
|
@ -159,9 +159,9 @@ Motion will pause until this pin is TRUE, under the following conditions: before
|
|||
first feed move after each spindle start or speed change; before the start of every
|
||||
chain of spindle-synchronized moves; and if in CSS mode, at every rapid->feed transition.
|
||||
|
||||
.SH PARAMETERS
|
||||
.SH DEBUGGING PINS
|
||||
|
||||
Many of these parameters serve as debugging aids, and are subject to change or removal at any time.
|
||||
Many of the pins below serve as debugging aids, and are subject to change or removal at any time.
|
||||
|
||||
.TP
|
||||
\fBaxis.\fIN\fB.active\fR
|
||||
|
|
@ -239,38 +239,13 @@ The joint's commanded velocity
|
|||
\fBaxis.\fIN\fB.neg-hard-limit\fR
|
||||
The negative hard limit for the joint
|
||||
|
||||
.TP
|
||||
(removed) axis.N.neg-soft-limit\fR
|
||||
The negative soft limit for the joint
|
||||
|
||||
.TP
|
||||
\fBaxis.\fIN\fB.pos-hard-limit\fR
|
||||
The positive hard limit for the joint
|
||||
|
||||
.TP
|
||||
(removed) axis.N.pos-soft-limit\fR
|
||||
The positive soft limit for the joint
|
||||
|
||||
.TP
|
||||
\fBaxis.\fIN\fB.wheel-jog-active\fR
|
||||
|
||||
|
||||
.TP
|
||||
\fBmotion-command-handler.time\fR
|
||||
|
||||
|
||||
.TP
|
||||
\fBmotion-command-handler.tmax\fR
|
||||
|
||||
|
||||
.TP
|
||||
\fBmotion-controller.time\fR
|
||||
|
||||
|
||||
.TP
|
||||
\fBmotion-controller.tmax\fR
|
||||
|
||||
|
||||
.TP
|
||||
\fBmotion.coord-error\fR
|
||||
TRUE when motion has encountered an error, such as exceeding a soft limit
|
||||
|
|
@ -279,10 +254,6 @@ TRUE when motion has encountered an error, such as exceeding a soft limit
|
|||
\fBmotion.coord-mode\fR
|
||||
TRUE when motion is in "coordinated mode", as opposed to "teleop mode"
|
||||
|
||||
.TP
|
||||
\fBmotion.debug-\fI*\fR
|
||||
These values are used for debugging purposes.
|
||||
|
||||
.TP
|
||||
\fBmotion.in-position\fR
|
||||
Same as the pin motion.motion-inpos
|
||||
|
|
@ -299,6 +270,36 @@ TRUE when motion is enabled
|
|||
\fBmotion.program-line\fR
|
||||
|
||||
|
||||
.TP
|
||||
\fBmotion.teleop-mode\fR
|
||||
TRUE when motion is in "teleop mode", as opposed to "coordinated mode"
|
||||
|
||||
|
||||
.SH PARAMETERS
|
||||
|
||||
Many of the parameters serve as debugging aids, and are subject to change or removal at any time.
|
||||
|
||||
|
||||
.TP
|
||||
\fBmotion-command-handler.time\fR
|
||||
|
||||
|
||||
.TQ
|
||||
\fBmotion-command-handler.tmax\fR
|
||||
|
||||
|
||||
.TQ
|
||||
\fBmotion-controller.time\fR
|
||||
|
||||
|
||||
.TQ
|
||||
\fBmotion-controller.tmax\fR
|
||||
Show information about the execution time of these HAL functions in CPU cycles
|
||||
|
||||
|
||||
.TP
|
||||
\fBmotion.debug-\fI*\fR
|
||||
These values are used for debugging purposes.
|
||||
.TP
|
||||
\fBmotion.servo.last-period\fR
|
||||
The number of CPU cycles between invocations of the servo thread. Typically, this number divided by the CPU speed gives the time in seconds, and can be used to determine whether the realtime motion controller is meeting its timing constraints
|
||||
|
|
@ -307,10 +308,6 @@ The number of CPU cycles between invocations of the servo thread. Typically, thi
|
|||
\fBmotion.servo.overruns\fR
|
||||
By noting large differences between successive values of motion.servo.last-period, the motion controller can determine that there has probably been a failure to meet its timing constraints. Each time such a failure is detected, this value is incremented.
|
||||
|
||||
.TP
|
||||
\fBmotion.teleop-mode\fR
|
||||
TRUE when motion is in "teleop mode", as opposed to "coordinated mode"
|
||||
|
||||
|
||||
.SH FUNCTIONS
|
||||
|
||||
|
|
|
|||
|
|
@ -1768,12 +1768,11 @@ static void output_to_hal(void)
|
|||
|
||||
/* output machine info to HAL for scoping, etc */
|
||||
*(emcmot_hal_data->motion_enabled) = GET_MOTION_ENABLE_FLAG();
|
||||
emcmot_hal_data->in_position = GET_MOTION_INPOS_FLAG();
|
||||
*(emcmot_hal_data->inpos_output) = emcmot_hal_data->in_position;
|
||||
emcmot_hal_data->coord_mode = GET_MOTION_COORD_FLAG();
|
||||
emcmot_hal_data->teleop_mode = GET_MOTION_TELEOP_FLAG();
|
||||
emcmot_hal_data->coord_error = GET_MOTION_ERROR_FLAG();
|
||||
emcmot_hal_data->on_soft_limit = emcmotStatus->on_soft_limit;
|
||||
*(emcmot_hal_data->in_position) = GET_MOTION_INPOS_FLAG();
|
||||
*(emcmot_hal_data->coord_mode) = GET_MOTION_COORD_FLAG();
|
||||
*(emcmot_hal_data->teleop_mode) = GET_MOTION_TELEOP_FLAG();
|
||||
*(emcmot_hal_data->coord_error) = GET_MOTION_ERROR_FLAG();
|
||||
*(emcmot_hal_data->on_soft_limit) = emcmotStatus->on_soft_limit;
|
||||
if(emcmotStatus->spindle.css_factor) {
|
||||
double denom = fabs(emcmotStatus->spindle.xoffset - emcmotStatus->carte_pos_cmd.tran.x);
|
||||
double speed;
|
||||
|
|
@ -1797,7 +1796,7 @@ static void output_to_hal(void)
|
|||
*(emcmot_hal_data->spindle_reverse) = (*emcmot_hal_data->spindle_speed_out < 0) ? 1 : 0;
|
||||
*(emcmot_hal_data->spindle_brake) = (emcmotStatus->spindle.brake != 0) ? 1 : 0;
|
||||
|
||||
emcmot_hal_data->program_line = emcmotStatus->id;
|
||||
*(emcmot_hal_data->program_line) = emcmotStatus->id;
|
||||
*(emcmot_hal_data->distance_to_go) = emcmotStatus->distance_to_go;
|
||||
if(GET_MOTION_COORD_FLAG()) {
|
||||
*(emcmot_hal_data->current_vel) = emcmotStatus->current_vel;
|
||||
|
|
@ -1862,29 +1861,29 @@ static void output_to_hal(void)
|
|||
*(joint_data->amp_enable) = GET_JOINT_ENABLE_FLAG(joint);
|
||||
*(joint_data->index_enable) = joint->index_enable;
|
||||
*(joint_data->homing) = GET_JOINT_HOMING_FLAG(joint);
|
||||
/* output to parameters (for scoping, etc.) */
|
||||
joint_data->coarse_pos_cmd = joint->coarse_pos;
|
||||
joint_data->joint_vel_cmd = joint->vel_cmd;
|
||||
joint_data->backlash_corr = joint->backlash_corr;
|
||||
joint_data->backlash_filt = joint->backlash_filt;
|
||||
joint_data->backlash_vel = joint->backlash_vel;
|
||||
joint_data->f_error = joint->ferror;
|
||||
joint_data->f_error_lim = joint->ferror_limit;
|
||||
|
||||
joint_data->free_pos_cmd = joint->free_pos_cmd;
|
||||
joint_data->free_vel_lim = joint->free_vel_lim;
|
||||
joint_data->free_tp_enable = joint->free_tp_enable;
|
||||
joint_data->kb_jog_active = joint->kb_jog_active;
|
||||
joint_data->wheel_jog_active = joint->wheel_jog_active;
|
||||
*(joint_data->coarse_pos_cmd) = joint->coarse_pos;
|
||||
*(joint_data->joint_vel_cmd) = joint->vel_cmd;
|
||||
*(joint_data->backlash_corr) = joint->backlash_corr;
|
||||
*(joint_data->backlash_filt) = joint->backlash_filt;
|
||||
*(joint_data->backlash_vel) = joint->backlash_vel;
|
||||
*(joint_data->f_error) = joint->ferror;
|
||||
*(joint_data->f_error_lim) = joint->ferror_limit;
|
||||
|
||||
joint_data->active = GET_JOINT_ACTIVE_FLAG(joint);
|
||||
joint_data->in_position = GET_JOINT_INPOS_FLAG(joint);
|
||||
joint_data->error = GET_JOINT_ERROR_FLAG(joint);
|
||||
joint_data->phl = GET_JOINT_PHL_FLAG(joint);
|
||||
joint_data->nhl = GET_JOINT_NHL_FLAG(joint);
|
||||
joint_data->homed = GET_JOINT_HOMED_FLAG(joint);
|
||||
joint_data->f_errored = GET_JOINT_FERROR_FLAG(joint);
|
||||
joint_data->faulted = GET_JOINT_FAULT_FLAG(joint);
|
||||
*(joint_data->free_pos_cmd) = joint->free_pos_cmd;
|
||||
*(joint_data->free_vel_lim) = joint->free_vel_lim;
|
||||
*(joint_data->free_tp_enable) = joint->free_tp_enable;
|
||||
*(joint_data->kb_jog_active) = joint->kb_jog_active;
|
||||
*(joint_data->wheel_jog_active) = joint->wheel_jog_active;
|
||||
|
||||
*(joint_data->active) = GET_JOINT_ACTIVE_FLAG(joint);
|
||||
*(joint_data->in_position) = GET_JOINT_INPOS_FLAG(joint);
|
||||
*(joint_data->error) = GET_JOINT_ERROR_FLAG(joint);
|
||||
*(joint_data->phl) = GET_JOINT_PHL_FLAG(joint);
|
||||
*(joint_data->nhl) = GET_JOINT_NHL_FLAG(joint);
|
||||
*(joint_data->homed) = GET_JOINT_HOMED_FLAG(joint);
|
||||
*(joint_data->f_errored) = GET_JOINT_FERROR_FLAG(joint);
|
||||
*(joint_data->faulted) = GET_JOINT_FAULT_FLAG(joint);
|
||||
joint_data->home_state = joint->home_state;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,34 +32,33 @@
|
|||
/* joint data */
|
||||
|
||||
typedef struct {
|
||||
hal_float_t coarse_pos_cmd; /* RPA: commanded position, w/o comp */
|
||||
hal_float_t joint_vel_cmd; /* RPA: commanded velocity, w/o comp */
|
||||
hal_float_t backlash_corr; /* RPA: correction for backlash */
|
||||
hal_float_t backlash_filt; /* RPA: filtered backlash correction */
|
||||
hal_float_t backlash_vel; /* RPA: backlash speed variable */
|
||||
hal_float_t *coarse_pos_cmd;/* RPI: commanded position, w/o comp */
|
||||
hal_float_t *joint_vel_cmd; /* RPI: commanded velocity, w/o comp */
|
||||
hal_float_t *backlash_corr; /* RPI: correction for backlash */
|
||||
hal_float_t *backlash_filt; /* RPI: filtered backlash correction */
|
||||
hal_float_t *backlash_vel; /* RPI: backlash speed variable */
|
||||
hal_float_t *motor_pos_cmd; /* WPI: commanded position, with comp */
|
||||
hal_float_t *motor_pos_fb; /* RPI: position feedback, with comp */
|
||||
hal_float_t *joint_pos_cmd; /* WPI: commanded position w/o comp, mot ofs */
|
||||
hal_float_t *joint_pos_fb; /* RPA: position feedback, w/o comp */
|
||||
hal_float_t f_error; /* RPA: following error */
|
||||
hal_float_t f_error_lim; /* RPA: following error limit */
|
||||
hal_float_t *joint_pos_fb; /* RPI: position feedback, w/o comp */
|
||||
hal_float_t *f_error; /* RPI: following error */
|
||||
hal_float_t *f_error_lim; /* RPI: following error limit */
|
||||
|
||||
/*! \todo FIXME - these might not be HAL params forever, but they are usefull now */
|
||||
hal_float_t free_pos_cmd; /* RPA: free traj planner pos cmd */
|
||||
hal_float_t free_vel_lim; /* RPA: free traj planner vel limit */
|
||||
hal_bit_t free_tp_enable; /* RPA: free traj planner is running */
|
||||
hal_bit_t kb_jog_active; /* RPA: executing keyboard jog */
|
||||
hal_bit_t wheel_jog_active; /* RPA: executing handwheel jog */
|
||||
hal_float_t *free_pos_cmd; /* RPI: free traj planner pos cmd */
|
||||
hal_float_t *free_vel_lim; /* RPI: free traj planner vel limit */
|
||||
hal_bit_t *free_tp_enable; /* RPI: free traj planner is running */
|
||||
hal_bit_t *kb_jog_active; /* RPI: executing keyboard jog */
|
||||
hal_bit_t *wheel_jog_active;/* RPI: executing handwheel jog */
|
||||
|
||||
hal_bit_t active; /* RPA: joint is active, whatever that means */
|
||||
hal_bit_t in_position; /* RPA: joint is in position */
|
||||
hal_bit_t error; /* RPA: joint has an error */
|
||||
hal_bit_t phl; /* RPA: joint is at positive hard limit */
|
||||
hal_bit_t nhl; /* RPA: joint is at negative hard limit */
|
||||
hal_bit_t *active; /* RPI: joint is active, whatever that means */
|
||||
hal_bit_t *in_position; /* RPI: joint is in position */
|
||||
hal_bit_t *error; /* RPI: joint has an error */
|
||||
hal_bit_t *phl; /* RPI: joint is at positive hard limit */
|
||||
hal_bit_t *nhl; /* RPI: joint is at negative hard limit */
|
||||
hal_bit_t *homing; /* RPI: joint is homing */
|
||||
hal_bit_t homed; /* RPA: joint was homed */
|
||||
hal_bit_t f_errored; /* RPA: joint had too much following error */
|
||||
hal_bit_t faulted; /* RPA: joint amp faulted */
|
||||
hal_bit_t *homed; /* RPI: joint was homed */
|
||||
hal_bit_t *f_errored; /* RPI: joint had too much following error */
|
||||
hal_bit_t *faulted; /* RPI: joint amp faulted */
|
||||
hal_bit_t *pos_lim_sw; /* RPI: positive limit switch input */
|
||||
hal_bit_t *neg_lim_sw; /* RPI: negative limit switch input */
|
||||
hal_bit_t *home_sw; /* RPI: home switch input */
|
||||
|
|
@ -69,7 +68,7 @@ typedef struct {
|
|||
hal_bit_t *amp_enable; /* WPI: amp enable output */
|
||||
hal_s32_t home_state; /* RPA: homing state machine state */
|
||||
|
||||
hal_s32_t *jog_counts; /* RPI: jogwheel position input */
|
||||
hal_s32_t *jog_counts; /* WPI: jogwheel position input */
|
||||
hal_bit_t *jog_enable; /* RPI: enable jogwheel */
|
||||
hal_float_t *jog_scale; /* RPI: distance to jog on each count */
|
||||
hal_bit_t *jog_vel_mode; /* RPI: true for "velocity mode" jogwheel */
|
||||
|
|
@ -87,14 +86,14 @@ typedef struct {
|
|||
hal_float_t *adaptive_feed; /* RPI: adaptive feedrate, 0.0 to 1.0 */
|
||||
hal_bit_t *feed_hold; /* RPI: set TRUE to stop motion */
|
||||
hal_bit_t *motion_enabled; /* RPI: motion enable for all joints */
|
||||
hal_bit_t in_position; /* RPA: all joints are in position */
|
||||
hal_bit_t *inpos_output; /* WPI: all joints are in position (used to power down steppers for example) */
|
||||
hal_bit_t coord_mode; /* RPA: TRUE if coord, FALSE if free */
|
||||
hal_bit_t teleop_mode; /* RPA: TRUE if teleop mode */
|
||||
hal_bit_t coord_error; /* RPA: TRUE if coord mode error */
|
||||
hal_bit_t on_soft_limit; /* RPA: TRUE if outside a limit */
|
||||
hal_bit_t *in_position; /* RPI: all joints are in position */
|
||||
// hal_bit_t *inpos_output; /* WPI: all joints are in position (used to power down steppers for example) */
|
||||
hal_bit_t *coord_mode; /* RPA: TRUE if coord, FALSE if free */
|
||||
hal_bit_t *teleop_mode; /* RPA: TRUE if teleop mode */
|
||||
hal_bit_t *coord_error; /* RPA: TRUE if coord mode error */
|
||||
hal_bit_t *on_soft_limit; /* RPA: TRUE if outside a limit */
|
||||
|
||||
hal_s32_t program_line; /* RPA: program line causing current motion */
|
||||
hal_s32_t *program_line; /* RPA: program line causing current motion */
|
||||
hal_float_t *current_vel; /* RPI: velocity magnitude in machine units */
|
||||
hal_float_t *distance_to_go;/* RPI: distance to go in current move*/
|
||||
|
||||
|
|
|
|||
|
|
@ -298,7 +298,7 @@ static int init_hal_io(void)
|
|||
if ((retval = hal_pin_bit_newf(HAL_OUT, &(emcmot_hal_data->spindle_brake), mot_comp_id, "motion.spindle-brake")) != HAL_SUCCESS) goto error;
|
||||
if ((retval = hal_pin_float_newf(HAL_OUT, &(emcmot_hal_data->spindle_speed_out), mot_comp_id, "motion.spindle-speed-out")) != HAL_SUCCESS) goto error;
|
||||
|
||||
if ((retval = hal_pin_bit_newf(HAL_OUT, &(emcmot_hal_data->inpos_output), mot_comp_id, "motion.motion-inpos")) != HAL_SUCCESS) goto error;
|
||||
// if ((retval = hal_pin_bit_newf(HAL_OUT, &(emcmot_hal_data->inpos_output), mot_comp_id, "motion.motion-inpos")) != HAL_SUCCESS) goto error;
|
||||
if ((retval = hal_pin_float_newf(HAL_IN, &(emcmot_hal_data->spindle_revs), mot_comp_id, "motion.spindle-revs")) != HAL_SUCCESS) goto error;
|
||||
if ((retval = hal_pin_float_newf(HAL_IN, &(emcmot_hal_data->spindle_speed_in), mot_comp_id, "motion.spindle-speed-in")) != HAL_SUCCESS) goto error;
|
||||
if ((retval = hal_pin_bit_newf(HAL_IN, &(emcmot_hal_data->spindle_is_atspeed), mot_comp_id, "motion.spindle-at-speed")) != HAL_SUCCESS) goto error;
|
||||
|
|
@ -335,35 +335,35 @@ static int init_hal_io(void)
|
|||
}
|
||||
rtapi_snprintf(buf, HAL_NAME_LEN, "motion.in-position");
|
||||
retval =
|
||||
hal_param_bit_new(buf, HAL_RO, &(emcmot_hal_data->in_position),
|
||||
hal_pin_bit_new(buf, HAL_OUT, &(emcmot_hal_data->in_position),
|
||||
mot_comp_id);
|
||||
if (retval != 0) {
|
||||
return retval;
|
||||
}
|
||||
rtapi_snprintf(buf, HAL_NAME_LEN, "motion.coord-mode");
|
||||
retval =
|
||||
hal_param_bit_new(buf, HAL_RO, &(emcmot_hal_data->coord_mode),
|
||||
hal_pin_bit_new(buf, HAL_OUT, &(emcmot_hal_data->coord_mode),
|
||||
mot_comp_id);
|
||||
if (retval != 0) {
|
||||
return retval;
|
||||
}
|
||||
rtapi_snprintf(buf, HAL_NAME_LEN, "motion.teleop-mode");
|
||||
retval =
|
||||
hal_param_bit_new(buf, HAL_RO, &(emcmot_hal_data->teleop_mode),
|
||||
hal_pin_bit_new(buf, HAL_OUT, &(emcmot_hal_data->teleop_mode),
|
||||
mot_comp_id);
|
||||
if (retval != 0) {
|
||||
return retval;
|
||||
}
|
||||
rtapi_snprintf(buf, HAL_NAME_LEN, "motion.coord-error");
|
||||
retval =
|
||||
hal_param_bit_new(buf, HAL_RO, &(emcmot_hal_data->coord_error),
|
||||
hal_pin_bit_new(buf, HAL_OUT, &(emcmot_hal_data->coord_error),
|
||||
mot_comp_id);
|
||||
if (retval != 0) {
|
||||
return retval;
|
||||
}
|
||||
rtapi_snprintf(buf, HAL_NAME_LEN, "motion.on-soft-limit");
|
||||
retval =
|
||||
hal_param_bit_new(buf, HAL_RO, &(emcmot_hal_data->on_soft_limit),
|
||||
hal_pin_bit_new(buf, HAL_OUT, &(emcmot_hal_data->on_soft_limit),
|
||||
mot_comp_id);
|
||||
if (retval != 0) {
|
||||
return retval;
|
||||
|
|
@ -384,7 +384,7 @@ static int init_hal_io(void)
|
|||
}
|
||||
rtapi_snprintf(buf, HAL_NAME_LEN, "motion.program-line");
|
||||
retval =
|
||||
hal_param_s32_new(buf, HAL_RO, &(emcmot_hal_data->program_line),
|
||||
hal_pin_s32_new(buf, HAL_OUT, &(emcmot_hal_data->program_line),
|
||||
mot_comp_id);
|
||||
if (retval != 0) {
|
||||
return retval;
|
||||
|
|
@ -550,12 +550,11 @@ static int init_hal_io(void)
|
|||
/*! \todo FIXME - these don't really need initialized, since they are written
|
||||
with data from the emcmotStatus struct */
|
||||
*(emcmot_hal_data->motion_enabled) = 0;
|
||||
emcmot_hal_data->in_position = 0;
|
||||
*(emcmot_hal_data->inpos_output) = 0;
|
||||
emcmot_hal_data->coord_mode = 0;
|
||||
emcmot_hal_data->teleop_mode = 0;
|
||||
emcmot_hal_data->coord_error = 0;
|
||||
emcmot_hal_data->on_soft_limit = 0;
|
||||
*(emcmot_hal_data->in_position) = 0;
|
||||
*(emcmot_hal_data->coord_mode) = 0;
|
||||
*(emcmot_hal_data->teleop_mode) = 0;
|
||||
*(emcmot_hal_data->coord_error) = 0;
|
||||
*(emcmot_hal_data->on_soft_limit) = 0;
|
||||
|
||||
/* init debug parameters */
|
||||
emcmot_hal_data->debug_bit_0 = 0;
|
||||
|
|
@ -692,114 +691,114 @@ static int export_joint(int num, joint_hal_t * addr)
|
|||
/* export joint parameters */ //FIXME-AJ: changing these to joints will break configs.
|
||||
rtapi_snprintf(buf, HAL_NAME_LEN, "axis.%d.coarse-pos-cmd", num);
|
||||
retval =
|
||||
hal_param_float_new(buf, HAL_RO, &(addr->coarse_pos_cmd),
|
||||
hal_pin_float_new(buf, HAL_OUT, &(addr->coarse_pos_cmd),
|
||||
mot_comp_id);
|
||||
if (retval != 0) {
|
||||
return retval;
|
||||
}
|
||||
rtapi_snprintf(buf, HAL_NAME_LEN, "axis.%d.joint-vel-cmd", num);
|
||||
retval =
|
||||
hal_param_float_new(buf, HAL_RO, &(addr->joint_vel_cmd), mot_comp_id);
|
||||
hal_pin_float_new(buf, HAL_OUT, &(addr->joint_vel_cmd), mot_comp_id);
|
||||
if (retval != 0) {
|
||||
return retval;
|
||||
}
|
||||
rtapi_snprintf(buf, HAL_NAME_LEN, "axis.%d.backlash-corr", num);
|
||||
retval =
|
||||
hal_param_float_new(buf, HAL_RO, &(addr->backlash_corr), mot_comp_id);
|
||||
hal_pin_float_new(buf, HAL_OUT, &(addr->backlash_corr), mot_comp_id);
|
||||
if (retval != 0) {
|
||||
return retval;
|
||||
}
|
||||
rtapi_snprintf(buf, HAL_NAME_LEN, "axis.%d.backlash-filt", num);
|
||||
retval =
|
||||
hal_param_float_new(buf, HAL_RO, &(addr->backlash_filt), mot_comp_id);
|
||||
hal_pin_float_new(buf, HAL_OUT, &(addr->backlash_filt), mot_comp_id);
|
||||
if (retval != 0) {
|
||||
return retval;
|
||||
}
|
||||
rtapi_snprintf(buf, HAL_NAME_LEN, "axis.%d.backlash-vel", num);
|
||||
retval =
|
||||
hal_param_float_new(buf, HAL_RO, &(addr->backlash_vel), mot_comp_id);
|
||||
hal_pin_float_new(buf, HAL_OUT, &(addr->backlash_vel), mot_comp_id);
|
||||
if (retval != 0) {
|
||||
return retval;
|
||||
}
|
||||
rtapi_snprintf(buf, HAL_NAME_LEN, "axis.%d.f-error", num);
|
||||
retval = hal_param_float_new(buf, HAL_RO, &(addr->f_error), mot_comp_id);
|
||||
retval = hal_pin_float_new(buf, HAL_OUT, &(addr->f_error), mot_comp_id);
|
||||
if (retval != 0) {
|
||||
return retval;
|
||||
}
|
||||
rtapi_snprintf(buf, HAL_NAME_LEN, "axis.%d.f-error-lim", num);
|
||||
retval =
|
||||
hal_param_float_new(buf, HAL_RO, &(addr->f_error_lim), mot_comp_id);
|
||||
hal_pin_float_new(buf, HAL_OUT, &(addr->f_error_lim), mot_comp_id);
|
||||
if (retval != 0) {
|
||||
return retval;
|
||||
}
|
||||
rtapi_snprintf(buf, HAL_NAME_LEN, "axis.%d.free-pos-cmd", num);
|
||||
retval =
|
||||
hal_param_float_new(buf, HAL_RO, &(addr->free_pos_cmd), mot_comp_id);
|
||||
hal_pin_float_new(buf, HAL_OUT, &(addr->free_pos_cmd), mot_comp_id);
|
||||
if (retval != 0) {
|
||||
return retval;
|
||||
}
|
||||
rtapi_snprintf(buf, HAL_NAME_LEN, "axis.%d.free-vel-lim", num);
|
||||
retval =
|
||||
hal_param_float_new(buf, HAL_RO, &(addr->free_vel_lim), mot_comp_id);
|
||||
hal_pin_float_new(buf, HAL_OUT, &(addr->free_vel_lim), mot_comp_id);
|
||||
if (retval != 0) {
|
||||
return retval;
|
||||
}
|
||||
rtapi_snprintf(buf, HAL_NAME_LEN, "axis.%d.free-tp-enable", num);
|
||||
retval =
|
||||
hal_param_bit_new(buf, HAL_RO, &(addr->free_tp_enable), mot_comp_id);
|
||||
hal_pin_bit_new(buf, HAL_OUT, &(addr->free_tp_enable), mot_comp_id);
|
||||
if (retval != 0) {
|
||||
return retval;
|
||||
}
|
||||
rtapi_snprintf(buf, HAL_NAME_LEN, "axis.%d.kb-jog-active", num);
|
||||
retval =
|
||||
hal_param_bit_new(buf, HAL_RO, &(addr->kb_jog_active), mot_comp_id);
|
||||
hal_pin_bit_new(buf, HAL_OUT, &(addr->kb_jog_active), mot_comp_id);
|
||||
if (retval != 0) {
|
||||
return retval;
|
||||
}
|
||||
rtapi_snprintf(buf, HAL_NAME_LEN, "axis.%d.wheel-jog-active", num);
|
||||
retval =
|
||||
hal_param_bit_new(buf, HAL_RO, &(addr->wheel_jog_active), mot_comp_id);
|
||||
hal_pin_bit_new(buf, HAL_OUT, &(addr->wheel_jog_active), mot_comp_id);
|
||||
if (retval != 0) {
|
||||
return retval;
|
||||
}
|
||||
rtapi_snprintf(buf, HAL_NAME_LEN, "axis.%d.active", num);
|
||||
retval = hal_param_bit_new(buf, HAL_RO, &(addr->active), mot_comp_id);
|
||||
retval = hal_pin_bit_new(buf, HAL_OUT, &(addr->active), mot_comp_id);
|
||||
if (retval != 0) {
|
||||
return retval;
|
||||
}
|
||||
rtapi_snprintf(buf, HAL_NAME_LEN, "axis.%d.in-position", num);
|
||||
retval =
|
||||
hal_param_bit_new(buf, HAL_RO, &(addr->in_position), mot_comp_id);
|
||||
hal_pin_bit_new(buf, HAL_OUT, &(addr->in_position), mot_comp_id);
|
||||
if (retval != 0) {
|
||||
return retval;
|
||||
}
|
||||
rtapi_snprintf(buf, HAL_NAME_LEN, "axis.%d.error", num);
|
||||
retval = hal_param_bit_new(buf, HAL_RO, &(addr->error), mot_comp_id);
|
||||
retval = hal_pin_bit_new(buf, HAL_OUT, &(addr->error), mot_comp_id);
|
||||
if (retval != 0) {
|
||||
return retval;
|
||||
}
|
||||
rtapi_snprintf(buf, HAL_NAME_LEN, "axis.%d.pos-hard-limit", num);
|
||||
retval = hal_param_bit_new(buf, HAL_RO, &(addr->phl), mot_comp_id);
|
||||
retval = hal_pin_bit_new(buf, HAL_OUT, &(addr->phl), mot_comp_id);
|
||||
if (retval != 0) {
|
||||
return retval;
|
||||
}
|
||||
rtapi_snprintf(buf, HAL_NAME_LEN, "axis.%d.neg-hard-limit", num);
|
||||
retval = hal_param_bit_new(buf, HAL_RO, &(addr->nhl), mot_comp_id);
|
||||
retval = hal_pin_bit_new(buf, HAL_OUT, &(addr->nhl), mot_comp_id);
|
||||
if (retval != 0) {
|
||||
return retval;
|
||||
}
|
||||
rtapi_snprintf(buf, HAL_NAME_LEN, "axis.%d.homed", num);
|
||||
retval = hal_param_bit_new(buf, HAL_RO, &(addr->homed), mot_comp_id);
|
||||
retval = hal_pin_bit_new(buf, HAL_OUT, &(addr->homed), mot_comp_id);
|
||||
if (retval != 0) {
|
||||
return retval;
|
||||
}
|
||||
rtapi_snprintf(buf, HAL_NAME_LEN, "axis.%d.f-errored", num);
|
||||
retval = hal_param_bit_new(buf, HAL_RO, &(addr->f_errored), mot_comp_id);
|
||||
retval = hal_pin_bit_new(buf, HAL_OUT, &(addr->f_errored), mot_comp_id);
|
||||
if (retval != 0) {
|
||||
return retval;
|
||||
}
|
||||
rtapi_snprintf(buf, HAL_NAME_LEN, "axis.%d.faulted", num);
|
||||
retval = hal_param_bit_new(buf, HAL_RO, &(addr->faulted), mot_comp_id);
|
||||
retval = hal_pin_bit_new(buf, HAL_OUT, &(addr->faulted), mot_comp_id);
|
||||
if (retval != 0) {
|
||||
return retval;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue