I am trying to customize the post processor for Uccnc and would ask for help.
I have a scriber installed on my DIY Cnc Plasma machine on the Z axis next to the plasma torch. The Scriber is located on a linear guide and is driven by a pneumatic cylinder.
In the post processor, I changed the way it works so that the Scribe solenoid is activated (M8) at the beginning of the Plate marker operation and deactivated with M9 at the end of this operation. There is no unnecessary raising (M9) and lowering (M8) of the scriber during this operation. I also managed to insert the variables “Scribe Plunge Speed” and “Scribe Plunge Distance” into the post processor. Scriber now descends from the SafeZ position to the “Scribe Plunge Distance” by a rapid movement (G00) and continues into the material with the movements of the “Scribe Plunge Speed” G01. This way, the Tig tungsten I use for engraving stays sharp longer and the engraved lines look better.
I need help with the following:
For scribe operations I have added referencing independent of plasma tools. Also for Scribe the “touch off sequence” happens exactly where the next plate marker segment begins.
I added a variable to the post processor:
post.DefineCustomOption (“Scribe Ref Distance”, “ScribeRef”, sc.unitLINEAR, 0, 10000)
function OnPenDown ()
if (toolClass == "MarkerTool" or tool> 99) then
if (dist> = "ScribeRef") then
dist = 0
References ();
end
This works but it is not clear to me what this distance refers to. For parts that are spaced 400mm apart, I had to enter a spacing of 1400mm for referencing to happen where needed.
Usually the refdistance is the total distance of all non rapid moves added together. There is a variable in the post that keeps track of the distance. In my post it’s simply called dist. Every move is added to dist and when it goes over the set value a reference is called.
Les, I’m sorry. It’s a typo
In the postprocessor is:
function OnPenDown()
if(toolClass == "MarkerTool" or tool > 99) then
--if (firstRef) then
-- Reference()
if(dist >= ScribeDistance) then -- if distance > ScribeDistance only than reference
dist = 0 -- move torch to reference point
offX = 0
offY = 0
offZ = 0
post.ModalNumber (" X", (currentX + offX) * scale, "0.0000")
post.ModalNumber (" Y", (currentY + offY) * scale, "0.0000")
post.Eol()
Reference();
post.ModalText (" G00")
post.Text(" Z")
post.Number (safeZ * scale, "0.0000")
post.Eol()
offX = scriberX
offY = scriberY
offZ = scriberZ
post.ModalNumber (" X", (currentX + offX) * scale, "0.0000")
post.ModalNumber (" Y", (currentY + offY) * scale, "0.0000") --move scriber into place
post.Eol()
end
djreiswig, thanks for the explanation.
Now I understand why I have to enter a higher value.
I thought this value refers to the distance between the parts (newly started contours) and not to the total distance of all non rapid moves added together.
Thank you all.
Yes, everything works properly. The only thing I still have to solve is that at the beginning of the G-code when the operation is Plate marker I have an M08 that is redundant and should not be there. But even if I don’t manage to solve this, I will be satisfied because I have changed the postprocessor a lot and in the future I will be able to use only this one postprocessor for everything I need.
The UCCNC has a bug that manifests by not registering an ARC OK signal in some cases and the machine starts moving before this signal is present. A macro has been inserted into this modified postprocessor to solve this problem. For safety reasons, I also added that all machine movements (except referencing) are performed with the Safe Probe activated (internal UCCNC function). If during operation the plasma torch hits a distorted, previously cut piece of sheet metal or the plasma torch “sinks into the sheet metal”, the movement of the machine stops.
You can see an example in the attached video where I intentionally left THC set to 0 V and where this safety function was activated when the plasma torch, after piercing and passing the THC delay time, descended into the sheet metal.
To mark small precise holes that will be drilled later, I use a plasma drill operation. The problem with this is that the first mark (hole) was always deeper than the others (and these were deeper than I wanted due to the inability to reduce piercing time and time to execute 2 macros (M3 and M5) in UCCNC). I used to solve this earlier by drawing an additional first hole that served to cycle the torch.
I don’t have to do that anymore because I inserted a cycle torch into the postprocessor as well as 1 macro that allows me to have a piercing time of only 100 msec. When the machine performs this marking, the ground clamp is removed and only the pilot arc is active.
This way I get precise, even tiny craters, just like a center punch mark.