Post Variables

Les…

We’re setting up a new Victor control and I’m working up a post for it. It handles a lot of what we normally do in SC automatically. All we need to do is post an XY toolpath with no kerf compensation. The control uses G40, 41 and 42 to handle compensation. It also uses G12 and 13 for full circles and M7 launches a canned cycle that initiates the cut. I need to determine the following in a post…

(1) Is an arc a full, complete circle?

(2) Should the entity have an inside offset, outside offset or no offset? Need to post G40, G41 or G42 accordingly.

Thanks

I’m afraid SheetCam isn’t currently compatible with G41/G42. There isn’t any reliable way for the post to find the offset direction.

To find if an arc is a full circle you can use code like this in function OnArc()

function OnArc()
   if &#40;math.hypot&#40;endX - currentX, endY - currentY&#41; < 0.0001&#41; then

     ...output the code for a full circle

     return
   end

Thanks…I came up with a work-around for G41/42. Since the control assigns kerf comp parameters from a database based on the material selection, multiple tools are not necessary. I created 3 tools…Inside, Outside and none…each with a zero tool diameter. In onToolChange() I look at the tool name and post the appropriate code. Of course, inside, outside and entities with no offset have to be on separate layers.

You need to be very careful doing this. For instance if you switch between climb/coventional cutting your cuts will end up on the wrong side. You also need to be careful when using ramping. The ramp cleanup is likely to end up in the wrong place and ruin your part.

We’re plasma cutting. All we do is spec no offset and post a G40/41/42 according to the tool being used. We don’t even need to apply leads. The controller automatically optimizes the tool paths and adds leads accordingly.