Appearance
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
| Name | Type | Description |
|---|---|---|
| input | number or string | The primary value to be compared. |
| compare_to | number or string | Optional second value for comparison (enabled via Enable compare input). |
Outputs
| Name | Type | Description |
|---|---|---|
| output | bool | The boolean result of the comparison. |
Parameters
| Parameter | Default | Valid values | Tunable |
|---|---|---|---|
| Comparison value | 0.0 | number/string | ✅ |
| Operator | == | ==, !=, <, >, <=, >= | ❌ |
| Enable compare input | false | bool | ❌ |
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.
Related links
Reference: