[547886] Adding Test FBs for simple Functionality
Adding Test FBs for COnditions, Loops, Datatypes and Operators
https://bugs.eclipse.org/bugs/show_bug.cgi?id=547886
Change-Id: I3abb9f88dcc352ace0b6e55db2398b6707c09860
Signed-off-by: Jan Holzweber <j.holzweber@gmx.at>
diff --git a/SystemTests/testfbforcodegenerator/BasicFBs/ConditionIF_ELSE.fbt b/SystemTests/testfbforcodegenerator/BasicFBs/ConditionIF_ELSE.fbt
new file mode 100644
index 0000000..7e0bab8
--- /dev/null
+++ b/SystemTests/testfbforcodegenerator/BasicFBs/ConditionIF_ELSE.fbt
@@ -0,0 +1,65 @@
+<?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>
diff --git a/SystemTests/testfbforcodegenerator/BasicFBs/ConditionSWITCH_CASE.fbt b/SystemTests/testfbforcodegenerator/BasicFBs/ConditionSWITCH_CASE.fbt
new file mode 100644
index 0000000..9c61613
--- /dev/null
+++ b/SystemTests/testfbforcodegenerator/BasicFBs/ConditionSWITCH_CASE.fbt
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE FBType SYSTEM "http://www.holobloc.com/xml/LibraryElement.dtd">
+<FBType Comment="Test FB fpr Switch Statement" Name="ConditionSWITCH_CASE">
+ <Identification Description="It checks if the input data I is: = 5 = 10 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="EI" Type="Event">
+ <With Var="InputInt"/>
+ </Event>
+ </EventInputs>
+ <EventOutputs>
+ <Event Comment="" Name="EO" Type="Event">
+ <With Var="EQ5"/>
+ <With Var="EQ10"/>
+ <With Var="ELSEO"/>
+ </Event>
+ </EventOutputs>
+ <InputVars>
+ <VarDeclaration Comment="" Name="InputInt" Type="DINT"/>
+ </InputVars>
+ <OutputVars>
+ <VarDeclaration Comment="" Name="EQ5" Type="BOOL"/>
+ <VarDeclaration Comment="" Name="EQ10" Type="BOOL"/>
+ <VarDeclaration Comment="" Name="ELSEO" Type="BOOL"/>
+ </OutputVars>
+ </InterfaceList>
+ <BasicFB>
+ <ECC>
+ <ECState Comment="Initial State" Name="START" x="550.0" y="425.0"/>
+ <ECState Comment="" Name="State" x="2430.0" y="925.0">
+ <ECAction Algorithm="Switch" Output="EO"/>
+ </ECState>
+ <ECTransition Comment="" Condition="EI" Destination="State" Source="START" x="1645.0" y="720.0"/>
+ <ECTransition Comment="" Condition="1" Destination="START" Source="State" x="1500.0" y="1045.0"/>
+ </ECC>
+ <Algorithm Comment="" Name="Switch">
+ <ST Text="CASE InputInt OF 	5 : EQ5 := true; 	10: EQ10 :=true; ELSE 	ELSEO:=true; END_CASE;"/>
+ </Algorithm>
+ </BasicFB>
+</FBType>
diff --git a/SystemTests/testfbforcodegenerator/BasicFBs/DataTypesBitStrings.fbt b/SystemTests/testfbforcodegenerator/BasicFBs/DataTypesBitStrings.fbt
new file mode 100644
index 0000000..416d4b7
--- /dev/null
+++ b/SystemTests/testfbforcodegenerator/BasicFBs/DataTypesBitStrings.fbt
@@ -0,0 +1,68 @@
+<?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="DataTypesBitStrings">
+ <Identification Description="Normal just propagates the input to the output Internal: sets the output from inside 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="Normal" Type="Event">
+ <With Var="BOOL_I"/>
+ <With Var="WORD_I"/>
+ <With Var="DWORD_I"/>
+ <With Var="LWORD_I"/>
+ <With Var="BYTE_I"/>
+ </Event>
+ <Event Comment="" Name="Internal" Type="Event">
+ <With Var="BOOL_I"/>
+ <With Var="WORD_I"/>
+ <With Var="DWORD_I"/>
+ <With Var="LWORD_I"/>
+ <With Var="BYTE_I"/>
+ </Event>
+ </EventInputs>
+ <EventOutputs>
+ <Event Comment="" Name="EO" Type="Event">
+ <With Var="BOOL_O"/>
+ <With Var="BYTE_O"/>
+ <With Var="WORD_O"/>
+ <With Var="DWORD_O"/>
+ <With Var="LWORD_O"/>
+ </Event>
+ </EventOutputs>
+ <InputVars>
+ <VarDeclaration Comment="" Name="BOOL_I" Type="BOOL"/>
+ <VarDeclaration Comment="" Name="BYTE_I" Type="BYTE"/>
+ <VarDeclaration Comment="" Name="WORD_I" Type="WORD"/>
+ <VarDeclaration Comment="" Name="DWORD_I" Type="DWORD"/>
+ <VarDeclaration Comment="" Name="LWORD_I" Type="LWORD"/>
+ </InputVars>
+ <OutputVars>
+ <VarDeclaration Comment="" Name="BOOL_O" Type="SINT"/>
+ <VarDeclaration Comment="" Name="BYTE_O" Type="INT"/>
+ <VarDeclaration Comment="" Name="WORD_O" Type="DINT"/>
+ <VarDeclaration Comment="" Name="DWORD_O" Type="LINT"/>
+ <VarDeclaration Comment="" Name="LWORD_O" Type="USINT"/>
+ </OutputVars>
+ </InterfaceList>
+ <BasicFB>
+ <ECC>
+ <ECState Comment="Initial State" Name="START" x="550.0" y="425.0"/>
+ <ECState Comment="" Name="State" x="2375.0" y="295.0">
+ <ECAction Algorithm="Normal" Output="EO"/>
+ </ECState>
+ <ECState Comment="" Name="State_3" x="600.0" y="3000.0">
+ <ECAction Algorithm="Internal" Output="EO"/>
+ </ECState>
+ <ECTransition Comment="" Condition="Normal" Destination="State" Source="START" x="1605.0" y="380.0"/>
+ <ECTransition Comment="" Condition="1" Destination="START" Source="State" x="1645.0" y="605.0"/>
+ <ECTransition Comment="" Condition="Internal" Destination="State_3" Source="START" x="850.0" y="1460.0"/>
+ <ECTransition Comment="" Condition="1" Destination="START" Source="State_3" x="135.0" y="1840.0"/>
+ </ECC>
+ <Algorithm Comment="new algorithm" Name="Normal">
+ <ST Text="BOOL_O:=BOOL_I; BYTE_O:=BYTE_I; WORD_O:=WORD_I; DWORD_O:=DWORD_I; LWORD_O:=LWORD_I;"/>
+ </Algorithm>
+ <Algorithm Comment="new algorithm" Name="Internal">
+ <ST Text="BOOL_O:=1; BYTE_O:=2; WORD_O:=35555; DWORD_O:=2147483648; LWORD_O:=2147483648;"/>
+ </Algorithm>
+ </BasicFB>
+</FBType>
diff --git a/SystemTests/testfbforcodegenerator/BasicFBs/DataTypesFloatingPoints.fbt b/SystemTests/testfbforcodegenerator/BasicFBs/DataTypesFloatingPoints.fbt
new file mode 100644
index 0000000..5d13da1
--- /dev/null
+++ b/SystemTests/testfbforcodegenerator/BasicFBs/DataTypesFloatingPoints.fbt
@@ -0,0 +1,53 @@
+<?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="DataTypesFloatingPoints">
+ <Identification Description="Normal just propagates the input to the output Internal: sets the output from inside to pi and e 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="Normal" Type="Event">
+ <With Var="REAL_I"/>
+ <With Var="LREAL_I"/>
+ </Event>
+ <Event Comment="" Name="Internal" Type="Event">
+ <With Var="REAL_I"/>
+ <With Var="LREAL_I"/>
+ </Event>
+ </EventInputs>
+ <EventOutputs>
+ <Event Comment="" Name="EO" Type="Event">
+ <With Var="REAL_O"/>
+ <With Var="LREAL_O"/>
+ </Event>
+ </EventOutputs>
+ <InputVars>
+ <VarDeclaration Comment="" Name="REAL_I" Type="REAL"/>
+ <VarDeclaration Comment="" Name="LREAL_I" Type="REAL"/>
+ </InputVars>
+ <OutputVars>
+ <VarDeclaration Comment="" Name="REAL_O" Type="REAL"/>
+ <VarDeclaration Comment="" Name="LREAL_O" Type="LREAL"/>
+ </OutputVars>
+ </InterfaceList>
+ <BasicFB>
+ <ECC>
+ <ECState Comment="Initial State" Name="START" x="550.0" y="425.0"/>
+ <ECState Comment="" Name="State" x="2375.0" y="295.0">
+ <ECAction Algorithm="Normal" Output="EO"/>
+ </ECState>
+ <ECState Comment="" Name="State_3" x="600.0" y="3000.0">
+ <ECAction Algorithm="Internal" Output="EO"/>
+ </ECState>
+ <ECTransition Comment="" Condition="Normal" Destination="State" Source="START" x="1605.0" y="380.0"/>
+ <ECTransition Comment="" Condition="1" Destination="START" Source="State" x="1645.0" y="605.0"/>
+ <ECTransition Comment="" Condition="Internal" Destination="State_3" Source="START" x="850.0" y="1460.0"/>
+ <ECTransition Comment="" Condition="1" Destination="START" Source="State_3" x="135.0" y="1840.0"/>
+ </ECC>
+ <Algorithm Comment="new algorithm" Name="Normal">
+ <ST Text="REAL_O:=REAL_I; LREAL_O :=LREAL_I;"/>
+ </Algorithm>
+ <Algorithm Comment="new algorithm" Name="Internal">
+ <ST Text="REAL_O:=3.14159265359; LREAL_O :=2.7182818;"/>
+ </Algorithm>
+ </BasicFB>
+</FBType>
diff --git a/SystemTests/testfbforcodegenerator/BasicFBs/DataTypesInteger.fbt b/SystemTests/testfbforcodegenerator/BasicFBs/DataTypesInteger.fbt
new file mode 100644
index 0000000..9ac077e
--- /dev/null
+++ b/SystemTests/testfbforcodegenerator/BasicFBs/DataTypesInteger.fbt
@@ -0,0 +1,119 @@
+<?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="DataTypesInteger">
+ <Identification Description="Normal just propagates the input to the output Max: sets to the highest possible value Min: sets to the lowest possible value Internal: sets the output from inside 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="Normal" Type="Event">
+ <With Var="S_INT_I"/>
+ <With Var="INT_I"/>
+ <With Var="DINT_I"/>
+ <With Var="LINT_I"/>
+ <With Var="USINT_I"/>
+ <With Var="UIN_I"/>
+ <With Var="UDINT_I"/>
+ <With Var="ULINT_I"/>
+ </Event>
+ <Event Comment="" Name="Internal" Type="Event">
+ <With Var="S_INT_I"/>
+ <With Var="INT_I"/>
+ <With Var="DINT_I"/>
+ <With Var="LINT_I"/>
+ <With Var="USINT_I"/>
+ <With Var="UIN_I"/>
+ <With Var="UDINT_I"/>
+ <With Var="ULINT_I"/>
+ </Event>
+ <Event Comment="" Name="Max" Type="Event">
+ <With Var="S_INT_I"/>
+ <With Var="INT_I"/>
+ <With Var="DINT_I"/>
+ <With Var="LINT_I"/>
+ <With Var="USINT_I"/>
+ <With Var="UIN_I"/>
+ <With Var="UDINT_I"/>
+ <With Var="ULINT_I"/>
+ </Event>
+ <Event Comment="" Name="Min" Type="Event">
+ <With Var="INT_I"/>
+ <With Var="S_INT_I"/>
+ <With Var="DINT_I"/>
+ <With Var="LINT_I"/>
+ <With Var="USINT_I"/>
+ <With Var="UIN_I"/>
+ <With Var="UDINT_I"/>
+ <With Var="ULINT_I"/>
+ </Event>
+ </EventInputs>
+ <EventOutputs>
+ <Event Comment="" Name="Event_1" Type="Event">
+ <With Var="SINT1"/>
+ <With Var="INT1"/>
+ <With Var="DINT1"/>
+ <With Var="LINT1"/>
+ <With Var="USINT1"/>
+ <With Var="UINT1"/>
+ <With Var="UDINT1"/>
+ <With Var="ULINT1"/>
+ </Event>
+ </EventOutputs>
+ <InputVars>
+ <VarDeclaration Comment="" Name="S_INT_I" Type="SINT"/>
+ <VarDeclaration Comment="" Name="INT_I" Type="INT"/>
+ <VarDeclaration Comment="" Name="DINT_I" Type="DINT"/>
+ <VarDeclaration Comment="" Name="LINT_I" Type="LINT"/>
+ <VarDeclaration Comment="" Name="USINT_I" Type="USINT"/>
+ <VarDeclaration Comment="" Name="UIN_I" Type="UINT"/>
+ <VarDeclaration Comment="" Name="UDINT_I" Type="UDINT"/>
+ <VarDeclaration Comment="" Name="ULINT_I" Type="ULINT"/>
+ </InputVars>
+ <OutputVars>
+ <VarDeclaration Comment="" Name="SINT1" Type="SINT"/>
+ <VarDeclaration Comment="" Name="INT1" Type="INT"/>
+ <VarDeclaration Comment="" Name="DINT1" Type="DINT"/>
+ <VarDeclaration Comment="" Name="LINT1" Type="LINT"/>
+ <VarDeclaration Comment="" Name="USINT1" Type="USINT"/>
+ <VarDeclaration Comment="" Name="UINT1" Type="UINT"/>
+ <VarDeclaration Comment="" Name="UDINT1" Type="UDINT"/>
+ <VarDeclaration Comment="" Name="ULINT1" Type="ULINT"/>
+ </OutputVars>
+ </InterfaceList>
+ <BasicFB>
+ <ECC>
+ <ECState Comment="Initial State" Name="START" x="550.0" y="425.0"/>
+ <ECState Comment="" Name="State" x="2375.0" y="295.0">
+ <ECAction Algorithm="Normal" Output="Event_1"/>
+ </ECState>
+ <ECState Comment="" Name="State_1" x="2900.0" y="1200.0">
+ <ECAction Algorithm="Max" Output="Event_1"/>
+ </ECState>
+ <ECState Comment="" Name="State_2" x="2700.0" y="3000.0">
+ <ECAction Algorithm="Min" Output="Event_1"/>
+ </ECState>
+ <ECState Comment="" Name="State_3" x="600.0" y="3000.0">
+ <ECAction Algorithm="Internal" Output="Event_1"/>
+ </ECState>
+ <ECTransition Comment="" Condition="Normal" Destination="State" Source="START" x="1605.0" y="380.0"/>
+ <ECTransition Comment="" Condition="1" Destination="START" Source="State" x="1645.0" y="605.0"/>
+ <ECTransition Comment="" Condition="Max" Destination="State_1" Source="START" x="1375.0" y="865.0"/>
+ <ECTransition Comment="" Condition="1" Destination="START" Source="State_1" x="1490.0" y="1215.0"/>
+ <ECTransition Comment="" Condition="Min" Destination="State_2" Source="START" x="1075.0" y="1145.0"/>
+ <ECTransition Comment="" Condition="1" Destination="START" Source="State_2" x="565.0" y="1720.0"/>
+ <ECTransition Comment="" Condition="Internal" Destination="State_3" Source="START" x="850.0" y="1460.0"/>
+ <ECTransition Comment="" Condition="1" Destination="START" Source="State_3" x="135.0" y="1840.0"/>
+ </ECC>
+ <Algorithm Comment="new algorithm" Name="Normal">
+ <ST Text="SINT1 :=S_INT_I; INT1:=INT_I; DINT1:=DINT_I; LINT1:=LINT_I; USINT1:=USINT_I; UINT1:=UIN_I; UDINT1:=UDINT_I; ULINT1:=ULINT_I;"/>
+ </Algorithm>
+ <Algorithm Comment="new algorithm" Name="Max">
+ <ST Text="SINT1 :=127; INT1:=32767; DINT1:=2147483647; LINT1:=9223372036854775807; USINT1:=255; UINT1:=65535; UDINT1:=4294967295; ULINT1:=1;"/>
+ </Algorithm>
+ <Algorithm Comment="new algorithm" Name="Min">
+ <ST Text="SINT1 :=-128; INT1:=-32768; DINT1:=-2147483648; LINT1:=-9223372036854775808; USINT1:=0; UINT1:=0; UDINT1:=0; ULINT1:=0;"/>
+ </Algorithm>
+ <Algorithm Comment="new algorithm" Name="Internal">
+ <ST Text="SINT1 :=-10; INT1:=-20; DINT1:=-30; LINT1:=-40; USINT1:=50; UINT1:=60; UDINT1:=70; ULINT1:=80;"/>
+ </Algorithm>
+ </BasicFB>
+</FBType>
diff --git a/SystemTests/testfbforcodegenerator/BasicFBs/DataTypesString.fbt b/SystemTests/testfbforcodegenerator/BasicFBs/DataTypesString.fbt
new file mode 100644
index 0000000..ff70b31
--- /dev/null
+++ b/SystemTests/testfbforcodegenerator/BasicFBs/DataTypesString.fbt
@@ -0,0 +1,48 @@
+<?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="DataTypesString">
+ <Identification Description="Normal just propagates the input to the output Internal: sets the output from inside 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="Normal" Type="Event">
+ <With Var="String_I"/>
+ </Event>
+ <Event Comment="" Name="Internal" Type="Event">
+ <With Var="String_I"/>
+ </Event>
+ </EventInputs>
+ <EventOutputs>
+ <Event Comment="" Name="EO" Type="Event">
+ <With Var="String_O"/>
+ </Event>
+ </EventOutputs>
+ <InputVars>
+ <VarDeclaration Comment="" Name="String_I" Type="STRING"/>
+ </InputVars>
+ <OutputVars>
+ <VarDeclaration Comment="" Name="String_O" Type="STRING"/>
+ </OutputVars>
+ </InterfaceList>
+ <BasicFB>
+ <ECC>
+ <ECState Comment="Initial State" Name="START" x="550.0" y="425.0"/>
+ <ECState Comment="" Name="State" x="2375.0" y="295.0">
+ <ECAction Algorithm="Normal" Output="EO"/>
+ </ECState>
+ <ECState Comment="" Name="State_3" x="600.0" y="3000.0">
+ <ECAction Algorithm="Internal" Output="EO"/>
+ </ECState>
+ <ECTransition Comment="" Condition="Normal" Destination="State" Source="START" x="1605.0" y="380.0"/>
+ <ECTransition Comment="" Condition="1" Destination="START" Source="State" x="1645.0" y="605.0"/>
+ <ECTransition Comment="" Condition="Internal" Destination="State_3" Source="START" x="850.0" y="1460.0"/>
+ <ECTransition Comment="" Condition="1" Destination="START" Source="State_3" x="135.0" y="1840.0"/>
+ </ECC>
+ <Algorithm Comment="new algorithm" Name="Normal">
+ <ST Text="STRING_O:=STRING_I; "/>
+ </Algorithm>
+ <Algorithm Comment="new algorithm" Name="Internal">
+ <ST Text="STRING_O:='Setting from Interal';"/>
+ </Algorithm>
+ </BasicFB>
+</FBType>
diff --git a/SystemTests/testfbforcodegenerator/BasicFBs/DataTypesTime.fbt b/SystemTests/testfbforcodegenerator/BasicFBs/DataTypesTime.fbt
new file mode 100644
index 0000000..3280f20
--- /dev/null
+++ b/SystemTests/testfbforcodegenerator/BasicFBs/DataTypesTime.fbt
@@ -0,0 +1,48 @@
+<?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="DataTypesTime">
+ <Identification Description="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="Normal" Type="Event"/>
+ <Event Comment="" Name="Internal" Type="Event"/>
+ </EventInputs>
+ <EventOutputs>
+ <Event Comment="" Name="EO" Type="Event"/>
+ </EventOutputs>
+ <InputVars>
+ <VarDeclaration Comment="" Name="TIME_I" Type="TIME"/>
+ <VarDeclaration Comment="" Name="DATE_I" Type="DATE"/>
+ <VarDeclaration Comment="" Name="TOD_I" Type="TIME_OF_DAY"/>
+ <VarDeclaration Comment="" Name="DAT_I" Type="DATE_AND_TIME"/>
+ </InputVars>
+ <OutputVars>
+ <VarDeclaration Comment="" Name="TIME_O" Type="TIME"/>
+ <VarDeclaration Comment="" Name="DATE_O" Type="DATE"/>
+ <VarDeclaration Comment="" Name="TOD_O" Type="TIME_OF_DAY"/>
+ <VarDeclaration Comment="" Name="DAT_O" Type="DATE_AND_TIME"/>
+ </OutputVars>
+ </InterfaceList>
+ <BasicFB>
+ <ECC>
+ <ECState Comment="Initial State" Name="START" x="550.0" y="425.0"/>
+ <ECState Comment="" Name="State" x="4755.0" y="430.0">
+ <ECAction/>
+ </ECState>
+ <ECState Comment="" Name="State_1" x="1680.0" y="1775.0">
+ <ECAction/>
+ </ECState>
+ <ECTransition Comment="" Condition="Normal" Destination="State" Source="START" x="2775.0" y="465.0"/>
+ <ECTransition Comment="" Condition="1" Destination="START" Source="State" x="2870.0" y="920.0"/>
+ <ECTransition Comment="" Condition="Internal" Destination="State_1" Source="START" x="1245.0" y="1150.0"/>
+ <ECTransition Comment="" Condition="1" Destination="START" Source="State_1" x="760.0" y="1490.0"/>
+ </ECC>
+ <Algorithm Comment="new algorithm" Name="Normal">
+ <ST Text="TIME_O:=TIME_I; DATE_O:=DATE_I; TOD_O:=TOD_I; DAT_O:=DAT_I;"/>
+ </Algorithm>
+ <Algorithm Comment="new algorithm" Name="Internal">
+ <ST Text="TIME_O:=TIME#1m; DATE_O:=D#1996-08-12; TOD_O:=TOD#06:06:66; DAT_O:=DT#1989-06-15-13:56:14.77;"/>
+ </Algorithm>
+ </BasicFB>
+</FBType>
diff --git a/SystemTests/testfbforcodegenerator/BasicFBs/InternalVariables.fbt b/SystemTests/testfbforcodegenerator/BasicFBs/InternalVariables.fbt
new file mode 100644
index 0000000..4839a9d
--- /dev/null
+++ b/SystemTests/testfbforcodegenerator/BasicFBs/InternalVariables.fbt
@@ -0,0 +1,47 @@
+<?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="InternalVariables">
+ <Identification Description="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="Jan Holzweber" Date="2019-06-10" Version="1.0"/>
+ <InterfaceList>
+ <EventInputs>
+ <Event Comment="" Name="A_PLUS" Type="Event"/>
+ <Event Comment="" Name="B_MINUS" Type="Event"/>
+ </EventInputs>
+ <EventOutputs>
+ <Event Comment="" Name="EO" Type="Event">
+ <With Var="A_O"/>
+ <With Var="B_O"/>
+ </Event>
+ </EventOutputs>
+ <OutputVars>
+ <VarDeclaration Comment="" Name="A_O" Type="INT"/>
+ <VarDeclaration Comment="" Name="B_O" Type="INT"/>
+ </OutputVars>
+ </InterfaceList>
+ <BasicFB>
+ <InternalVars>
+ <VarDeclaration Comment="Internal Variable" InitialValue="0" Name="A" Type="INT"/>
+ <VarDeclaration Comment="Internal Variable" InitialValue="0" Name="B" Type="INT"/>
+ </InternalVars>
+ <ECC>
+ <ECState Comment="Initial State" Name="START" x="550.0" y="425.0"/>
+ <ECState Comment="" Name="State" x="3175.0" y="585.0">
+ <ECAction Algorithm="A_PLUS" Output="EO"/>
+ </ECState>
+ <ECState Comment="" Name="State_1" x="1230.0" y="1480.0">
+ <ECAction Algorithm="B_PLUS" Output="EO"/>
+ </ECState>
+ <ECTransition Comment="" Condition="A_PLUS" Destination="State" Source="START" x="2080.0" y="310.0"/>
+ <ECTransition Comment="" Condition="1" Destination="START" Source="State" x="1990.0" y="950.0"/>
+ <ECTransition Comment="" Condition="1" Destination="START" Source="State_1" x="575.0" y="1240.0"/>
+ <ECTransition Comment="" Condition="B_MINUS" Destination="State_1" Source="START" x="1210.0" y="1010.0"/>
+ </ECC>
+ <Algorithm Comment="new algorithm" Name="A_PLUS">
+ <ST Text="A_O:=A; A:=A+1;"/>
+ </Algorithm>
+ <Algorithm Comment="new algorithm" Name="B_PLUS">
+ <ST Text="B_O:=B; B:=B-1;"/>
+ </Algorithm>
+ </BasicFB>
+</FBType>
diff --git a/SystemTests/testfbforcodegenerator/BasicFBs/LoopFOR.fbt b/SystemTests/testfbforcodegenerator/BasicFBs/LoopFOR.fbt
new file mode 100644
index 0000000..bc806bd
--- /dev/null
+++ b/SystemTests/testfbforcodegenerator/BasicFBs/LoopFOR.fbt
@@ -0,0 +1,40 @@
+<?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="LoopFOR">
+ <Identification Description="Summs up to the iteraTIONS 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="EI" Type="Event">
+ <With Var="Iterations"/>
+ </Event>
+ </EventInputs>
+ <EventOutputs>
+ <Event Comment="" Name="EO" Type="Event">
+ <With Var="O"/>
+ </Event>
+ </EventOutputs>
+ <InputVars>
+ <VarDeclaration Comment="" Name="Iterations" Type="INT"/>
+ </InputVars>
+ <OutputVars>
+ <VarDeclaration Comment="" Name="O" Type="INT"/>
+ </OutputVars>
+ </InterfaceList>
+ <BasicFB>
+ <InternalVars>
+ <VarDeclaration Comment="Internal Variable" InitialValue="0" Name="i" Type="INT"/>
+ </InternalVars>
+ <ECC>
+ <ECState Comment="Initial State" Name="START" x="550.0" y="425.0"/>
+ <ECState Comment="" Name="State" x="2860.0" y="650.0">
+ <ECAction Algorithm="FOR" Output="EO"/>
+ </ECState>
+ <ECTransition Comment="" Condition="EI" Destination="State" Source="START" x="2010.0" y="435.0"/>
+ <ECTransition Comment="" Condition="1" Destination="START" Source="State" x="1840.0" y="770.0"/>
+ </ECC>
+ <Algorithm Comment="new algorithm" Name="FOR">
+ <ST Text="FOR i := 0 TO Iterations BY 1 DO 	O := O+i; END_FOR;"/>
+ </Algorithm>
+ </BasicFB>
+</FBType>
diff --git a/SystemTests/testfbforcodegenerator/BasicFBs/LoopREPEAT.fbt b/SystemTests/testfbforcodegenerator/BasicFBs/LoopREPEAT.fbt
new file mode 100644
index 0000000..6ab5062
--- /dev/null
+++ b/SystemTests/testfbforcodegenerator/BasicFBs/LoopREPEAT.fbt
@@ -0,0 +1,40 @@
+<?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="LoopREPEAT">
+ <Identification Description="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="EI" Type="Event">
+ <With Var="Iterations"/>
+ </Event>
+ </EventInputs>
+ <EventOutputs>
+ <Event Comment="" Name="EO" Type="Event">
+ <With Var="O"/>
+ </Event>
+ </EventOutputs>
+ <InputVars>
+ <VarDeclaration Comment="" Name="Iterations" Type="INT"/>
+ </InputVars>
+ <OutputVars>
+ <VarDeclaration Comment="" Name="O" Type="INT"/>
+ </OutputVars>
+ </InterfaceList>
+ <BasicFB>
+ <InternalVars>
+ <VarDeclaration Comment="Internal Variable" InitialValue="0" Name="i" Type="INT"/>
+ </InternalVars>
+ <ECC>
+ <ECState Comment="Initial State" Name="START" x="550.0" y="425.0"/>
+ <ECState Comment="" Name="State" x="2860.0" y="650.0">
+ <ECAction Algorithm="REPEAT" Output="EO"/>
+ </ECState>
+ <ECTransition Comment="" Condition="EI" Destination="State" Source="START" x="2010.0" y="435.0"/>
+ <ECTransition Comment="" Condition="1" Destination="START" Source="State" x="1840.0" y="770.0"/>
+ </ECC>
+ <Algorithm Comment="new algorithm" Name="REPEAT">
+ <ST Text="REPEAT 	O := O+i; 	i:= i+1; UNTIL i < Iterations END_REPEAT;"/>
+ </Algorithm>
+ </BasicFB>
+</FBType>
diff --git a/SystemTests/testfbforcodegenerator/BasicFBs/LoopWHILE.fbt b/SystemTests/testfbforcodegenerator/BasicFBs/LoopWHILE.fbt
new file mode 100644
index 0000000..6665aa3
--- /dev/null
+++ b/SystemTests/testfbforcodegenerator/BasicFBs/LoopWHILE.fbt
@@ -0,0 +1,40 @@
+<?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="LoopWHILE">
+ <Identification Description="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="EI" Type="Event">
+ <With Var="Iterations"/>
+ </Event>
+ </EventInputs>
+ <EventOutputs>
+ <Event Comment="" Name="EO" Type="Event">
+ <With Var="O"/>
+ </Event>
+ </EventOutputs>
+ <InputVars>
+ <VarDeclaration Comment="" Name="Iterations" Type="INT"/>
+ </InputVars>
+ <OutputVars>
+ <VarDeclaration Comment="" Name="O" Type="INT"/>
+ </OutputVars>
+ </InterfaceList>
+ <BasicFB>
+ <InternalVars>
+ <VarDeclaration Comment="Internal Variable" InitialValue="0" Name="i" Type="INT"/>
+ </InternalVars>
+ <ECC>
+ <ECState Comment="Initial State" Name="START" x="550.0" y="425.0"/>
+ <ECState Comment="" Name="State" x="2860.0" y="650.0">
+ <ECAction Algorithm="WHILE" Output="EO"/>
+ </ECState>
+ <ECTransition Comment="" Condition="EI" Destination="State" Source="START" x="2010.0" y="435.0"/>
+ <ECTransition Comment="" Condition="1" Destination="START" Source="State" x="1840.0" y="770.0"/>
+ </ECC>
+ <Algorithm Comment="new algorithm" Name="WHILE">
+ <ST Text="WHILE i < Iterations DO 	O := O+i; 	i:= i+1; END_WHILE;"/>
+ </Algorithm>
+ </BasicFB>
+</FBType>
diff --git a/SystemTests/testfbforcodegenerator/BasicFBs/OperatorArithmetic.fbt b/SystemTests/testfbforcodegenerator/BasicFBs/OperatorArithmetic.fbt
new file mode 100644
index 0000000..8303684
--- /dev/null
+++ b/SystemTests/testfbforcodegenerator/BasicFBs/OperatorArithmetic.fbt
@@ -0,0 +1,99 @@
+<?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 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="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>
diff --git a/SystemTests/testfbforcodegenerator/BasicFBs/OperatorBitwise.fbt b/SystemTests/testfbforcodegenerator/BasicFBs/OperatorBitwise.fbt
new file mode 100644
index 0000000..c3390c3
--- /dev/null
+++ b/SystemTests/testfbforcodegenerator/BasicFBs/OperatorBitwise.fbt
@@ -0,0 +1,80 @@
+<?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="OperatorBitwise">
+ <Identification Description="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="AND_" Type="Event">
+ <With Var="A"/>
+ <With Var="B"/>
+ <With Var="C"/>
+ </Event>
+ <Event Comment="" Name="OR_" Type="Event">
+ <With Var="A"/>
+ <With Var="B"/>
+ <With Var="C"/>
+ </Event>
+ <Event Comment="" Name="XOR_" Type="Event">
+ <With Var="A"/>
+ <With Var="B"/>
+ <With Var="C"/>
+ </Event>
+ <Event Comment="" Name="NOT_" Type="Event">
+ <With Var="A"/>
+ <With Var="B"/>
+ <With Var="C"/>
+ </Event>
+ </EventInputs>
+ <EventOutputs>
+ <Event Comment="" Name="EO" Type="Event">
+ <With Var="OUT"/>
+ </Event>
+ </EventOutputs>
+ <InputVars>
+ <VarDeclaration Comment="" Name="A" Type="BYTE"/>
+ <VarDeclaration Comment="" Name="B" Type="BYTE"/>
+ <VarDeclaration Comment="" Name="C" Type="BYTE"/>
+ </InputVars>
+ <OutputVars>
+ <VarDeclaration Comment="" Name="OUT" Type="BYTE"/>
+ </OutputVars>
+ </InterfaceList>
+ <BasicFB>
+ <ECC>
+ <ECState Comment="Initial State" Name="START" x="4300.0" y="1900.0"/>
+ <ECState Comment="" Name="State_1" x="4590.0" y="545.0">
+ <ECAction Algorithm="AND" Output="EO"/>
+ </ECState>
+ <ECState Comment="" Name="State_2" x="7055.0" y="1570.0">
+ <ECAction Algorithm="OR" Output="EO"/>
+ </ECState>
+ <ECState Comment="" Name="State_3" x="6220.0" y="2925.0">
+ <ECAction Algorithm="XOR" Output="EO"/>
+ </ECState>
+ <ECState Comment="" Name="State_4" x="4225.0" y="3050.0">
+ <ECAction Algorithm="NOT" Output="EO"/>
+ </ECState>
+ <ECTransition Comment="" Condition="1" Destination="START" Source="State_1" x="5135.0" y="1250.0"/>
+ <ECTransition Comment="" Condition="AND_" Destination="State_1" Source="START" x="4385.0" y="1185.0"/>
+ <ECTransition Comment="" Condition="OR_" Destination="State_2" Source="START" x="5845.0" y="1465.0"/>
+ <ECTransition Comment="" Condition="XOR_" Destination="State_3" Source="START" x="5585.0" y="2270.0"/>
+ <ECTransition Comment="" Condition="NOT_" Destination="State_4" Source="START" x="4400.0" y="2540.0"/>
+ <ECTransition Comment="" Condition="1" Destination="START" Source="State_4" x="3740.0" y="2505.0"/>
+ <ECTransition Comment="" Condition="1" Destination="START" Source="State_3" x="5210.0" y="2730.0"/>
+ <ECTransition Comment="" Condition="1" Destination="START" Source="State_2" x="5815.0" y="2175.0"/>
+ </ECC>
+ <Algorithm Comment="new algorithm" Name="AND">
+ <ST Text="OUT:=(A and B and C);"/>
+ </Algorithm>
+ <Algorithm Comment="new algorithm" Name="OR">
+ <ST Text="OUT:=(A or B);"/>
+ </Algorithm>
+ <Algorithm Comment="new algorithm" Name="XOR">
+ <ST Text="OUT:=(A XOR B);"/>
+ </Algorithm>
+ <Algorithm Comment="new algorithm" Name="NOT">
+ <ST Text="OUT:=NOT A;"/>
+ </Algorithm>
+ </BasicFB>
+</FBType>
diff --git a/SystemTests/testfbforcodegenerator/BasicFBs/OperatorLogical.fbt b/SystemTests/testfbforcodegenerator/BasicFBs/OperatorLogical.fbt
new file mode 100644
index 0000000..e71edb7
--- /dev/null
+++ b/SystemTests/testfbforcodegenerator/BasicFBs/OperatorLogical.fbt
@@ -0,0 +1,80 @@
+<?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="OperatorLogical">
+ <Identification Description="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="AND_" Type="Event">
+ <With Var="A"/>
+ <With Var="B"/>
+ <With Var="C"/>
+ </Event>
+ <Event Comment="" Name="OR_" Type="Event">
+ <With Var="A"/>
+ <With Var="B"/>
+ <With Var="C"/>
+ </Event>
+ <Event Comment="" Name="XOR_" Type="Event">
+ <With Var="A"/>
+ <With Var="B"/>
+ <With Var="C"/>
+ </Event>
+ <Event Comment="" Name="NOT_" Type="Event">
+ <With Var="A"/>
+ <With Var="B"/>
+ <With Var="C"/>
+ </Event>
+ </EventInputs>
+ <EventOutputs>
+ <Event Comment="" Name="EO" Type="Event">
+ <With Var="OUT"/>
+ </Event>
+ </EventOutputs>
+ <InputVars>
+ <VarDeclaration Comment="" Name="A" Type="BOOL"/>
+ <VarDeclaration Comment="" Name="B" Type="BOOL"/>
+ <VarDeclaration Comment="" Name="C" Type="BOOL"/>
+ </InputVars>
+ <OutputVars>
+ <VarDeclaration Comment="" Name="OUT" Type="BOOL"/>
+ </OutputVars>
+ </InterfaceList>
+ <BasicFB>
+ <ECC>
+ <ECState Comment="Initial State" Name="START" x="4300.0" y="1900.0"/>
+ <ECState Comment="" Name="State_1" x="4590.0" y="545.0">
+ <ECAction Algorithm="AND" Output="EO"/>
+ </ECState>
+ <ECState Comment="" Name="State_2" x="7055.0" y="1570.0">
+ <ECAction Algorithm="OR" Output="EO"/>
+ </ECState>
+ <ECState Comment="" Name="State_3" x="6220.0" y="2925.0">
+ <ECAction Algorithm="XOR" Output="EO"/>
+ </ECState>
+ <ECState Comment="" Name="State_4" x="4225.0" y="3050.0">
+ <ECAction Algorithm="NOT" Output="EO"/>
+ </ECState>
+ <ECTransition Comment="" Condition="1" Destination="START" Source="State_1" x="5135.0" y="1250.0"/>
+ <ECTransition Comment="" Condition="AND_" Destination="State_1" Source="START" x="4385.0" y="1185.0"/>
+ <ECTransition Comment="" Condition="OR_" Destination="State_2" Source="START" x="5865.0" y="1785.0"/>
+ <ECTransition Comment="" Condition="XOR_" Destination="State_3" Source="START" x="5390.0" y="2465.0"/>
+ <ECTransition Comment="" Condition="NOT_" Destination="State_4" Source="START" x="4400.0" y="2540.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="AND">
+ <ST Text="OUT:=A and B and C;"/>
+ </Algorithm>
+ <Algorithm Comment="new algorithm" Name="OR">
+ <ST Text="OUT:=A or B or C ;"/>
+ </Algorithm>
+ <Algorithm Comment="new algorithm" Name="XOR">
+ <ST Text="OUT:=A XOR B XOR C;"/>
+ </Algorithm>
+ <Algorithm Comment="new algorithm" Name="NOT">
+ <ST Text="OUT:=NOT A;"/>
+ </Algorithm>
+ </BasicFB>
+</FBType>
diff --git a/SystemTests/testfbforcodegenerator/BasicFBs/OperatorRelational.fbt b/SystemTests/testfbforcodegenerator/BasicFBs/OperatorRelational.fbt
new file mode 100644
index 0000000..16919bc
--- /dev/null
+++ b/SystemTests/testfbforcodegenerator/BasicFBs/OperatorRelational.fbt
@@ -0,0 +1,99 @@
+<?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="OperatorRelational">
+ <Identification Description="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="EQUAL" Type="Event">
+ <With Var="A"/>
+ <With Var="B"/>
+ </Event>
+ <Event Comment="" Name="LESS" Type="Event">
+ <With Var="A"/>
+ <With Var="B"/>
+ </Event>
+ <Event Comment="" Name="LESSEQUAL" Type="Event">
+ <With Var="A"/>
+ <With Var="B"/>
+ </Event>
+ <Event Comment="" Name="GRT" Type="Event">
+ <With Var="A"/>
+ <With Var="B"/>
+ </Event>
+ <Event Comment="" Name="GRTEQ" Type="Event">
+ <With Var="A"/>
+ <With Var="B"/>
+ </Event>
+ <Event Comment="" Name="NOTEQ" 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="INT"/>
+ <VarDeclaration Comment="" Name="B" Type="INT"/>
+ </InputVars>
+ <OutputVars>
+ <VarDeclaration Comment="" Name="OUT" Type="BOOL"/>
+ </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="NOTEQ" Output="EO"/>
+ </ECState>
+ <ECState Comment="" Name="State_1" x="4590.0" y="545.0">
+ <ECAction Algorithm="EQ" Output="EO"/>
+ </ECState>
+ <ECState Comment="" Name="State_2" x="7055.0" y="1570.0">
+ <ECAction Algorithm="LESS" Output="EO"/>
+ </ECState>
+ <ECState Comment="" Name="State_3" x="6220.0" y="2925.0">
+ <ECAction Algorithm="LESSEQ" Output="EO"/>
+ </ECState>
+ <ECState Comment="" Name="State_4" x="4225.0" y="3050.0">
+ <ECAction Algorithm="GRT" Output="EO"/>
+ </ECState>
+ <ECState Comment="" Name="State_5" x="2535.0" y="2620.0">
+ <ECAction Algorithm="GRTEQ" Output="EO"/>
+ </ECState>
+ <ECTransition Comment="" Condition="1" Destination="START" Source="State_1" x="5135.0" y="1250.0"/>
+ <ECTransition Comment="" Condition="EQUAL" Destination="State_1" Source="START" x="4385.0" y="1185.0"/>
+ <ECTransition Comment="" Condition="LESS" Destination="State_2" Source="START" x="5945.0" y="1565.0"/>
+ <ECTransition Comment="" Condition="LESSEQUAL" Destination="State_3" Source="START" x="5770.0" y="2270.0"/>
+ <ECTransition Comment="" Condition="GRT" Destination="State_4" Source="START" x="4630.0" y="2545.0"/>
+ <ECTransition Comment="" Condition="GRTEQ" Destination="State_5" Source="START" x="3660.0" y="2540.0"/>
+ <ECTransition Comment="" Condition="NOTEQ" Destination="State" Source="START" x="3070.0" y="1845.0"/>
+ <ECTransition Comment="" Condition="1" Destination="START" Source="State" x="3765.0" y="1170.0"/>
+ <ECTransition Comment="" Condition="1" Destination="START" Source="State_5" x="3180.0" y="2005.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="6065.0" y="1905.0"/>
+ </ECC>
+ <Algorithm Comment="new algorithm" Name="EQ">
+ <ST Text="OUT:=A=B;"/>
+ </Algorithm>
+ <Algorithm Comment="new algorithm" Name="LESS">
+ <ST Text="OUT:=A<B;"/>
+ </Algorithm>
+ <Algorithm Comment="new algorithm" Name="LESSEQ">
+ <ST Text="OUT:=A<=B;"/>
+ </Algorithm>
+ <Algorithm Comment="new algorithm" Name="GRT">
+ <ST Text="OUT:=A>B;"/>
+ </Algorithm>
+ <Algorithm Comment="new algorithm" Name="GRTEQ">
+ <ST Text="OUT:=A >=B;"/>
+ </Algorithm>
+ <Algorithm Comment="new algorithm" Name="NOTEQ">
+ <ST Text="OUT:=A <> B;"/>
+ </Algorithm>
+ </BasicFB>
+</FBType>