An In-Process Tolerance Guard

Branch on a measurement and flag a part good or scrap.

A macro that can measure should also be able to judge. Rather than quietly cutting a scrap part, this one compares a deviation against a tolerance and sets a status flag — Q180 for good, Q182 for scrap — that the rest of the program can act on.

Read firstHeidenhain TNC 640: Tables & System DataReading and writing TNC 640 tables and system data: TOOL.T, pocket, preset, datum and freely definable .TAB tables, FN 26/27/28, TABDATA, SQL statements, FN 18 SYSREAD groups, and FN 16 F-PRINT formatted output.

Your turn

A measured deviation is waiting in Q1. If its magnitude is more than 0.05 mm, mark the part scrap: Q182 = 1 and Q180 = 0. Otherwise mark it good: Q180 = 1 and Q182 = 0. It must handle a deviation in either direction.

The machine gives you

0.02 over — inside tolerance:Q1 = 0.02
0.04 under — still inside tolerance:Q1 = -0.04
0.08 over — out of tolerance:Q1 = 0.08
0.08 under — out of tolerance the other way:Q1 = -0.08

Your program is run once for each set of conditions. It has to work for all of them.

Loading...

This is a learning simulation — always prove out a program on the actual control before you cut metal.