Heidenhain tool length zero

Heidenhain tool length zero

nubrandao
Collaborator Collaborator
1,112 Views
6 Replies
Message 1 of 7

Heidenhain tool length zero

nubrandao
Collaborator
Collaborator

Hi, it seems that Heidenhain can have a command before running toolpath, were can the machine checks the tool length of the toolpath and and if tool table has a different value, have an error?

 

For example, the toolpath required a tool with 100mm, but in the tool table has 95mm

 

Stops the machine

 

Does anyone have a post processor in Heidenhain or can share the code to had my post processor?

0 Likes
Accepted solutions (1)
1,113 Views
6 Replies
Replies (6)
Message 2 of 7

a.laasW8M6T
Mentor
Mentor

So you should be able to compare the Gauge length in fusion to the Tool length value from the Tool table in Heidenhain, this wont tell you if the stickout is correct though because Heidenhain doesn't know this, so the holder must match in fusion and on the machine.

 

FN 18: SYSREAD Q10= ID50 NR1 IDX1

 

Where IDX is the tool number in the tool table

alaasW8M6T_0-1729980079564.png

 

You can add this function to the program header to loop through the tools at the start of the program and check that the lengths are longer than in fusion

 

 

 

 

 

 

 

 if(true){//tool length check
    writeSeparator();
    writeComment("CHECK TOOL LENGTHS")
    var tools = getToolTable();
      if (tools.getNumberOfTools() > 0) {
        for (var i = 0; i < tools.getNumberOfTools(); ++i) {
          var tool = tools.getTool(i);
        if(tool.type == TOOL_PROBE){
          continue
        }
        writeBlock("FN 18: Q10 = SYSREAD ID50 NR1 IDX" + tool.number);
        writeBlock("FN 12: IF +Q10 LT " + xyzFormat.format(tool.holderLength + tool.bodyLength) + " GOTO LBL 10")
        
      }

    }
  }

 

 

 

 

 

 

Where Q10 is the variable to store the tool length in

At the end of the program you would Put  LBL 10, or whatever you want the label number to be for the error message.

 

You can print to the screen the error message with the tool number but this needs to be done by setting up a file on the TNC that has the output format, you can find info on how to do this on page 395 here:

https://content.heidenhain.de/doku/tnc_guide/pdf_files/TNC640/34059x-08/bhb/892903-26.pdf 

 

it would look something like this

 

 

 

 

 

writeBlock("LBL 10");
  writeBlock("FN 16: F-PRINT TNC:\MASK\MASK1.A/SCLR:")
  writeBlock("LBL 0");
}

 

 

 

 

 

 

Where MASK1.A is the name of the file containing the formatting.

 

See attached post

 

This was based of the info in the NYCNC video here:

https://www.youtube.com/watch?v=Rnx097pD51I

 

 

Andrew Laas
Senior Machinist, Scott Automation


EESignature

0 Likes
Message 3 of 7

a.laasW8M6T
Mentor
Mentor
Accepted solution

I should point out that this method only works if the holder has no segments above the Gauge line.

 


There is a gauge length parameter that gets output by Fusion but its harder to access in the loop than the the simple 

tool.holderLength + tool.bodyLength because the  parameter

 

operation:tool_holderGaugeLength

is associated with the operation, not the tool.

 

 
If you wanted to check the tool length at each tool change  rather than at the top of the program this is easy though

Andrew Laas
Senior Machinist, Scott Automation


EESignature

0 Likes
Message 4 of 7

nubrandao
Collaborator
Collaborator

I will try thanks very much 

0 Likes
Message 5 of 7

nubrandao
Collaborator
Collaborator

nubrandao_0-1730020257857.png

with this post processor, this means if the tool gauge is less or more? when is going to fail?

 

for example, of i design the tool with 240.1, i want it to fail if the tool in table of the machine has only 240 or less

 

what about the msk file? how can i get it? can i just copy from the one is used for probing?

0 Likes
Message 6 of 7

a.laasW8M6T
Mentor
Mentor

Hi

 

FN 12: is a less than function(Page 387 in the manual)

alaasW8M6T_0-1730061358736.png

so the expression will jump to LBL 10 if the value in Q10 is less than the length from Fusion.

If you want to have it only fail when the tool is more than 0.1mm less than what it is in fusion you can modify the function like here:

writeBlock("FN 12: IF +Q10 LT " + xyzFormat.format(tool.holderLength + tool.bodyLength -0.1) + " GOTO LBL 10")

 

For the mask file you can create your own directly on the controller.

just type the name and then .A at the end to create a text file.

 

you could create one called TOOL-LENGTH-MESSSAGE.A

 

its contents would look like something like  this:

"TOOL %9.3F", Q11 IS TOO SHORT";

The information is all there on how to do this in the Heidenhain Manual

 

You would need to add a bit to the loop to store the current tool number in Q11(or whatever variable you want to use)

alaasW8M6T_1-1730062671958.png

 

see updated post attached

 

 

I've just picked arbitrary Q variables and label number, you will need to make sure that these aren't used anywhere else by the controller, you may consider using a Higher LBL number than 10 as potentially if you had a lot of different WCS in a program fusion could also use LBL 10 for the Datum call.

Maybe better to use like LBL 200 or something

 

 

Andrew Laas
Senior Machinist, Scott Automation


EESignature

0 Likes
Message 7 of 7

nubrandao
Collaborator
Collaborator

thank you very much for your help

0 Likes