blob: a18d3f3458278f3651cf73cca7147c42b700109d [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
/*******************************************************************************
* Copyright (c) 2010, 2016 Profactor GmbH, fortiss GmbH
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* - Neither the name of the Eclipse Foundation, Inc. nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* Contributors:
* Gerhard Ebenhofer, Alois Zoitl
* - initial API and implementation and/or initial documentation
*******************************************************************************/
-->
<!DOCTYPE FBType SYSTEM "http://www.holobloc.com/xml/LibraryElement.dtd">
<FBType Comment="Template for a Basic Function Block Type" Name="TemplateBasic">
<Identification Standard="61499-2"/>
<VersionInfo Author="4DIAC-IDE" Date="2016-05-26" Organization="4DIAC-Consortium" Version="0.0"/>
<VersionInfo Author="AZ" Date="2016-05-26" Organization="fortiss GmbH" Version="1.0"/>
<InterfaceList>
<EventInputs>
<Event Comment="Initialization Request" Name="INIT" Type="Event">
<With Var="QI"/>
</Event>
<Event Comment="Normal Execution Request" Name="REQ" Type="Event">
<With Var="QI"/>
</Event>
</EventInputs>
<EventOutputs>
<Event Comment="Initialization Confirm" Name="INITO" Type="Event">
<With Var="QO"/>
</Event>
<Event Comment="Execution Confirmation" Name="CNF" Type="Event">
<With Var="QO"/>
</Event>
</EventOutputs>
<InputVars>
<VarDeclaration Comment="Input event qualifier" Name="QI" Type="BOOL"/>
</InputVars>
<OutputVars>
<VarDeclaration Comment="Output event qualifier" Name="QO" Type="BOOL"/>
</OutputVars>
</InterfaceList>
<BasicFB>
<ECC>
<ECState Comment="Initial State" Name="START" x="475.0" y="1125.0"/>
<ECState Comment="Initialization" Name="Init" x="1235.0" y="665.0">
<ECAction Algorithm="initialize" Output="INITO"/>
</ECState>
<ECState Comment="Normal execution" Name="NormalOp" x="2850.0" y="1140.0">
<ECAction Algorithm="normalOperation" Output="CNF"/>
</ECState>
<ECState Name="Initialized" x="1900.0" y="1140.0"/>
<ECState Name="DeInit" x="1140.0" y="1520.0">
<ECAction Algorithm="deInitialize" Output="INITO"/>
</ECState>
<ECTransition Comment="" Condition="INIT[TRUE = QI]" Destination="Init" Source="START" x="840.0" y="920.0"/>
<ECTransition Comment="" Condition="1" Destination="Initialized" Source="Init" x="1660.0" y="975.0"/>
<ECTransition Comment="" Condition="REQ" Destination="NormalOp" Source="Initialized" x="2615.0" y="1000.0"/>
<ECTransition Comment="" Condition="1" Destination="Initialized" Source="NormalOp" x="2575.0" y="1430.0"/>
<ECTransition Comment="" Condition="1" Destination="START" Source="DeInit" x="940.0" y="1445.0"/>
<ECTransition Comment="" Condition="INIT[FALSE = QI]" Destination="DeInit" Source="Initialized" x="1690.0" y="1340.0"/>
</ECC>
<Algorithm Comment="Initialization algorithm" Name="initialize">
<ST Text="&#10;QO := QI;"/>
</Algorithm>
<Algorithm Comment="Normally executed algorithm" Name="deInitialize">
<ST Text="&#10;QO := FALSE;"/>
</Algorithm>
<Algorithm Comment="new algorithm" Name="normalOperation">
<ST Text="QO := QI;&#10;&#10;IF TRUE = QI THEN&#10; (* only perform normal operation of QI is true*)&#10;&#10;END_IF;&#10;"/>
</Algorithm>
</BasicFB>
</FBType>