Expression Usage Examples

Perform Judgement by Combining Unit Judgement Results

Example 2: Perform judgement by combining the judgement results of unit 0 and unit 1
If a judgement of OK for both unit 0 and unit 1 is achieved, a judgement of OK for the calculation will be achieved.
Calculation example of using the judgement results of units 0 and 1
Step1: The sum of the judgement results (U0.JG, U1.JG) for unit 0 and unit 1 is set up in the expression.
The sum of adding the judgement value (1: OK/-1: NG) based on the unit 0 judgement conditions and the judgement value (1: OK/-1: NG) based on the unit 1 judgement conditions is displayed in "Result".
Step2: The calculation result of step 1 is judged based on judgement upper and lower limits.
When "2" is specified for both the judgement upper and lower limits, the calculation judgement of OK is achieved when both units 0 and 1 are judged as OK.
Judgement results of unit 0
(Judgement value)
Judgement results of unit 1
(Judgement value)
Calculation result
(Summation results of judgement values for units 0 and 1)
Judgement result of expression
OK (1)
OK (1)
2
OK
NG (-1)
OK (1)
0
NG
OK (1)
NG (-1)
0
NG
NG (-1)
NG (-1)
-2
NG

Using Values of Other Expressions

Up to 8 expressions can be set in one single unit.
The value of other expressions set within the same unit can also be used.
Since expression results obtained by the expression are displayed as DO0 to DO7 and judgement results of expression are displayed as J00 to J07, this is set up using "unit number calculation results", or "U3.DO0" (results of expression 0 set up for processing item [Calculation] of unit number "3").
For the following scene settings
Sample scene
Example1: Calculate the reference position distance and measurement results distance for the edge position and output the difference between the two.
Illustration of measurement example using values from other expressions
Set up expressions in the following manner.
  • Calculation 0: DIST (U1.SX,U1.SY,U2.SX,U2.SY)
    This equation is used to calculate the distance between the reference positions of Unit 1 and Unit 2.
    The function "DIST" calculates the distance between two points.
  • Calculation 1: DIST (U1.X,U1.Y,U2.X,U2.Y)
    This equation is used to calculate the distance between the measurement positions of unit 1 and unit 2.
    The function "DIST" calculates the distance between two points.
  • Calculation 2: U3.DO1-U3.DO0
    (Unit 3: Calculation [Calculation 1] - Unit 3: Calculation [Calculation 0])
    This equation is used to calculate the difference between results of Calculation 1 and Calculation 0 in unit 3 (in this example, Operation).
Note
Calculating Order of Expressions
  • Equations that use the calculation results of other expressions must be set up with an expression number that is higher than that of the substituted expression.If it is set up with a number smaller than the number of the substituted expression, previous calculation results of the substituted expression will be inserted.
Calculating Order of Expressions
Illustration of Calculating Order of Expressions

Counting Number of Measurements

Example of counting the number of measurements
The number of measurements is counted by adding "1" to each calculation number 0.
Note
  • When calculation results are cleared or the power is turned off, U3.DO0 will return to "0" and the number of measurements will also be reset.