<FBType Name="DrillingMashineFBT" Comment="Basic Function Block">
	<Identification Standard="61499-2" Description=""/>
	<CompilerInfo header="" classdef=""/>
	<InterfaceList>
		<InputVars>
      <VarDeclaration Name="P2" Type="" Comment="" InitialValue="" ArraySize=""/>
    </InputVars>
		<OutputVars/>
		<EventInputs>
      <Event Name="processPiece" Type="" Comment="Normal Execution Request">
        <With Var="P2"/>
      </Event>
      <Event Name="pieceBrackedIn" Type="" Comment=""/>
      <Event Name="lcUp" Type="" Comment=""/>
      <Event Name="lcDown" Type="" Comment=""/>
      <Event Name="pieceBrackedOut" Type="" Comment=""/>
    </EventInputs>
		<EventOutputs>
      <Event Name="OK2Rotate" Type="" Comment="Execution Confirmation"/>
      <Event Name="ClampBrackIn" Type="" Comment=""/>
      <Event Name="stopBracking" Type="" Comment=""/>
      <Event Name="drill" Type="" Comment=""/>
      <Event Name="lcMoveUp" Type="" Comment=""/>
      <Event Name="lcMoveDown" Type="" Comment=""/>
      <Event Name="stopcl" Type="" Comment=""/>
      <Event Name="stopDrilling" Type="" Comment=""/>
      <Event Name="ClampBrackOut" Type="" Comment=""/>
    </EventOutputs>
	</InterfaceList>
	<Service/>
	<BasicFB>
		<InternalVars>
      <VarDeclaration Name="P2" Type="BOOL" Comment="" InitialValue="" ArraySize=""/>
    </InternalVars>
		<ECC>
      <ECState Name="START" Comment="" x="1052.8787" y="1152.8727"/>
      <ECState Name="CLAMP" Comment="" x="1117.5807" y="1846.9487">
        <ECAction Algorithm="" Output="ClampBrackIn"/>
      </ECState>
      <ECState Name="CLAMPED" Comment="" x="1117.5807" y="2182.2227">
        <ECAction Algorithm="" Output="stopBracking"/>
        <ECAction Algorithm="" Output="drill"/>
        <ECAction Algorithm="" Output="lcMoveDown"/>
      </ECState>
      <ECState Name="DRILLED" Comment="" x="1135.2267" y="2546.9067">
        <ECAction Algorithm="" Output="stopcl"/>
        <ECAction Algorithm="" Output="stopDrilling"/>
        <ECAction Algorithm="" Output="lcMoveUp"/>
      </ECState>
      <ECState Name="MOVING_DRILL_UP" Comment="" x="1152.8727" y="2846.8887"/>
      <ECState Name="DRILL_UP" Comment="" x="1105.8167" y="3164.5167">
        <ECAction Algorithm="ResetP2" Output="stopcl"/>
        <ECAction Algorithm="" Output="ClampBrackOut"/>
        <ECAction Algorithm="" Output="OK2Rotate"/>
      </ECState>
      <ECState Name="OK2ROTATE" Comment="" x="1993.9987" y="1141.1087">
        <ECAction Algorithm="" Output="OK2Rotate"/>
      </ECState>
      <ECTransition Source="START" Destination="CLAMP" Condition="processPiece&amp;&amp;(P2)" x="764.6607" y="1576.3767"/>
      <ECTransition Source="CLAMP" Destination="CLAMPED" Condition="pieceBrackedIn" x="517.6167" y="2070.4647"/>
      <ECTransition Source="CLAMPED" Destination="DRILLED" Condition="lcDown" x="494.0887" y="2411.6207"/>
      <ECTransition Source="DRILLED" Destination="MOVING_DRILL_UP" Condition="1" x="517.6167" y="2717.4847"/>
      <ECTransition Source="MOVING_DRILL_UP" Destination="DRILL_UP" Condition="lcUp" x="541.1447" y="3040.9947"/>
      <ECTransition Source="DRILL_UP" Destination="START" Condition="1" x="4040.9347" y="2176.3407"/>
      <ECTransition Source="START" Destination="OK2ROTATE" Condition="processPiece&amp;&amp;!(P2)" x="1782.2467" y="917.5927"/>
      <ECTransition Source="OK2ROTATE" Destination="START" Condition="1" x="2105.7567" y="1452.8547"/>
    </ECC>  <Algorithm Name="INIT" Comment="Initialization algorithm"/>
    <Algorithm Name="REQ" Comment="Normally executed algorithm"/>
    <Algorithm Name="SetP2" Comment=""/>
    <Algorithm Name="ResetP2" Comment=""/>
  </BasicFB>  <VersionInfo Organization="Software Engineering Group" Version="1.0" Author="-" Date="2006-02-07" Remarks="The FB type template"/>
</FBType>
