Nube iO - Rubix Wires: Compare Nodes

Rubix Wires: Compare Nodes


This article describes the Rubix Wires nodes that are in the Compare category. 

Compare

The `Compare` category contains nodes that provide numerical and data type comparisons with Boolean results.

Equal

This node performs an equivalency operation on the two inputs.

Input

  1. in 1 - First term to `Equal` operation.
  2. [in 2] - Second term to `Equal` operation.

Output

  1. out equal - Boolean result of equivalency comparison.
  2. out not equal - Boolean opposite of `out equal` value.

Settings

  1. Name - Name of the Node.
  2. in 2 - Second term to `Equal` operation.

Operation

'output equal' is 'true' when 'in 1' and 'in 2' are identical, otherwise 'output equal' is 'false'.  Can be used to compare boolean, numeric, and string values; it can also be used to compare 'null' values.  'output not equal' is always the boolean opposite of 'out equal'.

Greater-Than

This node performs a greater-than operation on the two numeric inputs.

Input

  1. in 1 - First input to `Greater Than` operation.
  2. [in 2] - Second input to `Greater Than` operation.

Output

  1. out > - Boolean output `true` if `in 1` is greater than `in 2`, else is `false`.
  2. out >= - Boolean output `true` if `in 1` greater than OR EQUAL to `in 2`, else is `false`.

Settings

  1. Name - Name of the node.
  2. [in 2] - Second input to `Greater Than` operation.

Operation

out >' is 'true' when 'in 1' is greater than 'in 2', otherwise 'out >' is 'false'.
'out >=' is 'true' when 'in 1' is greater than or equal to 'in 2', otherwise 'out>=' is 'false'.
Both Outputs will be 'false' if either input is undefined.

Less-Than

This node performs a less-than operation on the two inputs.

Input

  1. in 1 -First input to `Less Than` operation.
  2. [in 2] - Second input to `Less Than` operation.

Output

  1. out < - Boolean output `true` if `in 1` less than `in 2`, else `false`.
  2. out <= - Boolean output `true` if `in 1` less than OR EQUAL to `in 2`, else `false`.

Settings

  1. Name - Name of the node.
  2. in 2 - Second input to `Less Than` operation.

Operation

'out <' is 'true' when 'in 1' is less than 'in 2', otherwise 'out <' is 'false'. 'out <=' is 'true' when 'in 1' is less than or equal to 'in 2', otherwise 'out <=' is 'false'.
Both outputs will be 'false' if either input is undefined.

Between

The `Between` node compares two inputs.

Input

  1. input - Input value.
  2. [from] - Lower limit of `Between` operation.
  3. [to] - Upper limit of `Between` operation.

Output

  1. output - Boolean result of `Between` operation on input.
  2. out not - Boolean opposite of `output` value.

Settings

  1. Name - Name of the node.
  2. from - Lower limit of `Between` operation.
  3. to - Upper limit of `Between` operation.

Operation

'output' is 'true' when 'in 1' is within the numeric range between 'from' value and 'to' value (exclusive), otherwise 'output' is 'false'.  'output' will be 'false' if either input is undefined.
'out not' is always the boolean opposite of 'output'.

Hysteresis

This node performs an hysteresis operation on the input value.  Hysteresis compares `input` value to the `risingEdge` and `fallingEdge` threshold values with reference to the past `input` values.  This is most commonly used to provide a control deadband.

Input

  1. inputInput value.
  2. [risingEdge] - ON threshold value.  When `input` reaches this value, `output` will turn ON.
  3. [fallingEdge] - OFF threshold value.  When `input` reaches this value, `output` will turn OFF.

Output

  1. output - Output value.
  2. out not - Boolean opposite of `output` value.

Settings

  1. Name - Name of the node.
  2. risingEdge - ON threshold value.  When `input` reaches this value, `output` will turn ON.
  3. fallingEdge] - OFF threshold value.  When `input` reaches this value, `output` will turn OFF.

Operation

Boolean 'output' based on 'input' in relation to 'risingEdge' and 'fallingEdge' setpoints.
There are 2 cases: 'risingEdge' greater than 'fallingEdge', and 'risingEdge' less than 'fallingEdge'.
[For 'risingEdge' > 'fallingEdge'] => 'output' is 'true' when 'input' is greater than 'risingEdge'. 'output' is 'false' when 'input' is less than 'fallingEdge'.
[For 'fallingEdge' < 'fallingEdge'] => 'output' is 'false' when 'input' is greater than 'risingEdge'. 'output' is 'true' when 'input' is less than 'fallingEdge'.
In both cases, when 'input' is between 'risingEdge' and 'fallingEdge', 'output' will remain in its current state.
hysteresis.png

Type-Check

The `Type-Check` node determines the data type of the input value.  It also provides a boolean output of the comparison between the input value data type, and a configured data type check. 

Input

  1. input - Input value. 

Output

  1. output - Boolean output of the node compared to `Type to check`.
  2. isType - Outputs the data type of the `input` value.

Settings

  1. Name - Name of the node.
  2. Type to check - Data type to compare the `input` value data type with.

Operation

Output' is 'true' when 'input' type matches 'Type to check'.  'isType' outputs the data type of the 'input' value (as a string).

 
    • Related Articles

    • Rubix Wires: Data Types

      Rubix Wires has data types: Null, Boolean, Numeric, JSON, and String.  Node input and output values have data types which dictate how they are interpreted.  Although there is built in type checking and type conversion, it is always best to ensure ...
    • Rubix Wires: Latch Nodes

      This article describes the Rubix Wires nodes that are in the Latch category. Latch The `Latch` category contains value latching functionality for each data type.  Latch nodes will maintain an output value between trigger events. Any-Latch This node ...
    • Rubix Wires: Trigger Nodes

      This article describes the Rubix Wires nodes that are in the Trigger category. Trigger The `Trigger` category contains a variety of nodes that output values based on a trigger condition, or provide a trigger output. Change-Of-Value This node provides ...
    • Rubix Wires: LoRa Sensor Nodes

      This article describes the Rubix Wires nodes that are in the LoRa category.  Preparation Rubix Wires: Getting Started Guide Rubix Platform: Adding and Editing Wireless LoRa Droplet Sensors Rubix Platform: Adding and Editing Wireless Microedge Sensors ...
    • Rubix Wires: Dashboard Nodes

      This article describes the Rubix Wires nodes that are in the Dashboard category. Dashboard The `Dashboard` category contains nodes that interact with the Wires Dashboard.  The Wires Dashboard provides a way to interact with the nodes/flows built in ...