diff --git a/src/build-server/FlowForge.BuildServer.sln b/src/build-server/FlowForge.BuildServer.sln
index 50108a8..8ccb795 100644
--- a/src/build-server/FlowForge.BuildServer.sln
+++ b/src/build-server/FlowForge.BuildServer.sln
@@ -5,6 +5,8 @@ VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FlowForge.BuildServer", "src\FlowForge.BuildServer\FlowForge.BuildServer.csproj", "{B2C3D4E5-F6A7-8901-BCDE-F12345678901}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FlowForge.Shared", "..\shared\FlowForge.Shared\FlowForge.Shared.csproj", "{F3A4B5C6-D7E8-9012-CDEF-123456789013}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -15,5 +17,9 @@ Global
{B2C3D4E5-F6A7-8901-BCDE-F12345678901}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B2C3D4E5-F6A7-8901-BCDE-F12345678901}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B2C3D4E5-F6A7-8901-BCDE-F12345678901}.Release|Any CPU.Build.0 = Release|Any CPU
+ {F3A4B5C6-D7E8-9012-CDEF-123456789013}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {F3A4B5C6-D7E8-9012-CDEF-123456789013}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {F3A4B5C6-D7E8-9012-CDEF-123456789013}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {F3A4B5C6-D7E8-9012-CDEF-123456789013}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/CodeGenerationDemo.exe.config b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/CodeGenerationDemo.exe.config
new file mode 100644
index 0000000..cb2586b
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/CodeGenerationDemo.exe.config
@@ -0,0 +1,3 @@
+
+
+
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Orders.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Orders.xml
new file mode 100644
index 0000000..28e5dee
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Orders.xml
@@ -0,0 +1,167 @@
+
+
+
+ ConfigA
+ Beckhoff Automation GmbH
+ 2012-11-30
+ 10001
+ Test01
+ Please run extended Hardware Test!
+
+
+ ConfigB
+ Beckhoff Automation GmbH
+ 2013-02-28
+ 10051
+ Test02
+ Deliver together with Serial number 10039
+
+
+ ConfigD
+ Beckhoff Automation GmbH
+ 2013-11-12
+ 10042
+ Test03
+ Include Hardware Simulation
+
+
+
+
+
+
+
+
+
+
+ 2-Axes, PTP Motion, Servo Terminal not included
+
+ MachineTypeA
+
+
+ Tc2_Standard
+ Tc2_System
+ Tc3_Interfaces
+ Tc3_Module
+ Tc2_MC2
+ Tc2_MC2_Drive
+ Templates/MachineTypeA/POUs/FB_Axis.xml
+ Templates/MachineTypeA/POUs/MAIN.xml
+ >
+
+
+
+
+ Templates/MachineTypeA/Axis1.xml
+ Templates/MachineTypeA/Axis2.xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Templates/MachineTypeA/Links.xml
+
+
+
+
+
+
+
+
+ 4-Axes, NCI
+
+ MachineTypeB
+
+
+ Tc2_Standard
+ Tc2_System
+ Tc3_Interfaces
+ Tc3_Module
+ Tc2_MC2
+ Tc2_NCI
+ Templates/MachineTypeB/Datatypes/E_Commands.xml
+ Templates/MachineTypeB/Datatypes/E_NCI_CTRL_STATE.xml
+ Templates/MachineTypeB/Datatypes/E_States.xml
+ Templates/MachineTypeB/GVLs/GlobalVariables.xml
+ Templates/MachineTypeB/POUs/FB_NciChannel.xml
+ Templates/MachineTypeB/POUs/FB_NciSequence.xml
+ Templates/MachineTypeB/POUs/MAIN.xml
+
+
+
+
+
+ Templates/MachineTypeB/Axis1.xml
+ Templates/MachineTypeB/Axis2.xml
+ Templates/MachineTypeB/Axis3.xml
+ Templates/MachineTypeB/Axis4.xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Templates/MachineTypeB/Links.xml
+
+
+
+
+
+ PLC project, Measurement project
+
+ MachineTypeD
+
+ Tc2_Standard
+ Tc2_System
+ Tc3_Interfaces
+ Tc3_Module
+ Templates/MachineTypeD/Datatypes/E_FunctionType.xml
+ Templates/MachineTypeD/POUs/FB_FunctionGenerator.xml
+ Templates/MachineTypeD/POUs/MAIN.xml
+ Templates/MachineTypeD/GVLs/GVL_Constants.xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/ScriptingTestContainerBase.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/ScriptingTestContainerBase.xml
new file mode 100644
index 0000000..9cc0bf6
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/ScriptingTestContainerBase.xml
@@ -0,0 +1,3893 @@
+
+
+
+ ScriptingTestContainerBase
+
+
+
+
+ Progress provider interface
+
+
+
+
+ Sets the progress.
+
+ The progress.
+
+
+
+ Gets or sets the status string.
+
+ The status.
+
+
+
+ Occurs when the progress has been changed.
+
+
+
+
+ Occurs when the status has been changed.
+
+
+
+
+ Event arguments indicating, that the Progress status has been changed.
+
+
+
+
+ Contains the current Status as string
+
+
+
+
+ Initializes a new instance of the class.
+
+ The status.
+
+
+
+ Default MacIds
+
+
+
+
+ Broadcast Address
+
+
+
+
+ First Multicast Address
+
+
+
+
+ Empty Address
+
+
+
+
+ EtherCAT Multicast Address
+
+
+
+
+ Network variables Multicast Address
+
+
+
+
+ Profinet DCP Multicast Address
+
+
+
+
+ AMS/ADS Net ID
+
+
+
+
+ Constructor
+
+
+
+
+
+ Converts the netId to string
+
+
+
+
+ Converts the NetId object to byte array
+
+
+
+
+
+ Converts the string representation of the address to .
+
+
+
+
+
+
+
+ Converts the string representation of the address to .
+
+
+
+
+
+
+ Creates an empty NetId ("0.0.0.0.0.0")
+
+
+
+
+ Creates the local NetId ("127.0.0.1.1.1")
+
+
+
+
+ TwinCAT Configuration Factory interface
+
+
+
+
+ Initializes the factory (Creates the configuration)
+
+
+
+
+ Executes the script.
+
+ The script to execute
+
+
+
+ Closes the configuration.
+
+
+
+
+ Gets or sets the Application ID for the TwinCAT XAE Shell
+
+ The app ID.
+
+
+
+ Gets or sets a value indicating whether the IDE will be shown during Script processing
+
+ true if [show application]; otherwise, false.
+
+
+
+ Gets or sets a value indicating whether the IDE instance will left to UserControl after script execution.
+
+
+ true if this instance is IDE user control; otherwise, false.
+
+
+
+
+ Gets a value indicating whether an TwinCAT XAE Configuration is opened by this factory class.
+
+
+ true if this instance is configuration open; otherwise, false.
+
+
+
+
+ Gets a value indicating whether this instance is generating.
+
+
+ true if this instance is generating; otherwise, false.
+
+
+
+
+ Gets the created DTE object.
+
+ The DTE.
+
+
+
+ Gets created solution object.
+
+ The solution.
+
+
+
+ Gets the Visual Studio Factory
+
+
+ The Visual Studio Factory
+
+
+
+
+ Gets the Visual Studio Process ID.
+
+ The Visual Studio process identifier.
+
+
+
+ DTE Info Object
+
+
+
+
+ DTE Name
+
+
+
+
+ DTE Prog ID
+
+
+
+
+ DTE Guid
+
+
+
+
+ Initializes a new instance of the class.
+
+ The name.
+ The prog id.
+ The GUID.
+
+
+
+ Returns a that represents this instance.
+
+
+ A that represents this instance.
+
+
+
+
+ Visual Studio Factory interface
+
+
+
+
+ Creates the DTE.
+
+ Application ID to use.
+ if set to true the ide will be visible.
+ if set to true UI will be suppressed.
+ if set to true Visual Studio will be started with user control.
+
+
+
+
+ Creates a new Visual Studio project.
+
+ DTE object.
+ Name of the project.
+ The template path.
+ The project root folder.
+
+
+
+
+ Visual Studio Factory implementation
+
+
+
+
+ Creates the DTE.
+
+ Application ID to use.
+ if set to true the ide will be visible.
+ if set to true UI will be suppressed.
+ if set to true Visual Studio will be started with user control.
+
+
+
+
+ Creates the new project.
+
+ The DTE Object.
+ Name of the project.
+ The template path.
+ The script root folder.
+
+
+
+
+ Abstract implementation of the interface.
+
+
+
+
+ ProgID of the VisualStudio.DTE object
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Handler function creating the Visual Studio instance.
+
+
+
+
+
+ Creates the solution and project configuration for the script.
+
+
+
+
+ Handler function to create the script configuration.
+
+
+
+
+ Executes the specified script with the specified worker context.
+
+ The script to execute.
+
+
+
+ Closes the configuration / Configuration Cleanup
+
+
+
+
+ Handler function for Configuration cleanup.
+
+
+
+
+ Gets a dictionary of the currently installed Visual Studio ProgIds.
+
+ Current index.
+ Default index.
+
+
+
+
+ Application ID of the Program to be created
+
+
+
+
+ Indicates that the configuration is open.
+
+
+
+
+ Indicates that a script is executing
+
+
+
+
+ Gets the currently used application path.
+
+ The application path.
+
+
+
+ Occurs when the Visual Studio instance is initialized and the configuration(s) are open.
+
+
+
+
+ Gets or sets the Application ID
+
+ The app ID.
+
+
+
+ Gets a value indicating whether a configuration is opened.
+
+
+ true if this instance is configuration open; otherwise, false.
+
+
+
+
+ Gets a value indicating whether a script created by this Factory is Executing.
+
+
+ true if this instance is generating; otherwise, false.
+
+
+
+
+ VisualStudio.DTE object created by this factory.
+
+ The DTE.
+
+
+
+ VisualStudio Solution created by this factory.
+
+ The solution.
+
+
+
+ Gets or sets a value indicating whether the IDE will be shown during Script processing
+
+ true if [show application]; otherwise, false.
+
+
+
+ Gets or sets a value indicating whether this instance is IDE user control.
+
+
+ true if this instance is IDE user control; otherwise, false.
+
+
+
+
+ Gets or sets a value indicating whether UI in Visual Studio is supressed.
+
+ true if UI is suppressed; otherwise, false.
+
+
+
+ Gets the Visual Studio Factory
+
+
+ The Visual Studio Factory
+
+
+
+
+ Gets the Visual Studio Process ID.
+
+ The Visual Studio process identifier.
+
+
+
+ Configuration Factory for Early Binding
+
+ DTE and Solution objects are stored in static types.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Tree Item Type for the Tree Item
+
+ This is the CLS-compliant, corresponding type to TCatSysManagerLibs TREEITEMTYPE
+
+
+
+ NotProcessed Tree Item object (Uninitialized, 0)
+
+
+
+
+ System configuration Tree Item ("SYSTEM-Konfiguration") TIRC (Has no valid Type at the moment == 0)
+
+
+
+
+ Task item (Task, 1)
+
+
+
+
+ Device item (Device, 2)
+
+
+
+
+ Process-Image (Image, 3)
+
+
+
+
+ Mapping (Mapping, 4)
+
+
+
+
+ Box item (Box, 5)
+
+
+
+
+ Terminal item (Term, 6)
+
+
+
+
+ Variable / Symbol item (Var, 7)
+
+
+
+
+ Variable group item (VarGrp, 8) or Channels in Terminals
+
+
+
+
+ PlcControl project item (IecPrj, 9)
+
+
+
+
+ Cnc Project Item. (CncPrj, 10)
+
+
+
+
+ GSD Described Module
+
+
+
+
+ CDL Item.
+
+
+
+
+ PLC Runtime item (IecLzs, 13)
+
+
+
+
+
+
+
+
+
+ Plc configuration (LzsGrp)
+
+
+
+
+ IO configuration
+
+
+
+
+ Additional Tasks (AddTasks, 16)
+
+
+
+
+ Device Group Item
+
+
+
+
+ Map Group
+
+
+
+
+ NC Configuration (NCDEF, 19)
+
+
+
+
+ NC Axes
+
+
+
+
+ NC Channel (e.g. the Node 'Axes') (NCChannel, 21)
+
+
+
+
+ NC Axis
+
+
+
+
+ Axis Encoder (ID: 23)
+
+
+
+
+ Axis drive (ID: 24)
+
+
+
+
+ Axis controller
+
+
+
+
+ NC Group
+
+
+
+
+ NC Interpreter
+
+
+
+
+ CanPDO
+
+
+
+
+ Real time Settings ATTENTION THE TYPE IS IDENTICAL TO RouteSettings(RTimeSet, 31)
+
+
+
+
+ Route Settings (RTimeSet, 31)
+
+
+
+
+ PLC Variables of the BC
+
+
+
+
+ File Name item.
+
+
+
+
+ DnetConnect.
+
+
+
+
+ Network variable publisher
+
+
+
+
+ Network variable subscriber
+
+
+
+
+ FlbCmd
+
+
+
+
+ NC Table Group Item
+
+
+
+
+ NC Table
+
+
+
+
+ NC Table Slave Item.
+
+
+
+
+ EipConnection item.
+
+
+
+
+ PnIoApi Item.
+
+
+
+
+ PnIoMod Item.
+
+
+
+
+ PnIoSubMod item.
+
+
+
+
+ Ethernet Protocol Item.
+
+
+
+
+ TCOM object (48)
+ x0d\x0a
+
+
+
+ TCOM Object group (49)
+
+
+
+
+ UdpIpSendData Item.
+
+
+
+
+ UdpIpReceiveData Item.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Nested Plc Project (56)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ "TIAC" CAM Configuration
+
+ Path: "TIAC"
+
+
+
+ CamGroup item.
+
+
+
+
+ Cam Item.
+
+
+
+
+ CamEncoder Item.
+
+
+
+
+ CamToolGroup Item.
+
+
+
+
+ CamTool Item.
+
+
+
+
+ LineDef Item.
+
+
+
+
+ CNC Configuration (400)
+
+
+
+
+ ISG Channel item
+
+
+
+
+ CNC Axis Group Item
+
+
+
+
+ CNC Axis (ISG, 403)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Plc Application (Root Plc Object, 600)
+
+
+
+
+ Plc Folder object (601)
+
+
+
+
+ Plc POU Program (602)
+
+
+
+
+ Plc POU Function (603)
+
+
+
+
+ Plc POU Function Block (604)
+
+
+
+
+ Plc Enum Datatype (605)
+
+
+
+
+ Plc Struct DataType (606)
+
+
+
+
+ Plc Union DataType (607)
+
+
+
+
+ Plc Action (608)
+
+
+
+
+ Plc Method (609)
+
+
+
+
+ Plc Interface Method (610)
+
+
+
+
+ Plc Property (611)
+
+
+
+
+ Plc InterfaceProperty (612)
+
+
+
+
+ Plc Property Getter (613)
+
+
+
+
+ Plc Property Setter (614)
+
+
+
+
+ Plc Global Variables List (615)
+
+
+
+
+ Plc Transient Object (616)
+
+
+
+
+ Plc Library Manager (617)
+
+
+
+
+ Plc Interface (618)
+
+
+
+
+ Plc Visual Object (619)
+
+
+
+
+ Plc Visual Manager (620)
+
+
+
+
+ Plc Task object (621)
+
+
+
+
+ Plc DataType Alias (623)
+
+
+
+
+ Target Visu (624)
+
+
+
+
+ Global Text List (625)
+
+
+
+
+ Text List (626)
+
+
+
+
+ Global Image Pool (627)
+
+
+
+
+ Image Pool (628)
+
+
+
+
+ Parameter List (629)
+
+
+
+
+ Plc Program Reference (650)
+
+
+
+
+ Plc External Data Type (Defined in System Manager) (651)
+
+
+
+
+ Plc External Data Type Container (652)
+
+
+
+
+ Plc Tmc Description File (653)
+
+
+
+
+ Plc interface property getter (654)
+
+
+
+
+ Plc Interface property setter (655)
+
+
+
+
+ Nested SAFETY Project Root (800)
+
+
+
+
+ "Safety Application (801)
+
+
+
+
+ "Safety Alias Device Folder (802)
+
+
+
+
+ "Safety Group Folder (803)
+
+
+
+
+ "Safety Generated Code Folder (804)
+
+
+
+
+ "Safety Application Language File (805)
+
+
+
+
+ "Safety C Header File File (806)
+
+
+
+
+ "Safety C Implementation File File (807)
+
+
+
+
+ "Nested SAFETY Project Root (808)
+
+
+
+
+ Safety target System config file (*.xml) (809))
+
+
+
+
+ Safety dependent file node (809))
+
+
+
+
+ "Nested CPP Project Root (900)
+
+
+
+
+ Box Type
+
+
+
+
+ NotProcessed Box Type (BOXTYPE_UNKNOWN)
+
+
+
+
+ Lightbus-Buskoppler für bis zu 64 Busklemmen (BK2000) (BOXTYPE_BK2000)
+
+
+
+
+ Lightbus-Modul, 32 Bit Digital-Ein-/Ausgabemodul, 24 V DC (32Bit Box)(BOXTYPE_M1400)
+
+
+
+
+ Lightbus Modul, 4 Analog-Eingabe und 16 digitale E/A-Kanäle (M2400) (BOXTYPE_M2400)
+
+
+
+
+ Lightbus Modul, Mehrkanal-Inkremental-Encoder (M3xx0)(BOXTYPE_M3120_1)
+
+
+
+
+ Lightbus Modul, Mehrkanal-Inkremental-Encoder (M3120-2)(BOXTYPE_M3120_2)
+
+
+
+
+ Lightbus Modul, Mehrkanal-Inkremental-Encoder (M3120_3)(BOXTYPE_M3120_3)
+
+
+
+
+ Lightbus Modul, Mehrkanal-Inkremental-Encoder (M3120_4)(BOXTYPE_M3120_4)
+
+
+
+
+ Lightbus Modul, Absolut-Encoder (M3000) (BOXTYPE_M3000)
+
+
+
+
+ C1120 Slave Module (in S5-Rack) (C1120-Slave) (BOXTYPE_C1120)
+
+
+
+
+ Lightbus-Buskoppler für bis zu 64 digitale Busklemmen (BK2010)(BOXTYPE_BK2010)
+
+
+
+
+ Antriebstechnik: Digital Kompakt Servoverstärker(BOXTYPE_AX2000_B200)
+
+
+
+
+ Lightbus Modul, 4 Analog-Eingabemodul (M2510)(BOXTYPE_M2510)
+
+
+
+
+ Programable CDL (Lightbus) (Prog-CDL)(BOXTYPE_PROG_CDL)
+
+
+
+
+ Lightbus-"Economy plus"-Buskoppler für bis zu 64 Busklemmen (255 mit K-Bus-Verlängerung) (BK2020)(BOXTYPE_BK2020)
+
+
+
+
+ Lightbus-Busklemmen Controller (BC2000) (BOXTYPE_BC2000)
+
+
+
+
+ Fox-Module FOX-20 (FOX20) (BOXTYPE_FOX20)
+
+
+
+
+ TR Fox 50 Modul (24 Bit Absolut (SSI)) (FOX50) (BOXTYPE_FOX50)
+
+
+
+
+ Fox-Module FOX-RK001 (FOXRK001)(BOXTYPE_FOXRK001)
+
+
+
+
+ Fox-Module FOX-RK002 (FOXRK002)(BOXTYPE_FOXRK002)
+
+
+
+
+ CP10x1 (Folientasten 8 Kanal, LightBus) (CP10x1) (BOXTYPE_CP1001)
+
+
+
+
+ IPxxxx-B200 (compact box, LightBus)(IPx-B200)(BOXTYPE_IPXB2)
+
+
+
+
+ ILxxxx-B200 (coupler box, LightBus)(ILx-B200)(BOXTYPE_ILXB2)
+
+
+
+
+ ILxxxx-C200 (plc box, LightBus) (ILx-C200) (BOXTYPE_ILXC2)
+
+
+
+
+ CX1500-B200 (CX1500-B200)(BOXTYPE_CX1500_B200)
+
+
+
+
+ Profibus DP/FMS-Buskoppler für bis zu 64 Busklemmen, 1,5 MBaud (BK3000) (BOXTYPE_BK3000)
+
+
+
+
+ Profibus DP/FMS-Buskoppler für bis zu 64 Busklemmen, 12 MBaud (BK3100) (BOXTYPE_BK3100)
+
+
+
+
+ GSD Box (GSD Box)(BOXTYPE_PBDP_GSD)
+
+
+
+
+ Profibus DP-Buskoppler für bis zu 64 digitale Busklemmen, 1,5 MBaud (BK3010)(BOXTYPE_BK3010)
+
+
+
+
+ Profibus DP-Buskoppler für bis zu 64 digitale Busklemmen, 12 MBaud (BK3110)(BOXTYPE_BK3110)
+
+
+
+
+ Profibus DP-Buskoppler mit LWL-Anschluss, 1,5 MBaud (BK3500)(BOXTYPE_BK3500)
+
+
+
+
+ Profibus DP-"Low Cost"-Buskoppler für bis zu 64 digitale Busklemmen, 12 MBaud (LC3100) (BOXTYPE_LC3100)
+
+
+
+
+ ProfiDrive MC (ProfiDrive MC) (BOXTYPE_PBDP_DRIVE)
+
+
+
+
+ Profibus DP-"Economy Plus"-Buskoppler für bis zu 64 Busklemmen (255 mit K-Bus-Verlängerung), 12 MBaud (BK3120)(BOXTYPE_BK3120)
+
+
+
+
+ Profibus DP-Busklemmen Controller (BC3100) (BOXTYPE_BC3100)
+
+
+
+
+ Profidrive MC (double) (ProfiDrive2 MC) (BOXTYPE_PBDP_DRIVE2)
+
+
+
+
+ Profidrive MC (triple)(ProfiDrive3 MC)(BOXTYPE_PBDP_DRIVE3)
+
+
+
+
+ Profidrive MC (fourfold)(ProfiDrive4 MC)(BOXTYPE_PBDP_DRIVE4)
+
+
+
+
+ Profidrive MC (fivefold)(ProfiDrive5 MC)(BOXTYPE_PBDP_DRIVE5)
+
+
+
+
+ Profidrive MC (sixfold)(ProfiDrive6 MC)(BOXTYPE_PBDP_DRIVE6)
+
+
+
+
+ Profidrive MC (sevenfold)(ProfiDrive7 MC)(BOXTYPE_PBDP_DRIVE7)
+
+
+
+
+ Profidrive MC (eightfold)(ProfiDrive8 MC)(BOXTYPE_PBDP_DRIVE8)
+
+
+
+
+ Profibus DP-"Compact"-Buskoppler für bis zu 64 Busklemmen (255 mit K-Bus-Verlängerung), 12 MBaud (BK3150)(BOXTYPE_BK3150)
+
+
+
+
+ Profibus Slave BC3150 (BC3150) (BOXTYPE_BC3150)
+
+
+
+
+ IPxxxx-B3xx (compact box, Profibus)(IPx-B3xx)(BOXTYPE_IPXB3)
+
+
+
+
+ ILxxxx-B3xx (coupler box, Profibus)(ILB3xx)(BOXTYPE_ILXB3)
+
+
+
+
+ ILxxxx-C3xx (plc box, Profibus)(ILC3xx)(BOXTYPE_ILXC3)
+
+
+
+
+ TwinCAT Slave (Profibus)(TSMBOX_310)(BOXTYPE_TSMBOX_310)
+
+
+
+
+ Profibus DP-Busklemmen Controller(BX3100)(BOXTYPE_BX3100)
+
+
+
+
+ Profibus Slave CX1500-B310, PC104 (CX1500-B310)(BOXTYPE_CX1500_B310)
+
+
+
+
+ FC310x-Slave (FC310x-Slave)(BOXTYPE_FC310X_SLAVE)
+
+
+
+
+ Antriebstechnik: Digital Kompakt Servoverstärker (Profibus) (AX2xxx-B310)(BOXTYPE_AX2000_B310)
+
+
+
+
+ Interbus-Buskoppler für bis zu 64 Busklemmen (BK4000)(BOXTYPE_BK4000)
+
+
+
+
+ IBS Box (IBS Box)(BOXTYPE_IBS_GENERIC)
+
+
+
+
+ Interbus-Buskoppler für bis zu 64 digitale Busklemmen (BK4010)(BOXTYPE_BK4010)
+
+
+
+
+ Interbus-Buskoppler mit LWL-Anschluss für bis zu 64 Busklemmen (BK4500)(BOXTYPE_BK4500)
+
+
+
+
+ BK4510 (economy fieldbus coupler, InterBus-S Fiber)("BK4510)(BOXTYPE_BK4510)
+
+
+
+
+ Interbus-Busklemmen Controller (BC4000)(BOXTYPE_BC4000)
+
+
+
+
+ Interbus-"Economy plus"-Buskoppler für bis zu 64 Busklemmen (255 mit K-Bus-Verlängerung)(BK4020)(BOXTYPE_BK4020)
+
+
+
+
+ IPxxxx-B400 (compact box, InterBus-S)(IPx-B400)(BOXTYPE_IPXB4)
+
+
+
+
+ ILxxxx-B400 (coupler box, InterBus-S)(ILx-B400)(BOXTYPE_ILXB4)
+
+
+
+
+ ILxxxx-C400 (plc box, InterBus-S)(ILx-C400)(BOXTYPE_ILXC4)
+
+
+
+
+ CP9020 ('fieldbus coupler', Control Panel)(CP9020)(BOXTYPE_CP2020)
+
+
+
+
+ Sercos Drive (Sercos Drive)(BOXTYPE_SERCOSAXIS)
+
+
+
+
+ Antriebstechnik: Digital Kompakt Servoverstärker (SERCOS)(AX2xxx-B750)(BOXTYPE_AX2000_B750)
+
+
+
+
+ BK7500 (fieldbus coupler, SERCOS 2/4 MBaud)" (BK7500)(BOXTYPE_BK7500)
+
+
+
+
+ BK7510 (economy fieldbus coupler, SERCOS 2/4/8/16 MBaud)(BK7510)(BOXTYPE_BK7510)
+
+
+
+
+ BK7520 (economy plus fieldbus coupler, SERCOS 2/4/8/16 MBaud)(BK7520)(BOXTYPE_BK7520)
+
+
+
+
+ BK8100 (fieldbus coupler, COM Port, RS232)(BK8100)(BOXTYPE_BK8100)
+
+
+
+
+ RS485-Buskoppler für bis zu 64 Busklemmen(BK8000)(BOXTYPE_BK8000)
+
+
+
+
+ CP9040 ('fieldbus coupler', Control Panel)(CP9040)(BOXTYPE_CP9040)
+
+
+
+
+ RS485-Busklemmen Controller (BC8000)(BOXTYPE_BC8000)
+
+
+
+
+ RS232-Busklemmen Controller (BC8100)(BOXTYPE_BC8100)
+
+
+
+
+ IPxxxx-B800 (compact box, COM Port, RS485)(IPx-B800)(BOXTYPE_IPXB80)
+
+
+
+
+ ILxxxx-B800 (coupler box, COM Port, RS485)(ILx-B800)(BOXTYPE_ILXB80)
+
+
+
+
+ ILxxxx-C800 (plc box, COM Port, RS485)(ILx-C800)(BOXTYPE_ILXC80)
+
+
+
+
+ IPxxxx-B810 (compact box, COM Port, RS232)(IPx-B810)(BOXTYPE_IPXB81)
+
+
+
+
+ ILxxxx-B810 (coupler box, COM Port, RS232)(ILx-B810)(BOXTYPE_ILXB81)
+
+
+
+
+ ILxxxx-C810 (plc box, COM Port, RS232)(ILx-C810)(BOXTYPE_ILXC81)
+
+
+
+
+ CANopen Buskoppler Lowcost (BK5100)(BOXTYPE_BK5100)
+
+
+
+
+ CAN CAL-Buskoppler für bis zu 64 Busklemmen (BK5110)(BOXTYPE_BK5110)
+
+
+
+
+ CANopen Node (CANopen Node)(BOXTYPE_CANNODE) (ItemType 5003)
+
+
+
+
+ CANopen-Buskoppler „Economy plus“ für bis zu 64 Busklemmen (255 mit K-Bus-Verlängerung (BK5120)(BOXTYPE_BK5120)
+
+
+
+
+ CANopen-„Low Cost“-Buskoppler für bis zu 64 Busklemmen (255 mit K-Bus-Verlängerung)(LC5100)(BOXTYPE_LC5100)
+
+
+
+
+ CANopen Drive (CANopen Drive)(BOXTYPE_CANDRIVE)
+
+
+
+
+ Antriebstechnik: Digital Kompakt Servoverstärker (CANOpen) (AX2xxx-B510)(BOXTYPE_AX2000_B510)
+
+
+
+
+ CANopen-„Compact“-Buskoppler für bis zu 64 Busklemmen (255 mit K-Bus-Verlängerung)(BK5150)(BOXTYPE_BK5150)
+
+
+
+
+ CANopen-Busklemmen Controller(BC5150)(BOXTYPE_BC5150)
+
+
+
+
+ IPxxxx-B51x (compact box, CANopen)(IPx-B51x)(BOXTYPE_IPXB51)
+
+
+
+
+ ILxxxx-B51x (coupler box, CANopen)(ILx-B51x)(BOXTYPE_ILXB51)
+
+
+
+
+ ILxxxx-C51x (plc box, CANopen)(ILx-C51x)(BOXTYPE_ILXC51)
+
+
+
+
+ TwinCAT Slave (CANopen)(TSMBOX_510)(BOXTYPE_TSMBOX_510)
+
+
+
+
+ BX5100 (CANopen Slave)(BX5100)(BOXTYPE_BX5100)
+
+
+
+
+ CX1500-B510 (CX1500-B510)(BOXTYPE_CX1500_B510)
+
+
+
+
+ FC510x Slave (FC510x Slave)(BOXTYPE_FC510XSLV)
+
+
+
+
+ DeviceNet-Buskoppler für bis zu 64 Busklemmen (BK5200)(BOXTYPE_BK5200)
+
+
+
+
+ DeviceNet-Buskoppler für bis zu 64 digitale Busklemmen (BK5210)(BOXTYPE_BK5210)
+
+
+
+
+ DeviceNet Node (DN Node) (BOXTYPE_DEVICENET)
+
+
+
+
+ DeviceNet-„Compact“-Buskoppler für bis zu 64 Busklemmen (255 mit K-Bus-Verlängerung) (BK5220)(BOXTYPE_BK5220)
+
+
+
+
+ DeviceNet-„Low Cost“-Buskoppler für bis zu 64 digitale Busklemmen (255 mit K-Bus-Verlängerung) (LC5200)(BOXTYPE_LC5200)
+
+
+
+
+ IPxxxx-B52x (compact box, DeviceNet)(IPx-B52x)(BOXTYPE_IPXB52)
+
+
+
+
+ ILxxxx-B52x (coupler box, DeviceNet)(ILx-B52x)(BOXTYPE_ILXB52)
+
+
+
+
+ ILxxxx-C52x (plc box, DeviceNet)(ILx-C52x)(BOXTYPE_ILXC52)
+
+
+
+
+ DeviceNet-Busklemmen Controller(BX5200)(BOXTYPE_BX5200)
+
+
+
+
+ CX1500-B520(CX1500-B520)(BOXTYPE_CX1500_B520)
+
+
+
+
+ FC5201 Slave (FC5201 Slave) (BOXTYPE_FC520XSLV)
+
+
+
+
+ Safety PLC EL6900
+
+
+
+
+ Safety Digital Inputs
+
+
+
+
+ Safety Digital Outputs
+
+
+
+
+ Ethernet TCP/IP Bus Coupler up to 64 Terminals (BOXTYPE_BK9000)
+
+
+
+
+ Ethernet-TCP/IP Bus Coupler up to 64 Terminals and integrated 2-Channel Switch (BK9100)
+
+
+
+
+ Ethernet TCP/IP "Compact" Bus Coupler BK9050
+
+
+
+
+ Ethernet TCP/IP-Busklemmen Controller(BOXTYPE_BC9000)
+
+
+
+
+ Ethernet TCP/IP-Busklemmen Controller(BOXTYPE_BC9000)
+
+
+
+
+ Ethernet TCP/IP-Busklemmen Controller(BOXTYPE_BC9000)
+
+
+
+
+ Ethernet TCP/IP-Busklemmen Controller(BOXTYPE_BC9000)
+
+
+
+
+ IPxxxx-B900 (compact box, Ethernet)(IPx-B900)(BOXTYPE_IPXB9)
+
+
+
+
+ ILxxxx-B900 (coupler box, Ethernet)(ILx-B900)(BOXTYPE_ILXB9)
+
+
+
+
+ ILxxxx-C900 (plc box, Ethernet)(ILx-C900)(BOXTYPE_ILXC9)
+
+
+
+
+ Remote TwinCAT Task (RemoteTask)(BOXTYPE_REMOTETASK)
+
+
+
+
+ Netzwerkvariable Publisher(Publisher)(BOXTYPE_NV_PUB)
+
+
+
+
+ Netzwerkvariablen Subscriber(Subscriber)(BOXTYPE_NV_SUB)
+
+
+
+
+ Antriebstechnik: Digital Kompakt Servoverstärker (Ethernet)(AX2xxx-B900)(BOXTYPE_AX2000_B900)
+
+
+
+
+ EtherCAT Frame (EtherCAT Frame)(BOXTYPE_FLB_FRAME)
+
+
+
+
+ BK1120 (economy plus fieldbus coupler, EtherCAT)(BOXTYPE_BK1120)
+
+
+
+
+ EK1000 Ethernet Bridge (Ethernet/EtherCAT)(EK1000)(BOXTYPE_EK1000)
+
+
+
+
+ EK1100 Ethernet Coupler (EtherCAT)(BOXTYPE_EK1100)
+
+ Should not be inserted directly
+
+
+
+ EK1100 Ethernet Coupler (EtherCAT)(BOXTYPE_EL6731)
+
+
+
+
+ EK1100 Ethernet Coupler (EtherCAT)(BOXTYPE_EL6751)
+
+
+
+
+ EK1100 Ethernet Coupler (EtherCAT)(BOXTYPE_EL6752)
+
+
+
+
+ EK1100 Ethernet Coupler (EtherCAT)(BOXTYPE_EL6731SLV)
+
+
+
+
+ EK1100 Ethernet Coupler (EtherCAT)(BOXTYPE_EL6751SLV)
+
+
+
+
+ EK1100 Ethernet Coupler (EtherCAT)(BOXTYPE_EL6752SLV)
+
+
+
+
+ EK1100 Ethernet Coupler (EtherCAT)(BOXTYPE_EXXXXX = 9099)
+
+
+
+
+ BOXTYPE_EL6601 = 9100,
+
+
+
+
+ BOXTYPE_EL6001 = 9101,
+
+
+
+
+ BOXTYPE_EL69XX = 9102,
+
+
+
+
+ BOXTYPE_EL6021 = 9103
+
+
+
+
+ BOXTYPE_EL6720 = 9104
+
+
+
+
+ BOXTYPE_FSOESLAVE = 9105
+
+
+
+
+ BOXTYPE_EL6631 = 9106
+
+
+
+
+ BOXTYPE_EL6631SLV = 9107
+
+
+
+
+ USB-Buskoppler für bis zu 64 Busklemmen(BK9500)(BOXTYPE_BK9500)
+
+
+
+
+ Control Panel (USB)(CPX8XX)(BOXTYPE_CPX8XX)
+
+
+
+
+ CX1100 or CX9100 KBus extension('terminal coupler', CX1100-0002)(CX1100-BK)(BOXTYPE_CX1102) (SubType 9700)
+
+
+
+
+ CX9000 KBus extension('terminal coupler') (SubType: 9700)
+
+
+
+
+ CX1100 ('ip-link coupler', CX1100-0003)(CX1100-IP)(BOXTYPE_CX1103) (SubType 9701)
+
+
+
+
+ CX1190 UPS ('uninterruptable power supplier')(CX1190-UPS)(BOXTYPE_CX1190) (Subtype 9702)
+
+
+
+
+ Type of the Device
+
+
+
+
+
+
+
+
+
+ Lightbus ISA interface card C1220 with communications processor (IODEVICETYPE_C1220, ID: 1)
+
+
+
+
+ Lightbus ISA interface card C1200 (IODEVICETYPE_C1200, ID: 2)
+
+
+
+
+ ProfiBus Slave SPC3/IM182 (Siemens-Karte, IODEVICETYPE_SPC3, ID: 3)
+
+
+
+
+ ISA ProfiBus-Master CIF30 DPM(Hilscher-Karte, IODEVICETYPE_CIF30DPM, ID: 4)
+
+
+
+
+ ISA Interbus-S-Master CIF40 IBSM (Hilscher-Karte, IODEVICETYPE_CIF40IBSM, ID: 5)
+
+
+
+
+ Beckhoff PC C2001 (IODEVICETYPE_BKHFPC, ID: 6)
+
+
+
+
+ ProfiBus-Master CP5412 (Siemens-Karte,IODEVICETYPE_CP5412A2, ID: 7)
+
+
+
+
+ Sercos Master SERCOS ISA (Indramat,IODEVICETYPE_SERCANSISA, ID: 8)
+
+
+
+
+ Lpt Port (IODEVICETYPE_LPTPORT, ID: 9)
+
+
+
+
+ Generic DPRAM NOV/DP-RAM (IODEVICETYPE_DPRAM, ID: 10)
+
+
+
+
+ COM Port (IODEVICETYPE_COMPORT, ID: 11)
+
+
+
+
+ ISA CANopen-Master CIF30 CAN (Hilscher-Karte, IODEVICETYPE_CIF30CAN, ID:12)
+
+
+
+
+ ISA ProfiBus-Master CIF30 PB (Hilscher-Karte, IODEVICETYPE_CIF30PB, ID:13)
+
+
+
+
+ Beckhoff CP2030 (v1.0)(Beckhoff Panel Link (V1.0), IODEVICETYPE_BKHFCP2030, ID:14)
+
+
+
+
+ ISA Interbus-S-Master CIF30 IBM (Hilscher-Karte, IODEVICETYPE_CIF30IBM, ID:16)
+
+
+
+
+ ISA DeviceNet-Master CIF30 DNM(Hilscher-Karte, IODEVICETYPE_CIF30DNM, ID:17)
+
+
+
+
+ PCI ProfiBus-Master CIF50 PB (Hilscher-Karte, IODEVICETYPE_CIF50PB, ID:19)
+
+
+
+
+ PCI Interbus-S-Master CIF50 IBM (Hilscher-Karte, IODEVICETYPE_CIF50IBM)
+
+
+
+
+ PCI DeviceNet-Master CIF50 DNM (Hilscher-Karte, IODEVICETYPE_CIF50DNM)
+
+
+
+
+ PCI CANopen-Master CIF50 CAN (Hilscher-Karte, IODEVICETYPE_CIF50CAN)
+
+
+
+
+ PCMCIA ProfiBus-Master CIF60 PB (Hilscher-Karte, IODEVICETYPE_CIF60PB)
+
+
+
+
+ PCMCIA DeviceNet-Master CIF60 DNM(Hilscher-Karte, IODEVICETYPE_CIF60DNM)
+
+
+
+
+ PCMCIA CANopen-Master CIF60 CAN(Hilscher-Karte, IODEVICETYPE_CIF60CAN)
+
+
+
+
+ PC104 ProfiBus-Master CIF104 DPM (Hilscher-Karte, IODEVICETYPE_CIF104DP)
+
+
+
+
+ PC104 ProfiBus-Master CIF104 PB (Hilscher-Karte, IODEVICETYPE_C104PB)
+
+
+
+
+ PC104 Interbus-S-Master CIF104 IBM (Hilscher-Karte, IODEVICETYPE_C104IBM)
+
+
+
+
+ PC104 CANopen-Master CIF104 CAN (Hilscher-Karte, IODEVICETYPE_C104CAN)
+
+
+
+
+ PC104 DeviceNet-Master CIF104 DNM (Hilscher-Karte, IODEVICETYPE_C104DNM)
+
+
+
+
+ Beckhoff CP9030 Beckhoff Link (ISA, Panel-Link with UPS, IODEVICETYPE_BKHFCP9030)
+
+
+
+
+ Motherboard System Management Bus SMB (IODEVICETYPE_SMB)
+
+
+
+
+ PCI ProfiBus-Master CP5613 (Siemens-Karte, IODEVICETYPE_CP5613)
+
+
+
+
+ PCMCIA Interbus-S-Master CIF60 IBM (Hilscher-Karte, IODEVICETYPE_CIF60IBM)
+
+
+
+
+ Beckhoff-Lightbus-I/II-PCI-Karte FC200x (IODEVICETYPE_FC200X)
+
+
+
+
+ Beckhoff-Profibus-PCI-Karte FC310x (IODEVICETYPE_FC3100) (ItemType 38)
+
+
+
+
+ Beckhoff-CanOpen-PCI-Karte FC510x (IODEVICETYPE_FC5100) (ItemType 39)
+
+
+
+
+ Beckhoff-DeviceNet-PCI-Karte FC520x (IODEVICETYPE_FC5200) (ItemType 41)
+
+
+
+
+ Beckhoff NC Rückwand Beckhoff NcBp (IODEVICETYPE_BKHFNCBP) (ItemType 43)
+
+
+
+
+ Sercos Master PCI SICAN/IAM PCI(, IODEVICETYPE_SERCANSPCI)
+
+
+
+
+ Virtuelles Ethernet Device (IODEVICETYPE_ETHERNET)
+
+
+
+
+ Sercon 410B oder 816 Chip Master oder Slave (PCI) SERCONCHIP (IODEVICETYPE_SERCONPCI)
+
+
+
+
+ Beckhoff-SERCOS-PCI-Karte FC750x (IODEVICETYPE_FC7500)
+
+
+
+
+ ISA Interbus-S-Slave (Hilscher-Karte,IODEVICETYPE_CIF30IBS)
+
+
+
+
+ PCI Interbus-S-Slave CIF50 IBS (Hilscher-Karte, IODEVICETYPE_CIF50IBS)
+
+
+
+
+ PC104 Interbus-S-Slave (Hilscher-Karte, IODEVICETYPE_C104IBS)
+
+
+
+
+ Beckhoff CP9040 Beckhoff CP PC (CP-PC, IODEVICETYPE_BKHFCP9040)
+
+
+
+
+ Beckhoff AH2000 (Hydraulik Backplane, IODEVICETYPE_BKHFAH2000, ID:53)
+
+
+
+
+ Beckhoff CP9035 (PCI, Panel-Link with UPS, IODEVICETYPE_BKHFCP9035, ID:54)
+
+
+
+
+ Beckhoff-AH2000 mit Profibus-MC (IODEVICETYPE_AH2000MC, ID:55)
+
+
+
+
+ Beckhoff-Profibus-Monitor-PCI-Karte FC310x-Monitor (IODEVICETYPE_FC3100MON, ID:56)
+
+
+
+
+ Virtuelles USB Device (IODEVICETYPE_USB, ID:57)
+
+
+
+
+ Beckhoff-CANopen-Monitor-PCI-Karte FC510x-Monitor (IODEVICETYPE_FC5100MON, ID: 58)
+
+
+
+
+ Beckhoff-DeviceNet-Monitor-PCI-Karte FC520x-Monitor (IODEVICETYPE_FC5200MON)
+
+
+
+
+ Beckhoff-Profibus-PCI-Karte als Slave FC310x-Slave (IODEVICETYPE_FC3100SLV)
+
+
+
+
+ Beckhoff-CanOpen-PCI-Karte als Slave FC510x-Slave (IODEVICETYPE_FC5100SLV)
+
+
+
+
+ Beckhoff-DeviceNet-PCI-Karte als Slave FC520x-Slave (IODEVICETYPE_FC5200SLV)
+
+
+
+
+ PCI Interbus-S-Master IBS PCI SC/I-T (Phoenix-Karte, IODEVICETYPE_IBSSCITPCI)
+
+
+
+
+ Beckhoff-CX1100 Klemmenbus Netzteil CX1100 (IODEVICETYPE_CX1100_BK, 65)
+
+
+
+
+ Ethernet Real Time Miniport RT-Ethernet (IODEVICETYPE_ENETRTMP, 66)
+
+
+
+
+
+
+
+
+
+ PC104 Lightbus-Master CX1500-M200 (IODEVICETYPE_CX1500_M200, 67)
+
+
+
+
+ PC104 Lightbus-Slave CX1500-B200 (IODEVICETYPE_CX1500_B200)
+
+
+
+
+ PC104 ProfiBus-Master CX1500-M310 (IODEVICETYPE_CX1500_M310)
+
+
+
+
+ PC104 ProfiBus-Slave CX1500-B310 (IODEVICETYPE_CX1500_B310)
+
+
+
+
+ PC104 CANopen-Master CX1500-M510 (IODEVICETYPE_CX1500_M510)
+
+
+
+
+ PC104 CANopen-Slave CX1500-B510 (IODEVICETYPE_CX1500_B510)
+
+
+
+
+ PC104 DeviceNet-Master CX1500-M520 (IODEVICETYPE_CX1500_M520)
+
+
+
+
+ PC104 DeviceNet-Slave CX1500-B520 (IODEVICETYPE_CX1500_B520)
+
+
+
+
+ PC104 Sercos-Master CX1500-M750 (IODEVICETYPE_CX1500_M750)
+
+
+
+
+ PC104 Sercos-Slave (IODEVICETYPE_CX1500_B750)
+
+
+
+
+ BX Klemmenbus Interface BX-BK (IODEVICETYPE_BX_BK)
+
+
+
+
+ BX SSB-Master BX-M510(IODEVICETYPE_BX_M510)
+
+
+
+
+ BX ProfiBus-Slave BX-B310 (IODEVICETYPE_BX_B310)
+
+
+
+
+ PCIInterbus-S-Master mit Slave-Teil auf Kupfer Basis IBS PCI SC/RI/I-T (Phoenix-Karte, IODEVICETYPE_IBSSCRIRTPCI)
+
+
+
+
+ BX CANopen-Slave BX-B510 (IODEVICETYPE_BX_B510)
+
+
+
+
+ BX DeviceNet-Slave BX-B520 (IODEVICETYPE_BX_B520)
+
+
+
+
+ BCxx50 ProfiBus-Slave BC3150 (IODEVICETYPE_BC3150)
+
+
+
+
+ BCxx50 CANopen-Slave (IODEVICETYPE_BC5150)
+
+
+
+
+ BCxx50 DeviceNet-Slave BC5250 (IODEVICETYPE_BC5250)
+
+
+
+
+ Beckhoff-Profibus-EtherCAT-Klemme (IODEVICETYPE_EL6731)
+
+
+
+
+ Beckhoff-CanOpen-EtherCAT-Klemme (IODEVICETYPE_EL6751)
+
+
+
+
+ Beckhoff-DeviceNet-EtherCAT-Klemme (IODEVICETYPE_EL6752)
+
+
+
+
+ COM ProfiBus-Master 8 kByte (Hilscher-Karte)(IODEVICETYPE_COMPB)
+
+
+
+
+ COM Interbus-S-Master (Hilscher-Karte)(IODEVICETYPE_COMIBM)
+
+
+
+
+ COM DeviceNet-Master (Hilscher-Karte)(IODEVICETYPE_COMDNM)
+
+
+
+
+ COM CANopen-Master (Hilscher-Karte)(IODEVICETYPE_COMCAN)
+
+
+
+
+ COM CANopen-Slave (Hilscher-Karte)(IODEVICETYPE_COMIBS)
+
+
+
+
+ EtherCAT in direct mode (v2.10 only) (IODEVICETYPE_ETHERCAT)
+
+
+
+
+ PROFINET Master (IODEVICETYPE_PROFINETIOCONTROLLER)
+
+
+
+
+ PROFINET Slave (IODEVICETYPE_PROFINETIODEVICE)
+
+
+
+
+ Beckhoff-Profibus-Slave-EtherCAT-Klemme (IODEVICETYPE_EL6731SLV)
+
+
+
+
+ Beckhoff-CanOpen-Slave-EtherCAT-Klemme (IODEVICETYPE_EL6751SLV)
+
+
+
+
+ Beckhoff-DeviceNet-Slave-EtherCAT-Klemme (IODEVICETYPE_EL6752SLV)
+
+
+
+
+ PC104+ ProfiBus-Master 8 kByte (Hilscher-Karte) (IODEVICETYPE_C104PPB)
+
+
+
+
+ PC104+ CANopen-Master (Hilscher-Karte) (IODEVICETYPE_C104PCAN)
+
+
+
+
+ PC104+ DeviceNet-Master (Hilscher-Karte) (IODEVICETYPE_C104PDNM)
+
+
+
+
+ BCxx50 serieller Slave (IODEVICETYPE_BC8150)
+
+
+
+
+ BX9000 Ethernet Slave (IODEVICETYPE_BX9000)
+
+
+
+
+ CX9000 Terminal Device (K-BUS)
+
+
+
+
+ EtherCAT Automation Protocol, EL6601 (IODEVICETYPE_EL6601 = 106)
+
+
+
+
+ BC9050 Etherent Slave (IODEVICETYPE_BC9050 = 107)
+
+
+
+
+ RT-Ethernet Adapter (BC9120 Ethernet Slave) IODEVICETYPE_BC9120 = 108)
+
+
+
+
+ RT-Ethernet Multiple Protocol Handler, Ethernet Miniport Adapter (IODEVICETYPE_ENETADAPTER = 109)
+
+
+
+
+
+
+
+
+
+ BC9020 Ethernet Slave (IODEVICETYPE_BC9020 = 110)
+
+
+
+
+ EtherCAT Protocol in Direct mode (IODEVICETYPE_ETHERCATPROT = 111)
+
+
+
+
+ EtherCAT Network Variables (Automation protocol, IODEVICETYPE_ETHERNETNVPROT = 112)
+
+
+
+
+
+
+
+
+
+ Profinet Controller (IODEVICETYPE_ETHERNETPNMPROT = 113)
+
+
+
+
+ Beckhoff-Lightbus-EtherCAT-Klemme (IODEVICETYPE_EL6720 = 114)
+
+
+
+
+ Profinet Device (IODEVICETYPE_ETHERNETPNSPROT = 115)
+
+
+
+
+ Beckhoff CP PC (Beckhoff CP6608(IXP PC), IODEVICETYPE_BKHFCP6608 = 116)
+
+
+
+
+ IEEE 1588 (PTP) (IODEVICETYPE_PTP_IEEE1588 = 117)
+
+
+
+
+ EL6631-0010 (IODEVICETYPE_EL6631SLV = 118)
+
+
+
+
+ EL6631 (IODEVICETYPE_EL6631 = 119)
+
+
+
+
+ CX5000-BK (Beckhoff-CX5100 Klemmenbus Netzteil, IODEVICETYPE_CX5000_BK = 120)
+
+
+
+
+ PCI DP-RAM (Generic PCI DPRAM (TCOM), IODEVICETYPE_PCIDEVICE = 121)
+
+
+
+
+ IODEVICETYPE_ETHERNETEAPPOLL = 122, // EtherCAT Automation Protocoll polled connection
+
+
+
+
+ IODEVICETYPE_ETHERNETAUTOPROT = 123, // Automation Protocol
+
+
+
+
+ IODEVICETYPE_CCAT = 124, // CCAT
+
+
+
+
+ IODEVICETYPE_CPLINK3 = 125, // Virtuelles USB Device (remote via CPLINK3)
+
+
+
+
+ IODEVICETYPE_EL6632 = 126, // EL6632
+
+
+
+
+ IODEVICETYPE_CCAT_PBM = 127, // CCAT Profibus Master
+
+
+
+
+ IODEVICETYPE_CCAT_PBS = 128, // CCAT Profibus Slave
+
+
+
+
+ IODEVICETYPE_CCAT_CNM = 129, // CCAT CANopen Master
+
+
+
+
+ IODEVICETYPE_ETHERCATSLAVE = 130, // EtherCAT Slave
+
+
+
+
+ IODEVICETYPE_BACNET = 131, // BACnet device
+
+
+
+
+ IODEVICETYPE_CCAT_CNS = 132, // CCAT CANopen Slave
+
+
+
+
+ IODEVICETYPE_ETHIP_SCANNER = 133, // ETHERNET IP Master
+
+
+
+
+ IODEVICETYPE_ETHIP_ADAPTER = 134, // ETHERNET IP Slave
+
+
+
+
+ IODEVICETYPE_CX8000_BK = 135, // Beckhoff-CX8100 Klemmenbus Netzteil
+
+
+
+
+ IODEVICETYPE_ETHERNETUDPPROT = 136, // Upd Protocol
+
+
+
+
+ IODEVICETYPE_BC9191 = 137, // BC9191 Etherent Slave
+
+
+
+
+ IODEVICETYPE_ENETPROTOCOL = 138, // Real-Time Ethernet Protocol (BK90xx, AX2000-B900)
+
+
+
+
+ Disabled state type for the TreeItem
+
+
+ This is the CLS-compliant, corresponding type to TCatSysManagerLibs DISABLED_STATE
+
+
+
+
+ The state is unknown/not initialized
+
+
+
+
+ The item is not disabled
+
+
+
+
+ The item is disabled itself
+
+
+
+
+ A parent of the item is disabled (and implicitely the item itself)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Extension class for the
+
+
+
+
+ Converts the to an Int32
+
+ The type.
+
+
+
+
+ Converts the to string identifyer
+
+ The type.
+
+
+
+
+ Extension class for the .
+
+
+
+
+ Gets the description of the
+
+ The type.
+
+
+
+
+ Converts the to Int32.
+
+ The type.
+
+
+
+
+ Extension class for the .
+
+
+
+
+ Gets the description of the
+
+ The type.
+
+
+
+
+ Converts the to Int32.
+
+ The type.
+
+
+
+
+ Extension class for
+
+
+
+
+ Gets the description of the .
+
+ The type.
+
+
+
+
+ Gets the as Int32.
+
+ The type.
+
+
+
+
+ Group type of variables
+
+
+
+
+ Variable Group is unknown
+
+
+
+
+ Input variable group
+
+
+
+
+ Output variable group
+
+
+
+
+ Channel variable group
+
+
+
+
+ Late bound configuration factory
+
+ Configuration items (and all script types) will be stored in late bound types (e.g 'dynamic' in C#)
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Message Handler demo implementiation to preserve the E_REJECTED_XXX Errros (See Msdn documentation for Visual Studio)
+
+
+
+
+ Definition of the IOleMessageFilter interface
+
+
+
+
+ Handles the in coming call.
+
+ Type of the dw call.
+ The h task caller.
+ The dw tick count.
+ The lp interface info.
+
+
+
+
+ Retries the rejected call.
+
+ The h task callee.
+ The dw tick count.
+ Type of the dw reject.
+
+
+
+
+ Messages the pending.
+
+ The h task callee.
+ The dw tick count.
+ Type of the dw pending.
+
+
+
+
+ Start the filter
+
+
+
+
+ Done with the filter, close it.
+
+
+
+
+ Handles the in coming thread requests.
+
+ Type of the dw call.
+ The h task caller.
+ The dw tick count.
+ The lp interface info.
+
+
+
+
+ Retries the rejected call.
+
+ The h task callee.
+ The dw tick count.
+ Type of the dw reject.
+
+
+
+
+
+
+ The h task callee.
+ The dw tick count.
+ Type of the dw pending.
+
+
+
+
+ Gets a value indicating whether the is registered already.
+
+
+ true if is registered; otherwise, false.
+
+
+
+
+ Running Object Table Access
+
+
+
+
+ Get a snapshot of the running object table (ROT).
+
+ A dictionary mapping the name of the object in the ROT to the corresponding object (COM Object)
+
+
+
+ Get a table of the currently running instances of the Visual Studio .NET IDE.
+
+ A dictionary mapping common information about the DTE object to the EnvDte.DTE object itself
+
+
+
+ Gets the DTE Object which has opened a solution with the specified name.
+
+ Name of the solution (without path, without extension)
+ The DTE Object
+
+
+
+ DTE Information Object
+
+
+
+
+ The version of the DTE
+
+
+
+
+ The process identifier of the devenv process
+
+
+
+
+ Initializes a new instance of the class.
+
+ The version.
+ The solution path.
+ The process identifier.
+
+
+
+ Returns a that represents this instance.
+
+
+ A that represents this instance.
+
+
+
+
+ Parses the specified string.
+
+ The string.
+
+
+
+
+
+ Tries to parse the specified string to an instance.
+
+ The string.
+ The object.
+ true if succeeded, false if not.
+
+
+
+ Gets the solution path of the Info object
+
+
+ The solution path.
+
+
+
+
+ Gets the name of the solution.
+
+
+ The name of the solution.
+
+
+
+
+ Actual status of the Script
+
+
+
+
+ None / Uninitialized
+
+
+
+
+ Initializing the Script and its initial configuration
+
+
+
+
+ Cleaning up the Script / Configuration
+
+
+
+
+ Script currently executing.
+
+
+
+
+ Abstract base class for scripts
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Script context
+
+
+
+
+ Initializes the script with DTE, Solution and Script Worker object
+
+ The Script Context.
+
+
+
+ Script status
+
+
+
+
+ Executes the script with worker context.
+
+ The worker.
+
+
+
+ Cleans the Script up after usage.
+
+ The worker.
+
+
+
+ Script Start time
+
+
+
+
+ Sets the start time.
+
+
+
+
+ Script stop time
+
+
+
+
+ Sets the stop time.
+
+
+
+
+ Handler function Before Initializing the Script (Configuration preparations)
+
+ The Script Context
+ Usually used to to the open a prepared or new XAE configuration
+
+
+
+ Handler function Initializing the Script (Configuration preparations)
+
+ The Script Context
+ Usually used to to the open a prepared or new XAE configuration
+
+
+
+ Handler function Executing the Script code.
+
+ The worker.
+
+
+
+ Cleaning up the XAE configuration after script execution.
+
+ The worker.
+
+
+
+ XAE Base Template (TwinCAT 30
+
+
+
+
+ XAE Base Template new (>= TwinCAT 3.1)
+
+
+
+
+ Template Name for the XAE PLC Empty template
+
+
+
+
+ Template Name for the XAE PLC Standard template
+
+
+
+
+ Template Name for the XAE Saftey Standard template
+
+
+
+
+
+ Deletes the solution folder.
+
+
+
+
+ Creates an empty Visual Studio Solution
+
+
+
+
+ Handler function called after the Solution object has been created.
+
+
+
+
+ Creates the new project.
+
+ Name of the project.
+
+
+
+
+ Creates the new project.
+
+
+
+
+
+ Creates the new project.
+
+ Name of the project.
+ The template path.
+
+
+
+
+ Deletes all files in the subtree
+
+ Target directory.
+
+
+
+ Copies a directory from Source to Destination
+
+ Source Folder
+ Destingation Folder
+
+
+
+ Sets the Script Status
+
+ The script status.
+
+
+
+ Handler function fireing the event.
+
+ The old status.
+ The script status.
+
+
+
+ Script Result
+
+
+
+
+ Sets the result.
+
+ The script result.
+
+
+
+ Returns a that represents this instance.
+
+
+ A that represents this instance.
+
+
+
+
+ Gets the context.
+
+ The context.
+
+
+
+ Gets the Script Status
+
+ The status.
+
+
+
+ Gets the start time of the Script
+
+
+ The start time.
+
+
+
+
+ Gets the Script stop time
+
+
+ The stop time.
+
+
+
+
+ Gets the Scripts execution duration.
+
+
+ The duration.
+
+
+
+
+ Gets the Script description
+
+ The description.
+
+
+
+ Gets the detailed description of the that is shown in the Method Tips.
+
+ The detailed description.
+
+
+
+ Gets the keywords, describing the Script features
+
+ The keywords.
+
+
+
+ Gets the programming language of the Script
+
+ The programming language.
+
+
+
+ Gets the Version number of TwinCAT that is necessary for script execution.
+
+ The TwinCAT version.
+
+
+
+ Gets the build number of TwinCAT that is necessary for script execution.
+
+ The TwinCAT build.
+
+
+
+ Gets the category of this script.
+
+ The script category.
+
+
+
+ Gets the binding type of the script
+
+ The programming language.
+
+
+
+ Gets the base Application Directory, where the ScriptingTestContainer base Dlls are residing.
+
+ The application path.
+
+
+
+ Gets the last execution Exception.
+
+ The exception.
+
+
+
+ Gets the name of the Script.
+
+ The name.
+
+
+
+ Gets the script templates folder used for configuration templates.
+
+ The script templates folder.
+
+
+
+ Gets the Path of the TwinCAT XAE Base Template
+
+ The vs xae template path.
+
+
+
+ Gets the TwinCAT Installation Directory
+
+ The twin CAT install dir.
+
+
+
+ Gets the actual activated TwinCAT Version
+
+ The current twin CAT version.
+
+
+
+ Gets the working folder.
+
+ The working folder.
+
+
+
+ Gets the Script Root Folder
+
+ The solution folder.
+
+
+
+ Gets the temp folder (Folder within the Script Root folder (SolutionFolder)
+
+ The temp folder.
+
+
+
+ Occurs when the has changed.
+
+
+
+
+ Gets the Script Result
+
+ The result.
+
+
+
+ Script Result enumeration
+
+
+
+
+ None / Initialized / Script not processed
+
+
+
+
+ Script Succeeded
+
+
+
+
+ Script Failed
+
+
+
+
+ Event arguments fired with the event.
+
+
+
+
+ Old State
+
+
+
+
+ New State
+
+
+
+
+ Initializes a new instance of the class.
+
+ The old state.
+ The new state.
+
+
+
+ Late Bound Script (uses only late bound variables)
+
+ Take take not to use Referenced Assemblies within derived classes.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ DTE Object (Late Bound)
+
+
+
+
+ Solution object (Late Bound)
+
+
+
+
+ Handler function Before Initializing the Script (Configuration preparations)
+
+ The Script Context
+ Usually used to to the open a prepared or new XAE configuration
+
+
+
+ Handler function Initializing the Script (Configuration preparations)
+
+ The Script Context
+ Usually used to to the open a prepared or new XAE configuration
+
+
+
+ Creates an empty Visual Studio Solution
+
+
+
+
+ Creates the new project.
+
+ Name of the project.
+
+
+
+
+ Creates the new project.
+
+ Name of the project.
+ The template path.
+
+
+
+
+ Cleaning up the XAE configuration after script execution.
+
+ The worker.
+
+
+
+ Gets the binding type of the script
+
+ The programming language.
+
+
+
+ Early Bound Script
+
+ The base class for the Script type uses the typed versions of dte and solution objects directly referencing the VisualStudio TypeLibrary.
+ References to TwinCAT XAE Connectivity classes like ITcSysManager ITcTreeItem are allowed to use here.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Early Bound DTE Object
+
+
+
+
+ Early Bound Solution Object
+
+
+
+
+ Handler function Before Initializing the Script (Configuration preparations)
+
+ The Script Context
+ Usually used to to the open a prepared or new XAE configuration
+
+
+
+ Handler function Initializing the Script (Configuration preparations)
+
+ The Script Context
+ Usually used to to the open a prepared or new XAE configuration
+
+
+
+ Cleaning up the XAE configuration after script execution.
+
+ The worker.
+ Saves all open projects and Frees the internal DTE and Solution references
+
+
+
+ Creates an empty Visual Studio Solution
+
+
+
+
+ Creates the new project.
+
+ Name of the project.
+
+
+
+
+ Creates the new project.
+
+ Name of the project.
+ The template path.
+
+
+
+
+ Gets the binding type of the script
+
+ The programming language.
+
+
+
+ Class implements additional OS Environment settings
+
+
+
+
+ Gets a value indicating whether this code is running on a 64 Bit Operating system.
+
+
+ true if [is64 bit operating system]; otherwise, false.
+
+
+
+
+ Gets a value indicating whether this code is running within a Wow64 Process (32-Bit Processon 64-Bit Operating system)
+
+
+ true if this instance is wow64 process; otherwise, false.
+
+
+
+
+ Gets a value indicating whether this code is running in a native 64 Bit Process.
+
+ true if [is64 bit process]; otherwise, false.
+
+
+
+ Helper class
+
+
+
+
+ Scans the devices on the target system and returns a list of XML Nodes representing these devices.
+
+ The system manager.
+
+
+
+
+ Scans the devices and Adds an EtherCAT Automation Protocol device if an network adapter is found.
+
+ The system manager.
+ The type.
+ Name of the device.
+ The progress.
+
+
+
+
+ Var Declaration class.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The scope.
+ The name.
+ The type.
+ The address.
+ The init value.
+ The comment.
+ The flags.
+
+
+
+ Initializes a new instance of the class.
+
+ The scope.
+ The name.
+ The type.
+ The address.
+
+
+
+ Gets the address.
+
+ The address.
+
+
+
+ Gets the comment.
+
+ The comment.
+
+
+
+ Gets the flags.
+
+ The flags.
+
+
+
+ Gets the init value.
+
+ The init value.
+
+
+
+ Gets the name.
+
+ The name.
+
+
+
+ Gets the scope.
+
+ The scope.
+
+
+
+ Gets the type.
+
+ The type.
+
+
+
+ Converter class converting instances of the enumeration
+
+
+
+
+ Converts the enumeration to string.
+
+
+
+
+
+
+ Script Loader class
+
+
+
+
+ Loads the script intances from Assemblies within the Executable folder.
+
+ The script type filter (or null if not filtered).
+
+
+
+ Gets the script.
+
+ The name.
+
+
+
+
+ Instantiates the scripts from the specified assembly.
+
+ The assembly.
+ Type filter (or null)
+ IEnumerable<Script>.
+
+
+
+ Determines the script types from the specified assembly.
+
+ The assembly.
+
+
+
+
+ Gets or sets the script filter.
+
+ The script filter.
+
+
+
+ Gets the scripts.
+
+ The scripts.
+
+
+
+ Xml Converter class for TwinCAT specifics
+
+
+
+
+ Reads the element content as bin hex.
+
+ The reader.
+
+
+
+
+ Reads an hexadecimal integer value from XML string
+
+ The string
+ The value
+
+
+
+ Reads an hexadecimal value from XML string
+
+ The string
+ The value
+
+
+
+ Converts an hexadecimal value to XML string
+
+ The value
+ The string representation
+
+
+
+ Converts an hexadecimal value to XML string
+
+ The value
+ The string representatino
+
+
+
+ Reads an hexadecimal integer value from XML string
+
+ The string
+ The value
+
+
+
+ Converts an hexadecimal value to XML string
+
+ The value
+ The string representation
+
+
+
+ Reads a specified booleaan (from "True", "False", "1" and "0");
+
+ The STR.
+
+
+
+
+ Script context
+
+
+
+
+ Gets the DTE Object.
+
+ The DTE.
+
+
+
+ Gets the solution object
+
+ The solution.
+
+
+
+ Gets the Script Worker.
+
+ The worker.
+
+
+
+ Gets the Configuration Factory
+
+ The factory.
+
+
+
+ Gets the Named parameters (Dictionary Name --> ParameterValue)
+
+ The _parameters.
+
+
+
+ Gets the solution template.
+
+ The solution template.
+
+
+
+ Script context class
+
+
+
+
+ Initializes a new instance of the class.
+
+ The factory.
+ The project template.
+ The parameters.
+
+
+
+ Initializes a new instance of the class.
+
+ The factory.
+
+
+
+ Parameters dictionary
+
+
+
+
+ Project template
+
+
+
+
+ Sets the DTE.
+
+ The DTE.
+ The solution.
+
+
+
+ Sets the worker.
+
+ The worker.
+
+
+
+ Gets the Script Worker.
+
+ The worker.
+
+
+
+ Gets the Configuration Factory
+
+ The factory.
+
+
+
+ Gets the DTE.
+
+ The DTE.
+
+
+
+ Gets the solution.
+
+ The solution.
+
+
+
+ Gets the Named parameters (Dictionary Name --> ParameterValue)
+
+ The _parameters.
+
+
+
+ Gets the solution template.
+
+ The solution template.
+
+
+
+ Worker interface wrapping the Worker thread used to execute the script.
+
+
+
+
+ Starts the Script execution asynchronously
+
+
+
+
+ Cancels the script asynchronously.
+
+
+
+
+ Requests the Execution Cancel and wait until the Execution is stopped.
+
+
+
+
+ Gets a value indicating whether a cancellation is pending.
+
+ true if [cancellation pending]; otherwise, false.
+
+
+
+ Occurs when the worker thread has been completed
+
+
+
+
+ Occurs, when the Visual Studio configuration is fully initialized
+
+
+
+
+ Worker class for asynchronous script execution (within STA)
+
+
+
+
+ Initializes a new instance of the class.
+
+ The script.
+ The context.
+
+
+
+ Configuration factory
+
+
+
+
+ Executed Script
+
+
+
+
+ Starts the Script execution asynchronously
+
+
+
+
+ Current status of the script execution
+
+
+
+
+ Current Progress
+
+
+
+
+ Handler function fireing the event.
+
+
+
+
+ Cancels the script asynchronously.
+
+
+
+
+ Requests the Execution Cancel and wait until the Execution is stopped.
+
+
+
+
+
+
+ Called when [configuration initialized].
+
+
+
+
+ Occurs when the worker thread has been completed
+
+
+
+
+ Gets or sets the status string.
+
+ The status.
+
+
+
+ Occurs when the status has been changed.
+
+
+
+
+ Sets the progress value (0-100%)
+
+ The progress.
+
+
+
+ Occurs when the progress has been changed.
+
+
+
+
+ Gets a value indicating whether a cancellation is pending.
+
+ true if [cancellation pending]; otherwise, false.
+
+
+
+ Occurs, when the Visual Studio configuration is fully initialized
+
+
+
+
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeA.tszip b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeA.tszip
new file mode 100644
index 0000000..dc955a0
Binary files /dev/null and b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeA.tszip differ
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeA/Axis1.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeA/Axis1.xml
new file mode 100644
index 0000000..493edcf
Binary files /dev/null and b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeA/Axis1.xml differ
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeA/Axis2.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeA/Axis2.xml
new file mode 100644
index 0000000..664eb2b
Binary files /dev/null and b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeA/Axis2.xml differ
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeA/Links.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeA/Links.xml
new file mode 100644
index 0000000..a58b6ce
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeA/Links.xml
@@ -0,0 +1,64 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeA/POUs/FB_Axis.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeA/POUs/FB_Axis.xml
new file mode 100644
index 0000000..f72ad34
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeA/POUs/FB_Axis.xml
@@ -0,0 +1,137 @@
+ 0);
+ bDriveError := AxisRef.NcToPlc.StateDWord.28;
+
+ Timer(IN := bStatus);
+ IF Timer.Q OR bNcError OR bDriveError THEN
+ Timer(IN := FALSE);
+
+ IF bDriveError THEN
+ fbSoEReset(Execute:= FALSE, Axis:= AxisRef);
+ iState := 10;
+ ELSIF bNCError THEN
+ fbMcReset(Execute := FALSE, Axis := AxisRef);
+ iState := 20;
+ ELSE
+ IF lrPosition <> lrPosition1 THEN
+ lrPosition := lrPosition1;
+ ELSE
+ lrPosition := lrPosition2;
+ END_IF
+ fbMCMove(
+ Execute:= FALSE,
+ Axis := AxisRef
+ );
+ iState := 30;
+ END_IF
+ END_IF
+
+10: (* drive reset *)
+ A_DriveReset();
+
+20: (* MC reset *)
+ A_MC2Reset();
+
+30: (* MC move absolute *)
+ A_MC2Move();
+
+31: (* MC move absolute *)
+ A_MC2Move();
+
+32: (* back to idle *)
+ iState := 0;
+
+40: (* MC halt *)
+ A_MC2Halt();
+END_CASE
+
+lrActPos := AxisRef.NcToPlc.ActPos;]]> bStatus,
+);
+]]> lrPosition1 THEN
+ lrPosition := lrPosition1;
+ ELSE
+ lrPosition := lrPosition2;
+ END_IF
+
+ fbMCMove(Execute := FALSE, Axis := AxisRef);
+ iState := iState + 1;
+END_IF
+
+IF bHalt THEN
+ fbMCMove(Execute := FALSE, Axis := AxisRef);
+ iState := 40;
+END_IF]]>
\ No newline at end of file
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeA/POUs/MAIN.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeA/POUs/MAIN.xml
new file mode 100644
index 0000000..0f6de45
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeA/POUs/MAIN.xml
@@ -0,0 +1,33 @@
+ lrActPos1
+);
+
+fbAxis2(
+ bDriveReset := bDriveReset,
+ bHalt := bHalt,
+ lrActPos => lrActPos2
+);
+
+bEnabled := fbAxis1.bStatus AND fbAxis2.bStatus;
+bError := fbAxis1.bDriveError OR fbAxis1.bNcError OR fbAxis2.bNcError OR fbAxis2.bDriveError;
+]]>
\ No newline at end of file
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeB.tszip b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeB.tszip
new file mode 100644
index 0000000..5e3a2b1
Binary files /dev/null and b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeB.tszip differ
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeB/Axis1.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeB/Axis1.xml
new file mode 100644
index 0000000..d73b92b
Binary files /dev/null and b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeB/Axis1.xml differ
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeB/Axis2.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeB/Axis2.xml
new file mode 100644
index 0000000..8f75881
Binary files /dev/null and b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeB/Axis2.xml differ
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeB/Axis3.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeB/Axis3.xml
new file mode 100644
index 0000000..75e914d
Binary files /dev/null and b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeB/Axis3.xml differ
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeB/Axis4.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeB/Axis4.xml
new file mode 100644
index 0000000..9afa7ab
Binary files /dev/null and b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeB/Axis4.xml differ
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeB/Channel2.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeB/Channel2.xml
new file mode 100644
index 0000000..7c461bf
Binary files /dev/null and b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeB/Channel2.xml differ
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeB/Datatypes/E_Commands.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeB/Datatypes/E_Commands.xml
new file mode 100644
index 0000000..dacb2c4
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeB/Datatypes/E_Commands.xml
@@ -0,0 +1,8 @@
+
\ No newline at end of file
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeB/Datatypes/E_NCI_CTRL_STATE.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeB/Datatypes/E_NCI_CTRL_STATE.xml
new file mode 100644
index 0000000..bd740bd
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeB/Datatypes/E_NCI_CTRL_STATE.xml
@@ -0,0 +1,18 @@
+
\ No newline at end of file
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeB/Datatypes/E_States.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeB/Datatypes/E_States.xml
new file mode 100644
index 0000000..2ca6136
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeB/Datatypes/E_States.xml
@@ -0,0 +1,9 @@
+
\ No newline at end of file
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeB/GVLs/GlobalVariables.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeB/GVLs/GlobalVariables.xml
new file mode 100644
index 0000000..f49c99c
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeB/GVLs/GlobalVariables.xml
@@ -0,0 +1,36 @@
+
\ No newline at end of file
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeB/Links.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeB/Links.xml
new file mode 100644
index 0000000..7b6e43f
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeB/Links.xml
@@ -0,0 +1,82 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeB/POUs/FB_NciChannel.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeB/POUs/FB_NciChannel.xml
new file mode 100644
index 0000000..a8ec7c0
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeB/POUs/FB_NciChannel.xml
@@ -0,0 +1,181 @@
+
\ No newline at end of file
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeB/POUs/FB_NciSequence.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeB/POUs/FB_NciSequence.xml
new file mode 100644
index 0000000..0fbaafc
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeB/POUs/FB_NciSequence.xml
@@ -0,0 +1,86 @@
+= 2 AND iMaxUsedChannels >= 1 THEN
+ CASE nState OF
+ 0:
+ IF bExecute THEN
+ bBusy := TRUE;
+ bDone := FALSE;
+ bError := FALSE;
+ dwErrorId := 0;
+ nState := 10;
+ END_IF
+
+ 10:
+ fbNciChaA(
+ bExecute := bExecute,
+ stNcToPlcX := AxisRef[1].NcToPlc,
+ stNcToPlcY := AxisRef[2].NcToPlc,
+ stNcToPlcZ := stNcToPlcDummy,
+ stNcToPlcC := stNcToPlcDummy,
+ stPlcToNci := stPlcToNci,
+ stNciToPlc := stNciToPlc
+ );
+
+ IF NOT fbNciChaA.bBusy THEN
+ fbNciChaA( bExecute:= FALSE, stNcToPlcX:= AxisRef[1].NcToPlc, stNcToPlcY:= AxisRef[2].NcToPlc, stNcToPlcZ:= stNcToPlcDummy,
+ stNcToPlcC:= stNcToPlcDummy, stPlcToNci:= stPlcToNci, stNciToPlc:= stNciToPlc );
+
+ bBusy := FALSE;
+
+ IF NOT fbNciChaA.bErr THEN
+ bDone := TRUE;
+ ELSE
+ bError := fbNciChaA.bErr;
+ dwErrorId := fbNciChaA.nErrId;
+ END_IF
+ IF NOT bExecute THEN
+ nState := 0;
+ ELSE
+ nState := 20;
+ END_IF
+ END_IF
+
+ 20:
+ bBusy := FALSE;
+ IF NOT bExecute THEN
+ IF fbNciChaA.bErr THEN
+ bError := fbNciChaA.bErr;
+ dwErrorId := fbNciChaA.nErrId;
+ END_IF
+ nState := 0;
+ END_IF
+ END_CASE
+
+END_IF
+]]>
\ No newline at end of file
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeB/POUs/MAIN.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeB/POUs/MAIN.xml
new file mode 100644
index 0000000..95576ee
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeB/POUs/MAIN.xml
@@ -0,0 +1,152 @@
+ 32767 THEN
+ iNciOverrideRaw := 0;
+END_IF
+NciOverrideFilter(
+ OverrideValueRaw := iNciOverrideRaw,
+ LowerOverrideThreshold := 0,
+ UpperOverrideThreshold := 32767,
+ OverrideSteps := 200,
+ OverrideRecoveryTime := T#150ms,
+);
+
+(* enable *)
+A_Enable();
+IF bEnabled THEN
+ bCallSequence := TRUE;
+ A_TriggerExec();
+END_IF
+
+IF bCallSequence THEN
+ (* call motion sequence *)
+ IF bNciReq OR fbNciSequence.bBusy THEN
+ fbNciSequence(
+ bExecute := TRUE,
+ iMaxUsedAxes := iMaxUsedAxes,
+ iMaxUsedChannels:= iMaxUsedChannels,
+ AxisRef := AxisRef,
+ stNciToPlc := stiNciToPlc,
+ stPlcToNci := stoPlcToNci,
+ bBusy => bBusy,
+ bDone => bDone,
+ bError => bError,
+ dwErrorId => dwErrorId
+ );
+ ELSE
+ fbNciSequence(
+ bExecute := FALSE,
+ AxisRef := AxisRef,
+ stNciToPlc := stiNciToPlc,
+ stPlcToNci := stoPlcToNci,
+ );
+ END_IF
+END_IF
+]]> bAxisEnabled[I]
+ );
+ bEnabled := bEnabled AND bAxisEnabled[I];
+ bEnableError := bEnableError OR fbMC_Power[I].Error;
+(* bResetReq := bResetReq OR AxisInErrorState(stiNcToPlc[I].nStateDWord);*)
+END_FOR
+
+(* NCI override *)
+lrOverrideNci := LIMIT(0, UINT_TO_LREAL(iNciOverrideRaw) * 100.0 / lrOverrideMaxScale, 100);
+ItpSetOverridePercent(lrOverrideNci, stoPlcToNci);
+]]>
\ No newline at end of file
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeC.tszip b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeC.tszip
new file mode 100644
index 0000000..f4dda94
Binary files /dev/null and b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeC.tszip differ
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeC/AxisX.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeC/AxisX.xml
new file mode 100644
index 0000000..df7fece
Binary files /dev/null and b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeC/AxisX.xml differ
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeC/AxisY.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeC/AxisY.xml
new file mode 100644
index 0000000..2c98063
Binary files /dev/null and b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeC/AxisY.xml differ
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeC/AxisZ.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeC/AxisZ.xml
new file mode 100644
index 0000000..df3d926
Binary files /dev/null and b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeC/AxisZ.xml differ
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeC/Datatypes/E_AxisState.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeC/Datatypes/E_AxisState.xml
new file mode 100644
index 0000000..a89c0f6
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeC/Datatypes/E_AxisState.xml
@@ -0,0 +1,9 @@
+
\ No newline at end of file
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeC/Datatypes/E_MoveCmd.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeC/Datatypes/E_MoveCmd.xml
new file mode 100644
index 0000000..821477a
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeC/Datatypes/E_MoveCmd.xml
@@ -0,0 +1,10 @@
+
\ No newline at end of file
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeC/Links.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeC/Links.xml
new file mode 100644
index 0000000..3e8f680
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeC/Links.xml
@@ -0,0 +1,68 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeC/POUs/Axis/FB_AX5000Axis.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeC/POUs/Axis/FB_AX5000Axis.xml
new file mode 100644
index 0000000..9503404
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeC/POUs/Axis/FB_AX5000Axis.xml
@@ -0,0 +1,79 @@
+ iDiagNumber
+ );
+ eCurState := eAxisState_Idle;
+ END_IF
+
+END_CASE
+
+M_HardwareDiag := eCurState <> eAxisState_Idle;
+bExecHWDiag_ := bExecute;
+]]> eAxisState_Idle;
+bExecHWRes_ := bExecute;]]>
\ No newline at end of file
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeC/POUs/Axis/FB_NcAxis.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeC/POUs/Axis/FB_NcAxis.xml
new file mode 100644
index 0000000..517b128
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeC/POUs/Axis/FB_NcAxis.xml
@@ -0,0 +1,213 @@
+ 0);
+]]> overwrite method if necessary
+CASE eCurState OF
+eAxisState_Idle:
+ IF bExecute AND NOT bExecHWDiag_ THEN
+ eCurState := eAxisState_Diag;
+ END_IF
+
+eAxisState_Diag:
+ eCurState := eAxisState_Idle;
+
+END_CASE
+
+M_HardwareDiag := eCurState <> eAxisState_Idle;
+bExecHWDiag_ := bExecute;
+
+]]> bDone, Busy => bBusy,
+ Active => bActive, Error => bError, ErrorID => iErrorId
+ );
+ eCurState := eAxisState_Move;
+
+ eCmd_MoveModulo:
+ fbMcMoveMod(
+ Execute := bExecute, Position:= fPosition, Velocity:= fVelocity,
+ Axis := sAxis, Done => bDone, Busy => bBusy,
+ Active => bActive, Error => bError, ErrorID => iErrorId
+ );
+ eCurState := eAxisState_Move;
+
+ eCmd_MoveRelative:
+ fbMcMoveRel(
+ Execute := bExecute, Distance:= fPosition, Velocity:= fVelocity,
+ Axis := sAxis, Done => bDone, Busy => bBusy,
+ Active => bActive, Error => bError, ErrorID => iErrorId
+ );
+ eCurState := eAxisState_Move;
+
+ eCmd_MoveVelocity:
+ fbMcMoveVel(
+ Execute := bExecute, Velocity:= fVelocity, Axis := sAxis,
+ InVelocity=> bDone, Busy => bBusy, Active => bActive,
+ Error => bError, ErrorID => iErrorId, Busy => bBusy,
+ Active => bActive, Error => bError, ErrorID => iErrorId
+ );
+ eCurState := eAxisState_Move;
+ END_CASE
+ END_IF
+
+eAxisState_Move:
+ CASE eMoveCmd OF
+ eCmd_MoveAbsolute:
+ fbMcMoveAbs(
+ Execute := TRUE, Position:= fPosition, Velocity:= fVelocity,
+ Axis := sAxis, Done => bDone, Busy => bBusy,
+ Active => bActive, Error => bError, ErrorID => iErrorId
+ );
+ IF bDone OR bError THEN
+ fbMcMoveAbs(Execute := FALSE,Axis := sAxis);
+ eCurState := eAxisState_Idle;
+ END_IF
+
+ eCmd_MoveModulo:
+ fbMcMoveMod(
+ Execute := TRUE, Position:= fPosition, Velocity:= fVelocity,
+ Axis := sAxis, Done => bDone, Busy => bBusy,
+ Active => bActive, Error => bError, ErrorID => iErrorId
+ );
+ IF bDone OR bError THEN
+ fbMcMoveMod(Execute := FALSE,Axis := sAxis);
+ eCurState := eAxisState_Idle;
+ END_IF
+
+ eCmd_MoveRelative:
+ fbMcMoveRel(
+ Execute := TRUE, Distance:= fPosition, Velocity:= fVelocity,
+ Axis := sAxis, Done => bDone, Busy => bBusy,
+ Active => bActive, Error => bError, ErrorID => iErrorId
+ );
+ IF bDone OR bError THEN
+ fbMcMoveRel(Execute := FALSE,Axis := sAxis);
+ eCurState := eAxisState_Idle;
+ END_IF
+
+ eCmd_MoveVelocity:
+ fbMcMoveVel(
+ Execute := TRUE, Velocity:= fVelocity, Axis := sAxis,
+ InVelocity=> bDone, Busy => bBusy, Active => bActive,
+ Error => bError, ErrorID => iErrorId, Busy => bBusy,
+ Active => bActive, Error => bError, ErrorID => iErrorId
+ );
+ IF bDone OR bError THEN
+ fbMcMoveVel(Execute := FALSE,Axis := sAxis);
+ eCurState := eAxisState_Idle;
+ END_IF
+ END_CASE
+END_CASE
+
+M_Move := (eCurState <> eAxisState_Idle);
+bExecMove_ := bExecute;]]> bDone,
+ Busy => bBusy, Error => bError, ErrorID => iErrorId
+ );
+ eCurState := eAxisState_Reset;
+ END_IF
+
+eAxisState_Reset:
+ fbMcReset(
+ Execute := FALSE, Axis := sAxis, Done => bDone,
+ Busy => bBusy, Error => bError, ErrorID => iErrorId
+ );
+ IF fbMcReset.Done OR fbMcReset.Error THEN
+ eCurState := eAxisState_Idle;
+ END_IF
+END_CASE
+
+M_Reset := eCurState <> eAxisState_Idle;
+bExecReset_ := bExecute;]]> overwrite method if necessary
+CASE eCurState OF
+eAxisState_Idle:
+ IF bExecute AND NOT bExecHWRes_ THEN
+ eCurState := eAxisState_Reset;
+ END_IF
+
+eAxisState_Reset:
+ eCurState := eAxisState_Idle;
+
+END_CASE
+
+M_HardwareReset := eCurState <> eAxisState_Idle;
+bExecHWRes_ := bExecute;]]>
\ No newline at end of file
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeC/POUs/Axis/IAxis.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeC/POUs/Axis/IAxis.xml
new file mode 100644
index 0000000..65a5d5c
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeC/POUs/Axis/IAxis.xml
@@ -0,0 +1,35 @@
+
\ No newline at end of file
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeC/POUs/FB_Table.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeC/POUs/FB_Table.xml
new file mode 100644
index 0000000..5715a30
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeC/POUs/FB_Table.xml
@@ -0,0 +1,127 @@
+
\ No newline at end of file
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeC/POUs/MAIN.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeC/POUs/MAIN.xml
new file mode 100644
index 0000000..5d167f2
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeC/POUs/MAIN.xml
@@ -0,0 +1,49 @@
+
\ No newline at end of file
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeD/Datatypes/E_FunctionType.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeD/Datatypes/E_FunctionType.xml
new file mode 100644
index 0000000..f9e3df7
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeD/Datatypes/E_FunctionType.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeD/GVLs/GVL_Constants.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeD/GVLs/GVL_Constants.xml
new file mode 100644
index 0000000..18fb326
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeD/GVLs/GVL_Constants.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeD/POUs/FB_FunctionGenerator.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeD/POUs/FB_FunctionGenerator.xml
new file mode 100644
index 0000000..8f79711
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeD/POUs/FB_FunctionGenerator.xml
@@ -0,0 +1,331 @@
+
+
+
+
+ fFrequency THEN
+ bInit := TRUE; // For automatic initializing
+ fLastFrequency := fFrequency;
+ END_IF
+ IF fLastAmplitude <> fAmplitude THEN
+ bInit := TRUE; // For automatic initializing
+ fLastAmplitude := fAmplitude;
+ END_IF
+ IF fLastOffset <> fOffset THEN
+ bInit := TRUE; // For automatic initializing
+ fLastOffset := fOffset;
+ END_IF
+ IF nLastDutyCycle <> nDutyCycle THEN
+ bInit := TRUE; // For automatic initializing
+ nLastDutyCycle := nDutyCycle;
+ END_IF
+ IF eLastFunction <> eFunction THEN
+ bInit := TRUE; // For automatic initializing
+ eLastFunction := eFunction;
+ END_IF
+ IF bInit THEN
+ // Get taks info
+ fbGetTaskIdx();
+ fCycleTime := TwinCAT_SystemInfoVarList._TaskInfo[fbGetTaskIdx.index].CycleTime (*100ns*) / (10.0 * 1000.0 * 1000.0);
+ fLastSignalValue := 0;
+ nSign := 1;
+ fAngularIncrement := 0;
+ // Flush out old data
+ MEMSET(ADR(aSignal), 0, SIZEOF(aSignal));
+ IF fFrequency <> 0 AND fCycleTime > 0 THEN
+ // Calculate period, increments per plc cycle, increment per oversample
+ IF cOversamples <> 0 THEN
+ IF eFunction = E_FunctionType.eSine THEN
+ fPeriod := 1/fFrequency;
+ fAngularIncrementPerCycle := 360*(fCycleTime/fPeriod);
+ fAngularIncrementPerSample := fAngularIncrementPerCycle/cOversamples;
+ // no phase adjustment
+ bInit := FALSE;
+ ELSIF eFunction = E_FunctionType.eSquare THEN
+ fPeriod := 1/fFrequency;
+ fAngularIncrementPerCycle := 360*(fCycleTime/fPeriod);
+ fAngularIncrementPerSample := fAngularIncrementPerCycle/cOversamples;
+ fPhase := 0.5*360;
+ bInit := FALSE;
+ ELSIF eFunction = E_FunctionType.ePulse THEN
+ fPeriod := 1/fFrequency;
+ fAngularIncrementPerCycle := 360*(fCycleTime/fPeriod);
+ fAngularIncrementPerSample := fAngularIncrementPerCycle/cOversamples;
+ IF nDutyCycle > 100 THEN
+ nDutyCycle := 100;
+ END_IF
+ fPhase := (UDINT_TO_LREAL(nDutyCycle)/100)*360;
+ bInit := FALSE;
+ ELSIF eFunction = E_FunctionType.eTriangular THEN
+ fPeriod := 1/fFrequency;
+ fAngularIncrementPerCycle := 360*(fCycleTime/fPeriod);
+ fAngularIncrementPerSample := fAngularIncrementPerCycle/cOversamples;
+ fPhase := 0.5*360;
+ fDelta := 4*(fAmplitude/(360/fAngularIncrementPerSample));
+ bInit := FALSE;
+ ELSIF eFunction = E_FunctionType.eSawtooth THEN
+ fPeriod := 1/fFrequency;
+ fAngularIncrementPerCycle := 360*(fCycleTime/fPeriod);
+ fAngularIncrementPerSample := fAngularIncrementPerCycle/cOversamples;
+ fDelta := fAmplitude/(360/fAngularIncrementPerSample);
+ bInit := FALSE;
+ ELSIF eFunction = E_FunctionType.eAM THEN
+ fPeriod := 1/fFrequency;
+ fAngularIncrementPerCycle := 360*(fCycleTime/fPeriod);
+ fAngularIncrementPerSample := fAngularIncrementPerCycle/cOversamples;
+ // no phase adjustment
+ fCarrierPeriod := 1/fCarrierFrequency;
+ fCarrierAngularIncrementPerCycle := 360*(fCycleTime/fCarrierPeriod);
+ fCarrierAngularIncrementPerSample := fCarrierAngularIncrementPerCycle/cOversamples;
+ // no phase adjustment
+ bInit := FALSE;
+ ELSE
+ bError := TRUE;
+ END_IF
+ ELSE
+ bError := TRUE;
+ END_IF
+ ELSE
+ bError := TRUE;
+ END_IF
+ END_IF
+
+ // Enable function generator
+ IF NOT bError THEN
+ CASE eFunction OF
+ // sine: typical for vibrations originating from rotating machine
+ E_FunctionType.eSine: Sine();
+
+ // square: mixed sine signals good for analyzing spectrum
+ E_FunctionType.eSquare: Square();
+
+ // pulse: mixed sine signals good for analyzing spectrum
+ E_FunctionType.ePulse: Pulse();
+
+ // sawtooth: ramp-type vibrations, continuously increasing
+ E_FunctionType.eSawtooth: Sawtooth();
+
+ // triangular: mixed sine signals good for analyzing spectrum
+ E_FunctionType.eTriangular: Triangular();
+
+ // amplitude modulation: typical for vibrations originating from gear-tooth failure or bearing faults
+ // Carrier signal with own frequency and amplitude
+ E_FunctionType.eAM: AM();
+ END_CASE
+ END_IF
+ELSE
+ // Flush out old data
+ MEMSET(ADR(aSignal), 0, SIZEOF(aSignal));
+END_IF]]>
+
+
+
+
+
+
+
+
+
+
+ = 360) THEN
+ fAngularIncrement := fAngularIncrement - DINT_TO_LREAL(LREAL_TO_DINT(fAngularIncrement/360))*360;
+ // or with Tc2_Math library: fAngularIncrement := LMOD(fAngularIncrement,360);
+ fLastSignalValue := fLastSignalValue -fAmplitude;
+ END_IF
+ fAngularIncrement := fAngularIncrement + fAngularIncrementPerSample;
+
+ aSignal[nSamples] := fLastSignalValue + fDelta;
+
+ // Store last sample
+ fLastSignalValue := aSignal[nSamples];
+
+ aSignal[nSamples] := aSignal[nSamples] + fOffset;
+END_FOR
+]]>
+
+
+
+
+
+
+
+
+
+
+
+ = 360) THEN
+ fAngularIncrement := fAngularIncrement - DINT_TO_LREAL(LREAL_TO_DINT(fAngularIncrement/360))*360;
+ // or with Tc2_Math library: fAngularIncrement := LMOD(fAngularIncrement,360);
+ END_IF
+ IF (fAngularIncrement < fPhase) THEN
+ nSign := 1;
+ ELSIF (fAngularIncrement >= fPhase) THEN
+ nSign := 0;
+ END_IF
+ fAngularIncrement := fAngularIncrement + fAngularIncrementPerSample;
+
+ aSignal[nSamples] := nSign*fAmplitude;
+
+ aSignal[nSamples] := aSignal[nSamples] + fOffset;
+END_FOR
+]]>
+
+
+
+
+
+ = 360) THEN
+ fAngularIncrement := fAngularIncrement - DINT_TO_LREAL(LREAL_TO_DINT(fAngularIncrement/360))*360;
+ // or with Tc2_Math library: fAngularIncrement := LMOD(fAngularIncrement,360);
+ END_IF
+ IF (fAngularIncrement < fPhase) THEN
+ nSign := 1;
+ ELSIF (fAngularIncrement >= fPhase) THEN
+ nSign := -1;
+ END_IF
+ fAngularIncrement := fAngularIncrement + fAngularIncrementPerSample;
+
+ aSignal[nSamples] := nSign*fAmplitude;
+
+ aSignal[nSamples] := aSignal[nSamples] + fOffset;
+END_FOR
+]]>
+
+
+
+
+
+ = 360) THEN
+ fAngularIncrement := fAngularIncrement - DINT_TO_LREAL(LREAL_TO_DINT(fAngularIncrement/360))*360;
+ // or with Tc2_Math library: fAngularIncrement := LMOD(fAngularIncrement,360);
+ END_IF
+ // Negative delta -> Positive delta
+ IF fAngularIncrement < fPhase/2 THEN
+ nSign := 1;
+ ELSIF fAngularIncrement >= fPhase/2 AND fAngularIncrement < 3*fPhase/2 THEN
+ nSign := -1;
+ ELSIF fAngularIncrement >= 3*fPhase/2 THEN
+ nSign := 1;
+ END_IF
+ fAngularIncrement := fAngularIncrement + fAngularIncrementPerSample;
+
+ aSignal[nSamples] := fLastSignalValue + nSign*fDelta;
+ IF aSignal[nSamples] > fAmplitude THEN
+ aSignal[nSamples] := aSignal[nSamples] - 2*(aSignal[nSamples]-fAmplitude);
+ ELSIF aSignal[nSamples] < (-1)*fAmplitude THEN
+ aSignal[nSamples] := aSignal[nSamples] - 2*(aSignal[nSamples]+fAmplitude);
+ END_IF
+
+ // Store last sample
+ fLastSignalValue := aSignal[nSamples];
+
+ aSignal[nSamples] := aSignal[nSamples] + fOffset;
+END_FOR
+
+
+ ]]>
+
+
+
+
+
+
+ "White"
+ false
+
+
+
+ System.Boolean
+ {bb741845-1ec5-4be9-bb0d-2cf7058af574}
+ System.String
+
+
+
+
\ No newline at end of file
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeD/POUs/MAIN.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeD/POUs/MAIN.xml
new file mode 100644
index 0000000..1b7f1fc
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/MachineTypeD/POUs/MAIN.xml
@@ -0,0 +1,86 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeA/Axis1.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeA/Axis1.xml
new file mode 100644
index 0000000..493edcf
Binary files /dev/null and b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeA/Axis1.xml differ
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeA/Axis2.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeA/Axis2.xml
new file mode 100644
index 0000000..664eb2b
Binary files /dev/null and b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeA/Axis2.xml differ
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeA/Drive.xti b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeA/Drive.xti
new file mode 100644
index 0000000..5bbcc49
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeA/Drive.xti
@@ -0,0 +1,145 @@
+
+
+
+ 424dd6020000000000003600000028000000100000000e0000000100180000000000a002000000000000000000000000000000000000ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff808080808080808080808080808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ff000000ff00ffff00ffff00ffc0c0c0c0c0c0c0c0c0c0c0c08080800000ff000000000000000000000000000000000000000000ff00ffff00ffff00ffc0c0c0c0c0c0c0c0c0c0c0c08080800000ff0000000000000000000000000000000000000000000000ff0000ffff00ffc0c0c0c0c0c0c0c0c0c0c0c08080800000ff000000000000000000000000000000000000000000ff00ffff00ffff00ffff0000ff0000ff0000ff00008080800000ffff00ffff00ffff00ff000000ff00ffff00ff000000ff00ffff00ffff00ffff0000c0c0c0c0c0c0c0c0c0808080000000000000000000000000000000ff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0ff0000c0c0c0c0c0c0808080000000ff00ffff00ffff00ffff00ffff00ffff00ff000000ff00ffff00ffff00ffc0c0c0c0c0c0ff0000c0c0c0808080000000000000000000000000000000000000000000000000ff00ffff00ffff00ffc0c0c0c0c0c0c0c0c0ff00008080800000000000000000000000000000000000000000000000000000ff0000ffff00ffff0000c0c0c0c0c0c0ff0000808080000000000000000000000000000000000000000000000000ff00ffff00ffff00ffc0c0c0ff0000ff0000c0c0c0808080000000ff00ffff00ffff00ff000000ff00ffff00ff000000ff00ffff00ffff00ffc0c0c0c0c0c0c0c0c0c0c0c0808080000000000000000000000000000000ff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0c0c0c0c0c0c0c0c0c0808080000000ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0c0c0c0c0c0c0c0c0c0808080
+
+
+ __FILENAME__
+ 1000
+
+ 001880002600010001000000800080008000001826010000
+ 001a80002200010002000000800080008000001a22010000
+ 00100c002400010003000000000000000000001024010000
+ 001114002000010004000000000000000000001120010000
+ 0000000000000000001000020100000001000000000000000000000000000000
+ 0000000000000000001100010100000002000000000000000000000000000000
+ 00000000000000000d0800010100000003000000000000000000000000000000
+ 0010140200181402
+ 3007000090d0030050c30000000000000000ffff000000000000000000000000
+ 446353796e633235300000000000000053796e63206379636c652074696d653a20323530b5730000000000000000000090d0030050c3000000000000ffff30070000000000000000000000000000000000000000000000000000000000000000
+ 446353796e633132350000000000000053796e63206379636c652074696d653a20313235b5730000000000000000000048e80100a861000000000000ffff30070000000000000000000000000000000000000000000000000000000000000000
+ 02000500100000000d000000000000000000000000000000000000000000000003400a8000000000fe070000000000004665617475726520666c61677300
+ 02000500100000000d000000000000000000000000000000000000000000000023400a8000000000ff070000000000004665617475726520666c61677300
+ 020005000a0000001500000000000000000000000000000000000000000000000340010000000000d007546e637963202d204e43206379636c652074696d6500
+ 020005000a0000001700000000000000000000000000000000000000000000000340020000000000d0075473637963202d20436f6d6d206379636c652074696d6500
+ 020005000a0000000e000000000000000000000000000000000000000000000003402000000000000b004f7065726174696f6e206d6f646500
+ 020005000a0000000e000000000000000000000000000000000000000000000023402000000000000b004f7065726174696f6e206d6f646500
+ 020005000a0000001400000000000000000000000000000000000000000000000340c98000000000fc084e6f6d696e616c206d61696e20766f6c7461676500
+ 020005000a0000002500000000000000000000000000000000000000000000000340ca8000000000c8004d61696e20766f6c7461676520706f73697469766520746f6c6572616e63652072616e676500
+ 020005000a0000002500000000000000000000000000000000000000000000000340cb8000000000c8004d61696e20766f6c74616765206e6567617469766520746f6c6572616e63652072616e676500
+ 020005000a0000001d00000000000000000000000000000000000000000000000340cc80000000000100506f776572204d616e6167656d656e7420636f6e74726f6c20776f726400
+ 020005001c0000001500000000000000000000000000000000000000000000000340368000000000100022004158353230332d303030302d23232323436f6e66696775726564206472697665207479706500
+ 020005001c000000150000000000000000000000000000000000000000000000034035800000000010002200414d333032312d304334302d30303030436f6e66696775726564206d6f746f72207479706500
+ 020005000c00000012000000000000000000000000000000000000000000000003406d00000000009c1800004d6f746f72207065616b2063757272656e7400
+ 020005000c0000001e000000000000000000000000000000000000000000000003406f00000000002c0600004d6f746f7220636f6e74696e756f7573207374616c6c2063757272656e7400
+ 020005000c0000001300000000000000000000000000000000000000000000000340710000000000401f00004d6178696d756d206d6f746f7220737065656400
+ 020005000a000000140000000000000000000000000000000000000000000000034033800000000003004e756d626572206f6620706f6c6520706169727300
+ 020005000a0000000900000000000000000000000000000000000000000000000340378000000000c3004d6f746f7220454d4600
+ 020005000a0000001d000000000000000000000000000000000000000000000003404680000000002d004d6f746f7220636f6e74696e756f7573207374616c6c20746f7271756500
+ 020005000c0000001100000000000000000000000000000000000000000000000340498000000000930000004d6f746f72207065616b20746f7271756500
+ 020005000a0000001d000000000000000000000000000000000000000000000003403980000000007869456c656374726963616c20636f6d6d75746174696f6e206f666673657400
+ 0200050014000000140000000000000000000000000000000000000000000000034042800000000008000800140500006c070000456c656374726963206d6f746f72206d6f64656c00
+ 020005001400000013000000000000000000000000000000000000000000000003403e800000000008000800e001500064000100546865726d616c206d6f746f72206d6f64656c00
+ 020005000c00000021000000000000000000000000000000000000000000000003408800000000005e960900506f73697469766520616363656c65726174696f6e206c696d69742076616c756500
+ 020005000c00000021000000000000000000000000000000000000000000000003408900000000005e9609004e6567617469766520616363656c65726174696f6e206c696d69742076616c756500
+ 020005000a000000170000000000000000000000000000000000000000000000034032800000000000004d6f746f7220636f6e737472756374696f6e207479706500
+ 020005001000000027000000000000000000000000000000000000000000000003404480000000000400040064000000546865726d616c206f7665726c6f616420666163746f7220286d6f746f722077696e64696e672900
+ 020005000a0000001900000000000000000000000000000000000000000000000340c9000000000020034d6f746f72207761726e696e672074656d706572617475726500
+ 020005000a0000001b00000000000000000000000000000000000000000000000340cc000000000078054d6f746f72207368757420646f776e2074656d706572617475726500
+ 02000500140000001500000000000000000000000000000000000000000000000340478000000000080008000b000000000000004d656368616e6963616c206d6f746f72206461746100
+ 0200050030000000160000000000000000000000000000000000000000000000034059800000000024002400028000003e0000003e000000c980000084030000fc0800000000000000000000000000004d6f746f72206461746120636f6e73747261696e747300
+ 020005000a00000020000000000000000000000000000000000000000000000003406a0000000000440243757272656e74206c6f6f702070726f706f7274696f6e616c206761696e203100
+ 020005000a0000002b000000000000000000000000000000000000000000000003406b0000000000050043757272656e7420636f6e74726f6c206c6f6f7020696e74656772616c20616374696f6e2074696d65203100
+ 020005000a0000002000000000000000000000000000000000000000000000000340348000000000b80b54696d65206c696d69746174696f6e20666f72207065616b2063757272656e7400
+ 020005000c0000001f00000000000000000000000000000000000000000000000340388000000000321200004d6178206d6f746f722073706565642077697468206d617820746f7271756500
+ 020005000c0000001f000000000000000000000000000000000000000000000003405c8000000000580c0000436f6e66696775726564206368616e6e656c207065616b2063757272656e7400
+ 020005000c0000001a000000000000000000000000000000000000000000000003405d80000000002c060000436f6e66696775726564206368616e6e656c2063757272656e7400
+ 020005000c0000001c000000000000000000000000000000000000000000000003405b0000000000f90b1b084269706f6c61722076656c6f63697479206c696d69742076616c756500
+ 020005000a00000017000000000000000000000000000000000000000000000003400280000000003e0043757272656e74206374726c206379636c652074696d6500
+ 020005000a0000001b00000000000000000000000000000000000000000000000340c38100000000000043757272656e7420636f6e74726f6c6c65722073657474696e677300
+ 020005000a00000018000000000000000000000000000000000000000000000003400380000000007d0056656c6f63697479206374726c206379636c652074696d6500
+ 020005000a0000002600000000000000000000000000000000000000000000000340ff8100000000fa0056656c6f636974792066696c746572206c6f7720706173732074696d6520636f6e7374616e7400
+ 020005000a0000001800000000000000000000000000000000000000000000000340048000000000fa00506f736974696f6e206374726c206379636c652074696d6500
+ 02000500ec0000000f00000000000000000000000000000000000000000000000340968000000000e000e0000100000048656e6723414433362d3132313941462e305842493000000000000000000000000000000000000002003200030000000000000001000300000000000008000000000000e8030000e8030000000000000000000000000000000000000000000000000000010003000090185413000c0018000c0001000100000000000000000000000000000002000000060043000100010008000400130001000c005500102705003300460090010500000001000000ff000100000000000000000000000000a600a600780000000000000000000000000000000000000000000000466565646261636b2031207479706500
+ 020005000c000000190000000000000000000000000000000000000000000000034098800000000001000000466565646261636b20312067656172206e756d657261746f7200
+ 020005000c0000001b0000000000000000000000000000000000000000000000034099800000000001000000466565646261636b203120676561722064656e6f6d696e61746f7200
+ 020005000a0000001d000000000000000000000000000000000000000000000003403d800000000000004d6f746f722074656d70657261747572652073656e736f72207479706500
+ 020005000c0000001f000000000000000000000000000000000000000000000003406400000000005e01000056656c6f63697479206c6f6f702070726f706f7274696f6e616c206761696e00
+ 020005000a0000002200000000000000000000000000000000000000000000000340650000000000180056656c6f63697479206c6f6f7020696e74656772616c20616374696f6e2074696d6500
+ 02000500140000001b000000000000000000000000000000000000000000000003409a8000000000080008000000000000000000466565646261636b2031207265666572656e6365207369676e616c00
+ 020005001800000015000000000000000000000000000000000000000000000023403580000000000c002200414d383032312d7842783000436f6e66696775726564206d6f746f72207479706500
+ 020005000a000000140000000000000000000000000000000000000000000000234033800000000003004e756d626572206f6620706f6c6520706169727300
+ 020005000c0000001e000000000000000000000000000000000000000000000023406f0000000000520300004d6f746f7220636f6e74696e756f7573207374616c6c2063757272656e7400
+ 020005000c0000001300000000000000000000000000000000000000000000002340c40000000000520300004d6f746f722072617465642063757272656e7400
+ 020005000c00000012000000000000000000000000000000000000000000000023406d0000000000241300004d6f746f72207065616b2063757272656e7400
+ 020005000a00000013000000000000000000000000000000000000000000000023404d8000000000a00f4d6f746f7220726174656420766f6c7461676500
+ 020005000a0000001300000000000000000000000000000000000000000000002340d88000000000c4224d6178204443204c696e6b20766f6c7461676500
+ 02000500300000001600000000000000000000000000000000000000000000002340598000000000240024002683000000000000401f00000000000000000000000000000000000000000000000000004d6f746f72206461746120636f6e73747261696e747300
+ 020005000c00000011000000000000000000000000000000000000000000000023404980000000000c0100004d6f746f72207065616b20746f7271756500
+ 020005005c0000001b000000000000000000000000000000000000000000000023404a800000000050005000ea010000d4030000be050000a8070000920900007c0b0000660d0000500f00003a110000241300001d0000003a00000057000000720000008e000000a8000000c2000000db000000f40000000c0100004d6f746f7220546f7271756520436861726163746572697374696300
+ 020005000a0000000900000000000000000000000000000000000000000000002340378000000000a4014d6f746f7220454d4600
+ 0200050014000000140000000000000000000000000000000000000000000000234042800000000008000800640f00002c1a0000456c656374726963206d6f746f72206d6f64656c00
+ 020005005c0000001f000000000000000000000000000000000000000000000023404b800000000050005000ea010000d4030000be050000a8070000920900007c0b0000660d0000500f00003a11000024130000da1100007a0d00002c0b0000060900009e070000c20600002c060000c805000078050000780500004d6f746f7220496e64756374616e636520436861726163746572697374696300
+ 020005000c0000001300000000000000000000000000000000000000000000002340710000000000282300004d6178696d756d206d6f746f7220737065656400
+ 02000500140000001500000000000000000000000000000000000000000000002340478000000000080008000e000000000000004d656368616e6963616c206d6f746f72206461746100
+ 020005000a0000001900000000000000000000000000000000000000000000002340c9000000000078054d6f746f72207761726e696e672074656d706572617475726500
+ 020005000a0000001b00000000000000000000000000000000000000000000002340cc0000000000dc054d6f746f72207368757420646f776e2074656d706572617475726500
+ 020005001400000013000000000000000000000000000000000000000000000023403e8000000000080008005802500064000000546865726d616c206d6f746f72206d6f64656c00
+ 020005003400000027000000000000000000000000000000000000000000000023404c800000000028002800d9fe17003a01440237031604e304a0054e06f20680010002800200038003000480040005800500064d6f746f722054656d70657261747572652053656e736f7220436861726163746572697374696300
+ 020005000a0000001b00000000000000000000000000000000000000000000002340c38100000000010443757272656e7420636f6e74726f6c6c65722073657474696e677300
+ 020005000a0000001d000000000000000000000000000000000000000000000023403980000000007869456c656374726963616c20636f6d6d75746174696f6e206f666673657400
+ 020005000a0000001d000000000000000000000000000000000000000000000023403d800000000007004d6f746f722074656d70657261747572652073656e736f72207479706500
+ 020005000a00000017000000000000000000000000000000000000000000000023400280000000003e0043757272656e74206374726c206379636c652074696d6500
+ 020005001c0000001500000000000000000000000000000000000000000000002340368000000000100022004158353230332d303030302d23232323436f6e66696775726564206472697665207479706500
+ 020005000c0000001a000000000000000000000000000000000000000000000023405d800000000052030000436f6e66696775726564206368616e6e656c2063757272656e7400
+ 020005000c0000001f000000000000000000000000000000000000000000000023405c8000000000a4060000436f6e66696775726564206368616e6e656c207065616b2063757272656e7400
+ 020005000a0000001d0000000000000000000000000000000000000000000000234046800000000033004d6f746f7220636f6e74696e756f7573207374616c6c20746f7271756500
+ 020005000c0000001c000000000000000000000000000000000000000000000023405b00000000007b8d410a4269706f6c61722076656c6f63697479206c696d69742076616c756500
+ 020005000a00000020000000000000000000000000000000000000000000000023406a00000000006c0943757272656e74206c6f6f702070726f706f7274696f6e616c206761696e203100
+ 020005000a0000002b000000000000000000000000000000000000000000000023406b0000000000080043757272656e7420636f6e74726f6c206c6f6f7020696e74656772616c20616374696f6e2074696d65203100
+ 020005000a0000002600000000000000000000000000000000000000000000002340ff8100000000fa0056656c6f636974792066696c746572206c6f7720706173732074696d6520636f6e7374616e7400
+ 020005000c0000001f000000000000000000000000000000000000000000000023406400000000001500000056656c6f63697479206c6f6f702070726f706f7274696f6e616c206761696e00
+ 020005000a00000022000000000000000000000000000000000000000000000023406500000000000b0056656c6f63697479206c6f6f7020696e74656772616c20616374696f6e2074696d6500
+ 02000500ec0000000f00000000000000000000000000000000000000000000002340968000000000e000e00003000000454b4d33362d304b4630413031384100000000000000000000000000000000000000000000000000000000001800000000000000050018000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000070018000000000012000c000000000002000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000960096007d0000000000000000000000000000000000000000000000466565646261636b2031207479706500
+ 020005001800000011000000000000000000000000000000000000000000000023400282000000000c000c0001000000f4012c01bc02000056656c6f63697479206f6273657276657200
+
+
+ UINT
+
+
+ DINT
+
+
+ DINT
+
+
+
+
+ UINT
+
+
+ DINT
+
+
+ DINT
+
+
+
+
+ UINT
+
+
+ DINT
+
+
+
+
+ UINT
+
+
+ DINT
+
+
+
+
+
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeA/Links.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeA/Links.xml
new file mode 100644
index 0000000..4bf1d26
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeA/Links.xml
@@ -0,0 +1,98 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeA/LinksOld.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeA/LinksOld.xml
new file mode 100644
index 0000000..a58b6ce
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeA/LinksOld.xml
@@ -0,0 +1,64 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeA/POUs/FB_Axis.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeA/POUs/FB_Axis.xml
new file mode 100644
index 0000000..f72ad34
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeA/POUs/FB_Axis.xml
@@ -0,0 +1,137 @@
+ 0);
+ bDriveError := AxisRef.NcToPlc.StateDWord.28;
+
+ Timer(IN := bStatus);
+ IF Timer.Q OR bNcError OR bDriveError THEN
+ Timer(IN := FALSE);
+
+ IF bDriveError THEN
+ fbSoEReset(Execute:= FALSE, Axis:= AxisRef);
+ iState := 10;
+ ELSIF bNCError THEN
+ fbMcReset(Execute := FALSE, Axis := AxisRef);
+ iState := 20;
+ ELSE
+ IF lrPosition <> lrPosition1 THEN
+ lrPosition := lrPosition1;
+ ELSE
+ lrPosition := lrPosition2;
+ END_IF
+ fbMCMove(
+ Execute:= FALSE,
+ Axis := AxisRef
+ );
+ iState := 30;
+ END_IF
+ END_IF
+
+10: (* drive reset *)
+ A_DriveReset();
+
+20: (* MC reset *)
+ A_MC2Reset();
+
+30: (* MC move absolute *)
+ A_MC2Move();
+
+31: (* MC move absolute *)
+ A_MC2Move();
+
+32: (* back to idle *)
+ iState := 0;
+
+40: (* MC halt *)
+ A_MC2Halt();
+END_CASE
+
+lrActPos := AxisRef.NcToPlc.ActPos;]]> bStatus,
+);
+]]> lrPosition1 THEN
+ lrPosition := lrPosition1;
+ ELSE
+ lrPosition := lrPosition2;
+ END_IF
+
+ fbMCMove(Execute := FALSE, Axis := AxisRef);
+ iState := iState + 1;
+END_IF
+
+IF bHalt THEN
+ fbMCMove(Execute := FALSE, Axis := AxisRef);
+ iState := 40;
+END_IF]]>
\ No newline at end of file
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeA/POUs/MAIN.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeA/POUs/MAIN.xml
new file mode 100644
index 0000000..0f6de45
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeA/POUs/MAIN.xml
@@ -0,0 +1,33 @@
+ lrActPos1
+);
+
+fbAxis2(
+ bDriveReset := bDriveReset,
+ bHalt := bHalt,
+ lrActPos => lrActPos2
+);
+
+bEnabled := fbAxis1.bStatus AND fbAxis2.bStatus;
+bError := fbAxis1.bDriveError OR fbAxis1.bNcError OR fbAxis2.bNcError OR fbAxis2.bDriveError;
+]]>
\ No newline at end of file
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeB/Axis1.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeB/Axis1.xml
new file mode 100644
index 0000000..d73b92b
Binary files /dev/null and b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeB/Axis1.xml differ
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeB/Axis2.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeB/Axis2.xml
new file mode 100644
index 0000000..8f75881
Binary files /dev/null and b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeB/Axis2.xml differ
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeB/Axis3.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeB/Axis3.xml
new file mode 100644
index 0000000..75e914d
Binary files /dev/null and b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeB/Axis3.xml differ
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeB/Axis4.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeB/Axis4.xml
new file mode 100644
index 0000000..9afa7ab
Binary files /dev/null and b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeB/Axis4.xml differ
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeB/Channel2.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeB/Channel2.xml
new file mode 100644
index 0000000..7c461bf
Binary files /dev/null and b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeB/Channel2.xml differ
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeB/Datatypes/E_Commands.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeB/Datatypes/E_Commands.xml
new file mode 100644
index 0000000..dacb2c4
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeB/Datatypes/E_Commands.xml
@@ -0,0 +1,8 @@
+
\ No newline at end of file
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeB/Datatypes/E_NCI_CTRL_STATE.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeB/Datatypes/E_NCI_CTRL_STATE.xml
new file mode 100644
index 0000000..bd740bd
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeB/Datatypes/E_NCI_CTRL_STATE.xml
@@ -0,0 +1,18 @@
+
\ No newline at end of file
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeB/Datatypes/E_States.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeB/Datatypes/E_States.xml
new file mode 100644
index 0000000..2ca6136
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeB/Datatypes/E_States.xml
@@ -0,0 +1,9 @@
+
\ No newline at end of file
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeB/Drive.xti b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeB/Drive.xti
new file mode 100644
index 0000000..5bbcc49
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeB/Drive.xti
@@ -0,0 +1,145 @@
+
+
+
+ 424dd6020000000000003600000028000000100000000e0000000100180000000000a002000000000000000000000000000000000000ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff808080808080808080808080808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ff000000ff00ffff00ffff00ffc0c0c0c0c0c0c0c0c0c0c0c08080800000ff000000000000000000000000000000000000000000ff00ffff00ffff00ffc0c0c0c0c0c0c0c0c0c0c0c08080800000ff0000000000000000000000000000000000000000000000ff0000ffff00ffc0c0c0c0c0c0c0c0c0c0c0c08080800000ff000000000000000000000000000000000000000000ff00ffff00ffff00ffff0000ff0000ff0000ff00008080800000ffff00ffff00ffff00ff000000ff00ffff00ff000000ff00ffff00ffff00ffff0000c0c0c0c0c0c0c0c0c0808080000000000000000000000000000000ff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0ff0000c0c0c0c0c0c0808080000000ff00ffff00ffff00ffff00ffff00ffff00ff000000ff00ffff00ffff00ffc0c0c0c0c0c0ff0000c0c0c0808080000000000000000000000000000000000000000000000000ff00ffff00ffff00ffc0c0c0c0c0c0c0c0c0ff00008080800000000000000000000000000000000000000000000000000000ff0000ffff00ffff0000c0c0c0c0c0c0ff0000808080000000000000000000000000000000000000000000000000ff00ffff00ffff00ffc0c0c0ff0000ff0000c0c0c0808080000000ff00ffff00ffff00ff000000ff00ffff00ff000000ff00ffff00ffff00ffc0c0c0c0c0c0c0c0c0c0c0c0808080000000000000000000000000000000ff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0c0c0c0c0c0c0c0c0c0808080000000ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0c0c0c0c0c0c0c0c0c0808080
+
+
+ __FILENAME__
+ 1000
+
+ 001880002600010001000000800080008000001826010000
+ 001a80002200010002000000800080008000001a22010000
+ 00100c002400010003000000000000000000001024010000
+ 001114002000010004000000000000000000001120010000
+ 0000000000000000001000020100000001000000000000000000000000000000
+ 0000000000000000001100010100000002000000000000000000000000000000
+ 00000000000000000d0800010100000003000000000000000000000000000000
+ 0010140200181402
+ 3007000090d0030050c30000000000000000ffff000000000000000000000000
+ 446353796e633235300000000000000053796e63206379636c652074696d653a20323530b5730000000000000000000090d0030050c3000000000000ffff30070000000000000000000000000000000000000000000000000000000000000000
+ 446353796e633132350000000000000053796e63206379636c652074696d653a20313235b5730000000000000000000048e80100a861000000000000ffff30070000000000000000000000000000000000000000000000000000000000000000
+ 02000500100000000d000000000000000000000000000000000000000000000003400a8000000000fe070000000000004665617475726520666c61677300
+ 02000500100000000d000000000000000000000000000000000000000000000023400a8000000000ff070000000000004665617475726520666c61677300
+ 020005000a0000001500000000000000000000000000000000000000000000000340010000000000d007546e637963202d204e43206379636c652074696d6500
+ 020005000a0000001700000000000000000000000000000000000000000000000340020000000000d0075473637963202d20436f6d6d206379636c652074696d6500
+ 020005000a0000000e000000000000000000000000000000000000000000000003402000000000000b004f7065726174696f6e206d6f646500
+ 020005000a0000000e000000000000000000000000000000000000000000000023402000000000000b004f7065726174696f6e206d6f646500
+ 020005000a0000001400000000000000000000000000000000000000000000000340c98000000000fc084e6f6d696e616c206d61696e20766f6c7461676500
+ 020005000a0000002500000000000000000000000000000000000000000000000340ca8000000000c8004d61696e20766f6c7461676520706f73697469766520746f6c6572616e63652072616e676500
+ 020005000a0000002500000000000000000000000000000000000000000000000340cb8000000000c8004d61696e20766f6c74616765206e6567617469766520746f6c6572616e63652072616e676500
+ 020005000a0000001d00000000000000000000000000000000000000000000000340cc80000000000100506f776572204d616e6167656d656e7420636f6e74726f6c20776f726400
+ 020005001c0000001500000000000000000000000000000000000000000000000340368000000000100022004158353230332d303030302d23232323436f6e66696775726564206472697665207479706500
+ 020005001c000000150000000000000000000000000000000000000000000000034035800000000010002200414d333032312d304334302d30303030436f6e66696775726564206d6f746f72207479706500
+ 020005000c00000012000000000000000000000000000000000000000000000003406d00000000009c1800004d6f746f72207065616b2063757272656e7400
+ 020005000c0000001e000000000000000000000000000000000000000000000003406f00000000002c0600004d6f746f7220636f6e74696e756f7573207374616c6c2063757272656e7400
+ 020005000c0000001300000000000000000000000000000000000000000000000340710000000000401f00004d6178696d756d206d6f746f7220737065656400
+ 020005000a000000140000000000000000000000000000000000000000000000034033800000000003004e756d626572206f6620706f6c6520706169727300
+ 020005000a0000000900000000000000000000000000000000000000000000000340378000000000c3004d6f746f7220454d4600
+ 020005000a0000001d000000000000000000000000000000000000000000000003404680000000002d004d6f746f7220636f6e74696e756f7573207374616c6c20746f7271756500
+ 020005000c0000001100000000000000000000000000000000000000000000000340498000000000930000004d6f746f72207065616b20746f7271756500
+ 020005000a0000001d000000000000000000000000000000000000000000000003403980000000007869456c656374726963616c20636f6d6d75746174696f6e206f666673657400
+ 0200050014000000140000000000000000000000000000000000000000000000034042800000000008000800140500006c070000456c656374726963206d6f746f72206d6f64656c00
+ 020005001400000013000000000000000000000000000000000000000000000003403e800000000008000800e001500064000100546865726d616c206d6f746f72206d6f64656c00
+ 020005000c00000021000000000000000000000000000000000000000000000003408800000000005e960900506f73697469766520616363656c65726174696f6e206c696d69742076616c756500
+ 020005000c00000021000000000000000000000000000000000000000000000003408900000000005e9609004e6567617469766520616363656c65726174696f6e206c696d69742076616c756500
+ 020005000a000000170000000000000000000000000000000000000000000000034032800000000000004d6f746f7220636f6e737472756374696f6e207479706500
+ 020005001000000027000000000000000000000000000000000000000000000003404480000000000400040064000000546865726d616c206f7665726c6f616420666163746f7220286d6f746f722077696e64696e672900
+ 020005000a0000001900000000000000000000000000000000000000000000000340c9000000000020034d6f746f72207761726e696e672074656d706572617475726500
+ 020005000a0000001b00000000000000000000000000000000000000000000000340cc000000000078054d6f746f72207368757420646f776e2074656d706572617475726500
+ 02000500140000001500000000000000000000000000000000000000000000000340478000000000080008000b000000000000004d656368616e6963616c206d6f746f72206461746100
+ 0200050030000000160000000000000000000000000000000000000000000000034059800000000024002400028000003e0000003e000000c980000084030000fc0800000000000000000000000000004d6f746f72206461746120636f6e73747261696e747300
+ 020005000a00000020000000000000000000000000000000000000000000000003406a0000000000440243757272656e74206c6f6f702070726f706f7274696f6e616c206761696e203100
+ 020005000a0000002b000000000000000000000000000000000000000000000003406b0000000000050043757272656e7420636f6e74726f6c206c6f6f7020696e74656772616c20616374696f6e2074696d65203100
+ 020005000a0000002000000000000000000000000000000000000000000000000340348000000000b80b54696d65206c696d69746174696f6e20666f72207065616b2063757272656e7400
+ 020005000c0000001f00000000000000000000000000000000000000000000000340388000000000321200004d6178206d6f746f722073706565642077697468206d617820746f7271756500
+ 020005000c0000001f000000000000000000000000000000000000000000000003405c8000000000580c0000436f6e66696775726564206368616e6e656c207065616b2063757272656e7400
+ 020005000c0000001a000000000000000000000000000000000000000000000003405d80000000002c060000436f6e66696775726564206368616e6e656c2063757272656e7400
+ 020005000c0000001c000000000000000000000000000000000000000000000003405b0000000000f90b1b084269706f6c61722076656c6f63697479206c696d69742076616c756500
+ 020005000a00000017000000000000000000000000000000000000000000000003400280000000003e0043757272656e74206374726c206379636c652074696d6500
+ 020005000a0000001b00000000000000000000000000000000000000000000000340c38100000000000043757272656e7420636f6e74726f6c6c65722073657474696e677300
+ 020005000a00000018000000000000000000000000000000000000000000000003400380000000007d0056656c6f63697479206374726c206379636c652074696d6500
+ 020005000a0000002600000000000000000000000000000000000000000000000340ff8100000000fa0056656c6f636974792066696c746572206c6f7720706173732074696d6520636f6e7374616e7400
+ 020005000a0000001800000000000000000000000000000000000000000000000340048000000000fa00506f736974696f6e206374726c206379636c652074696d6500
+ 02000500ec0000000f00000000000000000000000000000000000000000000000340968000000000e000e0000100000048656e6723414433362d3132313941462e305842493000000000000000000000000000000000000002003200030000000000000001000300000000000008000000000000e8030000e8030000000000000000000000000000000000000000000000000000010003000090185413000c0018000c0001000100000000000000000000000000000002000000060043000100010008000400130001000c005500102705003300460090010500000001000000ff000100000000000000000000000000a600a600780000000000000000000000000000000000000000000000466565646261636b2031207479706500
+ 020005000c000000190000000000000000000000000000000000000000000000034098800000000001000000466565646261636b20312067656172206e756d657261746f7200
+ 020005000c0000001b0000000000000000000000000000000000000000000000034099800000000001000000466565646261636b203120676561722064656e6f6d696e61746f7200
+ 020005000a0000001d000000000000000000000000000000000000000000000003403d800000000000004d6f746f722074656d70657261747572652073656e736f72207479706500
+ 020005000c0000001f000000000000000000000000000000000000000000000003406400000000005e01000056656c6f63697479206c6f6f702070726f706f7274696f6e616c206761696e00
+ 020005000a0000002200000000000000000000000000000000000000000000000340650000000000180056656c6f63697479206c6f6f7020696e74656772616c20616374696f6e2074696d6500
+ 02000500140000001b000000000000000000000000000000000000000000000003409a8000000000080008000000000000000000466565646261636b2031207265666572656e6365207369676e616c00
+ 020005001800000015000000000000000000000000000000000000000000000023403580000000000c002200414d383032312d7842783000436f6e66696775726564206d6f746f72207479706500
+ 020005000a000000140000000000000000000000000000000000000000000000234033800000000003004e756d626572206f6620706f6c6520706169727300
+ 020005000c0000001e000000000000000000000000000000000000000000000023406f0000000000520300004d6f746f7220636f6e74696e756f7573207374616c6c2063757272656e7400
+ 020005000c0000001300000000000000000000000000000000000000000000002340c40000000000520300004d6f746f722072617465642063757272656e7400
+ 020005000c00000012000000000000000000000000000000000000000000000023406d0000000000241300004d6f746f72207065616b2063757272656e7400
+ 020005000a00000013000000000000000000000000000000000000000000000023404d8000000000a00f4d6f746f7220726174656420766f6c7461676500
+ 020005000a0000001300000000000000000000000000000000000000000000002340d88000000000c4224d6178204443204c696e6b20766f6c7461676500
+ 02000500300000001600000000000000000000000000000000000000000000002340598000000000240024002683000000000000401f00000000000000000000000000000000000000000000000000004d6f746f72206461746120636f6e73747261696e747300
+ 020005000c00000011000000000000000000000000000000000000000000000023404980000000000c0100004d6f746f72207065616b20746f7271756500
+ 020005005c0000001b000000000000000000000000000000000000000000000023404a800000000050005000ea010000d4030000be050000a8070000920900007c0b0000660d0000500f00003a110000241300001d0000003a00000057000000720000008e000000a8000000c2000000db000000f40000000c0100004d6f746f7220546f7271756520436861726163746572697374696300
+ 020005000a0000000900000000000000000000000000000000000000000000002340378000000000a4014d6f746f7220454d4600
+ 0200050014000000140000000000000000000000000000000000000000000000234042800000000008000800640f00002c1a0000456c656374726963206d6f746f72206d6f64656c00
+ 020005005c0000001f000000000000000000000000000000000000000000000023404b800000000050005000ea010000d4030000be050000a8070000920900007c0b0000660d0000500f00003a11000024130000da1100007a0d00002c0b0000060900009e070000c20600002c060000c805000078050000780500004d6f746f7220496e64756374616e636520436861726163746572697374696300
+ 020005000c0000001300000000000000000000000000000000000000000000002340710000000000282300004d6178696d756d206d6f746f7220737065656400
+ 02000500140000001500000000000000000000000000000000000000000000002340478000000000080008000e000000000000004d656368616e6963616c206d6f746f72206461746100
+ 020005000a0000001900000000000000000000000000000000000000000000002340c9000000000078054d6f746f72207761726e696e672074656d706572617475726500
+ 020005000a0000001b00000000000000000000000000000000000000000000002340cc0000000000dc054d6f746f72207368757420646f776e2074656d706572617475726500
+ 020005001400000013000000000000000000000000000000000000000000000023403e8000000000080008005802500064000000546865726d616c206d6f746f72206d6f64656c00
+ 020005003400000027000000000000000000000000000000000000000000000023404c800000000028002800d9fe17003a01440237031604e304a0054e06f20680010002800200038003000480040005800500064d6f746f722054656d70657261747572652053656e736f7220436861726163746572697374696300
+ 020005000a0000001b00000000000000000000000000000000000000000000002340c38100000000010443757272656e7420636f6e74726f6c6c65722073657474696e677300
+ 020005000a0000001d000000000000000000000000000000000000000000000023403980000000007869456c656374726963616c20636f6d6d75746174696f6e206f666673657400
+ 020005000a0000001d000000000000000000000000000000000000000000000023403d800000000007004d6f746f722074656d70657261747572652073656e736f72207479706500
+ 020005000a00000017000000000000000000000000000000000000000000000023400280000000003e0043757272656e74206374726c206379636c652074696d6500
+ 020005001c0000001500000000000000000000000000000000000000000000002340368000000000100022004158353230332d303030302d23232323436f6e66696775726564206472697665207479706500
+ 020005000c0000001a000000000000000000000000000000000000000000000023405d800000000052030000436f6e66696775726564206368616e6e656c2063757272656e7400
+ 020005000c0000001f000000000000000000000000000000000000000000000023405c8000000000a4060000436f6e66696775726564206368616e6e656c207065616b2063757272656e7400
+ 020005000a0000001d0000000000000000000000000000000000000000000000234046800000000033004d6f746f7220636f6e74696e756f7573207374616c6c20746f7271756500
+ 020005000c0000001c000000000000000000000000000000000000000000000023405b00000000007b8d410a4269706f6c61722076656c6f63697479206c696d69742076616c756500
+ 020005000a00000020000000000000000000000000000000000000000000000023406a00000000006c0943757272656e74206c6f6f702070726f706f7274696f6e616c206761696e203100
+ 020005000a0000002b000000000000000000000000000000000000000000000023406b0000000000080043757272656e7420636f6e74726f6c206c6f6f7020696e74656772616c20616374696f6e2074696d65203100
+ 020005000a0000002600000000000000000000000000000000000000000000002340ff8100000000fa0056656c6f636974792066696c746572206c6f7720706173732074696d6520636f6e7374616e7400
+ 020005000c0000001f000000000000000000000000000000000000000000000023406400000000001500000056656c6f63697479206c6f6f702070726f706f7274696f6e616c206761696e00
+ 020005000a00000022000000000000000000000000000000000000000000000023406500000000000b0056656c6f63697479206c6f6f7020696e74656772616c20616374696f6e2074696d6500
+ 02000500ec0000000f00000000000000000000000000000000000000000000002340968000000000e000e00003000000454b4d33362d304b4630413031384100000000000000000000000000000000000000000000000000000000001800000000000000050018000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000070018000000000012000c000000000002000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000960096007d0000000000000000000000000000000000000000000000466565646261636b2031207479706500
+ 020005001800000011000000000000000000000000000000000000000000000023400282000000000c000c0001000000f4012c01bc02000056656c6f63697479206f6273657276657200
+
+
+ UINT
+
+
+ DINT
+
+
+ DINT
+
+
+
+
+ UINT
+
+
+ DINT
+
+
+ DINT
+
+
+
+
+ UINT
+
+
+ DINT
+
+
+
+
+ UINT
+
+
+ DINT
+
+
+
+
+
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeB/GVLs/GlobalVariables.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeB/GVLs/GlobalVariables.xml
new file mode 100644
index 0000000..f49c99c
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeB/GVLs/GlobalVariables.xml
@@ -0,0 +1,36 @@
+
\ No newline at end of file
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeB/Links.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeB/Links.xml
new file mode 100644
index 0000000..41d07b7
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeB/Links.xml
@@ -0,0 +1,98 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeB/LinksOld.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeB/LinksOld.xml
new file mode 100644
index 0000000..7b6e43f
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeB/LinksOld.xml
@@ -0,0 +1,82 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeB/POUs/FB_NciChannel.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeB/POUs/FB_NciChannel.xml
new file mode 100644
index 0000000..a8ec7c0
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeB/POUs/FB_NciChannel.xml
@@ -0,0 +1,181 @@
+
\ No newline at end of file
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeB/POUs/FB_NciSequence.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeB/POUs/FB_NciSequence.xml
new file mode 100644
index 0000000..0fbaafc
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeB/POUs/FB_NciSequence.xml
@@ -0,0 +1,86 @@
+= 2 AND iMaxUsedChannels >= 1 THEN
+ CASE nState OF
+ 0:
+ IF bExecute THEN
+ bBusy := TRUE;
+ bDone := FALSE;
+ bError := FALSE;
+ dwErrorId := 0;
+ nState := 10;
+ END_IF
+
+ 10:
+ fbNciChaA(
+ bExecute := bExecute,
+ stNcToPlcX := AxisRef[1].NcToPlc,
+ stNcToPlcY := AxisRef[2].NcToPlc,
+ stNcToPlcZ := stNcToPlcDummy,
+ stNcToPlcC := stNcToPlcDummy,
+ stPlcToNci := stPlcToNci,
+ stNciToPlc := stNciToPlc
+ );
+
+ IF NOT fbNciChaA.bBusy THEN
+ fbNciChaA( bExecute:= FALSE, stNcToPlcX:= AxisRef[1].NcToPlc, stNcToPlcY:= AxisRef[2].NcToPlc, stNcToPlcZ:= stNcToPlcDummy,
+ stNcToPlcC:= stNcToPlcDummy, stPlcToNci:= stPlcToNci, stNciToPlc:= stNciToPlc );
+
+ bBusy := FALSE;
+
+ IF NOT fbNciChaA.bErr THEN
+ bDone := TRUE;
+ ELSE
+ bError := fbNciChaA.bErr;
+ dwErrorId := fbNciChaA.nErrId;
+ END_IF
+ IF NOT bExecute THEN
+ nState := 0;
+ ELSE
+ nState := 20;
+ END_IF
+ END_IF
+
+ 20:
+ bBusy := FALSE;
+ IF NOT bExecute THEN
+ IF fbNciChaA.bErr THEN
+ bError := fbNciChaA.bErr;
+ dwErrorId := fbNciChaA.nErrId;
+ END_IF
+ nState := 0;
+ END_IF
+ END_CASE
+
+END_IF
+]]>
\ No newline at end of file
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeB/POUs/MAIN.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeB/POUs/MAIN.xml
new file mode 100644
index 0000000..95576ee
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeB/POUs/MAIN.xml
@@ -0,0 +1,152 @@
+ 32767 THEN
+ iNciOverrideRaw := 0;
+END_IF
+NciOverrideFilter(
+ OverrideValueRaw := iNciOverrideRaw,
+ LowerOverrideThreshold := 0,
+ UpperOverrideThreshold := 32767,
+ OverrideSteps := 200,
+ OverrideRecoveryTime := T#150ms,
+);
+
+(* enable *)
+A_Enable();
+IF bEnabled THEN
+ bCallSequence := TRUE;
+ A_TriggerExec();
+END_IF
+
+IF bCallSequence THEN
+ (* call motion sequence *)
+ IF bNciReq OR fbNciSequence.bBusy THEN
+ fbNciSequence(
+ bExecute := TRUE,
+ iMaxUsedAxes := iMaxUsedAxes,
+ iMaxUsedChannels:= iMaxUsedChannels,
+ AxisRef := AxisRef,
+ stNciToPlc := stiNciToPlc,
+ stPlcToNci := stoPlcToNci,
+ bBusy => bBusy,
+ bDone => bDone,
+ bError => bError,
+ dwErrorId => dwErrorId
+ );
+ ELSE
+ fbNciSequence(
+ bExecute := FALSE,
+ AxisRef := AxisRef,
+ stNciToPlc := stiNciToPlc,
+ stPlcToNci := stoPlcToNci,
+ );
+ END_IF
+END_IF
+]]> bAxisEnabled[I]
+ );
+ bEnabled := bEnabled AND bAxisEnabled[I];
+ bEnableError := bEnableError OR fbMC_Power[I].Error;
+(* bResetReq := bResetReq OR AxisInErrorState(stiNcToPlc[I].nStateDWord);*)
+END_FOR
+
+(* NCI override *)
+lrOverrideNci := LIMIT(0, UINT_TO_LREAL(iNciOverrideRaw) * 100.0 / lrOverrideMaxScale, 100);
+ItpSetOverridePercent(lrOverrideNci, stoPlcToNci);
+]]>
\ No newline at end of file
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeC/AxisX.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeC/AxisX.xml
new file mode 100644
index 0000000..df7fece
Binary files /dev/null and b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeC/AxisX.xml differ
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeC/AxisY.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeC/AxisY.xml
new file mode 100644
index 0000000..2c98063
Binary files /dev/null and b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeC/AxisY.xml differ
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeC/AxisZ.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeC/AxisZ.xml
new file mode 100644
index 0000000..df3d926
Binary files /dev/null and b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeC/AxisZ.xml differ
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeC/Datatypes/E_AxisState.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeC/Datatypes/E_AxisState.xml
new file mode 100644
index 0000000..a89c0f6
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeC/Datatypes/E_AxisState.xml
@@ -0,0 +1,9 @@
+
\ No newline at end of file
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeC/Datatypes/E_MoveCmd.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeC/Datatypes/E_MoveCmd.xml
new file mode 100644
index 0000000..821477a
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeC/Datatypes/E_MoveCmd.xml
@@ -0,0 +1,10 @@
+
\ No newline at end of file
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeC/Drive.xti b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeC/Drive.xti
new file mode 100644
index 0000000..5bbcc49
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeC/Drive.xti
@@ -0,0 +1,145 @@
+
+
+
+ 424dd6020000000000003600000028000000100000000e0000000100180000000000a002000000000000000000000000000000000000ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff808080808080808080808080808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ff000000ff00ffff00ffff00ffc0c0c0c0c0c0c0c0c0c0c0c08080800000ff000000000000000000000000000000000000000000ff00ffff00ffff00ffc0c0c0c0c0c0c0c0c0c0c0c08080800000ff0000000000000000000000000000000000000000000000ff0000ffff00ffc0c0c0c0c0c0c0c0c0c0c0c08080800000ff000000000000000000000000000000000000000000ff00ffff00ffff00ffff0000ff0000ff0000ff00008080800000ffff00ffff00ffff00ff000000ff00ffff00ff000000ff00ffff00ffff00ffff0000c0c0c0c0c0c0c0c0c0808080000000000000000000000000000000ff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0ff0000c0c0c0c0c0c0808080000000ff00ffff00ffff00ffff00ffff00ffff00ff000000ff00ffff00ffff00ffc0c0c0c0c0c0ff0000c0c0c0808080000000000000000000000000000000000000000000000000ff00ffff00ffff00ffc0c0c0c0c0c0c0c0c0ff00008080800000000000000000000000000000000000000000000000000000ff0000ffff00ffff0000c0c0c0c0c0c0ff0000808080000000000000000000000000000000000000000000000000ff00ffff00ffff00ffc0c0c0ff0000ff0000c0c0c0808080000000ff00ffff00ffff00ff000000ff00ffff00ff000000ff00ffff00ffff00ffc0c0c0c0c0c0c0c0c0c0c0c0808080000000000000000000000000000000ff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0c0c0c0c0c0c0c0c0c0808080000000ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0c0c0c0c0c0c0c0c0c0808080
+
+
+ __FILENAME__
+ 1000
+
+ 001880002600010001000000800080008000001826010000
+ 001a80002200010002000000800080008000001a22010000
+ 00100c002400010003000000000000000000001024010000
+ 001114002000010004000000000000000000001120010000
+ 0000000000000000001000020100000001000000000000000000000000000000
+ 0000000000000000001100010100000002000000000000000000000000000000
+ 00000000000000000d0800010100000003000000000000000000000000000000
+ 0010140200181402
+ 3007000090d0030050c30000000000000000ffff000000000000000000000000
+ 446353796e633235300000000000000053796e63206379636c652074696d653a20323530b5730000000000000000000090d0030050c3000000000000ffff30070000000000000000000000000000000000000000000000000000000000000000
+ 446353796e633132350000000000000053796e63206379636c652074696d653a20313235b5730000000000000000000048e80100a861000000000000ffff30070000000000000000000000000000000000000000000000000000000000000000
+ 02000500100000000d000000000000000000000000000000000000000000000003400a8000000000fe070000000000004665617475726520666c61677300
+ 02000500100000000d000000000000000000000000000000000000000000000023400a8000000000ff070000000000004665617475726520666c61677300
+ 020005000a0000001500000000000000000000000000000000000000000000000340010000000000d007546e637963202d204e43206379636c652074696d6500
+ 020005000a0000001700000000000000000000000000000000000000000000000340020000000000d0075473637963202d20436f6d6d206379636c652074696d6500
+ 020005000a0000000e000000000000000000000000000000000000000000000003402000000000000b004f7065726174696f6e206d6f646500
+ 020005000a0000000e000000000000000000000000000000000000000000000023402000000000000b004f7065726174696f6e206d6f646500
+ 020005000a0000001400000000000000000000000000000000000000000000000340c98000000000fc084e6f6d696e616c206d61696e20766f6c7461676500
+ 020005000a0000002500000000000000000000000000000000000000000000000340ca8000000000c8004d61696e20766f6c7461676520706f73697469766520746f6c6572616e63652072616e676500
+ 020005000a0000002500000000000000000000000000000000000000000000000340cb8000000000c8004d61696e20766f6c74616765206e6567617469766520746f6c6572616e63652072616e676500
+ 020005000a0000001d00000000000000000000000000000000000000000000000340cc80000000000100506f776572204d616e6167656d656e7420636f6e74726f6c20776f726400
+ 020005001c0000001500000000000000000000000000000000000000000000000340368000000000100022004158353230332d303030302d23232323436f6e66696775726564206472697665207479706500
+ 020005001c000000150000000000000000000000000000000000000000000000034035800000000010002200414d333032312d304334302d30303030436f6e66696775726564206d6f746f72207479706500
+ 020005000c00000012000000000000000000000000000000000000000000000003406d00000000009c1800004d6f746f72207065616b2063757272656e7400
+ 020005000c0000001e000000000000000000000000000000000000000000000003406f00000000002c0600004d6f746f7220636f6e74696e756f7573207374616c6c2063757272656e7400
+ 020005000c0000001300000000000000000000000000000000000000000000000340710000000000401f00004d6178696d756d206d6f746f7220737065656400
+ 020005000a000000140000000000000000000000000000000000000000000000034033800000000003004e756d626572206f6620706f6c6520706169727300
+ 020005000a0000000900000000000000000000000000000000000000000000000340378000000000c3004d6f746f7220454d4600
+ 020005000a0000001d000000000000000000000000000000000000000000000003404680000000002d004d6f746f7220636f6e74696e756f7573207374616c6c20746f7271756500
+ 020005000c0000001100000000000000000000000000000000000000000000000340498000000000930000004d6f746f72207065616b20746f7271756500
+ 020005000a0000001d000000000000000000000000000000000000000000000003403980000000007869456c656374726963616c20636f6d6d75746174696f6e206f666673657400
+ 0200050014000000140000000000000000000000000000000000000000000000034042800000000008000800140500006c070000456c656374726963206d6f746f72206d6f64656c00
+ 020005001400000013000000000000000000000000000000000000000000000003403e800000000008000800e001500064000100546865726d616c206d6f746f72206d6f64656c00
+ 020005000c00000021000000000000000000000000000000000000000000000003408800000000005e960900506f73697469766520616363656c65726174696f6e206c696d69742076616c756500
+ 020005000c00000021000000000000000000000000000000000000000000000003408900000000005e9609004e6567617469766520616363656c65726174696f6e206c696d69742076616c756500
+ 020005000a000000170000000000000000000000000000000000000000000000034032800000000000004d6f746f7220636f6e737472756374696f6e207479706500
+ 020005001000000027000000000000000000000000000000000000000000000003404480000000000400040064000000546865726d616c206f7665726c6f616420666163746f7220286d6f746f722077696e64696e672900
+ 020005000a0000001900000000000000000000000000000000000000000000000340c9000000000020034d6f746f72207761726e696e672074656d706572617475726500
+ 020005000a0000001b00000000000000000000000000000000000000000000000340cc000000000078054d6f746f72207368757420646f776e2074656d706572617475726500
+ 02000500140000001500000000000000000000000000000000000000000000000340478000000000080008000b000000000000004d656368616e6963616c206d6f746f72206461746100
+ 0200050030000000160000000000000000000000000000000000000000000000034059800000000024002400028000003e0000003e000000c980000084030000fc0800000000000000000000000000004d6f746f72206461746120636f6e73747261696e747300
+ 020005000a00000020000000000000000000000000000000000000000000000003406a0000000000440243757272656e74206c6f6f702070726f706f7274696f6e616c206761696e203100
+ 020005000a0000002b000000000000000000000000000000000000000000000003406b0000000000050043757272656e7420636f6e74726f6c206c6f6f7020696e74656772616c20616374696f6e2074696d65203100
+ 020005000a0000002000000000000000000000000000000000000000000000000340348000000000b80b54696d65206c696d69746174696f6e20666f72207065616b2063757272656e7400
+ 020005000c0000001f00000000000000000000000000000000000000000000000340388000000000321200004d6178206d6f746f722073706565642077697468206d617820746f7271756500
+ 020005000c0000001f000000000000000000000000000000000000000000000003405c8000000000580c0000436f6e66696775726564206368616e6e656c207065616b2063757272656e7400
+ 020005000c0000001a000000000000000000000000000000000000000000000003405d80000000002c060000436f6e66696775726564206368616e6e656c2063757272656e7400
+ 020005000c0000001c000000000000000000000000000000000000000000000003405b0000000000f90b1b084269706f6c61722076656c6f63697479206c696d69742076616c756500
+ 020005000a00000017000000000000000000000000000000000000000000000003400280000000003e0043757272656e74206374726c206379636c652074696d6500
+ 020005000a0000001b00000000000000000000000000000000000000000000000340c38100000000000043757272656e7420636f6e74726f6c6c65722073657474696e677300
+ 020005000a00000018000000000000000000000000000000000000000000000003400380000000007d0056656c6f63697479206374726c206379636c652074696d6500
+ 020005000a0000002600000000000000000000000000000000000000000000000340ff8100000000fa0056656c6f636974792066696c746572206c6f7720706173732074696d6520636f6e7374616e7400
+ 020005000a0000001800000000000000000000000000000000000000000000000340048000000000fa00506f736974696f6e206374726c206379636c652074696d6500
+ 02000500ec0000000f00000000000000000000000000000000000000000000000340968000000000e000e0000100000048656e6723414433362d3132313941462e305842493000000000000000000000000000000000000002003200030000000000000001000300000000000008000000000000e8030000e8030000000000000000000000000000000000000000000000000000010003000090185413000c0018000c0001000100000000000000000000000000000002000000060043000100010008000400130001000c005500102705003300460090010500000001000000ff000100000000000000000000000000a600a600780000000000000000000000000000000000000000000000466565646261636b2031207479706500
+ 020005000c000000190000000000000000000000000000000000000000000000034098800000000001000000466565646261636b20312067656172206e756d657261746f7200
+ 020005000c0000001b0000000000000000000000000000000000000000000000034099800000000001000000466565646261636b203120676561722064656e6f6d696e61746f7200
+ 020005000a0000001d000000000000000000000000000000000000000000000003403d800000000000004d6f746f722074656d70657261747572652073656e736f72207479706500
+ 020005000c0000001f000000000000000000000000000000000000000000000003406400000000005e01000056656c6f63697479206c6f6f702070726f706f7274696f6e616c206761696e00
+ 020005000a0000002200000000000000000000000000000000000000000000000340650000000000180056656c6f63697479206c6f6f7020696e74656772616c20616374696f6e2074696d6500
+ 02000500140000001b000000000000000000000000000000000000000000000003409a8000000000080008000000000000000000466565646261636b2031207265666572656e6365207369676e616c00
+ 020005001800000015000000000000000000000000000000000000000000000023403580000000000c002200414d383032312d7842783000436f6e66696775726564206d6f746f72207479706500
+ 020005000a000000140000000000000000000000000000000000000000000000234033800000000003004e756d626572206f6620706f6c6520706169727300
+ 020005000c0000001e000000000000000000000000000000000000000000000023406f0000000000520300004d6f746f7220636f6e74696e756f7573207374616c6c2063757272656e7400
+ 020005000c0000001300000000000000000000000000000000000000000000002340c40000000000520300004d6f746f722072617465642063757272656e7400
+ 020005000c00000012000000000000000000000000000000000000000000000023406d0000000000241300004d6f746f72207065616b2063757272656e7400
+ 020005000a00000013000000000000000000000000000000000000000000000023404d8000000000a00f4d6f746f7220726174656420766f6c7461676500
+ 020005000a0000001300000000000000000000000000000000000000000000002340d88000000000c4224d6178204443204c696e6b20766f6c7461676500
+ 02000500300000001600000000000000000000000000000000000000000000002340598000000000240024002683000000000000401f00000000000000000000000000000000000000000000000000004d6f746f72206461746120636f6e73747261696e747300
+ 020005000c00000011000000000000000000000000000000000000000000000023404980000000000c0100004d6f746f72207065616b20746f7271756500
+ 020005005c0000001b000000000000000000000000000000000000000000000023404a800000000050005000ea010000d4030000be050000a8070000920900007c0b0000660d0000500f00003a110000241300001d0000003a00000057000000720000008e000000a8000000c2000000db000000f40000000c0100004d6f746f7220546f7271756520436861726163746572697374696300
+ 020005000a0000000900000000000000000000000000000000000000000000002340378000000000a4014d6f746f7220454d4600
+ 0200050014000000140000000000000000000000000000000000000000000000234042800000000008000800640f00002c1a0000456c656374726963206d6f746f72206d6f64656c00
+ 020005005c0000001f000000000000000000000000000000000000000000000023404b800000000050005000ea010000d4030000be050000a8070000920900007c0b0000660d0000500f00003a11000024130000da1100007a0d00002c0b0000060900009e070000c20600002c060000c805000078050000780500004d6f746f7220496e64756374616e636520436861726163746572697374696300
+ 020005000c0000001300000000000000000000000000000000000000000000002340710000000000282300004d6178696d756d206d6f746f7220737065656400
+ 02000500140000001500000000000000000000000000000000000000000000002340478000000000080008000e000000000000004d656368616e6963616c206d6f746f72206461746100
+ 020005000a0000001900000000000000000000000000000000000000000000002340c9000000000078054d6f746f72207761726e696e672074656d706572617475726500
+ 020005000a0000001b00000000000000000000000000000000000000000000002340cc0000000000dc054d6f746f72207368757420646f776e2074656d706572617475726500
+ 020005001400000013000000000000000000000000000000000000000000000023403e8000000000080008005802500064000000546865726d616c206d6f746f72206d6f64656c00
+ 020005003400000027000000000000000000000000000000000000000000000023404c800000000028002800d9fe17003a01440237031604e304a0054e06f20680010002800200038003000480040005800500064d6f746f722054656d70657261747572652053656e736f7220436861726163746572697374696300
+ 020005000a0000001b00000000000000000000000000000000000000000000002340c38100000000010443757272656e7420636f6e74726f6c6c65722073657474696e677300
+ 020005000a0000001d000000000000000000000000000000000000000000000023403980000000007869456c656374726963616c20636f6d6d75746174696f6e206f666673657400
+ 020005000a0000001d000000000000000000000000000000000000000000000023403d800000000007004d6f746f722074656d70657261747572652073656e736f72207479706500
+ 020005000a00000017000000000000000000000000000000000000000000000023400280000000003e0043757272656e74206374726c206379636c652074696d6500
+ 020005001c0000001500000000000000000000000000000000000000000000002340368000000000100022004158353230332d303030302d23232323436f6e66696775726564206472697665207479706500
+ 020005000c0000001a000000000000000000000000000000000000000000000023405d800000000052030000436f6e66696775726564206368616e6e656c2063757272656e7400
+ 020005000c0000001f000000000000000000000000000000000000000000000023405c8000000000a4060000436f6e66696775726564206368616e6e656c207065616b2063757272656e7400
+ 020005000a0000001d0000000000000000000000000000000000000000000000234046800000000033004d6f746f7220636f6e74696e756f7573207374616c6c20746f7271756500
+ 020005000c0000001c000000000000000000000000000000000000000000000023405b00000000007b8d410a4269706f6c61722076656c6f63697479206c696d69742076616c756500
+ 020005000a00000020000000000000000000000000000000000000000000000023406a00000000006c0943757272656e74206c6f6f702070726f706f7274696f6e616c206761696e203100
+ 020005000a0000002b000000000000000000000000000000000000000000000023406b0000000000080043757272656e7420636f6e74726f6c206c6f6f7020696e74656772616c20616374696f6e2074696d65203100
+ 020005000a0000002600000000000000000000000000000000000000000000002340ff8100000000fa0056656c6f636974792066696c746572206c6f7720706173732074696d6520636f6e7374616e7400
+ 020005000c0000001f000000000000000000000000000000000000000000000023406400000000001500000056656c6f63697479206c6f6f702070726f706f7274696f6e616c206761696e00
+ 020005000a00000022000000000000000000000000000000000000000000000023406500000000000b0056656c6f63697479206c6f6f7020696e74656772616c20616374696f6e2074696d6500
+ 02000500ec0000000f00000000000000000000000000000000000000000000002340968000000000e000e00003000000454b4d33362d304b4630413031384100000000000000000000000000000000000000000000000000000000001800000000000000050018000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000070018000000000012000c000000000002000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000960096007d0000000000000000000000000000000000000000000000466565646261636b2031207479706500
+ 020005001800000011000000000000000000000000000000000000000000000023400282000000000c000c0001000000f4012c01bc02000056656c6f63697479206f6273657276657200
+
+
+ UINT
+
+
+ DINT
+
+
+ DINT
+
+
+
+
+ UINT
+
+
+ DINT
+
+
+ DINT
+
+
+
+
+ UINT
+
+
+ DINT
+
+
+
+
+ UINT
+
+
+ DINT
+
+
+
+
+
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeC/Links.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeC/Links.xml
new file mode 100644
index 0000000..3c462ac
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeC/Links.xml
@@ -0,0 +1,72 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeC/LinksOld.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeC/LinksOld.xml
new file mode 100644
index 0000000..3e8f680
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeC/LinksOld.xml
@@ -0,0 +1,68 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeC/POUs/Axis/FB_AX5000Axis.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeC/POUs/Axis/FB_AX5000Axis.xml
new file mode 100644
index 0000000..9503404
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeC/POUs/Axis/FB_AX5000Axis.xml
@@ -0,0 +1,79 @@
+ iDiagNumber
+ );
+ eCurState := eAxisState_Idle;
+ END_IF
+
+END_CASE
+
+M_HardwareDiag := eCurState <> eAxisState_Idle;
+bExecHWDiag_ := bExecute;
+]]> eAxisState_Idle;
+bExecHWRes_ := bExecute;]]>
\ No newline at end of file
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeC/POUs/Axis/FB_NcAxis.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeC/POUs/Axis/FB_NcAxis.xml
new file mode 100644
index 0000000..517b128
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeC/POUs/Axis/FB_NcAxis.xml
@@ -0,0 +1,213 @@
+ 0);
+]]> overwrite method if necessary
+CASE eCurState OF
+eAxisState_Idle:
+ IF bExecute AND NOT bExecHWDiag_ THEN
+ eCurState := eAxisState_Diag;
+ END_IF
+
+eAxisState_Diag:
+ eCurState := eAxisState_Idle;
+
+END_CASE
+
+M_HardwareDiag := eCurState <> eAxisState_Idle;
+bExecHWDiag_ := bExecute;
+
+]]> bDone, Busy => bBusy,
+ Active => bActive, Error => bError, ErrorID => iErrorId
+ );
+ eCurState := eAxisState_Move;
+
+ eCmd_MoveModulo:
+ fbMcMoveMod(
+ Execute := bExecute, Position:= fPosition, Velocity:= fVelocity,
+ Axis := sAxis, Done => bDone, Busy => bBusy,
+ Active => bActive, Error => bError, ErrorID => iErrorId
+ );
+ eCurState := eAxisState_Move;
+
+ eCmd_MoveRelative:
+ fbMcMoveRel(
+ Execute := bExecute, Distance:= fPosition, Velocity:= fVelocity,
+ Axis := sAxis, Done => bDone, Busy => bBusy,
+ Active => bActive, Error => bError, ErrorID => iErrorId
+ );
+ eCurState := eAxisState_Move;
+
+ eCmd_MoveVelocity:
+ fbMcMoveVel(
+ Execute := bExecute, Velocity:= fVelocity, Axis := sAxis,
+ InVelocity=> bDone, Busy => bBusy, Active => bActive,
+ Error => bError, ErrorID => iErrorId, Busy => bBusy,
+ Active => bActive, Error => bError, ErrorID => iErrorId
+ );
+ eCurState := eAxisState_Move;
+ END_CASE
+ END_IF
+
+eAxisState_Move:
+ CASE eMoveCmd OF
+ eCmd_MoveAbsolute:
+ fbMcMoveAbs(
+ Execute := TRUE, Position:= fPosition, Velocity:= fVelocity,
+ Axis := sAxis, Done => bDone, Busy => bBusy,
+ Active => bActive, Error => bError, ErrorID => iErrorId
+ );
+ IF bDone OR bError THEN
+ fbMcMoveAbs(Execute := FALSE,Axis := sAxis);
+ eCurState := eAxisState_Idle;
+ END_IF
+
+ eCmd_MoveModulo:
+ fbMcMoveMod(
+ Execute := TRUE, Position:= fPosition, Velocity:= fVelocity,
+ Axis := sAxis, Done => bDone, Busy => bBusy,
+ Active => bActive, Error => bError, ErrorID => iErrorId
+ );
+ IF bDone OR bError THEN
+ fbMcMoveMod(Execute := FALSE,Axis := sAxis);
+ eCurState := eAxisState_Idle;
+ END_IF
+
+ eCmd_MoveRelative:
+ fbMcMoveRel(
+ Execute := TRUE, Distance:= fPosition, Velocity:= fVelocity,
+ Axis := sAxis, Done => bDone, Busy => bBusy,
+ Active => bActive, Error => bError, ErrorID => iErrorId
+ );
+ IF bDone OR bError THEN
+ fbMcMoveRel(Execute := FALSE,Axis := sAxis);
+ eCurState := eAxisState_Idle;
+ END_IF
+
+ eCmd_MoveVelocity:
+ fbMcMoveVel(
+ Execute := TRUE, Velocity:= fVelocity, Axis := sAxis,
+ InVelocity=> bDone, Busy => bBusy, Active => bActive,
+ Error => bError, ErrorID => iErrorId, Busy => bBusy,
+ Active => bActive, Error => bError, ErrorID => iErrorId
+ );
+ IF bDone OR bError THEN
+ fbMcMoveVel(Execute := FALSE,Axis := sAxis);
+ eCurState := eAxisState_Idle;
+ END_IF
+ END_CASE
+END_CASE
+
+M_Move := (eCurState <> eAxisState_Idle);
+bExecMove_ := bExecute;]]> bDone,
+ Busy => bBusy, Error => bError, ErrorID => iErrorId
+ );
+ eCurState := eAxisState_Reset;
+ END_IF
+
+eAxisState_Reset:
+ fbMcReset(
+ Execute := FALSE, Axis := sAxis, Done => bDone,
+ Busy => bBusy, Error => bError, ErrorID => iErrorId
+ );
+ IF fbMcReset.Done OR fbMcReset.Error THEN
+ eCurState := eAxisState_Idle;
+ END_IF
+END_CASE
+
+M_Reset := eCurState <> eAxisState_Idle;
+bExecReset_ := bExecute;]]> overwrite method if necessary
+CASE eCurState OF
+eAxisState_Idle:
+ IF bExecute AND NOT bExecHWRes_ THEN
+ eCurState := eAxisState_Reset;
+ END_IF
+
+eAxisState_Reset:
+ eCurState := eAxisState_Idle;
+
+END_CASE
+
+M_HardwareReset := eCurState <> eAxisState_Idle;
+bExecHWRes_ := bExecute;]]>
\ No newline at end of file
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeC/POUs/Axis/IAxis.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeC/POUs/Axis/IAxis.xml
new file mode 100644
index 0000000..65a5d5c
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeC/POUs/Axis/IAxis.xml
@@ -0,0 +1,35 @@
+
\ No newline at end of file
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeC/POUs/FB_Table.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeC/POUs/FB_Table.xml
new file mode 100644
index 0000000..5715a30
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeC/POUs/FB_Table.xml
@@ -0,0 +1,127 @@
+
\ No newline at end of file
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeC/POUs/MAIN.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeC/POUs/MAIN.xml
new file mode 100644
index 0000000..5d167f2
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/MachineTypeC/POUs/MAIN.xml
@@ -0,0 +1,49 @@
+
\ No newline at end of file
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/PouProgramCFC.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/PouProgramCFC.xml
new file mode 100644
index 0000000..4daade8
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/PouProgramCFC.xml
@@ -0,0 +1,1930 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ eOperation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ functionblock
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ eOp_Mul
+
+
+
+
+
+
+
+
+
+
+
+
+ eOperation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Timer.Q
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ eOp_Sub
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ eOperationPrev
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ eOp_Sub
+
+
+
+
+
+
+
+
+
+
+
+
+ eOperation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Timer.Q
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ eOp_Add
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ eOperationPrev
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ eOp_Add
+
+
+
+
+
+
+
+
+
+
+
+
+ eOperation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Timer.Q
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ eOp_Mul
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ eOperationPrev
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Timer.Q
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ tTimerValue
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ functionblock
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ bZero
+
+
+
+
+
+
+
+
+
+
+
+
+ bPos
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ bNeg
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ iResultC
+
+
+
+
+
+
+
+
+
+
+
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Timer.ET
+
+
+
+
+
+
+
+
+
+
+
+
+ T#500ms
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ bTest
+
+
+
+
+
+ Timer
+
+
+
+
+
+
+
+
+
+
+
+
+ State
+ machine
+
+
+
+
+
+
+
+
+ eOperation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ eOperation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ eOperation
+
+
+
+
+
+
+
+
+
+
+
+ FB
+ Call
+
+
+
+
+
+
+
+
+
+ eOperationPrev
+
+
+
+
+
+
+
+ iResultC
+
+
+
+
+
+
+
+ bZero
+
+
+
+
+
+
+
+ bPos
+
+
+
+
+
+
+
+ bNeg
+
+
+
+
+
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/PouProgramFbd.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/PouProgramFbd.xml
new file mode 100644
index 0000000..91b9918
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/PouProgramFbd.xml
@@ -0,0 +1,1280 @@
+
+
+
+
+
+
+
+
+
+
+
+ bZero
+
+
+
+
+ bPos
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+ bPos
+
+
+
+
+ bNeg
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+ Timer.ET
+
+
+
+
+ TIME#500ms
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+ iResultC
+
+
+
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+ Timer.ET
+
+
+
+
+ TIME#500ms
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+ bTest
+
+
+
+
+
+ Timer
+
+
+
+
+
+ Timer.Q
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+ tTimerValue
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ functionblock
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+ State
+ machine
+
+
+
+
+
+ eOperation
+
+
+
+
+ eOp_Add
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+ Timer.Q
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+ eOperation
+
+
+
+
+ eOp_Mul
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+ eOperation
+
+
+
+
+ eOp_Mul
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+ eOperation
+
+
+
+
+ eOperationPrev
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+ eOperation
+
+
+
+
+ eOp_Sub
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+ Timer.Q
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+ eOperation
+
+
+
+
+ eOp_Add
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+ eOperation
+
+
+
+
+ eOp_Add
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+ eOperation
+
+
+
+
+ eOperationPrev
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+ eOperation
+
+
+
+
+ eOp_Mul
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+ Timer.Q
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+ eOperation
+
+
+
+
+ eOp_Sub
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+ eOperation
+
+
+
+
+ eOp_Sub
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+ eOperation
+
+
+
+
+ eOperationPrev
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+ FB
+ Call
+
+
+
+
+
+
+ eOperation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ functionblock
+
+
+
+
+
+
+
+
+ iResultC
+
+
+
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+ bZero
+
+
+
+
+ iResultC
+
+
+
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+ bPos
+
+
+
+
+ iResultC
+
+
+
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+ bNeg
+
+
+
+
+ eOperation
+
+
+
+
+
+
+ eOperationPrev
+
+
+
+
+
+
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/PouProgramLd.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/PouProgramLd.xml
new file mode 100644
index 0000000..1cdb97e
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/PouProgramLd.xml
@@ -0,0 +1,1324 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ networktitle
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Timer.ET
+
+
+
+
+ TIME#500ms
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ bTemp1
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ networktitle
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ iResultC
+
+
+
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ bTemp2
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ networktitle
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Timer.ET
+
+
+
+
+ TIME#500ms
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ bTemp3
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ networktitle
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Timer
+
+
+
+
+
+
+
+
+
+ networktitle
+
+
+
+
+
+
+ Timer.Q
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+ tTimerValue
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ functionblock
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+ State
+ machine
+
+
+
+
+
+
+
+
+
+ networktitle
+
+
+
+
+
+
+ eOperation
+
+
+
+
+ eOp_Add
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+ Timer.Q
+
+
+
+
+ eOperation
+
+
+
+
+ eOp_Mul
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+ eOperation
+
+
+
+
+ eOp_Mul
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+ eOperation
+
+
+
+
+ eOperationPrev
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ networktitle
+
+
+
+
+
+
+ eOperation
+
+
+
+
+ eOp_Sub
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+ Timer.Q
+
+
+
+
+ eOperation
+
+
+
+
+ eOp_Add
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+ eOperation
+
+
+
+
+ eOp_Add
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+ eOperation
+
+
+
+
+ eOperationPrev
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ networktitle
+
+
+
+
+
+
+ eOperation
+
+
+
+
+ eOp_Mul
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+ Timer.Q
+
+
+
+
+ eOperation
+
+
+
+
+ eOp_Sub
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+ eOperation
+
+
+
+
+ eOp_Sub
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+ eOperation
+
+
+
+
+ eOperationPrev
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+ FB
+ Call
+
+
+
+
+
+
+
+
+
+
+ networktitle
+
+
+
+
+
+
+ eOperation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ functionblock
+
+
+
+
+
+
+ iResultC
+
+
+
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ networktitle
+
+
+
+
+
+
+ iResultC
+
+
+
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ networktitle
+
+
+
+
+
+
+ iResultC
+
+
+
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ networktitle
+
+
+
+
+
+
+ eOperation
+
+
+
+
+
+
+ eOperationPrev
+
+
+
+
+
+
+
+ 2
+
+
+
+
+
+
+ 3
+
+
+
+
+
+
+ 4
+
+
+
+
+
+
+ 7
+
+
+
+
+
+
+ 7
+
+
+
+
+
+
+ 8
+
+
+
+
+
+
+ 8
+
+
+
+
+
+
+ 9
+
+
+
+
+
+
+ 9
+
+
+
+
+
+
+
+
+
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/PouProgramSfc.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/PouProgramSfc.xml
new file mode 100644
index 0000000..ea16b29
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/PouProgramSfc.xml
@@ -0,0 +1,648 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Init
+
+ TRUE
+
+ Init_Action
+
+ FALSE
+
+ 0
+
+
+
+
+
+
+
+ TRUE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ TRUE
+
+ FALSE
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ TRUE
+
+ FALSE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CallFB
+
+ FALSE
+
+ FALSE
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A_CallFB
+
+ N
+
+ FALSE
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Evaluate
+
+ FALSE
+
+ FALSE
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A_Evaluate
+
+ N
+
+ FALSE
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ TRUE
+
+ FALSE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Wait
+
+ FALSE
+
+ FALSE
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A_Wait
+
+ N
+
+ FALSE
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Test
+
+ FALSE
+
+ FALSE
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A_Test
+
+ N
+
+ FALSE
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Timer.Q
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Timer.Q
+
+ FALSE
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ StateMachine
+
+ FALSE
+
+ FALSE
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A_StateMachine
+
+ N
+
+ FALSE
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Timer.Q
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Timer.Q
+
+ FALSE
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Init
+
+ FALSE
+
+
+
+
+
+
+
+
+
+ iResultC
+);
+
+]]>
+
+
+
+
+
+
+ 0 THEN
+ bZero := FALSE;
+ bPos := TRUE;
+ bNeg := FALSE;
+ELSIF fbSFC_SamplePOU.iResultC < 0 THEN
+ bZero := FALSE;
+ bPos := FALSE;
+ bNeg := TRUE;
+END_IF]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ TIME#500MS) AND (iResultC <= 0)) OR (Timer.ET <= TIME#500MS);
+]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ IecSfc
+ System
+ 3.4.2.0
+ IecSfc
+
+
+
+ CurrentStep
+
+
+ True
+
+
+
+
+ EnableLimit
+
+
+ True
+
+
+
+
+ Error
+
+
+ True
+
+
+
+
+ ErrorPOU
+
+
+ True
+
+
+
+
+ ErrorStep
+
+
+ True
+
+
+
+
+ Init
+
+
+ True
+
+
+
+
+ Pause
+
+
+ True
+
+
+
+
+ QuitError
+
+
+ True
+
+
+
+
+ Reset
+
+
+ True
+
+
+
+
+ Tip
+
+
+ True
+
+
+
+
+ TipMode
+
+
+ True
+
+
+
+
+ Trans
+
+
+ True
+
+
+
+
+ False
+
+
+
+
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/PouProgramSt.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/PouProgramSt.xml
new file mode 100644
index 0000000..bcc98b5
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AU08-IEC-IC/PouProgramSt.xml
@@ -0,0 +1,65 @@
+
+
+
+
+
+
+
+
+ TIME#500MS) AND (iResultC <= 0)) OR (Timer.ET <= TIME#500MS);
+
+
+(* Timer *)
+Timer(IN := TRUE, PT := tTimerValue);
+IF Timer.Q THEN
+ Timer(IN := FALSE);
+
+ (* State machine *)
+ CASE eOperation OF
+ eOp_Add:
+ eOperation := eOp_MUL;
+ eOp_Sub:
+ eOperation := eOp_ADD;
+ eOp_Mul:
+ eOperation := eOp_SUB;
+ END_CASE
+END_IF
+
+(* FB Call *)
+fbST_SamplePOU(
+ eOperation := eOperation,
+ iResultC => iResultC
+);
+
+(* Evaluation *)
+IF fbST_SamplePOU.iResultC = 0 THEN
+ bZero := TRUE;
+ bPos := FALSE;
+ bNeg := FALSE;
+ELSIF fbST_SamplePOU.iResultC > 0 THEN
+ bZero := FALSE;
+ bPos := TRUE;
+ bNeg := FALSE;
+ELSIF fbST_SamplePOU.iResultC < 0 THEN
+ bZero := FALSE;
+ bPos := FALSE;
+ bNeg := TRUE;
+END_IF]]>
+
+
+
+
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeA/Axis1.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeA/Axis1.xml
new file mode 100644
index 0000000..493edcf
Binary files /dev/null and b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeA/Axis1.xml differ
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeA/Axis2.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeA/Axis2.xml
new file mode 100644
index 0000000..664eb2b
Binary files /dev/null and b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeA/Axis2.xml differ
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeA/Drive.xti b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeA/Drive.xti
new file mode 100644
index 0000000..5bbcc49
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeA/Drive.xti
@@ -0,0 +1,145 @@
+
+
+
+ 424dd6020000000000003600000028000000100000000e0000000100180000000000a002000000000000000000000000000000000000ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff808080808080808080808080808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ff000000ff00ffff00ffff00ffc0c0c0c0c0c0c0c0c0c0c0c08080800000ff000000000000000000000000000000000000000000ff00ffff00ffff00ffc0c0c0c0c0c0c0c0c0c0c0c08080800000ff0000000000000000000000000000000000000000000000ff0000ffff00ffc0c0c0c0c0c0c0c0c0c0c0c08080800000ff000000000000000000000000000000000000000000ff00ffff00ffff00ffff0000ff0000ff0000ff00008080800000ffff00ffff00ffff00ff000000ff00ffff00ff000000ff00ffff00ffff00ffff0000c0c0c0c0c0c0c0c0c0808080000000000000000000000000000000ff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0ff0000c0c0c0c0c0c0808080000000ff00ffff00ffff00ffff00ffff00ffff00ff000000ff00ffff00ffff00ffc0c0c0c0c0c0ff0000c0c0c0808080000000000000000000000000000000000000000000000000ff00ffff00ffff00ffc0c0c0c0c0c0c0c0c0ff00008080800000000000000000000000000000000000000000000000000000ff0000ffff00ffff0000c0c0c0c0c0c0ff0000808080000000000000000000000000000000000000000000000000ff00ffff00ffff00ffc0c0c0ff0000ff0000c0c0c0808080000000ff00ffff00ffff00ff000000ff00ffff00ff000000ff00ffff00ffff00ffc0c0c0c0c0c0c0c0c0c0c0c0808080000000000000000000000000000000ff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0c0c0c0c0c0c0c0c0c0808080000000ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0c0c0c0c0c0c0c0c0c0808080
+
+
+ __FILENAME__
+ 1000
+
+ 001880002600010001000000800080008000001826010000
+ 001a80002200010002000000800080008000001a22010000
+ 00100c002400010003000000000000000000001024010000
+ 001114002000010004000000000000000000001120010000
+ 0000000000000000001000020100000001000000000000000000000000000000
+ 0000000000000000001100010100000002000000000000000000000000000000
+ 00000000000000000d0800010100000003000000000000000000000000000000
+ 0010140200181402
+ 3007000090d0030050c30000000000000000ffff000000000000000000000000
+ 446353796e633235300000000000000053796e63206379636c652074696d653a20323530b5730000000000000000000090d0030050c3000000000000ffff30070000000000000000000000000000000000000000000000000000000000000000
+ 446353796e633132350000000000000053796e63206379636c652074696d653a20313235b5730000000000000000000048e80100a861000000000000ffff30070000000000000000000000000000000000000000000000000000000000000000
+ 02000500100000000d000000000000000000000000000000000000000000000003400a8000000000fe070000000000004665617475726520666c61677300
+ 02000500100000000d000000000000000000000000000000000000000000000023400a8000000000ff070000000000004665617475726520666c61677300
+ 020005000a0000001500000000000000000000000000000000000000000000000340010000000000d007546e637963202d204e43206379636c652074696d6500
+ 020005000a0000001700000000000000000000000000000000000000000000000340020000000000d0075473637963202d20436f6d6d206379636c652074696d6500
+ 020005000a0000000e000000000000000000000000000000000000000000000003402000000000000b004f7065726174696f6e206d6f646500
+ 020005000a0000000e000000000000000000000000000000000000000000000023402000000000000b004f7065726174696f6e206d6f646500
+ 020005000a0000001400000000000000000000000000000000000000000000000340c98000000000fc084e6f6d696e616c206d61696e20766f6c7461676500
+ 020005000a0000002500000000000000000000000000000000000000000000000340ca8000000000c8004d61696e20766f6c7461676520706f73697469766520746f6c6572616e63652072616e676500
+ 020005000a0000002500000000000000000000000000000000000000000000000340cb8000000000c8004d61696e20766f6c74616765206e6567617469766520746f6c6572616e63652072616e676500
+ 020005000a0000001d00000000000000000000000000000000000000000000000340cc80000000000100506f776572204d616e6167656d656e7420636f6e74726f6c20776f726400
+ 020005001c0000001500000000000000000000000000000000000000000000000340368000000000100022004158353230332d303030302d23232323436f6e66696775726564206472697665207479706500
+ 020005001c000000150000000000000000000000000000000000000000000000034035800000000010002200414d333032312d304334302d30303030436f6e66696775726564206d6f746f72207479706500
+ 020005000c00000012000000000000000000000000000000000000000000000003406d00000000009c1800004d6f746f72207065616b2063757272656e7400
+ 020005000c0000001e000000000000000000000000000000000000000000000003406f00000000002c0600004d6f746f7220636f6e74696e756f7573207374616c6c2063757272656e7400
+ 020005000c0000001300000000000000000000000000000000000000000000000340710000000000401f00004d6178696d756d206d6f746f7220737065656400
+ 020005000a000000140000000000000000000000000000000000000000000000034033800000000003004e756d626572206f6620706f6c6520706169727300
+ 020005000a0000000900000000000000000000000000000000000000000000000340378000000000c3004d6f746f7220454d4600
+ 020005000a0000001d000000000000000000000000000000000000000000000003404680000000002d004d6f746f7220636f6e74696e756f7573207374616c6c20746f7271756500
+ 020005000c0000001100000000000000000000000000000000000000000000000340498000000000930000004d6f746f72207065616b20746f7271756500
+ 020005000a0000001d000000000000000000000000000000000000000000000003403980000000007869456c656374726963616c20636f6d6d75746174696f6e206f666673657400
+ 0200050014000000140000000000000000000000000000000000000000000000034042800000000008000800140500006c070000456c656374726963206d6f746f72206d6f64656c00
+ 020005001400000013000000000000000000000000000000000000000000000003403e800000000008000800e001500064000100546865726d616c206d6f746f72206d6f64656c00
+ 020005000c00000021000000000000000000000000000000000000000000000003408800000000005e960900506f73697469766520616363656c65726174696f6e206c696d69742076616c756500
+ 020005000c00000021000000000000000000000000000000000000000000000003408900000000005e9609004e6567617469766520616363656c65726174696f6e206c696d69742076616c756500
+ 020005000a000000170000000000000000000000000000000000000000000000034032800000000000004d6f746f7220636f6e737472756374696f6e207479706500
+ 020005001000000027000000000000000000000000000000000000000000000003404480000000000400040064000000546865726d616c206f7665726c6f616420666163746f7220286d6f746f722077696e64696e672900
+ 020005000a0000001900000000000000000000000000000000000000000000000340c9000000000020034d6f746f72207761726e696e672074656d706572617475726500
+ 020005000a0000001b00000000000000000000000000000000000000000000000340cc000000000078054d6f746f72207368757420646f776e2074656d706572617475726500
+ 02000500140000001500000000000000000000000000000000000000000000000340478000000000080008000b000000000000004d656368616e6963616c206d6f746f72206461746100
+ 0200050030000000160000000000000000000000000000000000000000000000034059800000000024002400028000003e0000003e000000c980000084030000fc0800000000000000000000000000004d6f746f72206461746120636f6e73747261696e747300
+ 020005000a00000020000000000000000000000000000000000000000000000003406a0000000000440243757272656e74206c6f6f702070726f706f7274696f6e616c206761696e203100
+ 020005000a0000002b000000000000000000000000000000000000000000000003406b0000000000050043757272656e7420636f6e74726f6c206c6f6f7020696e74656772616c20616374696f6e2074696d65203100
+ 020005000a0000002000000000000000000000000000000000000000000000000340348000000000b80b54696d65206c696d69746174696f6e20666f72207065616b2063757272656e7400
+ 020005000c0000001f00000000000000000000000000000000000000000000000340388000000000321200004d6178206d6f746f722073706565642077697468206d617820746f7271756500
+ 020005000c0000001f000000000000000000000000000000000000000000000003405c8000000000580c0000436f6e66696775726564206368616e6e656c207065616b2063757272656e7400
+ 020005000c0000001a000000000000000000000000000000000000000000000003405d80000000002c060000436f6e66696775726564206368616e6e656c2063757272656e7400
+ 020005000c0000001c000000000000000000000000000000000000000000000003405b0000000000f90b1b084269706f6c61722076656c6f63697479206c696d69742076616c756500
+ 020005000a00000017000000000000000000000000000000000000000000000003400280000000003e0043757272656e74206374726c206379636c652074696d6500
+ 020005000a0000001b00000000000000000000000000000000000000000000000340c38100000000000043757272656e7420636f6e74726f6c6c65722073657474696e677300
+ 020005000a00000018000000000000000000000000000000000000000000000003400380000000007d0056656c6f63697479206374726c206379636c652074696d6500
+ 020005000a0000002600000000000000000000000000000000000000000000000340ff8100000000fa0056656c6f636974792066696c746572206c6f7720706173732074696d6520636f6e7374616e7400
+ 020005000a0000001800000000000000000000000000000000000000000000000340048000000000fa00506f736974696f6e206374726c206379636c652074696d6500
+ 02000500ec0000000f00000000000000000000000000000000000000000000000340968000000000e000e0000100000048656e6723414433362d3132313941462e305842493000000000000000000000000000000000000002003200030000000000000001000300000000000008000000000000e8030000e8030000000000000000000000000000000000000000000000000000010003000090185413000c0018000c0001000100000000000000000000000000000002000000060043000100010008000400130001000c005500102705003300460090010500000001000000ff000100000000000000000000000000a600a600780000000000000000000000000000000000000000000000466565646261636b2031207479706500
+ 020005000c000000190000000000000000000000000000000000000000000000034098800000000001000000466565646261636b20312067656172206e756d657261746f7200
+ 020005000c0000001b0000000000000000000000000000000000000000000000034099800000000001000000466565646261636b203120676561722064656e6f6d696e61746f7200
+ 020005000a0000001d000000000000000000000000000000000000000000000003403d800000000000004d6f746f722074656d70657261747572652073656e736f72207479706500
+ 020005000c0000001f000000000000000000000000000000000000000000000003406400000000005e01000056656c6f63697479206c6f6f702070726f706f7274696f6e616c206761696e00
+ 020005000a0000002200000000000000000000000000000000000000000000000340650000000000180056656c6f63697479206c6f6f7020696e74656772616c20616374696f6e2074696d6500
+ 02000500140000001b000000000000000000000000000000000000000000000003409a8000000000080008000000000000000000466565646261636b2031207265666572656e6365207369676e616c00
+ 020005001800000015000000000000000000000000000000000000000000000023403580000000000c002200414d383032312d7842783000436f6e66696775726564206d6f746f72207479706500
+ 020005000a000000140000000000000000000000000000000000000000000000234033800000000003004e756d626572206f6620706f6c6520706169727300
+ 020005000c0000001e000000000000000000000000000000000000000000000023406f0000000000520300004d6f746f7220636f6e74696e756f7573207374616c6c2063757272656e7400
+ 020005000c0000001300000000000000000000000000000000000000000000002340c40000000000520300004d6f746f722072617465642063757272656e7400
+ 020005000c00000012000000000000000000000000000000000000000000000023406d0000000000241300004d6f746f72207065616b2063757272656e7400
+ 020005000a00000013000000000000000000000000000000000000000000000023404d8000000000a00f4d6f746f7220726174656420766f6c7461676500
+ 020005000a0000001300000000000000000000000000000000000000000000002340d88000000000c4224d6178204443204c696e6b20766f6c7461676500
+ 02000500300000001600000000000000000000000000000000000000000000002340598000000000240024002683000000000000401f00000000000000000000000000000000000000000000000000004d6f746f72206461746120636f6e73747261696e747300
+ 020005000c00000011000000000000000000000000000000000000000000000023404980000000000c0100004d6f746f72207065616b20746f7271756500
+ 020005005c0000001b000000000000000000000000000000000000000000000023404a800000000050005000ea010000d4030000be050000a8070000920900007c0b0000660d0000500f00003a110000241300001d0000003a00000057000000720000008e000000a8000000c2000000db000000f40000000c0100004d6f746f7220546f7271756520436861726163746572697374696300
+ 020005000a0000000900000000000000000000000000000000000000000000002340378000000000a4014d6f746f7220454d4600
+ 0200050014000000140000000000000000000000000000000000000000000000234042800000000008000800640f00002c1a0000456c656374726963206d6f746f72206d6f64656c00
+ 020005005c0000001f000000000000000000000000000000000000000000000023404b800000000050005000ea010000d4030000be050000a8070000920900007c0b0000660d0000500f00003a11000024130000da1100007a0d00002c0b0000060900009e070000c20600002c060000c805000078050000780500004d6f746f7220496e64756374616e636520436861726163746572697374696300
+ 020005000c0000001300000000000000000000000000000000000000000000002340710000000000282300004d6178696d756d206d6f746f7220737065656400
+ 02000500140000001500000000000000000000000000000000000000000000002340478000000000080008000e000000000000004d656368616e6963616c206d6f746f72206461746100
+ 020005000a0000001900000000000000000000000000000000000000000000002340c9000000000078054d6f746f72207761726e696e672074656d706572617475726500
+ 020005000a0000001b00000000000000000000000000000000000000000000002340cc0000000000dc054d6f746f72207368757420646f776e2074656d706572617475726500
+ 020005001400000013000000000000000000000000000000000000000000000023403e8000000000080008005802500064000000546865726d616c206d6f746f72206d6f64656c00
+ 020005003400000027000000000000000000000000000000000000000000000023404c800000000028002800d9fe17003a01440237031604e304a0054e06f20680010002800200038003000480040005800500064d6f746f722054656d70657261747572652053656e736f7220436861726163746572697374696300
+ 020005000a0000001b00000000000000000000000000000000000000000000002340c38100000000010443757272656e7420636f6e74726f6c6c65722073657474696e677300
+ 020005000a0000001d000000000000000000000000000000000000000000000023403980000000007869456c656374726963616c20636f6d6d75746174696f6e206f666673657400
+ 020005000a0000001d000000000000000000000000000000000000000000000023403d800000000007004d6f746f722074656d70657261747572652073656e736f72207479706500
+ 020005000a00000017000000000000000000000000000000000000000000000023400280000000003e0043757272656e74206374726c206379636c652074696d6500
+ 020005001c0000001500000000000000000000000000000000000000000000002340368000000000100022004158353230332d303030302d23232323436f6e66696775726564206472697665207479706500
+ 020005000c0000001a000000000000000000000000000000000000000000000023405d800000000052030000436f6e66696775726564206368616e6e656c2063757272656e7400
+ 020005000c0000001f000000000000000000000000000000000000000000000023405c8000000000a4060000436f6e66696775726564206368616e6e656c207065616b2063757272656e7400
+ 020005000a0000001d0000000000000000000000000000000000000000000000234046800000000033004d6f746f7220636f6e74696e756f7573207374616c6c20746f7271756500
+ 020005000c0000001c000000000000000000000000000000000000000000000023405b00000000007b8d410a4269706f6c61722076656c6f63697479206c696d69742076616c756500
+ 020005000a00000020000000000000000000000000000000000000000000000023406a00000000006c0943757272656e74206c6f6f702070726f706f7274696f6e616c206761696e203100
+ 020005000a0000002b000000000000000000000000000000000000000000000023406b0000000000080043757272656e7420636f6e74726f6c206c6f6f7020696e74656772616c20616374696f6e2074696d65203100
+ 020005000a0000002600000000000000000000000000000000000000000000002340ff8100000000fa0056656c6f636974792066696c746572206c6f7720706173732074696d6520636f6e7374616e7400
+ 020005000c0000001f000000000000000000000000000000000000000000000023406400000000001500000056656c6f63697479206c6f6f702070726f706f7274696f6e616c206761696e00
+ 020005000a00000022000000000000000000000000000000000000000000000023406500000000000b0056656c6f63697479206c6f6f7020696e74656772616c20616374696f6e2074696d6500
+ 02000500ec0000000f00000000000000000000000000000000000000000000002340968000000000e000e00003000000454b4d33362d304b4630413031384100000000000000000000000000000000000000000000000000000000001800000000000000050018000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000070018000000000012000c000000000002000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000960096007d0000000000000000000000000000000000000000000000466565646261636b2031207479706500
+ 020005001800000011000000000000000000000000000000000000000000000023400282000000000c000c0001000000f4012c01bc02000056656c6f63697479206f6273657276657200
+
+
+ UINT
+
+
+ DINT
+
+
+ DINT
+
+
+
+
+ UINT
+
+
+ DINT
+
+
+ DINT
+
+
+
+
+ UINT
+
+
+ DINT
+
+
+
+
+ UINT
+
+
+ DINT
+
+
+
+
+
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeA/Links.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeA/Links.xml
new file mode 100644
index 0000000..21797d0
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeA/Links.xml
@@ -0,0 +1,101 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeA/LinksOld.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeA/LinksOld.xml
new file mode 100644
index 0000000..a58b6ce
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeA/LinksOld.xml
@@ -0,0 +1,64 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeA/POUs/FB_Axis.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeA/POUs/FB_Axis.xml
new file mode 100644
index 0000000..f72ad34
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeA/POUs/FB_Axis.xml
@@ -0,0 +1,137 @@
+ 0);
+ bDriveError := AxisRef.NcToPlc.StateDWord.28;
+
+ Timer(IN := bStatus);
+ IF Timer.Q OR bNcError OR bDriveError THEN
+ Timer(IN := FALSE);
+
+ IF bDriveError THEN
+ fbSoEReset(Execute:= FALSE, Axis:= AxisRef);
+ iState := 10;
+ ELSIF bNCError THEN
+ fbMcReset(Execute := FALSE, Axis := AxisRef);
+ iState := 20;
+ ELSE
+ IF lrPosition <> lrPosition1 THEN
+ lrPosition := lrPosition1;
+ ELSE
+ lrPosition := lrPosition2;
+ END_IF
+ fbMCMove(
+ Execute:= FALSE,
+ Axis := AxisRef
+ );
+ iState := 30;
+ END_IF
+ END_IF
+
+10: (* drive reset *)
+ A_DriveReset();
+
+20: (* MC reset *)
+ A_MC2Reset();
+
+30: (* MC move absolute *)
+ A_MC2Move();
+
+31: (* MC move absolute *)
+ A_MC2Move();
+
+32: (* back to idle *)
+ iState := 0;
+
+40: (* MC halt *)
+ A_MC2Halt();
+END_CASE
+
+lrActPos := AxisRef.NcToPlc.ActPos;]]> bStatus,
+);
+]]> lrPosition1 THEN
+ lrPosition := lrPosition1;
+ ELSE
+ lrPosition := lrPosition2;
+ END_IF
+
+ fbMCMove(Execute := FALSE, Axis := AxisRef);
+ iState := iState + 1;
+END_IF
+
+IF bHalt THEN
+ fbMCMove(Execute := FALSE, Axis := AxisRef);
+ iState := 40;
+END_IF]]>
\ No newline at end of file
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeA/POUs/MAIN.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeA/POUs/MAIN.xml
new file mode 100644
index 0000000..0f6de45
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeA/POUs/MAIN.xml
@@ -0,0 +1,33 @@
+ lrActPos1
+);
+
+fbAxis2(
+ bDriveReset := bDriveReset,
+ bHalt := bHalt,
+ lrActPos => lrActPos2
+);
+
+bEnabled := fbAxis1.bStatus AND fbAxis2.bStatus;
+bError := fbAxis1.bDriveError OR fbAxis1.bNcError OR fbAxis2.bNcError OR fbAxis2.bDriveError;
+]]>
\ No newline at end of file
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeB/Axis1.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeB/Axis1.xml
new file mode 100644
index 0000000..d73b92b
Binary files /dev/null and b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeB/Axis1.xml differ
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeB/Axis2.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeB/Axis2.xml
new file mode 100644
index 0000000..8f75881
Binary files /dev/null and b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeB/Axis2.xml differ
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeB/Axis3.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeB/Axis3.xml
new file mode 100644
index 0000000..75e914d
Binary files /dev/null and b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeB/Axis3.xml differ
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeB/Axis4.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeB/Axis4.xml
new file mode 100644
index 0000000..9afa7ab
Binary files /dev/null and b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeB/Axis4.xml differ
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeB/Channel2.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeB/Channel2.xml
new file mode 100644
index 0000000..7c461bf
Binary files /dev/null and b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeB/Channel2.xml differ
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeB/Datatypes/E_Commands.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeB/Datatypes/E_Commands.xml
new file mode 100644
index 0000000..dacb2c4
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeB/Datatypes/E_Commands.xml
@@ -0,0 +1,8 @@
+
\ No newline at end of file
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeB/Datatypes/E_NCI_CTRL_STATE.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeB/Datatypes/E_NCI_CTRL_STATE.xml
new file mode 100644
index 0000000..bd740bd
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeB/Datatypes/E_NCI_CTRL_STATE.xml
@@ -0,0 +1,18 @@
+
\ No newline at end of file
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeB/Datatypes/E_States.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeB/Datatypes/E_States.xml
new file mode 100644
index 0000000..2ca6136
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeB/Datatypes/E_States.xml
@@ -0,0 +1,9 @@
+
\ No newline at end of file
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeB/Drive.xti b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeB/Drive.xti
new file mode 100644
index 0000000..5bbcc49
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeB/Drive.xti
@@ -0,0 +1,145 @@
+
+
+
+ 424dd6020000000000003600000028000000100000000e0000000100180000000000a002000000000000000000000000000000000000ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff808080808080808080808080808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ff000000ff00ffff00ffff00ffc0c0c0c0c0c0c0c0c0c0c0c08080800000ff000000000000000000000000000000000000000000ff00ffff00ffff00ffc0c0c0c0c0c0c0c0c0c0c0c08080800000ff0000000000000000000000000000000000000000000000ff0000ffff00ffc0c0c0c0c0c0c0c0c0c0c0c08080800000ff000000000000000000000000000000000000000000ff00ffff00ffff00ffff0000ff0000ff0000ff00008080800000ffff00ffff00ffff00ff000000ff00ffff00ff000000ff00ffff00ffff00ffff0000c0c0c0c0c0c0c0c0c0808080000000000000000000000000000000ff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0ff0000c0c0c0c0c0c0808080000000ff00ffff00ffff00ffff00ffff00ffff00ff000000ff00ffff00ffff00ffc0c0c0c0c0c0ff0000c0c0c0808080000000000000000000000000000000000000000000000000ff00ffff00ffff00ffc0c0c0c0c0c0c0c0c0ff00008080800000000000000000000000000000000000000000000000000000ff0000ffff00ffff0000c0c0c0c0c0c0ff0000808080000000000000000000000000000000000000000000000000ff00ffff00ffff00ffc0c0c0ff0000ff0000c0c0c0808080000000ff00ffff00ffff00ff000000ff00ffff00ff000000ff00ffff00ffff00ffc0c0c0c0c0c0c0c0c0c0c0c0808080000000000000000000000000000000ff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0c0c0c0c0c0c0c0c0c0808080000000ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0c0c0c0c0c0c0c0c0c0808080
+
+
+ __FILENAME__
+ 1000
+
+ 001880002600010001000000800080008000001826010000
+ 001a80002200010002000000800080008000001a22010000
+ 00100c002400010003000000000000000000001024010000
+ 001114002000010004000000000000000000001120010000
+ 0000000000000000001000020100000001000000000000000000000000000000
+ 0000000000000000001100010100000002000000000000000000000000000000
+ 00000000000000000d0800010100000003000000000000000000000000000000
+ 0010140200181402
+ 3007000090d0030050c30000000000000000ffff000000000000000000000000
+ 446353796e633235300000000000000053796e63206379636c652074696d653a20323530b5730000000000000000000090d0030050c3000000000000ffff30070000000000000000000000000000000000000000000000000000000000000000
+ 446353796e633132350000000000000053796e63206379636c652074696d653a20313235b5730000000000000000000048e80100a861000000000000ffff30070000000000000000000000000000000000000000000000000000000000000000
+ 02000500100000000d000000000000000000000000000000000000000000000003400a8000000000fe070000000000004665617475726520666c61677300
+ 02000500100000000d000000000000000000000000000000000000000000000023400a8000000000ff070000000000004665617475726520666c61677300
+ 020005000a0000001500000000000000000000000000000000000000000000000340010000000000d007546e637963202d204e43206379636c652074696d6500
+ 020005000a0000001700000000000000000000000000000000000000000000000340020000000000d0075473637963202d20436f6d6d206379636c652074696d6500
+ 020005000a0000000e000000000000000000000000000000000000000000000003402000000000000b004f7065726174696f6e206d6f646500
+ 020005000a0000000e000000000000000000000000000000000000000000000023402000000000000b004f7065726174696f6e206d6f646500
+ 020005000a0000001400000000000000000000000000000000000000000000000340c98000000000fc084e6f6d696e616c206d61696e20766f6c7461676500
+ 020005000a0000002500000000000000000000000000000000000000000000000340ca8000000000c8004d61696e20766f6c7461676520706f73697469766520746f6c6572616e63652072616e676500
+ 020005000a0000002500000000000000000000000000000000000000000000000340cb8000000000c8004d61696e20766f6c74616765206e6567617469766520746f6c6572616e63652072616e676500
+ 020005000a0000001d00000000000000000000000000000000000000000000000340cc80000000000100506f776572204d616e6167656d656e7420636f6e74726f6c20776f726400
+ 020005001c0000001500000000000000000000000000000000000000000000000340368000000000100022004158353230332d303030302d23232323436f6e66696775726564206472697665207479706500
+ 020005001c000000150000000000000000000000000000000000000000000000034035800000000010002200414d333032312d304334302d30303030436f6e66696775726564206d6f746f72207479706500
+ 020005000c00000012000000000000000000000000000000000000000000000003406d00000000009c1800004d6f746f72207065616b2063757272656e7400
+ 020005000c0000001e000000000000000000000000000000000000000000000003406f00000000002c0600004d6f746f7220636f6e74696e756f7573207374616c6c2063757272656e7400
+ 020005000c0000001300000000000000000000000000000000000000000000000340710000000000401f00004d6178696d756d206d6f746f7220737065656400
+ 020005000a000000140000000000000000000000000000000000000000000000034033800000000003004e756d626572206f6620706f6c6520706169727300
+ 020005000a0000000900000000000000000000000000000000000000000000000340378000000000c3004d6f746f7220454d4600
+ 020005000a0000001d000000000000000000000000000000000000000000000003404680000000002d004d6f746f7220636f6e74696e756f7573207374616c6c20746f7271756500
+ 020005000c0000001100000000000000000000000000000000000000000000000340498000000000930000004d6f746f72207065616b20746f7271756500
+ 020005000a0000001d000000000000000000000000000000000000000000000003403980000000007869456c656374726963616c20636f6d6d75746174696f6e206f666673657400
+ 0200050014000000140000000000000000000000000000000000000000000000034042800000000008000800140500006c070000456c656374726963206d6f746f72206d6f64656c00
+ 020005001400000013000000000000000000000000000000000000000000000003403e800000000008000800e001500064000100546865726d616c206d6f746f72206d6f64656c00
+ 020005000c00000021000000000000000000000000000000000000000000000003408800000000005e960900506f73697469766520616363656c65726174696f6e206c696d69742076616c756500
+ 020005000c00000021000000000000000000000000000000000000000000000003408900000000005e9609004e6567617469766520616363656c65726174696f6e206c696d69742076616c756500
+ 020005000a000000170000000000000000000000000000000000000000000000034032800000000000004d6f746f7220636f6e737472756374696f6e207479706500
+ 020005001000000027000000000000000000000000000000000000000000000003404480000000000400040064000000546865726d616c206f7665726c6f616420666163746f7220286d6f746f722077696e64696e672900
+ 020005000a0000001900000000000000000000000000000000000000000000000340c9000000000020034d6f746f72207761726e696e672074656d706572617475726500
+ 020005000a0000001b00000000000000000000000000000000000000000000000340cc000000000078054d6f746f72207368757420646f776e2074656d706572617475726500
+ 02000500140000001500000000000000000000000000000000000000000000000340478000000000080008000b000000000000004d656368616e6963616c206d6f746f72206461746100
+ 0200050030000000160000000000000000000000000000000000000000000000034059800000000024002400028000003e0000003e000000c980000084030000fc0800000000000000000000000000004d6f746f72206461746120636f6e73747261696e747300
+ 020005000a00000020000000000000000000000000000000000000000000000003406a0000000000440243757272656e74206c6f6f702070726f706f7274696f6e616c206761696e203100
+ 020005000a0000002b000000000000000000000000000000000000000000000003406b0000000000050043757272656e7420636f6e74726f6c206c6f6f7020696e74656772616c20616374696f6e2074696d65203100
+ 020005000a0000002000000000000000000000000000000000000000000000000340348000000000b80b54696d65206c696d69746174696f6e20666f72207065616b2063757272656e7400
+ 020005000c0000001f00000000000000000000000000000000000000000000000340388000000000321200004d6178206d6f746f722073706565642077697468206d617820746f7271756500
+ 020005000c0000001f000000000000000000000000000000000000000000000003405c8000000000580c0000436f6e66696775726564206368616e6e656c207065616b2063757272656e7400
+ 020005000c0000001a000000000000000000000000000000000000000000000003405d80000000002c060000436f6e66696775726564206368616e6e656c2063757272656e7400
+ 020005000c0000001c000000000000000000000000000000000000000000000003405b0000000000f90b1b084269706f6c61722076656c6f63697479206c696d69742076616c756500
+ 020005000a00000017000000000000000000000000000000000000000000000003400280000000003e0043757272656e74206374726c206379636c652074696d6500
+ 020005000a0000001b00000000000000000000000000000000000000000000000340c38100000000000043757272656e7420636f6e74726f6c6c65722073657474696e677300
+ 020005000a00000018000000000000000000000000000000000000000000000003400380000000007d0056656c6f63697479206374726c206379636c652074696d6500
+ 020005000a0000002600000000000000000000000000000000000000000000000340ff8100000000fa0056656c6f636974792066696c746572206c6f7720706173732074696d6520636f6e7374616e7400
+ 020005000a0000001800000000000000000000000000000000000000000000000340048000000000fa00506f736974696f6e206374726c206379636c652074696d6500
+ 02000500ec0000000f00000000000000000000000000000000000000000000000340968000000000e000e0000100000048656e6723414433362d3132313941462e305842493000000000000000000000000000000000000002003200030000000000000001000300000000000008000000000000e8030000e8030000000000000000000000000000000000000000000000000000010003000090185413000c0018000c0001000100000000000000000000000000000002000000060043000100010008000400130001000c005500102705003300460090010500000001000000ff000100000000000000000000000000a600a600780000000000000000000000000000000000000000000000466565646261636b2031207479706500
+ 020005000c000000190000000000000000000000000000000000000000000000034098800000000001000000466565646261636b20312067656172206e756d657261746f7200
+ 020005000c0000001b0000000000000000000000000000000000000000000000034099800000000001000000466565646261636b203120676561722064656e6f6d696e61746f7200
+ 020005000a0000001d000000000000000000000000000000000000000000000003403d800000000000004d6f746f722074656d70657261747572652073656e736f72207479706500
+ 020005000c0000001f000000000000000000000000000000000000000000000003406400000000005e01000056656c6f63697479206c6f6f702070726f706f7274696f6e616c206761696e00
+ 020005000a0000002200000000000000000000000000000000000000000000000340650000000000180056656c6f63697479206c6f6f7020696e74656772616c20616374696f6e2074696d6500
+ 02000500140000001b000000000000000000000000000000000000000000000003409a8000000000080008000000000000000000466565646261636b2031207265666572656e6365207369676e616c00
+ 020005001800000015000000000000000000000000000000000000000000000023403580000000000c002200414d383032312d7842783000436f6e66696775726564206d6f746f72207479706500
+ 020005000a000000140000000000000000000000000000000000000000000000234033800000000003004e756d626572206f6620706f6c6520706169727300
+ 020005000c0000001e000000000000000000000000000000000000000000000023406f0000000000520300004d6f746f7220636f6e74696e756f7573207374616c6c2063757272656e7400
+ 020005000c0000001300000000000000000000000000000000000000000000002340c40000000000520300004d6f746f722072617465642063757272656e7400
+ 020005000c00000012000000000000000000000000000000000000000000000023406d0000000000241300004d6f746f72207065616b2063757272656e7400
+ 020005000a00000013000000000000000000000000000000000000000000000023404d8000000000a00f4d6f746f7220726174656420766f6c7461676500
+ 020005000a0000001300000000000000000000000000000000000000000000002340d88000000000c4224d6178204443204c696e6b20766f6c7461676500
+ 02000500300000001600000000000000000000000000000000000000000000002340598000000000240024002683000000000000401f00000000000000000000000000000000000000000000000000004d6f746f72206461746120636f6e73747261696e747300
+ 020005000c00000011000000000000000000000000000000000000000000000023404980000000000c0100004d6f746f72207065616b20746f7271756500
+ 020005005c0000001b000000000000000000000000000000000000000000000023404a800000000050005000ea010000d4030000be050000a8070000920900007c0b0000660d0000500f00003a110000241300001d0000003a00000057000000720000008e000000a8000000c2000000db000000f40000000c0100004d6f746f7220546f7271756520436861726163746572697374696300
+ 020005000a0000000900000000000000000000000000000000000000000000002340378000000000a4014d6f746f7220454d4600
+ 0200050014000000140000000000000000000000000000000000000000000000234042800000000008000800640f00002c1a0000456c656374726963206d6f746f72206d6f64656c00
+ 020005005c0000001f000000000000000000000000000000000000000000000023404b800000000050005000ea010000d4030000be050000a8070000920900007c0b0000660d0000500f00003a11000024130000da1100007a0d00002c0b0000060900009e070000c20600002c060000c805000078050000780500004d6f746f7220496e64756374616e636520436861726163746572697374696300
+ 020005000c0000001300000000000000000000000000000000000000000000002340710000000000282300004d6178696d756d206d6f746f7220737065656400
+ 02000500140000001500000000000000000000000000000000000000000000002340478000000000080008000e000000000000004d656368616e6963616c206d6f746f72206461746100
+ 020005000a0000001900000000000000000000000000000000000000000000002340c9000000000078054d6f746f72207761726e696e672074656d706572617475726500
+ 020005000a0000001b00000000000000000000000000000000000000000000002340cc0000000000dc054d6f746f72207368757420646f776e2074656d706572617475726500
+ 020005001400000013000000000000000000000000000000000000000000000023403e8000000000080008005802500064000000546865726d616c206d6f746f72206d6f64656c00
+ 020005003400000027000000000000000000000000000000000000000000000023404c800000000028002800d9fe17003a01440237031604e304a0054e06f20680010002800200038003000480040005800500064d6f746f722054656d70657261747572652053656e736f7220436861726163746572697374696300
+ 020005000a0000001b00000000000000000000000000000000000000000000002340c38100000000010443757272656e7420636f6e74726f6c6c65722073657474696e677300
+ 020005000a0000001d000000000000000000000000000000000000000000000023403980000000007869456c656374726963616c20636f6d6d75746174696f6e206f666673657400
+ 020005000a0000001d000000000000000000000000000000000000000000000023403d800000000007004d6f746f722074656d70657261747572652073656e736f72207479706500
+ 020005000a00000017000000000000000000000000000000000000000000000023400280000000003e0043757272656e74206374726c206379636c652074696d6500
+ 020005001c0000001500000000000000000000000000000000000000000000002340368000000000100022004158353230332d303030302d23232323436f6e66696775726564206472697665207479706500
+ 020005000c0000001a000000000000000000000000000000000000000000000023405d800000000052030000436f6e66696775726564206368616e6e656c2063757272656e7400
+ 020005000c0000001f000000000000000000000000000000000000000000000023405c8000000000a4060000436f6e66696775726564206368616e6e656c207065616b2063757272656e7400
+ 020005000a0000001d0000000000000000000000000000000000000000000000234046800000000033004d6f746f7220636f6e74696e756f7573207374616c6c20746f7271756500
+ 020005000c0000001c000000000000000000000000000000000000000000000023405b00000000007b8d410a4269706f6c61722076656c6f63697479206c696d69742076616c756500
+ 020005000a00000020000000000000000000000000000000000000000000000023406a00000000006c0943757272656e74206c6f6f702070726f706f7274696f6e616c206761696e203100
+ 020005000a0000002b000000000000000000000000000000000000000000000023406b0000000000080043757272656e7420636f6e74726f6c206c6f6f7020696e74656772616c20616374696f6e2074696d65203100
+ 020005000a0000002600000000000000000000000000000000000000000000002340ff8100000000fa0056656c6f636974792066696c746572206c6f7720706173732074696d6520636f6e7374616e7400
+ 020005000c0000001f000000000000000000000000000000000000000000000023406400000000001500000056656c6f63697479206c6f6f702070726f706f7274696f6e616c206761696e00
+ 020005000a00000022000000000000000000000000000000000000000000000023406500000000000b0056656c6f63697479206c6f6f7020696e74656772616c20616374696f6e2074696d6500
+ 02000500ec0000000f00000000000000000000000000000000000000000000002340968000000000e000e00003000000454b4d33362d304b4630413031384100000000000000000000000000000000000000000000000000000000001800000000000000050018000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000070018000000000012000c000000000002000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000960096007d0000000000000000000000000000000000000000000000466565646261636b2031207479706500
+ 020005001800000011000000000000000000000000000000000000000000000023400282000000000c000c0001000000f4012c01bc02000056656c6f63697479206f6273657276657200
+
+
+ UINT
+
+
+ DINT
+
+
+ DINT
+
+
+
+
+ UINT
+
+
+ DINT
+
+
+ DINT
+
+
+
+
+ UINT
+
+
+ DINT
+
+
+
+
+ UINT
+
+
+ DINT
+
+
+
+
+
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeB/GVLs/GlobalVariables.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeB/GVLs/GlobalVariables.xml
new file mode 100644
index 0000000..f49c99c
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeB/GVLs/GlobalVariables.xml
@@ -0,0 +1,36 @@
+
\ No newline at end of file
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeB/Links.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeB/Links.xml
new file mode 100644
index 0000000..f2f3f23
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeB/Links.xml
@@ -0,0 +1,96 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeB/LinksOld.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeB/LinksOld.xml
new file mode 100644
index 0000000..7b6e43f
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeB/LinksOld.xml
@@ -0,0 +1,82 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeB/POUs/FB_NciChannel.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeB/POUs/FB_NciChannel.xml
new file mode 100644
index 0000000..a8ec7c0
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeB/POUs/FB_NciChannel.xml
@@ -0,0 +1,181 @@
+
\ No newline at end of file
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeB/POUs/FB_NciSequence.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeB/POUs/FB_NciSequence.xml
new file mode 100644
index 0000000..0fbaafc
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeB/POUs/FB_NciSequence.xml
@@ -0,0 +1,86 @@
+= 2 AND iMaxUsedChannels >= 1 THEN
+ CASE nState OF
+ 0:
+ IF bExecute THEN
+ bBusy := TRUE;
+ bDone := FALSE;
+ bError := FALSE;
+ dwErrorId := 0;
+ nState := 10;
+ END_IF
+
+ 10:
+ fbNciChaA(
+ bExecute := bExecute,
+ stNcToPlcX := AxisRef[1].NcToPlc,
+ stNcToPlcY := AxisRef[2].NcToPlc,
+ stNcToPlcZ := stNcToPlcDummy,
+ stNcToPlcC := stNcToPlcDummy,
+ stPlcToNci := stPlcToNci,
+ stNciToPlc := stNciToPlc
+ );
+
+ IF NOT fbNciChaA.bBusy THEN
+ fbNciChaA( bExecute:= FALSE, stNcToPlcX:= AxisRef[1].NcToPlc, stNcToPlcY:= AxisRef[2].NcToPlc, stNcToPlcZ:= stNcToPlcDummy,
+ stNcToPlcC:= stNcToPlcDummy, stPlcToNci:= stPlcToNci, stNciToPlc:= stNciToPlc );
+
+ bBusy := FALSE;
+
+ IF NOT fbNciChaA.bErr THEN
+ bDone := TRUE;
+ ELSE
+ bError := fbNciChaA.bErr;
+ dwErrorId := fbNciChaA.nErrId;
+ END_IF
+ IF NOT bExecute THEN
+ nState := 0;
+ ELSE
+ nState := 20;
+ END_IF
+ END_IF
+
+ 20:
+ bBusy := FALSE;
+ IF NOT bExecute THEN
+ IF fbNciChaA.bErr THEN
+ bError := fbNciChaA.bErr;
+ dwErrorId := fbNciChaA.nErrId;
+ END_IF
+ nState := 0;
+ END_IF
+ END_CASE
+
+END_IF
+]]>
\ No newline at end of file
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeB/POUs/MAIN.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeB/POUs/MAIN.xml
new file mode 100644
index 0000000..95576ee
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeB/POUs/MAIN.xml
@@ -0,0 +1,152 @@
+ 32767 THEN
+ iNciOverrideRaw := 0;
+END_IF
+NciOverrideFilter(
+ OverrideValueRaw := iNciOverrideRaw,
+ LowerOverrideThreshold := 0,
+ UpperOverrideThreshold := 32767,
+ OverrideSteps := 200,
+ OverrideRecoveryTime := T#150ms,
+);
+
+(* enable *)
+A_Enable();
+IF bEnabled THEN
+ bCallSequence := TRUE;
+ A_TriggerExec();
+END_IF
+
+IF bCallSequence THEN
+ (* call motion sequence *)
+ IF bNciReq OR fbNciSequence.bBusy THEN
+ fbNciSequence(
+ bExecute := TRUE,
+ iMaxUsedAxes := iMaxUsedAxes,
+ iMaxUsedChannels:= iMaxUsedChannels,
+ AxisRef := AxisRef,
+ stNciToPlc := stiNciToPlc,
+ stPlcToNci := stoPlcToNci,
+ bBusy => bBusy,
+ bDone => bDone,
+ bError => bError,
+ dwErrorId => dwErrorId
+ );
+ ELSE
+ fbNciSequence(
+ bExecute := FALSE,
+ AxisRef := AxisRef,
+ stNciToPlc := stiNciToPlc,
+ stPlcToNci := stoPlcToNci,
+ );
+ END_IF
+END_IF
+]]> bAxisEnabled[I]
+ );
+ bEnabled := bEnabled AND bAxisEnabled[I];
+ bEnableError := bEnableError OR fbMC_Power[I].Error;
+(* bResetReq := bResetReq OR AxisInErrorState(stiNcToPlc[I].nStateDWord);*)
+END_FOR
+
+(* NCI override *)
+lrOverrideNci := LIMIT(0, UINT_TO_LREAL(iNciOverrideRaw) * 100.0 / lrOverrideMaxScale, 100);
+ItpSetOverridePercent(lrOverrideNci, stoPlcToNci);
+]]>
\ No newline at end of file
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeC/AxisX.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeC/AxisX.xml
new file mode 100644
index 0000000..df7fece
Binary files /dev/null and b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeC/AxisX.xml differ
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeC/AxisY.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeC/AxisY.xml
new file mode 100644
index 0000000..2c98063
Binary files /dev/null and b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeC/AxisY.xml differ
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeC/AxisZ.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeC/AxisZ.xml
new file mode 100644
index 0000000..df3d926
Binary files /dev/null and b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeC/AxisZ.xml differ
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeC/Datatypes/E_AxisState.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeC/Datatypes/E_AxisState.xml
new file mode 100644
index 0000000..a89c0f6
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeC/Datatypes/E_AxisState.xml
@@ -0,0 +1,9 @@
+
\ No newline at end of file
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeC/Datatypes/E_MoveCmd.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeC/Datatypes/E_MoveCmd.xml
new file mode 100644
index 0000000..821477a
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeC/Datatypes/E_MoveCmd.xml
@@ -0,0 +1,10 @@
+
\ No newline at end of file
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeC/Drive.xti b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeC/Drive.xti
new file mode 100644
index 0000000..5bbcc49
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeC/Drive.xti
@@ -0,0 +1,145 @@
+
+
+
+ 424dd6020000000000003600000028000000100000000e0000000100180000000000a002000000000000000000000000000000000000ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff808080808080808080808080808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ff000000ff00ffff00ffff00ffc0c0c0c0c0c0c0c0c0c0c0c08080800000ff000000000000000000000000000000000000000000ff00ffff00ffff00ffc0c0c0c0c0c0c0c0c0c0c0c08080800000ff0000000000000000000000000000000000000000000000ff0000ffff00ffc0c0c0c0c0c0c0c0c0c0c0c08080800000ff000000000000000000000000000000000000000000ff00ffff00ffff00ffff0000ff0000ff0000ff00008080800000ffff00ffff00ffff00ff000000ff00ffff00ff000000ff00ffff00ffff00ffff0000c0c0c0c0c0c0c0c0c0808080000000000000000000000000000000ff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0ff0000c0c0c0c0c0c0808080000000ff00ffff00ffff00ffff00ffff00ffff00ff000000ff00ffff00ffff00ffc0c0c0c0c0c0ff0000c0c0c0808080000000000000000000000000000000000000000000000000ff00ffff00ffff00ffc0c0c0c0c0c0c0c0c0ff00008080800000000000000000000000000000000000000000000000000000ff0000ffff00ffff0000c0c0c0c0c0c0ff0000808080000000000000000000000000000000000000000000000000ff00ffff00ffff00ffc0c0c0ff0000ff0000c0c0c0808080000000ff00ffff00ffff00ff000000ff00ffff00ff000000ff00ffff00ffff00ffc0c0c0c0c0c0c0c0c0c0c0c0808080000000000000000000000000000000ff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0c0c0c0c0c0c0c0c0c0808080000000ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0c0c0c0c0c0c0c0c0c0808080
+
+
+ __FILENAME__
+ 1000
+
+ 001880002600010001000000800080008000001826010000
+ 001a80002200010002000000800080008000001a22010000
+ 00100c002400010003000000000000000000001024010000
+ 001114002000010004000000000000000000001120010000
+ 0000000000000000001000020100000001000000000000000000000000000000
+ 0000000000000000001100010100000002000000000000000000000000000000
+ 00000000000000000d0800010100000003000000000000000000000000000000
+ 0010140200181402
+ 3007000090d0030050c30000000000000000ffff000000000000000000000000
+ 446353796e633235300000000000000053796e63206379636c652074696d653a20323530b5730000000000000000000090d0030050c3000000000000ffff30070000000000000000000000000000000000000000000000000000000000000000
+ 446353796e633132350000000000000053796e63206379636c652074696d653a20313235b5730000000000000000000048e80100a861000000000000ffff30070000000000000000000000000000000000000000000000000000000000000000
+ 02000500100000000d000000000000000000000000000000000000000000000003400a8000000000fe070000000000004665617475726520666c61677300
+ 02000500100000000d000000000000000000000000000000000000000000000023400a8000000000ff070000000000004665617475726520666c61677300
+ 020005000a0000001500000000000000000000000000000000000000000000000340010000000000d007546e637963202d204e43206379636c652074696d6500
+ 020005000a0000001700000000000000000000000000000000000000000000000340020000000000d0075473637963202d20436f6d6d206379636c652074696d6500
+ 020005000a0000000e000000000000000000000000000000000000000000000003402000000000000b004f7065726174696f6e206d6f646500
+ 020005000a0000000e000000000000000000000000000000000000000000000023402000000000000b004f7065726174696f6e206d6f646500
+ 020005000a0000001400000000000000000000000000000000000000000000000340c98000000000fc084e6f6d696e616c206d61696e20766f6c7461676500
+ 020005000a0000002500000000000000000000000000000000000000000000000340ca8000000000c8004d61696e20766f6c7461676520706f73697469766520746f6c6572616e63652072616e676500
+ 020005000a0000002500000000000000000000000000000000000000000000000340cb8000000000c8004d61696e20766f6c74616765206e6567617469766520746f6c6572616e63652072616e676500
+ 020005000a0000001d00000000000000000000000000000000000000000000000340cc80000000000100506f776572204d616e6167656d656e7420636f6e74726f6c20776f726400
+ 020005001c0000001500000000000000000000000000000000000000000000000340368000000000100022004158353230332d303030302d23232323436f6e66696775726564206472697665207479706500
+ 020005001c000000150000000000000000000000000000000000000000000000034035800000000010002200414d333032312d304334302d30303030436f6e66696775726564206d6f746f72207479706500
+ 020005000c00000012000000000000000000000000000000000000000000000003406d00000000009c1800004d6f746f72207065616b2063757272656e7400
+ 020005000c0000001e000000000000000000000000000000000000000000000003406f00000000002c0600004d6f746f7220636f6e74696e756f7573207374616c6c2063757272656e7400
+ 020005000c0000001300000000000000000000000000000000000000000000000340710000000000401f00004d6178696d756d206d6f746f7220737065656400
+ 020005000a000000140000000000000000000000000000000000000000000000034033800000000003004e756d626572206f6620706f6c6520706169727300
+ 020005000a0000000900000000000000000000000000000000000000000000000340378000000000c3004d6f746f7220454d4600
+ 020005000a0000001d000000000000000000000000000000000000000000000003404680000000002d004d6f746f7220636f6e74696e756f7573207374616c6c20746f7271756500
+ 020005000c0000001100000000000000000000000000000000000000000000000340498000000000930000004d6f746f72207065616b20746f7271756500
+ 020005000a0000001d000000000000000000000000000000000000000000000003403980000000007869456c656374726963616c20636f6d6d75746174696f6e206f666673657400
+ 0200050014000000140000000000000000000000000000000000000000000000034042800000000008000800140500006c070000456c656374726963206d6f746f72206d6f64656c00
+ 020005001400000013000000000000000000000000000000000000000000000003403e800000000008000800e001500064000100546865726d616c206d6f746f72206d6f64656c00
+ 020005000c00000021000000000000000000000000000000000000000000000003408800000000005e960900506f73697469766520616363656c65726174696f6e206c696d69742076616c756500
+ 020005000c00000021000000000000000000000000000000000000000000000003408900000000005e9609004e6567617469766520616363656c65726174696f6e206c696d69742076616c756500
+ 020005000a000000170000000000000000000000000000000000000000000000034032800000000000004d6f746f7220636f6e737472756374696f6e207479706500
+ 020005001000000027000000000000000000000000000000000000000000000003404480000000000400040064000000546865726d616c206f7665726c6f616420666163746f7220286d6f746f722077696e64696e672900
+ 020005000a0000001900000000000000000000000000000000000000000000000340c9000000000020034d6f746f72207761726e696e672074656d706572617475726500
+ 020005000a0000001b00000000000000000000000000000000000000000000000340cc000000000078054d6f746f72207368757420646f776e2074656d706572617475726500
+ 02000500140000001500000000000000000000000000000000000000000000000340478000000000080008000b000000000000004d656368616e6963616c206d6f746f72206461746100
+ 0200050030000000160000000000000000000000000000000000000000000000034059800000000024002400028000003e0000003e000000c980000084030000fc0800000000000000000000000000004d6f746f72206461746120636f6e73747261696e747300
+ 020005000a00000020000000000000000000000000000000000000000000000003406a0000000000440243757272656e74206c6f6f702070726f706f7274696f6e616c206761696e203100
+ 020005000a0000002b000000000000000000000000000000000000000000000003406b0000000000050043757272656e7420636f6e74726f6c206c6f6f7020696e74656772616c20616374696f6e2074696d65203100
+ 020005000a0000002000000000000000000000000000000000000000000000000340348000000000b80b54696d65206c696d69746174696f6e20666f72207065616b2063757272656e7400
+ 020005000c0000001f00000000000000000000000000000000000000000000000340388000000000321200004d6178206d6f746f722073706565642077697468206d617820746f7271756500
+ 020005000c0000001f000000000000000000000000000000000000000000000003405c8000000000580c0000436f6e66696775726564206368616e6e656c207065616b2063757272656e7400
+ 020005000c0000001a000000000000000000000000000000000000000000000003405d80000000002c060000436f6e66696775726564206368616e6e656c2063757272656e7400
+ 020005000c0000001c000000000000000000000000000000000000000000000003405b0000000000f90b1b084269706f6c61722076656c6f63697479206c696d69742076616c756500
+ 020005000a00000017000000000000000000000000000000000000000000000003400280000000003e0043757272656e74206374726c206379636c652074696d6500
+ 020005000a0000001b00000000000000000000000000000000000000000000000340c38100000000000043757272656e7420636f6e74726f6c6c65722073657474696e677300
+ 020005000a00000018000000000000000000000000000000000000000000000003400380000000007d0056656c6f63697479206374726c206379636c652074696d6500
+ 020005000a0000002600000000000000000000000000000000000000000000000340ff8100000000fa0056656c6f636974792066696c746572206c6f7720706173732074696d6520636f6e7374616e7400
+ 020005000a0000001800000000000000000000000000000000000000000000000340048000000000fa00506f736974696f6e206374726c206379636c652074696d6500
+ 02000500ec0000000f00000000000000000000000000000000000000000000000340968000000000e000e0000100000048656e6723414433362d3132313941462e305842493000000000000000000000000000000000000002003200030000000000000001000300000000000008000000000000e8030000e8030000000000000000000000000000000000000000000000000000010003000090185413000c0018000c0001000100000000000000000000000000000002000000060043000100010008000400130001000c005500102705003300460090010500000001000000ff000100000000000000000000000000a600a600780000000000000000000000000000000000000000000000466565646261636b2031207479706500
+ 020005000c000000190000000000000000000000000000000000000000000000034098800000000001000000466565646261636b20312067656172206e756d657261746f7200
+ 020005000c0000001b0000000000000000000000000000000000000000000000034099800000000001000000466565646261636b203120676561722064656e6f6d696e61746f7200
+ 020005000a0000001d000000000000000000000000000000000000000000000003403d800000000000004d6f746f722074656d70657261747572652073656e736f72207479706500
+ 020005000c0000001f000000000000000000000000000000000000000000000003406400000000005e01000056656c6f63697479206c6f6f702070726f706f7274696f6e616c206761696e00
+ 020005000a0000002200000000000000000000000000000000000000000000000340650000000000180056656c6f63697479206c6f6f7020696e74656772616c20616374696f6e2074696d6500
+ 02000500140000001b000000000000000000000000000000000000000000000003409a8000000000080008000000000000000000466565646261636b2031207265666572656e6365207369676e616c00
+ 020005001800000015000000000000000000000000000000000000000000000023403580000000000c002200414d383032312d7842783000436f6e66696775726564206d6f746f72207479706500
+ 020005000a000000140000000000000000000000000000000000000000000000234033800000000003004e756d626572206f6620706f6c6520706169727300
+ 020005000c0000001e000000000000000000000000000000000000000000000023406f0000000000520300004d6f746f7220636f6e74696e756f7573207374616c6c2063757272656e7400
+ 020005000c0000001300000000000000000000000000000000000000000000002340c40000000000520300004d6f746f722072617465642063757272656e7400
+ 020005000c00000012000000000000000000000000000000000000000000000023406d0000000000241300004d6f746f72207065616b2063757272656e7400
+ 020005000a00000013000000000000000000000000000000000000000000000023404d8000000000a00f4d6f746f7220726174656420766f6c7461676500
+ 020005000a0000001300000000000000000000000000000000000000000000002340d88000000000c4224d6178204443204c696e6b20766f6c7461676500
+ 02000500300000001600000000000000000000000000000000000000000000002340598000000000240024002683000000000000401f00000000000000000000000000000000000000000000000000004d6f746f72206461746120636f6e73747261696e747300
+ 020005000c00000011000000000000000000000000000000000000000000000023404980000000000c0100004d6f746f72207065616b20746f7271756500
+ 020005005c0000001b000000000000000000000000000000000000000000000023404a800000000050005000ea010000d4030000be050000a8070000920900007c0b0000660d0000500f00003a110000241300001d0000003a00000057000000720000008e000000a8000000c2000000db000000f40000000c0100004d6f746f7220546f7271756520436861726163746572697374696300
+ 020005000a0000000900000000000000000000000000000000000000000000002340378000000000a4014d6f746f7220454d4600
+ 0200050014000000140000000000000000000000000000000000000000000000234042800000000008000800640f00002c1a0000456c656374726963206d6f746f72206d6f64656c00
+ 020005005c0000001f000000000000000000000000000000000000000000000023404b800000000050005000ea010000d4030000be050000a8070000920900007c0b0000660d0000500f00003a11000024130000da1100007a0d00002c0b0000060900009e070000c20600002c060000c805000078050000780500004d6f746f7220496e64756374616e636520436861726163746572697374696300
+ 020005000c0000001300000000000000000000000000000000000000000000002340710000000000282300004d6178696d756d206d6f746f7220737065656400
+ 02000500140000001500000000000000000000000000000000000000000000002340478000000000080008000e000000000000004d656368616e6963616c206d6f746f72206461746100
+ 020005000a0000001900000000000000000000000000000000000000000000002340c9000000000078054d6f746f72207761726e696e672074656d706572617475726500
+ 020005000a0000001b00000000000000000000000000000000000000000000002340cc0000000000dc054d6f746f72207368757420646f776e2074656d706572617475726500
+ 020005001400000013000000000000000000000000000000000000000000000023403e8000000000080008005802500064000000546865726d616c206d6f746f72206d6f64656c00
+ 020005003400000027000000000000000000000000000000000000000000000023404c800000000028002800d9fe17003a01440237031604e304a0054e06f20680010002800200038003000480040005800500064d6f746f722054656d70657261747572652053656e736f7220436861726163746572697374696300
+ 020005000a0000001b00000000000000000000000000000000000000000000002340c38100000000010443757272656e7420636f6e74726f6c6c65722073657474696e677300
+ 020005000a0000001d000000000000000000000000000000000000000000000023403980000000007869456c656374726963616c20636f6d6d75746174696f6e206f666673657400
+ 020005000a0000001d000000000000000000000000000000000000000000000023403d800000000007004d6f746f722074656d70657261747572652073656e736f72207479706500
+ 020005000a00000017000000000000000000000000000000000000000000000023400280000000003e0043757272656e74206374726c206379636c652074696d6500
+ 020005001c0000001500000000000000000000000000000000000000000000002340368000000000100022004158353230332d303030302d23232323436f6e66696775726564206472697665207479706500
+ 020005000c0000001a000000000000000000000000000000000000000000000023405d800000000052030000436f6e66696775726564206368616e6e656c2063757272656e7400
+ 020005000c0000001f000000000000000000000000000000000000000000000023405c8000000000a4060000436f6e66696775726564206368616e6e656c207065616b2063757272656e7400
+ 020005000a0000001d0000000000000000000000000000000000000000000000234046800000000033004d6f746f7220636f6e74696e756f7573207374616c6c20746f7271756500
+ 020005000c0000001c000000000000000000000000000000000000000000000023405b00000000007b8d410a4269706f6c61722076656c6f63697479206c696d69742076616c756500
+ 020005000a00000020000000000000000000000000000000000000000000000023406a00000000006c0943757272656e74206c6f6f702070726f706f7274696f6e616c206761696e203100
+ 020005000a0000002b000000000000000000000000000000000000000000000023406b0000000000080043757272656e7420636f6e74726f6c206c6f6f7020696e74656772616c20616374696f6e2074696d65203100
+ 020005000a0000002600000000000000000000000000000000000000000000002340ff8100000000fa0056656c6f636974792066696c746572206c6f7720706173732074696d6520636f6e7374616e7400
+ 020005000c0000001f000000000000000000000000000000000000000000000023406400000000001500000056656c6f63697479206c6f6f702070726f706f7274696f6e616c206761696e00
+ 020005000a00000022000000000000000000000000000000000000000000000023406500000000000b0056656c6f63697479206c6f6f7020696e74656772616c20616374696f6e2074696d6500
+ 02000500ec0000000f00000000000000000000000000000000000000000000002340968000000000e000e00003000000454b4d33362d304b4630413031384100000000000000000000000000000000000000000000000000000000001800000000000000050018000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000070018000000000012000c000000000002000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000960096007d0000000000000000000000000000000000000000000000466565646261636b2031207479706500
+ 020005001800000011000000000000000000000000000000000000000000000023400282000000000c000c0001000000f4012c01bc02000056656c6f63697479206f6273657276657200
+
+
+ UINT
+
+
+ DINT
+
+
+ DINT
+
+
+
+
+ UINT
+
+
+ DINT
+
+
+ DINT
+
+
+
+
+ UINT
+
+
+ DINT
+
+
+
+
+ UINT
+
+
+ DINT
+
+
+
+
+
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeC/Links.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeC/Links.xml
new file mode 100644
index 0000000..f06268a
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeC/Links.xml
@@ -0,0 +1,72 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeC/LinksOld.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeC/LinksOld.xml
new file mode 100644
index 0000000..3e8f680
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeC/LinksOld.xml
@@ -0,0 +1,68 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeC/POUs/Axis/FB_AX5000Axis.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeC/POUs/Axis/FB_AX5000Axis.xml
new file mode 100644
index 0000000..9503404
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeC/POUs/Axis/FB_AX5000Axis.xml
@@ -0,0 +1,79 @@
+ iDiagNumber
+ );
+ eCurState := eAxisState_Idle;
+ END_IF
+
+END_CASE
+
+M_HardwareDiag := eCurState <> eAxisState_Idle;
+bExecHWDiag_ := bExecute;
+]]> eAxisState_Idle;
+bExecHWRes_ := bExecute;]]>
\ No newline at end of file
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeC/POUs/Axis/FB_NcAxis.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeC/POUs/Axis/FB_NcAxis.xml
new file mode 100644
index 0000000..517b128
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeC/POUs/Axis/FB_NcAxis.xml
@@ -0,0 +1,213 @@
+ 0);
+]]> overwrite method if necessary
+CASE eCurState OF
+eAxisState_Idle:
+ IF bExecute AND NOT bExecHWDiag_ THEN
+ eCurState := eAxisState_Diag;
+ END_IF
+
+eAxisState_Diag:
+ eCurState := eAxisState_Idle;
+
+END_CASE
+
+M_HardwareDiag := eCurState <> eAxisState_Idle;
+bExecHWDiag_ := bExecute;
+
+]]> bDone, Busy => bBusy,
+ Active => bActive, Error => bError, ErrorID => iErrorId
+ );
+ eCurState := eAxisState_Move;
+
+ eCmd_MoveModulo:
+ fbMcMoveMod(
+ Execute := bExecute, Position:= fPosition, Velocity:= fVelocity,
+ Axis := sAxis, Done => bDone, Busy => bBusy,
+ Active => bActive, Error => bError, ErrorID => iErrorId
+ );
+ eCurState := eAxisState_Move;
+
+ eCmd_MoveRelative:
+ fbMcMoveRel(
+ Execute := bExecute, Distance:= fPosition, Velocity:= fVelocity,
+ Axis := sAxis, Done => bDone, Busy => bBusy,
+ Active => bActive, Error => bError, ErrorID => iErrorId
+ );
+ eCurState := eAxisState_Move;
+
+ eCmd_MoveVelocity:
+ fbMcMoveVel(
+ Execute := bExecute, Velocity:= fVelocity, Axis := sAxis,
+ InVelocity=> bDone, Busy => bBusy, Active => bActive,
+ Error => bError, ErrorID => iErrorId, Busy => bBusy,
+ Active => bActive, Error => bError, ErrorID => iErrorId
+ );
+ eCurState := eAxisState_Move;
+ END_CASE
+ END_IF
+
+eAxisState_Move:
+ CASE eMoveCmd OF
+ eCmd_MoveAbsolute:
+ fbMcMoveAbs(
+ Execute := TRUE, Position:= fPosition, Velocity:= fVelocity,
+ Axis := sAxis, Done => bDone, Busy => bBusy,
+ Active => bActive, Error => bError, ErrorID => iErrorId
+ );
+ IF bDone OR bError THEN
+ fbMcMoveAbs(Execute := FALSE,Axis := sAxis);
+ eCurState := eAxisState_Idle;
+ END_IF
+
+ eCmd_MoveModulo:
+ fbMcMoveMod(
+ Execute := TRUE, Position:= fPosition, Velocity:= fVelocity,
+ Axis := sAxis, Done => bDone, Busy => bBusy,
+ Active => bActive, Error => bError, ErrorID => iErrorId
+ );
+ IF bDone OR bError THEN
+ fbMcMoveMod(Execute := FALSE,Axis := sAxis);
+ eCurState := eAxisState_Idle;
+ END_IF
+
+ eCmd_MoveRelative:
+ fbMcMoveRel(
+ Execute := TRUE, Distance:= fPosition, Velocity:= fVelocity,
+ Axis := sAxis, Done => bDone, Busy => bBusy,
+ Active => bActive, Error => bError, ErrorID => iErrorId
+ );
+ IF bDone OR bError THEN
+ fbMcMoveRel(Execute := FALSE,Axis := sAxis);
+ eCurState := eAxisState_Idle;
+ END_IF
+
+ eCmd_MoveVelocity:
+ fbMcMoveVel(
+ Execute := TRUE, Velocity:= fVelocity, Axis := sAxis,
+ InVelocity=> bDone, Busy => bBusy, Active => bActive,
+ Error => bError, ErrorID => iErrorId, Busy => bBusy,
+ Active => bActive, Error => bError, ErrorID => iErrorId
+ );
+ IF bDone OR bError THEN
+ fbMcMoveVel(Execute := FALSE,Axis := sAxis);
+ eCurState := eAxisState_Idle;
+ END_IF
+ END_CASE
+END_CASE
+
+M_Move := (eCurState <> eAxisState_Idle);
+bExecMove_ := bExecute;]]> bDone,
+ Busy => bBusy, Error => bError, ErrorID => iErrorId
+ );
+ eCurState := eAxisState_Reset;
+ END_IF
+
+eAxisState_Reset:
+ fbMcReset(
+ Execute := FALSE, Axis := sAxis, Done => bDone,
+ Busy => bBusy, Error => bError, ErrorID => iErrorId
+ );
+ IF fbMcReset.Done OR fbMcReset.Error THEN
+ eCurState := eAxisState_Idle;
+ END_IF
+END_CASE
+
+M_Reset := eCurState <> eAxisState_Idle;
+bExecReset_ := bExecute;]]> overwrite method if necessary
+CASE eCurState OF
+eAxisState_Idle:
+ IF bExecute AND NOT bExecHWRes_ THEN
+ eCurState := eAxisState_Reset;
+ END_IF
+
+eAxisState_Reset:
+ eCurState := eAxisState_Idle;
+
+END_CASE
+
+M_HardwareReset := eCurState <> eAxisState_Idle;
+bExecHWRes_ := bExecute;]]>
\ No newline at end of file
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeC/POUs/Axis/IAxis.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeC/POUs/Axis/IAxis.xml
new file mode 100644
index 0000000..65a5d5c
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeC/POUs/Axis/IAxis.xml
@@ -0,0 +1,35 @@
+
\ No newline at end of file
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeC/POUs/FB_Table.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeC/POUs/FB_Table.xml
new file mode 100644
index 0000000..5715a30
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeC/POUs/FB_Table.xml
@@ -0,0 +1,127 @@
+
\ No newline at end of file
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeC/POUs/MAIN.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeC/POUs/MAIN.xml
new file mode 100644
index 0000000..5d167f2
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/MachineTypeC/POUs/MAIN.xml
@@ -0,0 +1,49 @@
+
\ No newline at end of file
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/PouProgramCFC.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/PouProgramCFC.xml
new file mode 100644
index 0000000..4daade8
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/PouProgramCFC.xml
@@ -0,0 +1,1930 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ eOperation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ functionblock
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ eOp_Mul
+
+
+
+
+
+
+
+
+
+
+
+
+ eOperation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Timer.Q
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ eOp_Sub
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ eOperationPrev
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ eOp_Sub
+
+
+
+
+
+
+
+
+
+
+
+
+ eOperation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Timer.Q
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ eOp_Add
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ eOperationPrev
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ eOp_Add
+
+
+
+
+
+
+
+
+
+
+
+
+ eOperation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Timer.Q
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ eOp_Mul
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ eOperationPrev
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Timer.Q
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ tTimerValue
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ functionblock
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ bZero
+
+
+
+
+
+
+
+
+
+
+
+
+ bPos
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ bNeg
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ iResultC
+
+
+
+
+
+
+
+
+
+
+
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Timer.ET
+
+
+
+
+
+
+
+
+
+
+
+
+ T#500ms
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ bTest
+
+
+
+
+
+ Timer
+
+
+
+
+
+
+
+
+
+
+
+
+ State
+ machine
+
+
+
+
+
+
+
+
+ eOperation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ eOperation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ eOperation
+
+
+
+
+
+
+
+
+
+
+
+ FB
+ Call
+
+
+
+
+
+
+
+
+
+ eOperationPrev
+
+
+
+
+
+
+
+ iResultC
+
+
+
+
+
+
+
+ bZero
+
+
+
+
+
+
+
+ bPos
+
+
+
+
+
+
+
+ bNeg
+
+
+
+
+
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/PouProgramFbd.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/PouProgramFbd.xml
new file mode 100644
index 0000000..91b9918
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/PouProgramFbd.xml
@@ -0,0 +1,1280 @@
+
+
+
+
+
+
+
+
+
+
+
+ bZero
+
+
+
+
+ bPos
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+ bPos
+
+
+
+
+ bNeg
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+ Timer.ET
+
+
+
+
+ TIME#500ms
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+ iResultC
+
+
+
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+ Timer.ET
+
+
+
+
+ TIME#500ms
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+ bTest
+
+
+
+
+
+ Timer
+
+
+
+
+
+ Timer.Q
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+ tTimerValue
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ functionblock
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+ State
+ machine
+
+
+
+
+
+ eOperation
+
+
+
+
+ eOp_Add
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+ Timer.Q
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+ eOperation
+
+
+
+
+ eOp_Mul
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+ eOperation
+
+
+
+
+ eOp_Mul
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+ eOperation
+
+
+
+
+ eOperationPrev
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+ eOperation
+
+
+
+
+ eOp_Sub
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+ Timer.Q
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+ eOperation
+
+
+
+
+ eOp_Add
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+ eOperation
+
+
+
+
+ eOp_Add
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+ eOperation
+
+
+
+
+ eOperationPrev
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+ eOperation
+
+
+
+
+ eOp_Mul
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+ Timer.Q
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+ eOperation
+
+
+
+
+ eOp_Sub
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+ eOperation
+
+
+
+
+ eOp_Sub
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+ eOperation
+
+
+
+
+ eOperationPrev
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+ FB
+ Call
+
+
+
+
+
+
+ eOperation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ functionblock
+
+
+
+
+
+
+
+
+ iResultC
+
+
+
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+ bZero
+
+
+
+
+ iResultC
+
+
+
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+ bPos
+
+
+
+
+ iResultC
+
+
+
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+ bNeg
+
+
+
+
+ eOperation
+
+
+
+
+
+
+ eOperationPrev
+
+
+
+
+
+
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/PouProgramLd.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/PouProgramLd.xml
new file mode 100644
index 0000000..1cdb97e
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/PouProgramLd.xml
@@ -0,0 +1,1324 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ networktitle
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Timer.ET
+
+
+
+
+ TIME#500ms
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ bTemp1
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ networktitle
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ iResultC
+
+
+
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ bTemp2
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ networktitle
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Timer.ET
+
+
+
+
+ TIME#500ms
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ bTemp3
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ networktitle
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Timer
+
+
+
+
+
+
+
+
+
+ networktitle
+
+
+
+
+
+
+ Timer.Q
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+ tTimerValue
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ functionblock
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+ State
+ machine
+
+
+
+
+
+
+
+
+
+ networktitle
+
+
+
+
+
+
+ eOperation
+
+
+
+
+ eOp_Add
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+ Timer.Q
+
+
+
+
+ eOperation
+
+
+
+
+ eOp_Mul
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+ eOperation
+
+
+
+
+ eOp_Mul
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+ eOperation
+
+
+
+
+ eOperationPrev
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ networktitle
+
+
+
+
+
+
+ eOperation
+
+
+
+
+ eOp_Sub
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+ Timer.Q
+
+
+
+
+ eOperation
+
+
+
+
+ eOp_Add
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+ eOperation
+
+
+
+
+ eOp_Add
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+ eOperation
+
+
+
+
+ eOperationPrev
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ networktitle
+
+
+
+
+
+
+ eOperation
+
+
+
+
+ eOp_Mul
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+ Timer.Q
+
+
+
+
+ eOperation
+
+
+
+
+ eOp_Sub
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+ eOperation
+
+
+
+
+ eOp_Sub
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+ eOperation
+
+
+
+
+ eOperationPrev
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+ FB
+ Call
+
+
+
+
+
+
+
+
+
+
+ networktitle
+
+
+
+
+
+
+ eOperation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ functionblock
+
+
+
+
+
+
+ iResultC
+
+
+
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ networktitle
+
+
+
+
+
+
+ iResultC
+
+
+
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ networktitle
+
+
+
+
+
+
+ iResultC
+
+
+
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ operator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ networktitle
+
+
+
+
+
+
+ eOperation
+
+
+
+
+
+
+ eOperationPrev
+
+
+
+
+
+
+
+ 2
+
+
+
+
+
+
+ 3
+
+
+
+
+
+
+ 4
+
+
+
+
+
+
+ 7
+
+
+
+
+
+
+ 7
+
+
+
+
+
+
+ 8
+
+
+
+
+
+
+ 8
+
+
+
+
+
+
+ 9
+
+
+
+
+
+
+ 9
+
+
+
+
+
+
+
+
+
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/PouProgramSfc.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/PouProgramSfc.xml
new file mode 100644
index 0000000..ea16b29
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/PouProgramSfc.xml
@@ -0,0 +1,648 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Init
+
+ TRUE
+
+ Init_Action
+
+ FALSE
+
+ 0
+
+
+
+
+
+
+
+ TRUE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ TRUE
+
+ FALSE
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ TRUE
+
+ FALSE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CallFB
+
+ FALSE
+
+ FALSE
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A_CallFB
+
+ N
+
+ FALSE
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Evaluate
+
+ FALSE
+
+ FALSE
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A_Evaluate
+
+ N
+
+ FALSE
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ TRUE
+
+ FALSE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Wait
+
+ FALSE
+
+ FALSE
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A_Wait
+
+ N
+
+ FALSE
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Test
+
+ FALSE
+
+ FALSE
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A_Test
+
+ N
+
+ FALSE
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Timer.Q
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Timer.Q
+
+ FALSE
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ StateMachine
+
+ FALSE
+
+ FALSE
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A_StateMachine
+
+ N
+
+ FALSE
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Timer.Q
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Timer.Q
+
+ FALSE
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Init
+
+ FALSE
+
+
+
+
+
+
+
+
+
+ iResultC
+);
+
+]]>
+
+
+
+
+
+
+ 0 THEN
+ bZero := FALSE;
+ bPos := TRUE;
+ bNeg := FALSE;
+ELSIF fbSFC_SamplePOU.iResultC < 0 THEN
+ bZero := FALSE;
+ bPos := FALSE;
+ bNeg := TRUE;
+END_IF]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ TIME#500MS) AND (iResultC <= 0)) OR (Timer.ET <= TIME#500MS);
+]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ IecSfc
+ System
+ 3.4.2.0
+ IecSfc
+
+
+
+ CurrentStep
+
+
+ True
+
+
+
+
+ EnableLimit
+
+
+ True
+
+
+
+
+ Error
+
+
+ True
+
+
+
+
+ ErrorPOU
+
+
+ True
+
+
+
+
+ ErrorStep
+
+
+ True
+
+
+
+
+ Init
+
+
+ True
+
+
+
+
+ Pause
+
+
+ True
+
+
+
+
+ QuitError
+
+
+ True
+
+
+
+
+ Reset
+
+
+ True
+
+
+
+
+ Tip
+
+
+ True
+
+
+
+
+ TipMode
+
+
+ True
+
+
+
+
+ Trans
+
+
+ True
+
+
+
+
+ False
+
+
+
+
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/PouProgramSt.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/PouProgramSt.xml
new file mode 100644
index 0000000..bcc98b5
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationBins/Templates/TC3-AV09-IEC_TG/PouProgramSt.xml
@@ -0,0 +1,65 @@
+
+
+
+
+
+
+
+
+ TIME#500MS) AND (iResultC <= 0)) OR (Timer.ET <= TIME#500MS);
+
+
+(* Timer *)
+Timer(IN := TRUE, PT := tTimerValue);
+IF Timer.Q THEN
+ Timer(IN := FALSE);
+
+ (* State machine *)
+ CASE eOperation OF
+ eOp_Add:
+ eOperation := eOp_MUL;
+ eOp_Sub:
+ eOperation := eOp_ADD;
+ eOp_Mul:
+ eOperation := eOp_SUB;
+ END_CASE
+END_IF
+
+(* FB Call *)
+fbST_SamplePOU(
+ eOperation := eOperation,
+ iResultC => iResultC
+);
+
+(* Evaluation *)
+IF fbST_SamplePOU.iResultC = 0 THEN
+ bZero := TRUE;
+ bPos := FALSE;
+ bNeg := FALSE;
+ELSIF fbST_SamplePOU.iResultC > 0 THEN
+ bZero := FALSE;
+ bPos := TRUE;
+ bNeg := FALSE;
+ELSIF fbST_SamplePOU.iResultC < 0 THEN
+ bZero := FALSE;
+ bPos := FALSE;
+ bNeg := TRUE;
+END_IF]]>
+
+
+
+
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationDemo.sln b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationDemo.sln
new file mode 100644
index 0000000..fe5de9c
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationDemo.sln
@@ -0,0 +1,48 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2013
+VisualStudioVersion = 12.0.30501.0
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ScriptingTestContainerBase", "ScriptingTestContainerBase\ScriptingTestContainerBase.csproj", "{84BF2917-6A6E-45B9-B1BB-3FB86C57756D}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeGenerationDemo", "CodeGenerationDemo\CodeGenerationDemo.csproj", "{793BC15F-83EC-4670-A3BE-3005E9D27EC4}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
+ Release|Any CPU = Release|Any CPU
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {84BF2917-6A6E-45B9-B1BB-3FB86C57756D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {84BF2917-6A6E-45B9-B1BB-3FB86C57756D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {84BF2917-6A6E-45B9-B1BB-3FB86C57756D}.Debug|x64.ActiveCfg = Debug|x64
+ {84BF2917-6A6E-45B9-B1BB-3FB86C57756D}.Debug|x64.Build.0 = Debug|x64
+ {84BF2917-6A6E-45B9-B1BB-3FB86C57756D}.Debug|x86.ActiveCfg = Debug|x86
+ {84BF2917-6A6E-45B9-B1BB-3FB86C57756D}.Debug|x86.Build.0 = Debug|x86
+ {84BF2917-6A6E-45B9-B1BB-3FB86C57756D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {84BF2917-6A6E-45B9-B1BB-3FB86C57756D}.Release|Any CPU.Build.0 = Release|Any CPU
+ {84BF2917-6A6E-45B9-B1BB-3FB86C57756D}.Release|x64.ActiveCfg = Release|x64
+ {84BF2917-6A6E-45B9-B1BB-3FB86C57756D}.Release|x64.Build.0 = Release|x64
+ {84BF2917-6A6E-45B9-B1BB-3FB86C57756D}.Release|x86.ActiveCfg = Release|x86
+ {84BF2917-6A6E-45B9-B1BB-3FB86C57756D}.Release|x86.Build.0 = Release|x86
+ {793BC15F-83EC-4670-A3BE-3005E9D27EC4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {793BC15F-83EC-4670-A3BE-3005E9D27EC4}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {793BC15F-83EC-4670-A3BE-3005E9D27EC4}.Debug|x64.ActiveCfg = Debug|x64
+ {793BC15F-83EC-4670-A3BE-3005E9D27EC4}.Debug|x64.Build.0 = Debug|x64
+ {793BC15F-83EC-4670-A3BE-3005E9D27EC4}.Debug|x86.ActiveCfg = Debug|x86
+ {793BC15F-83EC-4670-A3BE-3005E9D27EC4}.Debug|x86.Build.0 = Debug|x86
+ {793BC15F-83EC-4670-A3BE-3005E9D27EC4}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {793BC15F-83EC-4670-A3BE-3005E9D27EC4}.Release|Any CPU.Build.0 = Release|Any CPU
+ {793BC15F-83EC-4670-A3BE-3005E9D27EC4}.Release|x64.ActiveCfg = Release|x64
+ {793BC15F-83EC-4670-A3BE-3005E9D27EC4}.Release|x64.Build.0 = Release|x64
+ {793BC15F-83EC-4670-A3BE-3005E9D27EC4}.Release|x86.ActiveCfg = Release|x86
+ {793BC15F-83EC-4670-A3BE-3005E9D27EC4}.Release|x86.Build.0 = Release|x86
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationDemo/App.xaml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationDemo/App.xaml
new file mode 100644
index 0000000..b9c1cb7
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationDemo/App.xaml
@@ -0,0 +1,8 @@
+
+
+
+
+
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationDemo/App.xaml.cs b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationDemo/App.xaml.cs
new file mode 100644
index 0000000..036307e
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationDemo/App.xaml.cs
@@ -0,0 +1,16 @@
+using System;
+using System.Collections.Generic;
+using System.Configuration;
+using System.Data;
+using System.Linq;
+using System.Windows;
+
+namespace CodeGenerationDemo
+{
+ ///
+ /// Interaction logic for App.xaml
+ ///
+ public partial class App : Application
+ {
+ }
+}
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationDemo/CodeGenerationDemo.csproj b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationDemo/CodeGenerationDemo.csproj
new file mode 100644
index 0000000..59fbd27
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationDemo/CodeGenerationDemo.csproj
@@ -0,0 +1,564 @@
+
+
+
+ Debug
+ x86
+ 8.0.30703
+ 2.0
+ {793BC15F-83EC-4670-A3BE-3005E9D27EC4}
+ WinExe
+ Properties
+ CodeGenerationDemo
+ CodeGenerationDemo
+ v4.0
+
+
+ 512
+ {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ 4
+
+
+ x86
+ true
+ full
+ false
+ ..\Binaries\CodeGenerationBins\
+ DEBUG;TRACE
+ prompt
+ 4
+ true
+
+
+ x86
+ pdbonly
+ true
+ ..\Binaries\CodeGenerationBins\
+ TRACE
+ prompt
+ 4
+ true
+
+
+ true
+ ..\Binaries\CodeGenerationBins\
+ DEBUG;TRACE
+ full
+ AnyCPU
+ prompt
+ true
+ true
+ true
+
+
+ ..\Binaries\CodeGenerationBins\
+ TRACE
+ true
+ pdbonly
+ AnyCPU
+ prompt
+ true
+ true
+ true
+
+
+ true
+ ..\Binaries\CodeGenerationBins\
+ DEBUG;TRACE
+ full
+ x64
+ prompt
+ true
+ true
+ true
+
+
+ ..\Binaries\CodeGenerationBins\
+ TRACE
+ true
+ pdbonly
+ x64
+ prompt
+ true
+ true
+ true
+ true
+
+
+
+ False
+ ..\..\..\..\..\..\..\..\Program Files (x86)\Common Files\Microsoft Shared\MSEnv\PublicAssemblies\envdte.dll
+
+
+ False
+ ..\..\..\..\..\..\..\..\Program Files (x86)\Common Files\Microsoft Shared\MSEnv\PublicAssemblies\envdte100.dll
+
+
+ False
+
+
+ False
+ ..\..\..\..\..\..\..\..\Program Files (x86)\Common Files\Microsoft Shared\MSEnv\PublicAssemblies\envdte90.dll
+
+
+ False
+ ..\..\..\..\..\..\..\..\Program Files (x86)\Common Files\Microsoft Shared\MSEnv\PublicAssemblies\envdte90a.dll
+
+
+
+
+
+
+
+
+
+ 4.0
+
+
+ ..\SDK\TwinCAT.Measurement.AutomationInterface.dll
+
+
+ False
+ ..\Binaries\CodeGenerationBins\TwinCAT.Scope2.Communications.dll
+
+
+
+
+
+
+
+ MSBuild:Compile
+ Designer
+
+
+
+
+
+ Designer
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ Always
+
+
+ Always
+
+
+ Always
+
+
+ Always
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+
+ Always
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ MSBuild:Compile
+ Designer
+
+
+ App.xaml
+ Code
+
+
+
+
+
+ MainWindow.xaml
+ Code
+
+
+
+
+ Code
+
+
+ True
+ True
+ Resources.resx
+
+
+ True
+ Settings.settings
+ True
+
+
+ ResXFileCodeGenerator
+ Resources.Designer.cs
+
+
+ SettingsSingleFileGenerator
+ Settings.Designer.cs
+
+
+
+
+
+ Always
+
+
+ Always
+
+
+ Always
+
+
+
+
+ {84BF2917-6A6E-45B9-B1BB-3FB86C57756D}
+ ScriptingTestContainerBase
+
+
+
+
+
+
+
+
+
+ {3C49D6C3-93DC-11D0-B162-00A0248C244B}
+ 2
+ 1
+ 0
+ primary
+ False
+ False
+
+
+
+
+
\ No newline at end of file
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationDemo/CodeGenerationScript.cs b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationDemo/CodeGenerationScript.cs
new file mode 100644
index 0000000..dc680bd
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationDemo/CodeGenerationScript.cs
@@ -0,0 +1,599 @@
+using System;
+using System.IO;
+using EnvDTE;
+using EnvDTE100;
+using EnvDTE80;
+using TCatSysManagerLib;
+using TwinCAT.SystemManager;
+using System.Diagnostics;
+using System.Timers;
+using ScriptingTest;
+using System.Xml;
+using System.Collections.Generic;
+using System.Reflection;
+using Scripting.CSharp;
+
+namespace CodeGenerationDemo
+{
+ ///
+ /// Demonstrates the generation + compilation of PLC projects
+ ///
+ public abstract class CodeGenerationBaseScript
+ : ScriptEarlyBound
+ {
+ protected ITcSysManager4 systemManager = null;
+ protected Project project = null;
+
+ ///
+ /// Handler function Initializing the Script (Configuration preparations)
+ ///
+ ///
+ /// Usually used to to the open a prepared or new XAE configuration
+ protected override void OnInitialize(IContext context)
+ {
+ base.OnInitialize(context);
+ }
+
+ protected override void OnSolutionCreated()
+ {
+ string projectTemplate = null;
+
+ if (string.IsNullOrEmpty(_context.ProjectTemplate))
+ projectTemplate = VsXaeTemplatePath;
+ else
+ projectTemplate = Path.Combine(ApplicationDirectory, _context.ProjectTemplate);
+
+ bool exists = File.Exists(projectTemplate);
+
+ this.project = (Project)CreateNewProject(this.ScriptName, projectTemplate);
+ this.systemManager = (ITcSysManager4)project.Object;
+ //base.OnSolutionCreated();
+ }
+
+ ///
+ /// Cleaning up the XAE configuration after script execution.
+ ///
+ /// The worker.
+ protected override void OnCleanUp(IWorker worker)
+ {
+ base.OnCleanUp(worker);
+ }
+
+ ///
+ /// Insertion Mode for creating PLC projects.
+ ///
+ public enum CreatePlcMode
+ {
+ ///
+ /// Copies a PLC Project
+ ///
+ Copy = 0,
+ ///
+ /// Moves a PLC Project
+ ///
+ Move = 1,
+ ///
+ /// References a PLC Project
+ ///
+ Reference = 2
+ }
+
+ public override string Description
+ {
+ get { return this.ScriptName; }
+ }
+
+ protected void CreateMotion(IWorker worker)
+ {
+ if (worker.CancellationPending)
+ throw new Exception("Execution cancelled!");
+
+ OrderScriptContext context = (OrderScriptContext)_context;
+ ConfigurationInfo configurationInfo = context.Order.ConfigurationInfo;
+
+ ITcSmTreeItem ncConfig = systemManager.LookupTreeItem("TINC");
+
+ foreach (TaskInfo taskInfo in configurationInfo.MotionTasks)
+ {
+ ITcSmTreeItem task = null;
+
+ worker.ProgressStatus = string.Format("Creating Motion Task '{0}'", taskInfo.Name);
+
+ if (!TryLookupChild(ncConfig, taskInfo.Name, out task))
+ {
+ task = ncConfig.CreateChild(taskInfo.Name, 1);
+ }
+ ITcSmTreeItem axes = null;
+ TryLookupChild(task, "Axes", out axes);
+
+ if (axes == null)
+ TryLookupChild(task, "Achsen", out axes);
+
+ foreach (AxisInfo axisInfo in taskInfo.Axes)
+ {
+ if (worker.CancellationPending)
+ throw new Exception("Execution cancelled!");
+
+ ITcSmTreeItem axis = null;
+ worker.ProgressStatus = string.Format("Creating Axis '{0}'", axisInfo.Name);
+
+ if (!TryLookupChild(axes, axisInfo.Name, out axis))
+ {
+ axis = axes.CreateChild(axisInfo.Name, 1);
+ ConsumeTemplate(axis, axisInfo.TemplatePath);
+ }
+ }
+ }
+ }
+
+ protected void CreateMappings(IWorker worker)
+ {
+ OrderScriptContext context = (OrderScriptContext)_context;
+ ConfigurationInfo configurationInfo = context.Order.ConfigurationInfo;
+
+ MappingsInfo info = configurationInfo.Mappings;
+
+ if (info != null)
+ {
+ if (worker.CancellationPending)
+ throw new Exception("Execution cancelled!");
+
+ worker.ProgressStatus = "Generating mappings ...";
+ ConsumeMappings(info.TemplatePath);
+ }
+ }
+
+ protected ITcSmTreeItem CreatePlcProject(IWorker worker)
+ {
+ if (worker.CancellationPending)
+ throw new Exception("Execution cancelled!");
+
+ OrderScriptContext context = (OrderScriptContext)_context;
+ ConfigurationInfo configurationInfo = context.Order.ConfigurationInfo;
+
+ string plcProjectName = configurationInfo.PlcProjectName;
+ ITcSmTreeItem plcConfig = systemManager.LookupTreeItem("TIPC");
+
+ worker.ProgressStatus = string.Format("Creating empty PLC Project '{0}' ...",plcProjectName);
+ ITcSmTreeItem plcProjectRoot = plcConfig.CreateChild(plcProjectName, 0, "", vsXaePlcEmptyTemplateName);
+
+ ITcPlcProject plcProjectRootIec = (ITcPlcProject) plcProjectRoot;
+ plcProjectRootIec.BootProjectAutostart = true;
+ plcProjectRootIec.GenerateBootProject(true);
+
+ ITcSmTreeItem plcProject = plcProjectRoot.LookupChild(plcProjectName + " Project");
+
+ foreach (PlcObjectInfo plcObjectInfo in context.Order.ConfigurationInfo.PlcObjects)
+ {
+ if (worker.CancellationPending)
+ throw new Exception("Execution cancelled!");
+
+ switch (plcObjectInfo.Type)
+ {
+ case PlcObjectType.DataType:
+ createWorksheet((WorksheetInfo)plcObjectInfo, plcProject, worker);
+ break;
+ case PlcObjectType.Library:
+ createLibrary((LibraryInfo)plcObjectInfo,plcProject, worker);
+ break;
+ case PlcObjectType.Placeholder:
+ createPlaceholder((PlaceholderInfo)plcObjectInfo, plcProject, worker);
+ break;
+ case PlcObjectType.POU:
+ createWorksheet((WorksheetInfo)plcObjectInfo, plcProject, worker);
+ break;
+ case PlcObjectType.Itf:
+ createWorksheet((WorksheetInfo)plcObjectInfo, plcProject, worker);
+ break;
+ case PlcObjectType.Gvl:
+ createWorksheet((WorksheetInfo)plcObjectInfo, plcProject, worker);
+ break;
+ default:
+ Debug.Fail("");
+ break;
+ }
+ }
+
+ ITcSmTreeItem realtimeTasks = systemManager.LookupTreeItem("TIRT");
+ ITcSmTreeItem rtTask = realtimeTasks.CreateChild("PlcTask", TreeItemType.Task.AsInt32());
+
+ ITcSmTreeItem taskRef = null;
+ worker.ProgressStatus = "Linking PLC instance with task 'PlcTask' ...";
+
+ if (!TryLookupChild(plcProject, "PlcTask", out taskRef))
+ {
+ if (worker.CancellationPending)
+ throw new Exception("Execution cancelled!");
+
+ taskRef = plcProject.CreateChild("PlcTask", TreeItemType.PlcTask.AsInt32(), "", "MAIN");
+ }
+
+ //foreach (ITcSmTreeItem prog in taskRef)
+ //{
+ // string name = prog.Name;
+ //}
+
+ //ErrorItems errors;
+
+ //if (worker.CancellationPending)
+ // throw new Exception("Execution cancelled!");
+
+ //bool ok = CompileProject(worker, out errors);
+
+ //if (!ok)
+ // throw new ApplicationException(string.Format("Plc Project compile produced '{0}' errors. Please see Visual Studio Error Window for details.!", plcProject.Name));
+
+ return plcProject;
+ }
+
+ private ITcSmTreeItem createWorksheet(WorksheetInfo info, ITcSmTreeItem plcProject, IWorker worker)
+ {
+ string[] plcSide = info.PlcPath.Split('/','\\','^');
+
+ ITcSmTreeItem parent = plcProject;
+ ITcSmTreeItem ret = null;
+
+ for (int index = 0; index < plcSide.Length; index++)
+ {
+ // Create Folder if not exist
+ ITcSmTreeItem child = null;
+
+ if (!TryLookupChild(parent, plcSide[index], out child))
+ {
+ child = createPlcFolder(parent, plcSide[index], null, worker);
+ }
+ parent = child;
+ }
+
+ ret = createWorksheet2(info, parent, worker);
+ return ret;
+ }
+
+ private void createLibrary(LibraryInfo info, ITcSmTreeItem plcProject, IWorker worker)
+ {
+ worker.ProgressStatus = string.Format("Adding Library '{0}' ...", info.LibraryName);
+
+ ITcSmTreeItem referencesItem = plcProject.LookupChild("References");
+ ITcPlcLibraryManager libraryManager = (ITcPlcLibraryManager)referencesItem;
+ libraryManager.AddLibrary(info.LibraryName);
+ }
+
+ private void createPlaceholder(PlaceholderInfo info, ITcSmTreeItem plcProject, IWorker worker)
+ {
+ worker.ProgressStatus = string.Format("Adding Placeholder '{0}' ...", info.PlaceholderName);
+
+ ITcSmTreeItem referencesItem = plcProject.LookupChild("References");
+ ITcPlcLibraryManager libraryManager = (ITcPlcLibraryManager)referencesItem;
+ libraryManager.AddPlaceholder(info.PlaceholderName);
+ }
+
+
+ protected ITcSmTreeItem CreateHardware(IWorker worker, bool scanHardware, bool simulation)
+ {
+ OrderScriptContext context = (OrderScriptContext)_context;
+ ConfigurationInfo configurationInfo = context.Order.ConfigurationInfo;
+ HardwareInfo hardware = configurationInfo.Hardware;
+
+ ITcSmTreeItem devices = systemManager.LookupTreeItem("TIID"); // Getting IO-Configuration
+ ITcSmTreeItem device = null;
+
+ if (worker.CancellationPending)
+ throw new Exception("Execution cancelled!");
+
+ // Scans the Fieldbus interfaces and adds an EtherCAT Device.
+ string deviceName = "EtherCAT Master";
+ worker.ProgressStatus = string.Format("Creating device '{0}'", deviceName);
+ device = Helper.CreateEthernetDevice(this.systemManager, DeviceType.EtherCAT_DirectMode, deviceName, worker);
+
+ ITcSmTreeItem parent = device;
+
+ foreach (BoxInfo boxInfo in hardware.Boxes)
+ {
+ if (worker.CancellationPending)
+ throw new Exception("Execution cancelled!");
+
+ ITcSmTreeItem box = CreateBox(parent, boxInfo, worker);
+ }
+
+ return device;
+ }
+
+ private ITcSmTreeItem CreateBox(ITcSmTreeItem parent, BoxInfo boxInfo, IWorker worker)
+ {
+ worker.ProgressStatus = string.Format("Creating Box '{0}' ({1})...", boxInfo.Name,boxInfo.Type);
+ ITcSmTreeItem ret = parent.CreateChild(boxInfo.Name, (int)BoxType.EtherCAT_EXXXXX, "", boxInfo.Type);
+
+ if (boxInfo.ChildBoxes != null)
+ {
+ foreach (BoxInfo child in boxInfo.ChildBoxes)
+ {
+ ITcSmTreeItem tcChild = CreateBox(ret, child, worker);
+ }
+
+ }
+
+ return ret;
+ }
+
+ #region Helpers
+ private ITcSmTreeItem createPlcFolder(ITcSmTreeItem parent, string folderName, string before, IWorker worker)
+ {
+ worker.ProgressStatus = string.Format("Creating Folder '{0}' ...", folderName);
+ ITcSmTreeItem item = parent.CreateChild(folderName, TreeItemType.PlcFolder.AsInt32(), before, null);
+ return item;
+ }
+
+ private ITcSmTreeItem createWorksheet2(WorksheetInfo info, ITcSmTreeItem parent, IWorker worker)
+ {
+ string template = Path.Combine(ApplicationDirectory, info.TemplatePath);
+
+ XmlDocument doc = new XmlDocument();
+ doc.Load(template);
+
+ ITcSmTreeItem ret = null;
+
+ switch (info.Type)
+ {
+ case PlcObjectType.DataType:
+ ret = createDut((DataTypeInfo)info,parent, worker, doc);
+ break;
+ case PlcObjectType.POU:
+ ret = createPou((POUInfo)info, parent, worker, doc);
+ break;
+ case PlcObjectType.Itf:
+ ret = createItf((ItfInfo)info,parent, worker, doc);
+ break;
+ case PlcObjectType.Gvl:
+ ret = createGvl((GvlInfo)info,parent,worker,doc);
+ break;
+ default:
+ Debug.Fail("");
+ break;
+ }
+
+ return ret;
+ }
+
+ private ITcSmTreeItem createPou(POUInfo pouInfo, ITcSmTreeItem parent, IWorker worker, XmlDocument doc)
+ {
+ XmlNode pouNode = doc.SelectSingleNode("TcPlcObject/POU");
+ string pouName = pouNode.Attributes["Name"].Value;
+
+ worker.ProgressStatus = string.Format("Creating POU '{0}' ...", pouName);
+
+ ITcSmTreeItem item = null;
+
+ if (!TryLookupChild(parent, pouName, out item))
+ {
+ item = parent.CreateChild(pouName, TreeItemType.PlcPouFunctionBlock.AsInt32(),"",null);
+ }
+ ITcPlcPou pou = (ITcPlcPou)item;
+
+ pou.DocumentXml = doc.OuterXml;
+ return item;
+ }
+
+ private ITcSmTreeItem createItf(ItfInfo itfInfo, ITcSmTreeItem parent, IWorker worker, XmlDocument doc)
+ {
+ XmlNode itfNode = doc.SelectSingleNode("TcPlcObject/Itf");
+ string itfName = itfNode.Attributes["Name"].Value;
+
+ worker.ProgressStatus = string.Format("Creating Interface '{0}' ...", itfName);
+
+ ITcSmTreeItem item = null;
+ XmlElement node = (XmlElement)doc.SelectSingleNode("TcPlcObject/Itf/Declaration");
+
+ string declString = node.InnerText;
+
+ if (!TryLookupChild(parent, itfName, out item))
+ {
+ item = parent.CreateChild(itfName, TreeItemType.PlcInterface.AsInt32(),"",declString);
+ }
+
+ //Debug.Fail("");
+ ITcXmlDocument xmlDoc = (ITcXmlDocument)item;
+ xmlDoc.DocumentXml = doc.OuterXml;
+ ITcPlcDeclaration decl = (ITcPlcDeclaration)item;
+ //decl.DeclarationText = node.InnerText;
+ return item;
+ }
+
+ private ITcSmTreeItem createGvl(GvlInfo gvlInfo, ITcSmTreeItem parent, IWorker worker, XmlDocument doc)
+ {
+ XmlNode gvlNode = doc.SelectSingleNode("TcPlcObject/GVL");
+ string gvlName = gvlNode.Attributes["Name"].Value;
+
+ worker.ProgressStatus = string.Format("Creating GlobalVariable Sheet '{0}' ...", gvlName);
+
+ ITcSmTreeItem item = null;
+
+ if (!TryLookupChild(parent, gvlName, out item))
+ {
+ item = parent.CreateChild(gvlName, TreeItemType.PlcGvl.AsInt32());
+ }
+
+ ITcXmlDocument xmlDoc = (ITcXmlDocument)item;
+ ITcPlcDeclaration decl = (ITcPlcDeclaration)item;
+
+ XmlElement node = (XmlElement)doc.SelectSingleNode("TcPlcObject/GVL/Declaration");
+ decl.DeclarationText = node.InnerText;
+ return item;
+ }
+
+ private ITcSmTreeItem createDut(DataTypeInfo info, ITcSmTreeItem parent, IWorker worker, XmlDocument doc)
+ {
+ XmlNode dutNode = doc.SelectSingleNode("TcPlcObject/DUT");
+ string typeName = dutNode.Attributes["Name"].Value;
+
+ worker.ProgressStatus = string.Format("Creating Type '{0}' ...", typeName);
+
+ XmlNode declNode = dutNode.SelectSingleNode("Declaration");
+ string declaration = string.Empty;
+ declaration = declNode.InnerText;
+
+ ITcSmTreeItem dataTypeItem = parent.CreateChild(typeName, TreeItemType.PlcDutStruct.AsInt32(), "", declaration);
+
+ ITcPlcDeclaration decl = (ITcPlcDeclaration)dataTypeItem;
+ ITcXmlDocument tcDoc = (ITcXmlDocument)dataTypeItem;
+
+ string xml = tcDoc.DocumentXml;
+
+ return dataTypeItem;
+ }
+
+ private bool TryLookupChild(ITcSmTreeItem parent, string childName, out ITcSmTreeItem child)
+ {
+ foreach (ITcSmTreeItem c in parent)
+ {
+ if (c.Name == childName)
+ {
+ child = c;
+ return true;
+ }
+ }
+ child = null;
+ return false;
+ }
+
+ private bool TryLookupChild2(ITcSmTreeItem parent, string childName, out ITcSmTreeItem child)
+ {
+ try
+ {
+ child = parent.LookupChild(childName);
+ return true;
+ }
+ catch
+ {
+ child = null;
+ return false;
+ }
+ }
+
+ private bool TryLookupChild3(ITcSmTreeItem parent, string childName, out ITcSmTreeItem child)
+ {
+ string parentPath = parent.PathName;
+ string path = parentPath + "^" + childName;
+
+ return TryLookupTreeItem(path, out child);
+
+ }
+
+
+ private bool TryLookupTreeItem(string itemPath, out ITcSmTreeItem treeItem)
+ {
+ try
+ {
+ treeItem = this.systemManager.LookupTreeItem(itemPath);
+ return true;
+ }
+ catch
+ {
+ treeItem = null;
+ return false;
+ }
+ }
+
+ #endregion
+
+
+ private void ConsumeTemplate(ITcSmTreeItem item, string templatePath)
+ {
+ string templ = Path.Combine(ApplicationDirectory,templatePath);
+
+ XmlTextReader reader = new XmlTextReader(templ);
+ reader.MoveToContent();
+ item.ConsumeXml(reader.ReadOuterXml());
+ }
+
+ private void ConsumeMappings(string templatePath)
+ {
+ string templ = Path.Combine(ApplicationDirectory,templatePath);
+ XmlTextReader reader = new XmlTextReader(templ);
+ reader.MoveToContent();
+ systemManager.ConsumeMappingInfo(reader.ReadOuterXml());
+ }
+
+ private bool CompileProject(IWorker worker, out ErrorItems errors)
+ {
+ bool buildSucceeded = false;
+
+ if (worker.CancellationPending)
+ throw new Exception("Execution cancelled!");
+
+ worker.ProgressStatus = "Compiling project ...";
+
+ dte.Solution.SolutionBuild.Build(true);
+ buildSucceeded = waitForBuildAndCheckErrors(worker, out errors);
+
+ if (!buildSucceeded)
+ {
+ int overallMessages = errors.Count;
+
+ int errorCount = 0;
+ int warningCount = 0;
+ int messageCount = 0;
+
+ for (int i = 1; i <= overallMessages; i++) // List is starting from 1!!!
+ {
+ ErrorItem item = errors.Item(i);
+
+ if (item.ErrorLevel == vsBuildErrorLevel.vsBuildErrorLevelHigh)
+ {
+ errorCount++;
+ worker.ProgressStatus = "Compiler error: " + item.Description;
+ }
+ else if (item.ErrorLevel == vsBuildErrorLevel.vsBuildErrorLevelMedium)
+ {
+ warningCount++;
+ worker.ProgressStatus = "Compiler warning: " + item.Description;
+ }
+ else if (item.ErrorLevel == vsBuildErrorLevel.vsBuildErrorLevelLow)
+ {
+ messageCount++;
+ worker.ProgressStatus = "Compiler message: " + item.Description;
+ }
+
+ }
+ }
+ else
+ {
+ worker.ProgressStatus = "Build Succeeded!";
+ }
+
+ if (worker.CancellationPending)
+ throw new Exception("Execution cancelled!");
+
+ return buildSucceeded;
+ }
+
+ private bool waitForBuildAndCheckErrors(IWorker worker, out ErrorItems errorItems)
+ {
+ bool buildSucceeded = false;
+ vsBuildState state = dte.Solution.SolutionBuild.BuildState;
+
+ while (state == vsBuildState.vsBuildStateInProgress)
+ {
+ System.Threading.Thread.Sleep(500);
+
+ if (worker.CancellationPending)
+ {
+ dte.ExecuteCommand("Build.Cancel");
+
+ }
+ state = dte.Solution.SolutionBuild.BuildState;
+ }
+
+ buildSucceeded = (dte.Solution.SolutionBuild.LastBuildInfo == 0 && state == vsBuildState.vsBuildStateDone);
+
+ // The ErrorList is not significant for the succeeded Build!!!
+ // Because the PLC Project can contain errors within not used types.
+ // Relevant is only the "LastBuildInfo" object that contains the numer of failed project compilations!
+
+ ErrorList errorList = dte.ToolWindows.ErrorList;
+ errorItems = errorList.ErrorItems;
+
+
+ return buildSucceeded;
+ }
+ }
+}
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationDemo/ConfigurationScriptA.cs b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationDemo/ConfigurationScriptA.cs
new file mode 100644
index 0000000..739a296
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationDemo/ConfigurationScriptA.cs
@@ -0,0 +1,45 @@
+using System;
+using System.IO;
+using EnvDTE;
+using EnvDTE100;
+using EnvDTE80;
+using TCatSysManagerLib;
+using TwinCAT.SystemManager;
+using System.Diagnostics;
+using System.Timers;
+using ScriptingTest;
+using System.Xml;
+using System.Collections.Generic;
+using System.Reflection;
+
+namespace CodeGenerationDemo
+{
+ ///
+ /// Demonstrates the generation + compilation of PLC projects
+ ///
+ public class ConfigurationScriptA
+ : CodeGenerationBaseScript
+ {
+ ///
+ /// Handler function Executing the Script code.
+ ///
+ /// The worker.
+ protected override void OnExecute(IWorker worker)
+ {
+ worker.Progress = 0;
+
+ bool optScanHardware = this._context.Parameters.ContainsKey("ScanHardware");
+ bool optSimulate = this._context.Parameters.ContainsKey("SimulateHardware");
+
+ ITcSmTreeItem ncConfig = systemManager.LookupTreeItem("TINC"); // Getting NC Configuration
+ ITcSmTreeItem plcConfig = systemManager.LookupTreeItem("TIPC"); // Getting PLC-Configuration
+ ITcSmTreeItem devices = systemManager.LookupTreeItem("TIID"); // Getting IO-Configuration
+
+ ITcSmTreeItem device = CreateHardware(worker,optScanHardware,optSimulate);
+
+ CreatePlcProject(worker);
+ CreateMotion(worker);
+ CreateMappings(worker);
+ }
+ }
+}
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationDemo/ConfigurationScriptB.cs b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationDemo/ConfigurationScriptB.cs
new file mode 100644
index 0000000..df0546f
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationDemo/ConfigurationScriptB.cs
@@ -0,0 +1,45 @@
+using System;
+using System.IO;
+using EnvDTE;
+using EnvDTE100;
+using EnvDTE80;
+using TCatSysManagerLib;
+using TwinCAT.SystemManager;
+using System.Diagnostics;
+using System.Timers;
+using ScriptingTest;
+using System.Xml;
+using System.Collections.Generic;
+using System.Reflection;
+
+namespace CodeGenerationDemo
+{
+ ///
+ /// Demonstrates the generation + compilation of PLC projects
+ ///
+ public class ConfigurationScriptB
+ : CodeGenerationBaseScript
+ {
+ ///
+ /// Handler function Executing the Script code.
+ ///
+ /// The worker.
+ protected override void OnExecute(IWorker worker)
+ {
+ worker.Progress = 0;
+
+ bool optScanHardware = this._context.Parameters.ContainsKey("ScanHardware");
+ bool optSimulate = this._context.Parameters.ContainsKey("SimulateHardware");
+
+ ITcSmTreeItem ncConfig = systemManager.LookupTreeItem("TINC"); // Getting NC Configuration
+ ITcSmTreeItem plcConfig = systemManager.LookupTreeItem("TIPC"); // Getting PLC-Configuration
+ ITcSmTreeItem devices = systemManager.LookupTreeItem("TIID"); // Getting IO-Configuration
+
+ ITcSmTreeItem device = CreateHardware(worker, optScanHardware, optSimulate);
+
+ CreatePlcProject(worker);
+ CreateMotion(worker);
+ CreateMappings(worker);
+ }
+ }
+}
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationDemo/ConfigurationScriptC.cs b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationDemo/ConfigurationScriptC.cs
new file mode 100644
index 0000000..e8e41cf
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationDemo/ConfigurationScriptC.cs
@@ -0,0 +1,45 @@
+using System;
+using System.IO;
+using EnvDTE;
+using EnvDTE100;
+using EnvDTE80;
+using TCatSysManagerLib;
+using TwinCAT.SystemManager;
+using System.Diagnostics;
+using System.Timers;
+using ScriptingTest;
+using System.Xml;
+using System.Collections.Generic;
+using System.Reflection;
+
+namespace CodeGenerationDemo
+{
+ ///
+ /// Demonstrates the generation + compilation of PLC projects
+ ///
+ public class ConfigurationScriptC
+ : CodeGenerationBaseScript
+ {
+ ///
+ /// Handler function Executing the Script code.
+ ///
+ /// The worker.
+ protected override void OnExecute(IWorker worker)
+ {
+ worker.Progress = 0;
+
+ bool optScanHardware = this._context.Parameters.ContainsKey("ScanHardware");
+ bool optSimulate = this._context.Parameters.ContainsKey("SimulateHardware");
+
+ ITcSmTreeItem ncConfig = systemManager.LookupTreeItem("TINC"); // Getting NC Configuration
+ ITcSmTreeItem plcConfig = systemManager.LookupTreeItem("TIPC"); // Getting PLC-Configuration
+ ITcSmTreeItem devices = systemManager.LookupTreeItem("TIID"); // Getting IO-Configuration
+
+ ITcSmTreeItem device = CreateHardware(worker, optScanHardware, optSimulate);
+
+ CreatePlcProject(worker);
+ CreateMotion(worker);
+ CreateMappings(worker);
+ }
+ }
+}
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationDemo/ConfigurationScriptD.cs b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationDemo/ConfigurationScriptD.cs
new file mode 100644
index 0000000..b5eed6e
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationDemo/ConfigurationScriptD.cs
@@ -0,0 +1,152 @@
+using System;
+using System.IO;
+using EnvDTE;
+using EnvDTE100;
+using EnvDTE80;
+using TCatSysManagerLib;
+using TwinCAT.SystemManager;
+using System.Diagnostics;
+using System.Timers;
+using ScriptingTest;
+using System.Xml;
+using System.Collections.Generic;
+using System.Reflection;
+using TwinCAT.Measurement.AutomationInterface;
+
+namespace CodeGenerationDemo
+{
+ ///
+ /// Demonstrates the generation + compilation of PLC and Measurement projects
+ ///
+ public class ConfigurationScriptD
+ : CodeGenerationBaseScript
+ {
+ ///
+ /// Handler function Executing the Script code.
+ ///
+ /// The worker.
+ protected override void OnExecute(IWorker worker)
+ {
+ worker.Progress = 0;
+
+ bool optScanHardware = this._context.Parameters.ContainsKey("ScanHardware");
+ bool optSimulate = this._context.Parameters.ContainsKey("SimulateHardware");
+
+ ITcSmTreeItem ncConfig = systemManager.LookupTreeItem("TINC"); // Getting NC Configuration
+ ITcSmTreeItem plcConfig = systemManager.LookupTreeItem("TIPC"); // Getting PLC-Configuration
+ ITcSmTreeItem devices = systemManager.LookupTreeItem("TIID"); // Getting IO-Configuration
+
+ ITcSmTreeItem plcProject = CreatePlcProject(worker);
+
+ SetTaskCycleTime(10000, worker);
+
+ worker.ProgressStatus = "Activating configuration ...";
+
+ systemManager.ActivateConfiguration();
+
+ worker.ProgressStatus = "Restarting TwinCAT ...";
+
+ systemManager.StartRestartTwinCAT();
+
+ System.Threading.Thread.Sleep(5000);
+
+ CreateScopeProject(worker);
+ }
+
+ private void SetTaskCycleTime(int cycleTime, IWorker worker)
+ {
+ worker.ProgressStatus = "Setting task cycle time ...";
+ string xmlCycleTime = "" + cycleTime + "";
+ ITcSmTreeItem task = systemManager.LookupTreeItem("TIRT^PlcTask");
+ task.ConsumeXml(xmlCycleTime);
+ }
+
+ private void CreateScopeProject(IWorker worker)
+ {
+ string scopeTemplate = @"C:\TwinCAT\Functions\TE130X-Scope-View\Templates\Projects\Measurement Scope Project.tcmproj";
+ string scopeDestination = this.ScriptRootFolder;
+ string scopeName = "FunctionGeneratorScopeSample";
+
+ worker.ProgressStatus = "Adding TwinCAT Measurement project ...";
+
+ Project scopeProject = dte.Solution.AddFromTemplate(scopeTemplate, scopeDestination, scopeName);
+
+ System.Threading.Thread.Sleep(3000);
+
+ worker.ProgressStatus = "Opening Scope control ...";
+
+ ((IMeasurementScope)scopeProject.ProjectItems.Item(1).Object).ShowControl();
+
+ worker.ProgressStatus = "Creating new chart ...";
+
+ ProjectItem ChartPI;
+ ((IMeasurementScope)scopeProject.ProjectItems.Item(1).Object).CreateChild(out ChartPI);
+ IMeasurementScope ChartMI = (IMeasurementScope)ChartPI.Object;
+ ChartMI.ChangeName("Rectangle and Sinus Chart");
+ setProperty("StackedYAxis", ChartPI.Properties, true);
+
+ worker.ProgressStatus = "Creating axis for sinus signal ...";
+
+ ProjectItem AxisPI1;
+ ChartMI.CreateChild(out AxisPI1);
+ IMeasurementScope AxisMI1 = (IMeasurementScope)AxisPI1.Object;
+ AxisMI1.ChangeName("Axis 1");
+
+ worker.ProgressStatus = "Creating axis for rectangle signal ...";
+
+ ProjectItem AxisPI2;
+ ChartMI.CreateChild(out AxisPI2);
+ IMeasurementScope AxisMI2 = (IMeasurementScope)AxisPI2.Object;
+ AxisMI2.ChangeName("Axis 2");
+
+ worker.ProgressStatus = "Creating channel to PLC symbol for sinus signal ...";
+
+ ProjectItem ChannelPI1;
+ AxisMI1.CreateChild(out ChannelPI1);
+ IMeasurementScope ChannelMI1 = (IMeasurementScope)ChannelPI1.Object;
+
+ ChannelMI1.ChangeName("Sinus");
+ setProperty("TargetPorts", ChannelPI1.Properties, "851");
+ setProperty("Symbolbased", ChannelPI1.Properties, true);
+ setProperty("SymbolDataType", ChannelPI1.Properties, TwinCAT.Scope2.Communications.Scope2DataType.REAL64);
+ setProperty("SymbolName", ChannelPI1.Properties, "MAIN.aSineBuffer");
+ setProperty("SampleState", ChannelPI1.Properties, 1);
+ setProperty("LineWidth", ChannelPI1.Properties, 3);
+
+ worker.ProgressStatus = "Creating channel to PLC symbol for rectangle signal ...";
+
+ ProjectItem ChannelPI2;
+ AxisMI2.CreateChild(out ChannelPI2);
+ IMeasurementScope ChannelMI2 = (IMeasurementScope)ChannelPI2.Object;
+
+ ChannelMI2.ChangeName("Rectangle");
+ setProperty("TargetPorts", ChannelPI2.Properties, "851");
+ setProperty("Symbolbased", ChannelPI2.Properties, true);
+ setProperty("SymbolDataType", ChannelPI2.Properties, TwinCAT.Scope2.Communications.Scope2DataType.REAL64);
+ setProperty("SymbolName", ChannelPI2.Properties, "MAIN.aSquareBuffer");
+ setProperty("SampleState", ChannelPI2.Properties, 1);
+ setProperty("LineWidth", ChannelPI2.Properties, 3);
+
+ worker.ProgressStatus = "Starting Scope record ...";
+
+ ((IMeasurementScope)scopeProject.ProjectItems.Item(1).Object).StartRecord();
+
+ System.Threading.Thread.Sleep(5000);
+
+ worker.ProgressStatus = "Stopping Scope record ...";
+
+ ((IMeasurementScope)scopeProject.ProjectItems.Item(1).Object).StopRecord();
+ }
+
+ private void setProperty(string name, EnvDTE.Properties props, object value)
+ {
+ foreach (Property p in props)
+ if (p.Name.ToLower().Equals(name.ToLower()))
+ {
+ object oldvalue = p.Value;
+ p.Value = value;
+ return;
+ }
+ }
+ }
+}
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationDemo/Data/Orders.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationDemo/Data/Orders.xml
new file mode 100644
index 0000000..28e5dee
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationDemo/Data/Orders.xml
@@ -0,0 +1,167 @@
+
+
+
+ ConfigA
+ Beckhoff Automation GmbH
+ 2012-11-30
+ 10001
+ Test01
+ Please run extended Hardware Test!
+
+
+ ConfigB
+ Beckhoff Automation GmbH
+ 2013-02-28
+ 10051
+ Test02
+ Deliver together with Serial number 10039
+
+
+ ConfigD
+ Beckhoff Automation GmbH
+ 2013-11-12
+ 10042
+ Test03
+ Include Hardware Simulation
+
+
+
+
+
+
+
+
+
+
+ 2-Axes, PTP Motion, Servo Terminal not included
+
+ MachineTypeA
+
+
+ Tc2_Standard
+ Tc2_System
+ Tc3_Interfaces
+ Tc3_Module
+ Tc2_MC2
+ Tc2_MC2_Drive
+ Templates/MachineTypeA/POUs/FB_Axis.xml
+ Templates/MachineTypeA/POUs/MAIN.xml
+ >
+
+
+
+
+ Templates/MachineTypeA/Axis1.xml
+ Templates/MachineTypeA/Axis2.xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Templates/MachineTypeA/Links.xml
+
+
+
+
+
+
+
+
+ 4-Axes, NCI
+
+ MachineTypeB
+
+
+ Tc2_Standard
+ Tc2_System
+ Tc3_Interfaces
+ Tc3_Module
+ Tc2_MC2
+ Tc2_NCI
+ Templates/MachineTypeB/Datatypes/E_Commands.xml
+ Templates/MachineTypeB/Datatypes/E_NCI_CTRL_STATE.xml
+ Templates/MachineTypeB/Datatypes/E_States.xml
+ Templates/MachineTypeB/GVLs/GlobalVariables.xml
+ Templates/MachineTypeB/POUs/FB_NciChannel.xml
+ Templates/MachineTypeB/POUs/FB_NciSequence.xml
+ Templates/MachineTypeB/POUs/MAIN.xml
+
+
+
+
+
+ Templates/MachineTypeB/Axis1.xml
+ Templates/MachineTypeB/Axis2.xml
+ Templates/MachineTypeB/Axis3.xml
+ Templates/MachineTypeB/Axis4.xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Templates/MachineTypeB/Links.xml
+
+
+
+
+
+ PLC project, Measurement project
+
+ MachineTypeD
+
+ Tc2_Standard
+ Tc2_System
+ Tc3_Interfaces
+ Tc3_Module
+ Templates/MachineTypeD/Datatypes/E_FunctionType.xml
+ Templates/MachineTypeD/POUs/FB_FunctionGenerator.xml
+ Templates/MachineTypeD/POUs/MAIN.xml
+ Templates/MachineTypeD/GVLs/GVL_Constants.xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationDemo/Data/OrdersStandard.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationDemo/Data/OrdersStandard.xml
new file mode 100644
index 0000000..29cbf21
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationDemo/Data/OrdersStandard.xml
@@ -0,0 +1,213 @@
+
+
+
+ ConfigA
+ Beckhoff Automation GmbH
+ 2012-11-30
+ 10001
+ Test01
+ Test01
+
+
+ ConfigB
+ Beckhoff Automation GmbH
+ 2013-02-28
+ 10051
+ Test02
+ Test01
+
+
+ ConfigC
+ Beckhoff Automation GmbH
+ 2013-05-15
+ 10077
+ Test03
+ Test01
+
+
+
+
+
+
+
+
+
+
+ Test01
+
+ MachineTypeA
+
+
+ Tc2_Standard
+ Tc2_System
+ Tc3_Interfaces
+ Tc3_Module
+ Tc2_MC2
+ Tc2_MC2_Drive
+ Templates/MachineTypeA/POUs/FB_Axis.xml
+ Templates/MachineTypeA/POUs/MAIN.xml
+ >
+
+
+
+
+ Templates/MachineTypeA/Axis1.xml
+ Templates/MachineTypeA/Axis2.xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Templates/MachineTypeA/Links.xml
+
+
+
+
+
+
+
+
+ Test01
+
+ MachineTypeB
+
+
+ Tc2_Standard
+ Tc2_System
+ Tc3_Interfaces
+ Tc3_Module
+ Tc2_MC2
+ Tc2_NCI
+ Templates/MachineTypeB/Datatypes/E_Commands.xml
+ Templates/MachineTypeB/Datatypes/E_NCI_CTRL_STATE.xml
+ Templates/MachineTypeB/Datatypes/E_States.xml
+ Templates/MachineTypeB/GVLs/GlobalVariables.xml
+ Templates/MachineTypeB/POUs/FB_NciChannel.xml
+ Templates/MachineTypeB/POUs/FB_NciSequence.xml
+ Templates/MachineTypeB/POUs/MAIN.xml
+
+
+
+
+
+ Templates/MachineTypeB/Axis1.xml
+ Templates/MachineTypeB/Axis2.xml
+ Templates/MachineTypeB/Axis3.xml
+ Templates/MachineTypeB/Axis4.xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Templates/MachineTypeB/Links.xml
+
+
+
+
+
+
+
+
+ Test01
+
+ MachineTypeC
+
+
+ Tc2_Standard
+ Tc2_System
+ Tc3_Interfaces
+ Tc3_Module
+ Tc2_MC2
+ Tc2_MC2_Drive
+ Templates/MachineTypeC/Datatypes/E_AxisState.xml
+ Templates/MachineTypeC/Datatypes/E_MoveCmd.xml
+ Templates/MachineTypeC/POUs/FB_Table.xml
+ Templates/MachineTypeC/POUs/MAIN.xml
+ Templates/MachineTypeC/POUs/Axis/FB_AX5000Axis.xml
+ Templates/MachineTypeC/POUs/Axis/FB_NcAxis.xml
+ Templates/MachineTypeC/POUs/Axis/IAxis.xml
+
+
+
+
+
+ Templates/MachineTypeC/AxisX.xml
+ Templates/MachineTypeA/AxisY.xml
+ Templates/MachineTypeA/AxisY.xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Templates/MachineTypeC/Links.xml
+
+
+
+
+
+
+
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationDemo/Data/ReadMe.txt b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationDemo/Data/ReadMe.txt
new file mode 100644
index 0000000..0dc324d
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationDemo/Data/ReadMe.txt
@@ -0,0 +1 @@
+Rename the Orders Xml File simply to Orders.xml to activate the Machine-dependent Version
\ No newline at end of file
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationDemo/Data/TC3_AU08-IEC-IC_Orders.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationDemo/Data/TC3_AU08-IEC-IC_Orders.xml
new file mode 100644
index 0000000..e811b22
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationDemo/Data/TC3_AU08-IEC-IC_Orders.xml
@@ -0,0 +1,213 @@
+
+
+
+ ConfigA
+ Beckhoff Automation GmbH
+ 2012-11-30
+ 10001
+ Test01
+ Please run extended Hardware Test!
+
+
+ ConfigB
+ Beckhoff Automation GmbH
+ 2013-02-28
+ 10051
+ Test02
+ Deliver together with Serial number 10039
+
+
+ ConfigC
+ Beckhoff Automation GmbH
+ 2013-05-15
+ 10077
+ Test03
+ Include Hardware Simulation
+
+
+
+
+
+
+
+
+
+
+ 2-Axes, PTP Motion
+
+ MachineTypeA
+
+
+ Tc2_Standard
+ Tc2_System
+ Tc3_Interfaces
+ Tc3_Module
+ Tc2_MC2
+ Tc2_MC2_Drive
+ Templates/TC3-AU08-IEC-IC/MachineTypeA/POUs/FB_Axis.xml
+ Templates/TC3-AU08-IEC-IC/MachineTypeA/POUs/MAIN.xml
+ >
+
+
+
+
+ Templates/TC3-AU08-IEC-IC/MachineTypeA/Axis1.xml
+ Templates/TC3-AU08-IEC-IC/MachineTypeA/Axis2.xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Templates/TC3-AU08-IEC-IC/MachineTypeA/Links.xml
+
+
+
+
+
+
+
+
+ 4-Axes, NCI
+
+ MachineTypeB
+
+
+ Tc2_Standard
+ Tc2_System
+ Tc3_Interfaces
+ Tc3_Module
+ Tc2_MC2
+ Tc2_NCI
+ Templates/TC3-AU08-IEC-IC/MachineTypeB/Datatypes/E_Commands.xml
+ Templates/TC3-AU08-IEC-IC/MachineTypeB/Datatypes/E_NCI_CTRL_STATE.xml
+ Templates/TC3-AU08-IEC-IC/MachineTypeB/Datatypes/E_States.xml
+ Templates/TC3-AU08-IEC-IC/MachineTypeB/GVLs/GlobalVariables.xml
+ Templates/TC3-AU08-IEC-IC/MachineTypeB/POUs/FB_NciChannel.xml
+ Templates/TC3-AU08-IEC-IC/MachineTypeB/POUs/FB_NciSequence.xml
+ Templates/TC3-AU08-IEC-IC/MachineTypeB/POUs/MAIN.xml
+
+
+
+
+
+ Templates/TC3-AU08-IEC-IC/MachineTypeB/Axis1.xml
+ Templates/TC3-AU08-IEC-IC/MachineTypeB/Axis2.xml
+ Templates/TC3-AU08-IEC-IC/MachineTypeB/Axis3.xml
+ Templates/TC3-AU08-IEC-IC/MachineTypeB/Axis4.xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Templates/TC3-AU08-IEC-IC/MachineTypeB/Links.xml
+
+
+
+
+
+
+
+
+ 3-Axes, PTP Motion
+
+ MachineTypeC
+
+
+ Tc2_Standard
+ Tc2_System
+ Tc3_Interfaces
+ Tc3_Module
+ Tc2_MC2
+ Tc2_MC2_Drive
+ Templates/TC3-AU08-IEC-IC/MachineTypeC/Datatypes/E_AxisState.xml
+ Templates/TC3-AU08-IEC-IC/MachineTypeC/Datatypes/E_MoveCmd.xml
+ Templates/TC3-AU08-IEC-IC/MachineTypeC/POUs/FB_Table.xml
+ Templates/TC3-AU08-IEC-IC/MachineTypeC/POUs/MAIN.xml
+ Templates/TC3-AU08-IEC-IC/MachineTypeC/POUs/Axis/FB_AX5000Axis.xml
+ Templates/TC3-AU08-IEC-IC/MachineTypeC/POUs/Axis/FB_NcAxis.xml
+ Templates/TC3-AU08-IEC-IC/MachineTypeC/POUs/Axis/IAxis.xml
+
+
+
+
+
+ Templates/TC3-AU08-IEC-IC/MachineTypeC/AxisX.xml
+ Templates/TC3-AU08-IEC-IC/MachineTypeC/AxisY.xml
+ Templates/TC3-AU08-IEC-IC/MachineTypeC/AxisZ.xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Templates/TC3-AU08-IEC-IC/MachineTypeC/Links.xml
+
+
+
+
+
+
+
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationDemo/Data/TC3_AV09-IEC-TG_Orders.xml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationDemo/Data/TC3_AV09-IEC-TG_Orders.xml
new file mode 100644
index 0000000..712ce7d
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationDemo/Data/TC3_AV09-IEC-TG_Orders.xml
@@ -0,0 +1,216 @@
+
+
+
+ ConfigA
+ Beckhoff Automation GmbH
+ 2012-11-30
+ 10001
+ Test01
+ Test01
+
+
+ ConfigB
+ Beckhoff Automation GmbH
+ 2013-02-28
+ 10051
+ Test02
+ Test01
+
+
+ ConfigC
+ Beckhoff Automation GmbH
+ 2013-05-15
+ 10077
+ Test03
+ Test01
+
+
+
+
+
+
+
+
+
+
+ 2-Axes, PTP Motion, Servo Terminals included
+
+ MachineTypeA
+
+
+ Tc2_Standard
+ Tc2_System
+ Tc3_Interfaces
+ Tc3_Module
+ Tc2_MC2
+ Tc2_MC2_Drive
+ Templates/TC3-AV09-IEC_TG/MachineTypeA/POUs/FB_Axis.xml
+ Templates/TC3-AV09-IEC_TG/MachineTypeA/POUs/MAIN.xml
+ >
+
+
+
+
+ Templates/TC3-AV09-IEC_TG/MachineTypeA/Axis1.xml
+ Templates/TC3-AV09-IEC_TG/MachineTypeA/Axis2.xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Templates/TC3-AV09-IEC_TG/MachineTypeA/Links.xml
+
+
+
+
+
+
+
+
+ 4-Axes, NCI, Servo Terminals included
+
+ MachineTypeB
+
+
+ Tc2_Standard
+ Tc2_System
+ Tc3_Interfaces
+ Tc3_Module
+ Tc2_MC2
+ Tc2_NCI
+ Templates/TC3-AV09-IEC_TG/MachineTypeB/Datatypes/E_Commands.xml
+ Templates/TC3-AV09-IEC_TG/MachineTypeB/Datatypes/E_NCI_CTRL_STATE.xml
+ Templates/TC3-AV09-IEC_TG/MachineTypeB/Datatypes/E_States.xml
+ Templates/TC3-AV09-IEC_TG/MachineTypeB/GVLs/GlobalVariables.xml
+ Templates/TC3-AV09-IEC_TG/MachineTypeB/POUs/FB_NciChannel.xml
+ Templates/TC3-AV09-IEC_TG/MachineTypeB/POUs/FB_NciSequence.xml
+ Templates/TC3-AV09-IEC_TG/MachineTypeB/POUs/MAIN.xml
+
+
+
+
+
+ Templates/TC3-AV09-IEC_TG/MachineTypeB/Axis1.xml
+ Templates/TC3-AV09-IEC_TG/MachineTypeB/Axis2.xml
+ Templates/TC3-AV09-IEC_TG/MachineTypeB/Axis3.xml
+ Templates/TC3-AV09-IEC_TG/MachineTypeB/Axis4.xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Templates/TC3-AV09-IEC_TG/MachineTypeB/Links.xml
+
+
+
+
+
+
+
+
+ 3-Axes, PTP Motion, Servo Terminals included
+
+ MachineTypeC
+
+
+ Tc2_Standard
+ Tc2_System
+ Tc3_Interfaces
+ Tc3_Module
+ Tc2_MC2
+ Tc2_MC2_Drive
+ Templates/TC3-AV09-IEC_TG/MachineTypeC/Datatypes/E_AxisState.xml
+ Templates/TC3-AV09-IEC_TG/MachineTypeC/Datatypes/E_MoveCmd.xml
+ Templates/TC3-AV09-IEC_TG/MachineTypeC/POUs/FB_Table.xml
+ Templates/TC3-AV09-IEC_TG/MachineTypeC/POUs/MAIN.xml
+ Templates/TC3-AV09-IEC_TG/MachineTypeC/POUs/Axis/FB_AX5000Axis.xml
+ Templates/TC3-AV09-IEC_TG/MachineTypeC/POUs/Axis/FB_NcAxis.xml
+ Templates/TC3-AV09-IEC_TG/MachineTypeC/POUs/Axis/IAxis.xml
+
+
+
+
+
+ Templates/TC3-AV09-IEC_TG/MachineTypeC/AxisX.xml
+ Templates/TC3-AV09-IEC_TG/MachineTypeC/AxisY.xml
+ Templates/TC3-AV09-IEC_TG/MachineTypeC/AxisZ.xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Templates/TC3-AV09-IEC_TG/MachineTypeC/Links.xml
+
+
+
+
+
+
+
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationDemo/DataModel.cs b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationDemo/DataModel.cs
new file mode 100644
index 0000000..a15c08d
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationDemo/DataModel.cs
@@ -0,0 +1,76 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Xml;
+using System.ComponentModel;
+
+namespace CodeGenerationDemo
+{
+ /* ===============================================================================================
+ * This class reads machine configurations from Orders.xml and creates a new object representation of
+ * this configuration via classes ConfigurationInfo and OrderInfo from ScriptInfo.cs.
+ * =============================================================================================== */
+ public class DataModel : INotifyPropertyChanged
+ {
+ public DataModel() {}
+
+ public void Load()
+ {
+ XmlDocument doc = new XmlDocument();
+ doc.Load(@".\Orders.xml");
+
+ XmlNodeList configurationNodes = doc.SelectNodes("Root/AvailableConfigurations/Configuration");
+
+ foreach (XmlElement configurationNode in configurationNodes)
+ {
+ _configurations.Add(new ConfigurationInfo(configurationNode));
+ }
+
+ XmlNodeList orderNodes = doc.SelectNodes("Root/MachineOrders/Order");
+
+ foreach (XmlElement orderNode in orderNodes)
+ {
+ _orders.Add(new OrderInfo(orderNode));
+ }
+
+ if (PropertyChanged != null)
+ {
+ OnPropertyChanged(new PropertyChangedEventArgs("Orders"));
+ }
+ }
+
+ OrderCollection _orders = new OrderCollection();
+
+ public OrderCollection Orders
+ {
+ get { return _orders; }
+ }
+
+ ConfigurationCollection _configurations = new ConfigurationCollection();
+
+ public ConfigurationCollection Configurations
+ {
+ get { return _configurations; }
+ }
+
+
+ #region INotifyPropertyChanged Members
+
+ ///
+ /// Occurs when a property value changes.
+ ///
+ public event PropertyChangedEventHandler PropertyChanged;
+
+ #endregion
+
+
+ private void OnPropertyChanged(PropertyChangedEventArgs args)
+ {
+ if (PropertyChanged != null)
+ {
+ PropertyChanged(this, args);
+ }
+ }
+ }
+}
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationDemo/MainWindow.xaml b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationDemo/MainWindow.xaml
new file mode 100644
index 0000000..9b73686
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationDemo/MainWindow.xaml
@@ -0,0 +1,167 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Customer:
+
+ Configuration:
+
+ Delivery:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Order Details:
+
+ Machine Configuration:
+
+ Configuration Details:
+
+ Customer:
+
+ Delivery:
+
+ Serial Number:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationDemo/MainWindow.xaml.cs b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationDemo/MainWindow.xaml.cs
new file mode 100644
index 0000000..837e92e
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationDemo/MainWindow.xaml.cs
@@ -0,0 +1,407 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+using System.Reflection;
+using System.ComponentModel;
+using ScriptingTest;
+using System.Diagnostics;
+//using Scripting.CSharp;
+using System.Xml;
+
+namespace CodeGenerationDemo
+{
+ ///
+ /// Interaction logic for MainWindow.xaml
+ ///
+
+ public partial class MainWindow : Window
+ {
+ ///
+ /// Indicates that the Main window is initializing
+ ///
+ bool _initializing = false;
+
+ public bool IsInitializing
+ {
+ get { return _initializing; }
+ }
+
+ public MainWindow()
+ {
+ _initializing = true;
+
+ InitializeComponent();
+
+ int defaultIndex = -1;
+ int currentIndex = -1;
+
+ IDictionary progIdDict = ConfigurationFactory.GetVisualStudioProgIds(out currentIndex, out defaultIndex);
+
+ //List progIds = new List(progIdDict.Keys);
+
+ foreach (DTEInfo key in progIdDict.Values)
+ {
+ this.cBProgID.Items.Add(key);
+ }
+
+ int actualIndex = defaultIndex;
+
+ if (actualIndex == -1)
+ actualIndex = currentIndex;
+
+ this.cBProgID.SelectedIndex = actualIndex;
+
+ if (DesignerProperties.GetIsInDesignMode(this))
+ {
+ // Design-mode specific functionality;
+ }
+ else
+ {
+ //_model = new DataModel();
+ _model = (DataModel)this.LayoutRoot.DataContext;
+ _model.Load();
+ }
+
+#if DEBUG
+ this.Topmost = false;
+ this.cbProgVisible.Visibility = Visibility.Visible;
+ this.cbSuppressUI.Visibility = Visibility.Visible;
+ this.cbUserControl.Visibility = Visibility.Visible;
+#endif
+
+ this.cbProgVisible.IsChecked = true;
+ this.cbUserControl.IsChecked = true;
+ this.cbSuppressUI.IsChecked = true;
+
+ _initializing = false;
+ enableDisableControls(); // EnableDisable Visual Elements
+ }
+
+ DataModel _model = null;
+
+ public DataModel Model
+ {
+ get { return _model; }
+ }
+
+ ///
+ /// Gets a value indicating whether the IDE is visible during script
+ ///
+ ///
+ /// true if this instance is IDE visible; otherwise, false.
+ ///
+ public bool IsIDEVisible
+ {
+ get { return cbProgVisible.IsChecked.Value; }
+ }
+
+ ///
+ /// Gets a value indicating whether the IDE is controlled by User
+ ///
+ ///
+ ///
+ public bool IsIDEUserControl
+ {
+ get { return cbUserControl.IsChecked.Value; }
+ }
+
+ ///
+ /// Gets a value indicating whether VisualStudio UI is suppressed.
+ ///
+ ///
+ ///
+ public bool SupressUI
+ {
+ get { return cbSuppressUI.IsChecked.Value; }
+ }
+
+ ///
+ /// Background script worker
+ ///
+ IWorker _worker = null;
+
+ ///
+ /// Configuration Generator
+ ///
+ ConfigurationFactory _factory = null;
+
+ ///
+ /// Currently runnig script
+ ///
+ Script _runningScript = null;
+
+ ///
+ /// Handles the Click event of the btnExecute control.
+ ///
+ /// The source of the event.
+ /// The instance containing the event data.
+ private void btnGenerate_Click(object sender, RoutedEventArgs e)
+ {
+ Debug.Assert(this._factory == null);
+
+ try
+ {
+ OrderInfo order = this.SelectedOrder;
+ Script script = ScriptLoader.GetScript(order.ConfigurationInfo.Script);
+
+ if (script == null)
+ throw new ApplicationException(string.Format("Script '{0}' not found. Cannot start execution!", order.ConfigurationInfo.Script));
+
+ _runningScript = script;
+ _runningScript.StatusChanged += new EventHandler(script_StatusChanged);
+
+ VsFactory fact = new VsFactory();
+
+ if (_runningScript is ScriptEarlyBound)
+ this._factory = new EarlyBoundFactory(fact);
+ else if (_runningScript is ScriptLateBound)
+ this._factory = new LateBoundFactory(fact);
+
+ if (this._factory == null)
+ {
+ throw new ApplicationException("Generator not found!");
+ }
+
+ OrderScriptContext context = new OrderScriptContext(this._factory, order);
+
+ _worker = new ScriptBackgroundWorker(/*this._factory,*/ _runningScript, context);
+ this.Update(_runningScript);
+ _worker.ConfigurationInitialized += new EventHandler(_worker_ConfigurationInitialized);
+ _worker.ProgressChanged += new ProgressChangedEventHandler(_worker_ProgressChanged);
+ _worker.ProgressStatusChanged += new EventHandler(_worker_ProgressStatusChanged);
+ _worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(_worker_RunWorkerCompleted);
+ _factory.AppID = this.DTEInfo.ProgId;
+ _factory.IsIdeVisible = this.IsIDEVisible;
+ _factory.IsIdeUserControl = this.IsIDEUserControl;
+ _factory.SuppressUI = this.SupressUI;
+ SetExecution(true);
+ _worker.BeginScriptExecution();
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show(ex.Message, "Error");
+ }
+ }
+
+ void _worker_ConfigurationInitialized(object sender, EventArgs e)
+ {
+ Action action = () =>
+ {
+ this.cbProgVisible.IsChecked = _factory.IsIdeVisible;
+ this.cbSuppressUI.IsChecked = _factory.SuppressUI;
+ this.cbUserControl.IsChecked = _factory.IsIdeUserControl;
+ };
+
+ this.Dispatcher.Invoke(action, new object[] { });
+ }
+
+ void _worker_ProgressStatusChanged(object sender, ProgressStatusChangedArgs e)
+ {
+ if (this.Dispatcher.CheckAccess())
+ {
+ int index = this.lvMessages.Items.Add(e.Status);
+ object item = this.lvMessages.Items[index];
+ this.lvMessages.ScrollIntoView(item);
+ }
+ else
+ {
+ Action action = (str) =>
+ {
+ int index = this.lvMessages.Items.Add(str);
+ object item = this.lvMessages.Items[index];
+ this.lvMessages.ScrollIntoView(item);
+ };
+
+ this.Dispatcher.Invoke(action, new object[] { e.Status });
+ }
+ }
+
+ ///
+ /// Handles the StatusChanged event of the script control.
+ ///
+ /// The source of the event.
+ /// The instance containing the event data.
+ void script_StatusChanged(object sender, ScriptStatusChangedEventArgs e)
+ {
+ Action
+
+
+
+
+ 2-Axes, PTP Motion, Servo Terminal not included
+
+ MachineTypeA
+
+
+ Tc2_Standard
+ Tc2_System
+ Tc3_Interfaces
+ Tc3_Module
+ Tc2_MC2
+ Tc2_MC2_Drive
+ Templates/MachineTypeA/POUs/FB_Axis.xml
+ Templates/MachineTypeA/POUs/MAIN.xml
+ >
+
+
+
+
+ Templates/MachineTypeA/Axis1.xml
+ Templates/MachineTypeA/Axis2.xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Templates/MachineTypeA/Links.xml
+
+
+
+
+
+
+
+
+ 4-Axes, NCI
+
+ MachineTypeB
+
+
+ Tc2_Standard
+ Tc2_System
+ Tc3_Interfaces
+ Tc3_Module
+ Tc2_MC2
+ Tc2_NCI
+ Templates/MachineTypeB/Datatypes/E_Commands.xml
+ Templates/MachineTypeB/Datatypes/E_NCI_CTRL_STATE.xml
+ Templates/MachineTypeB/Datatypes/E_States.xml
+ Templates/MachineTypeB/GVLs/GlobalVariables.xml
+ Templates/MachineTypeB/POUs/FB_NciChannel.xml
+ Templates/MachineTypeB/POUs/FB_NciSequence.xml
+ Templates/MachineTypeB/POUs/MAIN.xml
+
+
+
+
+
+ Templates/MachineTypeB/Axis1.xml
+ Templates/MachineTypeB/Axis2.xml
+ Templates/MachineTypeB/Axis3.xml
+ Templates/MachineTypeB/Axis4.xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Templates/MachineTypeB/Links.xml
+
+
+
+
+
+ PLC project, Measurement project
+
+ MachineTypeD
+
+ Tc2_Standard
+ Tc2_System
+ Tc3_Interfaces
+ Tc3_Module
+ Templates/MachineTypeD/Datatypes/E_FunctionType.xml
+ Templates/MachineTypeD/POUs/FB_FunctionGenerator.xml
+ Templates/MachineTypeD/POUs/MAIN.xml
+ Templates/MachineTypeD/GVLs/GVL_Constants.xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationDemo/Properties/AssemblyInfo.cs b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationDemo/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..d862de2
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationDemo/Properties/AssemblyInfo.cs
@@ -0,0 +1,55 @@
+using System.Reflection;
+using System.Resources;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Windows;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("CodeGenerationDemo")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("CodeGenerationDemo")]
+[assembly: AssemblyCopyright("Copyright © 2012")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+//In order to begin building localizable applications, set
+//CultureYouAreCodingWith in your .csproj file
+//inside a . For example, if you are using US english
+//in your source files, set the to en-US. Then uncomment
+//the NeutralResourceLanguage attribute below. Update the "en-US" in
+//the line below to match the UICulture setting in the project file.
+
+//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
+
+
+[assembly: ThemeInfo(
+ ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
+ //(used if a resource is not found in the page,
+ // or application resource dictionaries)
+ ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
+ //(used if a resource is not found in the page,
+ // app, or any theme specific resource dictionaries)
+)]
+
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationDemo/Properties/Resources.Designer.cs b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationDemo/Properties/Resources.Designer.cs
new file mode 100644
index 0000000..660b444
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationDemo/Properties/Resources.Designer.cs
@@ -0,0 +1,63 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.18052
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace CodeGenerationDemo.Properties {
+ using System;
+
+
+ ///
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ ///
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Resources {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resources() {
+ }
+
+ ///
+ /// Returns the cached ResourceManager instance used by this class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if (object.ReferenceEquals(resourceMan, null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CodeGenerationDemo.Properties.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ ///
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+ }
+}
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationDemo/Properties/Resources.resx b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationDemo/Properties/Resources.resx
new file mode 100644
index 0000000..ffecec8
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationDemo/Properties/Resources.resx
@@ -0,0 +1,117 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationDemo/Properties/Settings.Designer.cs b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationDemo/Properties/Settings.Designer.cs
new file mode 100644
index 0000000..74fbcfe
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationDemo/Properties/Settings.Designer.cs
@@ -0,0 +1,26 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.18052
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace CodeGenerationDemo.Properties {
+
+
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
+ internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
+
+ private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+
+ public static Settings Default {
+ get {
+ return defaultInstance;
+ }
+ }
+ }
+}
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationDemo/Properties/Settings.settings b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationDemo/Properties/Settings.settings
new file mode 100644
index 0000000..8f2fd95
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationDemo/Properties/Settings.settings
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationDemo/ScriptInfo.cs b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationDemo/ScriptInfo.cs
new file mode 100644
index 0000000..3c66039
--- /dev/null
+++ b/src/build-server/samples/CodeGenerationDemoSrc/CodeGenerationDemo/ScriptInfo.cs
@@ -0,0 +1,690 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Xml;
+using ScriptingTest;
+using System.Diagnostics;
+
+/* ===============================================================================================
+ * This CS-File contains multiple helper classes which are being used to represent the information
+ * from Orders.xml in a object hierarchy.
+ * =============================================================================================== */
+namespace CodeGenerationDemo
+{
+ /* ===============================================================================================
+ * Enum which represents a PlcObjectType from Orders.xml
+ * Example:
+ * =============================================================================================== */
+ public enum PlcObjectType
+ {
+ DataType,
+ Library,
+ Placeholder,
+ POU,
+ Itf,
+ Gvl
+ }
+
+ /* ===============================================================================================
+ * This class represents order information (all nodes below ) from Orders.xml
+ * and also creates the corresponding ConfigurationInfo (looks for corresponding configuration
+ * below according to configuration ID)
+ * =============================================================================================== */
+ public class OrderInfo
+ {
+ /* ===============================================================================================
+ * Global variables
+ * =============================================================================================== */
+ private ConfigurationInfo _configurationInfo;
+ private string _id;
+ private string _customer;
+ private DateTime _delivery;
+ private string _projectName;
+ private string _description;
+ private int _serial;
+
+ /* ===============================================================================================
+ * Constructor
+ * =============================================================================================== */
+ public OrderInfo(XmlElement orderNode)
+ {
+ if (orderNode == null) throw new ArgumentNullException("orderNode");
+
+ XmlDocument doc = orderNode.OwnerDocument;
+
+ _id = orderNode.Attributes["id"].Value;
+
+ XmlNode configRefNode = orderNode.SelectSingleNode("Configuration");
+ string configurationId = configRefNode.InnerText;
+
+ // look for corresponding configuration under according to its ID
+ string xPath = string.Format("//Root/AvailableConfigurations/Configuration[@id='{0}']", configurationId);
+ XmlNode configNode = doc.SelectSingleNode(xPath);
+
+ XmlNode customerNode = orderNode.SelectSingleNode("Customer");
+ XmlNode deliveryNode = orderNode.SelectSingleNode("Delivery");
+ XmlNode serialNode = orderNode.SelectSingleNode("SerialNo");
+ XmlNode projectNameNode = orderNode.SelectSingleNode("ProjectName");
+ XmlNode descriptionNode = orderNode.SelectSingleNode("Description");
+
+ this._configurationInfo = new ConfigurationInfo((XmlElement)configNode);
+ this._customer = customerNode.InnerText;
+ this._serial = int.Parse(serialNode.InnerText);
+ this._projectName = projectNameNode.InnerText;
+ this._description = descriptionNode.InnerText;
+ this._delivery = XmlConvert.ToDateTime(deliveryNode.InnerText,XmlDateTimeSerializationMode.Local);
+ }
+
+ public ConfigurationInfo ConfigurationInfo
+ {
+ get { return _configurationInfo; }
+ }
+
+ public string Id
+ {
+ get { return _id; }
+ }
+
+ public string Customer
+ {
+ get { return _customer; }
+ }
+
+ public DateTime Delivery
+ {
+ get { return _delivery; }
+ }
+
+ public string ProjectName
+ {
+ get { return _projectName; }
+ }
+
+ public string Description
+ {
+ get { return _description; }
+ }
+
+ public int Serial
+ {
+ get { return _serial; }
+ }
+ }
+
+
+ /* ===============================================================================================
+ * This class represents configuration information from Orders.xml under
+ * =============================================================================================== */
+ public class ConfigurationInfo
+ {
+ private string _id;
+ private string _name;
+ private string _projectTemplate;
+ private string _script;
+ private string _description;
+ private List _options;
+ private List _plcObjects;
+ private string _plcProjectName;
+ private List _motionTasks;
+ private HardwareInfo _hardware;
+ private MappingsInfo _mappings;
+
+ /* ===============================================================================================
+ * Constructor
+ * =============================================================================================== */
+ public ConfigurationInfo(XmlElement configNode)
+ {
+ XmlDocument doc = configNode.OwnerDocument;
+
+ /* ------------------------------------------------------------------
+ * Read configuration attributes 'id' and 'name'
+ * ------------------------------------------------------------------ */
+ this._id = configNode.Attributes["id"].Value;
+ this._name = configNode.Attributes["name"].Value;
+
+ /* ------------------------------------------------------------------
+ * Read configuration node 'ProjectTemplates'
+ * ------------------------------------------------------------------ */
+ XmlNode projectTemplateNode = configNode.SelectSingleNode("ProjectTemplate");
+ if (projectTemplateNode != null)
+ this._projectTemplate = projectTemplateNode.InnerText;
+
+ /* ------------------------------------------------------------------
+ * Read configuration node 'Script'
+ * ------------------------------------------------------------------ */
+ XmlNode scriptNode = configNode.SelectSingleNode("Script");
+ this._script = scriptNode.InnerText;
+
+ /* ------------------------------------------------------------------
+ * Read configuration node 'Description'
+ * ------------------------------------------------------------------ */
+ XmlNode descriptionNode = configNode.SelectSingleNode("Description");
+ this._description = descriptionNode.InnerText;
+
+ /* ------------------------------------------------------------------
+ * Read configuration node 'Plc\PlcProjectName'
+ * ------------------------------------------------------------------ */
+ XmlNode plcNameNode = configNode.SelectSingleNode("Plc/PlcProjectName");
+ if (plcNameNode != null)
+ _plcProjectName = plcNameNode.InnerText;
+ else
+ _plcProjectName = "GeneratedProject";
+
+ /* ------------------------------------------------------------------
+ * Read configuration node 'Plc\PlcObjects\PlcObject' and all child nodes
+ * ------------------------------------------------------------------ */
+ _plcObjects = new List();
+ XmlNodeList plcObjectNodeList = configNode.SelectNodes("Plc/PlcObjects/PlcObject");
+ addPlcElements(ref _plcObjects, plcObjectNodeList);
+
+ /* ------------------------------------------------------------------
+ * Read configuration node 'Motion\Tasks'
+ * ------------------------------------------------------------------ */
+ _motionTasks = new List();
+ XmlNodeList motionTasksNodeList = configNode.SelectNodes("Motion/Task");
+ addMotionTasks(ref _motionTasks, motionTasksNodeList);
+
+ /* ------------------------------------------------------------------
+ * Read configuration node 'Hardware' and all child nodes
+ * ------------------------------------------------------------------ */
+ XmlElement hardwareElement = (XmlElement)configNode.SelectSingleNode("Hardware");
+ _hardware = new HardwareInfo(hardwareElement);
+
+ /* ------------------------------------------------------------------
+ * Read configuration node 'Mappings' (note: mappings are specified in another XML file)
+ * ------------------------------------------------------------------ */
+ XmlNode mappingsNode = configNode.SelectSingleNode("Mappings");
+ _mappings = new MappingsInfo((XmlElement)mappingsNode);
+
+ /* ------------------------------------------------------------------
+ * Read configuration node 'Options\Option' and all child nodes
+ * ------------------------------------------------------------------ */
+ _options = new List();
+ XmlNodeList optionNodeRefs = configNode.SelectNodes("Options/Option");
+
+ if (optionNodeRefs != null)
+ {
+ foreach (XmlNode optionNodeRef in optionNodeRefs)
+ {
+ string optionId = optionNodeRef.InnerText;
+ string xPath = string.Format("//Root/MachineOptions/Option[@id='{0}']", optionId);
+
+ XmlNode optionNode = doc.SelectSingleNode(xPath);
+
+ if (optionNode != null)
+ {
+ OptionInfo option = new OptionInfo((XmlElement)optionNode);
+ _options.Add(option);
+ }
+ }
+ }
+ }
+
+
+ /* ===============================================================================================
+ * Helper method to iterate over all child nodes of Plc\PlcObjects in Orders.xml
+ * =============================================================================================== */
+ private void addPlcElements(ref List list, XmlNodeList xmlElements)
+ {
+ if (xmlElements != null)
+ {
+ foreach (XmlElement element in xmlElements)
+ {
+ PlcObjectType type = (PlcObjectType)Enum.Parse(typeof(PlcObjectType),element.Attributes["type"].Value);
+ PlcObjectInfo info = null;
+
+ switch (type)
+ {
+ case PlcObjectType.Library:
+ info = new LibraryInfo(element);
+ break;
+ case PlcObjectType.Placeholder:
+ info = new PlaceholderInfo(element);
+ break;
+ case PlcObjectType.DataType:
+ info = new DataTypeInfo(element);
+ break;
+ case PlcObjectType.POU:
+ info = new POUInfo(element);
+ break;
+ case PlcObjectType.Itf:
+ info = new ItfInfo(element);
+ break;
+ case PlcObjectType.Gvl:
+ info = new GvlInfo(element);
+ break;
+ default:
+ Debug.Fail("");
+ break;
+ }
+
+ if (info != null)
+ list.Add(info);
+ }
+ }
+ }
+
+
+ /* ===============================================================================================
+ * Helper method to iterate over all child nodes of Motion\Task in Orders.xml
+ * =============================================================================================== */
+ private void addMotionTasks(ref List _motionTasks, XmlNodeList motionTasksNodeList)
+ {
+ foreach (XmlElement element in motionTasksNodeList)
+ {
+ TaskInfo taskInfo = new TaskInfo(element);
+ _motionTasks.Add(taskInfo);
+ }
+ }
+
+ #region ConfigurationInfoGetterSetter
+
+ public string Id
+ {
+ get { return _id; }
+ }
+
+ public string Name
+ {
+ get { return _name; }
+ }
+
+ public string ProjectTemplate
+ {
+ get { return _projectTemplate; }
+ }
+
+ public string Script
+ {
+ get { return _script; }
+ }
+
+ public string Description
+ {
+ get { return _description; }
+ }
+
+ public List Options
+ {
+ get { return _options; }
+ }
+
+ public List PlcObjects
+ {
+ get { return _plcObjects; }
+ }
+
+ public string PlcProjectName
+ {
+ get { return _plcProjectName; }
+ }
+
+ public List MotionTasks
+ {
+ get { return _motionTasks; }
+ }
+
+ public HardwareInfo Hardware
+ {
+ get { return _hardware; }
+ }
+
+ public MappingsInfo Mappings
+ {
+ get { return _mappings; }
+ }
+
+ #endregion
+ }
+
+ #region HelperClassesToRepresentConfigurationFromOrdersXml
+
+ /* ===============================================================================================
+ * This abstract class represents a PlcObject from Orders.xml
+ * =============================================================================================== */
+ public abstract class PlcObjectInfo
+ {
+ protected PlcObjectInfo(XmlElement element)
+ {
+ this._type = (PlcObjectType)Enum.Parse(typeof(PlcObjectType),element.Attributes["type"].Value);
+ }
+
+ protected PlcObjectType _type;
+
+ public PlcObjectType Type
+ {
+ get { return _type;}
+ }
+ }
+
+
+ /* ===============================================================================================
+ * This abstract class inherits from PlcObjectInfo
+ * =============================================================================================== */
+ public abstract class WorksheetInfo : PlcObjectInfo
+ {
+ protected WorksheetInfo(XmlElement element)
+ : base(element)
+ {
+ this._plcPath = element.Attributes["path"].Value;
+ this._templatePath = element.InnerText;
+ }
+
+ private string _plcPath;
+ public string PlcPath
+ {
+ get { return _plcPath; }
+ }
+
+ private string _templatePath;
+ public string TemplatePath
+ {
+ get { return _templatePath; }
+ }
+ }
+
+
+ /* ===============================================================================================
+ * This class represents a PlcObject of type "POU" in Orders.xml
+ * =============================================================================================== */
+ public class POUInfo : WorksheetInfo
+ {
+ public POUInfo(XmlElement element)
+ : base(element)
+ {
+ }
+ }
+
+
+ /* ===============================================================================================
+ * This class represents a PlcObject of type "Gvl" in Orders.xml
+ * =============================================================================================== */
+ public class GvlInfo : WorksheetInfo
+ {
+ public GvlInfo(XmlElement element)
+ : base(element)
+ {
+ }
+
+ }
+
+
+ /* ===============================================================================================
+ * This class represents a PlcObject of type "Itf" in Orders.xml
+ * =============================================================================================== */
+ public class ItfInfo : WorksheetInfo
+ {
+ public ItfInfo(XmlElement element)
+ : base(element)
+ {
+ }
+ }
+
+
+ /* ===============================================================================================
+ * This class represents a PlcObject of type "DataType" in Orders.xml
+ * =============================================================================================== */
+ public class DataTypeInfo : WorksheetInfo
+ {
+ public DataTypeInfo(XmlElement element)
+ : base(element)
+ {
+ }
+
+ }
+
+
+ /* ===============================================================================================
+ * This class represents a PlcObject of type "Library" in Orders.xml
+ * =============================================================================================== */
+ public class LibraryInfo : PlcObjectInfo
+ {
+ public LibraryInfo(XmlElement element)
+ : base(element)
+ {
+ this._libraryName = element.InnerText;
+ }
+
+ private string _libraryName;
+ public string LibraryName
+ {
+ get { return _libraryName; }
+ }
+ }
+
+
+ /* ===============================================================================================
+ * This class represents a PlcObject of type "Placeholder" in Orders.xml
+ * =============================================================================================== */
+ public class PlaceholderInfo : PlcObjectInfo
+ {
+ public PlaceholderInfo(XmlElement element)
+ : base(element)
+ {
+ this._placeholderName = element.InnerText;
+ }
+
+ private string _placeholderName;
+ public string PlaceholderName
+ {
+ get { return _placeholderName; }
+ }
+ }
+
+
+ /* ===============================================================================================
+ * This class represents