FUNCTION_BLOCK FB0
(*$_COM vrtacka*)

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*)

"oR"   (R)
"oD"   (R)
"oU"   (R)
END_STEP

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

"oR"   (S)
"oD"   (S)
END_STEP

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

"oD"   (R)
"oU"   (S)
END_STEP

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

"oU"   (R)
"oD"   (S)
END_STEP

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

"oD"   (R)
"oU"   (S)
END_STEP

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

"oU"   (R)
"oR"   (S)
END_STEP

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

END_STEP

TRANSITION Trans1 (*$_NUM 1*)
  FROM init
  TO Step2
CONDITION := "iP" AND "iStart" 
END_TRANSITION

TRANSITION maly (*$_NUM 3*)
  FROM Step2
  TO Step3
CONDITION := NOT "iB" AND "iM" 
END_TRANSITION

TRANSITION Trans4 (*$_NUM 4*)
  FROM Step3
  TO Step6 (*$_JUMP*)
CONDITION := "iF" 
END_TRANSITION

TRANSITION velky (*$_NUM 2*)
  FROM Step2
  TO Step4
CONDITION := "iB" AND "iM" 
END_TRANSITION

TRANSITION Trans5 (*$_NUM 5*)
  FROM Step4
  TO Step5
CONDITION := "iH" 
END_TRANSITION

TRANSITION Trans6 (*$_NUM 6*)
  FROM Step5
  TO Step6
CONDITION := "iF" 
END_TRANSITION

TRANSITION Trans7 (*$_NUM 7*)
  FROM Step6
  TO Step7
CONDITION := "iH" 
END_TRANSITION

TRANSITION Trans8 (*$_NUM 8*)
  FROM Step7
  TO init (*$_JUMP*)
CONDITION := NOT "oR" 
END_TRANSITION

END_FUNCTION_BLOCK
