Hi Joe,
It's probably better if we do the spindle start/stops a little different then in that case (I have seen M5 work stopping all spindles on a Puma (albeit an older revision)).
So, if you do the following, then this should give you the correct starts / stops for milling and turning :-
Revert 2817 back to :-
spindleDir = mFormat.format(tool.clockwise ? getCode("START_SPINDLE_CW", getSpindle(false)) : getCode("START_SPINDLE_CCW", getSpindle(false)));
Replace lines 2736 - 2740 from :-
if (getSpindle() == SPINDLE_SUB) {
spindleDir = tool.clockwise ? getCode("START_SUB_SPINDLE_CW") : getCode("START_SUB_SPINDLE_CCW");
} else {
spindleDir = tool.clockwise ? getCode("START_SPINDLE_CW") : getCode("START_SPINDLE_CCW");
}
To :-
spindleDir = tool.clockwise ? getCode("START_SPINDLE_CW") : getCode("START_SPINDLE_CCW");
Replace lines 283 -> 294 from -
case "STOP_SPINDLE":
return 5;
case "ORIENT_SPINDLE":
return (spindle == SPINDLE_MAIN) ? 19 : 119;
case "START_SPINDLE_CW":
return 3;
case "START_SUB_SPINDLE_CW":
return 103;
case "START_SPINDLE_CCW":
return 4;
case "START_SUB_SPINDLE_CCW":
return 104;
To-
case "STOP_SPINDLE":
switch (spindle) {
case SPINDLE_MAIN:
machineState.mainSpindleIsActive = true;
return 5;
case SPINDLE_SUB:
machineState.subSpindleIsActive = true;
return 105;
case SPINDLE_LIVE:
machineState.liveToolIsActive = true;
return 5;
}
case "ORIENT_SPINDLE":
return (spindle == SPINDLE_MAIN) ? 19 : 119;
case "START_SPINDLE_CW":
switch (spindle) {
case SPINDLE_MAIN:
machineState.mainSpindleIsActive = true;
return 3;
case SPINDLE_SUB:
machineState.subSpindleIsActive = true;
return 103;
case SPINDLE_LIVE:
machineState.liveToolIsActive = true;
return 3;
}
case "START_SPINDLE_CCW":
switch (spindle) {
case SPINDLE_MAIN:
machineState.mainSpindleIsActive = true;
return 4;
case SPINDLE_SUB:
machineState.subSpindleIsActive = true;
return 104;
case SPINDLE_LIVE:
machineState.liveToolIsActive = true;
return 4;
}
This will give you the correct startup/cancellation codes per spindle then.
Hope this helps!
Andy
If my post answers your question, please click the 'Accept Solution' button. This helps everyone find answers more quickly!
Andy Millard
Product Support Specialist