Machsupport Forum
Mach Discussion => General Mach Discussion => Topic started by: JimO on January 31, 2010, 08:13:42 AM
-
I just set up tool tables and have had something happen which I cannot find the cause. When I run the following code, line 9 applies the tool offset as expected, but then I get a positive Z move to about 10", then it moves back down to the proper height. There is no command in this code for the move, so I assume that it is coming from Mach3. I have modified the settings in soft limits, thinking that this may be the source, but not so. Any suggestions?
N0000 (Filename: TEST.tap)
N0010 (Post processor: Mach2.post)
N0020 (Date: 1/31/2010)
N0030 G20 (Units: Inches)
N0040 G40 G90
N0050 F1
N0060 (Part: Test)
N0070 (Process: Drill 0, Jobber Drill 1/4, 0.125 inch Deep)
N0080 (Jobber Drill 1/4)
N0090 T112 M06 G43 H112
N0100 M03 S1600
N0110 G00 Z0.5000
N0120 X-0.2836 Y1.3547
N0130 Z0.0000
N0140 G01 Z-0.1250 F2
N0150 G00 Z0.5000
N0160 X-1.1843 Y0.9302
N0170 Z0.0000
N0180 G01 Z-0.1250
N0190 G00 Z0.5000
N0200 Z3.0000
N0210 X0.0000 Y0.0000
N0220 M05
N0230 M05 M30
-
Check your Safe Z settings.
-
I just checked this; checked allow z save move and safe mode dro. No matter the value I put in for safe z, I get the same move when I run the code.
-
Try changing SafeZ from machine coordinates to work coordinates? Or the other way around. I think it's the tool change doing it, not the G43. Try moving the G43 to a different line to narrow it down.
-
I think it has to do with Safe Z as Ger says but also with the way the M6End macro is set up. I think if you have a safe Z as work coords it screws things up, changing to Machine coords for safe Z will cure it. If you wish to keep safe Z at work coords then editing the M6End macro will also cure it.
This is all from memory as Dan13 had that problem a few years back and we worked out what was happening, so maybe he will remember the correct procedure if my memory is playing up and what I said above was incorroect.
Hood
-
Changed SafeZ from machine to work, didn't make any difference. With SafeZ set at 2" and the DRO at 3", the Z axis still moves positive.
Here is the M6 Macro. If I am reading this correctly, it says if SafeZ is greater than current Z, move to SafeZ which should result in a negative movement.
REM The default script here moves the tool back to m6start if any movement has occured during the tool change..
x = GetToolChangeStart( 0 )
y = GetToolChangeStart( 1 )
z = GetToolChangeStart( 2 )
a = GetToolChangeStart( 3 )
b = GetToolChangeStart( 4 )
c = GetToolChangeStart( 5 )
SafeZ = GetSafeZ()
if SafeZ > z then StraightTraverse x, y,SafeZ, a, b, c
StraightFeed x, y, z , a, b, c
-
try deleting all from the M6End macro and see if it now works, just be ready at the E-Stop for the first test.
Hood
-
Well, that seemed to work, but I'm not sure why. I will run several tests with the macro disabled.
I am very familiar with the law of unintended consequences!
-
I ran 3 different gcodes and all worked perfectly without the macro.
Your help is most appreciated!
-
I'm 99% sure you just didn't have the SafeZ setup correctly.
-
Ger, I think Daniel had to do that as well, I was thinking if the safe Z was machine coords and up near home position it was fine but I think Daniel preferred to have work coords or maybe incremental for safe Z so he had to edit the M6End macro.
Hood