Hello Guest it is June 08, 2025, 07:01:10 AM

Author Topic: Initial Z move  (Read 3090 times)

0 Members and 1 Guest are viewing this topic.

Initial Z move
« on: October 19, 2022, 08:02:45 AM »
Hello all, I'm working with Mach4 and Sheetcam to post process my plasma work.  The problem I have is that I zero on top of the material and when the program starts the first move is x,y to the start point which will drag the tip.  Where can I add an initial Z move?   

I have tried a safe Z option, but it only does that during operation changes, not on the initial move.  I'm trying to understand Lua, but not there yet.


Thanks,
Rick
Re: Initial Z move
« Reply #1 on: January 13, 2023, 10:18:43 PM »
I know your problem, and I asked the same question.  Check out some of my posts to see.  What never dawned on me is after you zero everything, manually jog your z-axis to a safe height and run the code from there.  It will do the same thing moving straight to the appropriate XY position, but the tip will not drag. It's already at a safe height, then it will start the program moving DOWN to the appropriate Z height.
Re: Initial Z move
« Reply #2 on: January 19, 2023, 07:54:04 PM »
Hi,
I don't use plasma so am not particularly familiar with it but when milling if you touch off on the top of the material to set the Z zero, if you leave the tool there and proceed to run some
code and if the first feature to be milled is at x,y then the machine will move to that location, dragging the tool as it goes. From your discussion I assume this is similar to what
is happening to you?

I touch off usually by probing OR manually, but then I always lift the tool a little....is this something you expect to happen automatically? Or is this something that is accomplished
with commonsense and some experience?

I'm guessing that you use a G31 probing move to touch off? Is so remember that a G31 is like a G1 move, that carries on moving until the probe circuit indicates a touch
whereon the machine stops its G1 move and aborts the remainder of that move. What a G31 probing move does not do is lift the tip of the tool backup off the material.
You'd have to code that if you wish it to happen.

I'll try to illustrate: lets imagine you write a macro called m199(), say. It's purpose is to probe the material. Lets also assume that you can jog the machine to a suitable
location for the probe to occur and that you can bring  it to within 10mm of the surface and you zero the Z axis. Your macro could be something like:

Code: [Select]
function m199()
local inst=mc.mcGetInstance()
g31 z-20 f200
........    -this code block retrieves the numeric value of the Z axis at touch off and thereby calcultes the Z zero and sets it
........
........
end
if (mc.mcInEditor()==1)then
    m199()
end

The G31 acts like a G1, and in this case the the machine will move the Z axis downwards from its current zero position and will travel to -20mm UNLESS it is stopped by a probe contact.
But note that it does not pick the tip up again, that you would have to code for instance:

Code: [Select]
function m199()
local inst=mc.mcGetInstance()
g31 z-20 f200
g91 z5
g90
........    -this code block retreives the numeric value of the Z axis at touch off and therby calultes the Z zero and sets it
........
........
end
if (mc.mcInEditor()==1)then
    m199()
end

The g91 switches to incremental mode, shifts the Z axis 5mm upwards from its current location, namely the material surface, and then return to regular g90 or absolute mode.
The remainder of the code stays the same.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'

Offline smurph

*
  • *
  •  1,574 1,574
  • "That there... that's an RV."
Re: Initial Z move
« Reply #3 on: January 21, 2023, 02:08:08 AM »
I will also add that most of the time, the Z clearance positions are a function of your CAM software.  Look for a setting called "clearance plane", etc...  Mach will just follow what the G code tells it to do so if there is no Z clearance in the G code, well...  Mach will not move the Z.  So it might be that a little more study on how sheetcam works.  I really can't say because I haven't run sheetcam.  But I would start there.

Steve