FUNCTION_BLOCK FB0
(*$_COM bavlna*)

CMPSET
         S7Graph-Version: 4000
         WarningLevel: All
         FBInterface: Standard
         SSBLevel: Array
         ASMsgLevel: No
         TargetMachine: AS300StdBlock
         RuntimeBlock: FC 72
         CritAvail: F
         SSkipOn: F
         AckReq: T
         SyncAvail: F
         PermILMan: F
END_CMPSET

(*$_SETTINGS
         ProgLang: LAD
*)

INITIAL_STEP init (*$_NUM 1*):
(*$_COM Step comment*)

"pom1"   (R)
"pom2"   (R)
"pom5"   (R)
"pom6"   (R)
END_STEP

STEP Step4 (*$_NUM 4*):
(*$_COM Step comment*)

"oBLOKUJ"   (S)
"oVODA"   (S)
END_STEP

STEP Step5 (*$_NUM 5*):
(*$_COM Step comment*)

"oVODA"   (R)
"oOHREV"   (S)
"oVLEVO"   (S)
END_STEP

STEP Step6 (*$_NUM 6*):
(*$_COM Step6@Step comment*)

"oVLEVO"   (S)
END_STEP

STEP Step8 (*$_NUM 8*):
(*$_COM Step comment*)

"oVLEVO"   (R)
END_STEP

STEP Step7 (*$_NUM 7*):
(*$_COM Step7@Step comment*)

"oVPRAVO"   (S)
END_STEP

STEP Step9 (*$_NUM 9*):
(*$_COM Step comment*)

"oVPRAVO"   (R)
END_STEP

STEP Step10 (*$_NUM 10*):
(*$_COM Step comment*)

"oCERPANI"   (S)
END_STEP

STEP Step11 (*$_NUM 11*):
(*$_COM Step comment*)

"oZDIMANI"   (S)
END_STEP

STEP Step23 (*$_NUM 23*):
(*$_COM Step comment*)

"oBLOKUJ"   (R)
END_STEP

STEP Step18 (*$_NUM 18*):
(*$_COM Step comment*)

"oZDIMANI"   (R)
END_STEP

STEP Step19 (*$_NUM 19*):
(*$_COM Step comment*)

"oVLEVO"   (S)
END_STEP

STEP Step20 (*$_NUM 20*):
(*$_COM Step comment*)

"oVLEVO"   (R)
END_STEP

STEP Step21 (*$_NUM 21*):
(*$_COM Step comment*)

"oVPRAVO"   (S)
END_STEP

STEP Step22 (*$_NUM 22*):
(*$_COM Step comment*)

"oVPRAVO"   (R)
"pom6"   (S)
END_STEP

STEP Step12 (*$_NUM 12*):
(*$_COM Step comment*)

"pom1"   (S)
"oCERPANI"   (R)
END_STEP

TRANSITION Trans9 (*$_NUM 9*)
  FROM init
  TO Step4
CONDITION := "iDVERE" 
END_TRANSITION

TRANSITION Trans10 (*$_NUM 10*)
  FROM Step4
  TO Step5
CONDITION := "iHORNI" 
END_TRANSITION

TRANSITION Trans11 (*$_NUM 11*)
  FROM Step5
  TO Step6
CONDITION := "iTEPLOTA" 
END_TRANSITION

TRANSITION Trans13 (*$_NUM 13*)
  FROM Step6
  TO Step8
CONDITION := Step6.T > T#3S 
END_TRANSITION

TRANSITION Trans12 (*$_NUM 12*)
  FROM Step8
  TO Step7
CONDITION := Step8.T > T#2S 
END_TRANSITION

TRANSITION Trans14 (*$_NUM 14*)
  FROM Step7
  TO Step9
CONDITION := Step7.T > T#3S 
END_TRANSITION

TRANSITION Trans15 (*$_NUM 15*)
  FROM Step9
  TO Step10
CONDITION := Step9.T > T#2S 
END_TRANSITION

TRANSITION Trans17 (*$_NUM 17*)
  FROM Step10
  TO Step12
CONDITION := NOT "iCISTE" 
END_TRANSITION

TRANSITION Trans19 (*$_NUM 19*)
  FROM Step12
  TO Step11 (*$_JUMP*)
CONDITION := "pom2" 
END_TRANSITION

TRANSITION Trans18 (*$_NUM 18*)
  FROM Step12
  TO Step5 (*$_JUMP*)
CONDITION := NOT "pom2" 
END_TRANSITION

TRANSITION Trans16 (*$_NUM 16*)
  FROM Step10
  TO Step11
CONDITION := "iCISTE" 
END_TRANSITION

TRANSITION Trans24 (*$_NUM 24*)
  FROM Step11
  TO Step18
CONDITION := "iVIBRACE" 
END_TRANSITION

TRANSITION Trans25 (*$_NUM 25*)
  FROM Step18
  TO Step19
CONDITION := Step18.T > T#5S 
END_TRANSITION

TRANSITION Trans26 (*$_NUM 26*)
  FROM Step19
  TO Step20
CONDITION := Step19.T > T#3S 
END_TRANSITION

TRANSITION Trans27 (*$_NUM 27*)
  FROM Step20
  TO Step21
CONDITION := Step20.T > T#2S 
END_TRANSITION

TRANSITION Trans28 (*$_NUM 28*)
  FROM Step21
  TO Step22
CONDITION := Step21.T > T#3S 
END_TRANSITION

TRANSITION Trans30 (*$_NUM 30*)
  FROM Step22
  TO #4#
CONDITION := "pom6" 
END_TRANSITION

TRANSITION Trans29 (*$_NUM 29*)
  FROM Step22
  TO Step11 (*$_JUMP*)
CONDITION := NOT "pom6" 
END_TRANSITION

TRANSITION Trans21 (*$_NUM 21*)
  FROM Step11
  TO Step23
CONDITION := Step11.T > T#10S AND NOT "iVIBRACE" 
END_TRANSITION

TRANSITION Trans31 (*$_NUM 31*)
  FROM Step23
  TO init (*$_JUMP*)
END_TRANSITION

END_FUNCTION_BLOCK
