Post processor questions, a lot of them

OK so I have a lot of questions about the post processor. My plasma torch is in inches and uses mach4. I have an example post processor that is for mach3 (I have not come across one for mach4 yet). Reading through it there are a wonderful lot of comments which is very helpful. One comment in the OnInit function says “variable numbers below are in mm and are converted to inches by the scale factor.” So does this mean all variables should be in MM. Below that it says zrefdistance = 500 * scale. Why 500 and just how big is scale? Then it has zrefslowdown = 12.7 * scale. Why 12.7? Next we have switchoffset = .090 which is a positive number. I had been setting the point where the torch touches the metal as Z 0.0 so my torch touchoff will be actually -.284. Should I put -.284 or just .284. OnPenDown has only 0.000 in pierceheight and zrefslowdown and switchoffset. I can see that switchoffset has been defined in OnInit but where do you define pierceheight? I also do not know where the cut height is defined. I know that this is probably elementary procedure for the members here but I need to understand. I know that mach4 has a screen for THC variables but I have not been using that as my THC has no feedback to the BOB and previously I did not have a torch on signal (OK to move). I do now have a new plasma cutter and it has a cnc connection that provides the torch on signal. So should I now put the relevant numbers in the THC screen?

The CNC connection provides a pair of wires for turning on the torch. A pair of wires that take the torch voltage to the THC and a pair of wires that are labeled OK to move. The OK to move would be the only signal back to the BOB.
Should I leave all of the numbers in the onpendown as 0.000 and put these values in the mach4 THC screen?

I’ll try to answer as much as I can.
SheetCam works in metric (the programmer is from England). All post variables are in mm.
Scale is dependent on what units you are using in SheetCam. I believe there is a setting in one of the menus.
If you want inches output then scale is 25.4, otherwise it is 1. 1 inch is 25.4mm
So in the post the * scale will ensure the correct units are output.

I assume the numbers 500 & 12.7 are numbers selected by the author of the post. There is nothing significant about those numbers as far as SheetCam is concerned. It’s just what they wanted the post to do.

The switch offset should be positive to make the torch raise. A negative offset would make it plunge.

PierceHeight is defined in the tool.

The thc most likely only needs a voltage setting so it can maintain the correct arc gap.
Not sure about the zeros. Could you be confusing the formatting string for a zero value? A lot of the numbers in SheetCam use a string like 0.0000 to tell it how to display the digits. That could be what you are seeing.

Hopefully that helps.

That does help for sure. I would be putting inches in the pre processor and it would think I meant mm. Quite a difference in scale. Getting the switch offset cleared up is great. Yes the zeros are in the formatting string. I was not aware that was the use. I think I am a great deal clearer now. Thanks again for the reply and the information.

Happy to help.