All pastes #953939 Raw Edit

alex

public diff v1 · immutable
#953939 ·published 2008-03-23 14:53 UTC
rendered paste body
Index: emc/ini/iniaxis.cc===================================================================RCS file: /cvs/emc2/src/emc/ini/iniaxis.cc,vretrieving revision 1.35diff -u -r1.35 iniaxis.cc--- emc/ini/iniaxis.cc	27 Feb 2008 21:07:05 -0000	1.35+++ emc/ini/iniaxis.cc	23 Mar 2008 14:51:19 -0000@@ -49,6 +49,7 @@   FERROR <float>               maximum following error, scaled to max vel   MIN_FERROR <float>           minimum following error   HOME <float>                 home position (where to go after home)+  HOME_VEL <float>             speed to move from HOME_OFFSET to HOME location (at the end of homing)   HOME_OFFSET <float>          home switch/index pulse location   HOME_SEARCH_VEL <float>      homing speed, search phase   HOME_LATCH_VEL <float>       homing speed, latch phase@@ -90,6 +91,7 @@     double home;     double search_vel;     double latch_vel;+    double home_vel; // moving from OFFSET to HOME     bool use_index;     bool ignore_limits;     bool is_shared;@@ -196,6 +198,8 @@         axisIniFile->Find(&search_vel, "HOME_SEARCH_VEL", axisString);         latch_vel = 0;	                // default         axisIniFile->Find(&latch_vel, "HOME_LATCH_VEL", axisString);+        home_vel = -1;	                // default (rapid)+        axisIniFile->Find(&home_vel, "HOME_VEL", axisString);         is_shared = false;	        // default         axisIniFile->Find(&is_shared, "HOME_IS_SHARED", axisString);         use_index = false;	        // default@@ -208,7 +212,7 @@         axisIniFile->Find(&volatile_home, "VOLATILE_HOME", axisString);          // issue NML message to set all params-        if (0 != emcAxisSetHomingParams(axis, home, offset, search_vel,+        if (0 != emcAxisSetHomingParams(axis, home, offset, home_vel, search_vel,                                         latch_vel, (int)use_index, (int)ignore_limits,                                         (int)is_shared, sequence, volatile_home)) {             if (EMC_DEBUG & EMC_DEBUG_CONFIG) {Index: emc/motion/command.c===================================================================RCS file: /cvs/emc2/src/emc/motion/command.c,vretrieving revision 1.110diff -u -r1.110 command.c--- emc/motion/command.c	18 Mar 2008 01:57:01 -0000	1.110+++ emc/motion/command.c	23 Mar 2008 14:51:20 -0000@@ -521,6 +521,7 @@ 	    } 	    joint->home_offset = emcmotCommand->offset; 	    joint->home = emcmotCommand->home;+	    joint->home_vel = emcmotCommand->home_vel; 	    joint->home_search_vel = emcmotCommand->search_vel; 	    joint->home_latch_vel = emcmotCommand->latch_vel; 	    joint->home_flags = emcmotCommand->flags;Index: emc/motion/homing.c===================================================================RCS file: /cvs/emc2/src/emc/motion/homing.c,vretrieving revision 1.1diff -u -r1.1 homing.c--- emc/motion/homing.c	27 Feb 2008 02:50:27 -0000	1.1+++ emc/motion/homing.c	23 Mar 2008 14:51:21 -0000@@ -689,9 +689,10 @@ 		/* plan a move to home position */ 		joint->free_pos_cmd = joint->home; 		/* do the move at max speed */-		/*! \todo FIXME - should this be search_vel? or another user-		   specified speed? or is a rapid OK? */-		joint->free_vel_lim = joint->vel_limit;+		/* if home_vel is set (>0) then we use that, otherwise we rapid there */+		if (joint->home_vel > 0)+		    joint->free_vel_lim = joint->home_vel;+		else joint->free_vel_lim = joint->vel_limit; 		/* start the move */ 		joint->free_tp_enable = 1; 		joint->home_state = HOME_FINAL_MOVE_WAIT;Index: emc/motion/motion.c===================================================================RCS file: /cvs/emc2/src/emc/motion/motion.c,vretrieving revision 1.116diff -u -r1.116 motion.c--- emc/motion/motion.c	18 Mar 2008 01:57:01 -0000	1.116+++ emc/motion/motion.c	23 Mar 2008 14:51:23 -0000@@ -964,6 +964,7 @@ 	joint->max_ferror = 1.0; 	joint->home_search_vel = 0.0; 	joint->home_latch_vel = 0.0;+	joint->home_vel = -1; 	joint->home_offset = 0.0; 	joint->home = 0.0; 	joint->home_flags = 0;Index: emc/motion/motion.h===================================================================RCS file: /cvs/emc2/src/emc/motion/motion.h,vretrieving revision 1.95diff -u -r1.95 motion.h--- emc/motion/motion.h	18 Mar 2008 01:57:01 -0000	1.95+++ emc/motion/motion.h	23 Mar 2008 14:51:24 -0000@@ -215,6 +215,7 @@ 	double scale;		/* velocity scale or spindle_speed scale arg */ 	double offset;		/* input, output, or home offset arg */ 	double home;		/* joint home position */+	double home_vel;	/* joint velocity for moving from OFFSET to HOME */ 	double search_vel;	/* home search velocity */ 	double latch_vel;	/* home latch velocity */ 	int flags;		/* homing config flags, other boolean args */@@ -455,6 +456,7 @@ 	double min_ferror;	/* zero speed following error limit */ 	double max_ferror;	/* max speed following error limit */ 	double home_search_vel;	/* dir/spd to look for home switch */+	double home_vel;        /* speed to travel from OFFSET to HOME position */ 	double home_latch_vel;	/* dir/spd to latch switch/index pulse */ 	double home_offset;	/* dir/dist from switch to home point */ 	double home;		/* joint coordinate of home point */Index: emc/nml_intf/emc.cc===================================================================RCS file: /cvs/emc2/src/emc/nml_intf/emc.cc,vretrieving revision 1.44diff -u -r1.44 emc.cc--- emc/nml_intf/emc.cc	27 Feb 2008 21:07:04 -0000	1.44+++ emc/nml_intf/emc.cc	23 Mar 2008 14:51:25 -0000@@ -2875,6 +2875,7 @@     EMC_AXIS_CMD_MSG::update(cms);     cms->update(home);     cms->update(offset);+    cms->update(home_vel);     cms->update(search_vel);     cms->update(latch_vel);     cms->update(use_index);Index: emc/nml_intf/emc.hh===================================================================RCS file: /cvs/emc2/src/emc/nml_intf/emc.hh,vretrieving revision 1.60diff -u -r1.60 emc.hh--- emc/nml_intf/emc.hh	27 Feb 2008 21:07:04 -0000	1.60+++ emc/nml_intf/emc.hh	23 Mar 2008 14:51:26 -0000@@ -397,7 +397,7 @@ extern int emcAxisSetMaxOutputLimit(int axis, double limit); extern int emcAxisSetFerror(int axis, double ferror); extern int emcAxisSetMinFerror(int axis, double ferror);-extern int emcAxisSetHomingParams(int axis, double home, double offset,+extern int emcAxisSetHomingParams(int axis, double home, double offset, double home_vel, 				  double search_vel, double latch_vel, 				  int use_index, int ignore_limits, 				  int is_shared, int home_sequence, int volatile_home);Index: emc/nml_intf/emc_nml.hh===================================================================RCS file: /cvs/emc2/src/emc/nml_intf/emc_nml.hh,vretrieving revision 1.15diff -u -r1.15 emc_nml.hh--- emc/nml_intf/emc_nml.hh	27 Feb 2008 21:07:04 -0000	1.15+++ emc/nml_intf/emc_nml.hh	23 Mar 2008 14:51:29 -0000@@ -271,6 +271,7 @@      double home;     double offset;+    double home_vel;     double search_vel;     double latch_vel;     int use_index;Index: emc/task/emctaskmain.cc===================================================================RCS file: /cvs/emc2/src/emc/task/emctaskmain.cc,vretrieving revision 1.109diff -u -r1.109 emctaskmain.cc--- emc/task/emctaskmain.cc	23 Mar 2008 12:12:25 -0000	1.109+++ emc/task/emctaskmain.cc	23 Mar 2008 14:51:31 -0000@@ -1516,6 +1516,7 @@ 	retval = emcAxisSetHomingParams(set_homing_params_msg->axis, 					set_homing_params_msg->home, 					set_homing_params_msg->offset,+					set_homing_params_msg->home_vel, 					set_homing_params_msg->search_vel, 					set_homing_params_msg->latch_vel, 					set_homing_params_msg->use_index,@@ -2767,11 +2768,13 @@ 	// not found, use default     } -    if (NULL != (inistring = inifile.Find("RS274NGC_STARTUP_CODE", "EMC"))) {+    if (NULL != (inistring = inifile.Find("RS274NGC_STARTUP_CODE", "RS274NGC"))) { 	// copy to global 	strcpy(RS274NGC_STARTUP_CODE, inistring);     } else {-	if (NULL != (inistring = inifile.Find("RS274NGC_STARTUP_CODE", "RS274NGC"))) {+	//FIXME-AJ: this is the old (unpreferred) location. just for compatibility purposes+	//it will be dropped in v2.4+	if (NULL != (inistring = inifile.Find("RS274NGC_STARTUP_CODE", "EMC"))) { 	    // copy to global 	    strcpy(RS274NGC_STARTUP_CODE, inistring); 	} else {Index: emc/task/taskintf.cc===================================================================RCS file: /cvs/emc2/src/emc/task/taskintf.cc,vretrieving revision 1.90diff -u -r1.90 taskintf.cc--- emc/task/taskintf.cc	27 Feb 2008 21:07:03 -0000	1.90+++ emc/task/taskintf.cc	23 Mar 2008 14:51:32 -0000@@ -223,7 +223,7 @@     return usrmotWriteEmcmotCommand(&emcmotCommand); } -int emcAxisSetHomingParams(int axis, double home, double offset,+int emcAxisSetHomingParams(int axis, double home, double offset, double home_vel, 			   double search_vel, double latch_vel, 			   int use_index, int ignore_limits, int is_shared, 			   int sequence,int volatile_home)@@ -236,6 +236,7 @@     emcmotCommand.axis = axis;     emcmotCommand.home = home;     emcmotCommand.offset = offset;+    emcmotCommand.home_vel = home_vel;     emcmotCommand.search_vel = search_vel;     emcmotCommand.latch_vel = latch_vel;     emcmotCommand.flags = 0;Index: emc/usr_intf/axis/scripts/axis.py===================================================================RCS file: /cvs/emc2/src/emc/usr_intf/axis/scripts/axis.py,vretrieving revision 1.158diff -u -r1.158 axis.py--- emc/usr_intf/axis/scripts/axis.py	23 Mar 2008 12:12:26 -0000	1.158+++ emc/usr_intf/axis/scripts/axis.py	23 Mar 2008 14:51:35 -0000@@ -1773,9 +1773,9 @@         shutil.copy(parameter, temp_parameter)         canon.parameter_file = temp_parameter -        initcode = inifile.find("EMC", "RS274NGC_STARTUP_CODE") or ""+        initcode = inifile.find("RS274NGC", "RS274NGC_STARTUP_CODE") or "" 	if initcode == "":-    	    initcode = inifile.find("RS274NGC", "RS274NGC_STARTUP_CODE") or ""+    	    initcode = inifile.find("EMC", "RS274NGC_STARTUP_CODE") or ""         unitcode = "G%d" % (20 + (s.linear_units == 1))         try:             result, seq = gcode.parse(f, canon, unitcode, initcode)