cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Updates for Siemens 840d

Updates for Siemens 840d

Dear Sir/Madam,

I'm submitting suggestions for post processor Siemens 840d. Most of this can be implemented via simple modification of post processor. Maybe following modifications would be interesting for others.

 

1.) Cycle832

This cycle is currently using fixed values. This is somehow acceptable for older controllers. New controllers can control this cycle much more efficiently. Maybe it is time for update?

 

Following code changes cycle832 parameters based on stock to leave. I'm sure your programmers can optimize next few lines for better efficiency. This cycle greatly improves motion smoothness.

 

if (properties.useCycle832) {
    if (hasParameter("operation-strategy") && (getParameter("operation-strategy") == "drill")) {
    writeBlock("CYCLE832()");
    } else if (hasParameter("operation:tolerance")) {
    var tolerance = Math.max(getParameter("operation:tolerance"), 0);
    if (tolerance > 0) {
        var workMode = 0;
        //Thresholds
        var stockToLeaveThresholdFinish = toPreciseUnit(0.05, MM);  //Finishing
        var stockToLeaveThresholdRoughing = toPreciseUnit(0.1, MM); //Roughing
        //Stocks from Operation
        var stockToLeave = (hasParameter("operation:stockToLeave")) ? getParameter("operation:stockToLeave") : 0;
        var verticalStockToLeave = (hasParameter("operation:verticalStockToLeave")) ? getParameter("operation:verticalStockToLeave") : 0;
        var minStockValue = Math.min( stockToLeave, verticalStockToLeave ); // get smallest stock value
        //Check conditions for Finishing
        if ( minStockValue < stockToLeaveThresholdFinish ) {
        workMode = 1;
        }
        else {
        workMode = 2;
        }   
        //Check conditions for Roughing
        if ( minStockValue >= stockToLeaveThresholdRoughing ) {
        workMode = 3;
        }
    
        if (workMode) {
        writeBlock("CYCLE832(" + xyzFormat.format(tolerance) + ", " + workMode + ", 1)");
        } else {
        writeBlock("CYCLE832()");
        } 
    } else {
        writeBlock("CYCLE832()");
    }
    } else {
    writeBlock("CYCLE832()");
    }
}

 

 

2.) Program end

Program usually ends with following:

 

G0 SUPA Z0 D0
G0 SUPA X0 Y0 D0
M30

This code disables tool length and once program ends tool height is incorrectly displayed.

 

Maybe it would be safer to add D1 before M30?

 

writeBlock(gMotionModal.format(0), "D1"); // enable tool length compensation

 

 

3.) Lead in - lead out

Would it be possible to have IJK for milling (usearcturn=true) and ForceXYZ() for  lead in/out?

I am experiencing a lot of errors in end point of circle when using 2d contour and rouging passes. This would solve mentioned issue.

 

4.) Thread milling

Current code is not optimized for multi flute/row thread cutters. Is it possible to optimize this via post processor or is this problem much more complicated?

 

Thank you for reading my suggestions and best regards!

3 Comments
smilanoski
Observer

the cycle832 workaround is awesome! works fantastic on the lasertec 65 we are using. thanks for sharing.

 

Definitely need some resolution on #3! @andrea.amilo you did something similar on a Haas thread, can you point us in the right direction for the Siemens 840D controller?

 

https://forums.autodesk.com/t5/fusion-360-manufacture/invalid-i-j-k-error-on-haas-dt1/td-p/8850488

smilanoski
Observer

I modified the cycle832 to reflect the 840D controller modes of finish, semifin and rough

 

if (properties.useCycle832) {
    if (hasParameter("operation-strategy") && (getParameter("operation-strategy") == "drill")) {
    writeBlock("CYCLE832()");
    } else if (hasParameter("operation:tolerance")) {
    var tolerance = Math.max(getParameter("operation:tolerance"), 0);
    if (tolerance > 0) {
        var workMode = "0";
        //Thresholds
        var stockToLeaveThresholdFinish = toPreciseUnit(0.05MM);  //Finishing
        var stockToLeaveThresholdRoughing = toPreciseUnit(0.1MM); //Roughing
        //Stocks from Operation
        var stockToLeave = (hasParameter("operation:stockToLeave")) ? getParameter("operation:stockToLeave") : 0;
        var verticalStockToLeave = (hasParameter("operation:verticalStockToLeave")) ? getParameter("operation:verticalStockToLeave") : 0;
        var minStockValue = Math.minstockToLeaveverticalStockToLeave ); // get smallest stock value
        //Check conditions for Finishing
        if ( minStockValue < stockToLeaveThresholdFinish ) {
        workMode = "_FINISH";
        }
        else {
        workMode = "_SEMIFIN";
        }   
        //Check conditions for Roughing
        if ( minStockValue >= stockToLeaveThresholdRoughing ) {
        workMode = "_ROUGH";
        }
    
        if (workMode) {
        writeBlock("CYCLE832(" + xyzFormat.format(tolerance) + "," + workMode + ",1)");
        } else {
        writeBlock("CYCLE832()");
        } 
    } else {
        writeBlock("CYCLE832()");
    }
    } else {
    writeBlock("CYCLE832()");
    }
}
andrea.amilo
Community Manager

Dear @smilanoski ,

 

If I have understand well what you are asking me, you need to force XYZ in circular lead_in and lead_out moves.

If so, first of all I think you could add onMovement function and movementType variable to be able to identify movement type :

 

var movementType;
function onMovement(movement) {
  movementType = movement;
}

 

Then you could use it to check when you are in a lead_in or a lead_out move.

I added it at line #2261 :

 

  } else if (useArcTurn) { // IJK mode
    if (isHelical() || movementType == MOVEMENT_LEAD_IN || movementType == MOVEMENT_LEAD_OUT) {
      forceXYZ();
    }

 

Please test it carefully and let me know.

 

Can't find what you're looking for? Ask the community or share your knowledge.

Submit Idea