Trigger and Macro Definitions

Triggers & Macros — Definitions and Examples

Trigger definitions

  • Description – Briefly explains what the trigger does.

  • Events – The event(s) that fire the trigger (e.g., RO024: Access Granted: Door Used).

  • Address – Where the event occurred. Choose a specific device/reader address or (ALL) on the controller.

  • Trigger Code – Numeric code (0–999) assigned on a person’s Advanced Access tab. Used only with card-related events to target one person or a group.

  • Time Schedule – When the trigger is allowed to evaluate.

  • Macro – The action sequence that runs after all trigger conditions are met.

  • TVAR (Trigger Variable) – Extra state/conditions the trigger can require. Macros can set/clear TVARs, so two identical events can behave differently depending on prior macro activity.
    Example: the same valid card read can flip a state to arm/disarm points or activate/deactivate relays.

Macro definitions

  • Command – The operation executed when its linked trigger conditions are satisfied. A macro can contain many commands, which run in order.

  • Address – The target device(s) for the command (single or group).


Example 1: Valid card read toggles a relay (flip-flop)

Trigger 1

  • Description: Valid Card Read

  • Event: RO024: Access Granted: Door Used

  • Address: Specific reader or (ALL)

  • Trigger Code: 1 (person/group identifier from Advanced Access)

  • Time Schedule: 1

  • Macro: 1

  • TVAR required: 1

Macro 1

  • Command: 28 – Set Trigger Variable → TVAR 1 = 0

  • Command: 4 – Control Point Deactivate → Address 1.0.0.O2

Trigger 2

  • Description: Valid Card Read

  • Event: RO024: Access Granted: Door Used

  • Address: Specific reader or (ALL)

  • Trigger Code: 1

  • Time Schedule: 1

  • Macro: 2

  • TVAR required: 0

Macro 2

  • Command: 28 – Set Trigger Variable → TVAR 1 = 1

  • Command: 4 – Control Point Activate → Address 1.0.0.O2

Result: Each valid card read flips TVAR 1 and alternates the relay on 1.0.0.O2 between activate/deactivate.


Example 2: Two valid reads (within a window) trigger an action

Trigger 1

  • Description: Valid Card Read #1

  • Event: RO024: Access Granted: Door Used

  • Address: Specific reader or (ALL)

  • Trigger Code: 1

  • Time Schedule: 1

  • Macro: 1

  • TVAR required: 0

Macro 1

  • Command: 28 – Set Trigger Variable → TVAR 1 = 1

  • Command: 13 – Delay Command → Controller address; Delay 10s (window for second read)

  • Command: 28 – Set Trigger Variable → TVAR 1 = 0 (auto-reset if no second read)

Trigger 2

  • Description: Valid Card Read #2

  • Event: RO024: Access Granted: Door Used

  • Address: Specific reader or (ALL)

  • Trigger Code: 1

  • Time Schedule: 1

  • Macro: 2

  • TVAR required: 1

Macro 2

  • Command: 28 – Set Trigger Variable → TVAR 1 = 0

  • Command: (your action here) – Any command to run when two reads occur within 10 seconds.

Result: A second valid read within 10s fires Macro 2; otherwise TVAR resets and nothing further happens.


System-created triggers & macros (device scheduling)

TypeID RangeEvent / ActionLinked To
Trigger300–399Time Schedule ActivatedMacros 500–599
Trigger400–499Time Schedule DeactivatedMacros 800–899
Macro500–599Runs when an Area is Disarmed or a Time Schedule is ActivatedTriggers 300–399
Macro600–699Runs when an Area is Armed
Macro700–799Runs when an Area is in Alarm
Macro800–899Runs when an Area is Force Armed or a Time Schedule is DeactivatedTriggers 400–499

Notes

  • Use Trigger Codes only for card-driven events.

  • TVARs let you build stateful logic (flip-flops, multi-step sequences, windows with timeouts).

  • Keep macro command order intentional—execution is sequential.


Was this article helpful?