Hello.
There must be a way I tell if the deviations that are within a range to do something, if not, do something else. Could someone help me a little?
IF/ and END_IF/ pairs ar a good basic way to start.
They are under Insert -> Flow Control -> Control Pairs
They must be in a pair.
the IF command makes a statement and tests to see if it's true or false.
If it's true, the program continues executing each line of code.
If it's false, the program skips any lines of code until it reaches the END_IF.
Key:
Any lines of code between the IF/ and END_IF/ only get run when the IF statement is true.
Example 1:
IF/CIR1.DIA.MEAS<1.005 (English: IF the actual measured diameter of the feature CIR1 is less than 1.005, then execute the lines of code before the End_If...)
COMMENT/OPER,NO,Full Screen=NO,HOLE IS UNDERSIZED, CANCEL RUN AND SEND PART TO REWORK END_IF/
I often use these with LABEL and GOTO.
GOTO is a command to skip lines of code until a certain LABEL is reached.
Example 2:
C1 =COMMENT/INPUT,YES,Full Screen=NO,'PART NUMBER:' (A simple Operator Input to instruct what part # is being run)
Easiest would be to dimension your feature and use the deviation value in the examples JEC gave to tell your program what to do. Without more info his example is about the best we can do.
JEC_31's example 1 tells you how. Change the MEAS to DEV or other feature properties to achieve the data. Run the statement/code/formula builder if you need to know what properties are available to you.