rem "DatchOfDoor"
IFelem(%1)
#Yes
##IFelemON(elem)
###Yes
####GetFaza(WaitOpenDoor)
#####Yes
######ShowDoor
#####No
######GetStatusModul(elem)
######AlarmDoor(=OpenDoor)
######SetFaza(TooLongOpenDoor)
####GetFaza(WaitCloseDoor2)
#####No
######SetFaza(WaitCloseDoor)
######FixPlace
######rem DoorOpen(door)
###No
####GetFaza(WaitCloseDoor)
#####Yes
######TimerIsActive(TooLongOpenDoor)
#######Yes
########SendMess(2,=DoorClosed)
####GetFaza(WaitCloseDoor2)
#####Yes
######TimerIsActive(TooLongOpenDoor)
#######Yes
########SendMess(2,=DoorClosed)
####rem DoorClose(door)
####Goto Metka:CloseDoor
