Boolean

Boolean functions take input data, apply logic processing to that data, and produce a single output with a value of true or false.

Note that there are two exceptions:

Boolean input pins are always evaluated in the same order. For a 2-pin input, the top pin goes to the left of the expression and the bottom pin goes to the right of the expression.

Examples:

[Top Pin] AND [Bottom Pin]
[Top Pin] OR [Bottom Pin]
[Top Pin] > [Bottom Pin]
[Top Pin] ≤ [Bottom Pin]

Boolean operations with multiple input pins are evaluated from top to bottom (pin order), and from left to right (expression order).

Examples:

[Pin 0 (Top Pin)] AND [Pin 1] AND [Pin 2]    
[Pin 0 (Top Pin)] OR [Pin 1] OR [Pin 2] OR [Pin 3]

<

The < component checks to see if the value of the first Mixed pin is less than the value of the second Mixed pin. If it is, a value of true is forwarded to the output pin. If not, a value of false is forwarded to the output pin.

Properties

This component has no additional properties.

Inputs

Flow

The component that acts as a trigger for this component should be connected to this pin.

Mixed

The value that falls to the left of the expression. This can be a number, date time, or time period, but must be of the same data type as the right pin. This input is required. Not connecting this pin will produce an error.

Mixed 

The value that falls to the right of the expression. This can be a number, date time, or time period, but must be of the same data type as the left pin. This input is required. Not connecting this pin will produce an error.

Outputs

Boolean

A true or false value. Not connecting this pin will produce a warning.

Example

In the following example, the < component checks to see if the temperature is less than 28. If it is, an event is raised and the state of the entity changes to Below. Otherwise, an event is raised and the state of the entity changes to Normal.

=

The = component checks to see if the value of the first Mixed or Text pin is equal to the value of the second Mixed or Text pin. If it is, a value of true is forwarded to the output pin. If not, a value of false is forwarded to the output pin.

Text:

Boolean:

Properties

Case sensitive comparison

This check box, if selected, allows strings to be compared on the basis of upper and lower-case letters. For example, String will be considered as being different to string. This only applies to the Text category.

Inputs

Flow 

The component that acts as a trigger for this component should be connected to this pin.

Mixed 

A value for comparison. For mixed data types, both of the inputs must be of the same data type (e.g. numbers, date times, Booleans, or time periods). This input is required. Not connecting this pin will produce an error.

Text

Text values for comparison. Case sensitivity is determined by the component properties. This input is required. Not connecting this pin will produce an error.

Outputs

Boolean 

A true or false value. Not connecting this pin will produce a warning.

Example

In the following example, the = component checks to see if the temperature is equal to 28. If it is, an event is raised and the state of the entity changes to Normal. Otherwise, an event is raised and the state of the entity changes to Warning.

The component checks to see if the value of the first Mixed or Text pin is not equal to the value of the second Mixed or Text pin. If it is not equal, a value of true is forwarded to the output pin. Otherwise, a value of false is forwarded to the output pin.

Text:

Boolean:

Properties

Case sensitive comparison

This check box, if selected, allows strings to be compared on the basis of upper and lower-case letters. For example, String will be considered as being different to string. This only applies to the Text category.

Inputs

Flow 

The component that acts as a trigger for this component should be connected to this pin.

Mixed 

A value for comparison. For mixed data types, both of the inputs must be of the same data type (e.g. numbers, date times, Booleans, or time periods). This input is required. Not connecting this pin will produce an error.

Text 

Text values for comparison. Case sensitivity is determined by the component properties. This input is required. Not connecting this pin will produce an error.

Outputs

Boolean 

A true or false value. Not connecting this pin will produce a warning.

Example

In the following example, the component checks to see if the temperature is not equal to 28. If it is, an event is raised and the state of the entity changes to Warning. Otherwise, an event is raised and the state of the entity changes to Normal.

>

The > component checks to see if the value of the first Mixed pin is greater than the value of the second Mixed pin. If it is, a value of true is forwarded to the output pin. If not, a value of false is forwarded to the output pin.

Properties

This component has no additional properties.

Inputs

Flow 

The component that acts as a trigger for this component should be connected to this pin.

Mixed 

The value that falls to the left of the expression. This can be a number, date time, or time period, but must be of the same data type as the right pin. This input is required. Not connecting this pin will produce an error.

Mixed 

The value that falls to the right of the expression. This can be a number, date time, or time period, but must be of the same data type as the left pin. This input is required. Not connecting this pin will produce an error.

Outputs

Boolean 

A true or false value. Not connecting this pin will produce a warning.

Example

In the following example, the > component checks to see if the temperature is greater than the maximum allowed, and raises an event and changes the state of the entity to Above or Below as required.

The component checks to see if the value of the first Mixed pin is less than or equal to the value of the second Mixed pin. If it is, a value of true is forwarded to the output pin. If not, a value of false is forwarded to the output pin.

Properties

This component has no additional properties.

Inputs

Flow 

The component that acts as a trigger for this component should be connected to this pin.

Mixed 

The value that falls to the left of the expression. This can be a number, date time, or time period, but must be of the same data type as the right pin. This input is required. Not connecting this pin will produce an error.

Mixed 

The value that falls to the right of the expression. This can be a number, date time, or time period, but must be of the same data type as the left pin. This input is required. Not connecting this pin will produce an error.

Outputs

Boolean 

A true or false value. Not connecting this pin will produce a warning.

Example

In the following example, the component checks to see if the temperature is less than or equal to 28. If it is, an event is raised and the state of the entity changes to Warning. Otherwise, an event is raised and the state of the entity changes to Normal.

The component checks to see if the value of the first Mixed pin is greater than or equal to the value of the second Mixed pin. If it is, a value of true is forwarded to the output pin. If not, a value of false is forwarded to the output pin.

Properties

This component has no additional properties.

Inputs

Flow 

The component that acts as a trigger for this component should be connected to this pin.

Mixed 

The value that falls to the left of the expression. This can be a number, date time, or time period, but must be of the same data type as the right pin. This input is required. Not connecting this pin will produce an error.

Mixed 

The value that falls to the right of the expression. This can be a number, date time, or time period, but must be of the same data type as the left pin. This input is required. Not connecting this pin will produce an error.

Outputs

Boolean 

A true or false value. Not connecting this pin will produce a warning.

Example

In the following example, the component checks to see if the temperature is greater than or equal to 28. If it is, an event is raised and the state of the entity changes to Warning. Otherwise, an event is raised and the state of the entity changes to Normal.

AND

The AND component performs a logical conjunction operation, which evaluates to true if all inputs are true; otherwise it evaluates to false.

Properties

Num Inputs

The number of input pins for this component. You can specify up to 8 inputs.

Inputs

Flow 

The component that acts as a trigger for this component should be connected to this pin.

Boolean 

A true or false value. If all inputs are true, then a value of true is sent to the output pin. This input is required. Not connecting this pin will produce an error.

Outputs

Boolean 

True if and only if all inputs are true, otherwise this will be false. Not connecting this pin will produce a warning.

Example

In the following example, the AND component evaluates two Boolean inputs to determine a true or false value.

Binary Combiner

The Binary Combiner component accepts two or more Boolean inputs. The inputs are converted to binary format and are combined to output an integer that is represented by a binary number. This component serves to simplify complicated Boolean comparisons.

If the value passed to the pin is true, the pin number is added to a total. The sum of those numbers are passed to the output pin.

Example:

128 64 32 16 8 4 2 1
F F F F T T F T
0 0 0 0 8 4 0 1

Total: 13

Properties

Num Inputs

The number of input pins for this component. You can specify up to 8 inputs. Each pin is labelled with its binary position value.

Inputs

Flow 

The component that acts as a trigger for this component should be connected to this pin.

1, 2, etc 

A true or false value. Each pin is labelled with its binary position. The sum of the pin numbers that receive a true value is sent to the output pin. This input is required. Not connecting this pin will produce an error.

Outputs

Number

The sum of the pin numbers that receive a true value. For example, if the pins labelled 1, 4, and 8 are true, the resultant number would be 13. Not connecting this pin will produce a warning.

Example

In the following example, the results of the chloride, oxygen, and temperature checks are combined in the Binary Combiner and the resulting output is sent to a Selector. The Selector component directs the output to another component, which determines if the output is to be logged or if an error is to be thrown.

Note that if using a Selector with a Binary Combiner, if the number produced by the Binary Combiner does not match one of the selector output pins, an error is generated and the process aborts.

Boolean Selector

The Boolean Selector uses the Boolean input to determine which value to send to the output pin. If the Boolean value is true, the value of the T pin is sent to the output; otherwise the value of the F pin is sent to the output.

Properties

This component has no additional properties.

Inputs

Flow 

The component that acts as a trigger for this component should be connected to this pin.

Boolean 

A true or false value. This is used to determine the value to send to the output pin.

The value that is sent to the output pin. If the Boolean input is true, the value of this pin is sent to the output. This input is required. Not connecting this pin will produce an error.

The value that is sent to the output pin. If the Boolean input is false, the value of this pin is sent to the output. This input is required. Not connecting this pin will produce an error.

Outputs

Mixed 

The value as determined by the Boolean pin. If the Boolean input is true, the value of the T pin is sent to the output. Not connecting this pin will produce a warning.

Example

In the following example, if the temperature is less than 10, the Boolean Selector outputs a value of 12. This value is then checked to see if it is less than 25, and an event is raised accordingly.

False

The False component outputs a value of false.

Properties

This component has no additional properties.

Inputs

Flow 

The component that acts as a trigger for this component should be connected to this pin.

Outputs

Boolean 

A value of false. Not connecting this pin will produce a warning.

NOT

The NOT component performs a logical complement operation, which evaluates to true if the input is false, and evaluates to false if the input is true.

Properties

This component has no additional properties.

Inputs

Flow 

The component that acts as a trigger for this component should be connected to this pin.

Boolean 

A true or false value. If the input is true, then a value of false is sent to the output pin.

Outputs

Boolean 

True if the input is false, and false if the input is true. Not connecting this pin will produce a warning.

OR

The OR component performs a logical disjunction operation, which evaluates to true if one or more inputs are true; otherwise it evaluates to false.

Properties

Num Inputs

The number of input pins for this component. You can specify up to 8 inputs.

Inputs

Flow 

The component that acts as a trigger for this component should be connected to this pin.

Boolean 

A true or false value. If one or more inputs are true, then a value of true is sent to the output pin. This input is required. Not connecting these pins will produce an error.

Outputs

Boolean 

True if any of the inputs are true, otherwise this will be false. Not connecting this pin will produce a warning.

True

The True component outputs a value of true.

Properties

This component has no additional properties.

Inputs

Flow 

The component that acts as a trigger for this component should be connected to this pin.

Outputs

Boolean 

A value of true. Not connecting this pin will produce a warning.

Example

In the following example, the outputs of the Boolean Splitter are flow pins, which mean that they do not pass a value. However, attaching the True component means that a value of true can be passed to the next component.

XOR

The XOR component performs a logical exclusive disjunction operation, which evaluates to true if one, and only one, of the inputs are true; otherwise it evaluates to false.

Properties

This component has no additional properties.

Inputs

Flow 

The component that acts as a trigger for this component should be connected to this pin.

Boolean 

A true or false value. If one and only one input is true, then a value of true is sent to the output pin. This input is required. Not connecting these pins will produce an error.

Outputs

Boolean 

True if only one of the inputs are true, otherwise this will be false. Not connecting this pin will produce a warning.

Related: Sentinel Studio PrimersCreating a User Process, Usage Examples

 

Comments are closed