**Uses**

- Select between two different inputs to drive an output
- Compute a value
- Change units of a CAN parameter to show on a display
- General Decision logic
- Create safety interlock logic

**Block Inputs**

Physical input devices, outputs of other logic blocks, CAN Data, valve outputs, timer values, and display buttons can be selected as inputs to a logic block expression from the toolbox. These are found by selecting "Inputs" and any of the other items further down the list.

**Block Outputs**

When a Logic or computed value block is placed in the workspace an output variable is created representing the value of that block.

**Logic Block** - The output is designed to connect to a valve that expects the input value to be in units of % and scaled 0-100% so the logic block output must be in units %.

**Computed Values** - This block has no output connector, it is a user variable and can be in any unit and any value. Math expression must resolve to match the units of the Computed Value Units setting.

**Interlock Block** - Interlock blocks are a BOOLEAN, meaning its output will be either True or False. These are used as a safety interlocks in outputs or in decision making in logic blocks.

**Block Units**

In order for mathematical or logic expressions to work, the units must be correct or resolve to the correct unit type expected for that block. Here is the list of expected output units and values.

- Logic Blocks - 0% to 100%
- Computed Value Blocks - Any unit, any value
- Interlock Blocks - Boolean True or False

**Units of like kind** - Expressions can contain inputs of of like kind but in different units. For example psi and kpa. Units of like kind will be automatically converted before the expression is computed.

**Changing Units of a Computed Value** - disconnect all logic elements then type in the desired unit. Select the ? icon to see the definition of the unit to make sure it is as expected.

**Special Unit Characters** - temperature units use the degree symbol, simply typing F or C will yield Farads and Coulombs.You must insert the UNICODE degree symbol, press and hold the ALT key and type 0176 to insert the degree symbol followed by F or C for Fahrenheit or Celsius.

**Units Association** - A block will start out with units of %. To break the association **all** elements must be disconnected then reconnected with the desired units in order to break the association.

**Unit Resolution in a Formula** - Units are automatically resolved using normal math rules as the formula is computed. For example to compute miles per hour from a rotational input make sure to include units:

(Rotation/Minute x Minutes/Hour x Feet/Rotation) / Feet/Mile = Miles/Hour

**Math Expressions**

**Nesting** - Math expressions can be nested inside each other to build out a formula. Execution starts with the inner most expression. Functions are limited to what is shown in the list.

**Pivot** - If an expression grows too long horizontally right click on each block and select Pivot to arrange them vertically.

**Setting the Output** - Use the "Set To" object to assign the math expression to the output.

**Logic Expressions**

**if - else - **All logic blocks perform a if-else conditional test. Use the objects in the comparison library to create a logical expression that equates to a true/false condition. If the expression resolves to a numeric then it will not allow the expression to connect to the block.

**Force a TRUE Condition**- All logic blocks have a "if else" comparison. Use the "True" object to force execution of only one branch.

**Nesting if-else Statements** - If-else statements can be nested to create the logic needed.

## Comments

0 comments

Please sign in to leave a comment.