Skip to main content
How to create a variable for the trigger?

Learn to create general-purpose Boolean variables as a part of advanced configuration of I/O rules

Ankita Chakraborty avatar
Written by Ankita Chakraborty
Updated over 2 years ago

What are trigger variables?

Trigger variables or variables are general-purpose Boolean variables. They can be set or cleared by actions as per your use cases. You can create a maximum of 127 variables for each Mercury controller. Only four variables can be defined with each trigger and the variables work as per ((A AND B) || (C AND D)) logical expression, where A, B, C, D are the variables.

The most common usage for the variable is to create a "toggle" effect, where a pair of triggers are created with identical terms, except one requires a variable to be CLEAR to complete the trigger, and the other requires the same trigger variable to be SET to complete the trigger. Initially, the variable is created with the CLEAR state.

In simple words, if you want to create an I/O rule that needs to check for multiple trigger conditions to call for action, variables can be used.

How to create a variable?

1) Navigate to the I/O Rules > Variables tab from your Genea admin dashboard. Click "+Add".

2) Select the controller and add a name for the trigger. Click Save.

3) All variables are added with initial status as "CLEAR".

Usecase with trigger variable

Let us see the following example to understand the usage of variables better.


1. There is a reader (Intrusion specific reader) installed before the exit gate of your site to be used specifically for arming your intrusion alarm system.

2. Three consecutive successful swipes on this reader should arm the intrusion alarm system. Intrusion output is a control point in ACS that triggers the arming of intrusion alarm panels.

3. Disarming will be done automatically on schedule from the intrusion alarm panel.


To achieve the above use case in Genea, follow the below steps:


1. Create two variables, one to determine the status of 1st swipe and another to determine the status of 2nd swipe on the intrusion-specific reader.

Initially,
the status of the variable "Intrusion specific reader 1st Swipe = CLEAR".
the status of the variable "Intrusion specific reader 2nd Swipe = CLEAR".

2. Then start creating the rules. Let's first create a rule to specify the actions to be taken on 1st swipe.


Triggers:

  • When a trigger occurs within the schedule of 24x7 - System Schedule on the Access Control Reader - Intrusion Specific Reader and if there are Cardholder ID events of Access Granted - Door Used, Access Granted - Door Not Used

    This part of the trigger checks if the first swipe was a successful one or not.

  • When variable A Intrusion specific reader 1st Swipe is Clear


    This part of the trigger makes sure, it is 1st swipe, because only while the 1st swipe, the variable will be in a CLEAR state. Based on the trigger conditions further actions will be executed. Checking the variable state of the 1st swipe trigger will also prevent resetting of the time counter of 10 seconds while the 2nd or 3rd swipes are made.

Actions:

  • On the Variable - Intrusion specific reader 1st Swipe where action type is Trigger variable command and set/clear is Set

    This action will set the Intrusion specific reader 1st Swipe variable to SET state with 1st successful swipe on the reader.

  • On the Current Procedure where action type is Delay in seconds and delay time (in seconds) is 10

    A 10-second delay counter starts with 1st swipe. This is required to satisfy the condition of consecutive swipes. We are assuming that the maximum time interval between the three swipes can be 10 seconds.

  • On the Variable - Intrusion specific reader 1st Swipe where action type is Trigger variable command and set/clear is Clear


    After 10 seconds, reset the state of the variable of 1st swipe to CLEAR.

  • On the Variable - Intrusion specific reader 2nd Swipe where action type is Trigger variable command and set/clear is Clear

    After 10 seconds, resetting the state of the variable of the 2nd swipe to CLEAR as well.

3. Create a rule for 2nd swipe.

4. Finally create a rule for 3rd swipe to trigger the output of the intrusion alarm system that will in turn arm the intrusion panel.

If you have any questions about this feature or have any other requests, please reach out to acsupport@getgenea.com.

Did this answer your question?