Have a Question?
< All Topics
Print

Time Locks

We do not have a master time lock parent, since different businesses want to be open different times, so here is how to set that code on your exits: Say you wanted your store to be open from 9AM-5PM. You would set the following attribute on the exit:

&CAN_ENTER <exit>=[strmatch(09 10 11 12 13 14 15 16,*[mid([vtime()],11,2)]*)]

@lock <exit>=CAN_ENTER/1

Every time someone tries to enter, the exit will look at the current IC military time and grab the first 2 digits of the time. It then compares them to the list of numbers. If they match any of the 2-digit numbers in the list, the exit lets the person through. If not, it’s locked. You’ll notice that even though you want the exit to be open until 5:00PM (17:00), the list only goes up to 16. This is to avoid the door being open from 5:00PM-5:59PM. Instead, it closes at 4:59PM.

You can use this code for any times you want, just change the range of numbers accordingly. You can also have a list of people that can enter at any time:

&EMPLOYEES <exit>=<DB#’s of PC’s, separated by a space>

&CAN_ENTER <exit>=[or(member([u(me/employees)],%#),strmatch(09 10 11 12 13 14 15 16,*[mid([vtime()],11,2)]*))]

@lock <exit>=CAN_ENTER/1

Table of Contents