Looking at these issues one at a time:
First up, dealing with the G70 issue:
Given that for your control G70/71 seem to control metric vs inch programming (normally G20/21) you need to find the section of code that looks like this (Line 240 in the original post but you have added some stuff so its likely around line 245)
switch (unit) {
case IN:
writeBlock(gUnitModal.format(20));
break;
case MM:
writeBlock(gUnitModal.format(21));
break;
}
and change it to look like this
switch (unit) {
case IN:
writeBlock(gUnitModal.format(70)); // 20 changed to 70
break;
case MM:
writeBlock(gUnitModal.format(71)); // 21 change to 71
break;
}
2nd, M6 T0 call out at the end of each section (process block):
You can add a "M6 T0" call out to the end of each section by modifying the the onSectionEnd function as shown below. Note that i have added two lines the first will generate the same G28 G91 Z0 command as you comment on to ensure that the z axis is clear of the work. As per my comments in item 3 below this is a safety feature but if you are 100% sure you don't need it then feel free to omit the 1st added line.
function onSectionEnd() {
writeRetract(Z); // line added to ensure safe tool change height
writeBlock(mFormat.format(6),"T0"); // line added to output M6 T0 to clear multi drill block
writeBlock(gPlaneModal.format(17));
forceAny();
}
3rd, Z axis homing:
This is a pretty standard safety block. Assuming you machine understands the command it should retract the Z axis all the way to the top. This guarantees that any moves etc made as part of a tool change wont hit the work piece. I would be inclined to leave it in unless you have a specific reason for not wanting it. It should only take a few seconds unless the machines homing cycle is very slow.
If you really want to remove it than you can comment out these to lines in the onSection function by adding a // to the start of the line (roughly line 395)
// retract to safe plane
writeRetract(Z);
zOutput.reset();
4th, Coolant codes (M9):
No this is not a setting in fusion it is hard coded as a part of the tool change process in the post processor. This insures that coolant is not running during a tool change. It wont hurt your controller to have it there.
Does your machine have a code controlled vacuum dust extraction or similar? If so these are likely controlled by coolant codes.
If the above doesn't apply and you truly have zero use for the coolant codes then you can disable all coolant code output by making a change to the setCoolant function as shown below.
function setCoolant(coolant) {
return 0; // Line added to disable all coolant output
var coolantCodes = getCoolantCodes(coolant);
if (Array.isArray(coolantCodes)) {
for (var c in coolantCodes) {
writeBlock(coolantCodes[c]);
}
return undefined;
}
return coolantCodes;
}