Elk rule help?

gcimmino

Active Member
As discussed in another recent thread, I have an electric strike door access application.

A rule in the M1 works fine:

Whenver Access Front Door (KP 1) is triggered
Then Disarm Area(s) 1 Immediately
Then turn Front Door Latch (Out 3) on for 10 secs, restart timer if running

There's an exterior weigand keypad hooked up to the "prox reader" input on the Elk KP. Users are programmed with the "Access" bit to enable the above rule to work.

Now, what I'd like to do is be able to establish one user code that would be a "door bell" code. Then have a sign that says "press 7777 to ring us". I'd like to have a rule that recognizes this code and speaks something on the Elk.

The question is, how to do this and NOT trigger the disarm/door latch?
 

elcano

Active Member
Try this. Create your Visitor user with code 7777 and grant it only the Access checkbox (no arm, disarm, etc.).

Then make a rule that says:
Whenever Access Keypad 1
AND last user was visitor
Then ......


The Whenever Access is found in the Whenever..Security/Alarms menu.
 

gcimmino

Active Member
elcano said:
Try this. Create your Visitor user with code 7777 and grant it only the Access checkbox (no arm, disarm, etc.).

Then make a rule that says:
Whenever Access Keypad 1
AND last user was visitor
Then ......


The Whenever Access is found in the Whenever..Security/Alarms menu.
Thanks, I thought of that too.

That is, the whenever access and last user part... that would seem to work to get the "door bell" effect, but it would also have the side effect of causing the general whenever access rule to fire and unlock the door... Which is what I do NOT want to happen.

Now, if there was "NOT" logic and I could modify the original rule that disarms and unlocks to say "whenever access and last user NOT 7777", then we'd be ok.

Any other suggestions out there?

Thanks
 

bphillips

Member
This will work!

Your 1st "Regular" Access Rule:
WHENEVER ACCESS KEYPAD X IS TRIGGERED
THEN TURN Door Strike (Out ?) ON FOR 5 SECS

Your 2nd "Special" Access Rule:
WHENEVER ACCESS KEYPAD X IS TRIGGERED
AND LAST USER WAS Visitor (User ?) {the 7777 code}
THEN TURN Door Strike (Out ?) OFF
THEN ANNOUNCE misc message (vm???)


What happens is both rules will be evalulated virtually at the same instance and the door strike never turns on if the last user was 7777, but the voice message will play.
 

Guy Lavoie

Active Member
The way I normally handle this kind of exception is by setting a flag (eg. a counter) to skip a second rule. Like this:

The "Special" Access Rule:
WHENEVER ACCESS KEYPAD X IS TRIGGERED
AND LAST USER WAS Visitor (User ?) {the 7777 code}
THEN ANNOUNCE misc message (vm???)
THEN SET Counter 1 to 1 //set the flag

The "Regular" Access Rule:
WHENEVER ACCESS KEYPAD X IS TRIGGERED
AND Counter 1 is NOT EQUAL TO 1 //there is your NOT condition
THEN TURN Door Strike (Out ?) ON FOR 5 SECS

The flag reset rule:
WHENEVER ACCESS KEYPAD X IS TRIGGERED
AND LAST USER WAS Visitor (User ?) {the 7777 code}
THEN SET Counter 1 to 0 //reset the flag to 0
 

gcimmino

Active Member
bphilips and guy, thanks for the info. I'm more inclined to use guy's method as I'm not too happy with the turn on/off method. Just don't want there to be any chance of unlocking the door when not desired.

Guy, so the presumption here is that the rules are executed in order of evaluation and the "result" of earlier rules (setting the counter) will be complete before the next one executes?

Do you happen to know if all three of these rules will be triggered for evaluation due to the whenever, then individual ones will be executed in order based on the AND clause being true/false?

Just trying to get a better hand on how the language works.

Thanks
 

Guy Lavoie

Active Member
From the explanations given by Spanky, the Access keypad event (or any other event) will trigger an evaluation pass through the rules in the order they are placed and in-memory things like setting counters take effect immediately and are valid for any following rules. Since all three rules look for the Access Keypad event, they will all be evaluated and any AND clauses will determine if the whole logic test is true in order to execute the THEN statements.
 
Top