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.
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.020.04 under — still inside tolerance:
Q1 = -0.040.08 over — out of tolerance:
Q1 = 0.080.08 under — out of tolerance the other way:
Q1 = -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.