Good Morning,
Thanks for posting! You are correct, the post processor you are using defines the center point of an arc using incremental co-ordinates. If you would like to use absolute co-ordinates for this, you will need to make a modification inside of the post processor.
To get the incremental co-ordinates, the center points absolute position is taken from the arc start position. To change these calculations, change this:
switch (getCircularPlane()) {
case PLANE_XY:
writeBlock(conditional(properties.type != "A", gAbsIncModal.format(90)), gPlaneModal.format(17), gMotionModal.format(clockwise ? 2 : 3), iOutput.format(cx - start.x, 0), jOutput.format(cy - start.y, 0), getFeed(feed));
break;
case PLANE_ZX:
writeBlock(conditional(properties.type != "A", gAbsIncModal.format(90)), gPlaneModal.format(18), gMotionModal.format(clockwise ? 2 : 3), iOutput.format(cx - start.x, 0), kOutput.format(cz - start.z, 0), getFeed(feed));
break;
case PLANE_YZ:
writeBlock(conditional(properties.type != "A", gAbsIncModal.format(90)), gPlaneModal.format(19), gMotionModal.format(clockwise ? 2 : 3), jOutput.format(cy - start.y, 0), kOutput.format(cz - start.z, 0), getFeed(feed));
break;
default:
linearize(tolerance);
}
} else if (!properties.useRadius) {
switch (getCircularPlane()) {
case PLANE_XY:
writeBlock(conditional(properties.type != "A", gAbsIncModal.format(90)), gPlaneModal.format(17), gMotionModal.format(clockwise ? 2 : 3), xOutput.format(x), yOutput.format(y), zOutput.format(z), iOutput.format(cx - start.x, 0), jOutput.format(cy - start.y, 0), getFeed(feed));
break;
case PLANE_ZX:
writeBlock(conditional(properties.type != "A", gAbsIncModal.format(90)), gPlaneModal.format(18), gMotionModal.format(clockwise ? 2 : 3), xOutput.format(x), yOutput.format(y), zOutput.format(z), iOutput.format(cx - start.x, 0), kOutput.format(cz - start.z, 0), getFeed(feed));
break;
case PLANE_YZ:
writeBlock(conditional(properties.type != "A", gAbsIncModal.format(90)), gPlaneModal.format(19), gMotionModal.format(clockwise ? 2 : 3), xOutput.format(x), yOutput.format(y), zOutput.format(z), jOutput.format(cy - start.y, 0), kOutput.format(cz - start.z, 0), getFeed(feed));
break;
default:
linearize(tolerance);
}
} else { // use radius mode
To this:
switch (getCircularPlane()) {
case PLANE_XY:
writeBlock(conditional(properties.type != "A", gAbsIncModal.format(90)), gPlaneModal.format(17), gMotionModal.format(clockwise ? 2 : 3), iOutput.format(cx), jOutput.format(cy), getFeed(feed));
break;
case PLANE_ZX:
writeBlock(conditional(properties.type != "A", gAbsIncModal.format(90)), gPlaneModal.format(18), gMotionModal.format(clockwise ? 2 : 3), iOutput.format(cx), kOutput.format(cz), getFeed(feed));
break;
case PLANE_YZ:
writeBlock(conditional(properties.type != "A", gAbsIncModal.format(90)), gPlaneModal.format(19), gMotionModal.format(clockwise ? 2 : 3), jOutput.format(cy), kOutput.format(cz), getFeed(feed));
break;
default:
linearize(tolerance);
}
} else if (!properties.useRadius) {
switch (getCircularPlane()) {
case PLANE_XY:
writeBlock(conditional(properties.type != "A", gAbsIncModal.format(90)), gPlaneModal.format(17), gMotionModal.format(clockwise ? 2 : 3), xOutput.format(x), yOutput.format(y), zOutput.format(z), iOutput.format(cx), jOutput.format(cy), getFeed(feed));
break;
case PLANE_ZX:
writeBlock(conditional(properties.type != "A", gAbsIncModal.format(90)), gPlaneModal.format(18), gMotionModal.format(clockwise ? 2 : 3), xOutput.format(x), yOutput.format(y), zOutput.format(z), iOutput.format(cx), kOutput.format(cz), getFeed(feed));
break;
case PLANE_YZ:
writeBlock(conditional(properties.type != "A", gAbsIncModal.format(90)), gPlaneModal.format(19), gMotionModal.format(clockwise ? 2 : 3), xOutput.format(x), yOutput.format(y), zOutput.format(z), jOutput.format(cy), kOutput.format(cz), getFeed(feed));
break;
default:
linearize(tolerance);
}
} else { // use radius mode
Then finally, change this:
// circular output
var kOutput = createReferenceVariable({prefix:"K"}, spatialFormat);
var iOutput = createReferenceVariable({prefix:"I"}, spatialFormat); // no scaling
To this:
// circular output
var kOutput = createVariable({prefix:"K"}, spatialFormat);
var iOutput = createVariable({prefix:"I"}, spatialFormat); // no scaling
Hope this helps!
-
George Roberts
Manufacturing Product managerIf you'd like to provide feedback and discuss how you would like things to be in the future, Email Me and we can arrange a virtual meeting!