Unnecessary code in NC after rotation pattern

Fabbunny69
Advocate

Unnecessary code in NC after rotation pattern

Fabbunny69
Advocate
Advocate

Hi,

When rotating the A Axis and repeating a pattern there is unnecessary code in the NC; in this simple job the machine does this 15 times unnecessarily.

All I need is for the tool to go to the clearance position and rotate the A Axis, is there a way of achieving this?rotation pattern.jpg

0 Likes
Reply
Accepted solutions (2)
518 Views
6 Replies
Replies (6)

boopathi.sivakumar
Autodesk
Autodesk

We always prefers to set the post in the most safest way that's the reason it retracts for any indexing changes because there may be chances the users may wrongly set the clearance height that could cause collision.

but you can modify the post to not out put the retract move if the toolpath is patterned in the following area

 Find for this line

  if (insertToolCall || newWorkOffset || newWorkPlane || forceSmoothing) {
    // stop spindle before retract during tool change
    if (insertToolCall && !isFirstSection()) {
      onCommand(COMMAND_STOP_SPINDLE);
    }
    
    // retract to safe plane
    writeRetract(Z);
    forceXYZ();

change it to like below

  if (insertToolCall || newWorkOffset || newWorkPlane || forceSmoothing) {
    // stop spindle before retract during tool change
    if (insertToolCall && !isFirstSection()) {
      onCommand(COMMAND_STOP_SPINDLE);
    }
    
    // retract to safe plane
    if (!currentSection.isPatterned()) {
      writeRetract(Z);
    } else {
      retracted = true;
    }
    forceXYZ();

Save the post and test it carefully

 


Boopathi Sivakumar
Senior Technology Consultant

boopathi.sivakumar
Autodesk
Autodesk
Accepted solution

Hi @Fabbunny69 

Ignore my previous suggestion it would cause few other problems as well, Sorry for that

You just need to change that like below

    // retract to safe plane
    if ((insertToolCall || newWorkOffset) || !currentSection.isPatterned()){
      writeRetract(Z);
    }
    
    forceXYZ();

also go and find for this line 

  onCommand(COMMAND_UNLOCK_MULTI_AXIS);
  if (!retracted) {
    writeRetract(Z);
  }

you need to change it like below

  onCommand(COMMAND_UNLOCK_MULTI_AXIS);
  if (!retracted && !currentSection.isPatterned()) {
    writeRetract(Z);
  }

Save and test it carefully


Boopathi Sivakumar
Senior Technology Consultant

Fabbunny69
Advocate
Advocate

Fantastic, thank you.

Now machine just goes to clearance position and then rotates A-Axis, no G28, no G43, no M09 etc.

Sorry didn't respond earlier I only work Tue-Fri

0 Likes

Fabbunny69
Advocate
Advocate

Hi,

I didn't spot this before but it seems now that the coolant commands are being ignored after the first tool, the first tool has M08 and M09 correct.

I also spotted when  comparing programs before and after the alterations we made above that G49 has moved from being before M01 to being after M01.

The screen shot I have attached shows updated post on the right hand side.Screenshot (63).png

0 Likes

Fabbunny69
Advocate
Advocate

PLEASE CAN SOMEBODY RESPOND TO THIS??

0 Likes

Fabbunny69
Advocate
Advocate
Accepted solution

Managed to find and insert a missing coolant call, all good now👍Screenshot (67).png

0 Likes