Skip to content

Commit 4ca4da7

Browse files
committed
Merge branch 'master' of github.com:rene-dev/linuxcnc
Signed-off-by: Rene Hopf <renehopf@mac.com> # Conflicts: # src/emc/rs274ngc/interp_check.cc # src/emc/rs274ngc/interp_convert.cc # src/emc/tp/tp.c
2 parents cb934ee + 6e5615f commit 4ca4da7

18 files changed

Lines changed: 36 additions & 22 deletions

File tree

docs/src/gcode/g-code.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1004,9 +1004,10 @@ It is an error if:
10041004
(((G33.1 Rigid Tapping)))
10051005

10061006
----------------
1007-
G33.1 X- Y- Z- K-
1007+
G33.1 X- Y- Z- K- I-
10081008
----------------
10091009
* 'K' - distance per revolution
1010+
* 'I' - optional spindle speed multiplier for faster return move
10101011

10111012
[WARNING]
10121013
For Z only tapping preposition the XY location prior to calling G33.1 and only

src/emc/motion/command.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1610,7 +1610,7 @@ void emcmotCommandHandler(void *arg, long period)
16101610

16111611
/* append it to the emcmotDebug->coord_tp */
16121612
tpSetId(&emcmotDebug->coord_tp, emcmotCommand->id);
1613-
int res_addtap = tpAddRigidTap(&emcmotDebug->coord_tp, emcmotCommand->pos, emcmotCommand->vel, emcmotCommand->ini_maxvel, emcmotCommand->acc, emcmotStatus->enables_new);
1613+
int res_addtap = tpAddRigidTap(&emcmotDebug->coord_tp, emcmotCommand->pos, emcmotCommand->vel, emcmotCommand->ini_maxvel, emcmotCommand->acc, emcmotStatus->enables_new, emcmotCommand->scale);
16141614
if (res_addtap < 0) {
16151615
emcmotStatus->atspeed_next_feed = 0; /* rigid tap always waits for spindle to be at-speed */
16161616
reportError(_("can't add rigid tap move at line %d, error code %d"),

src/emc/nml_intf/canon.hh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ all axes have covered the same proportion of their required motion.
478478
The meanings of the parameters is the same as for STRAIGHT_TRAVERSE.*/
479479

480480
extern void RIGID_TAP(int lineno,
481-
double x, double y, double z);
481+
double x, double y, double z, double mult);
482482

483483
/* Move linear and synced with the previously set pitch.
484484
Only linear moves are allowed, axes A,B,C are not allowed to move.*/

src/emc/nml_intf/emc.hh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ extern int emcTrajClearProbeTrippedFlag();
428428
extern int emcTrajProbe(EmcPose pos, int type, double vel,
429429
double ini_maxvel, double acc, unsigned char probe_type);
430430
extern int emcAuxInputWait(int index, int input_type, int wait_type, int timeout);
431-
extern int emcTrajRigidTap(EmcPose pos, double vel, double ini_maxvel, double acc);
431+
extern int emcTrajRigidTap(EmcPose pos, double vel, double ini_maxvel, double acc, double mult);
432432

433433
extern int emcTrajUpdate(EMC_TRAJ_STAT * stat);
434434

src/emc/nml_intf/emc_nml.hh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1002,7 +1002,7 @@ class EMC_TRAJ_RIGID_TAP:public EMC_TRAJ_CMD_MSG {
10021002
void update(CMS * cms);
10031003

10041004
EmcPose pos;
1005-
double vel, ini_maxvel, acc;
1005+
double vel, ini_maxvel, acc, scale;
10061006
};
10071007

10081008
// EMC_TRAJ status base class

src/emc/rs274ngc/gcodemodule.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ void STRAIGHT_PROBE(int line_number,
485485

486486
}
487487
void RIGID_TAP(int line_number,
488-
double x, double y, double z) {
488+
double x, double y, double z, double mult) {
489489
if(metric) { x /= 25.4; y /= 25.4; z /= 25.4; }
490490
maybe_new_line(line_number);
491491
if(interp_error) return;

src/emc/rs274ngc/interp_check.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,8 +275,8 @@ int Interp::check_other_codes(block_pointer block) //!< pointer to a block
275275

276276
if (block->i_flag) { /* could still be useless if yz_plane arc */
277277
CHKS(((motion != G_2) && (motion != G_3) && (motion != G_5) && (motion != G_5_1) &&
278-
(motion != G_76) && (motion != G_87) && (block->g_modes[GM_MODAL_0] != G_10)),
279-
_("I word with no G2, G3, G5, G5.1, G10, G76, or G87 to use it"));
278+
(motion != G_76) && (motion != G_87) && (motion != G_33_1) && (block->g_modes[GM_MODAL_0] != G_10)),
279+
_("I word with no G2, G3, G5, G5.1, G10, G33.1, G76, or G87 to use it"));
280280
}
281281

282282
if (block->j_flag) { /* could still be useless if xz_plane arc */

src/emc/rs274ngc/interp_convert.cc

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4543,7 +4543,14 @@ int Interp::convert_straight(int move, //!< either G_0 or G_1
45434543
(settings->spindle_turning[settings->active_spindle] != CANON_COUNTERCLOCKWISE)),
45444544
_("Spindle not turning in G33.1"));
45454545
START_SPEED_FEED_SYNCH(settings->active_spindle, block->k_number, 0);
4546-
RIGID_TAP(block->line_number, end_x, end_y, end_z);
4546+
double scale = 1;
4547+
if(block->i_flag){
4548+
scale = block->i_number;
4549+
if(scale < 1){
4550+
scale = 1;
4551+
}
4552+
}
4553+
RIGID_TAP(block->line_number, end_x, end_y, end_z, scale);
45474554
STOP_SPEED_FEED_SYNCH();
45484555
// after the RIGID_TAP cycle we'll be in the same spot
45494556
} else if (move == G_76) {

src/emc/sai/saicanon.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@ void STRAIGHT_PROBE(int line_number,
554554
}
555555

556556

557-
void RIGID_TAP(int line_number, double x, double y, double z)
557+
void RIGID_TAP(int line_number, double x, double y, double z, double mult)
558558
{
559559

560560

src/emc/task/emccanon.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1018,7 +1018,7 @@ void STRAIGHT_FEED(int line_number,
10181018
}
10191019

10201020

1021-
void RIGID_TAP(int line_number, double x, double y, double z)
1021+
void RIGID_TAP(int line_number, double x, double y, double z, double scale)
10221022
{
10231023
double ini_maxvel,acc;
10241024
EMC_TRAJ_RIGID_TAP rigidTapMsg;
@@ -1044,7 +1044,7 @@ void RIGID_TAP(int line_number, double x, double y, double z)
10441044
rigidTapMsg.vel = toExtVel(ini_maxvel);
10451045
rigidTapMsg.ini_maxvel = toExtVel(ini_maxvel);
10461046
rigidTapMsg.acc = toExtAcc(acc);
1047-
1047+
rigidTapMsg.scale = scale;
10481048
flush_segments();
10491049

10501050
if(ini_maxvel && acc) {

0 commit comments

Comments
 (0)