How to center mark small holes with scribe only?

Having problems with or questions about SheetCam? Post them here.
User avatar
miro.kahanek
Posts: 16
Joined: Sun Apr 12, 2015 8:54 am
Location: Europe

How to center mark small holes with scribe only?

Post by miro.kahanek »

Hi Les,

For some time now we are successfully using "plasma drill" operation to pierce centers of small holes for manual drilling later.
I export DXF from SolidWorks, all small holes go to separate layer in Sheetcam, then set hole min-max, plasma drill and tadaa - works perfect!

However when it comes to manual drilling these pierced holes after - everyone knows what happens to drill bits if you got plenty of holes to drill... :(

For now, when it comes to marking numerous small holes we stopped using plasma drill pierce operation and instead we use only plate marker.
Instead of holes - I simply sketch in Solidworks hole center marks (2x 5mm line cross), then export to DXF and in Sheetcam set scriber operation for all
center marks - crosses. This works great - however very time consuming to draw additional center marks in Solidworks.

What would be the easiest way to accomplish this? Maybe new feature?
No more plasma pierce or peck-pierce holes - simply every single hole (f.e. up to 10mm diameter) must have 5x5mm cross mark done by plate marker.


We are using plate marking operation extensively for most bend lines from Solidworks, positioning marks for welding and lately almost for
all small holes, all for prototyping before it goes to laser and CNC press.

I noticed new "Shape library feature" so simple cross to use as center mark for holes will do, but then also very time consuming to place these all
over the material - not mentioning how to position-snap them into circles (holes).

Thank you very much in advance for any elegant solution or advice.

Miro.
Miro Kahanek
SeanP
Posts: 217
Joined: Wed Oct 23, 2013 9:50 am

Post by SeanP »

Hi Miro,
I dunno I would rather sharpen the odd drill bit than start from scratch centre punching and working up to a 10mm hole, I normally plasma 1mm under finished size and open up with drill for more precise jobs, right speed a decent bit and some cutting lube and it's not much bother really.

Sean
User avatar
miro.kahanek
Posts: 16
Joined: Sun Apr 12, 2015 8:54 am
Location: Europe

Post by miro.kahanek »

Hi Sean,

Thanks for your input, could you be please more specific?

Part example:
steel plate: 6mm
hole diameter: 6mm
number of holes: 30
average distance between holes: 50mm - tolerance 0.5mm :shock:

So you would plasma pierce through, then what drill size? What kind/type?
Or burn 4-5mm holes then open up? :lol:
What about damaged torch tips after piercing multiple parts?

Decent prepared smaller holes for bolts or for tapping after plasma has been nothing but torture for me so far,
so I am under impression that there is no point of plasma piercing for holes under 5-6mm...
Miro Kahanek
SeanP
Posts: 217
Joined: Wed Oct 23, 2013 9:50 am

Post by SeanP »

Umm maybe pushing it a bit there with burning a 5mm hole in in 6mm sheet, I quite often cut a 9mm dia in 8mm thick and open up to 10mm though,
just using dormer hss bits, maybe that's how I get though a few consumables :lol:

Try plasmatech.co.uk , not genuine hypertherm but seem to last just as well, good bit cheaper.
miro.kahanek wrote:Hi Sean,

Thanks for your input, could you be please more specific?

Part example:
steel plate: 6mm
hole diameter: 6mm
number of holes: 30
average distance between holes: 50mm - tolerance 0.5mm :shock:

So you would plasma pierce through, then what drill size? What kind/type?
Or burn 4-5mm holes then open up? :lol:
What about damaged torch tips after piercing multiple parts?

Decent prepared smaller holes for bolts or for tapping after plasma has been nothing but torture for me so far,
so I am under impression that there is no point of plasma piercing for holes under 5-6mm...
Vmax549
Posts: 641
Joined: Mon Nov 09, 2009 5:55 pm

Post by Vmax549 »

You can add the Gcode to do a simple X mark at the drill point center from the post.

From the drill center point

Mxxx (turn on scribe)
G91 (set Inc mode)
G1 X-.500 (move to startpoint)
G1 X1.00
G1 X-.500
G1 Y.500
G1 Y-1.00
G1 Y.500
Mxxx (turn off scribe)
G90 (reset mode to ABS)

Now everytime you call for a center drill operation it will post that code to do a X marking.

(;-) TP
User avatar
miro.kahanek
Posts: 16
Joined: Sun Apr 12, 2015 8:54 am
Location: Europe

Post by miro.kahanek »

Vmax549 wrote:You can add the Gcode to do a simple X mark at the drill point center from the post.

From the drill center point

Mxxx (turn on scribe)
G91 (set Inc mode)
G1 X-.500 (move to startpoint)
G1 X1.00
G1 X-.500
G1 Y.500
G1 Y-1.00
G1 Y.500
Mxxx (turn off scribe)
G90 (reset mode to ABS)

Now everytime you call for a center drill operation it will post that code to do a X marking.

(;-) TP


YES! :o

That's exactly how I want it, thank you Vmax.

I actually never edit anything under settings section in my post, but I am eager to learn...
Where do I put it?
function OnDrill() ???

Below is my post, could you please kindly help me to fix it?

Thank you very very much.

Miro.


Code: Select all

--************************************************
--*** Set these values up to suit your machine ***
--************************************************

--this is the distance between each torch reference in MILLIMETRES
refDistance = 250

--this is the reference feed rate in mm/min
refFeed = 1000

--Put your switch offset value here in MILLIMETRES
switchOffset = 0

--Scriber X,Y,Z offsets in MILLIMETRES. Do not use inches here even if you want inch code
--For the marker use the scriber Z as the offset from Z zero you want the Z to move to during a scribe.
--Change these values to suit your scriber setup
scriberX = -88.1
scriberY = 32.8
scriberZ = 14

--scriber axis. Leave this as nil if the scriber is fixed to the same axis as the torch
--scriberAxis = "A"
scriberAxis = nil

--If this value is set to true then use G28 (home) for the Z reference
--Set it to false for G31 probe
refHome = true

--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

--The cutter will slow down for corners and turn off THC below this radius
--Set slowRadius to "0" to turn off the auto slowdown
slowRadius = 0

--Minimum slow down speed.
--This is a scale factor. For instance 0.5 = 50% of the current feed rate
slowPercent = 0.6

--THC on and off codes. Use nil if you don't want THC control e.g:
-- thcOnCode = nil
-- thcOffCode = nil

--these codes are for the DCC extensions and turn the DTHC on/off if you have DTHC REV1/4 or higher firmware
thcOnCode = " S20"
thcOffCode = " S10"

--************************************************
--***           End of settings                ***
--************************************************

function OnAbout(event)
   ctrl = event:GetTextCtrl()
   ctrl:AppendText("Plasma MP3000-DTHCII post processor with/without Plate marker\n")
   ctrl:AppendText("This POST for all units without RS485 needing DCC ")
   ctrl:AppendText("\n")
   ctrl:AppendText("Modal G-codes and coordinates\n")
   ctrl:AppendText("Comments enclosed with ( and )\n")
   ctrl:AppendText("M03/M05 turn the torch on/off\n")
   ctrl:AppendText("M08/M09 turn the engraver on/off\n")
   ctrl:AppendText("Incremental IJ - set in mach2\n")
   ctrl:AppendText("The torch is referenced at cut start and every XXmm of movement thereafter\n")
   ctrl:AppendText("Designed for use with Mach3 and CandCNC MP3000-DTHC and Floating head Touch-n-Go\n")
   ctrl:AppendText("Post variables:\n")
   ctrl:AppendText("refDistance - set the distance between each reference\n")
   ctrl:AppendText("refFeed - set the feed rate when referencing\n")
   ctrl:AppendText("switchOffset - set your net switch offset amount \n")
   ctrl:AppendText("Scriber uses any tool number\n")
   ctrl:AppendText("slowRadius - slow down below this radius\n")
   ctrl:AppendText("slowPercent - minimum percentage to slow down\n")
   ctrl:AppendText("markerZ- allows marker rapid travel at system rapid height or Z offset height\n")
end

--  Modified 21/6/2010
--  added option for 'nil' plate marker z
--  Added support for plate marker tool type as well as tool number based plate marker

-- Modified 4/11/2010
-- Added: Reference the torch on the first pen down if the plate marker is the first tool used.

--Modified 22/4/2013 (TLC)
--Added Preset Volts , Preset Amps , and DTHC Delay variables
--Added markerZ to turn safe Z lift on marker tool on/off
--Changed scriberZ as Z axis offset from Z0
--Added code to turn off slowdown if slowRadius = 0
--Added  NODTHC, Tip SIze and Air Pressure to tool table variables
--Removed using tool number above 100 as marker tool--must use "Marker Tool" to select scriber

post.DefineVariable("refDistance",sc.unitLINEAR,0,1e17)
post.DefineVariable("refFeed",sc.unitFEED,0,1e17)
post.DefineVariable("switchOffset",sc.unitLINEAR,-1e17,1e17)
post.DefineVariable("slowRadius",sc.unitLINEAR,-1e17,1e17)
post.DefineVariable("slowPercent",sc.unitPERCENT,-1e17,1e17)
post.DefineCustomToolParam("PlasmaTool", "Preset volts", "presetVolts", sc.unit0DECPLACE, 49, 0, 200)
post.DefineCustomToolParam("PlasmaTool", "DTHC delay -sec", "dthcDelay", sc.unit1DECPLACE, 0, 0, 99)
post.DefineCustomToolParam("PlasmaTool", "Tip Size -Amps", "tipSize", sc.unit0DECPLACE, 40, 20, 200)
post.DefineCustomToolParam("PlasmaTool", "NO DTHC - 0", "dthcOff", sc.unit0DECPLACE, 1, 0, 1)




function OnInit()

   offX = 0
   offY = 0
   offZ = 0

   post.SetCommentChars ("()", "[]")  --make sure ( and ) characters do not appear in system text
   post.Text (" (Filename: ", fileName, ")\n")
   post.Text (" (Post processor: ", postName, ")\n")
   post.Text (" (Date: ", date, ")\n")
   if(scale == metric) then
      post.Text (" G21 (Units: Metric)\n") --metric mode
   else
      post.Text (" G20 (Units: Inches)\n") --inch mode
   end
   post.Text (" F1\n G53 G90 G40\n")
   
   if(dthcOff) then 
--don't do anything   
   else
     dthcOff = 1 --don't pass a null
end
   
   minArcSize = 0.2 --arcs smaller than this are converted to moves
   firstRef = true
   currentZAxis = "Z"
   finalCut = false
   dist = 9999999
   lastz = 0
   thcstate = 1
   ThcOff()
   
end

function OnNewLine()
   post.Text ("N")
   post.Number (lineNumber, "0000")
   lineNumber = lineNumber + 10
end


function OnFinish()
   finalCut = true
   endZ = safeZ
   OnRapid()
   endX = 0
   endY = 0
   offX = 0
   offY = 0
   offZ = 0
   OnRapid()
   post.Text(" S900 \n")
   post.Text(" M22 \n")
   post.Text(thcOffCode)
   post.Text(" (DTHC is off)\n"); 
   post.Text(" M22 \n")
   post.Text (" M05 M30\n")
end

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 OnMove&#40;&#41;
   local len = math.hypot&#40;endX - currentX , endY - currentY&#41;
   dist = dist + len
   if&#40;len > slowRadius&#41; and &#40;dthcOff > 0&#41; then
     ThcOn&#40;&#41;
	end
   post.ModalText &#40;" G01"&#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
      post.ModalNumber &#40;" Z", endZ * scale, "0.0000"&#41;
   end
   post.ModalNumber &#40;" F", feedRate * scale, "0.0###"&#41;
   post.Eol&#40;&#41;
end

function OnArc&#40;&#41;
   local radius = math.hypot&#40;currentX - arcCentreX, currentY - arcCentreY&#41;
   dist = dist + radius * math.abs&#40;arcAngle&#41;
   if&#40;radius < slowRadius&#41; and &#40;math.abs&#40;arcAngle&#41; > 0.5&#41; then
      feed = &#40;radius / slowRadius&#41;
      if&#40;feed < slowPercent&#41; then
         feed = slowPercent
      end
      feed = feed * feedRate
      ThcOff&#40;&#41;
   else
      feed = feedRate
	 if&#40;dthcOff >0&#41; then
      ThcOn&#40;&#41;
	  end
   end
   if&#40;arcAngle <0&#41; then
      post.ModalText &#40;" G03"&#41;
   else
      post.ModalText &#40;" G02"&#41;
   end
   post.ModalNumber &#40;" X", &#40;endX + offX&#41; * scale, "0.0000"&#41;
   post.ModalNumber &#40;" Y", &#40;endY + offY&#41; * scale, "0.0000"&#41;
   post.Text &#40;" I"&#41;
   post.Number &#40;&#40;arcCentreX - currentX&#41; * scale, "0.0000"&#41;
   post.Text &#40;" J"&#41;
   post.Number &#40;&#40;arcCentreY - currentY&#41; * scale, "0.0000"&#41;
   post.ModalNumber &#40;" F", feed * scale, "0.0###"&#41;
   post.Eol&#40;&#41;
end


function ThcOff&#40;&#41;
   if&#40;not thcOffCode&#41; then return end
   if&#40;thcstate ==1&#41; then
      thcstate = 0
      post.Text&#40;thcOffCode&#41;
      post.Text&#40;" &#40;DTHC is off&#41;\n"&#41;;
   end
end

function ThcOn&#40;&#41;
   if&#40;not thcOnCode&#41; then return end
   if&#40;toolClass == "MarkerTool"&#41;  then return end
   if&#40;thcstate ==0&#41; then
      thcstate = 1
      post.Text&#40;thcOnCode&#41;
      post.Text&#40;" &#40;DTHC is on&#41;\n"&#41;;
      return
   end
   if&#40;thcstate == 2&#41; then
      thcstate = 0
   end
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


function Reference&#40;&#41;
   firstRef = false
   if &#40;refHome&#41; then
      post.ModalText&#40;" G28.1 Z"&#41;
      post.Number&#40;3 * scale, "0.00"&#41;
   else
      post.ModalText&#40;" G31 Z -100"&#41;
   end
   post.ModalNumber &#40;" F", refFeed * scale, "0.0###"&#41;
   post.Eol&#40;&#41;
   post.ModalText&#40;" G92 Z0.0\n"&#41;
   post.ModalText &#40;" G00"&#41;
   post.Text&#40;" Z"&#41;
   post.Number &#40;switchOffset * scale, "0.0000"&#41;
   post.Eol&#40;&#41;
   post.ModalText&#40;" G92 Z0.0\n"&#41;
end

function OnPenUp&#40;&#41;
   if&#40;toolClass == "MarkerTool"&#41;  then
      post.Text&#40;" M09\n"&#41;
   else
      post.Text &#40;" M05\n"&#41;
   end
   if &#40;endDelay > 0&#41; then
      post.Text &#40;" G04 P"&#41;
      post.Number &#40;endDelay,"0.###"&#41;
      post.Eol&#40;&#41;
   end
end

function OnNewOperation&#40;&#41;
   post.Text &#40;" &#40;Operation&#58; ", operationName, "&#41;\n"&#41;
   if &#40;plungeRate <= 0&#41; then
      post.Warning&#40;"WARNING&#58; Plunge rate is zero"&#41;
   end
   if &#40;feedRate <= 0&#41; then
      post.Warning&#40;"WARNING&#58; Feed rate is zero"&#41;
   end
  end

function OnToolChange&#40;&#41;
   post.Text &#40;" &#40;tool number&#58; ", tool ," "&#41;
   post.Text&#40;" Feedrate&#58; ", feedRate * scale , "&#41; \n"&#41;
    if&#40;dthcOff == 0&#41; then
      post.Text &#40;" &#40;DTHC has been disabled in this tool&#41;\n"&#41;
    end
      if&#40;presetVolts&#41; then
         post.Text &#40; "&#40;Preset Volts&#58; ",presetVolts," " &#41;
	  else
	  post.Text &#40;"&#40;"&#41;
      end
      if&#40;presetAmps&#41; then
         post.Text &#40; " Preset AMPS&#58; " ,presetAmps,"&#41; "&#41;
		 post.Eol&#40;&#41;
		 else
		 post .Text &#40;"&#41;"&#41;
		 post.Eol&#40;&#41;
      end
	  if&#40;presetPSI&#41; then
	     if&#40;presetPSI >0 &#41; then 
            post.Text &#40; " &#40; Air Pressure Preset&#58; " ,presetPSI,"&#41; "&#41;
			post.Eol&#40;&#41;
		 else 
		    post.Text &#40; " &#40; Default Air Pressure"&#41;
			post.Text &#40; "&#41;"&#41;
			post.Eol&#40;&#41;
		 end
      end
      if&#40;tipSize&#41; then
	     post.Text &#40; "&#40; Suggested Tip Size&#58; " ,tipSize," "&#41;
		 else
		 post.Text &#40; "&#40;"&#41;
	  end
      if&#40;dthcDelay&#41; then
	    if&#40;dthcDelay > 0 &#41; then
          post.Text &#40; "  DTHC Delay&#58; " ,dthcDelay," sec &#41; "&#41;
		  post.Eol&#40;&#41;
	      else
	      post.Text &#40; ", Default DTHC Delay &#41;"&#41;
		  post.Eol&#40;&#41;
        end
	else
    post.Text &#40; "&#41;"&#41;
	post.Eol&#40;&#41;
	end
   if &#40;toolClass == "MarkerTool"   &#41; then
      ThcOff&#40;&#41;
      if&#40;scriberAxis and scriberAxis ~= currentZAxis&#41; then
         endZ = safeZ
         OnRapid&#40;&#41;
         currentZAxis = scriberAxis
      end
      firstRef = true
   else --tool is not a marker
      if&#40;scriberAxis and scriberAxis == currentZAxis&#41; then
         endZ = safeZ
         OnRapid&#40;&#41;
         currentZAxis = "Z"
      end
	  if&#40;dthcOff == 0&#41; then
	     post.Text &#40;" S999 \n"&#41;
		 post.Text &#40;"  M22 \n"&#41;
	 else
		 post.Text &#40;" S900 \n"&#41;
		 post.Text &#40;"  M22 \n"&#41;
	  end 
      if&#40;presetVolts&#41; then
	    if&#40;presetVolts&#41; > 0 then
	     post.Text &#40; " S3" ,presetVolts, "\n" &#41;
		 post.Text &#40;"  M22 "&#41;
		 post.Eol&#40;&#41;
      else 
         post.Text &#40; "&#40;No Preset Volts&#41;\n" &#41;
      end 
     end	  
      if&#40;presetAmps&#41; then
	      if&#40;presetAmps > 0&#41; then 
	      post.Text&#40; " S4" ,presetAmps, "\n"&#41;
		  post.Text &#40;"  M22 "&#41;
		  post.Eol&#40;&#41;
           else 
         post.Text&#40;"&#40;No Preset Amps&#41;"&#41; 
         post.Eol&#40;&#41;
            end		 
      end
	  if&#40;presetPSI&#41; then 
	     if&#40;presetPSI > 0&#41; then
	         post.Text&#40; " S8" ,presetPSI, "\n"&#41;
		     post.Text &#40;"  M22 "&#41;
		     post.Eol&#40;&#41;
         else 
            post.Text&#40;"&#40;Default Air Pressure&#41;"&#41; 
            post.Eol&#40;&#41;		 
         end
	 end
	  if&#40;dthcDelay&#41; then
	     if&#40;dthcDelay > 0 &#41; then
           post.Text &#40; " S5"&#41;
		   post.Number &#40;dthcDelay * 10, "00"&#41;
		   post.Eol&#40;&#41;
		   post.Text &#40;"  M22 \n"&#41;
         end
     end		
      offX = 0
      offY = 0
      offZ = 0
	post.Text &#40;" M00"&#41;
	post.Text &#40;"&#40;Check the DTHC Settings  Hit RUN to continue&#41;\n"&#41;
	end --end for marker if
end --end for toolchangefunction
-- OnRapid&#40;&#41;
-- end

function OnNewPart&#40;&#41;
   post.Text&#40;" &#40;Part&#58; ",partName,"&#41;\n"&#41;;
end

function OnDrill&#40;&#41;
   OnRapid&#40;&#41;
   OnPenDown&#40;&#41;
   endZ = drillZ
   OnMove&#40;&#41;
   OnPenUp&#40;&#41;
   endZ = safeZ
   OnRapid&#40;&#41;
end
Miro Kahanek
ArchieF
Posts: 69
Joined: Sun Jan 06, 2008 1:54 pm

Post by ArchieF »

Having a lot of points would create a large nc-file.
I'd add a sub-program call in the pp and write the gcode vmax shows into that sub-prog.
Richard
User avatar
miro.kahanek
Posts: 16
Joined: Sun Apr 12, 2015 8:54 am
Location: Europe

Post by miro.kahanek »

ArchieF wrote:Having a lot of points would create a large nc-file.
I'd add a sub-program call in the pp and write the gcode vmax shows into that sub-prog.
Richard
Hi Richard,

sub-program call ??? :shock:

How / where exactly do I write that gcode and call it? :oops:

Thanks.
Miro Kahanek
User avatar
Les Newell
Site Admin
Posts: 3665
Joined: Thu May 11, 2006 8:12 pm

Post by Les Newell »

A sub program does save space but Mach can handle huge files so it is a bit of a moot point. Try this version of OnDrill():

Code: Select all

function OnDrill&#40;&#41;
   if toolClass == "MarkerTool" then
      local ex = endY
      local ey = endY
      local siz = 6 / 2 --cross size is 6mm
      
      endX = ex + siz
      OnRapid&#40;&#41;
      OnPenDown&#40;&#41;
      endZ = cutHeight
      OnMove&#40;&#41;
      endX = ex - siz
      OnMove&#40;&#41;
      OnPenUp&#40;&#41;
      endZ = safeZ
      OnRapid&#40;&#41;
      endX = ex
      endY = ey + siz
      OnRapid&#40;&#41;
      OnPenDown&#40;&#41;
      endZ = cutHeight
      OnMove&#40;&#41;
      endY = ey - siz
      OnMove&#40;&#41;
      OnPenUp&#40;&#41;
      endZ = safeZ
      OnRapid&#40;&#41;
      return
   end

   OnRapid&#40;&#41;
   OnPenDown&#40;&#41;
   endZ = drillZ
   OnMove&#40;&#41;
   OnPenUp&#40;&#41;
   endZ = safeZ
   OnRapid&#40;&#41;
end
This is untested but unless I've made a silly mistake it should mark a cross whenever you use a drill operation with a scriber tool.
User avatar
miro.kahanek
Posts: 16
Joined: Sun Apr 12, 2015 8:54 am
Location: Europe

Post by miro.kahanek »

Thank you so much, I will try this one! :D
Miro Kahanek
User avatar
miro.kahanek
Posts: 16
Joined: Sun Apr 12, 2015 8:54 am
Location: Europe

Post by miro.kahanek »

Hi Les,

I just run a test job, your OnDrill() version works, I love the solution to use drill operation with plate marker,
no more extra sketching in CAD...

1) yes, there is a small typo on second line in function:
"local ex = endY " should be "local ex = endX"
before correction - plate marker performed nonsense. :shock:
DONE.

2) now, the intriguing part is when plate marker goes for the very FIRST HORIZONTAL line
on the first cross mark - it does it TWICE, back and forth on the same line, then moves on
and continues fine on next cross marks... Why ???

UPDATE minutes later:
I just run it again, watched it closely and realized, that marker does not repeat the initial line in first cross twice,
but starts in the middle of the first hole, goes 3mm right, then 6mm left and so on....

Thank you again for your help.

Sample job:

Image


Result gcode:

Code: Select all

N0010 &#40;Filename&#58; mk part 01, 50x50mm sqare, 4x  5mm hole.tap&#41;
N0020 &#40;Post processor&#58; &#91;MK&#93; DREMEL-DRILL-MP3000-DTHCII-DCC+scriber6.scpost&#41;
N0030 &#40;Date&#58; 27/04/2015&#41;
N0040 G21 &#40;Units&#58; Metric&#41;
N0050 F1
N0060 G53 G90 G40
N0070 S10 &#40;DTHC is off&#41;
N0080 &#40;Part&#58; mk part 01, 50x50mm sqare, 4x  5mm hole&#41;
N0090 &#40;Operation&#58; Drill, holes, T100&#58; Scribe, Dremel - MK, 0 mm Deep&#41;
N0100 &#40;tool number&#58; 100  Feedrate&#58; 500&#41; 
N0110&#40;&#41;
N0120&#40;&#41;
N0130 G00 X10.0000 Y10.0000 Z10.0000
N0140 X13.0000
N0150 G28.1 Z3.00 F1000.0
N0160 G92 Z0.0
N0170 G00 Z0.0000
N0180 G92 Z0.0
N0190 Z14.0000
N0200 X-78.1000 Y42.8000
N0210 M08
N0220 G04 P0.5
N0230 M22 
N0240 G01 X-75.1000 F500.0
N0250 X-81.1000
N0260 M09
N0270 G04 P1
N0280 G00
N0290 X-78.1000 Y45.8000
N0300 M08
N0310 G04 P0.5
N0320 M22 
N0330 G01
N0340 Y39.8000
N0350 M09
N0360 G04 P1
N0370 G00
N0380 X-75.1000 Y72.8000
N0390 M08
N0400 G04 P0.5
N0410 M22 
N0420 G01
N0430 X-81.1000
N0440 M09
N0450 G04 P1
N0460 G00
N0470 X-78.1000 Y75.8000
N0480 M08
N0490 G04 P0.5
N0500 M22 
N0510 G01
N0520 Y69.8000
N0530 M09
N0540 G04 P1
N0550 G00
N0560 X-45.1000 Y72.8000
N0570 M08
N0580 G04 P0.5
N0590 M22 
N0600 G01
N0610 X-51.1000
N0620 M09
N0630 G04 P1
N0640 G00
N0650 X-48.1000 Y75.8000
N0660 M08
N0670 G04 P0.5
N0680 M22 
N0690 G01
N0700 Y69.8000
N0710 M09
N0720 G04 P1
N0730 G00
N0740 X-45.1000 Y42.8000
N0750 M08
N0760 G04 P0.5
N0770 M22 
N0780 G01
N0790 X-51.1000
N0800 M09
N0810 G04 P1
N0820 G00
N0830 X-48.1000 Y45.8000
N0840 M08
N0850 G04 P0.5
N0860 M22 
N0870 G01
N0880 Y39.8000
N0890 M09
N0900 G04 P1
N0910 G00
N0920 &#40;Operation&#58; Outside Offset, final, T14&#58; Steel&#58; 2 mm, tip&#58; 40A, 108V - from TD manual&#41;
N0930 &#40;tool number&#58; 14  Feedrate&#58; 2239&#41; 
N0940&#40;Preset Volts&#58; 108 &#41;
N0950&#40; Suggested Tip Size&#58; 40 , Default DTHC Delay &#41;
N0960 S900 
N0970  M22 
N0980 S3108
N0990  M22 
N1000 M00&#40;Check the DTHC Settings  Hit RUN to continue&#41;
N1010 G00 X53.9500 Y-3.2000
N1020 Z4.1000
N1030 G28.1 Z3.00 F1000.0
N1040 G92 Z0.0
N1050 G00 Z0.0000
N1060 G92 Z0.0
N1070 G00 Z4.1000
N1080 M03
N1090 S20 &#40;DTHC is on&#41;
N1100 M22 
N1110 G02 X50.7500 Y0.0000 I0.0000 J3.2000 F2239.0
N1120 G01 Y50.0000
N1130 G03 X50.0000 Y50.7500 I-0.7500 J0.0000
N1140 G01 X0.0000
N1150 G03 X-0.7500 Y50.0000 I0.0000 J-0.7500
N1160 G01 Y0.0000
N1170 G03 X0.0000 Y-0.7500 I0.7500 J0.0000
N1180 G01 X50.0000
N1190 M05
N1200 G00 Z10.0000
N1210 X0.0000 Y0.0000
N1220 S900 
N1230 M22 
N1240 S10 &#40;DTHC is off&#41;
N1250 M22 
N1260 M05 M30
Last edited by miro.kahanek on Fri May 01, 2015 7:52 am, edited 1 time in total.
Miro Kahanek
User avatar
Les Newell
Site Admin
Posts: 3665
Joined: Thu May 11, 2006 8:12 pm

Post by Les Newell »

Sorry about the typo. The odd first mark is happening because I didn't take referencing into account. This should fix it:

Code: Select all

function OnDrill&#40;&#41;
   if toolClass == "MarkerTool" then
      local ex = endX
      local ey = endY
      local siz = 6 / 2 --cross size is 6mm
     
      endX = ex + siz
      OnRapid&#40;&#41;
      currentX = endX
      currentY = endY
      OnPenDown&#40;&#41; 
User avatar
miro.kahanek
Posts: 16
Joined: Sun Apr 12, 2015 8:54 am
Location: Europe

Post by miro.kahanek »

Thank you!

Just tested, this one is flawless! :mrgreen:
Very very useful... we deserve a beer now...

For anyone else tired of drilling after plasma pierced holes,
here is the OnDrill() function crafted to perfection by Les Newell:

Code: Select all

function OnDrill&#40;&#41;
   if toolClass == "MarkerTool" then
      local ex = endX
      local ey = endY
      local siz = 6 / 2 --cross size is 6mm
     
      endX = ex + siz
      OnRapid&#40;&#41;
      currentX = endX
      currentY = endY
      OnPenDown&#40;&#41;
      endZ = cutHeight
      OnMove&#40;&#41;
      endX = ex - siz
      OnMove&#40;&#41;
      OnPenUp&#40;&#41;
      endZ = safeZ
      OnRapid&#40;&#41;
      endX = ex
      endY = ey + siz
      OnRapid&#40;&#41;
      OnPenDown&#40;&#41;
      endZ = cutHeight
      OnMove&#40;&#41;
      endY = ey - siz
      OnMove&#40;&#41;
      OnPenUp&#40;&#41;
      endZ = safeZ
      OnRapid&#40;&#41;
      return
   end
   
   OnRapid&#40;&#41;
   OnPenDown&#40;&#41;
   endZ = drillZ
   OnMove&#40;&#41;
   OnPenUp&#40;&#41;
   endZ = safeZ
   OnRapid&#40;&#41;
end
Miro Kahanek
Vmax549
Posts: 641
Joined: Mon Nov 09, 2009 5:55 pm

Post by Vmax549 »

As a thought would it not be better to create the entire X mark in one operation rather than breaking it up into 2 functions. Lower the scribe one time run the X code then raise the scriber.

As is you are lowering the scriber , scribe one line then raise the scriber , then lower the scribet again to do the next line.

You may also want to adjust the feedrate for the scribing.

Just a thought, (;-) TP
User avatar
miro.kahanek
Posts: 16
Joined: Sun Apr 12, 2015 8:54 am
Location: Europe

Post by miro.kahanek »

Vmax549 wrote:As a thought would it not be better to create the entire X mark in one operation rather than breaking it up into 2 functions. Lower the scribe one time run the X code then raise the scriber.

As is you are lowering the scriber , scribe one line then raise the scriber , then lower the scribet again to do the next line.

Just a thought, (;-) TP
As it is done at the moment, that's exactly how I wanted the function to behave...
Two clean separate precise lines with fine marker tip without extra sketching in cad.
Version of cross mark in one pass looks little different - as you gotta follow part of it twice of course.

Cheers.
Miro Kahanek
Post Reply