| <?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
| <!DOCTYPE FBType SYSTEM "http://www.holobloc.com/xml/LibraryElement.dtd"> | |
| <FBType Comment="Lua Test FB for IF statement" Name="ConditionIF_ELSE"> | |
| <Identification Description="IF is TRUE when a > b IF_ELSE is TRUE when b > c ELSE is TRUE when non of the above trigger Copyright (c) 2019 Jan Holzweber This program and the accompanying materials are made available under the terms of the Eclipse Public License 2.0 which is available at https://www.eclipse.org/legal/epl-2.0/ SPDX-License-Identifier: EPL-2.0" Standard="61499-2"/> | |
| <VersionInfo Author="jholz" Date="2019-06-05" Version="1.0"/> | |
| <InterfaceList> | |
| <EventInputs> | |
| <Event Comment="" Name="IF_ONLY" Type="Event"/> | |
| <Event Comment="" Name="IF_ELSE" Type="Event"/> | |
| <Event Comment="" Name="IF_ELSEIF" Type="Event"/> | |
| </EventInputs> | |
| <EventOutputs> | |
| <Event Comment="" Name="EO" Type="Event"> | |
| <With Var="B_IF"/> | |
| <With Var="B_IF_ELSE"/> | |
| <With Var="B_IF_ELSEIF"/> | |
| </Event> | |
| </EventOutputs> | |
| <InputVars> | |
| <VarDeclaration Comment="" Name="a" Type="INT"/> | |
| <VarDeclaration Comment="" Name="b" Type="INT"/> | |
| <VarDeclaration Comment="" Name="c" Type="INT"/> | |
| </InputVars> | |
| <OutputVars> | |
| <VarDeclaration Comment="" Name="B_IF" Type="BOOL"/> | |
| <VarDeclaration Comment="" Name="B_IF_ELSE" Type="BOOL"/> | |
| <VarDeclaration Comment="" Name="B_IF_ELSEIF" Type="BOOL"/> | |
| </OutputVars> | |
| </InterfaceList> | |
| <BasicFB> | |
| <ECC> | |
| <ECState Comment="Initial State" Name="START" x="550.0" y="425.0"/> | |
| <ECState Comment="" Name="IF" x="2765.0" y="395.0"> | |
| <ECAction Algorithm="SetToFalse"/> | |
| <ECAction Algorithm="Only_IF" Output="EO"/> | |
| </ECState> | |
| <ECState Comment="" Name="IF_ELSE" x="2390.0" y="1040.0"> | |
| <ECAction Algorithm="SetToFalse"/> | |
| <ECAction Algorithm="IF_ELSE" Output="EO"/> | |
| </ECState> | |
| <ECState Comment="" Name="IF_ELSEIF" x="1015.0" y="1515.0"> | |
| <ECAction Algorithm="SetToFalse"/> | |
| <ECAction Algorithm="IF_ELSEIF_ELSE" Output="EO"/> | |
| </ECState> | |
| <ECTransition Comment="" Condition="IF_ONLY" Destination="IF" Source="START" x="1845.0" y="485.0"/> | |
| <ECTransition Comment="" Condition="IF_ELSE" Destination="IF_ELSE" Source="START" x="1550.0" y="815.0"/> | |
| <ECTransition Comment="" Condition="IF_ELSEIF" Destination="IF_ELSEIF" Source="START" x="875.0" y="1040.0"/> | |
| <ECTransition Comment="" Condition="1" Destination="START" Source="IF" x="1745.0" y="670.0"/> | |
| <ECTransition Comment="" Condition="1" Destination="START" Source="IF_ELSE" x="1590.0" y="1295.0"/> | |
| <ECTransition Comment="" Condition="1" Destination="START" Source="IF_ELSEIF" x="420.0" y="1390.0"/> | |
| </ECC> | |
| <Algorithm Comment="new algorithm" Name="Only_IF"> | |
| <ST Text="if a > b then 	B_IF := true; end_if;"/> | |
| </Algorithm> | |
| <Algorithm Comment="new algorithm" Name="IF_ELSE"> | |
| <ST Text="if a > b then 	B_IF := true; elsif b > c then 	B_IF_ELSEIF := true; end_if;"/> | |
| </Algorithm> | |
| <Algorithm Comment="new algorithm" Name="IF_ELSEIF_ELSE"> | |
| <ST Text="if a > b then 	B_IF := true; elsif b > c then 	B_IF_ELSEIF := true; else 	B_IF_ELSE :=true; end_if; "/> | |
| </Algorithm> | |
| <Algorithm Comment="new algorithm" Name="SetToFalse"> | |
| <ST Text="B_IF := false; B_IF_ELSEIF := false; B_IF_ELSE :=false;"/> | |
| </Algorithm> | |
| </BasicFB> | |
| </FBType> |