Machsupport Forum
Mach Discussion => General Mach Discussion => Topic started 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!!
-
can you pls post code how the zeroing is done? then we will have a look.
-
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!
-
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.
-
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!
-
if you run this test and have a look to diagnostic page, what does G92 Offset Show?
-
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
-
if nothing help's put this code in a M31.M1s in c:\Mach3\macros\your Profile Name
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:
G00 Z10.0000
X11.6124 Y15.7764
M31
M30
just an other way for the sam thing
-
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!
-
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!
-
can you pls post the script you are using? in original there is no msgbox instruction.
-
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!
-
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
-
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!