Conditional statements, Test conditions, Actions – HEIDENHAIN IK 5293 User Manual
Page 331

Quadra-Chek
®
5000
317
Conditional Statements
Conditional statements can be a handy way to handle many inspection tasks.
For example, if a feature fails to meet specifications a conditional statement
can stop the inspection or require a second inspection. A conditional state-
ment can also check that a feature is within a tolerance by using arithmetical
operators (more on this later).
The two basic elements of a conditional statement are the test condition and
the action. Essentially conditional statements check the test condition and
then do something if the test condition is true and something else if it is
false.
Test Conditions
Test conditions are the inspected feature of the part and any arithmetical
operations required by the user. If that seems a bit complex take a look at the
conditional statement below.
In this example, ‘If Input_1 > 5mm’ is the test condition. ‘Input_1’ is the
inspected feature and ‘> 5mm’ is the arithmetical operation. If you were to
read the test condition out loud it would be: If Input_1 is greater than
5mm. This is the test condition. All that is needed now is an action.
Actions
Actions are any steps to be carried out by the program or a labeled line. If-
Then statements carry out the steps described and If-Goto statements skip
to the labeled line. Both types are shown below.
In this example, ‘Measure_1’ is the action.
The types of conditional statements used in QC5000 programs are: If-Goto,
If-Then, Else, and Else-If. Else and Else-If statements can only be used with
an If-Then statement for example: If-Then Else or If-Then Else-If.