FUNCTION_BLOCK FB0
(*$_COM zahustovac*)

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 Step1 (*$_NUM 1*):
(*$_COM Step comment*)

END_STEP

STEP Step2 (*$_NUM 2*):
(*$_COM Step comment*)

"v1"   (S)
END_STEP

STEP Step3 (*$_NUM 3*):
(*$_COM Step comment*)

"topeni"   (S)
END_STEP

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

"v1"   (R)
"m"   (S)
END_STEP

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

END_STEP

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

"hus"   (S)
END_STEP

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

"m"   (R)
"topeni"   (R)
"v2"   (S)
END_STEP

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

"v2"   (R)
END_STEP

STEP Step17 (*$_NUM 17*):
(*$_COM Step comment*)

"opakovani"   (R)
"opakovani2"   (R)
END_STEP

STEP Step16 (*$_NUM 16*):
(*$_COM Step comment*)

"opakovani2"   (S)
END_STEP

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

"opakovani"   (S)
END_STEP

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

"chyba"   (S)
"v1"   (R)
END_STEP

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

"chyba"   (S)
"v1"   (R)
END_STEP

TRANSITION Trans1 (*$_NUM 1*)
  FROM Step1
  TO Step2
CONDITION := "start" 
END_TRANSITION

TRANSITION Trans4 (*$_NUM 4*)
  FROM Step2
  TO Step4
CONDITION := Step2.T > T#5S AND NOT "h1" 
END_TRANSITION

TRANSITION Trans5 (*$_NUM 5*)
  FROM Step4
  TO Step2 (*$_JUMP*)
CONDITION := "clovek" 
END_TRANSITION

TRANSITION Trans2 (*$_NUM 2*)
  FROM Step2
  TO Step3
CONDITION := "h1" 
END_TRANSITION

TRANSITION Trans11 (*$_NUM 11*)
  FROM Step3
  TO Step9
CONDITION := Step3.T > T#5S AND NOT "h2" 
END_TRANSITION

TRANSITION Trans12 (*$_NUM 12*)
  FROM Step9
  TO Step3 (*$_JUMP*)
CONDITION := "clovek" 
END_TRANSITION

TRANSITION Trans3 (*$_NUM 3*)
  FROM Step3
  TO Step5
CONDITION := "h2" 
END_TRANSITION

TRANSITION Trans6 (*$_NUM 6*)
  FROM Step5
  TO Step10
END_TRANSITION

TRANSITION Trans14 (*$_NUM 14*)
  FROM Step10
  TO Step5 (*$_JUMP*)
CONDITION := "h1" 
END_TRANSITION

TRANSITION Trans13 (*$_NUM 13*)
  FROM Step10
  TO Step11
CONDITION := NOT "h1" 
END_TRANSITION

TRANSITION Trans16 (*$_NUM 16*)
  FROM Step11
  TO Step12
CONDITION := Step11.T > T#5S AND NOT "hOK" AND NOT "opakovani" 
END_TRANSITION

TRANSITION Trans17 (*$_NUM 17*)
  FROM Step12
  TO Step2 (*$_JUMP*)
END_TRANSITION

TRANSITION Trans21 (*$_NUM 21*)
  FROM Step11
  TO Step16
CONDITION := Step11.T > T#5S AND NOT "hOK" AND "opakovani" 
END_TRANSITION

TRANSITION Trans23 (*$_NUM 23*)
  FROM Step16
  TO Step2 (*$_JUMP*)
END_TRANSITION

TRANSITION Trans24 (*$_NUM 24*)
  FROM Step11
  TO Step17
CONDITION := Step11.T > T#5S AND NOT "hOK" AND "opakovani" AND "opakovani2" 
END_TRANSITION

TRANSITION Trans25 (*$_NUM 25*)
  FROM Step17
  TO Step18 (*$_JUMP*)
END_TRANSITION

TRANSITION Trans15 (*$_NUM 15*)
  FROM Step11
  TO Step18
CONDITION := Step11.T > T#5S AND "hOK" 
END_TRANSITION

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

TRANSITION Trans27 (*$_NUM 27*)
  FROM Step19
  TO Step1 (*$_JUMP*)
END_TRANSITION

END_FUNCTION_BLOCK
