The Expression logic block allows the user to write complex logic without taking up many objects in the system. The Expression (Float Output) logic blocks allow the user to define a block with multiple inputs and write an equation that results in a float value.
Note: If you include Boolean or Enum inputs in an expression, the expression cannot result in a float output. To create a float output result, use only float inputs in the expression.
| Name | Data Type | Exposed for Connection by Default | Description | Default Value |
|---|---|---|---|---|
| Inputs | ||||
| Input | Float | Yes | 0.0 | |
| Outputs | ||||
| Present Value 1 | Float | Yes | Indicates the output of the block. | 0.0 |
| Properties | ||||
| Expression | Boolean, Enum, Float | N/A | Provides an editable field for the token string used to create the expression. See Table 2 for a list of available tokens. | N/A |
| Token String | UI Tab Location | Description | Function |
|---|---|---|---|
| = | Enum, Boolean, Float | Equal | Compares two Booleans, or two float values, or two Enum values. Returns true if they are equal and false otherwise. The datatype of operand 1 must be the same as operand 2.
Note: If the absolute value of the difference between operand 1 and operand 2 is less than or equal to 0.01, they are considered equal.
|
| != | Enum, Boolean, Float | Not Equal |
Compares two Booleans, or two float values, or two Enum values. Returns true if they are not equal and false otherwise. The datatype of operand 1 must be the same as operand 2. Note: If the absolute value of the difference between operand 1 and operand 2 is less than or equal to 0.01, they are considered equal.
|
| ( | Enum, Boolean, Float | Opening Parenthesis | Prioritizes the calculation of the enclosed string. For example, (A+B)*3 evaluates A+B, then multiples the result by 3. |
| ) | Enum, Boolean, Float | Closing Parenthesis | |
| AND 2 | Enum, Boolean, Float | Logical AND | Produces the result of a Boolean AND operation on Boolean operand 1 and Boolean operand 2. |
| OR 2 | Enum, Boolean, Float | Logical OR | Produces the result of a Boolean OR operation on Boolean operand 1 and Boolean operand 2. |
| NOT | Boolean | Logical NOT | Produces the result of a Boolean NOT operation on Boolean operand 1. |
| XOR | Boolean | Logical XOR | Produces the result of a Boolean XOR operation on Boolean operand 1 and Boolean operand 2. |
| TRUE | Boolean | Boolean True | |
| FALSE | Boolean | Boolean False | |
| 0–9 | Float | Numbers 0–9 | |
| . | Float | Decimal Point | |
| + | Float | Arithmetic Plus | Produces an output from adding the value of operand 1 to operand 2. |
| / | Float | Arithmetic Divide | Produces an output by dividing the value of operand 1 by operand 2. |
| ^ | Float | Arithmetic Power | Produces an output by raising the value of operand 1 to the power of operand 2. |
| - | Float | Arithmetic Minus | Produces an output by subtracting the value of operand 2 from operand 1. |
| * | Float | Arithmetic Multiply | Produces an output from multiplying the value of operand 1 to operand 2. |
| > | Float | Greater Than | Performs a greater than comparison between two float values and returns True if operand 1 is greater than operand 2, and otherwise False. |
| <= | Float | Less Than or Equal | Compares two float values and returns True if operand 1 is less than or equal to operand 2, and otherwise False.
Note: If the absolute value of the difference between operand 1 and operand 2 is less than or equal to 0.01, they are considered equal.
|
| < | Float | Less Than | Compares two float values and returns True if operand 1 is less than operand 2 and False otherwise. |
| >= | Float | Greater Than or Equal | Compares two float values and returns True if operand 1 is greater than or equal to operand 2, and otherwise False.
Note: If the absolute value of the difference between operand 1 and operand 2 is less than or equal to 0.01, they are considered equal.
|
| COS | Float | Cosine Function | Produces COS of operand 1 expressed in radians. |
| SIN | Float | Sine Function | Produces SIN of operand 1 expressed in radians. |
| TAN | Float | Tangent Function | Produces TAN of operand 1 expressed in radians. |
| ACOS | Float | Arc Cosine Function | Produces ARC COS of operand 1 expressed in radians. |
| ASIN | Float | Arc Sine Function | Produces ARC SIN of operand 1 expressed in radians. |
| ATAN | Float | Arc Tangent Function | Produces ARC TAN of operand 1 expressed in radians. |
| SQRT | Float | Square Root Function | Returns the square root of operand 1. |
| ABS | Float | Absolute Function | Returns the absolute value of operand 1. |
| LOG | Float | Natural Logarithm Function | Returns the natural logarithm of operand 1. |
| LOG10 | Float | Logarithm Base 10 Function | Returns the logarithm base 10 of operand 1. |
| EXP | Float | Exponential Function | Returns the exponential value of operand 1. |
| DEL | Enum, Boolean, Float | Delete Token | |
| CLEAR | Enum, Boolean, Float | Clear Expression |
Figure 1. Boolean Logic

The preceding figure may result from one of the following three expressions:
I1 AND I2 AND NOT I3
I1 = TRUE AND I2 = TRUE AND I3 != TRUE
I1 = TRUE AND I2 = TRUE AND I3 = FALSE
Figure 2. Enumeration and Boolean Logic

The preceding figure may result from the following expression:
I1 != On AND I2
1 This input or output is the Default Element of the block.
2 This token string applies to Boolean input types only.