blob: 83036848ad94b759f80ccbe7fbd5a241b7e2d835 [file]
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE FBType SYSTEM "http://www.holobloc.com/xml/LibraryElement.dtd">
<FBType Comment="Template for an empty basic function block" Name="OperatorArithmetic">
<Identification Description="Copyright (c) 2019 Jan Holzweber&#13;&#10; &#13;&#10;This program and the accompanying materials are made&#13;&#10;available under the terms of the Eclipse Public License 2.0&#13;&#10;which is available at https://www.eclipse.org/legal/epl-2.0/&#13;&#10;SPDX-License-Identifier: EPL-2.0" Standard="61499-2"/>
<VersionInfo Author="jholz" Date="2019-06-05" Version="1.0"/>
<InterfaceList>
<EventInputs>
<Event Comment="" Name="ADD" Type="Event">
<With Var="A"/>
<With Var="B"/>
</Event>
<Event Comment="" Name="SUB" Type="Event">
<With Var="A"/>
<With Var="B"/>
</Event>
<Event Comment="" Name="MUL" Type="Event">
<With Var="A"/>
<With Var="B"/>
</Event>
<Event Comment="" Name="EXP" Type="Event">
<With Var="A"/>
<With Var="B"/>
</Event>
<Event Comment="" Name="DIV" Type="Event">
<With Var="A"/>
<With Var="B"/>
</Event>
<Event Comment="" Name="MOD_" Type="Event">
<With Var="A"/>
<With Var="B"/>
</Event>
</EventInputs>
<EventOutputs>
<Event Comment="" Name="EO" Type="Event">
<With Var="OUT"/>
</Event>
</EventOutputs>
<InputVars>
<VarDeclaration Comment="" Name="A" Type="REAL"/>
<VarDeclaration Comment="" Name="B" Type="REAL"/>
</InputVars>
<OutputVars>
<VarDeclaration Comment="" Name="OUT" Type="REAL"/>
</OutputVars>
</InterfaceList>
<BasicFB>
<ECC>
<ECState Comment="Initial State" Name="START" x="4300.0" y="1900.0"/>
<ECState Comment="" Name="State" x="2410.0" y="820.0">
<ECAction Algorithm="MOD" Output="EO"/>
</ECState>
<ECState Comment="" Name="State_1" x="4590.0" y="545.0">
<ECAction Algorithm="ADD" Output="EO"/>
</ECState>
<ECState Comment="" Name="State_2" x="7055.0" y="1570.0">
<ECAction Algorithm="SUB" Output="EO"/>
</ECState>
<ECState Comment="" Name="State_3" x="6220.0" y="2925.0">
<ECAction Algorithm="MUL" Output="EO"/>
</ECState>
<ECState Comment="" Name="State_4" x="4225.0" y="3050.0">
<ECAction Algorithm="EXP" Output="EO"/>
</ECState>
<ECState Comment="" Name="State_5" x="2535.0" y="2620.0">
<ECAction Algorithm="DIV" Output="EO"/>
</ECState>
<ECTransition Comment="" Condition="1" Destination="START" Source="State_1" x="5135.0" y="1250.0"/>
<ECTransition Comment="" Condition="ADD" Destination="State_1" Source="START" x="4385.0" y="1185.0"/>
<ECTransition Comment="" Condition="SUB" Destination="State_2" Source="START" x="5865.0" y="1785.0"/>
<ECTransition Comment="" Condition="MUL" Destination="State_3" Source="START" x="5390.0" y="2465.0"/>
<ECTransition Comment="" Condition="EXP" Destination="State_4" Source="START" x="4400.0" y="2540.0"/>
<ECTransition Comment="" Condition="DIV" Destination="State_5" Source="START" x="3535.0" y="2320.0"/>
<ECTransition Comment="" Condition="MOD_" Destination="State" Source="START" x="3500.0" y="1425.0"/>
<ECTransition Comment="" Condition="1" Destination="START" Source="State" x="3505.0" y="1410.0"/>
<ECTransition Comment="" Condition="1" Destination="START" Source="State_5" x="3555.0" y="2320.0"/>
<ECTransition Comment="" Condition="1" Destination="START" Source="State_4" x="4355.0" y="2535.0"/>
<ECTransition Comment="" Condition="1" Destination="START" Source="State_3" x="5360.0" y="2460.0"/>
<ECTransition Comment="" Condition="1" Destination="START" Source="State_2" x="5765.0" y="1805.0"/>
</ECC>
<Algorithm Comment="new algorithm" Name="ADD">
<ST Text="OUT:=A+B;"/>
</Algorithm>
<Algorithm Comment="new algorithm" Name="SUB">
<ST Text="OUT:=A-B;"/>
</Algorithm>
<Algorithm Comment="new algorithm" Name="MUL">
<ST Text="OUT:=A*B;"/>
</Algorithm>
<Algorithm Comment="new algorithm" Name="EXP">
<ST Text="OUT:=A**B;"/>
</Algorithm>
<Algorithm Comment="new algorithm" Name="DIV">
<ST Text="OUT:=A / B;"/>
</Algorithm>
<Algorithm Comment="new algorithm" Name="MOD">
<ST Text="OUT:=A MOD B;"/>
</Algorithm>
</BasicFB>
</FBType>