Machsupport Forum
Mach Discussion => FAQs => Topic started by: Nicolo on December 13, 2013, 05:49:45 PM
-
Hi,
I'm trying to run this code:
G21 G15 G17 G21 G40 G49 G50 G80 G90 G90.1 M48
G53 G0 Z-5
G0 X0 Y0
M6 T19
G43 H19
M03 S2000
G00 Z2.0000
X80.7394 Y51.6508
G01 Z-35.1857 F320.0
Z-36.1857 F350.0
G00 Z2.0000
G53 G0 Z-5
M6 T15
G43 H15
G53 G0 Z-5
G0 X87.9601 Y62.9393
G0 Z2.0000
M03 S2700
X91.0000 Y66.0000
G01 Z-42.0000 F530.0
X62.0000
G00 Z2.0000
G53 G0 Z-5
M5 M9 G49
M30
When the M6 T19 command is reached the spindle stops and waits for a cycle start. After I hit start again the Z axis starts moving immediately even before the next command line is executed (which is G43 H19).
I've already crashed because of this and have no clue why mach3 is doing so. I attached my settings file. Please help me.
Thanks
-
What's in your M6End macro?
-
Hi,
this is the code:
x = GetToolChangeStart( 0 )
y = GetToolChangeStart( 1 )
z = GetToolChangeStart( 2 )
a = GetToolChangeStart( 3 )
b = GetToolChangeStart( 4 )
c = GetToolChangeStart( 5 )
if(IsSafeZ() = 1) Then
SafeZ = GetSafeZ()
if SafeZ > z then StraightTraverse x, y,SafeZ, a, b, c
StraightFeed x, y, z , a, b, c
else
Code"G00 X" & x & "Y" & y
end if
-
Do you have SafeZ enabled? If so, how is it configured?
Do you have the correct tool length in the tool table for tool 19?
Which way is the spindle moving after the tool change?
-
Yes, safez is -5.
When the m6 command is called and the spindle stops I initiate an automatic tool measurement.
Most of the time the spindle goes upwards, but sometimes it also moves down...