Help with small change to Okuma turning post

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi, I have recently acquired Okuma lathe with OSP7000L control. The Okuma turning post mostly seems to work very well but I need to make change or maybe ideally remove the spindle gear part.
The top line of the following section has spindlespeed <=1100. This doesn't seem to work as even a 1750 rpm calls out M41, when it should be M42 when 1100 rpm or faster. Also, it doesn't seem to work with constant surface speed, always choosing the low gear, even when all the turning in the operation would be done at over 2000rpm. I suppose the post processor is incapable of calculating this, sees the number (which is actually surface speed not RPM) and chooses low gear. I tried to remove this part of the post and also the following mFormat.format(spindlerange) from the end of the excerpt but it caused the post to error out.
As I am usually using high speed gear, I think it would be simplest for me to remove the gearing part of the post and add gear code by hand when necessary, instead of it posting the M41/M42 code at every RPM call out and me having to alter or move them. Does anybody know what I need to do?
var spindleRange = (_spindleSpeed <= 1100) ? 41 : 42;
var maximumSpindleSpeed = (tool.maximumSpindleSpeed > 0) ? Math.min(tool.maximumSpindleSpeed, properties.maximumSpindleSpeed) : properties.maximumSpindleSpeed;
if (tool.getSpindleMode() == SPINDLE_CONSTANT_SURFACE_SPEED) {
_spindleSpeed = tool.surfaceSpeed * ((unit == MM) ? 1/1000.0 : 1/12.0);
if (forceRPMMode) { // RPM mode is forced until move to initial position
if (xFormat.getResultingValue(initialPosition.x) == 0) {
_spindleSpeed = maximumSpindleSpeed;
} else {
_spindleSpeed = Math.min((_spindleSpeed * ((unit == MM) ? 1000.0 : 12.0) / (Math.PI*Math.abs(initialPosition.x*2))), maximumSpindleSpeed);
}
spindleMode = getCode("CONSTANT_SURFACE_SPEED_OFF");
} else {
if (tool.maximumSpindleSpeed > 0) {
writeBlock(gFormat.format(50), sOutput.format(maximumSpindleSpeed));
}
spindleMode = getCode("CONSTANT_SURFACE_SPEED_ON");
}
} else {
spindleMode = getCode("CONSTANT_SURFACE_SPEED_OFF");
}
if (getSpindle(true) == SPINDLE_SECONDARY) {
writeBlock(
spindleMode,
sOutput.format(_spindleSpeed),
spindleDir,
mFormat.format(spindleRange)
);
} else {
writeBlock(
spindleMode,
sOutput.format(_spindleSpeed),
spindleDir,
mFormat.format(spindleRange)
);
}
// wait for spindle here if required