Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: westi on March 05, 2021, 03:40:00 AM

Title: Z axis is lifting higher and higher after each cut
Post by: westi on March 05, 2021, 03:40:00 AM
Hello Experts,

I built a CNC-Plasma cutter which runs with Mach3.
I have a Problem with the Z-axis (Floating head), the z-axis is moving up higher after each cut, means after each cut the program has a new 0 for z-axis. (see attached drawing for better understanding). It has noting to do with noises form torch because it is the same behavior when torch is off.

In addition to that, it is not possible to use G31 for probing, because G92 did not set z to 0 after floating head switch is triggered.
I have the Feeling that these both Problems are linked anyhow.

I checked all the Settings in Mach3, if I missed something but I did not find anything.

Hopefully someone is able to help me to solve it.

Thanks!!

Title: Re: Z axis is lifting higher and higher after each cut
Post by: TPS on March 05, 2021, 06:09:55 AM
can you pls post code how the zeroing is done? then we will have a look.
Title: Re: Z axis is lifting higher and higher after each cut
Post by: westi on March 05, 2021, 07:15:51 AM
I try to use SheetCAM post "Mach3 flame with THC - G31" which generates the following code...

M05
G00 Z10.0000
X11.6124 Y15.7764
G31 Z-150 F300.0
G92 Z-3.4000 (3.4 mm off-set until sensor triggered)
G00 Z3.0000
M03....

Thanks!
Title: Re: Z axis is lifting higher and higher after each cut
Post by: TPS on March 05, 2021, 10:25:08 AM
G00 Z10.0000
X11.6124 Y15.7764
G31 Z-150 F300.0
G92 Z-3.4000 (3.4 mm off-set until sensor triggered)
G00 Z3.0000
M30

put just this code in a G-code file and run it multiple times, then check z-axis dro and physical z-Position.
Title: Re: Z axis is lifting higher and higher after each cut
Post by: westi on March 09, 2021, 12:13:16 PM
Good evening,

Thanks for the code, attached you can find the result of the test.
I started with 1.5mm cutting hight. Ervery time Z-axis moved back to +16.4 mm, so G92 -3.4 mm had no effect.
Even if i set Z-axis DRO to 0 between each cycle, the axis moves back to +16.4 mm, means physical height is raising about 16.4 mm in each cycle.

The question is now, why G92 has no effect and where the 16.4 mm are comming from??

Thanks for your help!

Title: Re: Z axis is lifting higher and higher after each cut
Post by: TPS on March 09, 2021, 12:19:33 PM
if you run this test and have a look to diagnostic page, what does G92 Offset Show?
Title: Re: Z axis is lifting higher and higher after each cut
Post by: westi on March 09, 2021, 12:23:11 PM
What i saw is, when we sum all the Z values from the G-Code it is 16.4 → 10+3.4+3=16.4 but 3.4 is negative (-).

I will check diagnosic page.
Thanks
Title: Re: Z axis is lifting higher and higher after each cut
Post by: TPS on March 09, 2021, 12:27:58 PM
if nothing help's put this code in a M31.M1s in c:\Mach3\macros\your Profile Name

Code: [Select]
Sub Main()
Code "G31 Z-150 F300.0"
While IsMoving()
WEnd
Sleep(200)
SetOEMDro(802, -3.4)
Sleep(200)
Code "G00 Z3.0000"
While IsMoving()
Wend
End Sub


and the the c-gode would be:
Code: [Select]
G00 Z10.0000
X11.6124 Y15.7764

M31

M30

just an other way for the sam thing
Title: Re: Z axis is lifting higher and higher after each cut
Post by: westi on March 12, 2021, 07:08:19 AM
Thanks I will try this M31 code.

By the way I checked diagnostic G92:

Program G92 Z-3.4 → Diagnostic G92 Z13.4 then i changed to
Program G92 Z3.4  → Diagnostic G92 Z6.6   then I changed to
Program G92 Z0     → Diagnostic G92 Z10.

Really strange!

But i will try M31 and will give feedback.
Thanks!
Title: Re: Z axis is lifting higher and higher after each cut
Post by: westi on March 19, 2021, 05:16:10 AM
Hello,
I tried the M31 macro and got the following message from the system.
"Macro scipt 1   3" see attached pic.
Any idea how to fix that?

Thank you!
Title: Re: Z axis is lifting higher and higher after each cut
Post by: TPS on March 19, 2021, 06:38:34 AM
can you pls post the script you are using? in original there is no msgbox instruction.
Title: Re: Z axis is lifting higher and higher after each cut
Post by: westi on March 19, 2021, 08:22:59 AM
Oh yes, i deleted the msgbox.
The script looks now exactly like yours but unfortunately nothing happend.
It just moves to z 10 and to X&Y coordinates and then it stopped and nothing more happened (no probing).
But Z DRO was set to -3.4 mm, what is a success for me!

So now we have the case that Z was set to -3.4 but no probing.
Before with G31, the probing was fine but z was not set to -3.4.

Thanks!
Title: Re: Z axis is lifting higher and higher after each cut
Post by: TPS on March 19, 2021, 08:38:47 AM
Code: [Select]
Sub Main()
Code "G31 Z-150 F300.0"
While IsMoving()
WEnd
Sleep(200)
SetOEMDro(802, -3.4)
Sleep(200)
Code "G00 Z3.0000"
While IsMoving()
Wend
End Sub

--open Operator -> VB Script Editor
--copy and paste the code into Editor window
--with the >|| button you can run the script line by line (single step) and see what is happening
Title: Re: Z axis is lifting higher and higher after each cut
Post by: westi on March 24, 2021, 06:16:12 AM
Don´t ask me what was wrong before but now it works!  ;D
I also tried M31 in a complete program and it works, too!
Many thanks for that!

Then the next question comes up.
Which post processor i can use for the m31 code?
I am using sheetCAM and i don´t want change all the progams manually.
Is there a post processor which i can use or change for the m31?

Thank you!