The setup of the Fanuc post requires that tool length compensation be canceled prior to initiating smoothing and the post also requires that the tool be retracted prior to canceling the tool length compensation (this is a safety feature, since the tool can plunge into the part if the tool has not been retracted first).
Not all Fanuc controls require that tool length compensation be canceled prior to initiating the smoothing mode, either due to the control model or type of smoothing being used. If your control/smoothing mode does not require that tool length compensation be canceled first, then you can modify the following code in the post to remove this requirement.
function onSection() {
...
if (insertToolCall || newWorkPlane) {
// retract to safe plane
writeRetract(Z); // retract
forceXYZ();
}
if ((insertToolCall && !isFirstSection()) || forceSmoothing) {
if (insertToolCall && !isFirstSection()) { // add this line
disableLengthCompensation();
} // add this line
setSmoothing(false);
}
...
...
function setSmoothing(mode) {
if (mode == currentSmoothing) {
return false;
}
// 1) Make sure G49 is called before the execution of G05.1 Q1 Rx
// 2) G05.1 Q1 Rx must be engaged BEFORE G43-Tool Length Comp
// 3) AICC and AIAPC need to be turned on and off for each tool
// 4) AICC and AIAPC does not apply to canned drilling cycles
// validate(!lengthCompensationActive, "Length compensation is active while trying to update smoothing."); // comment out this line
It is not recommended that you disable the retract move if you are using tool length compensation for tool changes for the reason mentioned above, just in case you completely removed the retract move in your version of the post.

Bob Schultz
Sr. Post Processor Developer