Skip to content

Application of Logical Operators

Project Flow

1. Initialization

Select the Lua Language Script tool and create three global variables of different types for judgment.

lua
SetFloatVariable("judgeNumber", 10.000)
SetStringVariable("judgeString", "it is true")
SetBoolVariable("judgeBool", true)

2. Application of Different Logical Operators

Local Image

Jump: WARN

  1. Select the Judgment tool and set a deviation warning to make the tool's running result WARN. Select the data type for judgment as Number, and bind the Number-type global variable set by the Lua Language Script tool as the target Number.

  2. Select the Jump tool and set the jump target to the marker WARN.

  • Bind the output variable Warning value of the Judgment tool as the activation value.
  • When the running result of the previous judgment tool is WARN, the output variable Warning value is true, the activation value is true, and the jump to the corresponding target is triggered.
  1. Select the Lua Language Script tool and manually add a blank line.

  2. Select the Marker tool and set a WARN marker for the Jump tool to jump to.

Jump: OK

  1. Select the Judgment tool and set parameters to make the tool's running result OK.
  • Select the data type for judgment as String, and bind the String-type global variable set by the Lua Language Script tool as the target String.
  • Enter the string content for comparison in the Expected String, which should be the same as the value of the String-type global variable.
  1. Select the Jump tool and set the jump target to the marker OK.
  • Bind the output variable Result value of the Judgment tool as the activation value.
  • When the running result of the previous judgment tool is OK, the output variable Result value is true, the activation value is true, and the jump to the corresponding target is triggered.
  1. Select the Lua Language Script tool and manually add a blank line.

  2. Select the Marker tool and set an OK marker for the Jump tool to jump to.

Jump: NG

  1. Select the Judgment tool and set parameters to make the tool's running result NG.
  • Select the data type for judgment as Bool, and bind the Bool-type global variable set by the Lua Language Script tool as the target Bool.
  • Enter the Bool value for comparison in the Expected Bool, which should be different from the value of the Bool-type global variable.
  1. Select the Jump tool and set the jump target to the marker NG.
  • Bind the output variable Result value of the Judgment tool as the activation value.
  • Enable inverted activation.
  • When the running result of the previous judgment tool is NG, the output variable Result value is false, the activation value is false, and inverted activation is enabled to trigger the jump to the corresponding target when the activation value is false.
  1. Select the Lua Language Script tool and manually add a blank line.

  2. Select the Marker tool and set an NG marker for the Jump tool to jump to.

AI-Vision, Making 3D Measurement Easier