A Tolerance Guard

Set a status flag from an in/out-of-tolerance decision covering both directions.

A macro that measures should also be able to judge. Rather than halting the machine, a robust check writes a status flag into an R-parameter — 1 for good, 0 for out — that the rest of the program can act on. ABS() gives the magnitude, so a single test catches a deviation in either direction.

Read firstReading & Writing System Variables (Every Control)The cross-control concept: how a part program reads and writes the control's internal data — positions, offsets, tool data, probe results, modal state — in Fanuc, Haas, Mitsubishi, Mazak, Siemens, Heidenhain, and Okuma dialects, with a Rosetta-stone syntax table.

Your turn

A measured deviation is waiting in R1. If its magnitude is within 0.05 (in either direction), set the status R10 to 1 for a good part; otherwise set R10 to 0.

The machine gives you

0.02 over — inside tolerance:R1 = 0.02
0.08 over — out of tolerance:R1 = 0.08
0.08 under — out of tolerance the other way:R1 = -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.