Okuma 560V-5AX P300 tool changer modification

Okuma 560V-5AX P300 tool changer modification

info
Advocate Advocate
499 Views
8 Replies
Message 1 of 9

Okuma 560V-5AX P300 tool changer modification

info
Advocate
Advocate

I need some advice on how to modify the m6 code on the tool changer with G116.
Please find my post processor attached.

0 Likes
Accepted solutions (2)
500 Views
8 Replies
Replies (8)
Message 2 of 9

RohitMane_
Autodesk
Autodesk

Hello @info ,
Just curious, Have you tried enabling the post property called “Enable Safe Tool Change Logic”? This property allows the post to check whether the tool being called is already loaded or staged.

0 Likes
Message 3 of 9

info
Advocate
Advocate

Hello @RohitMane_ 

Yes, I've already tested it, but in my G116 I have protected connections and the tool length corrector is already active immediately after the tool change.

0 Likes
Message 4 of 9

RohitMane_
Autodesk
Autodesk

Then you need to update case COMMAND_LOAD_TOOL (Line no : 2162).
Search for case COMMAND_LOAD_TOOL in the code, and modify or replace the code below that line as shown in the example below. You can remove the commented-out section if you wish.

  case COMMAND_LOAD_TOOL:
    setSpindleLoadMonitor(false); // disable spindle load monitoring
    writeComment(tool.comment);
    var toolCall = "T" + toolFormat.format(tool.number);
    if (getProperty("preloadTool")) {
      if (getProperty("safeToolChange")) {
        writeBlock("IF [ VTLCN EQ", toolFormat.format(tool.number), "]", skipNLines(5));
        writeBlock("IF [ VTLNN EQ", toolFormat.format(tool.number), "]", skipNLines(3));
        writeBlock("IF [ VTLNN EQ 0 ]", skipNLines(2));
        writeBlock(mFormat.format(64));
        // writeToolBlock(mFormat.format(6), toolCall);
        writeBlock(gFormat.format(116), toolCall);  // new code
      } else {
      //   if (!isFirstSection()) {
      //     writeComment(toolCall);
      //     writeToolBlock(mFormat.format(6));
      //   } else {
      //     writeToolBlock(toolCall, mFormat.format(6));
      //   }
        writeBlock(gFormat.format(116), toolCall);  // new code
      }
      var preloadTool = getNextTool(tool.number != getFirstTool().number);
      if (preloadTool) {
        writeBlock("T" + toolFormat.format(preloadTool.number)); // preload next/first tool
      } else if (getProperty("safeToolChange")) {
        writeBlock(formatComment("*"));
      }
    } else {
      if (getProperty("safeToolChange")) {
        writeBlock("IF [ VTLCN EQ", toolFormat.format(tool.number), "]", skipNLines(2));
        // writeToolBlock(mFormat.format(6), toolCall);
        writeBlock(gFormat.format(116), toolCall);  // new code
        writeBlock(formatComment("*"));
      } else {
        // writeToolBlock(toolCall, mFormat.format(6));
        writeBlock(gFormat.format(116), toolCall);  // new code
      }
    }
    setProperty("showSequenceNumbers", saveShowSequenceNumbers);
    return;

  

0 Likes
Message 5 of 9

info
Advocate
Advocate

Hi @RohitMane_ ,

Thanks for the great suggestion for the change, but now if I activate the sequence number “tool change only” , it doesn't insert the numbering.

0 Likes
Message 6 of 9

RohitMane_
Autodesk
Autodesk
Accepted solution

Oh, yes, that’s correct.
Please change the function name from writeBlock to writeToolBlock only on the new code lines. Then you’ll get the sequence number on the tool change line.
before change

 writeBlock(gFormat.format(116), toolCall);  // new code

after change 

writeToolBlock(gFormat.format(116), toolCall);  // new code​
Message 7 of 9

info
Advocate
Advocate

Hi @RohitMane_ ,

Perfect, it works perfectly.
I would like to make another change.
I would like the program name written in the first line to be written between (), as if it were a comment, so that the machine tool does not read it. Then I would also like to write the date and time of the program writing before the tool list. Thank you.

0 Likes
Message 8 of 9

RohitMane_
Autodesk
Autodesk
Accepted solution

To include the program name as a comment, replace writeln with  writeComment  on line number 590.
To insert the date and time, add the following line immediately after that statement.

var d = new Date();
writeComment("Creation date: " + d.toLocaleDateString() + " " + d.toLocaleTimeString());

 

Message 9 of 9

info
Advocate
Advocate

 Hi @RohitMane_ ,

Perfect, thank you for the suggestions.
Kind regards

0 Likes