I have been adjusting the limit switches on my G4000 lathe. Suddenly I am getting Joint 0 on limit switch error and Joint 1 on limit switch error when I try to turn on the spindle. The spindle turns on and then immediately off with the error messages.
The X limit switch is set at 3.45" so that at 0.0" the tip of the tool is at X=0.000. The Z limit switch is set at 13.4806"so the tip of the tool at the end of the jaws on my 3 jaw chuck is Z=0.000". Until the last change this subroutine was working perfectly. At the point I get the error messages the X and Z axis are nowhere near the limits. The last change I made was to flip A+ and A- on the x-axis so that I don’t have to go in and had edit X-Axis STEP_SCALE to change it to negative every time that I use pncconf. Global variables are: (======================================================================) (=================== Define Constants/Variables =======================) #<_xorigin>=[0.0000] ( X axis offset for Coordinate sys 2 ) ( to correct too small diameter add positive value equal to 1/2 error to #<_xorigin> ) ( to correct too large diameter subtract positive value equal to 1/2 error from #<_xorigin> ) #<_zorigin>=[0.861] ( Z axis offset for Coordinate sys 2 ) #<_toolnum>=2 ( Set Tool Number ) #<_tooldia>=0.000 ( Set the tool diameter ) #<_toolrad>=[#<_tooldia>/2] ( Tool radius ) #<_cutoffwidth>=0.09375 ( Cutoff Tool Width ) #<_feedrate>=3.5 ( X Feed rate ) #<_plungerate>=1.2 ( Z Feed rate ) #<_finefeed>=1.0 ( Fine Feed rate ) #<_partoffrate>=0.2 ( Part off feed rate ) #<_spindlespeed>=500 ( Spindle Speed ) #<_X_dia>=0.9000 ( Starting Diameter of Material ) #<_X_rad>=[#<_X_dia>/2] ( Starting Radius ) #<_Xfinish>=0.750 ( Edge of Material ) #<_X_depth>=[[#<_X_dia>-#<_Xfinish>]/2] ( Final Diameter of Material ) #<_Xcut>=0.010 ( X cut depth ) #<_close_X>=0.050 ( Close to X surface ) #<_clear_X>=[#<_X_rad>+#<_close_X>] ( distance to clear X axis at end ) #<_safe_X>=[#<_X_rad>+#<_close_X>] ( distance to move X for safe z moves ) #<_Zcut>=0.010 ( Z Cut depth ) #<_Zthick>=0.603 ( Thickness of Material ) #<_ZFace>=0.000 ( Z surface ) #<_Zdepth>=[#<_ZFace>-#<_Zthick>] ( Depth to cut in Z direction ) #<_close_Z>=0.050 ( Close to top ) #<_safe_Z>=[#<_ZFace>+#<_close_Z>] ( Z clear height ) #<_clear_Z>=1.000 ( Distance for final retract ) #<_sqcorner>=[[SQRT[2]-1]*[#<_toolrad>+0.0001]] ( Offset of Tool radius to corner ) (#518=[2*[SIN[15]**2]]) (#518=[2*[SIN[15]^2]]) #<_referencetool>=#5063 The subroutine is: ( Turn Outer Surface ) o<TurnOuter> SUB ([1] [2] [3] [4]) ( #1=X Diameter, #2=ZStart, #3=Xsize, #4=ZLength ) #<Xcut> = [#1/2] ( starting radius ) #<ZStart>=[0.0-#2] #<Xend> = [#3/2] ( depth to cut to ) #<Zend>=[#<ZStart>-#4] #<localfeed> = #<_feedrate> ( variable feed rate ) o<L1> DO m0 (DEBUG, Turn Arbor Stub1 X = [#<Xcut>+#<_close_X>]; Zstart = [#<ZStart>+#<_close_Z>]; ZEnd = [#<Zend>] ... unpause[S] when ready) G0 X[#<Xcut>+#<_close_X>] ( move X close to start position ) Z[#<ZStart>+#<_close_Z>] ( move Z close to start position ) o<L2> IF [#<Xend> LT [#<Xcut> - #<_Xcut>]] ( set up X cutting position ) #<Xcut> = [#<Xcut>-#<_Xcut>] o<L2> ELSE #<Xcut> = #<Xend> #<localfeed> = #<_finefeed> ( change feed rate for finish cut ) o<L2> ENDIF m0 (DEBUG, Turn Arbor Stub2 X = [#<Xcut>]; ZEnd = [#<Zend>] ... unpause[S] when ready) G01 X#<Xcut> F#<_finefeed> ( Position for X cut ) Z#<Zend> F#<localfeed> ( Make Z cut ) o<L1> WHILE [#<Xend> LT #<Xcut> ] ( Loop until we cut to depth ) G0 X[#<Xcut>+#<_close_X>] ( move X close to final cut position ) Z[#<ZStart>+#<_close_Z>] ( move Z close to start position ) G01 X#<Xcut> F#<_finefeed> ( Position for X spring cut ) Z#<Zend> F#<localfeed> ( Make Z spring cut ) G0 X#<_clear_X> ( Retract X to clear ) G0 Z#<_safe_Z> ( Retract Z to clear ) o<TurnOuter> ENDSUB The calling sequence is: m0 (DEBUG, be sure Arbor Stub is sticking out from chuck ... unpause[S] when ready) m0 (DEBUG, Mount Turning Tool ... unpause[S] when ready) T#<_toolnum> M6 m0 (DEBUG, Turn on Spindle ... unpause[S] when ready) S#<_spindlespeed> M3 m0 (DEBUG, Call TurnOuter ... unpause[S] when ready) o<TurnOuter> call [#<_X_dia>] [0.0] [0.750] [#<_Zthick>] (Cut probe thread) _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users