rem "AHZ"
GetFaza(Open)
#Yes
##IFelem(A%1)
###Yes
####IsDoorFree(door)
#####No
######Stop
####LegalANT
#####Yes
######LegalPlace
#######No
########Goto Metka:RedTimer
######SD(GA~)
######SD(RB+)
######SetFaza(WaitHK%1)
######GetHandKey(door,H%1)
#####No
######Goto Metka:RedTimer
IFelem(H%1)
#Yes
##GetFaza(WaitHK%1)
###Yes
####LegalHK
#####Yes
######SetFaza(OpenZ1)
######SD(G%1+)
#####No
######Goto Metka:CloseDoor
IFelem(Timer)
#Yes
##GetFaza(WaitHK%1)
###Yes
####IsOutTime(time:WaitHK%1,60 sec)
#####Yes
######SendMess(2,TooLongWaitHK)
######Goto Metka:CloseDoor
