> For the complete documentation index, see [llms.txt](https://help.security.gallagher.com/knowledge-hub/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.security.gallagher.com/knowledge-hub/configuration-client/site-installation/logic-blocks-and-virtual-outputs.md).

# Logic Blocks and Virtual Outputs

### Introduction

Logic Blocks and Virtual Outputs provide building blocks that can be used to provide custom functionality not otherwise supported by Command Centre, or which is difficult to achieve using existing higher-level features.

***

### Virtual Outputs

Virtual Outputs are one of the items on which logic blocks can be based.

A Virtual Output provides a means to base logic on the following, without the cost of using real outputs:

* the state of an alarm (active or inactive), by using the virtual output as an alarm output, or
* the time of day, by scheduling the virtual output’s state, or
* an operator override, by allowing an operator to override the state of the virtual output, or
* the state of an Alarm Zone, by configuring the virtual output as a reflect output for an Alarm Zone state

The Virtual Output’s purpose is summarised in the following diagram:

<figure><img src="https://3000903572-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfCvaxj3suxNBzdwQndVT%2Fuploads%2Fgit-blob-7e28db09e0f341228de3a906765ed6f506a6e97d%2Fvirtualoutput_diagram_small.png?alt=media" alt=""><figcaption></figcaption></figure>

***

### Logic Blocks

A Logic Block's state is either "on" or "off". Logic Blocks contain a set of rules and a timing option. When a rule is met, (meaning all the items in the rule are in the state defined in the rule), the Logic Block can indicate this by turning on. Exactly when the Logic Block turns on is also controlled by the timing option. The timing options available are:

* Logic Block follows the rules explicitly
* Logic Block follows rules, with a maximum on time
* Logic Block is pulsed when the rules are met
* Logic Block output has a delayed off time
* Logic Block output has a delayed on time
* Logic Block is latched until cleared by an input

The Logic Block's state can generate events or alarms, and can drive outputs, (e.g. controlling lights or sirens).

A Logic Block can be used in place of an input anywhere with Command Centre that an input can currently be selected, with the exception of where inputs are associated with the hardware on which they reside, or where they are associated with a Terminal, or as a camera motion detection input.

The Logic Block is turned on when a set of system conditions that are defined by the user, are met. In overview, the Logic Block is as follows:

![](https://3000903572-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfCvaxj3suxNBzdwQndVT%2Fuploads%2Fgit-blob-f7b0d90ca614c5e878518b24a973038efca67070%2Flogicblock_diagram_small.png?alt=media)

***

### Logic Block rules

1. A Logic Block rule specifies:
   * the set of items on which the rule is based, and
   * the required state of each item, for the rule to be met.
2. The items and states on which a rule can be based are:

   <table><thead><tr><th width="198">Item</th><th>States</th></tr></thead><tbody><tr><td>Input</td><td>Open, Closed</td></tr><tr><td>Output</td><td>On, Off</td></tr><tr><td>Logic Block Output</td><td>On, Off</td></tr><tr><td>Door</td><td>Free, Secure</td></tr><tr><td>Virtual Output</td><td>On, Off</td></tr></tbody></table>

   A Door’s state is **free** if it remains unlocked in between authorised entries and exits.

   A Door’s state is **secure** if it is locked in between authorised entries and exits.

   **Note:** An Output's **Mapping to an Input state** setting is not applicable when the Output is used as a Logic Block rule item.
3. Each Logic Block can have up to 10 items on which the rules are based.
4. A Logic Block can have multiple rules. Up to 10 rules are allowed within a single logic block. Any rule can be based on a subset of the items which are inputs to the Logic Block (and hence to other rules).
5. The state of the Logic Block is controlled by the combination of the rules and the timing options that have been defined, unless its state is overridden (to disable the logic).
6. A Logic Block’s state is either on or off.
7. A Logic Block operates as follows:

   The Logic Block’s state is **on** when one or more rules are met, (i.e. all the inputs to a rule are in the states defined in the rule), and the timing options have been applied. At all other times, the Logic Block output is **off**.

***

Select the item below that you require further detail on:

![](https://3000903572-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfCvaxj3suxNBzdwQndVT%2Fuploads%2Fgit-blob-f30c70c9dfd07493527af00bd979539606de5d30%2Ftopiclink.png?alt=media) [Scenarios using Logic and Virtual Outputs](https://help.security.gallagher.com/knowledge-hub/configuration-client/site-installation/logic-blocks-and-virtual-outputs/scenarios-using-logic-and-virtual-outputs.md)

![](https://3000903572-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfCvaxj3suxNBzdwQndVT%2Fuploads%2Fgit-blob-f30c70c9dfd07493527af00bd979539606de5d30%2Ftopiclink.png?alt=media) [Creating a new Logic Block](https://help.security.gallagher.com/knowledge-hub/configuration-client/site-installation/logic-blocks-and-virtual-outputs/creating-a-new-logic-block.md)

![](https://3000903572-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfCvaxj3suxNBzdwQndVT%2Fuploads%2Fgit-blob-f30c70c9dfd07493527af00bd979539606de5d30%2Ftopiclink.png?alt=media) [Creating a new Virtual Output](https://help.security.gallagher.com/knowledge-hub/configuration-client/site-installation/logic-blocks-and-virtual-outputs/creating-a-new-virtual-output.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.security.gallagher.com/knowledge-hub/configuration-client/site-installation/logic-blocks-and-virtual-outputs.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
