> 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/scenarios-using-logic-and-virtual-outputs/scenario-3-restricting-access-at-multi-tenanted-car-parks.md).

# Scenario 3: Restricting access at multi-tenanted car-parks

### Scenario

A car-park caters for a multi-tenanted building. Each tenant has a maximum number of car-parks allocated for their use. When the maximum number of car-parks allowed for a particular tenant is reached, other cardholder access attempts (by that tenant) are denied. Once a cardholder leaves, access to the car-park is re-enabled for that tenant (until such time as the maximum allowed car-parks is again reached). For this example it is assumed there are three tenants, although the proposed solution can cater for up to 75 tenants.

When a particular tenant has reached the maximum allowed car-parks, an LED is lit on a mimic panel. This provides an indication to other tenants that they will be unable to gain access. Once a person leaves, and a car-park for that tenant is then available, the LED turns off, and access to the car-park (for that tenant) is re-enabled. There is a separate LED for each tenant.

### Solution: Using Elevator Cars, Virtual Outputs, Logic Blocks and Zone counting

The purpose of this configuration is to use zone counting on Tenant 1, Tenant 2 and Tenant 3 car-park Access Zones to count the number of cardholders currently in the car-park, for each tenant, and to deny further entry to that tenant once the maximum allowed car-parks have been used.

The following diagram gives an overview of the configuration described below:

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

1. The entry to the car-park is controlled by a reader, which is configured as an elevator car reader. Exit from the car-park is also controlled by a reader, which is configured as a (different) elevator car reader.
2. The entry elevator car controls entry to three "levels". Each tenant's cardholders are given access to only one of the three "levels" (i.e. a different level for each tenant). Each level is configured to trigger a specific virtual output when a cardholder who has access to that level badges their card at the car-park entry reader. Hence, the lift car is configured as follows:

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

   **Notes:**

   * Each tenant has access to one level.
   * The items in the **Output** column are virtual outputs and are turned on when the tenant attempts to enter the car-park.
   * The items in the **Input** column are Logic Block outputs that trigger the barrier arm when the tenant is allowed to enter.

   The exit elevator car controls exit from the car-park to outside world. It triggers different virtual outputs and is configured as follows:

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

   **Notes:**

   * The items in the **Output** column are virtual outputs and turn on when the tenant exits the car-park.
   * The items in the **Input** column are the same as the outputs.

   Exit from the car-park is always allowed, however each tenant is configured as exiting into a different zone, and only has access to that zone, so that the zone count can be decremented for the correct tenant, when a cardholder leaves the car-park.
3. Three Zone Count increment inputs are configured - one for each tenant.

   The Access Zones "Tenant 1 Car-park", "Tenant 2 Car-park" and "Tenant 3 Car-park", are each configured for zone counting.

   <table><thead><tr><th width="215">The Logic Block..</th><th>is configured as Zone Count increment input for the Access Zone…</th></tr></thead><tbody><tr><td>"Tenant 1 entry allowed"</td><td>"Tenant 1 Car-park"</td></tr><tr><td>"Tenant 2 entry allowed"</td><td>"Tenant 2 Car-park"</td></tr><tr><td>"Tenant 3 entry allowed"</td><td>"Tenant 3 Car-park"</td></tr></tbody></table>

   See No.5 for a description of the logic. The Zone Count increment input ensures that the zone count for the tenant is incremented when the tenant is granted entry to the car-park. The zone count represents the number of car-parks in use for that tenant.

   Three Zone Count decrement inputs are configured - one for each tenant.

   <table><thead><tr><th width="215">The Virtual Output..</th><th>is configured as Zone Count decrement input for the Access Zone…</th></tr></thead><tbody><tr><td>"Tenant 1 exit"</td><td>"Tenant 1 Car-park"</td></tr><tr><td>"Tenant 2 exit"</td><td>"Tenant 2 Car-park"</td></tr><tr><td>"Tenant 3 exit"</td><td>"Tenant 3 Car-park"</td></tr></tbody></table>

   The Zone Count decrement input ensures that the zone count for the tenant is decremented when the tenant exits from the car-park.

   ![](https://3000903572-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfCvaxj3suxNBzdwQndVT%2Fuploads%2Fgit-blob-b068c698eb49bdf6240ee984d2c37bd251e3242e%2Ftenant2accesszoneincrementdecrement.png?alt=media)
4. The Zone Count threshold is set to one below the maximum number of car-parks allowed for that tenant. That is:

   * Access Zone "Tenant 1 Car-park" maximum zone count threshold is set to 29 (the maximum number of car-parks allocated to Tenant 1 is 30).
   * Access Zone "Tenant 2 Car-park" maximum zone count threshold is set to 49 (the maximum number of car-parks allocated to Tenant 2 is 50).
   * Access Zone "Tenant 3 Car-park" maximum zone count threshold is set to 99 (the maximum number of car-parks allocated to Tenant 3 is 100).

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

   For each Access Zone, an output is switched on when the zone count exceeds the maximum threshold, using the zone counting "above maximum" reflect outputs. That is:

   * when Access Zone "Tenant 1 Car-park" zone count exceeds the maximum threshold (reaches 30), output "Tenant 1 at maximum" is turned on.
   * when Access Zone "Tenant 2 Car-park" zone count exceeds the maximum threshold (reaches 50), output "Tenant 2 at maximum" is turned on.
   * when Access Zone "Tenant 3 Car-park" zone count exceeds the maximum threshold (reaches 100), output "Tenant 3 at maximum" is turned on.

   The zone count for each access zone ("Tenant 1 Car-park" etc) holds the number of car-parks in use for that tenant.

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

   The "Tenant 1 at maximum", "Tenant 2 at maximum" and "Tenant 3 at maximum" outputs each control a separate LED on a mimic panel. Hence, the "Tenant 2 at maximum" LED is on when Tenant 2 has reached the maximum number of car-parks allowed (similarly for other tenants). Once the zone count for the "Tenant 2 Car-park" is no longer above the maximum the "Tenant 2 maximum" output turns off, and hence so does the LED (similarly for other tenants). For each tenant, the LED is therefore on when access to the car-park will be denied because the maximum allowed car-parks for that tenant has been reached. With this configuration, the zone count for the "Tenant 2 Car-park" Access Zone will reflect the number of entries to, less exits from, the car-park for Tenant 2 (similarly for other tenants).
5. A Logic Block is set up as shown below, for each tenant to determine whether access is allowed (the barrier arm is raised) when that tenant badges their card at the entry reader.

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

   If the "Tenant 2 entry" virtual output is on (meaning Tenant 2 has badged their card at the entry reader), and "Tenant 2 at maximum" is off (meaning Tenant 2 still has car-parks available), then the Logic Block is pulsed on for a few seconds.

   The car-park entry barrier arm is configured as a reflected output for the Logic Block.

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

   This logic means the barrier arm at the car-park entry is opened, when a valid access attempt is made, only if the number of car-parks in use for the tenancy to which this cardholder belongs, is below the maximum.

   The Logic Block is also used to increment the "car-parks in use" zone count for the tenant, so that the zone count is only incremented if the cardholder is actually allowed to enter the car-park (as shown in Step 3).
6. Exit from the car-park is always allowed, however we need to detect which tenant is exiting, so that the correct "car-parks in use" zone count for that tenant can be decremented. Virtual outputs are set up on the exit elevator car, one for each level/tenant, to detect which tenant has badged their card to exit. The virtual output is configured as a Zone Count decrement input, on the appropriate access zone.

   At the same time, any tenant exiting must open the exit barrier arm. Logic is set up to do this. The logic uses the virtual outputs, one of which is triggered by each tenant when they exit the car-park, in an 'OR' configuration. The output controlling the exit barrier arm is then configured as a reflected output for the logic block output's "on" state.

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

   With this configuration, a cardholder's exit from the car-park will decrement the "car-parks in use" zone count for that tenant, and always opens the barrier arm for the car-park exit.
7. The "access taken" inputs configured on the entry elevator car, mean that the following event will be logged **only when** the cardholder is actually allowed to enter the car-park:

   *\[Cardholder] was granted entry into \[Tenant 1 Car-park] through \[Car-park Barrier Arm - Entry]*

   When the cardholder exits from the car-park, the following event will be logged:

   *\[Cardholder] was granted entry into \[Outside World - Tenant 1] through \[Car-park Barrier Arm - Exit]*

   **Note:** The names in brackets will vary depending on the actual names used for these items.


---

# 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/scenarios-using-logic-and-virtual-outputs/scenario-3-restricting-access-at-multi-tenanted-car-parks.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.
