Message 1 of 6
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hey all together,
I've got a strange problem:
Since months I'm working with a SCM Postprocessor (got it from here), see at the end of this call. It was doing fine all the time. Since today I've got the situation, that the postprocessing doesn't do like it should. Is there anyone else with this problem? Can someone help me, please?
Thanks a lot,
Steven
Information: Configuration: XILOG3 Morbidelli
Information: Vendor: Sqedio SA
Information: Posting intermediate data to 'C:\Users\blue\Desktop\los.xxl'
Information: Total number of warnings: 4
Error: Failed to post process. See below for details.
...
Loading locale from 'C:\Users\blue\AppData\Local\Autodesk\webdeploy\production\20eba7b8590bd15aa5cf30169381ceca41f2dc77\Applications\CAM360\Data\Translations\german_de.xml'
Code page changed to '1252 (ANSI - Lateinisch I)'
Start time: Friday, November 1, 2019 12:53:55 PM
Warnung: function getProgramNameAsInt does not always return a value
Warnung: function getProgramNameAsInt does not always return a value
Warnung: function getProgramNameAsString does not always return a value
Warning(C:\Users\blue\Desktop\Postprozessor SCM\LastWorking.cps:534): redefining arguments is deprecated
Code page changed to '20127 (US-ASCII)'
Post processor engine: 4.53.0 9
Configuration path: C:\Users\blue\Desktop\Postprozessor SCM\LastWorking.cps
Include paths: C:\Users\blue\Desktop\Postprozessor SCM
Configuration modification date: Friday, November 1, 2019 12:27:41 PM
Output path: C:\Users\blue\Desktop\los.xxl
Checksum of intermediate NC data: d7b26673fd46f72c2b8a47135eff46ac
Checksum of configuration: a60f03913f49bf1295e79a5f3fb32329
Vendor url: http://www.sqedio.com
Legal: Copyright (C) 2007-2012 HSMWorks ApS
...
###############################################################################
Fehler: Error: Parameter does not exist.
Error at line: 1
Stack dump:
("Parameter does not exist.")@:0
onOpen()@C:\Users\blue\Desktop\Postprozessor SCM\LastWorking.cps:131
Failed while processing onOpen().
###############################################################################
Fehler: Failed to invoke 'onOpen' in the post configuration.
Fehler: Failed to invoke function 'onOpen'.
Fehler: Failed to execute configuration.
Stop time: Friday, November 1, 2019 12:53:55 PM
Post processing failed.The Postprocessor i use:
/**
Copyright (C) 2007-2012 by HSMWorks ApS
All rights reserved.
SCM post processor configuration.
$Revision: 25831 $
$Date: 2011-06-20 02:01:39 +0200 (ma, 20 jun 2011) $
FORKID {F4EC72B8-D7E7-45c4-A703-7089F83842E9}
*/
description = "XILOG3 Morbidelli"; //#&
vendor = "Sqedio SA"; //#&
vendorUrl = "http://www.sqedio.com"; //#&
legal = "Copyright (C) 2007-2012 HSMWorks ApS"; //#&
certificationLevel = 2;
extension = "xxl"; //#&
setCodePage("ascii"); //#&
tolerance = spatial(0.002, MM);
minimumChordLength = spatial(0.01, MM);
minimumCircularRadius = spatial(0.01, MM);
maximumCircularRadius = spatial(5000, MM);
minimumCircularSweep = toRad(0.01);
maximumCircularSweep = toRad(180);
allowHelicalMoves = true;
allowedCircularPlanes = undefined; // allow any circular motion
highFeedrate = toPreciseUnit(4000, MM);
// user-defined properties
properties = {
writeTools: true, // writes the tools
_bx: 190, // machine zero X
_by: 225, // machine zero Y
_bz: 8, // machine zero Z
machineField: "HG", // use: A, C, D, AD //#&
useXG0: true, // uses highfeed if disabled
convertXilog: true, //activates Xilog converter
repeatnumber: 1
};
var xyzFormat = createFormat({decimals:3});
var yzFormat = createFormat({decimals:3, scale: -1});
var abcFormat = createFormat({decimals:3, forceDecimal:true, scale:DEG});
var feedFormat = createFormat({decimals:0});
var toolFormat = createFormat({decimals:0});
var taperFormat = createFormat({decimals:1, scale:DEG});
var rpmFormat = createFormat({decimals:0});
var nFormat = createFormat({decimals:0});
var xOutput = createVariable({prefix:"X="}, xyzFormat);
var yOutput = createVariable({prefix:"Y="}, yzFormat);
var zOutput = createVariable({prefix:"Z="}, yzFormat);
var feedOutput = createVariable({prefix:"V="}, feedFormat);
// circular output
var iOutput = createVariable({prefix:"I=", force:true}, xyzFormat);
var jOutput = createVariable({prefix:"J=", force:true}, yzFormat);
// collected state
var F = 1;
var xginActive = false;
var deBugPost = 0; // Turn post debugging off(0) or on(1)
/**
Turn Post De-bugging On/Off
*/
if (deBugPost == 1) {
setWriteInvocations(true);
setWriteStack(true);
}
/**
Writes the specified block.
*/
function writeBlock() {
writeWords(arguments);
}
/**
Output a comment.
*/
function writeComment(text) {
if (text) {
writeln("; " + text);
}
}
function formatTool(tool) {
return "T" + (((tool.number >= 900) && (tool.number < 1000)) ? tool.comment : toolFormat.format(tool.number));
}
function onOpen() {
var stokUpperX = getGlobalParameter("stock-upper-x"); //#&
if (stokUpperX > 1450) {
properties.machineField = "AB";
}
/*switch (properties.machineField) {
case "A":
case "B":
case "C":
case "D":
case "E":
case "F":
case "G":
case "H":
case "AD":
case "EH":
break;
default:
error(localize("Invalid machine field. The machine field must be A, C, D, or AD."));
}*/
var workpiece = getWorkpiece();
writeBlock(
"H",
"DX=" + xyzFormat.format(workpiece.upper.x - workpiece.lower.x), "DY=" + xyzFormat.format(workpiece.upper.y - workpiece.lower.y), "DZ=" + xyzFormat.format(workpiece.upper.z - workpiece.lower.z),
"-HG C=0 T=0 R=1", "*MM", "/\"st\"","BX=190.000 BY=225.000 BZ=0.000 V=0;" + programComment
);
// dump file information - Activar caracteres especiais em allowed chars!
var now = new Date();
writeComment("-----------------------------------------------");
writeComment("Processador : Evolve");
writeComment("CAM Version : " + getGlobalParameter("generated-by")); //#&
writeComment("Date : " + now.getDate() + "-" + (now.getMonth()+1) + "-" + now.getFullYear() + " " + now.getHours() + ":" + now.getMinutes());
writeComment("User Name : " + getGlobalParameter("username")); //#&
if (hasGlobalParameter("document-path")) { //#&
var path = getGlobalParameter("document-path"); //#&
if (path) {
writeComment("File : " + path);
writeComment("-----------------------------------------------");
}
}
// dump tool information
if (properties.writeTools) {
var zRanges = {};
if (is3D()) {
var numberOfSections = getNumberOfSections();
for (var i = 0; i < numberOfSections; ++i) {
var section = getSection(i);
var zRange = section.getGlobalZRange();
var tool = section.getTool();
if (zRanges[tool.number]) {
zRanges[tool.number].expandToRange(zRange);
} else {
zRanges[tool.number] = zRange;
}
}
}
var tools = getToolTable();
if (tools.getNumberOfTools() > 0) {
for (var i = 0; i < tools.getNumberOfTools(); ++i) {
var tool = tools.getTool(i);
var comment = formatTool(tool) + " " +
"D=" + xyzFormat.format(tool.diameter) + " " +
localize("CR") + "=" + xyzFormat.format(tool.cornerRadius);
if ((tool.taperAngle > 0) && (tool.taperAngle < Math.PI)) {
comment += " " + localize("TAPER") + "=" + taperFormat.format(tool.taperAngle) + localize("deg");
}
if (zRanges[tool.number]) {
comment += " - " + localize("ZMIN") + "=" + xyzFormat.format(zRanges[tool.number].getMinimum());
}
comment += " - " + getToolTypeName(tool.type);
writeComment(comment);
}
}
}
}
function onComment(message) {
writeComment(message);
}
/** Force output of X, Y, and Z. */
function forceXYZ() {
xOutput.reset();
yOutput.reset();
zOutput.reset();
}
/** Force output of X, Y, Z, and F on next output. */
function forceAny() {
forceXYZ();
feedOutput.reset();
}
var gotRapid = undefined; // the last rapid
var useLeads = true;
var linkingSkipped = false;
var firstRapid = true;
var insertToolCall;
var gValue;
var saia = {forceUp:false, value:""};
function onSection() {
insertToolCall = isFirstSection() ||
currentSection.getForceToolChange && currentSection.getForceToolChange() ||
(tool.number != getPreviousSection().getTool().number);
if (tool.number == 80 || tool.number == 81 || tool.number == 90 || tool.number == 91) {
gValue = 1;
}
else {
gValue = 2;
}
/*
var abc = currentSection.workPlane.getTurnAndTilt(0, 2);
writeBlock(
"XPL",
"X=" + xyzFormat.format(currentSection.workOrigin.x),
"Y=" + xyzFormat.format(currentSection.workOrigin.y),
"Z=" + xyzFormat.format(currentSection.workOrigin.z),
"Q=" + abcFormat.format(abc.z),
"R=" + abcFormat.format(abc.x)
);
*/
forceAny();
var workpiece = getWorkpiece();
var dx = workpiece.upper.x - workpiece.lower.x;
var dy = workpiece.upper.y - workpiece.lower.y;
var dz = workpiece.upper.z - workpiece.lower.z;
// writeln("delta = " + xyzFormat.format(dx) + " " + xyzFormat.format(dy) + " " + xyzFormat.format(dz));
var W = currentSection.workPlane;
var zAxis = W.forward;
var xAxis = new Vector(1, 0, 0);
var leftHand = false;
if (isSameDirection(zAxis, new Vector(0, 0, 1))) {
F = 1;
xAxis = new Vector(1, 0, 0);
setTranslation(new Vector(0, 0, 0));
} else if (isSameDirection(zAxis, new Vector(1, 0, 0))) {
F = 2;
xAxis = new Vector(0, 0, 1);
setTranslation(new Vector(dz, 0, -dx));
leftHand = true;
} else if (isSameDirection(zAxis, new Vector(-1, 0, 0))) {
F = 3;
xAxis = new Vector(0, 0, 1);
setTranslation(new Vector(dz, 0, 0));
} else if (isSameDirection(zAxis, new Vector(0, -1, 0))) {
F = 4;
xAxis = new Vector(1, 0, 0);
setTranslation(new Vector(0, dz, 0));
} else if (isSameDirection(zAxis, new Vector(0, 1, 0))) {
F = 5;
xAxis = new Vector(1, 0, 0);
setTranslation(new Vector(0, dz, -dy));
leftHand = true;
} else {
error(localize("Tool orientation is not supported.")); //#&
return;
}
var yAxis = leftHand ? Vector.cross(xAxis, zAxis) : Vector.cross(zAxis, xAxis);
var O = new Matrix(xAxis, yAxis, zAxis);
var R = O.getTransposed().multiply(W);
setRotation(R);
gotRapid = undefined;
linkingSkipped = false;
var compensationType = hasParameter("operation:compensationType") ? getParameter("operation:compensationType") : "computer"; //#&
useLeads = compensationType == "computer"; //#&
firstRapid = true;
if (hasParameter("operation-strategy") && (getParameter("operation-strategy") == "drill")) { //#&
// skip positioning
} else if (useLeads) {
var initialPosition = getFramePosition(currentSection.getInitialPosition());
if ((tool.number) >= 66) {
radiusCompensationTable.reset();
if (hasParameter("operation-strategy") && (getParameter("operation-strategy") == "contour2d")) { //#&
//writeBlock("XGIN Q=1 G=" + gValue);
xginActive = true;
}
writeBlock(
"XG0",
xOutput.format(initialPosition.x),
yOutput.format(initialPosition.y),
zOutput.format(initialPosition.z),
conditional(insertToolCall, formatTool(tool)),
/* "S=" + rpmFormat.format(tool.spindleRPM), */
radiusCompensationTable.lookup(radiusCompensation),
"F=" + F,
"E=1"
);
firstRapid = false;
}
}
feedOutput.reset();
}
function onRapid(_x, _y, _z) {
if (hasParameter("operation-strategy") && (getParameter("operation-strategy") == "drill")) { //#&
return; // skip move
}
if (!properties.useXG0) { // use this to use high feed moves
onLinear(_x, _y, _z, highFeedrate);
return;
}
if (radiusCompensation != RADIUS_COMPENSATION_OFF) {
error(localize("Radius compensation is not allowed for rapid moves.")); //#&
return;
}
gotRapid = [_x, _y, _z];
/*
var x = xOutput.format(_x);
var y = yOutput.format(_y);
var z = zOutput.format(_z);
if (x || y || z) {
radiusCompensationTable.reset();
writeBlock(
"XG0",
x,
y,
z,
formatTool(tool),
// "S=" + rpmFormat.format(tool.spindleRPM), // not required
radiusCompensationTable.lookup(useLeads ? RADIUS_COMPENSATION_OFF : radiusCompensation),
"F=" + F,
"E=1"
);
feedOutput.reset();
}
*/
}
function flushRapid() {
if (!gotRapid) {
return;
}
linkingSkipped = false;
forceXYZ();
var x = xOutput.format(gotRapid[0]);
var y = yOutput.format(gotRapid[1]);
var z = zOutput.format(gotRapid[2]);
if (x || y || z) {
radiusCompensationTable.reset();
//condição para colocar o XGIN, só acontece para operações contour 2d e com compensação do raio da ferramenta
if (hasParameter("operation-strategy") && (getParameter("operation-strategy") == "contour2d") && radiusCompensation) { //#&
if(tool.number == 80 || tool.number == 81 || tool.number == 90 || tool.number == 91) {
} else {
//writeBlock("XGIN Q=1 G=" + gValue);
xginActive = true;
}
}
writeBlock(
"XG0",
x,
y,
z,
conditional(insertToolCall, formatTool(tool)),
//conditional(firstRapid, "S=" + rpmFormat.format(tool.spindleRPM)), // only for first
radiusCompensationTable.lookup(useLeads ? RADIUS_COMPENSATION_OFF : radiusCompensation),
"F=" + F,
"E=1"
);
firstRapid = false;
feedOutput.reset();
}
gotRapid = undefined;
//condição para não chamar novamente a ferramenta em instruções dentro da mesma secção.
insertToolCall = false;
}
function getFeed(feed) {
if (feed > 100) {
return feedOutput.format(feed); // m/min
} else {
return feedOutput.format(Math.max(feed, 100)); // mm/min
}
}
var radiusCompensationTable = new Table(
["C=0", "C=2", "C=1"],
{initial:RADIUS_COMPENSATION_OFF},
"Invalid radius compensation"
);
function onRadiusCompensation() {
//condição para colocar o XGOUT
switch(radiusCompensation) {
case RADIUS_COMPENSATION_OFF:
if (xginActive) {
//writeBlock("XGOUT Q=1 G=" + gValue);
//writeBlock(";");
xginActive = false;
}
}
}
function onLinear(_x, _y, _z, feed) {
if (!useLeads) {
switch (movement) {
case MOVEMENT_CUTTING:
case MOVEMENT_FINISH_CUTTING:
case MOVEMENT_RAMP:
break;
default:
if (!linkingSkipped) {
linkingSkipped = true;
writeComment("Linking skipped");
}
gotRapid = [_x, _y, _z]; // new XG0 position
return; // skip linking
}
}
flushRapid(); // use radius compensation for cutting
linkingSkipped = false;
var x = xOutput.format(_x);
var y = yOutput.format(_y);
var z = zOutput.format(_z);
if (x || y || z) {
writeBlock("XL2P", x, y, z, getFeed(feed), conditional(F != 1, "F=" + F));
//writeBlock("XL2P", x, y, z, conditional(F != 1, "F=" + F));
}
}
function onCircular(clockwise, cx, cy, cz, x, y, z, feed) {
if (!useLeads) {
switch (movement) {
case MOVEMENT_CUTTING:
case MOVEMENT_FINISH_CUTTING:
case MOVEMENT_RAMP:
break;
default:
if (!linkingSkipped) {
linkingSkipped = true;
writeComment("Linking skipped");
}
gotRapid = [x, y, z]; // new XG0 position
return; // skip linking
}
}
flushRapid(); // use radius compensation for cutting
if (isHelical() || (getCircularPlane() != PLANE_XY)) {
var t = tolerance;
if ((t == 0) && hasParameter("operation:tolerance")) { //#&
t = getParameter("operation:tolerance"); //#&
}
linearize(t);
return;
}
xOutput.reset();
yOutput.reset();
//zOutput.reset();
var flip = (F == 2) || (F == 5);
linkingSkipped = false;
//writeBlock("XA2P", "G=" + ((clockwise ^ flip) ? 2 : 3), xOutput.format(x), yOutput.format(y), zOutput.format(z), iOutput.format(cx), jOutput.format(cy), getFeed(feed) , conditional(F != 1, "F=" + F));
writeBlock("XA2P", "G=" + ((clockwise ^ flip) ? 2 : 3), xOutput.format(x), yOutput.format(y), zOutput.format(z), iOutput.format(cx), jOutput.format(cy), conditional(F != 1, "F=" + F));
}
function onCycle() {
}
function onCyclePoint(x, y, z) {
switch (cycleType) {
case "drilling": //#&
forceXYZ();
writeBlock(
"XB",
xOutput.format(x),
yOutput.format(y),
zOutput.format(z),
formatTool(tool),
"F=" + F
);
break;
case "deep-drilling": //#&
forceXYZ();
writeBlock(
"XB",
xOutput.format(x),
yOutput.format(y),
zOutput.format(z),
formatTool(tool),
"F=" + F,
"G=" + nFormat.format(Math.ceil(cycle.depth/cycle.incrementalDepth)) // number of steps
);
break;
default:
expandCyclePoint(x, y, z);
}
}
function onCycleEnd() {
}
function onSectionEnd() {
// writeBlock("XPL", "X=" + xyzFormat.format(0), "Y=" + xyzFormat.format(0), "Z=" + xyzFormat.format(0), "Q=" + abcFormat.format(0), "R=" + abcFormat.format(0)); // reset plane
writeComment("******************************");
insertToolCall = false;
forceAny();
}
function onClose() {
// home position
//writeBlock("XN", "X=" + xyzFormat.format(0), "Y=" + xyzFormat.format(0), "Z=" + xyzFormat.format(0), "; " + localize("home"));
//writeBlock("XN X=-1000 IF=FLD=1");
//writeBlock("XN X=-4000 IF=FLD=2");
writeBlock("XN X=-2800");
}
function onTerminate() {
var OutPath = getOutputPath();
var arguments = " " + "\"" + replaceExtension(getOutputPath(), "." + extension) + "\""; //#&
var exePath = "C:\\Program Files\\Althima\\PostDecrypter\\PostDecrypter.exe"; //#&
//execute(exePath, arguments, false, ""); //#&
if (false) {
//C:\XILOG3\XISO
execute("C:\\Users\\blue\\Desktop\\Fraesprogramme\\Xilog_Plus\\Bin\\Winxiso.exe", " \"" + OutPath + "\"" + " -s", false, "");
//execute("\\\\SCM\\XILOG3\\XISO\\XISO.exe", " \"" + OutPath + "\"", false, "");
//execute("C:\\XILOG3\\PGM\\Winxiso.exe\996.xxl",false,"");
//FileSystem.remove(OutPath);
}
}
/** Alterações
Tirar a rotação e inserir a velocidade de corte
Definir o bz 26
*/
Solved! Go to Solution.
