I'm trying to use flag on PC Access to program OP2 to automatically set alarm to night mode after certain time and if all zones are secured. I used flag to track zone status. But for some reason, it's not working as expected. In other words, if all zones are always secured, the flag never gets set as expected, I assume. However, it works fine if one of the zone statuses change from "not ready" to "secure." Isn't flag default value "Off"?
Here is the simple version of what I'm trying to accomplish which doesn’t work: I increment a flag every time any zone is violated; otherwise, decrement it. If flag is off and time is greater than 8:00Pm, set alarm to Night Mode.
WHEN Main Door Entry NOT READY
WHEN Back Door Entry NOT READY
WHEN Dinning Door Entry Thr Garage NOT READY
THEN INCREMENT Ready Alarm Flag
WHEN Main Door Entry SECURE
WHEN Back Door Entry SECURE
WHEN Dinning Door Entry Thr Garage SECURE
THEN DECREMENT Ready Alarm Flag
WHEN Ready Alarm Flag OFF
AND IF TIME IS GREATER THAN 8:00 PM
THEN PROGRAM ARM NIGHT
Here is the simple version of what I'm trying to accomplish which doesn’t work: I increment a flag every time any zone is violated; otherwise, decrement it. If flag is off and time is greater than 8:00Pm, set alarm to Night Mode.
WHEN Main Door Entry NOT READY
WHEN Back Door Entry NOT READY
WHEN Dinning Door Entry Thr Garage NOT READY
THEN INCREMENT Ready Alarm Flag
WHEN Main Door Entry SECURE
WHEN Back Door Entry SECURE
WHEN Dinning Door Entry Thr Garage SECURE
THEN DECREMENT Ready Alarm Flag
WHEN Ready Alarm Flag OFF
AND IF TIME IS GREATER THAN 8:00 PM
THEN PROGRAM ARM NIGHT