MAZAK SEQUENCE NUMBERS

MAZAK SEQUENCE NUMBERS

Anonymous
Not applicable
1,085 Views
4 Replies
Message 1 of 5

MAZAK SEQUENCE NUMBERS

Anonymous
Not applicable

I need help making some changes to my post.  I would only like the sequence number output above each new tool change.  Post attached 

0 Likes
Accepted solutions (1)
1,086 Views
4 Replies
Replies (4)
Message 2 of 5

Arun.rs
Autodesk
Autodesk
Accepted solution

HI @Anonymous 

 

Thanks for raising your concern via Forum .

 

Open post file in a 'Visual Studio Code' or 'Notepad++' to do the required modifications.

 

1. Define variable called  ' var sequenceNumberForToolChange; ' , you can define in '// collected state'

 

2. Search 'function writeBlock' , Add below condition in line number 202

if (properties.showSequenceNumbers || sequenceNumberForToolChange) {

 

3. Set the state as false for 'sequenceNumberForToolChange' in line number 217

sequenceNumberForToolChange = false;

 

Modified condition will be as below.

function writeBlock() {
  var text = formatWords(arguments);
  if (!text) {
    return;
  }
  if (properties.showSequenceNumbers || sequenceNumberForToolChange) {
    if (skipBlock && text) {
      writeWords2("/", "N" + sequenceNumber, arguments);
    } else {
      writeWords2("N" + sequenceNumber, arguments);
    }
    sequenceNumber += properties.sequenceNumberIncrement;
  } else {
    if (skipBlock && text) {
      writeWords("/", arguments);
    } else {
      writeWords(arguments);
    }
  }
  skipBlock = false;
  sequenceNumberForToolChange = false;
}

 

4. Search 'writeBlock("T" + toolFormat.format(tool.number), mFormat.format(6));'  in editor.

 

5. Write ' sequenceNumberForToolChange = true; ' before toolcall.

 

tool change.png

Regards

If my post answers your question, please click the 'Accept Solution' button. This helps everyone find answers more quickly!



Arun.RS
Senior Technology Consultant

Message 3 of 5

Anonymous
Not applicable

Thank you so much for your help works perfectly!!!!   I have another question, on the initial start of the program,  between all tool changes the machine goes to a safe position of:

G53 Z0

G53 X0 Y0 B0 C0

 

I would like to machine to go home in the only Z-axis and reposition "B & C" where necessary and eliminate the

G53 X0 Y0 B0 C0 

 

I have attached the new version of the post with the "N" number on tool change and G90 added for the "EIA" non-modal restart.

 

Capture.PNGCapture-2.PNG

 

@Arun.rs 

 

 

 

 

0 Likes
Message 4 of 5

Arun.rs
Autodesk
Autodesk

HI @Anonymous 

 

Thanks for the feedback.

 

If you don't want to output XYBC homing codes for every tool change and in program start, you can just comment it out with "//" in front of it. 

// if (insertToolCall) {
    // writeBlock(gFormat.format(53), gMotionModal.format(0), "X" + xyzFormat.format(0), "Y" + xyzFormat.format(0), "B" + xyzFormat.format(0), "C" + xyzFormat.format(0)); // retract
    //   forceABC();
    // } else {
    //   writeRetract(X, Y);
    // }

 

Save the file and test the post carefully.

 

Regards

If my post answers your question, please click the 'Accept Solution' button. This helps everyone find answers more quickly!



Arun.RS
Senior Technology Consultant

0 Likes
Message 5 of 5

Anonymous
Not applicable

@Arun.rs  this works but the problem is if you transitioning from an operation where C or B was not at 0 deg, nothing forces it back on the next operation to proper B C location.  I have attached a file, for example, after drill, the holes nothings reset B C going to tool 5

0 Likes