Need help with 4th axis post processor

Hey guys. We are currently having an issue with the post processor we are preparing to use for our 4 axis plasma. We took the “PlasmaRotary Mach 3 swapped axes” post and modified it slightly so it does what we want, and it mostly does.

The issue we are having is the following: The program executes the G32 command and finds the tube, then sets the position with G92 to Z-0.08 followed by a retreat to the initial cutting heigh of 3.2. There, it ignites the torch and waits for half a second before moving, and in the first line of movement we have the problem. For some reason, it wants to modify the Z position by some amount we cant explain. Here is a piece of code for example:

N0040 G21 (Units: Metric)
N0050 F1
N0060 G53 G90 G40
N0070 G00
N0080 (Part: 4to eje)
N0090 (Operation: Compensación interior, 1, T5: Plasma, 2mm Corte)
N0100 G00 Y338.7500 X0.8880 A-90.0000
N0110 G31 Z -10 F500.0
N0120 G92 Z-0.0800
N0130 G00 Z3.2000
N0140 M03
N0150 G04 P0.5
N0160 G01 Z23.0000 F200.0
N0170 Y330.7500 F1800.0
N0180 X6.0015

See how it goes to Z23? The same thing will happen with arcs. There is a possibility that the THC will override that Z move command, but we dont want to risk testing it and finding out that it doesnt, because we’ve had components burn when the arc is interrupted by a large enough distance between the torch and the sheet.

There is also something we dont quite know how to do. When the plasma is cutting and it has to very the Z position while it turns (like when it cuts the edge of a square tube), how could we keep a constant separation from the tube (the pierce height for example) without using the THC? As we have right now, it does something like this:

N0600 G31 Z -10 F500.0
N0610 G92 Z-0.0800
N0620 G00 Z3.2000
N0630 M03
N0640 G04 P0.5
N0650 G01 Z23.0000 F200.0
N0660 Y252.1195 X12.3762 F1800.0
N0670 G03 Y266.0836 X8.8072 J-2.1015 I-37.3256
N0680 G01 Y266.0961 X8.8015
N0690 G03 Y282.3819 X-8.1102 J-13.1275 I-28.9391
N0700 G01 Y283.1279 X-10.2938
N0710 Y283.6853 X-12.5116
N0720 Y284.0533 X-14.7565
N0730 Y284.2133 X-16.7182 F1544.2114
N0740 Y284.2248 X-15.7774 Z24.1404 A-3.9853 F46689.6643
N0750 Y284.2362 X-14.7659 Z24.9728 A-7.1075 F37189.9823
N0760 Y284.2379 X-13.2443 Z26.0646 A-11.5719 F37278.8177

It kinda does what we want, but its way higher than its supposed to.

I’ll attach the post as we have it right now. If anyone could look at it and help us out, we’d be very grateful.

Thank you in advance.
PlasmaRotary Mach3 swapped axes.scpost (12.8 KB)

Are you using the rotary plugin for SheetCam?

Yes, we are.

I just had a look at your post and it is missing the material surface offset when probing. I’m not sure if this is just a very old version of the post or if you took out the offsets. I have attached the latest version which should work.

The problem you are seeing is because Z0 is the centre line of the tube when using the rotary plugin. When cutting square/rectangular tube the height of the surface varies depending on the angle, so having Z0 as the surface does not make sense.
PlasmaRotary Mach3 swapped axes.scpost (12.8 KB)

I see, we were going about it the wrong way then.

Seems to work fine now, very thankful for the quick response and all the help!