585,727 active members*
4,122 visitors online*
Register for free
Login
IndustryArena Forum > CNC Plasma, EDM / Waterjet Machines > Plasma, EDM / Other similar machine Project Log > sheetcam POST to turn off THC and slow down on tight circles
Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2011
    Posts
    0

    sheetcam POST to turn off THC and slow down on tight circles

    So, ive learned to make good bolt holes you need to slow the speed way down, and turn THC off. Well, I modified the candcnc POST for sheetcam, and well...it works. I combined code from a few files to make this. Still messing with it but its made a BIG difference in cut quality of small holes.

    Here it is:

    function OnAbout(event)
    ctrl = event:GetTextCtrl()
    ctrl:AppendText("johns CNC plasma Settings!!!\n")
    ctrl:AppendText("plasma MP1000-THC post processor\n")
    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("Incremental IJ - set in mach2\n")
    ctrl:AppendText("The torch is referenced at cut start and every 500mm of movement thereafter\n")
    ctrl:AppendText("Designed for use with Mach3 and CandCNC MP1000-THC and Floating head Touch-n-Go\n")
    ctrl:AppendText("Post variables:\n")
    ctrl:AppendText("refdistance - set the distance between each reference\n")
    ctrl:AppendText("switchoffset - set your net switch offset amount \n")
    end


    --post.SetOptions(post.ARC_SEGMENTS)


    -- created 1/1/06
    -- Based on plasma1.post



    function OnInit()

    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 (" G53 G90 G40\n F1\n")
    minArcSize = 0.2 --arcs smaller than this are converted to moves

    dist = 9999999
    refdistance = 10* scale
    --Put your switch offset value here
    switchoffset =.3704
    lastz = 0
    -- set the radius when to go slow and turn off thc
    -- radius's above this number will be cut normally
    -- Not sure exactly what the slowradius number represents
    -- It cant be the radius of the circle in inchs???
    -- But i can see if you want it to work on smaller holes RAISE the slowradius
    slowradius = 8 * scale

    -- Speed you want it to go when it slows down. .3 = 30% normal speed
    slowspeed = .3
    end

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


    function OnFinish()
    endZ = safeZ
    OnRapid()
    endX = 0
    endY = 0
    OnRapid()
    post.Text (" M05 M30\n")
    end

    function OnRapid()
    dist = dist + math.hypot(endX-currentX , endY-currentY)
    post.ModalText (" G00")
    post.ModalNumber (" X", endX * scale, "0.0000")
    post.ModalNumber (" Y", endY * scale, "0.0000")
    post.ModalNumber (" Z", endZ * scale, "0.0000")
    post.Eol()
    end

    function OnMove()
    dist = dist + math.hypot(endX-currentX , endY-currentY)
    post.ModalText (" G01")
    post.ModalNumber (" X", endX * scale, "0.0000")
    post.ModalNumber (" Y", endY * scale, "0.0000")
    post.ModalNumber (" Z", endZ * scale, "0.0000")
    post.ModalNumber (" F", feedRate * scale, "0.0###")
    post.Eol()
    end

    function OnArc()
    dist = dist + math.hypot(endX-currentX , endY-currentY)
    radius = math.hypot(endX - arcCentreX,endY-arcCentreY) * scale
    -- johns mod to slow down feedrate and turn thc off for tight holes
    if (radius < slowradius) and (math.abs(arcAngle) > 0.5) then
    --feed = (radius / slowradius)
    feed = slowspeed
    if(feed < slowspeed) then feed = slowspeed end
    feed = feed * feedRate
    post.ModalText (" m101")
    post.Eol()
    else
    feed = feedRate
    post.ModalText (" m102")
    post.Eol()

    end


    if(arcAngle <0) then
    post.ModalText (" G03")
    else
    post.ModalText (" G02")
    end
    post.NonModalNumber (" X", endX * scale, "0.0000")
    post.NonModalNumber (" Y", endY * scale, "0.0000")
    post.ModalNumber (" Z", endZ * scale, "0.0000")
    post.Text (" I")
    post.Number ((arcCentreX - currentX) * scale, "0.0000")
    post.Text (" J")
    post.Number ((arcCentreY - currentY) * scale, "0.0000")
    post.ModalNumber (" F", feed * scale, "0.0###")
    post.Eol()
    end


    function OnPenDown()
    if(dist >= (refdistance/scale)) then
    dist = 0
    -- modaltext (" G00")
    -- text(" Z")
    -- number (pierceheight * scale, "0.0000")
    -- eol()
    post.ModalText(" G28.1 Z")
    post.Number(3 * scale, "0.00")
    post.Eol()
    post.ModalText(" G92 Z0.0\n")
    post.ModalText (" G00")
    post.Text(" Z")
    post.Number (switchoffset, "0.0000")
    post.Eol()
    post.ModalText(" G92 Z0.0\n")
    post.ModalText (" G00")
    post.Text(" Z")
    post.Number (pierceHeight * scale, "0.0000")
    post.Eol()
    else
    post.ModalText (" G00")
    post.Text(" Z")
    post.Number (pierceHeight * scale, "0.0000")
    post.Eol()
    end
    if (preheat > 0) then
    post.Text ("\n G04 P")
    post.Number (preheat,"0.###")
    post.Eol()
    end
    post.Text ("\n M03\n")
    if (pierceDelay > 0) then
    post.Text (" G04 P")
    post.Number (pierceDelay,"0.###")
    post.Eol()
    end
    end


    function OnPenUp()
    post.Text (" M05\n")
    if (endDelay > 0) then
    post.Text (" G04 P")
    post.Number (endDelay,"0.###")
    post.Eol()
    end
    end


    function OnNewOperation()
    post.Text (" (Process: ", operationName, ")\n")
    if (plungeRate <= 0) then
    post.Warning("WARNING: Plunge rate is zero")
    end
    if (feedRate <= 0) then
    post.Warning("WARNING: Feed rate is zero")
    end
    end

    function OnToolChange()
    post.Text (" M06 T")
    post.Number (tool, "0")
    post.ModalNumber(" F",feedRate * scale,"0.#")
    post.Text (" (", toolName, ")\n")
    end

    function OnNewPart()
    post.Text(" (Part: ",partName,")\n");
    end

    function OnDrill()
    OnRapid()
    OnPenDown()
    endZ = drillZ
    OnMove()
    OnPenUp()
    endZ = safeZ
    OnRapid()
    end

  2. #2
    Join Date
    Mar 2012
    Posts
    140
    Hey John; Awesome! Does it work as a regular post when no small holes are present? In other words, could this post be used on all files or just those with small holes?

    If this is perfected, you should name it, and submit it to sheetcam, and CandCNC support for submission. I'm sure it would be much appreciated by all.

    Thanks
    Marcel

  3. #3
    Join Date
    Jul 2005
    Posts
    2415
    Quote Originally Posted by xalky View Post
    Hey John; Awesome! Does it work as a regular post when no small holes are present? In other words, could this post be used on all files or just those with small holes?

    If this is perfected, you should name it, and submit it to sheetcam, and CandCNC support for submission. I'm sure it would be much appreciated by all.

    Thanks
    Marcel
    Problem: Any M command or the THC ON/OFF will cause a "stutter" (pause) in the motion if it comes in the cut path. There are fundamental limitations in MACH that cause this. Not something that you can work around in a POST, Also while detecting small holes and doing an automatic THC OFF has value, it does not cover an even more valuable way to do that with other features (corners, sharp turns, lead outs, etc) .

    The THC ON in MACH delay has been solved by putting in the ability in the DTHCII to disable it's outputs but leave the THC Function ON in MACH stopping any Z motion.

    Then we needed a transparent way to do that in the middle of a cut not using an M command and suffer the pause. I have been working with MACH to resolve that and I am happy to say that is working well in our Beta testing.

    The final piece is to have a way to define an "action point" in SheetCAM to be able to make it break the toolpath and be able to insert cut commands like lowering the feedrate. turning on/off the DTHC signals or (for the lucky guys with new Hypertherms) change the Cut current. It is just a matter of time before we have this piece working.

    It is premature to announce anything specific but I will tell you that in a short amount of time there will be a FULL solution from CandCNC. Those of you that haunt my support forum or have your Yahoo profile setup to receive Special Announcements on the forum will be rewarded this week with a couple of eye-openers.

    We have a policy at CandCNC about "ideas" for products or even our current development having seen what happens to most projects that get announced too soon. We announce when we have a working product that is ready to move to production.

    Stay tuned.....

    TOMcaudle
    www.CandCNC.com

  4. #4
    Join Date
    Mar 2012
    Posts
    140
    I can't wait Tom: I just received the HyT connect kit and the rs485 kit for the Hypertherm. In the process of hooking all that up now. Maybe it'll all be ready by the time of your announcement.

    Will there be a new post for sheetcam or will all the new features be enabled thru Mach? OR a little of both?

  5. #5
    Join Date
    Jul 2005
    Posts
    2415
    Quote Originally Posted by xalky View Post
    I can't wait Tom: I just received the HyT connect kit and the rs485 kit for the Hypertherm. In the process of hooking all that up now. Maybe it'll all be ready by the time of your announcement.

    Will there be a new post for sheetcam or will all the new features be enabled thru Mach? OR a little of both?
    There will be:

    New version of MACH (upgrade)
    New Version of SheetCAM
    New set of plug-ins, screens and manual

    I will build an installer and instruction file to do MOST of the stuff for you.

Similar Threads

  1. Circles in sheetcam....start from center possible?
    By johndjmix in forum Plasma, EDM / Other similar machine Project Log
    Replies: 8
    Last Post: 04-26-2012, 08:15 AM
  2. Spindle turn slow(Tsugami - Fanuc 6T)
    By starn36 in forum Fanuc
    Replies: 7
    Last Post: 01-19-2012, 04:16 PM
  3. BobCad V24 Turn. Strange circles.
    By oldraven in forum BobCad-Cam
    Replies: 5
    Last Post: 05-29-2011, 09:32 AM
  4. Bobcad-Turn and "Crop Circles"
    By Flenser in forum Benchtop Machines
    Replies: 8
    Last Post: 04-10-2011, 02:29 PM
  5. Can anyone help with sheetcam post processor?
    By twooten in forum Waterjet General Topics
    Replies: 1
    Last Post: 01-25-2008, 09:02 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •