Skip to content

Commit

Permalink
Multispindle: Allow setting of all spindles simultaneously
Browse files Browse the repository at this point in the history
Signed-off-by: andypugh <andy@bodgesoc.org>
  • Loading branch information
andypugh committed Apr 9, 2020
1 parent 38df8f1 commit da3c1c1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/emc/rs274ngc/interp_cycles.cc
Expand Up @@ -1197,7 +1197,7 @@ int Interp::convert_cycle_uv(int motion, //!< a g-code between G_81 and G_89, a
block->p_number == -1.0 ? settings->cycle_p : block->p_number;
if (block->dollar_flag){
CHKS((block->dollar_number < 0 || block->dollar_number >= settings->num_spindles),
(_("Invalid spindle ($) numberin G74/G84 cycle")));
(_("Invalid spindle ($) number in G74/G84 cycle")));
settings->active_spindle = (int)block->dollar_number;
}
CYCLE_MACRO(convert_cycle_g74_g84(block, CANON_PLANE_UV, aa, bb, clear_cc, cc,
Expand Down
8 changes: 6 additions & 2 deletions src/emc/rs274ngc/interp_execute.cc
Expand Up @@ -280,9 +280,13 @@ int Interp::execute_block(block_pointer block, //!< pointer to a block of RS27
return (convert_remapped_code(block,settings,STEP_SET_SPINDLE_SPEED,'S'));
} else {
if (block->dollar_flag){
CHKS((block->dollar_number < 0 || block->dollar_number >= settings->num_spindles),
CHKS((block->dollar_number < -1 || block->dollar_number >= settings->num_spindles),
(_("Invalid spindle ($) number in Spindle speed command")));
status = convert_speed(block->dollar_number, block, settings);
if (block->dollar_number == -1 ){
for (int i = 0; i < settings->num_spindles; status = convert_speed(i++, block, settings));
} else {
status = convert_speed(block->dollar_number, block, settings);
}
} else {
status = convert_speed(0, block, settings);
}
Expand Down

0 comments on commit da3c1c1

Please sign in to comment.