Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 0 additions & 31 deletions docs/src/code/code-notes.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -638,37 +638,6 @@ planner accelerates at the joint accel limit at the beginning of the
move, and will decelerate at the joint accel limit to stop at the
target position.

=== JOG_ABS

The JOG_ABS command initiates an absolute jog on a single joint. An
absolute jog is a simple move to a specific location, in joint
coordinates. Normally absolute jogs stop when they reach the desired
location, however they also stop when they hit a limit, or on an ABORT
command.

==== Requirements

The command handler will silently reject the JOG_ABS command if
machine is not in free mode, or if any joint is in motion
(GET_MOTION_INPOS_FLAG() == FALSE), or if motion is not enabled. It
will also silently ignore the command if the joint is already at or
beyond its limit and the commanded jog would make it worse.

==== Results

The free mode trajectory planner for the joint identified by
emcmotCommand\->axis is activated, the target position is set to
emcmotCommand\->offset, and the velocity limit is set to
emcmotCommand\->vel. The free mode trajectory planner will generate a
smooth trapezoidal move from the present position to the target
position. The planner can correctly handle changes in the target
position that happen while the move is in progress. If multiple JOG_ABS
commands are issued in quick succession, each new command changes the
target position and the machine goes to the final commanded position.
The free mode planner accelerates at the joint accel limit at the
beginning of the move, and will decelerate at the joint accel limit to
stop at the target position.

=== SET_LINE

The SET_LINE command adds a straight line to the trajectory planner
Expand Down
7 changes: 0 additions & 7 deletions docs/src/code/nml-messages.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,8 @@ EMC_JOINT_SET_JOINT_TYPE
EMC_JOINT_SET_UNITS_TYPE
EMC_JOINT_SET_MIN_POSITION_LIMIT_TYPE
EMC_JOINT_SET_MAX_POSITION_LIMIT_TYPE
EMC_JOINT_SET_FERROR_TYPE
EMC_JOINT_SET_HOMING_PARAMS_TYPE
EMC_JOINT_SET_MIN_FERROR_TYPE
EMC_JOINT_SET_MAX_VELOCITY_TYPE
EMC_JOINT_INIT_TYPE
EMC_JOINT_HALT_TYPE
EMC_JOINT_ABORT_TYPE
EMC_JOINT_ENABLE_TYPE
EMC_JOINT_DISABLE_TYPE
Expand All @@ -56,7 +52,6 @@ EMC_AXIS_STAT_TYPE
----
EMC_JOG_CONT_TYPE
EMC_JOG_INCR_TYPE
EMC_JOG_ABS_TYPE
EMC_JOG_STOP_TYPE
----

Expand All @@ -68,8 +63,6 @@ EMC_TRAJ_SET_AXES_TYPE
EMC_TRAJ_SET_UNITS_TYPE
EMC_TRAJ_SET_CYCLE_TIME_TYPE
EMC_TRAJ_SET_MODE_TYPE
EMC_TRAJ_SET_VELOCITY_TYPE
EMC_TRAJ_SET_ACCELERATION_TYPE
EMC_TRAJ_SET_MAX_VELOCITY_TYPE
EMC_TRAJ_SET_MAX_ACCELERATION_TYPE
EMC_TRAJ_SET_SCALE_TYPE
Expand Down
8 changes: 0 additions & 8 deletions include/nml_intf/emc.hh
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,9 @@ struct PM_CARTESIAN;

#define EMC_JOINT_SET_MIN_POSITION_LIMIT_TYPE ((NMLTYPE) 107)
#define EMC_JOINT_SET_MAX_POSITION_LIMIT_TYPE ((NMLTYPE) 108)
#define EMC_JOINT_SET_FERROR_TYPE ((NMLTYPE) 111)
#define EMC_JOINT_SET_HOMING_PARAMS_TYPE ((NMLTYPE) 112)
#define EMC_JOINT_SET_MIN_FERROR_TYPE ((NMLTYPE) 115)
#define EMC_JOINT_HALT_TYPE ((NMLTYPE) 119)
#define EMC_JOINT_HOME_TYPE ((NMLTYPE) 123)
#define EMC_JOG_CONT_TYPE ((NMLTYPE) 124)
#define EMC_JOG_INCR_TYPE ((NMLTYPE) 125)
#define EMC_JOG_ABS_TYPE ((NMLTYPE) 126)
#define EMC_JOINT_OVERRIDE_LIMITS_TYPE ((NMLTYPE) 129)
#define EMC_JOINT_LOAD_COMP_TYPE ((NMLTYPE) 131)
#define EMC_JOINT_SET_BACKLASH_TYPE ((NMLTYPE) 134)
Expand All @@ -86,8 +81,6 @@ struct PM_CARTESIAN;
#define EMC_TRAJ_TERM_COND_BLEND 2

#define EMC_TRAJ_SET_MODE_TYPE ((NMLTYPE) 204)
#define EMC_TRAJ_SET_VELOCITY_TYPE ((NMLTYPE) 205)
#define EMC_TRAJ_SET_ACCELERATION_TYPE ((NMLTYPE) 206)
#define EMC_TRAJ_SET_MAX_VELOCITY_TYPE ((NMLTYPE) 207)
#define EMC_TRAJ_SET_SCALE_TYPE ((NMLTYPE) 209)
#define EMC_TRAJ_SET_RAPID_SCALE_TYPE ((NMLTYPE) 238)
Expand Down Expand Up @@ -329,7 +322,6 @@ extern int emcJointLoadComp(int joint, const char *file, int type);
extern int emcJogStop(int nr, int jjogmode);
extern int emcJogCont(int nr, double vel, int jjogmode);
extern int emcJogIncr(int nr, double incr, double vel, int jjogmode);
extern int emcJogAbs(int nr, double pos, double vel, int jjogmode);


extern int emcJointUpdate(EMC_JOINT_STAT stat[], int numJoints);
Expand Down
138 changes: 0 additions & 138 deletions include/nml_intf/emc_nml.hh
Original file line number Diff line number Diff line change
Expand Up @@ -246,93 +246,6 @@ class EMC_JOINT_SET_MAX_POSITION_LIMIT:public EMC_JOINT_CMD_MSG {
double limit;
};

class EMC_JOINT_SET_FERROR:public EMC_JOINT_CMD_MSG {
public:
EMC_JOINT_SET_FERROR()
: EMC_JOINT_CMD_MSG(EMC_JOINT_SET_FERROR_TYPE, sizeof(EMC_JOINT_SET_FERROR)),
ferror(0.0)
{};

// For internal NML/CMS use only.
// Sub-class update() calls base-class update()
// cppcheck-suppress duplInheritedMember
void update(CMS * cms);

double ferror;
};

class EMC_JOINT_SET_MIN_FERROR:public EMC_JOINT_CMD_MSG {
public:
EMC_JOINT_SET_MIN_FERROR()
: EMC_JOINT_CMD_MSG (EMC_JOINT_SET_MIN_FERROR_TYPE, sizeof(EMC_JOINT_SET_MIN_FERROR)),
ferror(0.0)
{};

// For internal NML/CMS use only.
// Sub-class update() calls base-class update()
// cppcheck-suppress duplInheritedMember
void update(CMS * cms);

double ferror;
};

class EMC_JOINT_SET_HOMING_PARAMS:public EMC_JOINT_CMD_MSG {
public:
// False positive. Triggers on 'offset'
// cppcheck-suppress uninitMemberVar
EMC_JOINT_SET_HOMING_PARAMS()
: EMC_JOINT_CMD_MSG(EMC_JOINT_SET_HOMING_PARAMS_TYPE, sizeof(EMC_JOINT_SET_HOMING_PARAMS)),
home(0.0),
offset(0.0),
home_final_vel(0.0),
search_vel(0.0),
latch_vel(0.0),
search_dist(0.0),
latch_dist(0.0),
use_index(0),
encoder_does_not_reset(0),
ignore_limits(0),
is_shared(0),
home_sequence(0),
volatile_home(0),
locking_indexer(0),
absolute_encoder(0)
{};

// For internal NML/CMS use only.
// Sub-class update() calls base-class update()
// cppcheck-suppress duplInheritedMember
void update(CMS * cms);

double home;
double offset;
double home_final_vel;
double search_vel;
double latch_vel;
double search_dist;
double latch_dist;
int use_index;
int encoder_does_not_reset;
int ignore_limits;
int is_shared;
int home_sequence;
int volatile_home;
int locking_indexer;
int absolute_encoder;
};

class EMC_JOINT_HALT:public EMC_JOINT_CMD_MSG {
public:
EMC_JOINT_HALT()
: EMC_JOINT_CMD_MSG(EMC_JOINT_HALT_TYPE, sizeof(EMC_JOINT_HALT))
{};

// For internal NML/CMS use only.
// Sub-class update() calls base-class update()
// cppcheck-suppress duplInheritedMember
void update(CMS * cms);
};

class EMC_JOINT_HOME:public EMC_JOINT_CMD_MSG {
public:
EMC_JOINT_HOME()
Expand Down Expand Up @@ -393,25 +306,6 @@ class EMC_JOG_INCR:public EMC_JOG_CMD_MSG {
int jjogmode; // 1==> joint jog, 0==> axis jog
};

class EMC_JOG_ABS:public EMC_JOG_CMD_MSG {
public:
EMC_JOG_ABS()
: EMC_JOG_CMD_MSG(EMC_JOG_ABS_TYPE, sizeof(EMC_JOG_ABS)),
pos(0.0),
vel(0.0),
jjogmode(0)
{};

// For internal NML/CMS use only.
// Sub-class update() calls base-class update()
// cppcheck-suppress duplInheritedMember
void update(CMS * cms);

double pos;
double vel;
int jjogmode; // 1==> joint jog, 0==> axis jog
};

class EMC_JOG_STOP:public EMC_JOG_CMD_MSG {
public:
EMC_JOG_STOP()
Expand Down Expand Up @@ -541,38 +435,6 @@ class EMC_TRAJ_SET_MODE:public EMC_TRAJ_CMD_MSG {
EMC_TRAJ_MODE mode;
};

class EMC_TRAJ_SET_VELOCITY:public EMC_TRAJ_CMD_MSG {
public:
EMC_TRAJ_SET_VELOCITY()
: EMC_TRAJ_CMD_MSG(EMC_TRAJ_SET_VELOCITY_TYPE, sizeof(EMC_TRAJ_SET_VELOCITY)),
velocity(0.0),
ini_maxvel(0.0)
{};

// For internal NML/CMS use only.
// Sub-class update() calls base-class update()
// cppcheck-suppress duplInheritedMember
void update(CMS * cms);

double velocity;
double ini_maxvel;
};

class EMC_TRAJ_SET_ACCELERATION:public EMC_TRAJ_CMD_MSG {
public:
EMC_TRAJ_SET_ACCELERATION()
: EMC_TRAJ_CMD_MSG(EMC_TRAJ_SET_ACCELERATION_TYPE, sizeof(EMC_TRAJ_SET_ACCELERATION)),
acceleration(0.0)
{};

// For internal NML/CMS use only.
// Sub-class update() calls base-class update()
// cppcheck-suppress duplInheritedMember
void update(CMS * cms);

double acceleration;
};

class EMC_TRAJ_SET_MAX_VELOCITY:public EMC_TRAJ_CMD_MSG {
public:
EMC_TRAJ_SET_MAX_VELOCITY()
Expand Down
4 changes: 0 additions & 4 deletions src/emc/motion-logger/motion-logger.c
Original file line number Diff line number Diff line change
Expand Up @@ -449,10 +449,6 @@ int main(int argc, char* argv[]) {
log_print("JOG_INCR\n");
break;

case EMCMOT_JOG_ABS:
log_print("JOG_ABS\n");
break;

case EMCMOT_SET_LINE:
log_print(
"SET_LINE x=%.6g, y=%.6g, z=%.6g, a=%.6g, b=%.6g, c=%.6g, u=%.6g, v=%.6g, w=%.6g, id=%d, motion_type=%d, vel=%.6g, ini_maxvel=%.6g, acc=%.6g, turn=%d\n",
Expand Down
24 changes: 0 additions & 24 deletions src/emc/motion/axis.c
Original file line number Diff line number Diff line change
Expand Up @@ -369,30 +369,6 @@ void axis_jog_incr(int axis_num, double offset, double vel, long servo_period)
axis->teleop_tp.enable = 1;
}

void axis_jog_abs(int axis_num, double offset, double vel)
{
emcmot_axis_t *axis = &axis_array[axis_num];
double tmp1, min_lim, max_lim;

axis->kb_ajog_active = 1;
if (axis->wheel_ajog_active) { return; }
if (vel > 0.0) {
tmp1 = axis->teleop_tp.pos_cmd + offset;
} else {
tmp1 = axis->teleop_tp.pos_cmd - offset;
}
axis_jog_limits(axis_num, &min_lim, &max_lim);
if (tmp1 > max_lim) { return; }
if (tmp1 < min_lim) { return; }
axis->teleop_tp.pos_cmd = tmp1;
axis->teleop_tp.max_vel = fabs(vel);
axis->teleop_tp.max_acc = axis->acc_limit;
axis->teleop_vel_req = axis->teleop_tp.max_vel;
axis->teleop_acc_req = axis->teleop_tp.max_acc;
axis->kb_ajog_active = 1;
axis->teleop_tp.enable = 1;
}

bool axis_jog_abort(int axis_num, bool immediate)
{
bool aborted = 0;
Expand Down
1 change: 0 additions & 1 deletion src/emc/motion/axis.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ void axis_check_constraints(double pos[], int failing_axes[]);

void axis_jog_cont(int axis_num, double vel, long servo_period);
void axis_jog_incr(int axis_num, double offset, double vel, long servo_period);
void axis_jog_abs(int axis_num, double offset, double vel);
bool axis_jog_abort_all(bool immediate);
bool axis_jog_abort(int axis_num, bool immediate);
bool axis_jog_is_active(void);
Expand Down
Loading