Announcements
Autodesk Community will be read-only between April 26 and April 27 as we complete essential maintenance. We will remove this banner once completed. Thanks for your understanding

minor tweaks to post processor

Anonymous
317 Views
1 Reply
Message 1 of 2

minor tweaks to post processor

Anonymous
Not applicable

i have some minor adjustments needed to my post processor for haas. this is mainly just repositioning some codes (mostly m codes) and getting everything dialed in the way we would like. i need some adjustments to the header of the program, the beginning and end up tool call ups, and how the program ends. also, I wanted to fix the fact that when i post multiple work offsets the machine homes in Z in between the work offset call ups. any help that can be offered would be greatly appreciated. i have attached a file showing how my code posts and how we would like it to post. also i have attached a copy of my .cpl file.

 

Thank you,

0 Likes
318 Views
1 Reply
Reply (1)
Message 2 of 2

KrupalVala
Autodesk
Autodesk

Hi @Anonymous ,

 

1) To get  X and Y safe retract code next to Z, Go to function onSection() { and add below codes,

 // retract to safe plane
    writeRetract(Z);
    if(isFirstSection()) {
      writeRetract(X,Y);
    }

 

And please restore/undo function writeRetract() { modification from the generic post.

 

2.) To control sequence number, add global variable

var count_ =0;​

and Please remove function writeToolBlock()  and relevant condition.

Then add below codes.

if(properties.sequenceNumberOnlyOnToolChange && !properties.showSequenceNumbers){
      count_ = count_+1;
      writeBlock("N"+count_);
      writeBlock("T" + toolFormat.format(tool.number),
      mFormat.format(6)
    );
    }else{
      writeBlock("T" + toolFormat.format(tool.number),
      mFormat.format(6)
    );
    }

 

3.) TO force G90 with initial XYZ and call coolant code,

Ignore coolant code 

  // set coolant after we have positioned at Z
  //setCoolant(tool.coolant);

& modified as shown below.

 if (!machineConfiguration.isHeadConfiguration()) {
      skipBlock = _skipBlock;
      gAbsIncModal.reset();
      writeBlock(
        gAbsIncModal.format(90),
        gMotionModal.format(0), xOutput.format(initialPosition.x), yOutput.format(initialPosition.y)
      );
      skipBlock = _skipBlock;
      writeBlock(
        gMotionModal.format(0),
        gFormat.format(43),
        zOutput.format(initialPosition.z),
        hFormat.format(lengthOffset),setCoolant(tool.coolant)
      );

 4.) To force G49 at the program start

// absolute coordinates and feed per min
  writeBlock(gMotionModal.format(00), gPlaneModal.format(17),gCycleModal.format(80),gAbsIncModal.format(90),gFormat.format(40),gFormat.format(49));

 

now save the post and test it carefully. 

Thanks,



Krupal Vala
Senior Technology Consultant - Post Processor & Machine Simulation
0 Likes