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