Is there a standard or convention on which way M3 and M4 spins a lathe spindle? 
 Is the direction (CW/CCW) viewed from looking at the spindle face or out FROM 
the spindle?  Does it change depending on where the tools are?  I think I may 
have our lathe set up to spin opposite of convention but now I am not sure what 
that convention (standard?) is...

But the real issue I am sending this email about is I have some gcode that 
Fusion 360 generated and a strange thing is happening with it on my Emco lathe 
running 2.7.14.

What is happening is that after the PROFILE1 section runs, the spindle will 
sometimes change direction when going to do the CHAMFER2 section of code.  I 
say sometime because I ran 6 or so of these parts and it ran fine, then 
suddenly it decided to change directions.   I have also had the spindle stop 
entirely at this point.   But Linuxcnc clearly thought it was still spinning 
and was going to happily jam the tool in there.   The stopping has only 
happened once or twice in the 40 or so times I have run the program.  The 
spinning in the opposite direction happens more frequently, maybe 4 times in 40 
runs or so.

The spindle codes are the same in both PROFILE1 and CHAMFER2 sections:  G96 
D3000 S500 M03.  If I remove the G96 D3000 S500 M03 from the CHAMFER2 section 
of code I believe the problem goes away.  I still need to run more to verify 
that but I am pretty sure that’s the case.

Any ideas on what might be happening or how to debug it?  I can of course just 
leave out the second G96 D3000 S500 M03 assuming that prevents it from 
happening, but I’d like to post-n-go as it were with Fusion code rather than 
have to bandaid.

The gcode file is:


%
(PROGRAM NAME--SA232)
(PROGRAM COMMENT--SA-232_PLUG)
(NOTE--OVERRIDING TOOL SPINDLE DIRECTION FOR TOOLS T1, T3, T5, AND T7)
(POST--EMCOTURN 120P BASED ON GENERIC TORMACH TURNING)
M70  (save modal state, restore at end)
G7
G18
G90
G20
(GENERATED--THU JUL 25 160944 2019)
(USERNAME--TOM)
(FILE NAME--SA-232_LCH-1250-18 V12)
(JOB--SETUP2)

(FACE1)
G53 G0 X0
G53 G0 Z0
M6 T0005 G43 H0005
G54
G96 D3000 S300 M03
G94
G90 G0 X1.5 Z0.1969
G0 Z0.0516
X1.4
G1 X1.1131 F10.
X1. Z-0.005
X-0.0312 F5.
X0.0819 Z0.0516 F20.
G0 X1.5
Z0.1969
M05
M09

(PROFILE1)
G96 D3000 S500 M03
G94
G0 X1.5 Z0.1969
Z0.0566
X1.0929
G1 X1.0531 F20.
X0.94 Z0. F10.
Z-0.4156
X1.
X1.16 F20.
G0 Z0.0566
X0.9931
G1 X0.88 Z0. F10.
Z-0.4156
X0.94
X1.0531 Z-0.3591 F20.
G0 Z0.0566
X0.9331
G1 X0.82 Z0. F10.
Z-0.295
X0.845 Z-0.3075
G18 G3 X0.86 Z-0.3256 R0.0256
G1 Z-0.4156
X0.88
X0.9931 Z-0.3591 F20.
G0 Z0.0566
X0.9005
G1 X0.7873 Z0. F10.
Z-0.2787
X0.845 Z-0.3075
G3 X0.85 Z-0.3104 R0.0256
G1 X0.9631 Z-0.2538 F20.
G0 Z0.0566
X0.8682
G1 X0.8678 F20.
X0.7547 Z0. F10.
G3 X0.7653 Z-0.0156 R0.0256
G1 Z-0.2677
X0.8173 Z-0.2937
X0.9305 Z-0.2371 F20.
G0 Z0.0566
X0.8394
G1 X0.8273 F20.
X0.7141 Z0. F10.
G3 X0.7453 Z-0.0156 R0.0156
G1 Z-0.2718
X0.8308 Z-0.3146
G3 X0.84 Z-0.3256 R0.0156
G1 Z-0.4156
X0.9531 Z-0.3591 F20.
X1.
G0 X1.5
Z0.1969
M05
M09

(CHAMFER2)
G96 D3000 S500 M03
G94
G0 Z0.1969
X1.5
Z0.0283
G1 X0.5996 F10.
Z0.0237
X0.7927 Z-0.0729
G0 X1.5
Z0.1969
M05
M09

(THREAD1)
M01
G53 G0 X0
G53 G0 Z0
M6 T0003 G43 H0003
M08
G97 S280 M04
G95
G0 X1.5 Z0.1969
G0 Z0.1406
G17
G76 P0.0625 Z-0.24 I-0.7547 J0.0328 K0.0868 R2. Q30. H1
G0 X1.5 Z0.1969
M05
M09

(PART1)
M01
G53 G0 X0
G53 G0 Z0
M6 T0007 G43 H0007
M09
G96 D3000 S150 M03
G94
G0 X1.5 Z0.1969
G0 Z-0.4587
G1 X-0.016 F0.75
X1.5
G0 Z0.1969
M05
M09

M72  (restore modal state, was saved via M70 at start)
M30
%



_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to