Safe Z During Scribe Operation

Excuse me if I’ve asked this before, but I couldn’t find the post if I did.

My scribe mount is such that while in use, the plasma torch’s tip is higher than my rapid clearance setting of 25mm. But the post will add the scribe offset to the rapid clearance amount. This means that the torch raises during plate marking rapid moves even though the M09 command raises the scribe tip higher than the torch tip.

Is there a way to not add the scribe Z offset to the rapid clearance during use of a tool number greater than 100?

Thanks for any ideas…
Paul

Anyone?

If your scriber is fixed to the same axis as torch and you trying to disable z axis moves on scribe rapid moves,
then CandCNC post I am using has it covered.

Check these sections of the post - see how they solved it, maybe it helps to fix your post…

--this value when set to "true" will set the Z to lift to rapid height between paths when using the marker tool. 
--if false it will not lift the Z between paths but will at the end
markerZ = false



function OnRapid()
   if&#40;endX < 1e17 and endY < 1e17&#41; then --don't update the distance moved if X or Y are unknown
      local len = math.hypot&#40;&#40;endX + offX&#41;-currentX , &#40;endY + offY&#41;-currentY&#41;
      dist = dist + len
   end
   post.ModalText &#40;" G00"&#41;
   post.ModalNumber &#40;" X", &#40;endX + offX&#41; * scale, "0.0000"&#41;
   post.ModalNumber &#40;" Y", &#40;endY + offY&#41; * scale, "0.0000"&#41;
   if&#40;toolClass == "MarkerTool"&#41;  then
      if&#40;firstRef == true&#41; or &#40;finalCut == true&#41; or &#40;markerZ == true&#41; then
         post.ModalNumber &#40;" Z", safeZ * scale, "0.0000"&#41;
      end
      finalCut = false
   else --this is not a marker tool
      post.ModalNumber &#40;" Z", endZ * scale, "0.0000"&#41;
   end
   post.Eol&#40;&#41;
 end



function OnPenDown&#40;&#41;
   if&#40;toolClass == "MarkerTool"&#41;  then
      if &#40;firstRef&#41; then
         Reference&#40;&#41;
         offX = scriberX
         offY = scriberY
         offZ = scriberZ
         if &#40;offZ > 0 &#41; then --put in the Z offset height if it the first scribe after a ref
            post.NonModalNumber&#40;" Z", offZ * scale, "0.0000"&#41;
            post.Eol&#40;&#41;
         end
         post.ModalNumber &#40;" X", &#40;currentX + offX&#41; * scale, "0.0000"&#41;
         post.ModalNumber &#40;" Y", &#40;currentY + offY&#41; * scale, "0.0000"&#41;
         post.Eol&#40;&#41;
      else --not a ref move
         if &#40;markerZ == true &#41; then --put in the Z offset height before the scribe after the rapid
            post.ModalNumber&#40;" Z", offZ * scale, "0.0000"&#41;
            post.Eol&#40;&#41;
         end   
      end
      post.Text&#40;" M08\n"&#41;
   else --tool is not marker tool
      if&#40;dist >= refDistance&#41; then
         dist = 0
         Reference&#40;&#41;;
      end
      post.ModalText &#40;" G00"&#41;
      post.NonModalNumber&#40;" Z", pierceHeight  * scale, "0.0000"&#41;
      post.Eol&#40;&#41;
      if &#40;preheat > 0&#41; then
         post.Text &#40;"\n G04 P"&#41;
         post.Number &#40;preheat,"0.###"&#41;
         post.Eol&#40;&#41;
      end
      post.Text &#40;"\n M03\n"&#41;
   end
   if &#40;pierceDelay > 0&#41; then
      post.Text &#40;" G04 P"&#41;
      post.Number &#40;pierceDelay,"0.###"&#41;
      post.Eol&#40;&#41;
   end
  thcstate = 0
 if&#40;dthcOff > 0&#41; then
  ThcOn&#40;&#41;
  post.Text &#40;" M22 \n"&#41;
  end
end

Hi Miro. Sorry - I missed your post. Thank you. I will take a look at your code and see if I can use it in my post…

Paul