Skip to content

Compare Value

Overview

The Compare Value node evaluates a primary input against a comparison value and outputs a boolean result. It supports static values or dynamic comparison through a second input port.

Use Compare Value when:

  • Triggering an event based on a threshold (e.g., number of defects > 0).
  • Checking if a status string matches a specific value.

💡 Tip

This node can also compare text inputs using the == (equals) and != (does not equal) operators. The input port type will automatically adjust based on the connected signal.

Inputs

NameTypeDescription
inputnumber or stringThe primary value to be compared.
compare_tonumber or stringOptional second value for comparison (enabled via Enable compare input).

Outputs

NameTypeDescription
outputboolThe boolean result of the comparison.

Parameters

ParameterDefaultValid valuesTunable
Comparison value0.0number/string
Operator====, !=, <, >, <=, >=
Enable compare inputfalsebool

Comparison value

The static value used for comparison when Compare input is disabled.

Operator

The mathematical or logical rule applied to the inputs.

Enable compare input

When enabled, the node adds a compare_to input port and ignores the static Comparison value.

Example

Overweight Product Detection

A packaging system uses a Compare Value node to ensure that a product does not exceed the maximum allowable weight.

Configuration:

  • Comparison value: 10
  • Operator: >
  • Enable compare input: false

Result: The measured product weights 12 kg. Since 12 > 10, the output is true, indicating that the product exceeds the weight limit and should be rejected.

Reference:

  • Condition — routes flow based on a boolean value
  • Division — performs mathematical division
  • Sum — adds multiple numeric inputs together