@KRoser_12 sure this is possible.
Here is a sample taken from the generic HAAS UMC750 post:
function setCoolant(coolant) {
if (isProbeOperation()) { // avoid coolant output for probing
coolant = COOLANT_OFF;
}
if (coolant == currentCoolantMode) {
return; // coolant is already active
}
var m = undefined;
var m2 = undefined;
if (coolant == COOLANT_OFF) {
if (currentCoolantMode == COOLANT_THROUGH_TOOL) {
m = 89;
} else if (currentCoolantMode == COOLANT_AIR) {
m = 84;
} else if (currentCoolantMode == COOLANT_AIR_THROUGH_TOOL) {
m = 74;
} else if (currentCoolantMode == COOLANT_FLOOD_THROUGH_TOOL) {
m = 89;
m2 = 9;
} else {
m = 9;
}
writeBlock(mFormat.format(m));
if (m2) {
writeBlock(mFormat.format(m2));
}
currentCoolantMode = COOLANT_OFF;
return;
}
if (currentCoolantMode != COOLANT_OFF) {
setCoolant(COOLANT_OFF);
}
switch (coolant) {
case COOLANT_FLOOD:
m = 8;
break;
case COOLANT_THROUGH_TOOL:
m = 88;
break;
case COOLANT_AIR:
m = 83;
break;
case COOLANT_AIR_THROUGH_TOOL:
m = 73;
break;
case COOLANT_FLOOD_THROUGH_TOOL:
m = 88;
m2 = 8;
break;
default:
warning(localize("Coolant not supported."));
if (currentCoolantMode == COOLANT_OFF) {
return;
}
coolant = COOLANT_OFF;
m = 9;
}
writeBlock(mFormat.format(m));
if (m2) {
writeBlock(mFormat.format(m2));
}
currentCoolantMode = coolant;
}
Achim.N
Principal Technology Consultant