This patch adds two rapid-jog buttons to the Axis GUI that will always jog the joints at G0 speed regardless of the feedrate slider setting.
Signed-off-by: Michael Buesch <[email protected]> --- share/axis/tcl/axis.tcl | 54 +++++++++++++++++++++++++++++++++- src/emc/usr_intf/axis/scripts/axis.py | 18 +++++++++++ 2 files changed, 71 insertions(+), 1 deletion(-) --- emc2.3-branch.orig/share/axis/tcl/axis.tcl +++ emc2.3-branch/share/axis/tcl/axis.tcl @@ -1068,6 +1068,34 @@ combobox $_tabs_manual.jogf.jog.jogincr -width 10 $_tabs_manual.jogf.jog.jogincr list insert end [_ Continuous] 0.1000 0.0100 0.0010 0.0001 +frame $_tabs_manual.jogf.jograpid + +button $_tabs_manual.jogf.jograpid.rapidminus \ + -command {if {![is_continuous]} {jog_rapid_minus 1}} \ + -padx 2m \ + -pady 0 \ + -width 2 \ + -text R- +bind $_tabs_manual.jogf.jograpid.rapidminus <Button-1> { + if {[is_continuous]} { jog_rapid_minus } +} +bind $_tabs_manual.jogf.jograpid.rapidminus <ButtonRelease-1> { + if {[is_continuous]} { jog_stop } +} + +button $_tabs_manual.jogf.jograpid.rapidplus \ + -command {if {![is_continuous]} {jog_rapid_plus 1}} \ + -padx 2m \ + -pady 0 \ + -width 2 \ + -text R+ +bind $_tabs_manual.jogf.jograpid.rapidplus <Button-1> { + if {[is_continuous]} { jog_rapid_plus } +} +bind $_tabs_manual.jogf.jograpid.rapidplus <ButtonRelease-1> { + if {[is_continuous]} { jog_stop } +} + frame $_tabs_manual.jogf.zerohome button $_tabs_manual.jogf.zerohome.home \ @@ -1089,7 +1117,7 @@ setup_widget_accel $_tabs_manual.jogf.ov grid $_tabs_manual.jogf.zerohome \ -column 0 \ - -row 1 \ + -row 2 \ -columnspan 3 \ -sticky w @@ -1099,6 +1127,12 @@ grid $_tabs_manual.jogf.jog \ -columnspan 3 \ -sticky w +grid $_tabs_manual.jogf.jograpid \ + -column 0 \ + -row 1 \ + -columnspan 3 \ + -sticky w + # Grid widget $_tabs_manual.jogf.zerohome.home grid $_tabs_manual.jogf.zerohome.home \ -column 0 \ @@ -1144,6 +1178,20 @@ grid $_tabs_manual.jogf.jog.jogincr \ -pady 2 \ -sticky nsw +# Grid widget $_tabs_manual.jogf.jograpid.rapidminus +grid $_tabs_manual.jogf.jograpid.rapidminus \ + -column 0 \ + -row 0 \ + -pady 2 \ + -sticky nsw + +# Grid widget $_tabs_manual.jogf.jograpid.rapidplus +grid $_tabs_manual.jogf.jograpid.rapidplus \ + -column 1 \ + -row 0 \ + -pady 2 \ + -sticky nsw + vspace $_tabs_manual.space1 \ -height 12 @@ -1839,6 +1887,8 @@ set manual [concat [winfo children $_tab $_tabs_manual.jogf.zerohome.home \ $_tabs_manual.jogf.jog.jogminus \ $_tabs_manual.jogf.jog.jogplus \ + $_tabs_manual.jogf.jograpid.rapidminus \ + $_tabs_manual.jogf.jograpid.rapidplus \ $_tabs_manual.spindlef.cw $_tabs_manual.spindlef.ccw \ $_tabs_manual.spindlef.stop $_tabs_manual.spindlef.brake \ $_tabs_manual.flood $_tabs_manual.mist $_tabs_mdi.command \ @@ -2320,6 +2370,8 @@ DynamicHelp::add $_tabs_manual.axes.axis DynamicHelp::add $_tabs_manual.axes.axisc -text [_ "Activate axis \[5\]"] DynamicHelp::add $_tabs_manual.jogf.jog.jogminus -text [_ "Jog selected axis"] DynamicHelp::add $_tabs_manual.jogf.jog.jogplus -text [_ "Jog selected axis"] +DynamicHelp::add $_tabs_manual.jogf.jograpid.rapidminus -text [_ "Rapid jog selected axis"] +DynamicHelp::add $_tabs_manual.jogf.jograpid.rapidplus -text [_ "Rapid jog selected axis"] DynamicHelp::add $_tabs_manual.jogf.jog.jogincr -text [_ "Select jog increment"] DynamicHelp::add $_tabs_manual.jogf.override -text [_ "Temporarily allow jogging outside machine limits \[L\]"] --- emc2.3-branch.orig/src/emc/usr_intf/axis/scripts/axis.py +++ emc2.3-branch/src/emc/usr_intf/axis/scripts/axis.py @@ -2381,6 +2381,12 @@ def get_jog_speed(a): return vars.jog_speed.get()/60. else: return vars.jog_aspeed.get()/60. +# returns the maximum possible axis speed in units/sec +def get_max_jog_speed(a): + if vars.joint_mode.get() or a in (0,1,2,6,7,8): + return vars.max_speed.get() + else: return vars.max_aspeed.get() + def run_warn(): warnings = [] if o.g: @@ -3025,12 +3031,24 @@ class TclCommands(nf.TclCommands): a = "xyzabcuvw".index(a) speed = get_jog_speed(a) jog_on(a, speed) + def jog_rapid_plus(incr=False): + a = vars.current_axis.get() + if isinstance(a, (str, unicode)): + a = "xyzabcuvw".index(a) + speed = get_max_jog_speed(a) + jog_on(a, speed) def jog_minus(incr=False): a = vars.current_axis.get() if isinstance(a, (str, unicode)): a = "xyzabcuvw".index(a) speed = get_jog_speed(a) jog_on(a, -speed) + def jog_rapid_minus(incr=False): + a = vars.current_axis.get() + if isinstance(a, (str, unicode)): + a = "xyzabcuvw".index(a) + speed = get_max_jog_speed(a) + jog_on(a, -speed) def jog_stop(event=None): jog_off(vars.current_axis.get()) -- Greetings, Michael. ------------------------------------------------------------------------------ Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf _______________________________________________ Emc-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-developers
