Post outputting redundant info.

r_snedden
Explorer

Post outputting redundant info.

r_snedden
Explorer
Explorer

Hi, i have very minimal experience with post processors. I am using the SCM Prisma post on the library and it is giving me redundant/extra lines of code that the program just skips and am wondering if its the post thats doing it or Inventor CAM itself. To paint a picture i am simply drilling a hole, it gives me the initial feed to clearance height with is an (XGO) command, then gives me 2 rapid movement (XL2P) lines that only dictates the tool/spindle speed and feedrate which the previous line already does, then moves to the plunge feed for the drill OP. Can anyone with expertise in this have a look at my cam file, post and program output to try narrow this down. Thanks in advance.

0 Likes
Reply
256 Views
1 Reply
Reply (1)

bob.schultz
Autodesk
Autodesk

Hello @r_snedden,

 

The post is attempting to output duplicate points, but omits the XYZ values because they do not change.  You can replace the onRapid and onLinear functions with these to get rid of the unnecessary blocks.

 

function onRapid(_x, _y, _z) {
  var x = xOutput.format(_x);
  var y = yOutput.format(_y);
  var z = zOutput.format(_z);
  if (x || y || z) {
    writeBlock(
      "XL2P",
      x, y, z,
      "T=" + toolFormat.format(tool.number),
      "S=" + rpmFormat.format(spindleSpeed),
      feedOutput.format(30000)
    );
    feedOutput.reset();
  }
}

function onLinear(_x, _y, _z, feed) {
  var x = xOutput.format(_x);
  var y = yOutput.format(_y);
  var z = zOutput.format(_z);
  if (x || y || z) {
    writeBlock("XL2P", x, y, z, feedOutput.format(feed));
  }
}

 



Bob Schultz
Sr. Post Processor Developer

0 Likes