Post processor problem WCS G54 G55
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi im trying to modify my post processor for multiple offsets . but it dont got in...
Do i need to specify it before i write in to ´´ function on Section ´´ ??
// wcs
if (insertToolCall) { // force work offset when changing tool
currentWorkOffset = undefined;
}
var workOffset = currentSection.workOffset;
if (workOffset == 0) {
warningOnce(localize("Work offset has not been specified. Using G54 as WCS."), WARNING_WORK_OFFSET);
workOffset = 1;
}
if (workOffset > 0) {
if (workOffset > 6) {
var p = workOffset; // 1->... // G59 P1 is the same as G54 and so on
if (p > 254) {
error(localize("Work offset out of range."));
} else {
if (workOffset != currentWorkOffset) {
writeBlock(gFormat.format(59), "P" + p); // G59 P
currentWorkOffset = workOffset;
}
}
} else {
if (workOffset != currentWorkOffset) {
writeBlock(gFormat.format(53 + workOffset)); // G54->G59
currentWorkOffset = workOffset;
}
}
}