> ## Documentation Index
> Fetch the complete documentation index at: https://documentation.kodelabs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Routine logic blocks

> Reference guide for all logic block types available in the FDD routine builder, including read, parameter, arithmetic, conditional, timing, and alarm blocks.

Logic blocks are the building components of FDD routines. Each block performs a specific operation, and you connect them to create the detection logic for fault conditions.

## Read blocks

Read blocks bring point data into your FDD routine. Each Read block has three inputs (Name, Main/Secondary, Field) and two outputs (Status, Value).

### Configuration fields

<ParamField path="Field" type="Field">
  Click inside the `Field` input box to open a selection dialog. Available points are scoped based on the entities defined in the routine. If you do not see a required point, verify that the routine's entities include the field you need.
</ParamField>

<Frame caption="The Select Field dialog shows required fields scoped by the entities defined in the routine">
  <img src="https://mintcdn.com/kodelabs/i9tCc_I6OZNqDXAw/images/kode-os/fdd/kode-os-fdd-routine-select-field.png?fit=max&auto=format&n=i9tCc_I6OZNqDXAw&q=85&s=9f091ec30310f79dac03934dd28cd8f2" alt="Select Field dialog in the Logic tab showing a Base dropdown expanded with Required Fields listing occupied_mode and run_status as selectable options, with Cancel and Save buttons" width="816" height="551" data-path="images/kode-os/fdd/kode-os-fdd-routine-select-field.png" />
</Frame>

<ParamField path="Name" type="Field">
  A free-form input where you assign a label to the block. Use a name that matches or closely resembles the point name for easy reference during debugging and reporting.
</ParamField>

<ParamField path="Main / Secondary" type="Toggle">
  Designate whether the point is the main reference point or a supporting point. Every routine must have exactly one main Read block (set to `Main`). When an event is generated, the system uses the main point as the reference to other modules in Cloud BMS. All other Read blocks are supporting points (`Secondary`).
</ParamField>

### Point types

Each Read block type outputs a different data type.

#### String Point

Outputs the current string reading from the selected point.

<Frame>
  <img src="https://mintcdn.com/kodelabs/SxbaONoYYoMWCQfA/images/kode-os/fdd/kode-os-fdd-block-string-point.png?fit=max&auto=format&n=SxbaONoYYoMWCQfA&q=85&s=c3a2974df1b2d7985a79a377b3316049" alt="String Point block with Name, Main or Secondary, and Field inputs, and Status and Value outputs" width="1024" height="478" data-path="images/kode-os/fdd/kode-os-fdd-block-string-point.png" />
</Frame>

#### Number Point

Outputs the current number values from the selected point.

<Frame>
  <img src="https://mintcdn.com/kodelabs/SxbaONoYYoMWCQfA/images/kode-os/fdd/kode-os-fdd-block-number-point.png?fit=max&auto=format&n=SxbaONoYYoMWCQfA&q=85&s=92d1d9d3e8d5b0e9649294068db2c32a" alt="Number Point block with Name, Main or Secondary, and Field inputs, and Status and Value outputs" width="1024" height="478" data-path="images/kode-os/fdd/kode-os-fdd-block-number-point.png" />
</Frame>

#### Boolean Point

Outputs the current boolean values from the selected point.

<Frame>
  <img src="https://mintcdn.com/kodelabs/SxbaONoYYoMWCQfA/images/kode-os/fdd/kode-os-fdd-block-boolean-point.png?fit=max&auto=format&n=SxbaONoYYoMWCQfA&q=85&s=004e61bef86b05c04f11735939f3d17e" alt="Boolean Point block with Name, Main or Secondary, and Field inputs, and Status and Value outputs" width="1024" height="478" data-path="images/kode-os/fdd/kode-os-fdd-block-boolean-point.png" />
</Frame>

#### Enum Point

Outputs the current enum-mapped values from the selected point. The Field input is derived from device entities and enum mapping.

<Frame>
  <img src="https://mintcdn.com/kodelabs/SxbaONoYYoMWCQfA/images/kode-os/fdd/kode-os-fdd-block-enum-point.png?fit=max&auto=format&n=SxbaONoYYoMWCQfA&q=85&s=5a44638e02a9f1be60288ec8b1847f03" alt="Enum Point block with Name, Main or Secondary, and Field inputs, and Status and enum value outputs" width="1024" height="478" data-path="images/kode-os/fdd/kode-os-fdd-block-enum-point.png" />
</Frame>

### Read arrays

Within a device, it is possible to have two distinct fields that share the same name. In these cases, the field is appended with an identifying number, and the status of that field is an aggregate of the numbered variants. FDD identifies the array potential of these fields and allows you to select an array Read block.

For example, if a device has two compressor stages, determining whether the compressor is running requires checking both stage points. With a Read Array block, you bring in a single block instead of separate Read blocks for each stage. This simplifies the routine logic and covers all variations of multi-stage equipment within a single routine.

Array blocks have Name and Field inputs and output lists where each item represents a point in the array.

#### String Array

Outputs a list of string values from points in the array.

<Frame>
  <img src="https://mintcdn.com/kodelabs/SxbaONoYYoMWCQfA/images/kode-os/fdd/kode-os-fdd-block-string-array.png?fit=max&auto=format&n=SxbaONoYYoMWCQfA&q=85&s=6697d12d502b571d4f08724f71dea431" alt="String Array block with Name and Field inputs, and Status and Value list outputs" width="1024" height="478" data-path="images/kode-os/fdd/kode-os-fdd-block-string-array.png" />
</Frame>

#### Number Array

Outputs a list of number values from points in the array.

<Frame>
  <img src="https://mintcdn.com/kodelabs/SxbaONoYYoMWCQfA/images/kode-os/fdd/kode-os-fdd-block-number-array.png?fit=max&auto=format&n=SxbaONoYYoMWCQfA&q=85&s=cd08da2ecc7af3e70ee3ce2ae36a014a" alt="Number Array block with Name and Field inputs, and Status and Value list outputs" width="1024" height="478" data-path="images/kode-os/fdd/kode-os-fdd-block-number-array.png" />
</Frame>

#### Boolean Array

Outputs a list of boolean values from points in the array.

<Frame>
  <img src="https://mintcdn.com/kodelabs/SxbaONoYYoMWCQfA/images/kode-os/fdd/kode-os-fdd-block-boolean-array.png?fit=max&auto=format&n=SxbaONoYYoMWCQfA&q=85&s=faeb8229a29999e67d515cca85a11c8e" alt="Boolean Array block with Name and Field inputs, and Status and Value list outputs" width="1024" height="478" data-path="images/kode-os/fdd/kode-os-fdd-block-boolean-array.png" />
</Frame>

#### Enum Array

Outputs a list of enum values from points in the array.

<Frame>
  <img src="https://mintcdn.com/kodelabs/SxbaONoYYoMWCQfA/images/kode-os/fdd/kode-os-fdd-block-enum-array.png?fit=max&auto=format&n=SxbaONoYYoMWCQfA&q=85&s=7faa417520ba38b0de88298db792506c" alt="Enum Array block with Name and Field inputs, and Status and Value list outputs" width="1024" height="478" data-path="images/kode-os/fdd/kode-os-fdd-block-enum-array.png" />
</Frame>

## Parameter blocks

Parameter blocks let you define adjustable values that can be customized per project without modifying the routine logic. Values set in parameter blocks become available when [configuring a routine](/products/fdd/configuration) on the Configs page. Each parameter block has three inputs (Name, Hint, Value) and one Output.

<ParamField path="Name" type="Field">
  A human-readable label for the parameter. Use a descriptive name that can be understood by anyone reviewing the routine. Clear naming minimizes confusion when troubleshooting or understanding the parameter's intent later.
</ParamField>

<ParamField path="Hint" type="Field">
  A string input that appears when hovering over the information icon during configuration. Use as many words as necessary to communicate the parameter's intent, expected range, and purpose.
</ParamField>

<Frame caption="The Hint text appears as a tooltip when hovering over the info icon during configuration">
  <img src="https://mintcdn.com/kodelabs/SxbaONoYYoMWCQfA/images/kode-os/fdd/kode-os-fdd-block-param-hint.png?fit=max&auto=format&n=SxbaONoYYoMWCQfA&q=85&s=cd3b75a9689a3574f27ee12e3d107717" alt="Parameter hint tooltip showing Pressure Min Threshold value 0.40 with info icon expanded to display the hint text: How much should the duct pressure be minimally" width="884" height="290" data-path="images/kode-os/fdd/kode-os-fdd-block-param-hint.png" />
</Frame>

<ParamField path="Value" type="Field">
  The default value for the parameter. When you configure the routine on the Configs page, you alter this input to the algorithm. Most parameters require a default value.
</ParamField>

### Parameter types

#### String

Outputs the string specified in the value field. Values are available for customization during configuration.

<Frame>
  <img src="https://mintcdn.com/kodelabs/SxbaONoYYoMWCQfA/images/kode-os/fdd/kode-os-fdd-block-string-param.png?fit=max&auto=format&n=SxbaONoYYoMWCQfA&q=85&s=a403726efe53ed336017cfdc0fe4aa46" alt="String parameter block with Name, Hint, and Value inputs, and Output" width="1024" height="478" data-path="images/kode-os/fdd/kode-os-fdd-block-string-param.png" />
</Frame>

#### Number

Outputs the number specified in the value field. Values are available for customization during configuration.

<Frame>
  <img src="https://mintcdn.com/kodelabs/SxbaONoYYoMWCQfA/images/kode-os/fdd/kode-os-fdd-block-number-param.png?fit=max&auto=format&n=SxbaONoYYoMWCQfA&q=85&s=4bffbf612f3f13efc5a8da301f6ba4a0" alt="Number parameter block with Name, Hint, and Value inputs showing default 0, and Output" width="1024" height="478" data-path="images/kode-os/fdd/kode-os-fdd-block-number-param.png" />
</Frame>

#### Boolean

Outputs the boolean specified in the value field. Values are available for customization during configuration.

<Frame>
  <img src="https://mintcdn.com/kodelabs/SxbaONoYYoMWCQfA/images/kode-os/fdd/kode-os-fdd-block-boolean-param.png?fit=max&auto=format&n=SxbaONoYYoMWCQfA&q=85&s=a4001fa5bf10636f2675af10ec54f7f1" alt="Boolean parameter block with Name, Hint, and Value inputs showing default False, and Output" width="1024" height="478" data-path="images/kode-os/fdd/kode-os-fdd-block-boolean-param.png" />
</Frame>

## Arithmetical blocks

Arithmetical blocks perform mathematical operations on number inputs. Use these blocks to calculate differences, ratios, and derived values from your point data.

Arithmetical blocks come in two forms:

**Single-input blocks** accept one number input (or a static value) and produce one result.

<Frame caption="Absolute block: outputs the absolute value of the input">
  <img src="https://mintcdn.com/kodelabs/njejy12QoNdTJ3U4/images/kode-os/fdd/kode-os-fdd-block-absolute.png?fit=max&auto=format&n=njejy12QoNdTJ3U4&q=85&s=89d81db06ee2488c07db0b5e2fd83df6" alt="Absolute block with one number input, a static value field, and Result output" width="1024" height="478" data-path="images/kode-os/fdd/kode-os-fdd-block-absolute.png" />
</Frame>

**Multi-input blocks** accept two or more number inputs (or static values) and produce one result. Select the `+` button to add additional input fields.

### Available operations

#### Sum

Outputs the post-calculated value from adding all inputs.

<Frame>
  <img src="https://mintcdn.com/kodelabs/SxbaONoYYoMWCQfA/images/kode-os/fdd/kode-os-fdd-block-sum.png?fit=max&auto=format&n=SxbaONoYYoMWCQfA&q=85&s=587927613b5a3710d3ad015f5cae6c00" alt="Sum block with two number inputs, Add Operands button, and Result output" width="1024" height="478" data-path="images/kode-os/fdd/kode-os-fdd-block-sum.png" />
</Frame>

#### Difference

Outputs the post-calculated value from subtracting inputs.

<Frame>
  <img src="https://mintcdn.com/kodelabs/SxbaONoYYoMWCQfA/images/kode-os/fdd/kode-os-fdd-block-difference.png?fit=max&auto=format&n=SxbaONoYYoMWCQfA&q=85&s=da6843607ad2263501593f5df988d151" alt="Difference block with two number inputs, Add Operands button, and Result output" width="1024" height="478" data-path="images/kode-os/fdd/kode-os-fdd-block-difference.png" />
</Frame>

#### Product

Outputs the post-calculated value from multiplying inputs.

<Frame>
  <img src="https://mintcdn.com/kodelabs/SxbaONoYYoMWCQfA/images/kode-os/fdd/kode-os-fdd-block-product.png?fit=max&auto=format&n=SxbaONoYYoMWCQfA&q=85&s=6c17de46e7e2db8bbab4d404877ac88c" alt="Product block with two number inputs, Add Operands button, and Result output" width="1024" height="478" data-path="images/kode-os/fdd/kode-os-fdd-block-product.png" />
</Frame>

#### Quotient

Outputs the post-calculated value from dividing inputs.

<Frame>
  <img src="https://mintcdn.com/kodelabs/SxbaONoYYoMWCQfA/images/kode-os/fdd/kode-os-fdd-block-quotient.png?fit=max&auto=format&n=SxbaONoYYoMWCQfA&q=85&s=1ce00fa1d61c83fb2211718e783632d5" alt="Quotient block with two number inputs, Add Operands button, and Result output" width="1024" height="478" data-path="images/kode-os/fdd/kode-os-fdd-block-quotient.png" />
</Frame>

#### Modulo

Outputs the remainder from calculating the quotient of the inputs.

<Frame>
  <img src="https://mintcdn.com/kodelabs/SxbaONoYYoMWCQfA/images/kode-os/fdd/kode-os-fdd-block-modulo.png?fit=max&auto=format&n=SxbaONoYYoMWCQfA&q=85&s=e8278241556da3643740f9fd37ac3b4d" alt="Modulo block with two number inputs and Result output" width="1024" height="478" data-path="images/kode-os/fdd/kode-os-fdd-block-modulo.png" />
</Frame>

#### Absolute

Outputs the absolute value of the input value.

<Frame>
  <img src="https://mintcdn.com/kodelabs/njejy12QoNdTJ3U4/images/kode-os/fdd/kode-os-fdd-block-absolute.png?fit=max&auto=format&n=njejy12QoNdTJ3U4&q=85&s=89d81db06ee2488c07db0b5e2fd83df6" alt="Absolute block with one number input, a static value field, and Result output" width="1024" height="478" data-path="images/kode-os/fdd/kode-os-fdd-block-absolute.png" />
</Frame>

#### Max

Outputs the largest input value.

<Frame>
  <img src="https://mintcdn.com/kodelabs/SxbaONoYYoMWCQfA/images/kode-os/fdd/kode-os-fdd-block-max.png?fit=max&auto=format&n=SxbaONoYYoMWCQfA&q=85&s=f90679e7aa681c7c3ed0a0fa06e209b1" alt="Max block with two number inputs, Add Inputs button, and Result output" width="1024" height="478" data-path="images/kode-os/fdd/kode-os-fdd-block-max.png" />
</Frame>

#### Min

Outputs the smallest input value.

<Frame>
  <img src="https://mintcdn.com/kodelabs/SxbaONoYYoMWCQfA/images/kode-os/fdd/kode-os-fdd-block-min.png?fit=max&auto=format&n=SxbaONoYYoMWCQfA&q=85&s=a3d310fb2b934e944ceace89f2419b41" alt="Min block with two number inputs, Add Inputs button, and Result output" width="1024" height="478" data-path="images/kode-os/fdd/kode-os-fdd-block-min.png" />
</Frame>

#### Mean

Outputs the average of input values.

<Frame>
  <img src="https://mintcdn.com/kodelabs/SxbaONoYYoMWCQfA/images/kode-os/fdd/kode-os-fdd-block-mean.png?fit=max&auto=format&n=SxbaONoYYoMWCQfA&q=85&s=83d41e451ac235a316349622efe4ae28" alt="Mean block with two number inputs, Add Inputs button, and Result output" width="1024" height="478" data-path="images/kode-os/fdd/kode-os-fdd-block-mean.png" />
</Frame>

## Array operation blocks

Array operation blocks process a series of data points collected from the same source over time. Use these blocks to analyze trends, detect patterns, and compute statistics. Each block accepts a list input and returns a single result.

### Available operations

#### Delta

Returns the difference between the minimum value and the maximum value in the list.

<Frame>
  <img src="https://mintcdn.com/kodelabs/SxbaONoYYoMWCQfA/images/kode-os/fdd/kode-os-fdd-block-delta.png?fit=max&auto=format&n=SxbaONoYYoMWCQfA&q=85&s=7371a812f175a205c47c7f449878ca8b" alt="Delta block with list input and Result output showing the difference between min and max values" width="1024" height="478" data-path="images/kode-os/fdd/kode-os-fdd-block-delta.png" />
</Frame>

#### Length

Returns the count of items in the provided list. Accepts lists of numbers, booleans, or strings.

<Frame>
  <img src="https://mintcdn.com/kodelabs/SxbaONoYYoMWCQfA/images/kode-os/fdd/kode-os-fdd-block-length.png?fit=max&auto=format&n=SxbaONoYYoMWCQfA&q=85&s=d46b67be938b97f69602d8e5b0c6227f" alt="Length block with list input and Result output showing the count of items" width="1024" height="478" data-path="images/kode-os/fdd/kode-os-fdd-block-length.png" />
</Frame>

#### Max Array

Returns the largest number in the list.

<Frame>
  <img src="https://mintcdn.com/kodelabs/SxbaONoYYoMWCQfA/images/kode-os/fdd/kode-os-fdd-block-max-array.png?fit=max&auto=format&n=SxbaONoYYoMWCQfA&q=85&s=c0d3e570af9c8e49591815f6cac87882" alt="Max Array block with list input and Result output showing the largest value" width="1024" height="478" data-path="images/kode-os/fdd/kode-os-fdd-block-max-array.png" />
</Frame>

#### Min Array

Returns the smallest number in the list.

<Frame>
  <img src="https://mintcdn.com/kodelabs/SxbaONoYYoMWCQfA/images/kode-os/fdd/kode-os-fdd-block-min-array.png?fit=max&auto=format&n=SxbaONoYYoMWCQfA&q=85&s=41eca5877b883b377361961360378cbc" alt="Min Array block with list input and Result output showing the smallest value" width="1024" height="478" data-path="images/kode-os/fdd/kode-os-fdd-block-min-array.png" />
</Frame>

#### Mean Array

Returns the mean of the numbers in the list. Select between `Weighted` or `Simple` calculation mode.

<Frame>
  <img src="https://mintcdn.com/kodelabs/SxbaONoYYoMWCQfA/images/kode-os/fdd/kode-os-fdd-block-mean-array.png?fit=max&auto=format&n=SxbaONoYYoMWCQfA&q=85&s=2f43935833a2ee9d2dea4431026d35b6" alt="Mean Array block with Weighted or Simple selector, list input, and Result output" width="1024" height="478" data-path="images/kode-os/fdd/kode-os-fdd-block-mean-array.png" />
</Frame>

#### Std Deviation

Returns the standard deviation of the numbers in the list. Select between `Weighted` or `Simple` calculation mode.

<Frame>
  <img src="https://mintcdn.com/kodelabs/SxbaONoYYoMWCQfA/images/kode-os/fdd/kode-os-fdd-block-std-deviation.png?fit=max&auto=format&n=SxbaONoYYoMWCQfA&q=85&s=5f47d9bf5ce8d2b8588ba4566eb698da" alt="Std Deviation block with Weighted or Simple selector, list input, and Result output" width="1024" height="478" data-path="images/kode-os/fdd/kode-os-fdd-block-std-deviation.png" />
</Frame>

#### Sort Array

Returns the input list sorted in the specified order. Select between `Ascending` or `Descending`.

<Frame>
  <img src="https://mintcdn.com/kodelabs/SxbaONoYYoMWCQfA/images/kode-os/fdd/kode-os-fdd-block-sort-array.png?fit=max&auto=format&n=SxbaONoYYoMWCQfA&q=85&s=f38be5faff189de2b9200bf9bcb96dd6" alt="Sort Array block with Ascending or Descending selector, list input, and sorted list Result output" width="1024" height="478" data-path="images/kode-os/fdd/kode-os-fdd-block-sort-array.png" />
</Frame>

#### Sum Array

Returns the sum of all the numbers in the list.

<Frame>
  <img src="https://mintcdn.com/kodelabs/SxbaONoYYoMWCQfA/images/kode-os/fdd/kode-os-fdd-block-sum-array.png?fit=max&auto=format&n=SxbaONoYYoMWCQfA&q=85&s=7cabbe0353b51c6a1ae4724917a91695" alt="Sum Array block with list input and Result output showing the sum of all values" width="1024" height="478" data-path="images/kode-os/fdd/kode-os-fdd-block-sum-array.png" />
</Frame>

#### Variance

Returns the variance of the numbers in the list. Select between `Weighted` or `Simple` calculation mode.

<Frame>
  <img src="https://mintcdn.com/kodelabs/SxbaONoYYoMWCQfA/images/kode-os/fdd/kode-os-fdd-block-variance.png?fit=max&auto=format&n=SxbaONoYYoMWCQfA&q=85&s=c37d457e41922b4c82bfa2efa3268339" alt="Variance block with Weighted or Simple selector, list input, and Result output" width="1024" height="478" data-path="images/kode-os/fdd/kode-os-fdd-block-variance.png" />
</Frame>

### Example workflows

**Difference between highest and lowest values over five minutes:**

Read Number > Buffer Time (5 min) > Array Sort (Ascending) > Array Delta

This workflow captures five minutes of data, sorts the values, and calculates the difference between the highest and lowest readings.

**15-minute rolling average:**

Read Number > Buffer Time (15 min) > Array Mean

This workflow buffers 15 minutes of readings and outputs the running average.

## Conditional and switch blocks

Conditional and switch blocks direct the routine's execution path based on input data.

### If

The If block evaluates a boolean input and routes to one of two outputs. The `Do` output fires when the condition is true, and the `Else` output fires when the condition is false.

<Frame>
  <img src="https://mintcdn.com/kodelabs/SxbaONoYYoMWCQfA/images/kode-os/fdd/kode-os-fdd-block-if.png?fit=max&auto=format&n=SxbaONoYYoMWCQfA&q=85&s=761cdfbd928ef2b3539e61d2f41cfa67" alt="If block with boolean input, Do output for true condition, and Else output for false condition" width="1024" height="478" data-path="images/kode-os/fdd/kode-os-fdd-block-if.png" />
</Frame>

### Switch blocks

Switch blocks evaluate a conditional input and output the corresponding value based on whether the condition is true or false. Each switch type outputs a different data type.

#### String Switch

Outputs the corresponding string associated to the evaluated true or false condition.

<Frame>
  <img src="https://mintcdn.com/kodelabs/SxbaONoYYoMWCQfA/images/kode-os/fdd/kode-os-fdd-block-string-switch.png?fit=max&auto=format&n=SxbaONoYYoMWCQfA&q=85&s=0371616f04c8fca729255b3f321787eb" alt="String Switch block with conditional input, two return value inputs with static value fields, and string Result output" width="1024" height="478" data-path="images/kode-os/fdd/kode-os-fdd-block-string-switch.png" />
</Frame>

#### Numeric Switch

Outputs the corresponding number associated to the evaluated true or false condition.

<Frame>
  <img src="https://mintcdn.com/kodelabs/SxbaONoYYoMWCQfA/images/kode-os/fdd/kode-os-fdd-block-numeric-switch.png?fit=max&auto=format&n=SxbaONoYYoMWCQfA&q=85&s=397fb64604ae5285d41badd3042f15be" alt="Numeric Switch block with conditional input, two return value inputs with static value fields, and number Result output" width="1024" height="478" data-path="images/kode-os/fdd/kode-os-fdd-block-numeric-switch.png" />
</Frame>

#### Boolean Switch

Outputs the boolean associated to the evaluated true or false condition.

<Frame>
  <img src="https://mintcdn.com/kodelabs/SxbaONoYYoMWCQfA/images/kode-os/fdd/kode-os-fdd-block-boolean-switch.png?fit=max&auto=format&n=SxbaONoYYoMWCQfA&q=85&s=ed3e7414a0172b97ef1fea97bfea8e5f" alt="Boolean Switch block with conditional input, True and False return values, and boolean Result output" width="1024" height="478" data-path="images/kode-os/fdd/kode-os-fdd-block-boolean-switch.png" />
</Frame>

## Logical and comparison blocks

Logical and comparison blocks perform boolean operations on inputs. Select the `+` button on multi-input blocks to add additional conditionals.

### Logical blocks

#### And

Outputs true if all input values are true.

<Frame>
  <img src="https://mintcdn.com/kodelabs/SxbaONoYYoMWCQfA/images/kode-os/fdd/kode-os-fdd-block-and.png?fit=max&auto=format&n=SxbaONoYYoMWCQfA&q=85&s=699da45aef706e38969799ae2aaeafd0" alt="And block with two boolean inputs, Add Operands button, static value fields, and boolean Result output" width="1024" height="478" data-path="images/kode-os/fdd/kode-os-fdd-block-and.png" />
</Frame>

#### Or

Outputs true if any input value is true.

<Frame>
  <img src="https://mintcdn.com/kodelabs/SxbaONoYYoMWCQfA/images/kode-os/fdd/kode-os-fdd-block-or.png?fit=max&auto=format&n=SxbaONoYYoMWCQfA&q=85&s=7118cd76f965d74bd3c8d81d01f8963b" alt="Or block with two boolean inputs, Add Operands button, static value fields, and boolean Result output" width="1024" height="478" data-path="images/kode-os/fdd/kode-os-fdd-block-or.png" />
</Frame>

#### Not

Returns the opposite boolean from the input.

<Frame>
  <img src="https://mintcdn.com/kodelabs/SxbaONoYYoMWCQfA/images/kode-os/fdd/kode-os-fdd-block-not.png?fit=max&auto=format&n=SxbaONoYYoMWCQfA&q=85&s=d25d1c4247d11890cb590e9e259de15c" alt="Not block with one boolean input and inverted boolean Result output" width="1024" height="478" data-path="images/kode-os/fdd/kode-os-fdd-block-not.png" />
</Frame>

#### All

Outputs true if all items in the input list match the provided value. Accepts lists of numbers, booleans, or strings.

<Frame>
  <img src="https://mintcdn.com/kodelabs/SxbaONoYYoMWCQfA/images/kode-os/fdd/kode-os-fdd-block-all.png?fit=max&auto=format&n=SxbaONoYYoMWCQfA&q=85&s=144ff52acab0cd4029f0f1b9e9c29ec4" alt="All block with list Input, Value input, and boolean Result output" width="1024" height="478" data-path="images/kode-os/fdd/kode-os-fdd-block-all.png" />
</Frame>

#### Merge

Sends data from any of its inputs to the output as observations are received, regardless of order. Inputs must be of the same data type. Select `+` to add additional inputs.

<Frame>
  <img src="https://mintcdn.com/kodelabs/SxbaONoYYoMWCQfA/images/kode-os/fdd/kode-os-fdd-block-merge.png?fit=max&auto=format&n=SxbaONoYYoMWCQfA&q=85&s=e354b9d33c544a65686b484937bd43d2" alt="Merge block with 1st Input and 2nd Input, Add Inputs button, and output matching the input type" width="1024" height="478" data-path="images/kode-os/fdd/kode-os-fdd-block-merge.png" />
</Frame>

### Comparison blocks

#### Equals

Outputs true if both inputs are evaluated as equal. Accepts number, boolean, or string operands of the same type.

<Frame>
  <img src="https://mintcdn.com/kodelabs/SxbaONoYYoMWCQfA/images/kode-os/fdd/kode-os-fdd-block-equals.png?fit=max&auto=format&n=SxbaONoYYoMWCQfA&q=85&s=ec765fff91fcf2300501a6e59b28ee85" alt="Equals block with Left Operand and Right Operand inputs and boolean Result output" width="1024" height="478" data-path="images/kode-os/fdd/kode-os-fdd-block-equals.png" />
</Frame>

#### Greater Than

Outputs true if the left operand is greater than the right. Accepts number inputs or static values.

<Frame>
  <img src="https://mintcdn.com/kodelabs/SxbaONoYYoMWCQfA/images/kode-os/fdd/kode-os-fdd-block-greater-than.png?fit=max&auto=format&n=SxbaONoYYoMWCQfA&q=85&s=bcfbab67bd74268cf58016d83b73d7c0" alt="Greater Than block with two number inputs, static value fields, and boolean Result output" width="1024" height="478" data-path="images/kode-os/fdd/kode-os-fdd-block-greater-than.png" />
</Frame>

#### Less Than

Outputs true if the left operand is less than the right. Accepts number inputs or static values.

<Frame>
  <img src="https://mintcdn.com/kodelabs/SxbaONoYYoMWCQfA/images/kode-os/fdd/kode-os-fdd-block-less-than.png?fit=max&auto=format&n=SxbaONoYYoMWCQfA&q=85&s=67172f62d86975cd41792fe6d33e134d" alt="Less Than block with two number inputs, static value fields, and boolean Result output" width="1024" height="478" data-path="images/kode-os/fdd/kode-os-fdd-block-less-than.png" />
</Frame>

#### In

Outputs true if the data observation received by the Value input is found as an item in the input list. Accepts lists of numbers, booleans, or strings.

<Frame>
  <img src="https://mintcdn.com/kodelabs/SxbaONoYYoMWCQfA/images/kode-os/fdd/kode-os-fdd-block-in.png?fit=max&auto=format&n=SxbaONoYYoMWCQfA&q=85&s=42423582f16bd87051fa5d25b3b03b42" alt="In block with list Input, Value input, and boolean Result output" width="1024" height="478" data-path="images/kode-os/fdd/kode-os-fdd-block-in.png" />
</Frame>

Combine these blocks to build complex conditions that evaluate multiple fault criteria simultaneously.

## Timing and buffering blocks

### Timing blocks

Timing blocks introduce delays and time windows into the detection logic. Each timing block accepts a time unit (seconds, minutes, or hours) and a count value that can be set as a static number or linked from another block's output.

#### Audit

Waits for the specified amount of time and outputs the last value received from the input.

<Frame>
  <img src="https://mintcdn.com/kodelabs/SxbaONoYYoMWCQfA/images/kode-os/fdd/kode-os-fdd-block-audit.png?fit=max&auto=format&n=SxbaONoYYoMWCQfA&q=85&s=26f001252b995e4525e89b906737b94c" alt="Audit block with time unit selector, count input with static value, data Input, and typed Output" width="1024" height="478" data-path="images/kode-os/fdd/kode-os-fdd-block-audit.png" />
</Frame>

#### Debounce

Waits for the specified amount of time and outputs a value only if that value has been unchanged during that period.

<Frame>
  <img src="https://mintcdn.com/kodelabs/SxbaONoYYoMWCQfA/images/kode-os/fdd/kode-os-fdd-block-debounce.png?fit=max&auto=format&n=SxbaONoYYoMWCQfA&q=85&s=d75978cfab1bdf116bef810fbd7342a9" alt="Debounce block with time unit selector, count input with static value, data Input, and typed Output" width="1024" height="478" data-path="images/kode-os/fdd/kode-os-fdd-block-debounce.png" />
</Frame>

### Buffer blocks

Buffer blocks collect data over a specified time window or count for use with array operations.

#### Buffer Time

Collects values from the input into a list that is returned after the specified amount of time.

<Frame>
  <img src="https://mintcdn.com/kodelabs/SxbaONoYYoMWCQfA/images/kode-os/fdd/kode-os-fdd-block-buffer-time.png?fit=max&auto=format&n=SxbaONoYYoMWCQfA&q=85&s=080f9de63cd41d01d7276d84f7904b86" alt="Buffer Time block with time unit selector, count input with static value, data Input, and list Output" width="1024" height="478" data-path="images/kode-os/fdd/kode-os-fdd-block-buffer-time.png" />
</Frame>

#### Buffer Count

Collects values from the input into a list that is returned when the count is satisfied.

<Frame>
  <img src="https://mintcdn.com/kodelabs/SxbaONoYYoMWCQfA/images/kode-os/fdd/kode-os-fdd-block-buffer-count.png?fit=max&auto=format&n=SxbaONoYYoMWCQfA&q=85&s=908da9d5fee83acdc1b679ee9e2eee69" alt="Buffer Count block with count input with static value, data Input, and list Output" width="1024" height="478" data-path="images/kode-os/fdd/kode-os-fdd-block-buffer-count.png" />
</Frame>

## Alarm blocks

Every FDD routine must include and end with an Alarm Trigger block. When the Alarm Trigger receives a true boolean input, the system generates an event.

<Frame>
  <img src="https://mintcdn.com/kodelabs/SxbaONoYYoMWCQfA/images/kode-os/fdd/kode-os-fdd-block-alarm-trigger.png?fit=max&auto=format&n=SxbaONoYYoMWCQfA&q=85&s=f3a9d3cfd1e2a080bd0e43f0ea44acdf" alt="Alarm Trigger block with boolean input that generates an event when it receives a true value" width="1024" height="478" data-path="images/kode-os/fdd/kode-os-fdd-block-alarm-trigger.png" />
</Frame>

<Warning>
  A routine without an Alarm Trigger block cannot generate events. Verify that your logic path connects to an Alarm Trigger before saving.
</Warning>

## Next steps

<CardGroup cols={2}>
  <Card title="Routines" icon="workflow" href="/products/fdd/routines" arrow={true}>
    Create, test, and manage routines using the logic builder and debugger.
  </Card>

  <Card title="FDD configuration" icon="cog" href="/products/fdd/configuration" arrow={true}>
    Apply routines to your devices and configure monitoring parameters.
  </Card>
</CardGroup>
