rem "APZ"
rem (APZ,1) or (APZ,2)
GetFaza(Open)
#Yes
##IFelem(A%1)
###Yes
####LegalANT
#####Yes
######LegalPlace
#######No
########Goto Metka:RedTimer
######SD(GA~)
######SD(RB+)
######SetFaza(WaitPK%1)
#####No
######Goto Metka:RedTimer
IFelem(P%1)
#Yes
##GetFaza(WaitPK%1)
###Yes
####LegalPK
#####Yes
######GetCommand
#######Yes
########SetFaza(Command)
#######No
########SetFaza(noCommand)
#####No
######SetFaza(RepeatPK%1)
######Time:RepeatPK%1
######SD(R%1~)
######Exit
##GetFaza(RepeatPK%1)
###Yes
####LegalPK
#####Yes
######GetCommand
#######Yes
########SetFaza(Command)
#######No
########SetFaza(noCommand)
GetFaza(Command)
#Yes
##ExecCommand()
###Yes
####SD(GA+)
###No
####SD(RA+)
##SetFaza(HideSD)
GetFaza(noCommand)
#Yes
##IsDoorFree(door)
###No
####Stop
##IsDoorLock(door)
###Yes
####Goto Metka:RedTimer
##SD(GA+)
##SD(RB+)
##SetFaza(OpenZ1)
IFelem(Timer)
#Yes
##GetFaza(WaitPK%1)
###Yes
####IsOutTime(time:WaitPK%1,30 sec)
#####Yes
######SendMess(2,=TooLongWaitPK)
######Goto Metka:CloseDoor
##GetFaza(RepeatPK%1)
###Yes
####IsOutTime(time:RepeatPK%1,30 sec)
#####Yes
######SendMess(2,=TooLongWaitPK)
######Goto Metka:CloseDoor
