Message 1 of 2
Air Spindle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I'm trying to mod the Haas pre-NGC post to handle an air spindle. The air spindle runs anytime its in the spindle so no M codes are need. As we only have one option for RPM I'd like the post to error on anything but the standard range 1-10000 except on a 40000 S call, possibly adding a dwell if we needed.
Learning and trying things here is where I'm at, but not successful yet.
var spindleChanged = tool.type != TOOL_PROBE &&
(insertToolCall || forceSpindleSpeed || isFirstSection() ||
(rpmFormat.areDifferent(spindleSpeed, sOutput.getCurrent())) ||
(tool.clockwise != getPreviousSection().getTool().clockwise));
if (spindleChanged || (operationNeedsSafeStart && tool.type != TOOL_PROBE)) {
forceSpindleSpeed = false;
if (spindleSpeed = 40000) {
}
skipBlock = !spindleChanged;
writeBlock(
sOutput.format(spindleSpeed)//sOutput.format(spindleSpeed), mFormat.format(tool.clockwise ? 3 : 4)
);
if (spindleSpeed < 1) {
error(localize("Spindle speed out of range."));
return;
}
if (spindleSpeed > 10001) {
error(localize("Spindle speed exceeds maximum value."));
}
skipBlock = !spindleChanged;
writeBlock(
sOutput.format(spindleSpeed), mFormat.format(tool.clockwise ? 3 : 4)
);
}Thanks in advance.