Community
I've just started running air blast a bit (M50) and it's triggering on just fine with my post - but i need it to give an M09 before i switch to flood, or it will just leave the air blast running as well. how would i achieve that? here's my coolant section in my post.
var currentCoolantMode = COOLANT_OFF; function setCoolant(coolant) { if (coolant == currentCoolantMode) { return; // coolant is already active } if (coolant == COOLANT_OFF) { writeBlock(mFormat.format((currentCoolantMode == COOLANT_THROUGH_TOOL) ? 89 : 9)); currentCoolantMode = COOLANT_OFF; return; } var m; switch (coolant) { case COOLANT_FLOOD: m = 8; break; case COOLANT_AIR: m = 50; break; default: onUnsupportedCoolant(coolant); m = 9; } if (m) { writeBlock(mFormat.format(m)); currentCoolantMode = coolant; } } var mapCommand = { COMMAND_STOP:0, COMMAND_OPTIONAL_STOP:1, COMMAND_END:2, COMMAND_SPINDLE_CLOCKWISE:3, COMMAND_SPINDLE_COUNTERCLOCKWISE:4, COMMAND_STOP_SPINDLE:5, COMMAND_ORIENTATE_SPINDLE:19, COMMAND_CLEAN:0 }; function onCommand(command) { switch (command) { case COMMAND_COOLANT_OFF: setCoolant(COOLANT_OFF); return; case COMMAND_COOLANT_ON: setCoolant(COOLANT_FLOOD); return; case COMMAND_STOP: writeBlock(mFormat.format(0)); forceSpindleSpeed = true; return; case COMMAND_START_SPINDLE: onCommand(tool.clockwise ? COMMAND_SPINDLE_CLOCKWISE : COMMAND_SPINDLE_COUNTERCLOCKWISE); return; case COMMAND_LOCK_MULTI_AXIS: return; case COMMAND_UNLOCK_MULTI_AXIS: return; case COMMAND_START_CHIP_TRANSPORT: return; case COMMAND_STOP_CHIP_TRANSPORT: return; case COMMAND_BREAK_CONTROL: return; case COMMAND_TOOL_MEASURE: return;