aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2018-07-04 15:57:56 +0300
committerShlomo Hecht <shlomo@twine-s.com>2018-07-04 15:57:56 +0300
commitfdf45caba5c70e4a368ab5fc62398ac3cccc697c (patch)
treec60b9c924b085ff8af3f614af22b852dd3b7c22a
parent1246a201b4600899b4e11243ffb9ff300674750d (diff)
downloadTango-fdf45caba5c70e4a368ab5fc62398ac3cccc697c.tar.gz
Tango-fdf45caba5c70e4a368ab5fc62398ac3cccc697c.zip
Stubs collection
-rw-r--r--Software/Stubs Collection/stubs/2Way_valve.cs43
-rw-r--r--Software/Stubs Collection/stubs/AbortJob.cs19
-rw-r--r--Software/Stubs Collection/stubs/Connect.cs24
-rw-r--r--Software/Stubs Collection/stubs/HardwareConfig.cs59
-rw-r--r--Software/Stubs Collection/stubs/HardwareConfiguration.cs97
-rw-r--r--Software/Stubs Collection/stubs/HeadHeaterTest.cs47
-rw-r--r--Software/Stubs Collection/stubs/HeaterTest1.cs81
-rw-r--r--Software/Stubs Collection/stubs/HeaterTest2.cs86
-rw-r--r--Software/Stubs Collection/stubs/HeaterTest3.cs81
-rw-r--r--Software/Stubs Collection/stubs/HeaterTest4.cs93
-rw-r--r--Software/Stubs Collection/stubs/HeaterTest5.cs98
-rw-r--r--Software/Stubs Collection/stubs/JobRequest 2 segments 2 dispensers no intersegment.cs193
-rw-r--r--Software/Stubs Collection/stubs/JobRequest 2 segments.cs167
-rw-r--r--Software/Stubs Collection/stubs/JobRequest.cs143
-rw-r--r--Software/Stubs Collection/stubs/MidTankControl.cs17
-rw-r--r--Software/Stubs Collection/stubs/MotorInit.cs38
-rw-r--r--Software/Stubs Collection/stubs/MotorSpeedSet.cs29
-rw-r--r--Software/Stubs Collection/stubs/Motor_Get_Param_Horizontal_Printing.cs114
-rw-r--r--Software/Stubs Collection/stubs/PT100.cs25
-rw-r--r--Software/Stubs Collection/stubs/Read Dancer.cs38
-rw-r--r--Software/Stubs Collection/stubs/RealTimeUsage.cs41
-rw-r--r--Software/Stubs Collection/stubs/ScrewMotorMov.cs84
-rw-r--r--Software/Stubs Collection/stubs/StubHeatingTestPollResponse.cs22
-rw-r--r--Software/Stubs Collection/stubs/Stub_scripts.rarbin0 -> 32486 bytes
-rw-r--r--Software/Stubs Collection/stubs/SystemHeatingTest.cs442
-rw-r--r--Software/Stubs Collection/stubs/SystemTest.cs0
-rw-r--r--Software/Stubs Collection/stubs/SystemTestAdvanced.cs525
-rw-r--r--Software/Stubs Collection/stubs/SystemTestAdvanced1.cs559
-rw-r--r--Software/Stubs Collection/stubs/SystemTestWithHeaters.cs559
-rw-r--r--Software/Stubs Collection/stubs/SystemTestWithHeatersIncludes.cs94
-rw-r--r--Software/Stubs Collection/stubs/TEST_GPIO_USER_LED.CS38
-rw-r--r--Software/Stubs Collection/stubs/TestDispenser7.cs69
-rw-r--r--Software/Stubs Collection/stubs/ThreadLoading.cs119
-rw-r--r--Software/Stubs Collection/stubs/Turn_the_user_led_off.cs17
-rw-r--r--Software/Stubs Collection/stubs/addedfiles/ACHeatersDefinition.cs62
-rw-r--r--Software/Stubs Collection/stubs/addedfiles/DCHeatersDefinition.cs134
-rw-r--r--Software/Stubs Collection/stubs/addedfiles/DancersConfiguration.cs48
-rw-r--r--Software/Stubs Collection/stubs/addedfiles/DeskSystemThreadMotorsDefinition.cs382
-rw-r--r--Software/Stubs Collection/stubs/addedfiles/DispensersConfiguration.cs62
-rw-r--r--Software/Stubs Collection/stubs/addedfiles/MotorsConfiguration.cs317
-rw-r--r--Software/Stubs Collection/stubs/addedfiles/PID_Configuration.cs76
-rw-r--r--Software/Stubs Collection/stubs/addedfiles/ThreadMotorsDefinition.cs314
-rw-r--r--Software/Stubs Collection/stubs/addedfiles/ThreadMotorsDefinition1.cs316
-rw-r--r--Software/Stubs Collection/stubs/addedfiles/ThreadMotorsDefinition2.cs316
-rw-r--r--Software/Stubs Collection/stubs/addedfiles/newDeskSystemThreadMotorsDefinition.cs434
-rw-r--r--Software/Stubs Collection/stubs/fpgaTest.cs29
-rw-r--r--Software/Stubs Collection/stubs/fpgaversionandtest.cs61
-rw-r--r--Software/Stubs Collection/stubs/heatercommand.cs38
-rw-r--r--Software/Stubs Collection/stubs/michael stubs/Assemblies/Catridge_GPIs.cs52
-rw-r--r--Software/Stubs Collection/stubs/michael stubs/Assemblies/Diagnosticsrequest.cs173
-rw-r--r--Software/Stubs Collection/stubs/michael stubs/Assemblies/Dispenser_3WValve.cs73
-rw-r--r--Software/Stubs Collection/stubs/michael stubs/Assemblies/Dispenser_EncoderGPIO.cs48
-rw-r--r--Software/Stubs Collection/stubs/michael stubs/Assemblies/Dispenser_LimitSwitch.cs98
-rw-r--r--Software/Stubs Collection/stubs/michael stubs/Assemblies/Dispenser_Motors.cs51
-rw-r--r--Software/Stubs Collection/stubs/michael stubs/Assemblies/Dispenser_PressureSensor.cs40
-rw-r--r--Software/Stubs Collection/stubs/michael stubs/Assemblies/Dispenser_SSI.cs82
-rw-r--r--Software/Stubs Collection/stubs/michael stubs/Assemblies/Dryer_Motors.cs44
-rw-r--r--Software/Stubs Collection/stubs/michael stubs/Assemblies/Dryer_QEI.cs35
-rw-r--r--Software/Stubs Collection/stubs/michael stubs/Assemblies/DyeingHead_Motors.cs44
-rw-r--r--Software/Stubs Collection/stubs/michael stubs/Assemblies/DyeingHead_PT100.cs155
-rw-r--r--Software/Stubs Collection/stubs/michael stubs/Assemblies/DyeingHead_Valve.cs32
-rw-r--r--Software/Stubs Collection/stubs/michael stubs/Assemblies/ElectricalEnclosure_Fans.cs42
-rw-r--r--Software/Stubs Collection/stubs/michael stubs/Assemblies/ElectricalEnclosure_SSR_DH.cs53
-rw-r--r--Software/Stubs Collection/stubs/michael stubs/Assemblies/ElectricalEnclosure_SSR_Dryer.cs37
-rw-r--r--Software/Stubs Collection/stubs/michael stubs/Assemblies/ElectricalEnclosure_SSR_Misc.cs51
-rw-r--r--Software/Stubs Collection/stubs/michael stubs/Assemblies/LTFU_LimitSwitch.cs103
-rw-r--r--Software/Stubs Collection/stubs/michael stubs/Assemblies/LTFU_Motors.cs74
-rw-r--r--Software/Stubs Collection/stubs/michael stubs/Assemblies/LTFU_SSI.cs76
-rw-r--r--Software/Stubs Collection/stubs/michael stubs/Assemblies/Midtank_Float.cs72
-rw-r--r--Software/Stubs Collection/stubs/michael stubs/Assemblies/Midtank_Valves.cs32
-rw-r--r--Software/Stubs Collection/stubs/michael stubs/Assemblies/RTFU_GPO.cs33
-rw-r--r--Software/Stubs Collection/stubs/michael stubs/Assemblies/RTFU_LimitSwitch.cs86
-rw-r--r--Software/Stubs Collection/stubs/michael stubs/Assemblies/RTFU_Motors.cs66
-rw-r--r--Software/Stubs Collection/stubs/michael stubs/Assemblies/RTFU_SSI.cs82
-rw-r--r--Software/Stubs Collection/stubs/michael stubs/Assemblies/Spare_Motors.cs53
-rw-r--r--Software/Stubs Collection/stubs/michael stubs/Assemblies/WHS_Analog.cs33
-rw-r--r--Software/Stubs Collection/stubs/michael stubs/Assemblies/Winder_Motors.cs55
-rw-r--r--Software/Stubs Collection/stubs/michael stubs/Assemblies/Winder_QEI_Test.cs77
-rw-r--r--Software/Stubs Collection/stubs/michael stubs/Assemblies/Winder_Screw_Motors.cs113
-rw-r--r--Software/Stubs Collection/stubs/michael stubs/Assemblies/screw_motor.cs113
-rw-r--r--Software/Stubs Collection/stubs/michael stubs/Interfaces/Tango_Defines_3WValve.cs16
-rw-r--r--Software/Stubs Collection/stubs/michael stubs/Interfaces/Tango_Defines_GPI.cs33
-rw-r--r--Software/Stubs Collection/stubs/michael stubs/Interfaces/Tango_Defines_GPIO.cs17
-rw-r--r--Software/Stubs Collection/stubs/michael stubs/Interfaces/Tango_Defines_GPO.cs21
-rw-r--r--Software/Stubs Collection/stubs/michael stubs/Interfaces/Tango_Defines_LimitSwitch.cs39
-rw-r--r--Software/Stubs Collection/stubs/michael stubs/Interfaces/Tango_Defines_Motors.cs413
-rw-r--r--Software/Stubs Collection/stubs/michael stubs/Interfaces/Tango_Defines_PT100.cs219
-rw-r--r--Software/Stubs Collection/stubs/michael stubs/Interfaces/Tango_Defines_QEI.cs37
-rw-r--r--Software/Stubs Collection/stubs/michael stubs/Interfaces/Tango_Defines_SSI.cs76
-rw-r--r--Software/Stubs Collection/stubs/michael stubs/Interfaces/Tango_Defines_SSR.cs20
-rw-r--r--Software/Stubs Collection/stubs/michael stubs/Interfaces/Tango_Defines_Tacho.cs27
-rw-r--r--Software/Stubs Collection/stubs/michael stubs/Read_SW_FPGA_Version.cs115
-rw-r--r--Software/Stubs Collection/stubs/michael stubs/Stub_scripts.rarbin0 -> 32486 bytes
-rw-r--r--Software/Stubs Collection/stubs/michael stubs/Tango_Defines_Basic.cs92
-rw-r--r--Software/Stubs Collection/stubs/motorInitForMichael.cs75
-rw-r--r--Software/Stubs Collection/stubs/motorrun.cs35
-rw-r--r--Software/Stubs Collection/stubs/readPosition.cs30
-rw-r--r--Software/Stubs Collection/stubs/rightdancercontrol.cs191
-rw-r--r--Software/Stubs Collection/stubs/shutdownheaters.cs25
-rw-r--r--Software/Stubs Collection/stubs/simple job request.cs143
-rw-r--r--Software/Stubs Collection/stubs/systemreset.cs21
-rw-r--r--Software/Stubs Collection/stubs/test dryer.cs69
-rw-r--r--Software/Stubs Collection/stubs/testinterface.cs34
103 files changed, 10576 insertions, 0 deletions
diff --git a/Software/Stubs Collection/stubs/2Way_valve.cs b/Software/Stubs Collection/stubs/2Way_valve.cs
new file mode 100644
index 000000000..7c9a9923b
--- /dev/null
+++ b/Software/Stubs Collection/stubs/2Way_valve.cs
@@ -0,0 +1,43 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+const Int32 FPGA3 = 0x60000800;
+const Int32 F3_VALVE_OUT = 0x0E2;
+
+const Int32 MIDTANK2MANIF4_VALVE_2 = 1 << 0;
+const Int32 MIDTANK2MANIF4_VALVE_1 = 1 << 1;
+const Int32 MIDTANK2MANIF3_VALVE_2 = 1 << 2;
+const Int32 MIDTANK2MANIF3_VALVE_1 = 1 << 3;
+const Int32 MIDTANK2MANIF2_VALVE_2 = 1 << 4;
+const Int32 MIDTANK2MANIF2_VALVE_1 = 1 << 5;
+const Int32 MIDTANK2MANIF1_VALVE_2 = 1 << 6;
+const Int32 MIDTANK2MANIF1_VALVE_1 = 1 << 7;
+const Int32 CART2MIDTANK4_VALVE_2 = 1 << 8;
+const Int32 CART2MIDTANK4_VALVE_1 = 1 << 9;
+const Int32 CART2MIDTANK3_VALVE_2 = 1 << 10;
+const Int32 CART2MIDTANK3_VALVE_1 = 1 << 11;
+const Int32 CART2MIDTANK2_VALVE_2 = 1 << 12;
+const Int32 CART2MIDTANK2_VALVE_1 = 1 << 13;
+const Int32 CART2MIDTANK1_VALVE_2 = 1 << 14;
+const Int32 CART2MIDTANK1_VALVE_1 = 1 << 15;
+
+public void OnExecute(StubManager stubManager)
+{
+ //ON
+ var response = stubManager.Run<StubFpgaReadRegResponse>("StubFpgaReadRegRequest" , FPGA3 + F3_VALVE_OUT);
+ stubManager.Run<StubFpgaWriteRegResponse>("StubFpgaWriteRegRequest" ,FPGA3 | F3_VALVE_OUT, response | MIDTANK2MANIF4_VALVE_2); // ON
+
+
+ //OFF
+ var response1 = stubManager.Run<StubFpgaReadRegResponse>("StubFpgaReadRegRequest" , FPGA3 + F3_VALVE_OUT);
+ stubManager.Run<StubFpgaWriteRegResponse>("StubFpgaWriteRegRequest" ,FPGA3 + F3_VALVE_OUT, response1 & ~MIDTANK2MANIF4_VALVE_2); // OFF
+} \ No newline at end of file
diff --git a/Software/Stubs Collection/stubs/AbortJob.cs b/Software/Stubs Collection/stubs/AbortJob.cs
new file mode 100644
index 000000000..39dc6d083
--- /dev/null
+++ b/Software/Stubs Collection/stubs/AbortJob.cs
@@ -0,0 +1,19 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Printing;
+using Tango.Stubs;
+
+public void OnExecute(StubManager stubManager)
+{
+
+AbortJobRequest abortJobRequest = new AbortJobRequest();
+ var response = stubManager.Run<AbortJobResponse>(abortJobRequest);
+
+} \ No newline at end of file
diff --git a/Software/Stubs Collection/stubs/Connect.cs b/Software/Stubs Collection/stubs/Connect.cs
new file mode 100644
index 000000000..e616844c8
--- /dev/null
+++ b/Software/Stubs Collection/stubs/Connect.cs
@@ -0,0 +1,24 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Connection;
+using Tango.Stubs.UI;
+
+public void OnExecute(StubManager stubManager)
+{
+ stubManager.RequestTimeout = 100;
+
+ConnectRequest connectRequest = new ConnectRequest();
+connectRequest.Password = "1234";
+
+ {
+ var response = stubManager.Run<ConnectResponse>(connectRequest);
+
+ }
+} \ No newline at end of file
diff --git a/Software/Stubs Collection/stubs/HardwareConfig.cs b/Software/Stubs Collection/stubs/HardwareConfig.cs
new file mode 100644
index 000000000..19f51c4e6
--- /dev/null
+++ b/Software/Stubs Collection/stubs/HardwareConfig.cs
@@ -0,0 +1,59 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Hardware;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+
+public void OnExecute(StubManager stubManager)
+{
+
+UploadHardwareConfigurationRequest uploadHardwareConfigurationRequest = new UploadHardwareConfigurationRequest();
+
+HardwareConfiguration hardwareConfiguration = new HardwareConfiguration();
+
+
+StubMotorInitRequest stubMotorInitRequest = new StubMotorInitRequest();
+stubMotorInitRequest.MotorID = 0;
+stubMotorInitRequest.MicroSteps = 0;
+stubMotorInitRequest.SetMicroSteps = false;
+stubMotorInitRequest.ACC = 0;
+stubMotorInitRequest.SetACC = false;
+stubMotorInitRequest.DEC = 0;
+stubMotorInitRequest.SetDec = false;
+stubMotorInitRequest.MaxSpeed = 0;
+stubMotorInitRequest.SetMaxSpeed = false;
+
+HardwareMotor hardwareMotor = new HardwareMotor();
+hardwareMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoDryerDriving;
+hardwareMotor.MinFrequency = 0;
+hardwareMotor.MaxFrequency = 8000;
+hardwareMotor.MinMicroStep = 8;
+hardwareMotor.MaxMicroStep = 8;
+hardwareMotor.LinearRatio = 0;
+hardwareMotor.MedianPosition = 0;
+hardwareMotor.CorrectionGain = 0;
+hardwareMotor.RatioToDryerSpeed = 1;
+hardwareMotor.Kp = 500;
+hardwareMotor.Ki = 100;
+hardwareMotor.Kd = 0;
+hardwareMotor.ChangeSlope = 0;
+hardwareMotor.HighLengthMicroSecond = 0;
+hardwareMotor.SpeedMaster = true;
+hardwareConfiguration.Motors.Add(hardwareMotor);
+
+
+uploadHardwareConfigurationRequest.HardwareConfiguration = hardwareConfiguration;
+
+var response = stubManager.Run<UploadHardwareConfigurationResponse>(uploadHardwareConfigurationRequest);
+
+
+}
+
diff --git a/Software/Stubs Collection/stubs/HardwareConfiguration.cs b/Software/Stubs Collection/stubs/HardwareConfiguration.cs
new file mode 100644
index 000000000..3e49edf5b
--- /dev/null
+++ b/Software/Stubs Collection/stubs/HardwareConfiguration.cs
@@ -0,0 +1,97 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Hardware;
+using Tango.PMR.Printing;
+using Tango.PMR.Stubs;
+using Tango.Stubs;
+
+include "D:\stubs\addedfiles\ACHeatersDefinition.cs"
+include "D:\stubs\addedfiles\DCHeatersDefinition.cs"
+include "D:\stubs\addedfiles\MotorsConfiguration.cs"
+include "D:\stubs\addedfiles\DispensersConfiguration.cs"
+include "D:\stubs\addedfiles\DancersConfiguration.cs"
+include "D:\stubs\addedfiles\PID_Configuration.cs"
+
+public void OnExecute(StubManager stubManager)
+{
+ Thread.Sleep(10);
+
+/*ProcessParameters processParameters = new ProcessParameters();
+processParameters.DyeingSpeed = 10;
+processParameters.MixerTemp = 0;
+processParameters.DryerBufferLength = 0;
+processParameters.MinInkUptake = 0;
+processParameters.HeadZone1Temp = 0;
+processParameters.DryerZone1Temp = 100;
+processParameters.FeederTension = 0;
+processParameters.DryerZone2Temp = 100;
+processParameters.HeadZone2Temp = 0;
+processParameters.PullerTension = 0;
+processParameters.HeadZone3Temp = 0;
+processParameters.DryerZone3Temp = 0;
+processParameters.WinderTension = 0;
+processParameters.HeadAirFlow = 0;
+processParameters.DryerAirFlow = 0;
+processParameters.TableIndex = 0;
+
+uploadProcessParametersRequest.ProcessParameters = processParameters;
+var response1 = stubManager.Run<UploadProcessParametersResponse>(uploadProcessParametersRequest);
+*/
+
+UploadHardwareConfigurationRequest uploadHardwareConfigurationRequest = new UploadHardwareConfigurationRequest();
+
+HardwareConfiguration hardwareConfiguration = new HardwareConfiguration();
+
+//hardwareConfiguration.PidControls.Add(HeadZ1Heater);
+//hardwareConfiguration.PidControls.Add(HeadZ2Heater);
+//hardwareConfiguration.PidControls.Add(HeadZ3Heater);
+//hardwareConfiguration.PidControls.Add(HeadZ4Heater);
+//hardwareConfiguration.PidControls.Add(MixerHeater);
+
+//hardwareConfiguration.PidControls.Add(DryerHeater1000);
+//hardwareConfiguration.PidControls.Add(DryerHeater200w1);
+
+
+hardwareConfiguration.Motors.Add(FeederMotor);
+hardwareConfiguration.Motors.Add(WinderMotor);
+hardwareConfiguration.Motors.Add(DryerMotor);
+hardwareConfiguration.Motors.Add(PoolerMotor);
+hardwareConfiguration.Motors.Add(ScrewMotor);
+//hardwareConfiguration.Motors.Add(LeftRockerMotor);
+//hardwareConfiguration.Motors.Add(RightRockerMotor);
+//hardwareConfiguration.Motors.Add(Dispenser4Motor);
+hardwareConfiguration.Motors.Add(Dispenser7Motor);
+hardwareConfiguration.Motors.Add(Dispenser8Motor);
+
+hardwareConfiguration.Dispensers.Add(hardware7Dispenser);
+hardwareConfiguration.Dispensers.Add(hardware8Dispenser);
+
+hardwareConfiguration.PidControls.Add(FeederPidControl);
+hardwareConfiguration.PidControls.Add(PoolerPidControl);
+hardwareConfiguration.PidControls.Add(WinderPidControl);
+
+hardwareConfiguration.Dancers.Add(FeederDancer);
+hardwareConfiguration.Dancers.Add(PoolerDancer);
+hardwareConfiguration.Dancers.Add(WinderDancer);
+
+hardwareConfiguration.Winders.Add(Winder);
+
+
+
+stubManager.WriteLine("data.data length = " + hardwareConfiguration.CalculateSize());
+
+
+uploadHardwareConfigurationRequest.HardwareConfiguration = hardwareConfiguration;
+var response = stubManager.Run<UploadHardwareConfigurationResponse>(uploadHardwareConfigurationRequest);
+ /*Thread.Sleep(5000);*/
+
+
+}
+
diff --git a/Software/Stubs Collection/stubs/HeadHeaterTest.cs b/Software/Stubs Collection/stubs/HeadHeaterTest.cs
new file mode 100644
index 000000000..2caa91cfa
--- /dev/null
+++ b/Software/Stubs Collection/stubs/HeadHeaterTest.cs
@@ -0,0 +1,47 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+public void OnExecute(StubManager stubManager)
+{
+// Request ----
+// UInt32 : HeaterGroupId
+// Boolean : HeaterGroupOn
+// UInt32 : HeaterTemperatureReq
+
+// Response ----
+// UInt32 : HeaterGroupId
+// UInt32 : HeaterTemperatureSensor
+// String : Status
+// UInt32 : StatusWord
+//var response = stubManager.Run<StubHeaterResponse>("StubHeaterRequest" ,3, true, 300);
+ for (int i = 0; i < 1000; i++)
+ {
+// Request ----
+// UInt32 : STempSensorID
+
+// Response ----
+// UInt32 : TempSensorID
+// UInt32 : TemperatureCMultBy100
+/*var response1 = stubManager.Run<StubTempSensorResponse>("StubTempSensorRequest" ,1);
+var response2 = stubManager.Run<StubTempSensorResponse>("StubTempSensorRequest" ,2);
+var response3 = stubManager.Run<StubTempSensorResponse>("StubTempSensorRequest" ,3);
+var response4 = stubManager.Run<StubTempSensorResponse>("StubTempSensorRequest" ,4);
+var response5 = stubManager.Run<StubTempSensorResponse>("StubTempSensorRequest" ,5);
+stubManager.WriteLine (String.Format("Temperature, Head1: {0}, Head2: {1}, Head3: {2} Head4: {3} Head5: {4}",response1.TemperatureCMultBy100,response2.TemperatureCMultBy100,response3.TemperatureCMultBy100,response4.TemperatureCMultBy100,response5.TemperatureCMultBy100));*/
+var response6 = stubManager.Run<StubTempSensorResponse>("StubTempSensorRequest" ,6);
+var response7 = stubManager.Run<StubTempSensorResponse>("StubTempSensorRequest" ,7);
+var response8 = stubManager.Run<StubTempSensorResponse>("StubTempSensorRequest" ,8);
+stubManager.WriteLine (String.Format("Temperature, Dryer1: {0}, Dryer2: {1}, Dryer3: {2} ",response6.TemperatureCMultBy100,response7.TemperatureCMultBy100,response8.TemperatureCMultBy100));
+ Thread.Sleep(3000);
+
+ }
+} \ No newline at end of file
diff --git a/Software/Stubs Collection/stubs/HeaterTest1.cs b/Software/Stubs Collection/stubs/HeaterTest1.cs
new file mode 100644
index 000000000..935738e31
--- /dev/null
+++ b/Software/Stubs Collection/stubs/HeaterTest1.cs
@@ -0,0 +1,81 @@
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Stubs;
+using Tango.PMR.Hardware;
+using Tango.Stubs.UI;
+
+public void OnExecute(StubManager stubManager)
+{
+/* for (int i = 0; i < 10; i++)
+ {
+ var response = stubManager.Run<CalculateResponse>("calculate", 10, 5);
+
+ if (response.Sum == 15)
+ {
+ stubManager.WriteLine("OK!");
+ }
+ }
+ */
+
+// Request ----
+// Double : DryerZone1Temp
+// Double : DryerZone2Temp
+// RepeatedField`1 : HardwarePidControl
+// RepeatedField`1 : ProcessParameters
+
+// Response ----
+// UInt32 : HeaterGroupId
+// UInt32 : Zone1Temp
+// UInt32 : Zone2Temp
+// Boolean : Heater1Active
+// Boolean : Heater2Active
+// UInt32 : Heater1Percentage
+// UInt32 : Heater2Percentage
+ HardwarePidControl Pid1 = new HardwarePidControl();
+ HardwarePidControl Pid2 = new HardwarePidControl();
+//Pid1.has_hardwarepidcontroltype = true;
+Pid1.HardwarePidControlType = (HardwarePidControlType)0;
+ // Pid1.has_outputproportionalpowerlimit = true;
+ Pid1.OutputProportionalPowerLimit = 50;
+ // Pid1.has_outputproportionalband = true;
+ Pid1.OutputProportionalBand = 3;
+ // Pid1.has_kp = true;
+ Pid1.Kp = 2.0;
+ //Pid1.has_ki = true;
+ Pid1.Ki = 0.01;
+
+ //Pid2.has_hardwarepidcontroltype = true;
+Pid2.HardwarePidControlType = (HardwarePidControlType)1;
+ // Pid2.has_outputproportionalpowerlimit = true;
+ Pid2.OutputProportionalPowerLimit = 40;
+ // Pid2.has_outputproportionalband = true;
+ Pid2.OutputProportionalBand = 3;
+ // Pid2.has_kp = true;
+ Pid2.Kp = 0.5;
+ //Pid2.has_ki = true;
+ Pid2.Ki = 0.1;
+
+var response = stubManager.Run<StubHeatingTestResponse>("StubHeatingTestRequest" ,200.0, 200.0, Pid1, Pid2);
+while (true)
+ {
+ // Request ----
+
+// Response ----
+// UInt32 : HeaterGroupId
+// UInt32 : Zone1Temp
+// UInt32 : Zone2Temp
+// Boolean : Heater1Active
+// Boolean : Heater2Active
+// UInt32 : Heater1Percentage
+// UInt32 : Heater2Percentage
+ var response1 = stubManager.Run<StubHeatingTestPollResponse>("StubHeatingTestPollRequest" ,0);
+ Thread.Sleep(100);
+ }
+}
+
diff --git a/Software/Stubs Collection/stubs/HeaterTest2.cs b/Software/Stubs Collection/stubs/HeaterTest2.cs
new file mode 100644
index 000000000..92ee0cd89
--- /dev/null
+++ b/Software/Stubs Collection/stubs/HeaterTest2.cs
@@ -0,0 +1,86 @@
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Stubs;
+using Tango.PMR.Hardware;
+using Tango.Stubs.UI;
+
+public void OnExecute(StubManager stubManager)
+{
+/* for (int i = 0; i < 10; i++)
+ {
+ var response = stubManager.Run<CalculateResponse>("calculate", 10, 5);
+
+ if (response.Sum == 15)
+ {
+ stubManager.WriteLine("OK!");
+ }
+ }
+ */
+
+// Request ----
+// Double : DryerZone1Temp
+// Double : DryerZone2Temp
+// RepeatedField`1 : HardwarePidControl
+// RepeatedField`1 : ProcessParameters
+
+// Response ----
+// UInt32 : HeaterGroupId
+// UInt32 : Zone1Temp
+// UInt32 : Zone2Temp
+// Boolean : Heater1Active
+// Boolean : Heater2Active
+// UInt32 : Heater1Percentage
+// UInt32 : Heater2Percentage
+ HardwarePidControl Pid1 = new HardwarePidControl();
+ HardwarePidControl Pid2 = new HardwarePidControl();
+//Pid1.has_hardwarepidcontroltype = true;
+Pid1.HardwarePidControlType = (HardwarePidControlType)0;
+ // Pid1.has_outputproportionalpowerlimit = true;
+ Pid1.OutputProportionalPowerLimit = 50;
+ // Pid1.has_outputproportionalband = true;
+ Pid1.OutputProportionalBand = 3;
+ // Pid1.has_kp = true;
+ Pid1.Kp = 2.0;
+ //Pid1.has_ki = true;
+ Pid1.Ki = 0.01;
+
+ //Pid2.has_hardwarepidcontroltype = true;
+Pid2.HardwarePidControlType = (HardwarePidControlType)1;
+ // Pid2.has_outputproportionalpowerlimit = true;
+ Pid2.OutputProportionalPowerLimit = 40;
+ // Pid2.has_outputproportionalband = true;
+ Pid2.OutputProportionalBand = 3;
+ // Pid2.has_kp = true;
+ Pid2.Kp = 0.5;
+ //Pid2.has_ki = true;
+ Pid2.Ki = 0.1;
+int i=0;
+var response = stubManager.Run<StubHeatingTestResponse>("StubHeatingTestRequest" ,200.0, 200.0, Pid1, Pid2);
+while (true)
+ {
+ // Request ----
+
+// Response ----
+// UInt32 : HeaterGroupId
+// UInt32 : Zone1Temp
+// UInt32 : Zone2Temp
+// Boolean : Heater1Active
+// Boolean : Heater2Active
+// UInt32 : Heater1Percentage
+// UInt32 : Heater2Percentage
+ var response1 = stubManager.Run<StubHeatingTestPollResponse>("StubHeatingTestPollRequest" ,0);
+ stubManager.WriteLine ("{0}, {1}, {2}, {3}, {4}, {5}, {6}",++1,response1.Zone1Temp,response1.Zone2Temp,response1.Heater1Active,response1.Heater2Active,response1.Heater1Percentage,response1.Heater2Percentage);
+
+ Thread.Sleep(100);
+ }
+
+//var debugresponse = stubManager.RunContinuous<debugLogRequest>(response)();
+
+}
+
diff --git a/Software/Stubs Collection/stubs/HeaterTest3.cs b/Software/Stubs Collection/stubs/HeaterTest3.cs
new file mode 100644
index 000000000..fdd653d68
--- /dev/null
+++ b/Software/Stubs Collection/stubs/HeaterTest3.cs
@@ -0,0 +1,81 @@
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Stubs;
+using Tango.PMR.Hardware;
+using Tango.Stubs.UI;
+
+public void OnExecute(StubManager stubManager)
+{
+/* for (int i = 0; i < 10; i++)
+ {
+ var response = stubManager.Run<CalculateResponse>("calculate", 10, 5);
+
+ if (response.Sum == 15)
+ {
+ stubManager.WriteLine("OK!");
+ }
+ }
+ */
+
+// Request ----
+// Double : DryerZone1Temp
+// Double : DryerZone2Temp
+// RepeatedField`1 : HardwarePidControl
+// RepeatedField`1 : ProcessParameters
+
+// Response ----
+// UInt32 : HeaterGroupId
+// UInt32 : Zone1Temp
+// UInt32 : Zone2Temp
+// Boolean : Heater1Active
+// Boolean : Heater2Active
+// UInt32 : Heater1Percentage
+// UInt32 : Heater2Percentage
+ HardwarePidControl Pid1 = new HardwarePidControl();
+ HardwarePidControl Pid2 = new HardwarePidControl();
+//Pid1.has_hardwarepidcontroltype = true;
+Pid1.HardwarePidControlType = (HardwarePidControlType)0;
+ // Pid1.has_outputproportionalpowerlimit = true;
+ Pid1.OutputProportionalPowerLimit = 50;
+ // Pid1.has_outputproportionalband = true;
+ Pid1.OutputProportionalBand = 3;
+ // Pid1.has_kp = true;
+ Pid1.Kp = 2.0;
+ //Pid1.has_ki = true;
+ Pid1.Ki = 0.01;
+
+ //Pid2.has_hardwarepidcontroltype = true;
+Pid2.HardwarePidControlType = (HardwarePidControlType)1;
+ // Pid2.has_outputproportionalpowerlimit = true;
+ Pid2.OutputProportionalPowerLimit = 40;
+ // Pid2.has_outputproportionalband = true;
+ Pid2.OutputProportionalBand = 3;
+ // Pid2.has_kp = true;
+ Pid2.Kp = 0.5;
+ //Pid2.has_ki = true;
+ Pid2.Ki = 0.1;
+
+var response = stubManager.Run<StubHeatingTestResponse>("StubHeatingTestRequest" ,200.0, 200.0, Pid1, Pid2);
+int i=0;
+ // Request ----
+
+// Response ----
+// UInt32 : HeaterGroupId
+// UInt32 : Zone1Temp
+// UInt32 : Zone2Temp
+// Boolean : Heater1Active
+// Boolean : Heater2Active
+// UInt32 : Heater1Percentage
+// UInt32 : Heater2Percentage
+ var response1 = stubManager.RunContinuous<StubHeatingTestPollResponse>(response1){
+ stubManager.WriteLine ("{0}, {1}, {2}, {3}, {4}, {5}, {6}",++1,response1.Zone1Temp,response1.Zone2Temp,response1.Heater1Active,response1.Heater2Active,response1.Heater1Percentage,response1.Heater2Percentage);
+ };
+
+}
+
diff --git a/Software/Stubs Collection/stubs/HeaterTest4.cs b/Software/Stubs Collection/stubs/HeaterTest4.cs
new file mode 100644
index 000000000..697fde3a3
--- /dev/null
+++ b/Software/Stubs Collection/stubs/HeaterTest4.cs
@@ -0,0 +1,93 @@
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Debugging;
+using Tango.PMR.Stubs;
+using Tango.PMR.Hardware;
+using Tango.Stubs.UI;
+
+public void OnExecute(StubManager stubManager)
+{
+/* for (int i = 0; i < 10; i++)
+ {
+ var response = stubManager.Run<CalculateResponse>("calculate", 10, 5);
+
+ if (response.Sum == 15)
+ {
+ stubManager.WriteLine("OK!");
+ }
+ }
+ */
+
+// Request ----
+// Double : DryerZone1Temp
+// Double : DryerZone2Temp
+// RepeatedField`1 : HardwarePidControl
+// RepeatedField`1 : ProcessParameters
+
+// Response ----
+// UInt32 : HeaterGroupId
+// UInt32 : Zone1Temp
+// UInt32 : Zone2Temp
+// Boolean : Heater1Active
+// Boolean : Heater2Active
+// UInt32 : Heater1Percentage
+// UInt32 : Heater2Percentage
+ HardwarePidControl Pid1 = new HardwarePidControl();
+ HardwarePidControl Pid2 = new HardwarePidControl();
+//Pid1.has_hardwarepidcontroltype = true;
+Pid1.HardwarePidControlType = (HardwarePidControlType)0;
+ // Pid1.has_outputproportionalpowerlimit = true;
+ Pid1.OutputProportionalPowerLimit = 50;
+ // Pid1.has_outputproportionalband = true;
+ Pid1.OutputProportionalBand = 3;
+ // Pid1.has_kp = true;
+ Pid1.SensorCorrectionAdjustment = 2.0;
+ //Pid1.has_ki = true;
+ Pid1.IntegralTime = 0.01;
+
+ //Pid2.has_hardwarepidcontroltype = true;
+Pid2.HardwarePidControlType = (HardwarePidControlType)1;
+ // Pid2.has_outputproportionalpowerlimit = true;
+ Pid2.OutputProportionalPowerLimit = 40;
+ // Pid2.has_outputproportionalband = true;
+ Pid2.OutputProportionalBand = 3;
+ // Pid2.has_kp = true;
+ Pid2.SensorCorrectionAdjustment = 0.5;
+ //Pid2.has_ki = true;
+ Pid2.IntegralTime = 0.1;
+
+var response = stubManager.Run<StubHeatingTestResponse>("StubHeatingTestRequest" ,200.0, 0.0, Pid1, Pid2);
+int i=0;
+ // Request ----
+
+// Response ----
+// UInt32 : HeaterGroupId
+// UInt32 : Zone1Temp
+// UInt32 : Zone2Temp
+// Boolean : Heater1Active
+// Boolean : Heater2Active
+// UInt32 : Heater1Percentage
+// UInt32 : Heater2Percentage
+//StubHeatingTestPollResponse response1;
+stubManager.RunContinuous<StubHeatingTestPollResponse>("StubHeatingTestPollRequest",(response1) =>
+ {
+ stubManager.WriteLine (String.Format("Data, {0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}",++i,response1.Zone1Temp,response1.Zone2Temp,response1.Heater1Active,response1.Heater2Active,response1.Heater1Percentage,response1.Heater2Percentage,response1.InfoMessage));
+
+ },0);
+/*stubManager.RunContinuous<DebugLogResponse>("DebugLogRequest",(response2) =>
+ {
+ stubManager.WriteLine (String.Format("Report, {0}, {1}, {2}",response2.FileName,response2.LineNumber,response2.Message));
+
+ },0);
+
+ */
+
+
+}
+
diff --git a/Software/Stubs Collection/stubs/HeaterTest5.cs b/Software/Stubs Collection/stubs/HeaterTest5.cs
new file mode 100644
index 000000000..5f9fe5284
--- /dev/null
+++ b/Software/Stubs Collection/stubs/HeaterTest5.cs
@@ -0,0 +1,98 @@
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Debugging;
+using Tango.PMR.Stubs;
+using Tango.PMR.Hardware;
+using Tango.Stubs.UI;
+
+public void OnExecute(StubManager stubManager)
+{
+/* for (int i = 0; i < 10; i++)
+ {
+ var response = stubManager.Run<CalculateResponse>("calculate", 10, 5);
+
+ if (response.Sum == 15)
+ {
+ stubManager.WriteLine("OK!");
+ }
+ }
+ */
+
+// Request ----
+// Double : DryerZone1Temp
+// Double : DryerZone2Temp
+// RepeatedField`1 : HardwarePidControl
+// RepeatedField`1 : ProcessParameters
+
+// Response ----
+// UInt32 : HeaterGroupId
+// UInt32 : Zone1Temp
+// UInt32 : Zone2Temp
+// Boolean : Heater1Active
+// Boolean : Heater2Active
+// UInt32 : Heater1Percentage
+// UInt32 : Heater2Percentage
+ HardwarePidControl Pid1 = new HardwarePidControl();
+ HardwarePidControl Pid2 = new HardwarePidControl();
+//Pid1.has_hardwarepidcontroltype = true;
+Pid1.HardwarePidControlType = (HardwarePidControlType)3;
+ // Pid1.has_outputproportionalpowerlimit = true;
+ Pid1.OutputProportionalPowerLimit = 50;
+ // Pid1.has_outputproportionalband = true;
+ Pid1.OutputProportionalBand = 3;
+ // Pid1.has_kp = true;
+ Pid1.SensorCorrectionAdjustment = 2.0;
+ //Pid1.has_ki = true;
+ Pid1.IntegralTime = 0.01;
+
+ //Pid2.has_hardwarepidcontroltype = true;
+Pid2.HardwarePidControlType = (HardwarePidControlType)4;
+ // Pid2.has_outputproportionalpowerlimit = true;
+ Pid2.OutputProportionalPowerLimit = 40;
+ // Pid2.has_outputproportionalband = true;
+ Pid2.OutputProportionalBand = 2;
+ // Pid2.has_kp = true;
+ Pid2.SensorCorrectionAdjustment = 0.5;
+ //Pid2.has_ki = true;
+ Pid2.IntegralTime = 0.1;
+
+var response = stubManager.Run<StubHeatingTestResponse>("StubHeatingTestRequest" ,100.0, 100.0, Pid1, Pid2);
+Pid1.HardwarePidControlType = (HardwarePidControlType)5;
+Pid2.HardwarePidControlType = (HardwarePidControlType)6;
+
+ response = stubManager.Run<StubHeatingTestResponse>("StubHeatingTestRequest" ,100.0, 100.0, Pid1, Pid2);
+
+int i=0;
+ // Request ----
+
+// Response ----
+// UInt32 : HeaterGroupId
+// UInt32 : Zone1Temp
+// UInt32 : Zone2Temp
+// Boolean : Heater1Active
+// Boolean : Heater2Active
+// UInt32 : Heater1Percentage
+// UInt32 : Heater2Percentage
+//StubHeatingTestPollResponse response1;
+stubManager.RunContinuous<StubHeatingTestPollResponse>("StubHeatingTestPollRequest",(response1) =>
+ {
+ stubManager.WriteLine (String.Format("Temperature, {0}, State {1}, Init {2}, Id {3}, Actual {4}, Alloc {5}, Err {6} {7}",++i,response1.Heater1Active,response1.Heater2Active,response1.Zone1Temp,response1.Zone2Temp,response1.Heater1Percentage,response1.Heater2Percentage, response1.InfoMessage));
+
+ },0);
+/*stubManager.RunContinuous<DebugLogResponse>("DebugLogRequest",(response2) =>
+ {
+ stubManager.WriteLine (String.Format("Report, {0}, {1}, {2}",response2.FileName,response2.LineNumber,response2.Message));
+
+ },0);
+
+ */
+
+
+}
+
diff --git a/Software/Stubs Collection/stubs/JobRequest 2 segments 2 dispensers no intersegment.cs b/Software/Stubs Collection/stubs/JobRequest 2 segments 2 dispensers no intersegment.cs
new file mode 100644
index 000000000..b9ab3339b
--- /dev/null
+++ b/Software/Stubs Collection/stubs/JobRequest 2 segments 2 dispensers no intersegment.cs
@@ -0,0 +1,193 @@
+// Request ----
+// UInt32 : MotorID
+
+// Response ----
+// UInt32 : MotorID
+// UInt32 : Position
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Printing;
+using Tango.PMR.Diagnostics;
+using Tango.PMR.Stubs;
+using Tango.Stubs;
+
+public void OnExecute(StubManager stubManager)
+{
+
+
+// Request ----
+// Double : A
+// Double : B
+
+// Response ----
+// Double : Sum
+//var response1 = stubManager.Run<CalculateResponse>("CalculateRequest" ,6, 7);
+
+JobRequest jobRequest = new JobRequest();
+
+JobTicket jobTicket = new JobTicket();
+jobTicket.Name = "Stubs Job";
+jobTicket.EnableInterSegment = false;
+jobTicket.InterSegmentLength = 50;
+jobTicket.Length = 1000;
+
+ProcessParameters processParameters = new ProcessParameters();
+// SPEEED
+processParameters.DyeingSpeed = 30;
+// HEAT
+processParameters.DryerZone1Temp = 100;
+
+
+processParameters.MixerTemp = 0;
+processParameters.DryerBufferLength = 20;
+processParameters.MinInkUptake = 0;
+processParameters.HeadZone1Temp = 50;
+processParameters.HeadZone2Temp = 150;
+processParameters.HeadZone3Temp = 150;
+processParameters.DryerZone2Temp = 0;
+processParameters.DryerZone3Temp = 0;
+processParameters.FeederTension = 0;
+processParameters.PullerTension = 0;
+processParameters.WinderTension = 0;
+processParameters.HeadAirFlow = 0;
+processParameters.DryerAirFlow = 0;
+processParameters.TableIndex = 0;
+
+jobTicket.ProcessParameters = processParameters;
+jobTicket.WindingMethod = Tango.PMR.Printing.JobWindingMethod.Embroidery;
+
+JobSpool jobSpool = new JobSpool();
+jobSpool.JobSpoolType = Tango.PMR.Printing.JobSpoolType.StandardSpool;
+jobSpool.Length = 800;
+jobSpool.Weight = 0;
+jobSpool.Diameter = 3.0;
+jobSpool.StartOffsetPulses = 300;
+jobSpool.BackingRate = 10;
+jobSpool.SegmentOffsetPulses = 700;
+jobSpool.BottomBackingRate = 70;
+jobSpool.RotationsPerPassage = 3;
+
+jobTicket.Spool = jobSpool;
+
+JobSegment jobSegment1 = new JobSegment();
+jobSegment1.Name = "Segment1";
+// LENGTH
+jobSegment1.Length = 5.0;
+
+JobBrushStop jobBrushStop1 = new JobBrushStop();
+jobBrushStop1.Index = 0;
+jobBrushStop1.OffsetPercent = 0;
+jobBrushStop1.OffsetMeters = 0;
+
+JobDispenser jobDispenser1 = new JobDispenser();
+jobDispenser1.Index = 6;
+jobDispenser1.Volume = 10;
+jobDispenser1.DispenserStepDivision = Tango.PMR.Printing.DispenserStepDivision.Auto;
+jobDispenser1.NanolitterPerSecond = 1000;
+jobDispenser1.NanoliterPerCentimeter = 10;
+jobDispenser1.PulsePerSecond = 0;
+jobDispenser1.DispenserLiquidType = Tango.PMR.Printing.DispenserLiquidType.Cyan;
+jobDispenser1.LiquidMaxNanoliterPerCentimeter = 40;
+jobDispenser1.NanoliterPerPulse = 2.4;
+jobBrushStop1.Dispensers.Add(jobDispenser1);
+
+JobDispenser jobDispenser3 = new JobDispenser();
+jobDispenser3.Index = 7;
+jobDispenser3.Volume = 10;
+jobDispenser3.DispenserStepDivision = Tango.PMR.Printing.DispenserStepDivision.Auto;
+jobDispenser3.NanolitterPerSecond = 100;
+jobDispenser3.NanoliterPerCentimeter = 10;
+jobDispenser3.PulsePerSecond = 0;
+jobDispenser3.DispenserLiquidType = Tango.PMR.Printing.DispenserLiquidType.Cyan;
+jobDispenser3.LiquidMaxNanoliterPerCentimeter = 40;
+jobDispenser3.NanoliterPerPulse = 2.4;
+jobBrushStop1.Dispensers.Add(jobDispenser3);
+
+jobSegment1.BrushStops.Add(jobBrushStop1);
+jobTicket.Segments.Add(jobSegment1);
+
+JobSegment jobSegment2 = new JobSegment();
+jobSegment1.Name = "Segment2";
+// LENGTH
+jobSegment2.Length = 5.0;
+
+JobBrushStop jobBrushStop2 = new JobBrushStop();
+jobBrushStop2.Index = 0;
+jobBrushStop2.OffsetPercent = 0;
+jobBrushStop2.OffsetMeters = 0;
+
+JobDispenser jobDispenser2 = new JobDispenser();
+jobDispenser2.Index = 6;
+jobDispenser2.Volume = 10;
+jobDispenser2.DispenserStepDivision = Tango.PMR.Printing.DispenserStepDivision.Auto;
+jobDispenser2.NanolitterPerSecond = 100;
+jobDispenser2.NanoliterPerCentimeter = 10;
+jobDispenser2.PulsePerSecond = 0;
+jobDispenser2.DispenserLiquidType = Tango.PMR.Printing.DispenserLiquidType.Cyan;
+jobDispenser2.LiquidMaxNanoliterPerCentimeter = 40;
+jobDispenser2.NanoliterPerPulse = 2.4;
+jobBrushStop2.Dispensers.Add(jobDispenser2);
+
+JobDispenser jobDispenser4 = new JobDispenser();
+jobDispenser4.Index = 7;
+jobDispenser4.Volume = 10;
+jobDispenser4.DispenserStepDivision = Tango.PMR.Printing.DispenserStepDivision.Auto;
+jobDispenser4.NanolitterPerSecond = 1000;
+jobDispenser4.NanoliterPerCentimeter = 10;
+jobDispenser4.PulsePerSecond = 0;
+jobDispenser4.DispenserLiquidType = Tango.PMR.Printing.DispenserLiquidType.Cyan;
+jobDispenser4.LiquidMaxNanoliterPerCentimeter = 40;
+jobDispenser4.NanoliterPerPulse = 2.4;
+jobBrushStop2.Dispensers.Add(jobDispenser4);
+
+jobSegment2.BrushStops.Add(jobBrushStop2);
+jobTicket.Segments.Add(jobSegment2);
+
+jobRequest.JobTicket = jobTicket;
+
+
+ var response = stubManager.Run<JobResponse>(jobRequest);
+ int i=0;
+/*stubManager.WriteLine("data.data length = " + jobRequest.CalculateSize());
+*/
+stubManager.RunContinuous<JobResponse>(jobRequest,(response1) =>
+ {
+ stubManager.WriteLine (String.Format("Data, {0}, {1} meters, {2}",++i,response1.Status.Progress*jobSegment1.Length,response1.Status.Message));
+
+ });
+/* stubManager.RunContinuous<ProgressResponse>(request, (response) =>
+ {
+
+ stubManager.WriteLine(response.Progress);
+
+ });
+*/
+
+ //int i=0;
+/*stubManager.RunContinuous<StubHeatingTestPollResponse>("StubHeatingTestPollRequest",(response1) =>
+ {
+// stubManager.WriteLine (String.Format("Data, {0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}",++i,response1.Zone1Temp,response1.Zone2Temp,response1.Heater1Active,response1.Heater2Active,response1.Heater1Percentage,response1.Heater2Percentage,response1.InfoMessage));
+ stubManager.WriteLine (String.Format("Data, Id {0}, Id {1}, Temp {2}, % {3}, Active {4}, {5}",++i,response1.Zone1Temp,response1.Zone2Temp,response1.Heater1Percentage,response1.Heater1Active,response1.InfoMessage));
+
+ },0);
+
+
+/*StartDiagnosticsRequest startDiagnosticsRequest = new StartDiagnosticsRequest();
+//stubManager.RunContinuous<StartDiagnosticsResponse>(startDiagnosticsRequest,(response1) =>
+stubManager.RunContinuous<StartDiagnosticsResponse>(startDiagnosticsRequest,(response1) =>
+ {
+ stubManager.WriteLine (String.Format("Data, {0}, H1 {1}, H2{2}, H3 {3}, D1 {4}, D2 {5}",++i,response1.Monitors.HeadZone1Temperature[0],response1.Monitors.HeadZone2Temperature[0],response1.Monitors.HeadZone3Temperature[0],response1.Monitors.DryerZone1Temperature[0],response1.Monitors.DryerZone2Temperature[0]));
+ stubManager.WriteLine (String.Format("Data, {0}, DR {1}, DM{2}, DL {3}, Feeder {4}",++i,response1.Monitors.Dancer1Angle[0],response1.Monitors.Dancer2Angle[0],response1.Monitors.Dancer3Angle[0],response1.Monitors.FeederMotorFrequency[0]));
+
+ },0);
+
+*/
+}
+
diff --git a/Software/Stubs Collection/stubs/JobRequest 2 segments.cs b/Software/Stubs Collection/stubs/JobRequest 2 segments.cs
new file mode 100644
index 000000000..55eaad8f0
--- /dev/null
+++ b/Software/Stubs Collection/stubs/JobRequest 2 segments.cs
@@ -0,0 +1,167 @@
+// Request ----
+// UInt32 : MotorID
+
+// Response ----
+// UInt32 : MotorID
+// UInt32 : Position
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Printing;
+using Tango.PMR.Diagnostics;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+public void OnExecute(StubManager stubManager)
+{
+
+
+// Request ----
+// Double : A
+// Double : B
+
+// Response ----
+// Double : Sum
+//var response1 = stubManager.Run<CalculateResponse>("CalculateRequest" ,6, 7);
+
+JobRequest jobRequest = new JobRequest();
+
+JobTicket jobTicket = new JobTicket();
+jobTicket.Name = "Stubs Job";
+jobTicket.EnableInterSegment = false;
+jobTicket.InterSegmentLength = 50;
+jobTicket.Length = 1000;
+
+ProcessParameters processParameters = new ProcessParameters();
+// SPEEED
+processParameters.DyeingSpeed = 30;
+// HEAT
+processParameters.DryerZone1Temp = 100;
+
+
+processParameters.MixerTemp = 0;
+processParameters.DryerBufferLength = 20;
+processParameters.MinInkUptake = 0;
+processParameters.HeadZone1Temp = 50;
+processParameters.HeadZone2Temp = 150;
+processParameters.HeadZone3Temp = 150;
+processParameters.DryerZone2Temp = 0;
+processParameters.DryerZone3Temp = 0;
+processParameters.FeederTension = 0;
+processParameters.PullerTension = 0;
+processParameters.WinderTension = 0;
+processParameters.HeadAirFlow = 0;
+processParameters.DryerAirFlow = 0;
+processParameters.TableIndex = 0;
+
+jobTicket.ProcessParameters = processParameters;
+jobTicket.WindingMethod = Tango.PMR.Printing.JobWindingMethod.Embroidery;
+
+JobSpool jobSpool = new JobSpool();
+jobSpool.JobSpoolType = Tango.PMR.Printing.JobSpoolType.StandardSpool;
+jobSpool.Length = 800;
+jobSpool.Weight = 0;
+jobSpool.Diameter = 3.0;
+jobSpool.StartOffsetPulses = 300;
+jobSpool.BackingRate = 10;
+jobSpool.SegmentOffsetPulses = 700;
+jobSpool.BottomBackingRate = 70;
+jobSpool.RotationsPerPassage = 3;
+
+jobTicket.Spool = jobSpool;
+
+JobSegment jobSegment1 = new JobSegment();
+jobSegment1.Name = "Segment1";
+// LENGTH
+jobSegment1.Length = 5.0;
+
+JobBrushStop jobBrushStop1 = new JobBrushStop();
+jobBrushStop1.Index = 0;
+jobBrushStop1.OffsetPercent = 0;
+jobBrushStop1.OffsetMeters = 0;
+
+JobDispenser jobDispenser1 = new JobDispenser();
+jobDispenser1.Index = 6;
+jobDispenser1.Volume = 10;
+jobDispenser1.DispenserStepDivision = Tango.PMR.Printing.DispenserStepDivision.Auto;
+jobDispenser1.NanolitterPerSecond = 1000;
+jobDispenser1.NanoliterPerCentimeter = 10;
+jobDispenser1.PulsePerSecond = 0;
+jobDispenser1.DispenserLiquidType = Tango.PMR.Printing.DispenserLiquidType.Cyan;
+jobDispenser1.LiquidMaxNanoliterPerCentimeter = 40;
+jobDispenser1.NanoliterPerPulse = 2.4;
+jobBrushStop1.Dispensers.Add(jobDispenser1);
+jobSegment1.BrushStops.Add(jobBrushStop1);
+jobTicket.Segments.Add(jobSegment1);
+
+JobSegment jobSegment2 = new JobSegment();
+jobSegment1.Name = "Segment2";
+// LENGTH
+jobSegment2.Length = 5.0;
+
+JobBrushStop jobBrushStop2 = new JobBrushStop();
+jobBrushStop2.Index = 0;
+jobBrushStop2.OffsetPercent = 0;
+jobBrushStop2.OffsetMeters = 0;
+
+JobDispenser jobDispenser2 = new JobDispenser();
+jobDispenser2.Index = 6;
+jobDispenser2.Volume = 10;
+jobDispenser2.DispenserStepDivision = Tango.PMR.Printing.DispenserStepDivision.Auto;
+jobDispenser2.NanolitterPerSecond = 300;
+jobDispenser2.NanoliterPerCentimeter = 10;
+jobDispenser2.PulsePerSecond = 0;
+jobDispenser2.DispenserLiquidType = Tango.PMR.Printing.DispenserLiquidType.Cyan;
+jobDispenser2.LiquidMaxNanoliterPerCentimeter = 40;
+jobDispenser2.NanoliterPerPulse = 2.4;
+jobBrushStop2.Dispensers.Add(jobDispenser2);
+jobSegment2.BrushStops.Add(jobBrushStop2);
+jobTicket.Segments.Add(jobSegment2);
+
+jobRequest.JobTicket = jobTicket;
+
+
+ var response = stubManager.Run<JobResponse>(jobRequest);
+ int i=0;
+/*stubManager.WriteLine("data.data length = " + jobRequest.CalculateSize());
+*/
+stubManager.RunContinuous<JobResponse>(jobRequest,(response1) =>
+ {
+ stubManager.WriteLine (String.Format("Data, {0}, {1} meters, {2}",++i,response1.Status.Progress*jobSegment1.Length,response1.Status.Message));
+
+ });
+/* stubManager.RunContinuous<ProgressResponse>(request, (response) =>
+ {
+
+ stubManager.WriteLine(response.Progress);
+
+ });
+*/
+
+ //int i=0;
+/*stubManager.RunContinuous<StubHeatingTestPollResponse>("StubHeatingTestPollRequest",(response1) =>
+ {
+// stubManager.WriteLine (String.Format("Data, {0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}",++i,response1.Zone1Temp,response1.Zone2Temp,response1.Heater1Active,response1.Heater2Active,response1.Heater1Percentage,response1.Heater2Percentage,response1.InfoMessage));
+ stubManager.WriteLine (String.Format("Data, Id {0}, Id {1}, Temp {2}, % {3}, Active {4}, {5}",++i,response1.Zone1Temp,response1.Zone2Temp,response1.Heater1Percentage,response1.Heater1Active,response1.InfoMessage));
+
+ },0);
+
+
+/*StartDiagnosticsRequest startDiagnosticsRequest = new StartDiagnosticsRequest();
+//stubManager.RunContinuous<StartDiagnosticsResponse>(startDiagnosticsRequest,(response1) =>
+stubManager.RunContinuous<StartDiagnosticsResponse>(startDiagnosticsRequest,(response1) =>
+ {
+ stubManager.WriteLine (String.Format("Data, {0}, H1 {1}, H2{2}, H3 {3}, D1 {4}, D2 {5}",++i,response1.Monitors.HeadZone1Temperature[0],response1.Monitors.HeadZone2Temperature[0],response1.Monitors.HeadZone3Temperature[0],response1.Monitors.DryerZone1Temperature[0],response1.Monitors.DryerZone2Temperature[0]));
+ stubManager.WriteLine (String.Format("Data, {0}, DR {1}, DM{2}, DL {3}, Feeder {4}",++i,response1.Monitors.Dancer1Angle[0],response1.Monitors.Dancer2Angle[0],response1.Monitors.Dancer3Angle[0],response1.Monitors.FeederMotorFrequency[0]));
+
+ },0);
+
+*/
+}
+
diff --git a/Software/Stubs Collection/stubs/JobRequest.cs b/Software/Stubs Collection/stubs/JobRequest.cs
new file mode 100644
index 000000000..9a7e8bc31
--- /dev/null
+++ b/Software/Stubs Collection/stubs/JobRequest.cs
@@ -0,0 +1,143 @@
+// Request ----
+// UInt32 : MotorID
+
+// Response ----
+// UInt32 : MotorID
+// UInt32 : Position
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Printing;
+using Tango.PMR.Diagnostics;
+using Tango.PMR.Stubs;
+using Tango.Stubs;
+
+public void OnExecute(StubManager stubManager)
+{
+
+
+// Request ----
+// Double : A
+// Double : B
+
+// Response ----
+// Double : Sum
+//var response1 = stubManager.Run<CalculateResponse>("CalculateRequest" ,6, 7);
+
+JobRequest jobRequest = new JobRequest();
+
+JobTicket jobTicket = new JobTicket();
+jobTicket.Name = "Stubs Job";
+jobTicket.EnableInterSegment = false;
+jobTicket.InterSegmentLength = 50;
+jobTicket.Length = 1000;
+
+ProcessParameters processParameters = new ProcessParameters();
+// SPEEED
+processParameters.DyeingSpeed = 30;
+// HEAT
+processParameters.DryerZone1Temp = 100;
+
+
+processParameters.MixerTemp = 0;
+processParameters.DryerBufferLength = 20;
+processParameters.MinInkUptake = 0;
+processParameters.HeadZone1Temp = 50;
+processParameters.HeadZone2Temp = 150;
+processParameters.HeadZone3Temp = 150;
+processParameters.DryerZone2Temp = 0;
+processParameters.DryerZone3Temp = 0;
+processParameters.FeederTension = 0;
+processParameters.PullerTension = 0;
+processParameters.WinderTension = 0;
+processParameters.HeadAirFlow = 0;
+processParameters.DryerAirFlow = 0;
+processParameters.TableIndex = 0;
+
+jobTicket.ProcessParameters = processParameters;
+jobTicket.WindingMethod = Tango.PMR.Printing.JobWindingMethod.Embroidery;
+
+JobSpool jobSpool = new JobSpool();
+jobSpool.JobSpoolType = Tango.PMR.Printing.JobSpoolType.StandardSpool;
+jobSpool.Length = 800;
+jobSpool.Weight = 0;
+jobSpool.Diameter = 3.0;
+jobSpool.StartOffsetPulses = 250;
+jobSpool.BackingRate = 10;
+jobSpool.SegmentOffsetPulses = 750;
+jobSpool.BottomBackingRate = 70;
+jobSpool.RotationsPerPassage = 3;
+
+jobTicket.Spool = jobSpool;
+
+JobSegment jobSegment = new JobSegment();
+jobSegment.Name = "Segment1";
+// LENGTH
+jobSegment.Length = 30.0;
+
+JobBrushStop jobBrushStop = new JobBrushStop();
+jobBrushStop.Index = 0;
+jobBrushStop.OffsetPercent = 0;
+jobBrushStop.OffsetMeters = 0;
+
+JobDispenser jobDispenser = new JobDispenser();
+jobDispenser.Index = 6;
+jobDispenser.Volume = 10;
+jobDispenser.DispenserStepDivision = Tango.PMR.Printing.DispenserStepDivision.Auto;
+jobDispenser.NanolitterPerSecond = 500;
+jobDispenser.NanoliterPerCentimeter = 10;
+jobDispenser.PulsePerSecond = 0;
+jobDispenser.DispenserLiquidType = Tango.PMR.Printing.DispenserLiquidType.Cyan;
+jobDispenser.LiquidMaxNanoliterPerCentimeter = 40;
+jobDispenser.NanoliterPerPulse = 2.4;
+jobBrushStop.Dispensers.Add(jobDispenser);
+jobSegment.BrushStops.Add(jobBrushStop);
+jobTicket.Segments.Add(jobSegment);
+
+jobRequest.JobTicket = jobTicket;
+
+
+ var response = stubManager.Run<JobResponse>(jobRequest);
+ int i=0;
+/*stubManager.WriteLine("data.data length = " + jobRequest.CalculateSize());
+*/
+stubManager.RunContinuous<JobResponse>(jobRequest,(response1) =>
+ {
+ stubManager.WriteLine (String.Format("Data, {0}, {1} meters, {2}",++i,response1.Status.Progress*jobSegment.Length,response1.Status.Message));
+
+ });
+/* stubManager.RunContinuous<ProgressResponse>(request, (response) =>
+ {
+
+ stubManager.WriteLine(response.Progress);
+
+ });
+*/
+
+ //int i=0;
+/*stubManager.RunContinuous<StubHeatingTestPollResponse>("StubHeatingTestPollRequest",(response1) =>
+ {
+// stubManager.WriteLine (String.Format("Data, {0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}",++i,response1.Zone1Temp,response1.Zone2Temp,response1.Heater1Active,response1.Heater2Active,response1.Heater1Percentage,response1.Heater2Percentage,response1.InfoMessage));
+ stubManager.WriteLine (String.Format("Data, Id {0}, Id {1}, Temp {2}, % {3}, Active {4}, {5}",++i,response1.Zone1Temp,response1.Zone2Temp,response1.Heater1Percentage,response1.Heater1Active,response1.InfoMessage));
+
+ },0);
+
+
+/*StartDiagnosticsRequest startDiagnosticsRequest = new StartDiagnosticsRequest();
+//stubManager.RunContinuous<StartDiagnosticsResponse>(startDiagnosticsRequest,(response1) =>
+stubManager.RunContinuous<StartDiagnosticsResponse>(startDiagnosticsRequest,(response1) =>
+ {
+ stubManager.WriteLine (String.Format("Data, {0}, H1 {1}, H2{2}, H3 {3}, D1 {4}, D2 {5}",++i,response1.Monitors.HeadZone1Temperature[0],response1.Monitors.HeadZone2Temperature[0],response1.Monitors.HeadZone3Temperature[0],response1.Monitors.DryerZone1Temperature[0],response1.Monitors.DryerZone2Temperature[0]));
+ stubManager.WriteLine (String.Format("Data, {0}, DR {1}, DM{2}, DL {3}, Feeder {4}",++i,response1.Monitors.Dancer1Angle[0],response1.Monitors.Dancer2Angle[0],response1.Monitors.Dancer3Angle[0],response1.Monitors.FeederMotorFrequency[0]));
+
+ },0);
+
+*/
+}
+
diff --git a/Software/Stubs Collection/stubs/MidTankControl.cs b/Software/Stubs Collection/stubs/MidTankControl.cs
new file mode 100644
index 000000000..69517d99b
--- /dev/null
+++ b/Software/Stubs Collection/stubs/MidTankControl.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.MachineStudio.Stubs;
+
+public void OnExecute(StubManager stubManager)
+{
+stubManager.Run("StubFpgaWriteRegRequest" ,0x600008e2, 0);
+stubManager.Run("StubFpgaReadRegRequest" ,0x600008e2);
+}
+
diff --git a/Software/Stubs Collection/stubs/MotorInit.cs b/Software/Stubs Collection/stubs/MotorInit.cs
new file mode 100644
index 000000000..3a9ee4a90
--- /dev/null
+++ b/Software/Stubs Collection/stubs/MotorInit.cs
@@ -0,0 +1,38 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+public void OnExecute(StubManager stubManager)
+{
+
+StubMotorInitRequest stubMotorInitRequest = new StubMotorInitRequest();
+stubMotorInitRequest.MotorID = 3;
+stubMotorInitRequest.MicroSteps = 8;
+stubMotorInitRequest.SetMicroSteps = false;
+stubMotorInitRequest.ACC = 0;
+stubMotorInitRequest.SetACC = false;
+stubMotorInitRequest.DEC = 0;
+stubMotorInitRequest.SetDec = false;
+stubMotorInitRequest.MaxSpeed = 8000;
+stubMotorInitRequest.SetMaxSpeed = false;
+
+
+
+
+ var response = stubManager.Run<StubMotorInitResponse>(stubMotorInitRequest);
+
+ if (response.MotorID == 3)
+ {
+ stubManager.WriteLine("OK!");
+ }
+
+}
+
diff --git a/Software/Stubs Collection/stubs/MotorSpeedSet.cs b/Software/Stubs Collection/stubs/MotorSpeedSet.cs
new file mode 100644
index 000000000..adbd0b2b5
--- /dev/null
+++ b/Software/Stubs Collection/stubs/MotorSpeedSet.cs
@@ -0,0 +1,29 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+public void OnExecute(StubManager stubManager)
+{
+// for (int i = 0; i < 10; i++)
+ {
+ //var response = stubManager.Run<CalculateResponse>("calculate", 1, i);
+// Request ----
+// UInt32 : MotorID
+// UInt32 : DataToSend
+// UInt32 : NBytesToSet
+// UInt32 : NBytesToGet
+
+// Response ----
+// UInt32 : MotorID
+// UInt32 : RecivedData
+var response = stubManager.Run<StubMotorResponse>("StubMotorRequest" ,3, 0x510f81b8, 4, 0);
+ }
+} \ No newline at end of file
diff --git a/Software/Stubs Collection/stubs/Motor_Get_Param_Horizontal_Printing.cs b/Software/Stubs Collection/stubs/Motor_Get_Param_Horizontal_Printing.cs
new file mode 100644
index 000000000..696bb8456
--- /dev/null
+++ b/Software/Stubs Collection/stubs/Motor_Get_Param_Horizontal_Printing.cs
@@ -0,0 +1,114 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+//unmark Auto logging !
+
+const Int32 x_ABS_POS = 0x01;
+const Int32 x_EL_POS = 0x02;
+const Int32 x_MARK = 0x03;
+const Int32 x_SPEED = 0x04;
+const Int32 x_ACC = 0x05;
+const Int32 x_DEC = 0x06;
+const Int32 x_MAX_SPEED = 0x07;
+const Int32 x_MIN_SPEED = 0x08;
+const Int32 x_FS_SPD = 0x15;
+const Int32 x_KVAL_HOLD = 0x09;
+const Int32 x_KVAL_RUN = 0x0A;
+const Int32 x_KVAL_ACC = 0x0B;
+const Int32 x_KVAL_DEC = 0x0C;
+const Int32 x_INT_SPD = 0x0D;
+const Int32 x_ST_SLP = 0x0E;
+const Int32 x_FN_SLP_ACC = 0x0F;
+const Int32 x_FN_SLP_DEC = 0x10;
+const Int32 x_K_THERM = 0x11;
+const Int32 x_ADC_OUT = 0x12;
+const Int32 x_OCD_TH = 0x13;
+const Int32 x_STALL_TH = 0x14;
+const Int32 x_STEP_MODE = 0x16;
+const Int32 x_ALARM_EN = 0x17;
+const Int32 x_CONFIG = 0x18;
+const Int32 x_STATUS = 0x19;
+//-------------------------------
+const Int32 x_GET_PARAM = 0x20;
+//-------------------------------
+const Int32 Max_Motor_ID = 25;
+
+Int32 i = 12; // to run only for specific motor
+
+public void OnExecute(StubManager stubManager)
+{
+ for (i = 0; i < Max_Motor_ID; i++)
+ {
+
+ if((i%8 ==0) )
+ {
+ stubManager.Write("MoTor\tMIN_SPEED\tMAX_SPEED\tSTEP_MODE\tACC\t\tDEC\t\tKVAL_HOLD\tKVAL_RUN\tKVAL_ACC\tKVAL_DEC\tOCD_TH\t\tSTALL_TH\tCONFIG\t\tFS_SPD\n");
+ stubManager.Write("------\t--------\t--------\t----------\t---\t\t---\t\t---------\t--------\t--------\t--------\t------\t\t--------\t------\t\t------\n");
+ }
+ stubManager.Write(i);
+ stubManager.Write("\t");
+
+ var response = stubManager.Run<StubMotorResponse>("StubMotorRequest" ,i, (x_GET_PARAM | x_MIN_SPEED)<<16, 0, 0);
+ stubManager.WriteHex(response.RecivedData,4);
+ stubManager.Write("\t\t");
+
+ response = stubManager.Run<StubMotorResponse>("StubMotorRequest" ,i, (x_GET_PARAM | x_MAX_SPEED)<<16, 0, 0);
+ stubManager.WriteHex(response.RecivedData,4); stubManager.Write("\t");
+ stubManager.Write("\t");
+
+ response = stubManager.Run<StubMotorResponse>("StubMotorRequest" ,i, (x_GET_PARAM | x_STEP_MODE)<<8, 0, 0);
+ stubManager.WriteHex(response.RecivedData,4);
+ stubManager.Write("\t\t");
+
+ response = stubManager.Run<StubMotorResponse>("StubMotorRequest" ,i, (x_GET_PARAM | x_ACC)<<16, 0, 0);
+ stubManager.WriteHex(response.RecivedData,4);
+ stubManager.Write("\t\t");
+
+ response = stubManager.Run<StubMotorResponse>("StubMotorRequest" ,i, (x_GET_PARAM | x_DEC)<<16, 0, 0);
+ stubManager.WriteHex(response.RecivedData,4);
+ stubManager.Write("\t\t");
+
+ response = stubManager.Run<StubMotorResponse>("StubMotorRequest" ,i, (x_GET_PARAM | x_KVAL_HOLD)<<8, 0, 0);
+ stubManager.WriteHex(response.RecivedData,4);
+ stubManager.Write("\t\t");
+
+ response = stubManager.Run<StubMotorResponse>("StubMotorRequest" ,i, (x_GET_PARAM | x_KVAL_RUN)<<8, 0, 0);
+ stubManager.WriteHex(response.RecivedData,4);
+ stubManager.Write("\t\t");
+
+ response = stubManager.Run<StubMotorResponse>("StubMotorRequest" ,i, (x_GET_PARAM | x_KVAL_ACC)<<8, 0, 0);
+ stubManager.WriteHex(response.RecivedData,4);
+ stubManager.Write("\t\t");
+
+ response = stubManager.Run<StubMotorResponse>("StubMotorRequest" ,i, (x_GET_PARAM | x_KVAL_DEC)<<8, 0, 0);
+ stubManager.WriteHex(response.RecivedData,4);
+ stubManager.Write("\t\t");
+
+ response = stubManager.Run<StubMotorResponse>("StubMotorRequest" ,i, (x_GET_PARAM | x_OCD_TH)<<8, 0, 0);
+ stubManager.WriteHex(response.RecivedData,4);
+ stubManager.Write("\t\t");
+
+ response = stubManager.Run<StubMotorResponse>("StubMotorRequest" ,i, (x_GET_PARAM | x_STALL_TH)<<8, 0, 0);
+ stubManager.WriteHex(response.RecivedData,4);
+ stubManager.Write("\t\t");
+
+ response = stubManager.Run<StubMotorResponse>("StubMotorRequest" ,i, (x_GET_PARAM | x_CONFIG)<<16, 0, 0);
+ stubManager.WriteHex(response.RecivedData,4);
+ stubManager.Write("\t\t");
+
+ response = stubManager.Run<StubMotorResponse>("StubMotorRequest" ,i, (x_GET_PARAM | x_FS_SPD)<<16, 0, 0);
+ stubManager.WriteHex(response.RecivedData,4);
+ stubManager.Write("\n\n");
+
+ }
+
+} \ No newline at end of file
diff --git a/Software/Stubs Collection/stubs/PT100.cs b/Software/Stubs Collection/stubs/PT100.cs
new file mode 100644
index 000000000..a1bb51131
--- /dev/null
+++ b/Software/Stubs Collection/stubs/PT100.cs
@@ -0,0 +1,25 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+public void OnExecute(StubManager stubManager)
+{
+ for (int i = 0; i < 12; i++)
+ {
+ // Request ----
+ // UInt32 : STempSensorID
+
+ // Response ----
+ // UInt32 : TempSensorID
+ // UInt32 : TemperatureCMultBy100
+ var response = stubManager.Run<StubTempSensorResponse>("StubTempSensorRequest" ,i);
+ }
+} \ No newline at end of file
diff --git a/Software/Stubs Collection/stubs/Read Dancer.cs b/Software/Stubs Collection/stubs/Read Dancer.cs
new file mode 100644
index 000000000..73d30ad75
--- /dev/null
+++ b/Software/Stubs Collection/stubs/Read Dancer.cs
@@ -0,0 +1,38 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+public void OnExecute(StubManager stubManager)
+{
+ stubManager.RequestTimeout = 2000;
+ //for (int i = 0; i < 100; i++)
+ {
+// Request ----
+// UInt32 : DancerID
+
+// Response ----
+// UInt32 : DancerID
+// UInt32 : Position
+// UInt32 : GeneralStatus
+// UInt32 : DetailedStatus
+ //var response = stubManager.Run<StubDancerPositionResponse>("StubDancerPositionRequest" ,1);
+
+//var response = stubManager.Run<StubMotorSpeedResponse>("StubMotorSpeedRequest" ,22);
+//var response;
+//var response = stubManager.Run<StubMotorStatusResponse>("StubMotorStatusRequest" ,18, true);
+ var response = stubManager.Run<StubDancerPositionResponse>("StubDancerPositionRequest" ,0);
+ Thread.Sleep(1000);
+ response = stubManager.Run<StubDancerPositionResponse>("StubDancerPositionRequest" ,1);
+ Thread.Sleep(1000);
+ response = stubManager.Run<StubDancerPositionResponse>("StubDancerPositionRequest" ,2);
+ Thread.Sleep(1000);
+ }
+} \ No newline at end of file
diff --git a/Software/Stubs Collection/stubs/RealTimeUsage.cs b/Software/Stubs Collection/stubs/RealTimeUsage.cs
new file mode 100644
index 000000000..c66125972
--- /dev/null
+++ b/Software/Stubs Collection/stubs/RealTimeUsage.cs
@@ -0,0 +1,41 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+public void OnExecute(StubManager stubManager)
+{
+// Request ----
+
+// Response ----
+// RepeatedField`1 : Percentile
+
+var response = stubManager.Run<StubRealTimeUsageResponse>("StubRealTimeUsageRequest" );
+
+ stubManager.RequestTimeout = 2000;
+ for (int i = 0; i < 89; i+=10)
+ {
+ stubManager.WriteLine (String.Format("i: {0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9}, {10}",i,response.Percentile[i],response.Percentile[i+1],response.Percentile[i+2],response.Percentile[i+3],response.Percentile[i+4],response.Percentile[i+5],response.Percentile[i+6],response.Percentile[i+7],response.Percentile[i+8],response.Percentile[i+9]));
+
+ }
+ /*for (int i = 0; i < 99; i++)
+ {
+ stubManager.WriteLine (response.Percentile[i]);
+
+ }*/
+/*int i = 0;
+ stubManager.Run<StubRealTimeUsageResponse>("StubRealTimeUsageRequest",(response) =>
+ {
+ stubManager.WriteLine (String.Format("i: {0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9}, {10}",i,response.Percentile[i],response.Percentile[i+1],response.Percentile[i+2],response.Percentile[i+3],response.Percentile[i+4],response.Percentile[i+5],response.Percentile[i+6],response.Percentile[i+7],response.Percentile[i+8],response.Percentile[i+9]));
+
+ },0);
+
+*/
+} \ No newline at end of file
diff --git a/Software/Stubs Collection/stubs/ScrewMotorMov.cs b/Software/Stubs Collection/stubs/ScrewMotorMov.cs
new file mode 100644
index 000000000..6b3ffe626
--- /dev/null
+++ b/Software/Stubs Collection/stubs/ScrewMotorMov.cs
@@ -0,0 +1,84 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Stubs;
+using Tango.Stubs;
+
+public void OnExecute(StubManager stubManager)
+{
+ // FALSE - to the body
+ //TRUE out
+ // Request ----
+// UInt32 : ValveId
+// UInt32 : Inkflow
+// Boolean : ValveOn
+// Request ----
+// UInt32 : ADCDevice
+
+// Response ----
+// UInt32 : ADCDevice
+// Int32 : SamplingInBits
+// Int32 : VoltageSamplingMv
+// String : Status
+// UInt32 : StatusWord
+//var response = stubManager.Run<StubIntADCReadResponse>("StubIntADCReadRequest" ,UInt32);
+
+// Response ----
+// String : Status
+// UInt32 : StatusWord
+ //open valve toward the mixer, run dispenser 7
+ //var response3 = stubManager.Run<StubValveResponse>("StubValveRequest" ,6, 10, true);
+ //var response = stubManager.Run<StubMotorRunResponse>("StubMotorRunRequest" ,3, true, 800);
+ //Thread.Sleep(3000);
+ //open valve toward the midtank, stop dispenser 7
+ //var response3 = stubManager.Run<StubValveResponse>("StubValveRequest" ,6, 10, false);
+ var response2 = stubManager.Run<StubMotorStopResponse>("StubMotorStopRequest" ,3,0);
+ //Thread.Sleep(10);
+ //var response1 = stubManager.Run<StubMotorMovResponse>("StubMotorMovRequest" ,12, false, 150);
+ // Request ----
+// UInt32 : Address
+
+// Response ----
+// UInt32 : Address
+// UInt32 : Value
+// String : Status
+// UInt32 : StatusWord
+ /*{
+
+ var response = stubManager.Run<StubMotorRunResponse>("StubMotorRunRequest" ,14, false, 20);
+ Thread.Sleep(600);
+ var response1 = stubManager.Run<StubMotorRunResponse>("StubMotorRunRequest" ,14, true, 20);
+ Thread.Sleep(600);
+ }
+
+//var response1 = stubManager.Run<StubMotorStatusResponse>("StubMotorStatusRequest" ,14, true);
+//Thread.Sleep(1000);
+// var response = stubManager.Run<StubMotorRunResponse>("StubMotorRunRequest" ,24, false, 20);
+// Thread.Sleep(700);
+
+var response2 = stubManager.Run<StubMotorStopResponse>("StubMotorStopRequest" ,15, 0);
+var response4 = stubManager.Run<StubMotorStopResponse>("StubMotorStopRequest" ,14, 0);*/
+// Request ----
+// UInt32 : Address
+// UInt32 : Value
+
+// Response ----
+// String : Status
+// UInt32 : StatusWord
+//var response = stubManager.Run<StubFpgaWriteRegResponse>("StubFpgaWriteRegRequest" ,0x600008e2, 0);
+// Request ----
+// UInt32 : Address
+
+// Response ----
+// UInt32 : Address
+// UInt32 : Value
+// String : Status
+// UInt32 : StatusWord
+//var response1 = stubManager.Run<StubFpgaReadRegResponse>("StubFpgaReadRegRequest" ,0x600008e2);
+}
diff --git a/Software/Stubs Collection/stubs/StubHeatingTestPollResponse.cs b/Software/Stubs Collection/stubs/StubHeatingTestPollResponse.cs
new file mode 100644
index 000000000..64595ea91
--- /dev/null
+++ b/Software/Stubs Collection/stubs/StubHeatingTestPollResponse.cs
@@ -0,0 +1,22 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+public void OnExecute(StubManager stubManager)
+{
+ int i=0;
+ stubManager.RunContinuous<StubHeatingTestPollResponse>("StubHeatingTestPollRequest",(response1) =>
+ {
+// stubManager.WriteLine (String.Format("Data, {0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}",++i,response1.Zone1Temp,response1.Zone2Temp,response1.Heater1Active,response1.Heater2Active,response1.Heater1Percentage,response1.Heater2Percentage,response1.InfoMessage));
+ stubManager.WriteLine (String.Format("Data, {0}, {1}, {2}, {3}, {4}, {5}",++i,response1.Zone1Temp,response1.Zone2Temp,response1.Heater1Percentage,response1.Heater2Percentage,response1.InfoMessage));
+
+ },0);
+} \ No newline at end of file
diff --git a/Software/Stubs Collection/stubs/Stub_scripts.rar b/Software/Stubs Collection/stubs/Stub_scripts.rar
new file mode 100644
index 000000000..8b8dd1d4d
--- /dev/null
+++ b/Software/Stubs Collection/stubs/Stub_scripts.rar
Binary files differ
diff --git a/Software/Stubs Collection/stubs/SystemHeatingTest.cs b/Software/Stubs Collection/stubs/SystemHeatingTest.cs
new file mode 100644
index 000000000..80a60ae79
--- /dev/null
+++ b/Software/Stubs Collection/stubs/SystemHeatingTest.cs
@@ -0,0 +1,442 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Hardware;
+using Tango.PMR.Printing;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+public void OnExecute(StubManager stubManager)
+{
+//SystemResetRequest systemResetRequest = new SystemResetRequest();
+//var response1 = stubManager.Run<SystemResetResponse>(systemResetRequest);
+// stubManager.Run("StubGPIOWriteBitRequest" ,"P", 4, true);//ON
+ Thread.Sleep(10);
+// stubManager.Run("StubGPIOWriteBitRequest" ,"P", 4, false);//OFF
+ Thread.Sleep(10);
+// stubManager.Run("StubGPIOWriteBitRequest" ,"P", 4, true);//ON
+/*UploadProcessParametersRequest uploadProcessParametersRequest = new UploadProcessParametersRequest();
+
+ProcessParameters processParameters = new ProcessParameters();
+processParameters.DyeingSpeed = 10;
+processParameters.MixerTemp = 0;
+processParameters.DryerBufferLength = 0;
+processParameters.MinInkUptake = 0;
+processParameters.HeadZone1Temp = 0;
+processParameters.DryerZone1Temp = 100;
+processParameters.FeederTension = 0;
+processParameters.DryerZone2Temp = 100;
+processParameters.HeadZone2Temp = 0;
+processParameters.PullerTension = 0;
+processParameters.HeadZone3Temp = 0;
+processParameters.DryerZone3Temp = 0;
+processParameters.WinderTension = 0;
+processParameters.HeadAirFlow = 0;
+processParameters.DryerAirFlow = 0;
+processParameters.TableIndex = 0;
+
+uploadProcessParametersRequest.ProcessParameters = processParameters;
+var response1 = stubManager.Run<UploadProcessParametersResponse>(uploadProcessParametersRequest);
+*/
+
+UploadHardwareConfigurationRequest uploadHardwareConfigurationRequest = new UploadHardwareConfigurationRequest();
+
+HardwareConfiguration hardwareConfiguration = new HardwareConfiguration();
+
+
+/*HardwarePidControl hardwarePidControl1 = new HardwarePidControl();
+hardwarePidControl1.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.MotorFeeder;
+hardwarePidControl1.OutputProportionalPowerLimit = 80;
+hardwarePidControl1.OutputProportionalBand = 5;
+hardwarePidControl1.IntegralTime = 5;
+hardwarePidControl1.DerivativeTime = 0;
+hardwarePidControl1.SensorCorrectionAdjustment = 0;
+hardwarePidControl1.SensorMinValue = 0;
+hardwarePidControl1.SensorMaxValue = 0;
+hardwarePidControl1.SetPointRampRateorSoftStartRamp = 0;
+hardwarePidControl1.SetPointControlOutputRate = 4;
+hardwarePidControl1.ControlOutputType = 0;
+hardwarePidControl1.SsrControlOutputType = 0;
+hardwarePidControl1.OutputOnOffHysteresisValue = 0;
+hardwarePidControl1.ProcessVariableSamplingRate = 1000;
+hardwarePidControl1.PvInputFilterFactorMode = 4;
+hardwarePidControl1.OutputProportionalCycleTime = 0;
+hardwarePidControl1.AcHeatersHalfCycleTime = 0;
+hardwarePidControl1.ProportionalGain = 500.0;
+hardwareConfiguration.PidControls.Add(hardwarePidControl1);
+
+
+HardwarePidControl hardwarePidControl2 = new HardwarePidControl();
+hardwarePidControl2.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.MotorPooler;
+hardwarePidControl2.OutputProportionalPowerLimit = 80;
+hardwarePidControl2.OutputProportionalBand = 5;
+hardwarePidControl2.IntegralTime = 5;
+hardwarePidControl2.DerivativeTime = 0;
+hardwarePidControl2.SensorCorrectionAdjustment = 0;
+hardwarePidControl2.SensorMinValue = 0;
+hardwarePidControl2.SensorMaxValue = 0;
+hardwarePidControl2.SetPointRampRateorSoftStartRamp = 0;
+hardwarePidControl2.SetPointControlOutputRate = 4;
+hardwarePidControl2.ControlOutputType = 0;
+hardwarePidControl2.SsrControlOutputType = 0;
+hardwarePidControl2.OutputOnOffHysteresisValue = 0;
+hardwarePidControl2.ProcessVariableSamplingRate = 1000;
+hardwarePidControl2.PvInputFilterFactorMode = 4;
+hardwarePidControl2.OutputProportionalCycleTime = 0;
+hardwarePidControl2.AcHeatersHalfCycleTime = 0;
+hardwarePidControl2.ProportionalGain = 500.0;
+hardwareConfiguration.PidControls.Add(hardwarePidControl2);
+
+
+HardwarePidControl hardwarePidControl3 = new HardwarePidControl();
+hardwarePidControl3.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.MotorWinder;
+hardwarePidControl3.OutputProportionalPowerLimit = 80;
+hardwarePidControl3.OutputProportionalBand = 5;
+hardwarePidControl3.IntegralTime = 5;
+hardwarePidControl3.DerivativeTime = 0;
+hardwarePidControl3.SensorCorrectionAdjustment = 0;
+hardwarePidControl3.SensorMinValue = 0;
+hardwarePidControl3.SensorMaxValue = 0;
+hardwarePidControl3.SetPointRampRateorSoftStartRamp = 0;
+hardwarePidControl3.SetPointControlOutputRate = 4;
+hardwarePidControl3.ControlOutputType = 0;
+hardwarePidControl3.SsrControlOutputType = 0;
+hardwarePidControl3.OutputOnOffHysteresisValue = 0;
+hardwarePidControl3.ProcessVariableSamplingRate = 1000;
+hardwarePidControl3.PvInputFilterFactorMode = 4;
+hardwarePidControl3.OutputProportionalCycleTime = 0;
+hardwarePidControl3.AcHeatersHalfCycleTime = 0;
+hardwarePidControl3.ProportionalGain = 500.0;
+hardwareConfiguration.PidControls.Add(hardwarePidControl3);
+ HardwarePidControl Pid1 = new HardwarePidControl();
+ HardwarePidControl Pid2 = new HardwarePidControl();
+//Pid1.has_hardwarepidcontroltype = true;
+Pid1.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.DryerHeater1000W;
+ // Pid1.has_outputproportionalpowerlimit = true;
+ Pid1.OutputProportionalPowerLimit = 50;
+ // Pid1.has_outputproportionalband = true;
+ Pid1.OutputProportionalBand = 3;
+ // Pid1.has_kp = true;
+ Pid1.SensorCorrectionAdjustment = 2.0;
+ //Pid1.has_ki = true;
+ Pid1.IntegralTime = 0.01;
+Pid1.OutputProportionalPowerLimit = 80;
+Pid1.OutputProportionalBand = 5;
+Pid1.IntegralTime = 5;
+Pid1.DerivativeTime = 0;
+Pid1.SensorCorrectionAdjustment = 0;
+Pid1.SensorMinValue = 0;
+Pid1.SensorMaxValue = 0;
+Pid1.SetPointRampRateorSoftStartRamp = 0;
+Pid1.SetPointControlOutputRate = 4;
+Pid1.ControlOutputType = 0;
+Pid1.SsrControlOutputType = 0;
+Pid1.OutputOnOffHysteresisValue = 0;
+Pid1.ProcessVariableSamplingRate = 1000;
+Pid1.PvInputFilterFactorMode = 4;
+Pid1.OutputProportionalCycleTime = 0;
+Pid1.AcHeatersHalfCycleTime = 0;
+Pid1.ProportionalGain = 500.0;
+hardwareConfiguration.PidControls.Add(Pid1);
+
+ //Pid2.has_hardwarepidcontroltype = true;
+Pid2.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.DryerHeater200W1;
+ // Pid2.has_outputproportionalpowerlimit = true;
+ Pid2.OutputProportionalPowerLimit = 40;
+ // Pid2.has_outputproportionalband = true;
+ Pid2.OutputProportionalBand = 3;
+ // Pid2.has_kp = true;
+ Pid2.SensorCorrectionAdjustment = 0.5;
+ //Pid2.has_ki = true;
+ Pid2.IntegralTime = 0.1;
+Pid2.OutputProportionalPowerLimit = 80;
+Pid2.OutputProportionalBand = 5;
+Pid2.IntegralTime = 5;
+Pid2.DerivativeTime = 0;
+Pid2.SensorCorrectionAdjustment = 0;
+Pid2.SensorMinValue = 0;
+Pid2.SensorMaxValue = 0;
+Pid2.SetPointRampRateorSoftStartRamp = 0;
+Pid2.SetPointControlOutputRate = 4;
+Pid2.ControlOutputType = 0;
+Pid2.SsrControlOutputType = 0;
+Pid2.OutputOnOffHysteresisValue = 0;
+Pid2.ProcessVariableSamplingRate = 1000;
+Pid2.PvInputFilterFactorMode = 4;
+Pid2.OutputProportionalCycleTime = 0;
+Pid2.AcHeatersHalfCycleTime = 0;
+Pid2.ProportionalGain = 500.0;
+hardwareConfiguration.PidControls.Add(Pid2);
+
+*/
+ HardwarePidControl Pid3 = new HardwarePidControl();
+ HardwarePidControl Pid4 = new HardwarePidControl();
+//Pid3.has_hardwarepidcontroltype = true;
+Pid3.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.HeadHeaterZ1;
+ // Pid1.has_outputproportionalpowerlimit = true;
+ Pid3.OutputProportionalPowerLimit = 50;
+ // Pid1.has_outputproportionalband = true;
+ Pid3.OutputProportionalBand = 3;
+ // Pid1.has_kp = true;
+ Pid3.SensorCorrectionAdjustment = 2.0;
+ //Pid1.has_ki = true;
+ Pid3.IntegralTime = 0.01;
+Pid3.OutputProportionalPowerLimit = 80;
+Pid3.OutputProportionalBand = 5;
+Pid3.IntegralTime = 5;
+Pid3.DerivativeTime = 0;
+Pid3.SensorCorrectionAdjustment = 0;
+Pid3.SensorMinValue = 0;
+Pid3.SensorMaxValue = 0;
+Pid3.SetPointRampRateorSoftStartRamp = 0;
+Pid3.SetPointControlOutputRate = 4;
+Pid3.ControlOutputType = 0;
+Pid3.SsrControlOutputType = 0;
+Pid3.OutputOnOffHysteresisValue = 0;
+Pid3.ProcessVariableSamplingRate = 1000;
+Pid3.PvInputFilterFactorMode = 4;
+Pid3.OutputProportionalCycleTime = 0;
+Pid3.AcHeatersHalfCycleTime = 0;
+Pid3.ProportionalGain = 500.0;
+hardwareConfiguration.PidControls.Add(Pid3);
+
+ //Pid2.has_hardwarepidcontroltype = true;
+
+Pid4.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.HeadHeaterZ2;
+ // Pid2.has_outputproportionalpowerlimit = true;
+ Pid4.OutputProportionalPowerLimit = 40;
+ // Pid2.has_outputproportionalband = true;
+ Pid4.OutputProportionalBand = 3;
+ // Pid2.has_kp = true;
+ Pid4.SensorCorrectionAdjustment = 0.5;
+ //Pid2.has_ki = true;
+ Pid4.IntegralTime = 0.1;
+
+Pid4.OutputProportionalPowerLimit = 80;
+Pid4.OutputProportionalBand = 5;
+Pid4.IntegralTime = 5;
+Pid4.DerivativeTime = 0;
+Pid4.SensorCorrectionAdjustment = 0;
+Pid4.SensorMinValue = 0;
+Pid4.SensorMaxValue = 0;
+Pid4.SetPointRampRateorSoftStartRamp = 0;
+Pid4.SetPointControlOutputRate = 4;
+Pid4.ControlOutputType = 0;
+Pid4.SsrControlOutputType = 0;
+Pid4.OutputOnOffHysteresisValue = 0;
+Pid4.ProcessVariableSamplingRate = 1000;
+Pid4.PvInputFilterFactorMode = 4;
+Pid4.OutputProportionalCycleTime = 0;
+Pid4.AcHeatersHalfCycleTime = 0;
+Pid4.ProportionalGain = 500.0;
+hardwareConfiguration.PidControls.Add(Pid4);
+ /*
+HardwarePidControl Pid5 = new HardwarePidControl();
+ HardwarePidControl Pid6 = new HardwarePidControl();
+//Pid1.has_hardwarepidcontroltype = true;
+Pid5.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.HeadHeaterZ3;
+ // Pid1.has_outputproportionalpowerlimit = true;
+ Pid5.OutputProportionalPowerLimit = 50;
+ // Pid1.has_outputproportionalband = true;
+ Pid5.OutputProportionalBand = 3;
+ // Pid1.has_kp = true;
+ Pid5.SensorCorrectionAdjustment = 2.0;
+ //Pid1.has_ki = true;
+ Pid5.IntegralTime = 0.01;
+hardwareConfiguration.PidControls.Add(Pid5);
+
+ //Pid2.has_hardwarepidcontroltype = true;
+Pid6.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.HeadHeaterZ4;
+ // Pid2.has_outputproportionalpowerlimit = true;
+ Pid6.OutputProportionalPowerLimit = 40;
+ // Pid2.has_outputproportionalband = true;
+ Pid6.OutputProportionalBand = 3;
+ // Pid2.has_kp = true;
+ Pid6.SensorCorrectionAdjustment = 0.5;
+ //Pid2.has_ki = true;
+ Pid6.IntegralTime = 0.1;
+hardwareConfiguration.PidControls.Add(Pid6);
+
+HardwarePidControl Pid7 = new HardwarePidControl();
+//Pid1.has_hardwarepidcontroltype = true;
+Pid7.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.MixerHeater;
+ // Pid1.has_outputproportionalpowerlimit = true;
+ Pid7.OutputProportionalPowerLimit = 50;
+ // Pid1.has_outputproportionalband = true;
+ Pid7.OutputProportionalBand = 3;
+ // Pid1.has_kp = true;
+ Pid7.SensorCorrectionAdjustment = 2.0;
+ //Pid1.has_ki = true;
+ Pid7.IntegralTime = 0.01;
+hardwareConfiguration.PidControls.Add(Pid7);
+
+
+HardwareDancer hardwareDancer1 = new HardwareDancer();
+hardwareDancer1.HardwareDancerType = Tango.PMR.Hardware.HardwareDancerType.RightDancer;
+hardwareDancer1.Gradual = false;
+hardwareDancer1.K = 0;
+hardwareDancer1.X = 0;
+hardwareDancer1.PulsePerMmSpring = 0;
+hardwareDancer1.MaximalMovementMm = 15;
+hardwareDancer1.ZeroPoint = 10100;
+hardwareDancer1.ResolutionBits = 14;
+hardwareDancer1.ArmLength = 126;
+hardwareConfiguration.Dancers.Add(hardwareDancer1);
+
+ HardwareDancer hardwareDancer2 = new HardwareDancer();
+ hardwareDancer2.HardwareDancerType = Tango.PMR.Hardware.HardwareDancerType.MiddleDancer;
+ hardwareDancer2.Gradual = false;
+ hardwareDancer2.K = 0;
+ hardwareDancer2.X = 0;
+ hardwareDancer2.PulsePerMmSpring = 0;
+ hardwareDancer2.MaximalMovementMm = 15;
+ hardwareDancer2.ZeroPoint = 6300;
+ hardwareDancer2.ResolutionBits = 14;
+ hardwareDancer2.ArmLength = 126;
+hardwareConfiguration.Dancers.Add(hardwareDancer2);
+
+ HardwareDancer hardwareDancer3 = new HardwareDancer();
+ hardwareDancer3.HardwareDancerType = Tango.PMR.Hardware.HardwareDancerType.LeftDancer;
+ hardwareDancer3.Gradual = false;
+ hardwareDancer3.K = 0;
+ hardwareDancer3.X = 0;
+ hardwareDancer3.PulsePerMmSpring = 0;
+ hardwareDancer3.MaximalMovementMm = 15;
+ hardwareDancer3.ZeroPoint = 9100;
+ hardwareDancer3.ResolutionBits = 14;
+ hardwareDancer3.ArmLength = 126;
+hardwareConfiguration.Dancers.Add(hardwareDancer3);
+
+HardwareMotor hardwareMotor1 = new HardwareMotor();
+hardwareMotor1.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoRdriving;
+hardwareMotor1.MinFrequency = 0;
+hardwareMotor1.MaxFrequency = 30000;
+hardwareMotor1.SetMicroStep = 1;
+hardwareMotor1.MicroStep = 2;
+hardwareMotor1.MaxChangeSlope = 500;
+hardwareMotor1.HighLengthMicroSecond = 0;
+hardwareMotor1.SpeedMaster = false;
+hardwareMotor1.PulsePerRound = 200;
+hardwareMotor1.PulleyRadius = 1.3;
+hardwareMotor1.ConfigWord = 0;
+hardwareMotor1.DirectionThreadWize = true;
+hardwareMotor1.KvalHold = 0x28;
+hardwareMotor1.KvalRun = 0x5f;
+hardwareMotor1.KvalAcc = 0x5f;
+hardwareMotor1.KvalDec = 0x5f;
+hardwareMotor1.OverCurrentThreshold = 7;
+hardwareMotor1.StallThreshold = 0;
+hardwareMotor1.ThermalCompensationFactor = 0;
+hardwareMotor1.LowSpeedOptimization = false;
+hardwareMotor1.StSlp = 6;
+hardwareMotor1.IntSpd = 0x44B8;
+hardwareMotor1.FnSlpAcc = 0x14;
+hardwareMotor1.FnSlpDec = 0x14;
+hardwareConfiguration.Motors.Add(hardwareMotor1);
+
+HardwareMotor hardwareMotor2 = new HardwareMotor();
+hardwareMotor2.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoWinder;
+hardwareMotor2.MinFrequency = 0;
+hardwareMotor2.MaxFrequency = 30000;
+hardwareMotor2.SetMicroStep = 1;
+hardwareMotor2.MicroStep = 2;
+hardwareMotor2.MaxChangeSlope = 500;
+hardwareMotor2.HighLengthMicroSecond = 0;
+hardwareMotor2.SpeedMaster = false;
+hardwareMotor2.PulsePerRound = 200;
+hardwareMotor2.PulleyRadius = 1.3;
+hardwareMotor2.ConfigWord = 0;
+hardwareMotor2.DirectionThreadWize = true;
+hardwareMotor2.KvalHold = 0x28;
+hardwareMotor2.KvalRun = 0x5f;
+hardwareMotor2.KvalAcc = 0x5f;
+hardwareMotor2.KvalDec = 0x5f;
+hardwareMotor2.OverCurrentThreshold = 7;
+hardwareMotor2.StallThreshold = 0;
+hardwareMotor2.ThermalCompensationFactor = 0;
+hardwareMotor2.LowSpeedOptimization = false;
+hardwareMotor2.StSlp = 6;
+hardwareMotor2.IntSpd = 0x44B8;
+hardwareMotor2.FnSlpAcc = 0x14;
+hardwareMotor2.FnSlpDec = 0x14;
+hardwareConfiguration.Motors.Add(hardwareMotor2);
+
+/*HardwareMotor hardwareMotor3 = new HardwareMotor();
+hardwareMotor3.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoDryer;
+hardwareMotor3.MinFrequency = 0;
+hardwareMotor3.MaxFrequency = 6000;
+hardwareMotor3.SetMicroStep = 1;
+hardwareMotor3.MicroStep = 2;
+hardwareMotor3.MaxChangeSlope = 500;
+hardwareMotor3.HighLengthMicroSecond = 0;
+hardwareMotor3.SpeedMaster = false;
+hardwareMotor3.PulsePerRound = 200;
+hardwareMotor3.PulleyRadius = 1.3;
+hardwareMotor3.ConfigWord = 0;
+hardwareMotor3.DirectionThreadWize = true;
+hardwareMotor3.KvalHold = 0x28;
+hardwareMotor3.KvalRun = 0x5f;
+hardwareMotor3.KvalAcc = 0x5f;
+hardwareMotor3.KvalDec = 0x5f;
+hardwareMotor3.OverCurrentThreshold = 7;
+hardwareMotor3.StallThreshold = 0;
+hardwareMotor3.ThermalCompensationFactor = 0;
+hardwareMotor3.LowSpeedOptimization = false;
+hardwareMotor3.StSlp = 6;
+hardwareMotor3.IntSpd = 0x44B8;
+hardwareMotor3.FnSlpAcc = 0x14;
+hardwareMotor3.FnSlpDec = 0x14;
+hardwareConfiguration.Motors.Add(hardwareMotor3);*/
+/*
+HardwareMotor hardwareMotor4 = new HardwareMotor();
+hardwareMotor4.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoLdriving;
+hardwareMotor4.MinFrequency = 0;
+hardwareMotor4.MaxFrequency = 30000;
+hardwareMotor4.SetMicroStep = 1;
+hardwareMotor4.MicroStep = 2;
+hardwareMotor4.MaxChangeSlope = 500;
+hardwareMotor4.HighLengthMicroSecond = 0;
+hardwareMotor4.SpeedMaster = false;
+hardwareMotor4.PulsePerRound = 200;
+hardwareMotor4.PulleyRadius = 1.3;
+hardwareMotor4.ConfigWord = 0;
+hardwareMotor4.DirectionThreadWize = true;
+hardwareMotor4.KvalHold = 0x28;
+hardwareMotor4.KvalRun = 0x5f;
+hardwareMotor4.KvalAcc = 0x5f;
+hardwareMotor4.KvalDec = 0x5f;
+hardwareMotor4.OverCurrentThreshold = 7;
+hardwareMotor4.StallThreshold = 0;
+hardwareMotor4.ThermalCompensationFactor = 0;
+hardwareMotor4.LowSpeedOptimization = false;
+hardwareMotor4.StSlp = 6;
+hardwareMotor4.IntSpd = 0x44B8;
+hardwareMotor4.FnSlpAcc = 0x14;
+hardwareMotor4.FnSlpDec = 0x14;
+hardwareConfiguration.Motors.Add(hardwareMotor4);
+*/
+stubManager.WriteLine("data.data length = " + hardwareConfiguration.CalculateSize());
+
+
+uploadHardwareConfigurationRequest.HardwareConfiguration = hardwareConfiguration;
+var response = stubManager.Run<UploadHardwareConfigurationResponse>(uploadHardwareConfigurationRequest);
+ Thread.Sleep(5000);
+/*
+ stubManager.Run("StubGPIOWriteBitRequest" ,"Q", 7, false);//OFF
+ Thread.Sleep(10);
+ stubManager.Run("StubGPIOWriteBitRequest" ,"Q", 4, true);//ON
+ Thread.Sleep(10);
+ stubManager.Run("StubGPIOWriteBitRequest" ,"Q", 4, false);//OFF
+ Thread.Sleep(10);
+ stubManager.Run("StubGPIOWriteBitRequest" ,"Q", 4, true);//ON
+
+*/
+
+}
+
diff --git a/Software/Stubs Collection/stubs/SystemTest.cs b/Software/Stubs Collection/stubs/SystemTest.cs
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/Software/Stubs Collection/stubs/SystemTest.cs
diff --git a/Software/Stubs Collection/stubs/SystemTestAdvanced.cs b/Software/Stubs Collection/stubs/SystemTestAdvanced.cs
new file mode 100644
index 000000000..cd73df65a
--- /dev/null
+++ b/Software/Stubs Collection/stubs/SystemTestAdvanced.cs
@@ -0,0 +1,525 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Hardware;
+using Tango.PMR.Printing;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+public void OnExecute(StubManager stubManager)
+{
+//SystemResetRequest systemResetRequest = new SystemResetRequest();
+//var response1 = stubManager.Run<SystemResetResponse>(systemResetRequest);
+// stubManager.Run("StubGPIOWriteBitRequest" ,"P", 4, true);//ON
+ Thread.Sleep(10);
+// stubManager.Run("StubGPIOWriteBitRequest" ,"P", 4, false);//OFF
+ Thread.Sleep(10);
+// stubManager.Run("StubGPIOWriteBitRequest" ,"P", 4, true);//ON
+/*UploadProcessParametersRequest uploadProcessParametersRequest = new UploadProcessParametersRequest();
+
+ProcessParameters processParameters = new ProcessParameters();
+processParameters.DyeingSpeed = 10;
+processParameters.MixerTemp = 0;
+processParameters.DryerBufferLength = 0;
+processParameters.MinInkUptake = 0;
+processParameters.HeadZone1Temp = 0;
+processParameters.DryerZone1Temp = 100;
+processParameters.FeederTension = 0;
+processParameters.DryerZone2Temp = 100;
+processParameters.HeadZone2Temp = 0;
+processParameters.PullerTension = 0;
+processParameters.HeadZone3Temp = 0;
+processParameters.DryerZone3Temp = 0;
+processParameters.WinderTension = 0;
+processParameters.HeadAirFlow = 0;
+processParameters.DryerAirFlow = 0;
+processParameters.TableIndex = 0;
+
+uploadProcessParametersRequest.ProcessParameters = processParameters;
+var response1 = stubManager.Run<UploadProcessParametersResponse>(uploadProcessParametersRequest);
+*/
+
+UploadHardwareConfigurationRequest uploadHardwareConfigurationRequest = new UploadHardwareConfigurationRequest();
+
+HardwareConfiguration hardwareConfiguration = new HardwareConfiguration();
+
+
+HardwarePidControl hardwarePidControl1 = new HardwarePidControl();
+hardwarePidControl1.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.MotorFeeder;
+hardwarePidControl1.OutputProportionalPowerLimit = 80;
+hardwarePidControl1.OutputProportionalBand = 5;
+hardwarePidControl1.IntegralTime = 5;
+hardwarePidControl1.DerivativeTime = 0;
+hardwarePidControl1.SensorCorrectionAdjustment = 0;
+hardwarePidControl1.SensorMinValue = 0;
+hardwarePidControl1.SensorMaxValue = 0;
+hardwarePidControl1.SetPointRampRateorSoftStartRamp = 0;
+hardwarePidControl1.SetPointControlOutputRate = 4;
+hardwarePidControl1.ControlOutputType = 0;
+hardwarePidControl1.SsrControlOutputType = 0;
+hardwarePidControl1.OutputOnOffHysteresisValue = 0;
+hardwarePidControl1.ProcessVariableSamplingRate = 1000;
+hardwarePidControl1.PvInputFilterFactorMode = 4;
+hardwarePidControl1.OutputProportionalCycleTime = 0;
+hardwarePidControl1.AcHeatersHalfCycleTime = 0;
+hardwarePidControl1.ProportionalGain = 80.0;
+hardwareConfiguration.PidControls.Add(hardwarePidControl1);
+
+
+HardwarePidControl hardwarePidControl2 = new HardwarePidControl();
+hardwarePidControl2.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.MotorPooler;
+hardwarePidControl2.OutputProportionalPowerLimit = 80;
+hardwarePidControl2.OutputProportionalBand = 5;
+hardwarePidControl2.IntegralTime = 5;
+hardwarePidControl2.DerivativeTime = 0;
+hardwarePidControl2.SensorCorrectionAdjustment = 0;
+hardwarePidControl2.SensorMinValue = 0;
+hardwarePidControl2.SensorMaxValue = 0;
+hardwarePidControl2.SetPointRampRateorSoftStartRamp = 0;
+hardwarePidControl2.SetPointControlOutputRate = 4;
+hardwarePidControl2.ControlOutputType = 0;
+hardwarePidControl2.SsrControlOutputType = 0;
+hardwarePidControl2.OutputOnOffHysteresisValue = 0;
+hardwarePidControl2.ProcessVariableSamplingRate = 1000;
+hardwarePidControl2.PvInputFilterFactorMode = 4;
+hardwarePidControl2.OutputProportionalCycleTime = 0;
+hardwarePidControl2.AcHeatersHalfCycleTime = 0;
+hardwarePidControl2.ProportionalGain = 80.0;
+hardwareConfiguration.PidControls.Add(hardwarePidControl2);
+
+
+HardwarePidControl hardwarePidControl3 = new HardwarePidControl();
+hardwarePidControl3.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.MotorWinder;
+hardwarePidControl3.OutputProportionalPowerLimit = 80;
+hardwarePidControl3.OutputProportionalBand = 5;
+hardwarePidControl3.IntegralTime = 5;
+hardwarePidControl3.DerivativeTime = 0;
+hardwarePidControl3.SensorCorrectionAdjustment = 0;
+hardwarePidControl3.SensorMinValue = 0;
+hardwarePidControl3.SensorMaxValue = 0;
+hardwarePidControl3.SetPointRampRateorSoftStartRamp = 0;
+hardwarePidControl3.SetPointControlOutputRate = 4;
+hardwarePidControl3.ControlOutputType = 0;
+hardwarePidControl3.SsrControlOutputType = 0;
+hardwarePidControl3.OutputOnOffHysteresisValue = 0;
+hardwarePidControl3.ProcessVariableSamplingRate = 1000;
+hardwarePidControl3.PvInputFilterFactorMode = 4;
+hardwarePidControl3.OutputProportionalCycleTime = 0;
+hardwarePidControl3.AcHeatersHalfCycleTime = 0;
+hardwarePidControl3.ProportionalGain = 80.0;
+hardwareConfiguration.PidControls.Add(hardwarePidControl3);
+ HardwarePidControl Pid1 = new HardwarePidControl();
+ HardwarePidControl Pid2 = new HardwarePidControl();
+//Pid1.has_hardwarepidcontroltype = true;
+Pid1.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.DryerHeater1000W;
+ // Pid1.has_outputproportionalpowerlimit = true;
+ Pid1.OutputProportionalPowerLimit = 50;
+ // Pid1.has_outputproportionalband = true;
+ Pid1.OutputProportionalBand = 3;
+ // Pid1.has_kp = true;
+ Pid1.SensorCorrectionAdjustment = 2.0;
+ //Pid1.has_ki = true;
+ Pid1.IntegralTime = 0.01;
+Pid1.OutputProportionalPowerLimit = 80;
+Pid1.OutputProportionalBand = 5;
+Pid1.IntegralTime = 5;
+Pid1.DerivativeTime = 0;
+Pid1.SensorCorrectionAdjustment = 0;
+Pid1.SensorMinValue = 0;
+Pid1.SensorMaxValue = 0;
+Pid1.SetPointRampRateorSoftStartRamp = 0;
+Pid1.SetPointControlOutputRate = 4;
+Pid1.ControlOutputType = 0;
+Pid1.SsrControlOutputType = 0;
+Pid1.OutputOnOffHysteresisValue = 0;
+Pid1.ProcessVariableSamplingRate = 1000;
+Pid1.PvInputFilterFactorMode = 4;
+Pid1.OutputProportionalCycleTime = 0;
+Pid1.AcHeatersHalfCycleTime = 0;
+Pid1.ProportionalGain = 500.0;
+//hardwareConfiguration.PidControls.Add(Pid1);
+
+ //Pid2.has_hardwarepidcontroltype = true;
+Pid2.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.DryerHeater200W1;
+ // Pid2.has_outputproportionalpowerlimit = true;
+ Pid2.OutputProportionalPowerLimit = 40;
+ // Pid2.has_outputproportionalband = true;
+ Pid2.OutputProportionalBand = 3;
+ // Pid2.has_kp = true;
+ Pid2.SensorCorrectionAdjustment = 0.5;
+ //Pid2.has_ki = true;
+ Pid2.IntegralTime = 0.1;
+Pid2.OutputProportionalPowerLimit = 80;
+Pid2.OutputProportionalBand = 5;
+Pid2.IntegralTime = 5;
+Pid2.DerivativeTime = 0;
+Pid2.SensorCorrectionAdjustment = 0;
+Pid2.SensorMinValue = 0;
+Pid2.SensorMaxValue = 0;
+Pid2.SetPointRampRateorSoftStartRamp = 0;
+Pid2.SetPointControlOutputRate = 4;
+Pid2.ControlOutputType = 0;
+Pid2.SsrControlOutputType = 0;
+Pid2.OutputOnOffHysteresisValue = 0;
+Pid2.ProcessVariableSamplingRate = 1000;
+Pid2.PvInputFilterFactorMode = 4;
+Pid2.OutputProportionalCycleTime = 0;
+Pid2.AcHeatersHalfCycleTime = 0;
+Pid2.ProportionalGain = 500.0;
+//hardwareConfiguration.PidControls.Add(Pid2);
+
+
+ HardwarePidControl Pid3 = new HardwarePidControl();
+ HardwarePidControl Pid4 = new HardwarePidControl();
+//Pid3.has_hardwarepidcontroltype = true;
+//Pid3.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.HeadHeaterZ1;
+ // Pid1.has_outputproportionalpowerlimit = true;
+ Pid3.OutputProportionalPowerLimit = 50;
+ // Pid1.has_outputproportionalband = true;
+ Pid3.OutputProportionalBand = 3;
+ // Pid1.has_kp = true;
+ Pid3.SensorCorrectionAdjustment = 2.0;
+ //Pid1.has_ki = true;
+ Pid3.IntegralTime = 0.01;
+Pid3.OutputProportionalPowerLimit = 80;
+Pid3.OutputProportionalBand = 5;
+Pid3.IntegralTime = 5;
+Pid3.DerivativeTime = 0;
+Pid3.SensorCorrectionAdjustment = 0;
+Pid3.SensorMinValue = 0;
+Pid3.SensorMaxValue = 0;
+Pid3.SetPointRampRateorSoftStartRamp = 0;
+Pid3.SetPointControlOutputRate = 4;
+Pid3.ControlOutputType = 0;
+Pid3.SsrControlOutputType = 0;
+Pid3.OutputOnOffHysteresisValue = 0;
+Pid3.ProcessVariableSamplingRate = 1000;
+Pid3.PvInputFilterFactorMode = 4;
+Pid3.OutputProportionalCycleTime = 0;
+Pid3.AcHeatersHalfCycleTime = 0;
+Pid3.ProportionalGain = 500.0;
+//hardwareConfiguration.PidControls.Add(Pid3);
+
+ //Pid2.has_hardwarepidcontroltype = true;
+
+Pid4.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.HeadHeaterZ2;
+ // Pid2.has_outputproportionalpowerlimit = true;
+ Pid4.OutputProportionalPowerLimit = 40;
+ // Pid2.has_outputproportionalband = true;
+ Pid4.OutputProportionalBand = 3;
+ // Pid2.has_kp = true;
+ Pid4.SensorCorrectionAdjustment = 0.5;
+ //Pid2.has_ki = true;
+ Pid4.IntegralTime = 0.1;
+
+Pid4.OutputProportionalPowerLimit = 80;
+Pid4.OutputProportionalBand = 5;
+Pid4.IntegralTime = 5;
+Pid4.DerivativeTime = 0;
+Pid4.SensorCorrectionAdjustment = 0;
+Pid4.SensorMinValue = 0;
+Pid4.SensorMaxValue = 0;
+Pid4.SetPointRampRateorSoftStartRamp = 0;
+Pid4.SetPointControlOutputRate = 4;
+Pid4.ControlOutputType = 0;
+Pid4.SsrControlOutputType = 0;
+Pid4.OutputOnOffHysteresisValue = 0;
+Pid4.ProcessVariableSamplingRate = 1000;
+Pid4.PvInputFilterFactorMode = 4;
+Pid4.OutputProportionalCycleTime = 0;
+Pid4.AcHeatersHalfCycleTime = 0;
+Pid4.ProportionalGain = 500.0;
+//hardwareConfiguration.PidControls.Add(Pid4);
+
+HardwarePidControl Pid5 = new HardwarePidControl();
+ HardwarePidControl Pid6 = new HardwarePidControl();
+//Pid1.has_hardwarepidcontroltype = true;
+Pid5.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.HeadHeaterZ3;
+ // Pid1.has_outputproportionalpowerlimit = true;
+ Pid5.OutputProportionalPowerLimit = 50;
+ // Pid1.has_outputproportionalband = true;
+ Pid5.OutputProportionalBand = 3;
+ // Pid1.has_kp = true;
+ Pid5.SensorCorrectionAdjustment = 2.0;
+ //Pid1.has_ki = true;
+ Pid5.IntegralTime = 0.01;
+//hardwareConfiguration.PidControls.Add(Pid5);
+
+ //Pid2.has_hardwarepidcontroltype = true;
+Pid6.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.HeadHeaterZ4;
+ // Pid2.has_outputproportionalpowerlimit = true;
+ Pid6.OutputProportionalPowerLimit = 40;
+ // Pid2.has_outputproportionalband = true;
+ Pid6.OutputProportionalBand = 3;
+ // Pid2.has_kp = true;
+ Pid6.SensorCorrectionAdjustment = 0.5;
+ //Pid2.has_ki = true;
+ Pid6.IntegralTime = 0.1;
+//hardwareConfiguration.PidControls.Add(Pid6);
+
+HardwarePidControl Pid7 = new HardwarePidControl();
+//Pid1.has_hardwarepidcontroltype = true;
+Pid7.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.MixerHeater;
+ // Pid1.has_outputproportionalpowerlimit = true;
+ Pid7.OutputProportionalPowerLimit = 50;
+ // Pid1.has_outputproportionalband = true;
+ Pid7.OutputProportionalBand = 3;
+ // Pid1.has_kp = true;
+ Pid7.SensorCorrectionAdjustment = 2.0;
+ //Pid1.has_ki = true;
+ Pid7.IntegralTime = 0.01;
+//hardwareConfiguration.PidControls.Add(Pid7);
+
+
+HardwareDancer hardwareDancer1 = new HardwareDancer();
+hardwareDancer1.HardwareDancerType = Tango.PMR.Hardware.HardwareDancerType.RightDancer;
+hardwareDancer1.Gradual = false;
+hardwareDancer1.K = 0;
+hardwareDancer1.X = 0;
+hardwareDancer1.PulsePerMmSpring = 0;
+hardwareDancer1.MaximalMovementMm = 15;
+hardwareDancer1.ZeroPoint = 11156;
+hardwareDancer1.ResolutionBits = 14;
+hardwareDancer1.ArmLength = 126;
+hardwareConfiguration.Dancers.Add(hardwareDancer1);
+
+ HardwareDancer hardwareDancer2 = new HardwareDancer();
+ hardwareDancer2.HardwareDancerType = Tango.PMR.Hardware.HardwareDancerType.MiddleDancer;
+ hardwareDancer2.Gradual = false;
+ hardwareDancer2.K = 0;
+ hardwareDancer2.X = 0;
+ hardwareDancer2.PulsePerMmSpring = 0;
+ hardwareDancer2.MaximalMovementMm = 15;
+ hardwareDancer2.ZeroPoint = 13200;
+ hardwareDancer2.ResolutionBits = 14;
+ hardwareDancer2.ArmLength = 126;
+hardwareConfiguration.Dancers.Add(hardwareDancer2);
+
+ HardwareDancer hardwareDancer3 = new HardwareDancer();
+ hardwareDancer3.HardwareDancerType = Tango.PMR.Hardware.HardwareDancerType.LeftDancer;
+ hardwareDancer3.Gradual = false;
+ hardwareDancer3.K = 0;
+ hardwareDancer3.X = 0;
+ hardwareDancer3.PulsePerMmSpring = 0;
+ hardwareDancer3.MaximalMovementMm = 15;
+ hardwareDancer3.ZeroPoint = 14307;
+ hardwareDancer3.ResolutionBits = 14;
+ hardwareDancer3.ArmLength = 126;
+hardwareConfiguration.Dancers.Add(hardwareDancer3);
+
+HardwareMotor hardwareMotor1 = new HardwareMotor();
+hardwareMotor1.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoRdriving;
+hardwareMotor1.MinFrequency = 0;
+hardwareMotor1.MaxFrequency = 1000000;
+hardwareMotor1.SetMicroStep = 1;
+hardwareMotor1.MicroStep = 1;
+hardwareMotor1.MaxChangeSlope = 10000;
+hardwareMotor1.HighLengthMicroSecond = 0;
+hardwareMotor1.SpeedMaster = false;
+hardwareMotor1.PulsePerRound = 200;
+hardwareMotor1.PulleyRadius = 1.3;
+hardwareMotor1.ConfigWord = 0;
+hardwareMotor1.DirectionThreadWize = true;
+hardwareMotor1.KvalHold = 0x35;
+hardwareMotor1.KvalRun = 0x7f;
+hardwareMotor1.KvalAcc = 0x7f;
+hardwareMotor1.KvalDec = 0x7f;
+hardwareMotor1.OverCurrentThreshold = 7;
+hardwareMotor1.StallThreshold = 0x1F;
+hardwareMotor1.ThermalCompensationFactor = 0;
+hardwareMotor1.LowSpeedOptimization = false;
+hardwareMotor1.StSlp = 0x20;
+hardwareMotor1.IntSpd = 0x1A13;
+hardwareMotor1.FnSlpAcc = 0x50;
+hardwareMotor1.FnSlpDec = 0x50;
+hardwareConfiguration.Motors.Add(hardwareMotor1);
+
+HardwareMotor hardwareMotor2 = new HardwareMotor();
+hardwareMotor2.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoWinder;
+hardwareMotor2.MinFrequency = 0;
+hardwareMotor2.MaxFrequency = 1000000;
+hardwareMotor2.SetMicroStep = 1;
+hardwareMotor2.MicroStep = 16;
+hardwareMotor2.MaxChangeSlope = 10000;
+hardwareMotor2.HighLengthMicroSecond = 0;
+hardwareMotor2.SpeedMaster = false;
+hardwareMotor2.PulsePerRound = 200;
+hardwareMotor2.PulleyRadius = 1.68;
+hardwareMotor2.ConfigWord = 0x1c80;
+hardwareMotor2.DirectionThreadWize = false;
+hardwareMotor2.KvalHold = 0x35;
+hardwareMotor2.KvalRun = 0x7f;
+hardwareMotor2.KvalAcc = 0x7f;
+hardwareMotor2.KvalDec = 0x7f;
+hardwareMotor2.OverCurrentThreshold = 7;
+hardwareMotor2.StallThreshold = 0x1F;
+hardwareMotor2.ThermalCompensationFactor = 0;
+hardwareMotor2.LowSpeedOptimization = false;
+hardwareMotor2.StSlp = 0x20;
+hardwareMotor2.IntSpd = 0x1A13;
+hardwareMotor2.FnSlpAcc = 0x50;
+hardwareMotor2.FnSlpDec = 0x50;
+hardwareConfiguration.Motors.Add(hardwareMotor2);
+
+HardwareMotor hardwareMotor3 = new HardwareMotor();
+hardwareMotor3.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoDryerDriving;
+hardwareMotor3.MinFrequency = 0;
+hardwareMotor3.MaxFrequency = 1000000;
+hardwareMotor3.SetMicroStep = 1;
+hardwareMotor3.MicroStep = 1;
+hardwareMotor3.MaxChangeSlope = 1000;
+hardwareMotor3.HighLengthMicroSecond = 0;
+hardwareMotor3.SpeedMaster = true;
+hardwareMotor3.PulsePerRound = 200;
+hardwareMotor3.PulleyRadius = 1.3;
+hardwareMotor3.ConfigWord = 0x1c80;
+hardwareMotor3.DirectionThreadWize = true;
+hardwareMotor3.KvalHold = 0x35;
+hardwareMotor3.KvalRun = 0x7f;
+hardwareMotor3.KvalAcc = 0x7f;
+hardwareMotor3.KvalDec = 0x7f;
+hardwareMotor3.OverCurrentThreshold = 7;
+hardwareMotor3.StallThreshold = 0x1F;
+hardwareMotor3.ThermalCompensationFactor = 0;
+hardwareMotor3.LowSpeedOptimization = false;
+hardwareMotor3.StSlp = 0x20;
+hardwareMotor3.IntSpd = 0x1A13;
+hardwareMotor3.FnSlpAcc = 0x50;
+hardwareMotor3.FnSlpDec = 0x50;
+hardwareConfiguration.Motors.Add(hardwareMotor3);
+
+HardwareMotor hardwareMotor4 = new HardwareMotor();
+hardwareMotor4.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoLdriving;
+hardwareMotor4.MinFrequency = 0;
+hardwareMotor4.MaxFrequency = 1000000;
+hardwareMotor4.SetMicroStep = 1;
+hardwareMotor4.MicroStep = 8;
+hardwareMotor4.MaxChangeSlope = 10000;
+hardwareMotor4.HighLengthMicroSecond = 0;
+hardwareMotor4.SpeedMaster = false;
+hardwareMotor4.PulsePerRound = 200;
+hardwareMotor4.PulleyRadius = 1.3;
+hardwareMotor4.ConfigWord = 0x1C80;
+hardwareMotor4.DirectionThreadWize = true;
+hardwareMotor4.KvalHold = 0x35;
+hardwareMotor4.KvalRun = 0x7f;
+hardwareMotor4.KvalAcc = 0x7f;
+hardwareMotor4.KvalDec = 0x7f;
+hardwareMotor4.OverCurrentThreshold = 7;
+hardwareMotor4.StallThreshold = 0x1F;
+hardwareMotor4.ThermalCompensationFactor = 0;
+hardwareMotor4.LowSpeedOptimization = false;
+hardwareMotor4.StSlp = 20;
+hardwareMotor4.IntSpd = 0x1A13;
+hardwareMotor4.FnSlpAcc = 0x50;
+hardwareMotor4.FnSlpDec = 0x50;
+hardwareConfiguration.Motors.Add(hardwareMotor4);
+
+
+HardwareMotor hardwareMotor5 = new HardwareMotor();
+hardwareMotor5.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoScrew;
+hardwareMotor5.MinFrequency = 0;
+hardwareMotor5.MaxFrequency = 1000000;
+hardwareMotor5.SetMicroStep = 1;
+hardwareMotor5.MicroStep = 8;
+hardwareMotor5.MaxChangeSlope = 10000;
+hardwareMotor5.HighLengthMicroSecond = 0;
+hardwareMotor5.SpeedMaster = false;
+hardwareMotor5.PulsePerRound = 200;
+hardwareMotor5.PulleyRadius = 1.3;
+hardwareMotor5.ConfigWord = 0x1C80;
+hardwareMotor5.DirectionThreadWize = true;
+hardwareMotor5.KvalHold = 0x35;
+hardwareMotor5.KvalRun = 0x7f;
+hardwareMotor5.KvalAcc = 0x7f;
+hardwareMotor5.KvalDec = 0x7f;
+hardwareMotor5.OverCurrentThreshold = 7;
+hardwareMotor5.StallThreshold = 0x1F;
+hardwareMotor5.ThermalCompensationFactor = 0;
+hardwareMotor5.LowSpeedOptimization = false;
+hardwareMotor5.StSlp = 0x20;
+hardwareMotor5.IntSpd = 0x1A13;
+hardwareMotor5.FnSlpAcc = 0x50;
+hardwareMotor5.FnSlpDec = 0x50;
+hardwareConfiguration.Motors.Add(hardwareMotor5);
+
+HardwareMotor hardwareMotor6 = new HardwareMotor();
+hardwareMotor6.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoLloading;
+hardwareMotor6.MinFrequency = 0;
+hardwareMotor6.MaxFrequency = 1000000;
+hardwareMotor6.SetMicroStep = 1;
+hardwareMotor6.MicroStep = 4;
+hardwareMotor6.MaxChangeSlope = 10000;
+hardwareMotor6.HighLengthMicroSecond = 0;
+hardwareMotor6.SpeedMaster = false;
+hardwareMotor6.PulsePerRound = 200;
+hardwareMotor6.PulleyRadius = 1.3;
+hardwareMotor6.ConfigWord = 0xC80;
+hardwareMotor6.DirectionThreadWize = true;
+hardwareMotor6.KvalHold = 0x28;
+hardwareMotor6.KvalRun = 0x5f;
+hardwareMotor6.KvalAcc = 0x5f;
+hardwareMotor6.KvalDec = 0x5f;
+hardwareMotor6.OverCurrentThreshold = 7;
+hardwareMotor6.StallThreshold = 0x1F;
+hardwareMotor6.ThermalCompensationFactor = 0;
+hardwareMotor6.LowSpeedOptimization = false;
+hardwareMotor6.StSlp = 6;
+hardwareMotor6.IntSpd = 0x44B8;
+hardwareMotor6.FnSlpAcc = 0x14;
+hardwareMotor6.FnSlpDec = 0x14;
+hardwareConfiguration.Motors.Add(hardwareMotor6);
+
+HardwareMotor hardwareMotor7 = new HardwareMotor();
+hardwareMotor7.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoRloading;
+hardwareMotor7.MinFrequency = 0;
+hardwareMotor7.MaxFrequency = 1000000;
+hardwareMotor7.SetMicroStep = 1;
+hardwareMotor7.MicroStep = 4;
+hardwareMotor7.MaxChangeSlope = 10000;
+hardwareMotor7.HighLengthMicroSecond = 0;
+hardwareMotor7.SpeedMaster = false;
+hardwareMotor7.PulsePerRound = 200;
+hardwareMotor7.PulleyRadius = 1.3;
+hardwareMotor7.ConfigWord = 0xC80;
+hardwareMotor7.DirectionThreadWize = true;
+hardwareMotor7.KvalHold = 0x28;
+hardwareMotor7.KvalRun = 0x5f;
+hardwareMotor7.KvalAcc = 0x5f;
+hardwareMotor7.KvalDec = 0x5f;
+hardwareMotor7.OverCurrentThreshold = 7;
+hardwareMotor7.StallThreshold = 0x1F;
+hardwareMotor7.ThermalCompensationFactor = 0;
+hardwareMotor7.LowSpeedOptimization = false;
+hardwareMotor7.StSlp = 6;
+hardwareMotor7.IntSpd = 0x44B8;
+hardwareMotor7.FnSlpAcc = 0x14;
+hardwareMotor7.FnSlpDec = 0x14;
+hardwareConfiguration.Motors.Add(hardwareMotor7);
+
+stubManager.WriteLine("data.data length = " + hardwareConfiguration.CalculateSize());
+
+
+uploadHardwareConfigurationRequest.HardwareConfiguration = hardwareConfiguration;
+var response = stubManager.Run<UploadHardwareConfigurationResponse>(uploadHardwareConfigurationRequest);
+ /*Thread.Sleep(5000);
+
+ stubManager.Run("StubGPIOWriteBitRequest" ,"Q", 7, false);//OFF
+ Thread.Sleep(10);
+ stubManager.Run("StubGPIOWriteBitRequest" ,"Q", 4, true);//ON
+ Thread.Sleep(10);
+ stubManager.Run("StubGPIOWriteBitRequest" ,"Q", 4, false);//OFF
+ Thread.Sleep(10);
+ stubManager.Run("StubGPIOWriteBitRequest" ,"Q", 4, true);//ON
+
+*/
+
+
+}
+
diff --git a/Software/Stubs Collection/stubs/SystemTestAdvanced1.cs b/Software/Stubs Collection/stubs/SystemTestAdvanced1.cs
new file mode 100644
index 000000000..adf20472e
--- /dev/null
+++ b/Software/Stubs Collection/stubs/SystemTestAdvanced1.cs
@@ -0,0 +1,559 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Hardware;
+using Tango.PMR.Printing;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+public void OnExecute(StubManager stubManager)
+{
+//SystemResetRequest systemResetRequest = new SystemResetRequest();
+//var response1 = stubManager.Run<SystemResetResponse>(systemResetRequest);
+// stubManager.Run("StubGPIOWriteBitRequest" ,"P", 4, true);//ON
+ Thread.Sleep(10);
+// stubManager.Run("StubGPIOWriteBitRequest" ,"P", 4, false);//OFF
+ Thread.Sleep(10);
+// stubManager.Run("StubGPIOWriteBitRequest" ,"P", 4, true);//ON
+/*UploadProcessParametersRequest uploadProcessParametersRequest = new UploadProcessParametersRequest();
+
+ProcessParameters processParameters = new ProcessParameters();
+processParameters.DyeingSpeed = 10;
+processParameters.MixerTemp = 0;
+processParameters.DryerBufferLength = 0;
+processParameters.MinInkUptake = 0;
+processParameters.HeadZone1Temp = 0;
+processParameters.DryerZone1Temp = 100;
+processParameters.FeederTension = 0;
+processParameters.DryerZone2Temp = 100;
+processParameters.HeadZone2Temp = 0;
+processParameters.PullerTension = 0;
+processParameters.HeadZone3Temp = 0;
+processParameters.DryerZone3Temp = 0;
+processParameters.WinderTension = 0;
+processParameters.HeadAirFlow = 0;
+processParameters.DryerAirFlow = 0;
+processParameters.TableIndex = 0;
+
+uploadProcessParametersRequest.ProcessParameters = processParameters;
+var response1 = stubManager.Run<UploadProcessParametersResponse>(uploadProcessParametersRequest);
+*/
+
+UploadHardwareConfigurationRequest uploadHardwareConfigurationRequest = new UploadHardwareConfigurationRequest();
+
+HardwareConfiguration hardwareConfiguration = new HardwareConfiguration();
+
+
+HardwarePidControl hardwarePidControl1 = new HardwarePidControl();
+hardwarePidControl1.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.MotorFeeder;
+hardwarePidControl1.OutputProportionalPowerLimit = 80;
+hardwarePidControl1.OutputProportionalBand = 5;
+hardwarePidControl1.IntegralTime = 5;
+hardwarePidControl1.DerivativeTime = 0;
+hardwarePidControl1.SensorCorrectionAdjustment = 0;
+hardwarePidControl1.SensorMinValue = 0;
+hardwarePidControl1.SensorMaxValue = 0;
+hardwarePidControl1.SetPointRampRateorSoftStartRamp = 0;
+hardwarePidControl1.SetPointControlOutputRate = 4;
+hardwarePidControl1.ControlOutputType = 0;
+hardwarePidControl1.SsrControlOutputType = 0;
+hardwarePidControl1.OutputOnOffHysteresisValue = 0;
+hardwarePidControl1.ProcessVariableSamplingRate = 1000;
+hardwarePidControl1.PvInputFilterFactorMode = 4;
+hardwarePidControl1.OutputProportionalCycleTime = 0;
+hardwarePidControl1.AcHeatersHalfCycleTime = 0;
+hardwarePidControl1.ProportionalGain = 11.0;
+hardwareConfiguration.PidControls.Add(hardwarePidControl1);
+
+
+HardwarePidControl hardwarePidControl2 = new HardwarePidControl();
+hardwarePidControl2.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.MotorPooler;
+hardwarePidControl2.OutputProportionalPowerLimit = 80;
+hardwarePidControl2.OutputProportionalBand = 5;
+hardwarePidControl2.IntegralTime = 5;
+hardwarePidControl2.DerivativeTime = 0;
+hardwarePidControl2.SensorCorrectionAdjustment = 0;
+hardwarePidControl2.SensorMinValue = 0;
+hardwarePidControl2.SensorMaxValue = 0;
+hardwarePidControl2.SetPointRampRateorSoftStartRamp = 0;
+hardwarePidControl2.SetPointControlOutputRate = 4;
+hardwarePidControl2.ControlOutputType = 0;
+hardwarePidControl2.SsrControlOutputType = 0;
+hardwarePidControl2.OutputOnOffHysteresisValue = 0;
+hardwarePidControl2.ProcessVariableSamplingRate = 1000;
+hardwarePidControl2.PvInputFilterFactorMode = 4;
+hardwarePidControl2.OutputProportionalCycleTime = 0;
+hardwarePidControl2.AcHeatersHalfCycleTime = 0;
+hardwarePidControl2.ProportionalGain = 11.0;
+hardwareConfiguration.PidControls.Add(hardwarePidControl2);
+
+
+HardwarePidControl hardwarePidControl3 = new HardwarePidControl();
+hardwarePidControl3.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.MotorWinder;
+hardwarePidControl3.OutputProportionalPowerLimit = 80;
+hardwarePidControl3.OutputProportionalBand = 5;
+hardwarePidControl3.IntegralTime = 5;
+hardwarePidControl3.DerivativeTime = 0;
+hardwarePidControl3.SensorCorrectionAdjustment = 0;
+hardwarePidControl3.SensorMinValue = 0;
+hardwarePidControl3.SensorMaxValue = 0;
+hardwarePidControl3.SetPointRampRateorSoftStartRamp = 0;
+hardwarePidControl3.SetPointControlOutputRate = 4;
+hardwarePidControl3.ControlOutputType = 0;
+hardwarePidControl3.SsrControlOutputType = 0;
+hardwarePidControl3.OutputOnOffHysteresisValue = 0;
+hardwarePidControl3.ProcessVariableSamplingRate = 1000;
+hardwarePidControl3.PvInputFilterFactorMode = 4;
+hardwarePidControl3.OutputProportionalCycleTime = 0;
+hardwarePidControl3.AcHeatersHalfCycleTime = 0;
+hardwarePidControl3.ProportionalGain = 11.0;
+hardwareConfiguration.PidControls.Add(hardwarePidControl3);
+ HardwarePidControl Pid1 = new HardwarePidControl();
+ HardwarePidControl Pid2 = new HardwarePidControl();
+//Pid1.has_hardwarepidcontroltype = true;
+/*Pid1.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.DryerHeater1000W;
+ // Pid1.has_outputproportionalpowerlimit = true;
+ Pid1.OutputProportionalPowerLimit = 50;
+ // Pid1.has_outputproportionalband = true;
+ Pid1.OutputProportionalBand = 3;
+ // Pid1.has_kp = true;
+ Pid1.SensorCorrectionAdjustment = 2.0;
+ //Pid1.has_ki = true;
+ Pid1.IntegralTime = 0.01;
+Pid1.OutputProportionalPowerLimit = 80;
+Pid1.OutputProportionalBand = 5;
+Pid1.IntegralTime = 5;
+Pid1.DerivativeTime = 0;
+Pid1.SensorCorrectionAdjustment = 0;
+Pid1.SensorMinValue = 0;
+Pid1.SensorMaxValue = 0;
+Pid1.SetPointRampRateorSoftStartRamp = 0;
+Pid1.SetPointControlOutputRate = 4;
+Pid1.ControlOutputType = 0;
+Pid1.SsrControlOutputType = 0;
+Pid1.OutputOnOffHysteresisValue = 0;
+Pid1.ProcessVariableSamplingRate = 1000;
+Pid1.PvInputFilterFactorMode = 4;
+Pid1.OutputProportionalCycleTime = 0;
+Pid1.AcHeatersHalfCycleTime = 0;
+Pid1.ProportionalGain = 500.0;
+//hardwareConfiguration.PidControls.Add(Pid1);
+
+ //Pid2.has_hardwarepidcontroltype = true;
+Pid2.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.DryerHeater200W1;
+ // Pid2.has_outputproportionalpowerlimit = true;
+ Pid2.OutputProportionalPowerLimit = 40;
+ // Pid2.has_outputproportionalband = true;
+ Pid2.OutputProportionalBand = 3;
+ // Pid2.has_kp = true;
+ Pid2.SensorCorrectionAdjustment = 0.5;
+ //Pid2.has_ki = true;
+ Pid2.IntegralTime = 0.1;
+Pid2.OutputProportionalPowerLimit = 80;
+Pid2.OutputProportionalBand = 5;
+Pid2.IntegralTime = 5;
+Pid2.DerivativeTime = 0;
+Pid2.SensorCorrectionAdjustment = 0;
+Pid2.SensorMinValue = 0;
+Pid2.SensorMaxValue = 0;
+Pid2.SetPointRampRateorSoftStartRamp = 0;
+Pid2.SetPointControlOutputRate = 4;
+Pid2.ControlOutputType = 0;
+Pid2.SsrControlOutputType = 0;
+Pid2.OutputOnOffHysteresisValue = 0;
+Pid2.ProcessVariableSamplingRate = 1000;
+Pid2.PvInputFilterFactorMode = 4;
+Pid2.OutputProportionalCycleTime = 0;
+Pid2.AcHeatersHalfCycleTime = 0;
+Pid2.ProportionalGain = 500.0;
+//hardwareConfiguration.PidControls.Add(Pid2);
+*/
+/*
+ HardwarePidControl Pid3 = new HardwarePidControl();
+ HardwarePidControl Pid4 = new HardwarePidControl();
+//Pid3.has_hardwarepidcontroltype = true;
+Pid3.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.HeadHeaterZ1;
+ // Pid1.has_outputproportionalpowerlimit = true;
+ Pid3.OutputProportionalPowerLimit = 50;
+ // Pid1.has_outputproportionalband = true;
+ Pid3.OutputProportionalBand = 3;
+ // Pid1.has_kp = true;
+ Pid3.SensorCorrectionAdjustment = 2.0;
+ //Pid1.has_ki = true;
+ Pid3.IntegralTime = 0.01;
+Pid3.OutputProportionalPowerLimit = 80;
+Pid3.OutputProportionalBand = 5;
+Pid3.IntegralTime = 5;
+Pid3.DerivativeTime = 0;
+Pid3.SensorCorrectionAdjustment = 0;
+Pid3.SensorMinValue = 0;
+Pid3.SensorMaxValue = 0;
+Pid3.SetPointRampRateorSoftStartRamp = 0;
+Pid3.SetPointControlOutputRate = 4;
+Pid3.ControlOutputType = 0;
+Pid3.SsrControlOutputType = 0;
+Pid3.OutputOnOffHysteresisValue = 0;
+Pid3.ProcessVariableSamplingRate = 1000;
+Pid3.PvInputFilterFactorMode = 4;
+Pid3.OutputProportionalCycleTime = 0;
+Pid3.AcHeatersHalfCycleTime = 0;
+Pid3.ProportionalGain = 500.0;
+hardwareConfiguration.PidControls.Add(Pid3);
+
+ //Pid2.has_hardwarepidcontroltype = true;
+
+Pid4.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.HeadHeaterZ2;
+ // Pid2.has_outputproportionalpowerlimit = true;
+ Pid4.OutputProportionalPowerLimit = 40;
+ // Pid2.has_outputproportionalband = true;
+ Pid4.OutputProportionalBand = 3;
+ // Pid2.has_kp = true;
+ Pid4.SensorCorrectionAdjustment = 0.5;
+ //Pid2.has_ki = true;
+ Pid4.IntegralTime = 0.1;
+
+Pid4.OutputProportionalPowerLimit = 80;
+Pid4.OutputProportionalBand = 5;
+Pid4.IntegralTime = 5;
+Pid4.DerivativeTime = 0;
+Pid4.SensorCorrectionAdjustment = 0;
+Pid4.SensorMinValue = 0;
+Pid4.SensorMaxValue = 0;
+Pid4.SetPointRampRateorSoftStartRamp = 0;
+Pid4.SetPointControlOutputRate = 4;
+Pid4.ControlOutputType = 0;
+Pid4.SsrControlOutputType = 0;
+Pid4.OutputOnOffHysteresisValue = 0;
+Pid4.ProcessVariableSamplingRate = 1000;
+Pid4.PvInputFilterFactorMode = 4;
+Pid4.OutputProportionalCycleTime = 0;
+Pid4.AcHeatersHalfCycleTime = 0;
+Pid4.ProportionalGain = 500.0;
+hardwareConfiguration.PidControls.Add(Pid4);
+
+HardwarePidControl Pid5 = new HardwarePidControl();
+ HardwarePidControl Pid6 = new HardwarePidControl();
+//Pid1.has_hardwarepidcontroltype = true;
+Pid5.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.HeadHeaterZ3;
+ // Pid1.has_outputproportionalpowerlimit = true;
+ Pid5.OutputProportionalPowerLimit = 50;
+ // Pid1.has_outputproportionalband = true;
+ Pid5.OutputProportionalBand = 3;
+ // Pid1.has_kp = true;
+ Pid5.SensorCorrectionAdjustment = 2.0;
+ //Pid1.has_ki = true;
+ Pid5.IntegralTime = 0.01;
+Pid5.OutputProportionalPowerLimit = 80;
+Pid5.OutputProportionalBand = 5;
+Pid5.IntegralTime = 5;
+Pid5.DerivativeTime = 0;
+Pid5.SensorCorrectionAdjustment = 0;
+Pid5.SensorMinValue = 0;
+Pid5.SensorMaxValue = 0;
+Pid5.SetPointRampRateorSoftStartRamp = 0;
+Pid5.SetPointControlOutputRate = 4;
+Pid5.ControlOutputType = 0;
+Pid5.SsrControlOutputType = 0;
+Pid5.OutputOnOffHysteresisValue = 0;
+Pid5.ProcessVariableSamplingRate = 1000;
+Pid5.PvInputFilterFactorMode = 4;
+Pid5.OutputProportionalCycleTime = 0;
+Pid5.AcHeatersHalfCycleTime = 0;
+Pid5.ProportionalGain = 500.0;
+hardwareConfiguration.PidControls.Add(Pid5);
+
+ //Pid2.has_hardwarepidcontroltype = true;
+Pid6.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.HeadHeaterZ4;
+ // Pid2.has_outputproportionalpowerlimit = true;
+ Pid6.OutputProportionalPowerLimit = 40;
+ // Pid2.has_outputproportionalband = true;
+ Pid6.OutputProportionalBand = 3;
+ // Pid2.has_kp = true;
+ Pid6.SensorCorrectionAdjustment = 0.5;
+ //Pid2.has_ki = true;
+ Pid6.IntegralTime = 0.1;
+Pid6.OutputProportionalPowerLimit = 80;
+Pid6.OutputProportionalBand = 5;
+Pid6.IntegralTime = 5;
+Pid6.DerivativeTime = 0;
+Pid6.SensorCorrectionAdjustment = 0;
+Pid6.SensorMinValue = 0;
+Pid6.SensorMaxValue = 0;
+Pid6.SetPointRampRateorSoftStartRamp = 0;
+Pid6.SetPointControlOutputRate = 4;
+Pid6.ControlOutputType = 0;
+Pid6.SsrControlOutputType = 0;
+Pid6.OutputOnOffHysteresisValue = 0;
+Pid6.ProcessVariableSamplingRate = 1000;
+Pid6.PvInputFilterFactorMode = 4;
+Pid6.OutputProportionalCycleTime = 0;
+Pid6.AcHeatersHalfCycleTime = 0;
+Pid6.ProportionalGain = 500.0;
+hardwareConfiguration.PidControls.Add(Pid6);
+/*
+HardwarePidControl Pid7 = new HardwarePidControl();
+//Pid1.has_hardwarepidcontroltype = true;
+Pid7.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.MixerHeater;
+ // Pid1.has_outputproportionalpowerlimit = true;
+ Pid7.OutputProportionalPowerLimit = 50;
+ // Pid1.has_outputproportionalband = true;
+ Pid7.OutputProportionalBand = 3;
+ // Pid1.has_kp = true;
+ Pid7.SensorCorrectionAdjustment = 2.0;
+ //Pid1.has_ki = true;
+ Pid7.IntegralTime = 0.01;
+//hardwareConfiguration.PidControls.Add(Pid7);
+*/
+
+HardwareDancer hardwareDancer1 = new HardwareDancer();
+hardwareDancer1.HardwareDancerType = Tango.PMR.Hardware.HardwareDancerType.RightDancer;
+hardwareDancer1.Gradual = false;
+hardwareDancer1.K = 0;
+hardwareDancer1.X = 0;
+hardwareDancer1.PulsePerMmSpring = 0;
+hardwareDancer1.MaximalMovementMm = 15;
+hardwareDancer1.ZeroPoint = 13626;
+hardwareDancer1.ResolutionBits = 14;
+hardwareDancer1.ArmLength = 126;
+hardwareConfiguration.Dancers.Add(hardwareDancer1);
+
+ HardwareDancer hardwareDancer2 = new HardwareDancer();
+ hardwareDancer2.HardwareDancerType = Tango.PMR.Hardware.HardwareDancerType.MiddleDancer;
+ hardwareDancer2.Gradual = false;
+ hardwareDancer2.K = 0;
+ hardwareDancer2.X = 0;
+ hardwareDancer2.PulsePerMmSpring = 0;
+ hardwareDancer2.MaximalMovementMm = 15;
+ hardwareDancer2.ZeroPoint = 13200;
+ hardwareDancer2.ResolutionBits = 14;
+ hardwareDancer2.ArmLength = 126;
+hardwareConfiguration.Dancers.Add(hardwareDancer2);
+
+ HardwareDancer hardwareDancer3 = new HardwareDancer();
+ hardwareDancer3.HardwareDancerType = Tango.PMR.Hardware.HardwareDancerType.LeftDancer;
+ hardwareDancer3.Gradual = false;
+ hardwareDancer3.K = 0;
+ hardwareDancer3.X = 0;
+ hardwareDancer3.PulsePerMmSpring = 0;
+ hardwareDancer3.MaximalMovementMm = 15;
+ hardwareDancer3.ZeroPoint = 11097;
+ hardwareDancer3.ResolutionBits = 14;
+ hardwareDancer3.ArmLength = 126;
+hardwareConfiguration.Dancers.Add(hardwareDancer3);
+
+HardwareMotor hardwareMotor1 = new HardwareMotor();
+hardwareMotor1.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoRdriving;
+hardwareMotor1.MinFrequency = 0;
+hardwareMotor1.MaxFrequency = 1000000;
+hardwareMotor1.SetMicroStep = 1;
+hardwareMotor1.MicroStep = 1;
+hardwareMotor1.MaxChangeSlope = 10000;
+hardwareMotor1.HighLengthMicroSecond = 0;
+hardwareMotor1.SpeedMaster = false;
+hardwareMotor1.PulsePerRound = 200;
+hardwareMotor1.PulleyRadius = 1.25;
+hardwareMotor1.ConfigWord = 0x1C80;
+hardwareMotor1.DirectionThreadWize = true;
+hardwareMotor1.KvalHold = 0x35;
+hardwareMotor1.KvalRun = 0x7f;
+hardwareMotor1.KvalAcc = 0x7f;
+hardwareMotor1.KvalDec = 0x7f;
+hardwareMotor1.OverCurrentThreshold = 7;
+hardwareMotor1.StallThreshold = 0x1F;
+hardwareMotor1.ThermalCompensationFactor = 0;
+hardwareMotor1.LowSpeedOptimization = false;
+hardwareMotor1.StSlp = 0x20;
+hardwareMotor1.IntSpd = 0x1A13;
+hardwareMotor1.FnSlpAcc = 0x50;
+hardwareMotor1.FnSlpDec = 0x50;
+hardwareConfiguration.Motors.Add(hardwareMotor1);
+
+HardwareMotor hardwareMotor2 = new HardwareMotor();
+hardwareMotor2.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoWinder;
+hardwareMotor2.MinFrequency = 0;
+hardwareMotor2.MaxFrequency = 1000000;
+hardwareMotor2.SetMicroStep = 1;
+hardwareMotor2.MicroStep = 16;
+hardwareMotor2.MaxChangeSlope = 10000;
+hardwareMotor2.HighLengthMicroSecond = 0;
+hardwareMotor2.SpeedMaster = false;
+hardwareMotor2.PulsePerRound = 200;
+hardwareMotor2.PulleyRadius = 1.68;
+hardwareMotor2.ConfigWord = 0x1c80;
+hardwareMotor2.DirectionThreadWize = false;
+hardwareMotor2.KvalHold = 0x35;
+hardwareMotor2.KvalRun = 0x7f;
+hardwareMotor2.KvalAcc = 0x7f;
+hardwareMotor2.KvalDec = 0x7f;
+hardwareMotor2.OverCurrentThreshold = 7;
+hardwareMotor2.StallThreshold = 0x1F;
+hardwareMotor2.ThermalCompensationFactor = 0;
+hardwareMotor2.LowSpeedOptimization = false;
+hardwareMotor2.StSlp = 0x20;
+hardwareMotor2.IntSpd = 0x1A13;
+hardwareMotor2.FnSlpAcc = 0x50;
+hardwareMotor2.FnSlpDec = 0x50;
+hardwareConfiguration.Motors.Add(hardwareMotor2);
+
+HardwareMotor hardwareMotor3 = new HardwareMotor();
+hardwareMotor3.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoDryerDriving;
+hardwareMotor3.MinFrequency = 0;
+hardwareMotor3.MaxFrequency = 1000000;
+hardwareMotor3.SetMicroStep = 1;
+hardwareMotor3.MicroStep = 1;
+hardwareMotor3.MaxChangeSlope = 1000;
+hardwareMotor3.HighLengthMicroSecond = 0;
+hardwareMotor3.SpeedMaster = true;
+hardwareMotor3.PulsePerRound = 200;
+hardwareMotor3.PulleyRadius = 1.05;
+hardwareMotor3.ConfigWord = 0x1c80;
+hardwareMotor3.DirectionThreadWize = true;
+hardwareMotor3.KvalHold = 0x35;
+hardwareMotor3.KvalRun = 0x7f;
+hardwareMotor3.KvalAcc = 0x7f;
+hardwareMotor3.KvalDec = 0x7f;
+hardwareMotor3.OverCurrentThreshold = 7;
+hardwareMotor3.StallThreshold = 0x1F;
+hardwareMotor3.ThermalCompensationFactor = 0;
+hardwareMotor3.LowSpeedOptimization = false;
+hardwareMotor3.StSlp = 0x20;
+hardwareMotor3.IntSpd = 0x1A13;
+hardwareMotor3.FnSlpAcc = 0x50;
+hardwareMotor3.FnSlpDec = 0x50;
+hardwareConfiguration.Motors.Add(hardwareMotor3);
+
+HardwareMotor hardwareMotor4 = new HardwareMotor();
+hardwareMotor4.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoLdriving;
+hardwareMotor4.MinFrequency = 0;
+hardwareMotor4.MaxFrequency = 1000000;
+hardwareMotor4.SetMicroStep = 1;
+hardwareMotor4.MicroStep = 8;
+hardwareMotor4.MaxChangeSlope = 10000;
+hardwareMotor4.HighLengthMicroSecond = 0;
+hardwareMotor4.SpeedMaster = false;
+hardwareMotor4.PulsePerRound = 200;
+hardwareMotor4.PulleyRadius = 1.25;
+hardwareMotor4.ConfigWord = 0x1C80;
+hardwareMotor4.DirectionThreadWize = true;
+hardwareMotor4.KvalHold = 0x35;
+hardwareMotor4.KvalRun = 0x7f;
+hardwareMotor4.KvalAcc = 0x7f;
+hardwareMotor4.KvalDec = 0x7f;
+hardwareMotor4.OverCurrentThreshold = 7;
+hardwareMotor4.StallThreshold = 0x1F;
+hardwareMotor4.ThermalCompensationFactor = 0;
+hardwareMotor4.LowSpeedOptimization = false;
+hardwareMotor4.StSlp = 20;
+hardwareMotor4.IntSpd = 0x1A13;
+hardwareMotor4.FnSlpAcc = 0x50;
+hardwareMotor4.FnSlpDec = 0x50;
+hardwareConfiguration.Motors.Add(hardwareMotor4);
+
+
+HardwareMotor hardwareMotor5 = new HardwareMotor();
+hardwareMotor5.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoScrew;
+hardwareMotor5.MinFrequency = 0;
+hardwareMotor5.MaxFrequency = 1000000;
+hardwareMotor5.SetMicroStep = 1;
+hardwareMotor5.MicroStep = 8;
+hardwareMotor5.MaxChangeSlope = 10000;
+hardwareMotor5.HighLengthMicroSecond = 0;
+hardwareMotor5.SpeedMaster = false;
+hardwareMotor5.PulsePerRound = 200;
+hardwareMotor5.PulleyRadius = 1.3;
+hardwareMotor5.ConfigWord = 0x1C80;
+hardwareMotor5.DirectionThreadWize = true;
+hardwareMotor5.KvalHold = 0x35;
+hardwareMotor5.KvalRun = 0x7f;
+hardwareMotor5.KvalAcc = 0x7f;
+hardwareMotor5.KvalDec = 0x7f;
+hardwareMotor5.OverCurrentThreshold = 7;
+hardwareMotor5.StallThreshold = 0x1F;
+hardwareMotor5.ThermalCompensationFactor = 0;
+hardwareMotor5.LowSpeedOptimization = false;
+hardwareMotor5.StSlp = 0x20;
+hardwareMotor5.IntSpd = 0x1A13;
+hardwareMotor5.FnSlpAcc = 0x50;
+hardwareMotor5.FnSlpDec = 0x50;
+hardwareConfiguration.Motors.Add(hardwareMotor5);
+
+HardwareMotor hardwareMotor6 = new HardwareMotor();
+hardwareMotor6.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoLloading;
+hardwareMotor6.MinFrequency = 0;
+hardwareMotor6.MaxFrequency = 1000000;
+hardwareMotor6.SetMicroStep = 1;
+hardwareMotor6.MicroStep = 4;
+hardwareMotor6.MaxChangeSlope = 10000;
+hardwareMotor6.HighLengthMicroSecond = 0;
+hardwareMotor6.SpeedMaster = false;
+hardwareMotor6.PulsePerRound = 200;
+hardwareMotor6.PulleyRadius = 1.3;
+hardwareMotor6.ConfigWord = 0xC80;
+hardwareMotor6.DirectionThreadWize = true;
+hardwareMotor6.KvalHold = 0x28;
+hardwareMotor6.KvalRun = 0x5f;
+hardwareMotor6.KvalAcc = 0x5f;
+hardwareMotor6.KvalDec = 0x5f;
+hardwareMotor6.OverCurrentThreshold = 7;
+hardwareMotor6.StallThreshold = 0x1F;
+hardwareMotor6.ThermalCompensationFactor = 0;
+hardwareMotor6.LowSpeedOptimization = false;
+hardwareMotor6.StSlp = 6;
+hardwareMotor6.IntSpd = 0x44B8;
+hardwareMotor6.FnSlpAcc = 0x14;
+hardwareMotor6.FnSlpDec = 0x14;
+hardwareConfiguration.Motors.Add(hardwareMotor6);
+
+HardwareMotor hardwareMotor7 = new HardwareMotor();
+hardwareMotor7.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoRloading;
+hardwareMotor7.MinFrequency = 0;
+hardwareMotor7.MaxFrequency = 1000000;
+hardwareMotor7.SetMicroStep = 1;
+hardwareMotor7.MicroStep = 4;
+hardwareMotor7.MaxChangeSlope = 10000;
+hardwareMotor7.HighLengthMicroSecond = 0;
+hardwareMotor7.SpeedMaster = false;
+hardwareMotor7.PulsePerRound = 200;
+hardwareMotor7.PulleyRadius = 1.3;
+hardwareMotor7.ConfigWord = 0xC80;
+hardwareMotor7.DirectionThreadWize = false;
+hardwareMotor7.KvalHold = 0x28;
+hardwareMotor7.KvalRun = 0x5f;
+hardwareMotor7.KvalAcc = 0x5f;
+hardwareMotor7.KvalDec = 0x5f;
+hardwareMotor7.OverCurrentThreshold = 7;
+hardwareMotor7.StallThreshold = 0x1F;
+hardwareMotor7.ThermalCompensationFactor = 0;
+hardwareMotor7.LowSpeedOptimization = false;
+hardwareMotor7.StSlp = 6;
+hardwareMotor7.IntSpd = 0x44B8;
+hardwareMotor7.FnSlpAcc = 0x14;
+hardwareMotor7.FnSlpDec = 0x14;
+hardwareConfiguration.Motors.Add(hardwareMotor7);
+
+stubManager.WriteLine("data.data length = " + hardwareConfiguration.CalculateSize());
+
+
+uploadHardwareConfigurationRequest.HardwareConfiguration = hardwareConfiguration;
+var response = stubManager.Run<UploadHardwareConfigurationResponse>(uploadHardwareConfigurationRequest);
+ /*Thread.Sleep(5000);
+
+ stubManager.Run("StubGPIOWriteBitRequest" ,"Q", 7, false);//OFF
+ Thread.Sleep(10);
+ stubManager.Run("StubGPIOWriteBitRequest" ,"Q", 4, true);//ON
+ Thread.Sleep(10);
+ stubManager.Run("StubGPIOWriteBitRequest" ,"Q", 4, false);//OFF
+ Thread.Sleep(10);
+ stubManager.Run("StubGPIOWriteBitRequest" ,"Q", 4, true);//ON
+
+*/
+
+
+}
+
diff --git a/Software/Stubs Collection/stubs/SystemTestWithHeaters.cs b/Software/Stubs Collection/stubs/SystemTestWithHeaters.cs
new file mode 100644
index 000000000..b53a72801
--- /dev/null
+++ b/Software/Stubs Collection/stubs/SystemTestWithHeaters.cs
@@ -0,0 +1,559 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Hardware;
+using Tango.PMR.Printing;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+public void OnExecute(StubManager stubManager)
+{
+//SystemResetRequest systemResetRequest = new SystemResetRequest();
+//var response1 = stubManager.Run<SystemResetResponse>(systemResetRequest);
+// stubManager.Run("StubGPIOWriteBitRequest" ,"P", 4, true);//ON
+ Thread.Sleep(10);
+// stubManager.Run("StubGPIOWriteBitRequest" ,"P", 4, false);//OFF
+ Thread.Sleep(10);
+// stubManager.Run("StubGPIOWriteBitRequest" ,"P", 4, true);//ON
+/*UploadProcessParametersRequest uploadProcessParametersRequest = new UploadProcessParametersRequest();
+
+ProcessParameters processParameters = new ProcessParameters();
+processParameters.DyeingSpeed = 10;
+processParameters.MixerTemp = 0;
+processParameters.DryerBufferLength = 0;
+processParameters.MinInkUptake = 0;
+processParameters.HeadZone1Temp = 0;
+processParameters.DryerZone1Temp = 100;
+processParameters.FeederTension = 0;
+processParameters.DryerZone2Temp = 100;
+processParameters.HeadZone2Temp = 0;
+processParameters.PullerTension = 0;
+processParameters.HeadZone3Temp = 0;
+processParameters.DryerZone3Temp = 0;
+processParameters.WinderTension = 0;
+processParameters.HeadAirFlow = 0;
+processParameters.DryerAirFlow = 0;
+processParameters.TableIndex = 0;
+
+uploadProcessParametersRequest.ProcessParameters = processParameters;
+var response1 = stubManager.Run<UploadProcessParametersResponse>(uploadProcessParametersRequest);
+*/
+
+UploadHardwareConfigurationRequest uploadHardwareConfigurationRequest = new UploadHardwareConfigurationRequest();
+
+HardwareConfiguration hardwareConfiguration = new HardwareConfiguration();
+
+
+HardwarePidControl hardwarePidControl1 = new HardwarePidControl();
+hardwarePidControl1.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.MotorFeeder;
+hardwarePidControl1.OutputProportionalPowerLimit = 80;
+hardwarePidControl1.OutputProportionalBand = 5;
+hardwarePidControl1.IntegralTime = 5;
+hardwarePidControl1.DerivativeTime = 0;
+hardwarePidControl1.SensorCorrectionAdjustment = 0;
+hardwarePidControl1.SensorMinValue = 0;
+hardwarePidControl1.SensorMaxValue = 0;
+hardwarePidControl1.SetPointRampRateorSoftStartRamp = 0;
+hardwarePidControl1.SetPointControlOutputRate = 4;
+hardwarePidControl1.ControlOutputType = 0;
+hardwarePidControl1.SsrControlOutputType = 0;
+hardwarePidControl1.OutputOnOffHysteresisValue = 0;
+hardwarePidControl1.ProcessVariableSamplingRate = 1000;
+hardwarePidControl1.PvInputFilterFactorMode = 4;
+hardwarePidControl1.OutputProportionalCycleTime = 0;
+hardwarePidControl1.AcHeatersHalfCycleTime = 0;
+hardwarePidControl1.ProportionalGain = 11.0;
+hardwareConfiguration.PidControls.Add(hardwarePidControl1);
+
+
+HardwarePidControl hardwarePidControl2 = new HardwarePidControl();
+hardwarePidControl2.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.MotorPooler;
+hardwarePidControl2.OutputProportionalPowerLimit = 80;
+hardwarePidControl2.OutputProportionalBand = 5;
+hardwarePidControl2.IntegralTime = 5;
+hardwarePidControl2.DerivativeTime = 0;
+hardwarePidControl2.SensorCorrectionAdjustment = 0;
+hardwarePidControl2.SensorMinValue = 0;
+hardwarePidControl2.SensorMaxValue = 0;
+hardwarePidControl2.SetPointRampRateorSoftStartRamp = 0;
+hardwarePidControl2.SetPointControlOutputRate = 4;
+hardwarePidControl2.ControlOutputType = 0;
+hardwarePidControl2.SsrControlOutputType = 0;
+hardwarePidControl2.OutputOnOffHysteresisValue = 0;
+hardwarePidControl2.ProcessVariableSamplingRate = 1000;
+hardwarePidControl2.PvInputFilterFactorMode = 4;
+hardwarePidControl2.OutputProportionalCycleTime = 0;
+hardwarePidControl2.AcHeatersHalfCycleTime = 0;
+hardwarePidControl2.ProportionalGain = 11.0;
+hardwareConfiguration.PidControls.Add(hardwarePidControl2);
+
+
+HardwarePidControl hardwarePidControl3 = new HardwarePidControl();
+hardwarePidControl3.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.MotorWinder;
+hardwarePidControl3.OutputProportionalPowerLimit = 80;
+hardwarePidControl3.OutputProportionalBand = 5;
+hardwarePidControl3.IntegralTime = 5;
+hardwarePidControl3.DerivativeTime = 0;
+hardwarePidControl3.SensorCorrectionAdjustment = 0;
+hardwarePidControl3.SensorMinValue = 0;
+hardwarePidControl3.SensorMaxValue = 0;
+hardwarePidControl3.SetPointRampRateorSoftStartRamp = 0;
+hardwarePidControl3.SetPointControlOutputRate = 4;
+hardwarePidControl3.ControlOutputType = 0;
+hardwarePidControl3.SsrControlOutputType = 0;
+hardwarePidControl3.OutputOnOffHysteresisValue = 0;
+hardwarePidControl3.ProcessVariableSamplingRate = 1000;
+hardwarePidControl3.PvInputFilterFactorMode = 4;
+hardwarePidControl3.OutputProportionalCycleTime = 0;
+hardwarePidControl3.AcHeatersHalfCycleTime = 0;
+hardwarePidControl3.ProportionalGain = 11.0;
+hardwareConfiguration.PidControls.Add(hardwarePidControl3);
+ HardwarePidControl Pid1 = new HardwarePidControl();
+ HardwarePidControl Pid2 = new HardwarePidControl();
+//Pid1.has_hardwarepidcontroltype = true;
+/*Pid1.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.DryerHeater1000W;
+ // Pid1.has_outputproportionalpowerlimit = true;
+ Pid1.OutputProportionalPowerLimit = 50;
+ // Pid1.has_outputproportionalband = true;
+ Pid1.OutputProportionalBand = 3;
+ // Pid1.has_kp = true;
+ Pid1.SensorCorrectionAdjustment = 2.0;
+ //Pid1.has_ki = true;
+ Pid1.IntegralTime = 0.01;
+Pid1.OutputProportionalPowerLimit = 80;
+Pid1.OutputProportionalBand = 5;
+Pid1.IntegralTime = 5;
+Pid1.DerivativeTime = 0;
+Pid1.SensorCorrectionAdjustment = 0;
+Pid1.SensorMinValue = 0;
+Pid1.SensorMaxValue = 0;
+Pid1.SetPointRampRateorSoftStartRamp = 0;
+Pid1.SetPointControlOutputRate = 4;
+Pid1.ControlOutputType = 0;
+Pid1.SsrControlOutputType = 0;
+Pid1.OutputOnOffHysteresisValue = 0;
+Pid1.ProcessVariableSamplingRate = 1000;
+Pid1.PvInputFilterFactorMode = 4;
+Pid1.OutputProportionalCycleTime = 0;
+Pid1.AcHeatersHalfCycleTime = 0;
+Pid1.ProportionalGain = 500.0;
+//hardwareConfiguration.PidControls.Add(Pid1);
+
+ //Pid2.has_hardwarepidcontroltype = true;
+Pid2.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.DryerHeater200W1;
+ // Pid2.has_outputproportionalpowerlimit = true;
+ Pid2.OutputProportionalPowerLimit = 40;
+ // Pid2.has_outputproportionalband = true;
+ Pid2.OutputProportionalBand = 3;
+ // Pid2.has_kp = true;
+ Pid2.SensorCorrectionAdjustment = 0.5;
+ //Pid2.has_ki = true;
+ Pid2.IntegralTime = 0.1;
+Pid2.OutputProportionalPowerLimit = 80;
+Pid2.OutputProportionalBand = 5;
+Pid2.IntegralTime = 5;
+Pid2.DerivativeTime = 0;
+Pid2.SensorCorrectionAdjustment = 0;
+Pid2.SensorMinValue = 0;
+Pid2.SensorMaxValue = 0;
+Pid2.SetPointRampRateorSoftStartRamp = 0;
+Pid2.SetPointControlOutputRate = 4;
+Pid2.ControlOutputType = 0;
+Pid2.SsrControlOutputType = 0;
+Pid2.OutputOnOffHysteresisValue = 0;
+Pid2.ProcessVariableSamplingRate = 1000;
+Pid2.PvInputFilterFactorMode = 4;
+Pid2.OutputProportionalCycleTime = 0;
+Pid2.AcHeatersHalfCycleTime = 0;
+Pid2.ProportionalGain = 500.0;
+//hardwareConfiguration.PidControls.Add(Pid2);
+*/
+
+ HardwarePidControl Pid3 = new HardwarePidControl();
+ HardwarePidControl Pid4 = new HardwarePidControl();
+//Pid3.has_hardwarepidcontroltype = true;
+Pid3.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.HeadHeaterZ1;
+ // Pid1.has_outputproportionalpowerlimit = true;
+ Pid3.OutputProportionalPowerLimit = 50;
+ // Pid1.has_outputproportionalband = true;
+ Pid3.OutputProportionalBand = 3;
+ // Pid1.has_kp = true;
+ Pid3.SensorCorrectionAdjustment = 2.0;
+ //Pid1.has_ki = true;
+ Pid3.IntegralTime = 0.01;
+Pid3.OutputProportionalPowerLimit = 80;
+Pid3.OutputProportionalBand = 5;
+Pid3.IntegralTime = 5;
+Pid3.DerivativeTime = 0;
+Pid3.SensorCorrectionAdjustment = 0;
+Pid3.SensorMinValue = 0;
+Pid3.SensorMaxValue = 0;
+Pid3.SetPointRampRateorSoftStartRamp = 0;
+Pid3.SetPointControlOutputRate = 4;
+Pid3.ControlOutputType = 0;
+Pid3.SsrControlOutputType = 0;
+Pid3.OutputOnOffHysteresisValue = 0;
+Pid3.ProcessVariableSamplingRate = 1000;
+Pid3.PvInputFilterFactorMode = 4;
+Pid3.OutputProportionalCycleTime = 0;
+Pid3.AcHeatersHalfCycleTime = 0;
+Pid3.ProportionalGain = 500.0;
+hardwareConfiguration.PidControls.Add(Pid3);
+
+ //Pid2.has_hardwarepidcontroltype = true;
+
+Pid4.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.HeadHeaterZ2;
+ // Pid2.has_outputproportionalpowerlimit = true;
+ Pid4.OutputProportionalPowerLimit = 40;
+ // Pid2.has_outputproportionalband = true;
+ Pid4.OutputProportionalBand = 3;
+ // Pid2.has_kp = true;
+ Pid4.SensorCorrectionAdjustment = 0.5;
+ //Pid2.has_ki = true;
+ Pid4.IntegralTime = 0.1;
+
+Pid4.OutputProportionalPowerLimit = 80;
+Pid4.OutputProportionalBand = 5;
+Pid4.IntegralTime = 5;
+Pid4.DerivativeTime = 0;
+Pid4.SensorCorrectionAdjustment = 0;
+Pid4.SensorMinValue = 0;
+Pid4.SensorMaxValue = 0;
+Pid4.SetPointRampRateorSoftStartRamp = 0;
+Pid4.SetPointControlOutputRate = 4;
+Pid4.ControlOutputType = 0;
+Pid4.SsrControlOutputType = 0;
+Pid4.OutputOnOffHysteresisValue = 0;
+Pid4.ProcessVariableSamplingRate = 1000;
+Pid4.PvInputFilterFactorMode = 4;
+Pid4.OutputProportionalCycleTime = 0;
+Pid4.AcHeatersHalfCycleTime = 0;
+Pid4.ProportionalGain = 500.0;
+hardwareConfiguration.PidControls.Add(Pid4);
+
+HardwarePidControl Pid5 = new HardwarePidControl();
+ HardwarePidControl Pid6 = new HardwarePidControl();
+//Pid1.has_hardwarepidcontroltype = true;
+Pid5.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.HeadHeaterZ3;
+ // Pid1.has_outputproportionalpowerlimit = true;
+ Pid5.OutputProportionalPowerLimit = 50;
+ // Pid1.has_outputproportionalband = true;
+ Pid5.OutputProportionalBand = 3;
+ // Pid1.has_kp = true;
+ Pid5.SensorCorrectionAdjustment = 2.0;
+ //Pid1.has_ki = true;
+ Pid5.IntegralTime = 0.01;
+Pid5.OutputProportionalPowerLimit = 80;
+Pid5.OutputProportionalBand = 5;
+Pid5.IntegralTime = 5;
+Pid5.DerivativeTime = 0;
+Pid5.SensorCorrectionAdjustment = 0;
+Pid5.SensorMinValue = 0;
+Pid5.SensorMaxValue = 0;
+Pid5.SetPointRampRateorSoftStartRamp = 0;
+Pid5.SetPointControlOutputRate = 4;
+Pid5.ControlOutputType = 0;
+Pid5.SsrControlOutputType = 0;
+Pid5.OutputOnOffHysteresisValue = 0;
+Pid5.ProcessVariableSamplingRate = 1000;
+Pid5.PvInputFilterFactorMode = 4;
+Pid5.OutputProportionalCycleTime = 0;
+Pid5.AcHeatersHalfCycleTime = 0;
+Pid5.ProportionalGain = 500.0;
+hardwareConfiguration.PidControls.Add(Pid5);
+
+ //Pid2.has_hardwarepidcontroltype = true;
+Pid6.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.HeadHeaterZ4;
+ // Pid2.has_outputproportionalpowerlimit = true;
+ Pid6.OutputProportionalPowerLimit = 40;
+ // Pid2.has_outputproportionalband = true;
+ Pid6.OutputProportionalBand = 3;
+ // Pid2.has_kp = true;
+ Pid6.SensorCorrectionAdjustment = 0.5;
+ //Pid2.has_ki = true;
+ Pid6.IntegralTime = 0.1;
+Pid6.OutputProportionalPowerLimit = 80;
+Pid6.OutputProportionalBand = 5;
+Pid6.IntegralTime = 5;
+Pid6.DerivativeTime = 0;
+Pid6.SensorCorrectionAdjustment = 0;
+Pid6.SensorMinValue = 0;
+Pid6.SensorMaxValue = 0;
+Pid6.SetPointRampRateorSoftStartRamp = 0;
+Pid6.SetPointControlOutputRate = 4;
+Pid6.ControlOutputType = 0;
+Pid6.SsrControlOutputType = 0;
+Pid6.OutputOnOffHysteresisValue = 0;
+Pid6.ProcessVariableSamplingRate = 1000;
+Pid6.PvInputFilterFactorMode = 4;
+Pid6.OutputProportionalCycleTime = 0;
+Pid6.AcHeatersHalfCycleTime = 0;
+Pid6.ProportionalGain = 500.0;
+hardwareConfiguration.PidControls.Add(Pid6);
+/*
+HardwarePidControl Pid7 = new HardwarePidControl();
+//Pid1.has_hardwarepidcontroltype = true;
+Pid7.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.MixerHeater;
+ // Pid1.has_outputproportionalpowerlimit = true;
+ Pid7.OutputProportionalPowerLimit = 50;
+ // Pid1.has_outputproportionalband = true;
+ Pid7.OutputProportionalBand = 3;
+ // Pid1.has_kp = true;
+ Pid7.SensorCorrectionAdjustment = 2.0;
+ //Pid1.has_ki = true;
+ Pid7.IntegralTime = 0.01;
+//hardwareConfiguration.PidControls.Add(Pid7);
+*/
+
+HardwareDancer hardwareDancer1 = new HardwareDancer();
+hardwareDancer1.HardwareDancerType = Tango.PMR.Hardware.HardwareDancerType.RightDancer;
+hardwareDancer1.Gradual = false;
+hardwareDancer1.K = 0;
+hardwareDancer1.X = 0;
+hardwareDancer1.PulsePerMmSpring = 0;
+hardwareDancer1.MaximalMovementMm = 15;
+hardwareDancer1.ZeroPoint = 13626;
+hardwareDancer1.ResolutionBits = 14;
+hardwareDancer1.ArmLength = 126;
+hardwareConfiguration.Dancers.Add(hardwareDancer1);
+
+ HardwareDancer hardwareDancer2 = new HardwareDancer();
+ hardwareDancer2.HardwareDancerType = Tango.PMR.Hardware.HardwareDancerType.MiddleDancer;
+ hardwareDancer2.Gradual = false;
+ hardwareDancer2.K = 0;
+ hardwareDancer2.X = 0;
+ hardwareDancer2.PulsePerMmSpring = 0;
+ hardwareDancer2.MaximalMovementMm = 15;
+ hardwareDancer2.ZeroPoint = 13200;
+ hardwareDancer2.ResolutionBits = 14;
+ hardwareDancer2.ArmLength = 126;
+hardwareConfiguration.Dancers.Add(hardwareDancer2);
+
+ HardwareDancer hardwareDancer3 = new HardwareDancer();
+ hardwareDancer3.HardwareDancerType = Tango.PMR.Hardware.HardwareDancerType.LeftDancer;
+ hardwareDancer3.Gradual = false;
+ hardwareDancer3.K = 0;
+ hardwareDancer3.X = 0;
+ hardwareDancer3.PulsePerMmSpring = 0;
+ hardwareDancer3.MaximalMovementMm = 15;
+ hardwareDancer3.ZeroPoint = 11097;
+ hardwareDancer3.ResolutionBits = 14;
+ hardwareDancer3.ArmLength = 126;
+hardwareConfiguration.Dancers.Add(hardwareDancer3);
+
+HardwareMotor hardwareMotor1 = new HardwareMotor();
+hardwareMotor1.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoRdriving;
+hardwareMotor1.MinFrequency = 0;
+hardwareMotor1.MaxFrequency = 1000000;
+hardwareMotor1.SetMicroStep = 1;
+hardwareMotor1.MicroStep = 1;
+hardwareMotor1.MaxChangeSlope = 10000;
+hardwareMotor1.HighLengthMicroSecond = 0;
+hardwareMotor1.SpeedMaster = false;
+hardwareMotor1.PulsePerRound = 200;
+hardwareMotor1.PulleyRadius = 1.25;
+hardwareMotor1.ConfigWord = 0x1C80;
+hardwareMotor1.DirectionThreadWize = true;
+hardwareMotor1.KvalHold = 0x35;
+hardwareMotor1.KvalRun = 0x7f;
+hardwareMotor1.KvalAcc = 0x7f;
+hardwareMotor1.KvalDec = 0x7f;
+hardwareMotor1.OverCurrentThreshold = 7;
+hardwareMotor1.StallThreshold = 0x1F;
+hardwareMotor1.ThermalCompensationFactor = 0;
+hardwareMotor1.LowSpeedOptimization = false;
+hardwareMotor1.StSlp = 0x20;
+hardwareMotor1.IntSpd = 0x1A13;
+hardwareMotor1.FnSlpAcc = 0x50;
+hardwareMotor1.FnSlpDec = 0x50;
+hardwareConfiguration.Motors.Add(hardwareMotor1);
+
+HardwareMotor hardwareMotor2 = new HardwareMotor();
+hardwareMotor2.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoWinder;
+hardwareMotor2.MinFrequency = 0;
+hardwareMotor2.MaxFrequency = 1000000;
+hardwareMotor2.SetMicroStep = 1;
+hardwareMotor2.MicroStep = 16;
+hardwareMotor2.MaxChangeSlope = 10000;
+hardwareMotor2.HighLengthMicroSecond = 0;
+hardwareMotor2.SpeedMaster = false;
+hardwareMotor2.PulsePerRound = 200;
+hardwareMotor2.PulleyRadius = 1.68;
+hardwareMotor2.ConfigWord = 0x1c80;
+hardwareMotor2.DirectionThreadWize = false;
+hardwareMotor2.KvalHold = 0x35;
+hardwareMotor2.KvalRun = 0x7f;
+hardwareMotor2.KvalAcc = 0x7f;
+hardwareMotor2.KvalDec = 0x7f;
+hardwareMotor2.OverCurrentThreshold = 7;
+hardwareMotor2.StallThreshold = 0x1F;
+hardwareMotor2.ThermalCompensationFactor = 0;
+hardwareMotor2.LowSpeedOptimization = false;
+hardwareMotor2.StSlp = 0x20;
+hardwareMotor2.IntSpd = 0x1A13;
+hardwareMotor2.FnSlpAcc = 0x50;
+hardwareMotor2.FnSlpDec = 0x50;
+hardwareConfiguration.Motors.Add(hardwareMotor2);
+
+HardwareMotor hardwareMotor3 = new HardwareMotor();
+hardwareMotor3.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoDryerDriving;
+hardwareMotor3.MinFrequency = 0;
+hardwareMotor3.MaxFrequency = 1000000;
+hardwareMotor3.SetMicroStep = 1;
+hardwareMotor3.MicroStep = 1;
+hardwareMotor3.MaxChangeSlope = 1000;
+hardwareMotor3.HighLengthMicroSecond = 0;
+hardwareMotor3.SpeedMaster = true;
+hardwareMotor3.PulsePerRound = 200;
+hardwareMotor3.PulleyRadius = 1.05;
+hardwareMotor3.ConfigWord = 0x1c80;
+hardwareMotor3.DirectionThreadWize = true;
+hardwareMotor3.KvalHold = 0x35;
+hardwareMotor3.KvalRun = 0x7f;
+hardwareMotor3.KvalAcc = 0x7f;
+hardwareMotor3.KvalDec = 0x7f;
+hardwareMotor3.OverCurrentThreshold = 7;
+hardwareMotor3.StallThreshold = 0x1F;
+hardwareMotor3.ThermalCompensationFactor = 0;
+hardwareMotor3.LowSpeedOptimization = false;
+hardwareMotor3.StSlp = 0x20;
+hardwareMotor3.IntSpd = 0x1A13;
+hardwareMotor3.FnSlpAcc = 0x50;
+hardwareMotor3.FnSlpDec = 0x50;
+hardwareConfiguration.Motors.Add(hardwareMotor3);
+
+HardwareMotor hardwareMotor4 = new HardwareMotor();
+hardwareMotor4.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoLdriving;
+hardwareMotor4.MinFrequency = 0;
+hardwareMotor4.MaxFrequency = 1000000;
+hardwareMotor4.SetMicroStep = 1;
+hardwareMotor4.MicroStep = 8;
+hardwareMotor4.MaxChangeSlope = 10000;
+hardwareMotor4.HighLengthMicroSecond = 0;
+hardwareMotor4.SpeedMaster = false;
+hardwareMotor4.PulsePerRound = 200;
+hardwareMotor4.PulleyRadius = 1.25;
+hardwareMotor4.ConfigWord = 0x1C80;
+hardwareMotor4.DirectionThreadWize = true;
+hardwareMotor4.KvalHold = 0x35;
+hardwareMotor4.KvalRun = 0x7f;
+hardwareMotor4.KvalAcc = 0x7f;
+hardwareMotor4.KvalDec = 0x7f;
+hardwareMotor4.OverCurrentThreshold = 7;
+hardwareMotor4.StallThreshold = 0x1F;
+hardwareMotor4.ThermalCompensationFactor = 0;
+hardwareMotor4.LowSpeedOptimization = false;
+hardwareMotor4.StSlp = 20;
+hardwareMotor4.IntSpd = 0x1A13;
+hardwareMotor4.FnSlpAcc = 0x50;
+hardwareMotor4.FnSlpDec = 0x50;
+hardwareConfiguration.Motors.Add(hardwareMotor4);
+
+
+HardwareMotor hardwareMotor5 = new HardwareMotor();
+hardwareMotor5.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoScrew;
+hardwareMotor5.MinFrequency = 0;
+hardwareMotor5.MaxFrequency = 1000000;
+hardwareMotor5.SetMicroStep = 1;
+hardwareMotor5.MicroStep = 8;
+hardwareMotor5.MaxChangeSlope = 10000;
+hardwareMotor5.HighLengthMicroSecond = 0;
+hardwareMotor5.SpeedMaster = false;
+hardwareMotor5.PulsePerRound = 200;
+hardwareMotor5.PulleyRadius = 1.3;
+hardwareMotor5.ConfigWord = 0x1C80;
+hardwareMotor5.DirectionThreadWize = true;
+hardwareMotor5.KvalHold = 0x35;
+hardwareMotor5.KvalRun = 0x7f;
+hardwareMotor5.KvalAcc = 0x7f;
+hardwareMotor5.KvalDec = 0x7f;
+hardwareMotor5.OverCurrentThreshold = 7;
+hardwareMotor5.StallThreshold = 0x1F;
+hardwareMotor5.ThermalCompensationFactor = 0;
+hardwareMotor5.LowSpeedOptimization = false;
+hardwareMotor5.StSlp = 0x20;
+hardwareMotor5.IntSpd = 0x1A13;
+hardwareMotor5.FnSlpAcc = 0x50;
+hardwareMotor5.FnSlpDec = 0x50;
+hardwareConfiguration.Motors.Add(hardwareMotor5);
+
+HardwareMotor hardwareMotor6 = new HardwareMotor();
+hardwareMotor6.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoLloading;
+hardwareMotor6.MinFrequency = 0;
+hardwareMotor6.MaxFrequency = 1000000;
+hardwareMotor6.SetMicroStep = 1;
+hardwareMotor6.MicroStep = 4;
+hardwareMotor6.MaxChangeSlope = 10000;
+hardwareMotor6.HighLengthMicroSecond = 0;
+hardwareMotor6.SpeedMaster = false;
+hardwareMotor6.PulsePerRound = 200;
+hardwareMotor6.PulleyRadius = 1.3;
+hardwareMotor6.ConfigWord = 0xC80;
+hardwareMotor6.DirectionThreadWize = true;
+hardwareMotor6.KvalHold = 0x28;
+hardwareMotor6.KvalRun = 0x5f;
+hardwareMotor6.KvalAcc = 0x5f;
+hardwareMotor6.KvalDec = 0x5f;
+hardwareMotor6.OverCurrentThreshold = 7;
+hardwareMotor6.StallThreshold = 0x1F;
+hardwareMotor6.ThermalCompensationFactor = 0;
+hardwareMotor6.LowSpeedOptimization = false;
+hardwareMotor6.StSlp = 6;
+hardwareMotor6.IntSpd = 0x44B8;
+hardwareMotor6.FnSlpAcc = 0x14;
+hardwareMotor6.FnSlpDec = 0x14;
+hardwareConfiguration.Motors.Add(hardwareMotor6);
+
+HardwareMotor hardwareMotor7 = new HardwareMotor();
+hardwareMotor7.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoRloading;
+hardwareMotor7.MinFrequency = 0;
+hardwareMotor7.MaxFrequency = 1000000;
+hardwareMotor7.SetMicroStep = 1;
+hardwareMotor7.MicroStep = 4;
+hardwareMotor7.MaxChangeSlope = 10000;
+hardwareMotor7.HighLengthMicroSecond = 0;
+hardwareMotor7.SpeedMaster = false;
+hardwareMotor7.PulsePerRound = 200;
+hardwareMotor7.PulleyRadius = 1.3;
+hardwareMotor7.ConfigWord = 0xC80;
+hardwareMotor7.DirectionThreadWize = false;
+hardwareMotor7.KvalHold = 0x28;
+hardwareMotor7.KvalRun = 0x5f;
+hardwareMotor7.KvalAcc = 0x5f;
+hardwareMotor7.KvalDec = 0x5f;
+hardwareMotor7.OverCurrentThreshold = 7;
+hardwareMotor7.StallThreshold = 0x1F;
+hardwareMotor7.ThermalCompensationFactor = 0;
+hardwareMotor7.LowSpeedOptimization = false;
+hardwareMotor7.StSlp = 6;
+hardwareMotor7.IntSpd = 0x44B8;
+hardwareMotor7.FnSlpAcc = 0x14;
+hardwareMotor7.FnSlpDec = 0x14;
+hardwareConfiguration.Motors.Add(hardwareMotor7);
+
+stubManager.WriteLine("data.data length = " + hardwareConfiguration.CalculateSize());
+
+
+uploadHardwareConfigurationRequest.HardwareConfiguration = hardwareConfiguration;
+var response = stubManager.Run<UploadHardwareConfigurationResponse>(uploadHardwareConfigurationRequest);
+ /*Thread.Sleep(5000);
+
+ stubManager.Run("StubGPIOWriteBitRequest" ,"Q", 7, false);//OFF
+ Thread.Sleep(10);
+ stubManager.Run("StubGPIOWriteBitRequest" ,"Q", 4, true);//ON
+ Thread.Sleep(10);
+ stubManager.Run("StubGPIOWriteBitRequest" ,"Q", 4, false);//OFF
+ Thread.Sleep(10);
+ stubManager.Run("StubGPIOWriteBitRequest" ,"Q", 4, true);//ON
+
+*/
+
+
+}
+
diff --git a/Software/Stubs Collection/stubs/SystemTestWithHeatersIncludes.cs b/Software/Stubs Collection/stubs/SystemTestWithHeatersIncludes.cs
new file mode 100644
index 000000000..8944bdb5f
--- /dev/null
+++ b/Software/Stubs Collection/stubs/SystemTestWithHeatersIncludes.cs
@@ -0,0 +1,94 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Hardware;
+using Tango.PMR.Printing;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+include "C:\Twine Code\stubs\addedfiles\ACHeatersDefinition.cs"
+include "C:\Twine Code\stubs\addedfiles\DCHeatersDefinition.cs"
+include "C:\Twine Code\stubs\addedfiles\MotorsConfiguration.cs"
+include "C:\Twine Code\stubs\addedfiles\DancersConfiguration.cs"
+include "C:\Twine Code\stubs\addedfiles\PID_Configuration.cs"
+include "C:\Twine Code\stubs\addedfiles\DispensersConfiguration.cs"
+
+public void OnExecute(StubManager stubManager)
+{
+ Thread.Sleep(10);
+
+/*ProcessParameters processParameters = new ProcessParameters();
+processParameters.DyeingSpeed = 10;
+processParameters.MixerTemp = 0;
+processParameters.DryerBufferLength = 0;
+processParameters.MinInkUptake = 0;
+processParameters.HeadZone1Temp = 0;
+processParameters.DryerZone1Temp = 100;
+processParameters.FeederTension = 0;
+processParameters.DryerZone2Temp = 100;
+processParameters.HeadZone2Temp = 0;
+processParameters.PullerTension = 0;
+processParameters.HeadZone3Temp = 0;
+processParameters.DryerZone3Temp = 0;
+processParameters.WinderTension = 0;
+processParameters.HeadAirFlow = 0;
+processParameters.DryerAirFlow = 0;
+processParameters.TableIndex = 0;
+
+uploadProcessParametersRequest.ProcessParameters = processParameters;
+var response1 = stubManager.Run<UploadProcessParametersResponse>(uploadProcessParametersRequest);
+*/
+
+UploadHardwareConfigurationRequest uploadHardwareConfigurationRequest = new UploadHardwareConfigurationRequest();
+
+HardwareConfiguration hardwareConfiguration = new HardwareConfiguration();
+
+//hardwareConfiguration.PidControls.Add(HeadZ1Heater);
+//hardwareConfiguration.PidControls.Add(HeadZ2Heater);
+//hardwareConfiguration.PidControls.Add(HeadZ3Heater);
+//hardwareConfiguration.PidControls.Add(HeadZ4Heater);
+//hardwareConfiguration.PidControls.Add(MixerHeater);
+
+//hardwareConfiguration.PidControls.Add(DryerHeater1000);
+//hardwareConfiguration.PidControls.Add(DryerHeater200w1);
+
+
+hardwareConfiguration.Motors.Add(FeederMotor);
+hardwareConfiguration.Motors.Add(WinderMotor);
+hardwareConfiguration.Motors.Add(DryerMotor);
+hardwareConfiguration.Motors.Add(PoolerMotor);
+hardwareConfiguration.Motors.Add(ScrewMotor);
+//hardwareConfiguration.Motors.Add(LeftRockerMotor);
+//hardwareConfiguration.Motors.Add(RightRockerMotor);
+hardwareConfiguration.Motors.Add(Dispenser4Motor);
+
+//hardwareConfiguration.Dispensers.Add(hardwareDispenser);
+
+hardwareConfiguration.PidControls.Add(FeederPidControl);
+hardwareConfiguration.PidControls.Add(PoolerPidControl);
+hardwareConfiguration.PidControls.Add(WinderPidControl);
+
+hardwareConfiguration.Dancers.Add(FeederDancer);
+hardwareConfiguration.Dancers.Add(PoolerDancer);
+hardwareConfiguration.Dancers.Add(WinderDancer);
+
+hardwareConfiguration.Winders.Add(Winder);
+
+
+
+stubManager.WriteLine("data.data length = " + hardwareConfiguration.CalculateSize());
+
+
+uploadHardwareConfigurationRequest.HardwareConfiguration = hardwareConfiguration;
+var response = stubManager.Run<UploadHardwareConfigurationResponse>(uploadHardwareConfigurationRequest);
+ /*Thread.Sleep(5000);*/
+
+
+}
+
diff --git a/Software/Stubs Collection/stubs/TEST_GPIO_USER_LED.CS b/Software/Stubs Collection/stubs/TEST_GPIO_USER_LED.CS
new file mode 100644
index 000000000..f7a563e36
--- /dev/null
+++ b/Software/Stubs Collection/stubs/TEST_GPIO_USER_LED.CS
@@ -0,0 +1,38 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.Stubs.UI;
+
+public void OnExecute(StubManager stubManager)
+{
+ //stubManager.RequestTimeout = 20;
+ for (int i = 0; i < 100; i++)
+ {
+ //TEST GPIO USER LED:
+
+ //GREEN
+ stubManager.Run("StubGPIOWriteBitRequest" ,"Q", 7, true);//ON
+ Thread.Sleep(1000);
+ stubManager.Run("StubGPIOWriteBitRequest" ,"Q", 7, false);//OFF
+ Thread.Sleep(1000);
+
+ //BLUE
+ stubManager.Run("StubGPIOWriteBitRequest" ,"Q", 4, true);//ON
+ Thread.Sleep(1000);
+ stubManager.Run("StubGPIOWriteBitRequest" ,"Q", 4, false);//OFF
+ Thread.Sleep(1000);
+
+ //RED
+ stubManager.Run("StubGPIOWriteBitRequest" ,"N", 5, true);//ON
+ Thread.Sleep(1000);
+ stubManager.Run("StubGPIOWriteBitRequest" ,"N", 5, false);//OFF
+ Thread.Sleep(1000);
+ }
+}
+
diff --git a/Software/Stubs Collection/stubs/TestDispenser7.cs b/Software/Stubs Collection/stubs/TestDispenser7.cs
new file mode 100644
index 000000000..892e74385
--- /dev/null
+++ b/Software/Stubs Collection/stubs/TestDispenser7.cs
@@ -0,0 +1,69 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Hardware;
+using Tango.PMR.Printing;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+
+public void OnExecute(StubManager stubManager)
+{
+ Thread.Sleep(10);
+HardwareMotor Dispenser7Motor = new HardwareMotor();
+Dispenser7Motor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoDispenser7;
+Dispenser7Motor.MinFrequency = 0;
+Dispenser7Motor.MaxFrequency = 100000;
+Dispenser7Motor.SetMicroStep = 1;
+Dispenser7Motor.MicroStep = 16;
+Dispenser7Motor.MaxChangeSlope = 0x7ff;
+Dispenser7Motor.HighLengthMicroSecond = 0;
+Dispenser7Motor.SpeedMaster = false;
+Dispenser7Motor.PulsePerRound = 200;
+Dispenser7Motor.PulleyRadius = 0.8;
+Dispenser7Motor.ConfigWord = 0x1CA0;
+Dispenser7Motor.DirectionThreadWize = false;
+Dispenser7Motor.KvalHold = 0x08;
+Dispenser7Motor.KvalRun = 0x20;
+Dispenser7Motor.KvalAcc = 0x20;
+Dispenser7Motor.KvalDec = 0x3ff;
+Dispenser7Motor.OverCurrentThreshold = 0xF;
+Dispenser7Motor.StallThreshold = 0x7F;
+Dispenser7Motor.ThermalCompensationFactor = 0;
+Dispenser7Motor.LowSpeedOptimization = false;
+Dispenser7Motor.StSlp = 0x7;
+Dispenser7Motor.IntSpd = 0x22C5;
+Dispenser7Motor.FnSlpAcc = 0x15;
+Dispenser7Motor.FnSlpDec = 0x15;
+Dispenser7Motor.FsSpd = 0x3ff;
+
+
+UploadHardwareConfigurationRequest uploadHardwareConfigurationRequest = new UploadHardwareConfigurationRequest();
+
+HardwareConfiguration hardwareConfiguration = new HardwareConfiguration();
+
+hardwareConfiguration.Motors.Add(Dispenser7Motor);
+
+stubManager.WriteLine("data.data length = " + hardwareConfiguration.CalculateSize());
+
+
+uploadHardwareConfigurationRequest.HardwareConfiguration = hardwareConfiguration;
+var response = stubManager.Run<UploadHardwareConfigurationResponse>(uploadHardwareConfigurationRequest);
+ /*Thread.Sleep(5000);*/
+var response3 = stubManager.Run<StubValveResponse>("StubValveRequest" ,6, 10, false);
+var response4 = stubManager.Run<StubMotorRunResponse>("StubMotorRunRequest" ,12, false, 1200);
+Thread.Sleep(1000);
+//open valve toward the midtank, stop dispenser 7
+//var response3 = stubManager.Run<StubValveResponse>("StubValveRequest" ,6, 10, false);
+//var response2 = stubManager.Run<StubMotorStopResponse>("StubMotorStopRequest" ,12,2);
+
+
+
+}
+
diff --git a/Software/Stubs Collection/stubs/ThreadLoading.cs b/Software/Stubs Collection/stubs/ThreadLoading.cs
new file mode 100644
index 000000000..375237184
--- /dev/null
+++ b/Software/Stubs Collection/stubs/ThreadLoading.cs
@@ -0,0 +1,119 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Hardware;
+using Tango.PMR.Printing;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+include "D:\stubs\addedfiles\ACHeatersDefinition.cs"
+include "D:\stubs\addedfiles\DCHeatersDefinition.cs"
+include "D:\stubs\addedfiles\DeskSystemThreadMotorsDefinition.cs"
+//include "D:\stubs\addedfiles\ThreadMotorsDefinition2.cs"
+
+public void OnExecute(StubManager stubManager)
+{
+ Thread.Sleep(10);
+
+
+UploadHardwareConfigurationRequest uploadHardwareConfigurationRequest = new UploadHardwareConfigurationRequest();
+
+HardwareConfiguration hardwareConfiguration = new HardwareConfiguration();
+
+hardwareConfiguration.Motors.Add(FeederMotor);
+hardwareConfiguration.Motors.Add(WinderMotor);
+hardwareConfiguration.Motors.Add(DryerMotor);
+hardwareConfiguration.Motors.Add(PoolerMotor);
+hardwareConfiguration.Motors.Add(ScrewMotor);
+hardwareConfiguration.Motors.Add(DryerLoadarm);
+
+
+//hardwareConfiguration.Dispensers.Add(hardwareDispenser);
+
+hardwareConfiguration.PidControls.Add(FeederPidControl);
+hardwareConfiguration.PidControls.Add(PoolerPidControl);
+hardwareConfiguration.PidControls.Add(WinderPidControl);
+
+hardwareConfiguration.Dancers.Add(FeederDancer);
+hardwareConfiguration.Dancers.Add(PoolerDancer);
+hardwareConfiguration.Dancers.Add(WinderDancer);
+
+hardwareConfiguration.Winders.Add(Winder);
+
+
+
+stubManager.WriteLine("data.data length = " + hardwareConfiguration.CalculateSize());
+
+
+uploadHardwareConfigurationRequest.HardwareConfiguration = hardwareConfiguration;
+var response = stubManager.Run<UploadHardwareConfigurationResponse>(uploadHardwareConfigurationRequest);
+ /*Thread.Sleep(5000);*/
+
+JobRequest jobRequest = new JobRequest();
+
+JobTicket jobTicket = new JobTicket();
+jobTicket.Name = "Stubs Job";
+jobTicket.EnableInterSegment = false;
+jobTicket.InterSegmentLength = 50;
+jobTicket.Length = 1000;
+
+ProcessParameters processParameters = new ProcessParameters();
+processParameters.DyeingSpeed = 20;
+
+jobTicket.ProcessParameters = processParameters;
+jobTicket.WindingMethod = Tango.PMR.Printing.JobWindingMethod.Embroidery;
+
+JobSpool jobSpool = new JobSpool();
+jobSpool.JobSpoolType = Tango.PMR.Printing.JobSpoolType.StandardSpool;
+jobSpool.Length = 800;
+jobSpool.Weight = 0;
+jobSpool.Diameter = 3.0;
+jobSpool.StartOffsetPulses = 300;
+jobSpool.BackingRate = 10;
+jobSpool.SegmentOffsetPulses = 600;
+jobSpool.BottomBackingRate = 70;
+jobSpool.RotationsPerPassage = 7;
+
+jobTicket.Spool = jobSpool;
+
+JobSegment jobSegment = new JobSegment();
+jobSegment.Name = "Segment1";
+jobSegment.Length = 400.0;
+
+JobBrushStop jobBrushStop = new JobBrushStop();
+jobBrushStop.Index = 0;
+jobBrushStop.OffsetPercent = 0;
+jobBrushStop.OffsetMeters = 0;
+
+JobDispenser jobDispenser = new JobDispenser();
+jobDispenser.Index = 6;
+jobDispenser.Volume = 10;
+jobDispenser.DispenserStepDivision = Tango.PMR.Printing.DispenserStepDivision.Auto;
+jobDispenser.NanolitterPerSecond = 0;
+jobDispenser.NanoliterPerCentimeter = 10;
+jobDispenser.PulsePerSecond = 500;
+jobDispenser.DispenserLiquidType = Tango.PMR.Printing.DispenserLiquidType.Cyan;
+jobDispenser.LiquidMaxNanoliterPerCentimeter = 40;
+jobDispenser.NanoliterPerPulse = 0;
+jobBrushStop.Dispensers.Add(jobDispenser);
+jobSegment.BrushStops.Add(jobBrushStop);
+jobTicket.Segments.Add(jobSegment);
+
+jobRequest.JobTicket = jobTicket;
+
+
+int i=0;
+stubManager.RunContinuous<JobResponse>(jobRequest,(response1) =>
+ {
+ stubManager.WriteLine (String.Format("Data, {0}, {1} meters, {2}",++i,response1.Status.Progress*jobSegment.Length,response1.Status.Message));
+
+ });
+
+
+} \ No newline at end of file
diff --git a/Software/Stubs Collection/stubs/Turn_the_user_led_off.cs b/Software/Stubs Collection/stubs/Turn_the_user_led_off.cs
new file mode 100644
index 000000000..7db0bd165
--- /dev/null
+++ b/Software/Stubs Collection/stubs/Turn_the_user_led_off.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.Stubs.UI;
+
+public void OnExecute(StubManager stubManager)
+{
+ //stubManager.Run("StubGPIOWriteByteRequest" ,"Q", 0);
+ stubManager.Run("StubGPIOWriteByteRequest" ,"N", 0);
+}
+
diff --git a/Software/Stubs Collection/stubs/addedfiles/ACHeatersDefinition.cs b/Software/Stubs Collection/stubs/addedfiles/ACHeatersDefinition.cs
new file mode 100644
index 000000000..f815c1cd4
--- /dev/null
+++ b/Software/Stubs Collection/stubs/addedfiles/ACHeatersDefinition.cs
@@ -0,0 +1,62 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Hardware;
+using Tango.PMR.Printing;
+using Tango.PMR.Stubs;
+using Tango.Stubs;
+
+HardwarePidControl DryerHeater1000 = new HardwarePidControl();
+DryerHeater1000.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.DryerHeater1000W;
+DryerHeater1000.OutputProportionalBand = 1;
+DryerHeater1000.SensorCorrectionAdjustment = 2.0;
+DryerHeater1000.IntegralTime = 0.01;
+DryerHeater1000.OutputProportionalPowerLimit = 100;
+DryerHeater1000.IntegralTime = 5;
+DryerHeater1000.DerivativeTime = 0;
+DryerHeater1000.SensorCorrectionAdjustment = 0;
+DryerHeater1000.SensorMinValue = 2;
+DryerHeater1000.SensorMaxValue = 250;
+DryerHeater1000.SetPointRampRateorSoftStartRamp = 0;
+DryerHeater1000.SetPointControlOutputRate = 4;
+DryerHeater1000.ControlOutputType = 0;
+DryerHeater1000.SsrControlOutputType = 0;
+DryerHeater1000.OutputOnOffHysteresisValue = 0;
+DryerHeater1000.ProcessVariableSamplingRate = 1000;
+DryerHeater1000.PvInputFilterFactorMode = 4;
+DryerHeater1000.OutputProportionalCycleTime = 0;
+DryerHeater1000.AcHeatersHalfCycleTime = 0;
+DryerHeater1000.ProportionalGain = 20.0;
+
+HardwarePidControl DryerHeater200w1 = new HardwarePidControl();
+DryerHeater200w1.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.DryerHeater200W1;
+DryerHeater200w1.OutputProportionalPowerLimit = 0;//small heater is OFF after initial heating
+DryerHeater200w1.OutputProportionalBand = 1;
+DryerHeater200w1.SensorCorrectionAdjustment = 0.5;
+DryerHeater200w1.IntegralTime = 0.1;
+DryerHeater200w1.OutputProportionalPowerLimit = 0;
+DryerHeater200w1.OutputProportionalBand = 5;
+DryerHeater200w1.IntegralTime = 5;
+DryerHeater200w1.DerivativeTime = 0;
+DryerHeater200w1.SensorCorrectionAdjustment = 0;
+DryerHeater200w1.SensorMinValue = 0;
+DryerHeater200w1.SensorMaxValue = 0;
+DryerHeater200w1.SetPointRampRateorSoftStartRamp = 0;
+DryerHeater200w1.SetPointControlOutputRate = 4;
+DryerHeater200w1.ControlOutputType = 0;
+DryerHeater200w1.SsrControlOutputType = 0;
+DryerHeater200w1.OutputOnOffHysteresisValue = 0;
+DryerHeater200w1.ProcessVariableSamplingRate = 1000;
+DryerHeater200w1.PvInputFilterFactorMode = 4;
+DryerHeater200w1.OutputProportionalCycleTime = 0;
+DryerHeater200w1.AcHeatersHalfCycleTime = 0;
+DryerHeater200w1.ProportionalGain = 20.0;
+
+//hardwareConfiguration.PidControls.Add(DryerHeater1000);
+//hardwareConfiguration.PidControls.Add(DryerHeater200w1);
diff --git a/Software/Stubs Collection/stubs/addedfiles/DCHeatersDefinition.cs b/Software/Stubs Collection/stubs/addedfiles/DCHeatersDefinition.cs
new file mode 100644
index 000000000..015dc7be6
--- /dev/null
+++ b/Software/Stubs Collection/stubs/addedfiles/DCHeatersDefinition.cs
@@ -0,0 +1,134 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Hardware;
+using Tango.PMR.Printing;
+using Tango.PMR.Stubs;
+using Tango.Stubs;
+
+HardwarePidControl HeadZ1Heater = new HardwarePidControl();
+HeadZ1Heater.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.HeadHeaterZ1;
+HeadZ1Heater.OutputProportionalBand = 1;
+HeadZ1Heater.SensorCorrectionAdjustment = 2.0;
+HeadZ1Heater.IntegralTime = 0.01;
+HeadZ1Heater.OutputProportionalPowerLimit = 80;
+HeadZ1Heater.IntegralTime = 5;
+HeadZ1Heater.DerivativeTime = 0;
+HeadZ1Heater.SensorCorrectionAdjustment = 0;
+HeadZ1Heater.SensorMinValue = 0;
+HeadZ1Heater.SensorMaxValue = 1.0;
+HeadZ1Heater.SetPointRampRateorSoftStartRamp = 0;
+HeadZ1Heater.SetPointControlOutputRate = 4;
+HeadZ1Heater.ControlOutputType = 0;
+HeadZ1Heater.SsrControlOutputType = 0;
+HeadZ1Heater.OutputOnOffHysteresisValue = 0;
+HeadZ1Heater.ProcessVariableSamplingRate = 1000;
+HeadZ1Heater.PvInputFilterFactorMode = 4;
+HeadZ1Heater.OutputProportionalCycleTime = 0;
+HeadZ1Heater.AcHeatersHalfCycleTime = 0;
+HeadZ1Heater.ProportionalGain = 20;
+
+
+HardwarePidControl HeadZ2Heater = new HardwarePidControl();
+HeadZ2Heater.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.HeadHeaterZ2;
+HeadZ2Heater.OutputProportionalBand = 1;
+HeadZ2Heater.SensorCorrectionAdjustment = 0.5;
+HeadZ2Heater.IntegralTime = 0.1;
+HeadZ2Heater.OutputProportionalPowerLimit = 80;
+HeadZ2Heater.IntegralTime = 5;
+HeadZ2Heater.DerivativeTime = 0;
+HeadZ2Heater.SensorCorrectionAdjustment = 0;
+HeadZ2Heater.SensorMinValue = 0.0;
+HeadZ2Heater.SensorMaxValue = 1.0;
+HeadZ2Heater.SetPointRampRateorSoftStartRamp = 0;
+HeadZ2Heater.SetPointControlOutputRate = 4;
+HeadZ2Heater.ControlOutputType = 0;
+HeadZ2Heater.SsrControlOutputType = 0;
+HeadZ2Heater.OutputOnOffHysteresisValue = 0;
+HeadZ2Heater.ProcessVariableSamplingRate = 1000;
+HeadZ2Heater.PvInputFilterFactorMode = 4;
+HeadZ2Heater.OutputProportionalCycleTime = 0;
+HeadZ2Heater.AcHeatersHalfCycleTime = 0;
+HeadZ2Heater.ProportionalGain = 20;
+
+HardwarePidControl HeadZ3Heater = new HardwarePidControl();
+HeadZ3Heater.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.HeadHeaterZ3;
+HeadZ3Heater.OutputProportionalBand = 1;
+HeadZ3Heater.SensorCorrectionAdjustment = 2.0;
+HeadZ3Heater.IntegralTime = 0.01;
+HeadZ3Heater.OutputProportionalPowerLimit = 80;
+HeadZ3Heater.IntegralTime = 5;
+HeadZ3Heater.DerivativeTime = 0;
+HeadZ3Heater.SensorCorrectionAdjustment = 0;
+HeadZ3Heater.SensorMinValue = 0;
+HeadZ3Heater.SensorMaxValue = 1.0;
+HeadZ3Heater.SetPointRampRateorSoftStartRamp = 0;
+HeadZ3Heater.SetPointControlOutputRate = 4;
+HeadZ3Heater.ControlOutputType = 0;
+HeadZ3Heater.SsrControlOutputType = 0;
+HeadZ3Heater.OutputOnOffHysteresisValue = 0;
+HeadZ3Heater.ProcessVariableSamplingRate = 1000;
+HeadZ3Heater.PvInputFilterFactorMode = 4;
+HeadZ3Heater.OutputProportionalCycleTime = 0;
+HeadZ3Heater.AcHeatersHalfCycleTime = 0;
+HeadZ3Heater.ProportionalGain = 20;
+
+HardwarePidControl HeadZ4Heater = new HardwarePidControl();
+HeadZ4Heater.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.HeadHeaterZ4;
+HeadZ4Heater.OutputProportionalBand = 2;
+HeadZ4Heater.SensorCorrectionAdjustment = 0.5;
+HeadZ4Heater.IntegralTime = 0.1;
+HeadZ4Heater.OutputProportionalPowerLimit = 80;
+HeadZ4Heater.IntegralTime = 5;
+HeadZ4Heater.DerivativeTime = 0;
+HeadZ4Heater.SensorCorrectionAdjustment = 0;
+HeadZ4Heater.SensorMinValue = 0;
+HeadZ4Heater.SensorMaxValue = 1.0;
+HeadZ4Heater.SetPointRampRateorSoftStartRamp = 0;
+HeadZ4Heater.SetPointControlOutputRate = 4;
+HeadZ4Heater.ControlOutputType = 0;
+HeadZ4Heater.SsrControlOutputType = 0;
+HeadZ4Heater.OutputOnOffHysteresisValue = 0;
+HeadZ4Heater.ProcessVariableSamplingRate = 1000;
+HeadZ4Heater.PvInputFilterFactorMode = 4;
+HeadZ4Heater.OutputProportionalCycleTime = 0;
+HeadZ4Heater.AcHeatersHalfCycleTime = 0;
+HeadZ4Heater.ProportionalGain = 20;
+
+HardwarePidControl MixerHeater = new HardwarePidControl();
+MixerHeater.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.MixerHeater;
+MixerHeater.OutputProportionalBand = 2;
+MixerHeater.SensorCorrectionAdjustment = 2.0;
+MixerHeater.IntegralTime = 0.01;
+HeadZ4Heater.OutputProportionalPowerLimit = 80;
+HeadZ4Heater.IntegralTime = 5;
+HeadZ4Heater.DerivativeTime = 0;
+HeadZ4Heater.SensorCorrectionAdjustment = 0;
+HeadZ4Heater.SensorMinValue = 0;
+HeadZ4Heater.SensorMaxValue = 1.0;
+HeadZ4Heater.SetPointRampRateorSoftStartRamp = 0;
+HeadZ4Heater.SetPointControlOutputRate = 4;
+HeadZ4Heater.ControlOutputType = 0;
+HeadZ4Heater.SsrControlOutputType = 0;
+HeadZ4Heater.OutputOnOffHysteresisValue = 0;
+HeadZ4Heater.ProcessVariableSamplingRate = 1000;
+HeadZ4Heater.PvInputFilterFactorMode = 4;
+HeadZ4Heater.OutputProportionalCycleTime = 0;
+HeadZ4Heater.AcHeatersHalfCycleTime = 0;
+HeadZ4Heater.ProportionalGain = 20;
+
+
+//hardwareConfiguration.PidControls.Add(HeadZ1Heater);
+//hardwareConfiguration.PidControls.Add(HeadZ2Heater);
+//rdwareConfiguration.PidControls.Add(HeadZ3Heater);
+//hardwareConfiguration.PidControls.Add(HeadZ4Heater);
+//hardwareConfiguration.PidControls.Add(MixerHeater);
+
+
+
diff --git a/Software/Stubs Collection/stubs/addedfiles/DancersConfiguration.cs b/Software/Stubs Collection/stubs/addedfiles/DancersConfiguration.cs
new file mode 100644
index 000000000..0f4e5023f
--- /dev/null
+++ b/Software/Stubs Collection/stubs/addedfiles/DancersConfiguration.cs
@@ -0,0 +1,48 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Hardware;
+using Tango.PMR.Printing;
+using Tango.PMR.Stubs;
+using Tango.Stubs;
+
+
+HardwareDancer FeederDancer = new HardwareDancer();
+FeederDancer.HardwareDancerType = Tango.PMR.Hardware.HardwareDancerType.RightDancer;
+FeederDancer.Gradual = false;
+FeederDancer.K = 0;
+FeederDancer.X = 0;
+FeederDancer.PulsePerMmSpring = 0;
+FeederDancer.MaximalMovementMm = 20;
+FeederDancer.ZeroPoint = 14182;
+FeederDancer.ResolutionBits = 14;
+FeederDancer.ArmLength = 126;
+
+HardwareDancer PoolerDancer = new HardwareDancer();
+PoolerDancer.HardwareDancerType = Tango.PMR.Hardware.HardwareDancerType.MiddleDancer;
+PoolerDancer.Gradual = false;
+PoolerDancer.K = 0;
+PoolerDancer.X = 0;
+PoolerDancer.PulsePerMmSpring = 0;
+PoolerDancer.MaximalMovementMm = 20;
+PoolerDancer.ZeroPoint = 13247;
+PoolerDancer.ResolutionBits = 14;
+PoolerDancer.ArmLength = 126;
+
+HardwareDancer WinderDancer = new HardwareDancer();
+WinderDancer.HardwareDancerType = Tango.PMR.Hardware.HardwareDancerType.LeftDancer;
+WinderDancer.Gradual = false;
+WinderDancer.K = 0;
+WinderDancer.X = 0;
+WinderDancer.PulsePerMmSpring = 0;
+WinderDancer.MaximalMovementMm = 20;
+WinderDancer.ZeroPoint = 11193;
+WinderDancer.ResolutionBits = 14;
+WinderDancer.ArmLength = 126;
+
diff --git a/Software/Stubs Collection/stubs/addedfiles/DeskSystemThreadMotorsDefinition.cs b/Software/Stubs Collection/stubs/addedfiles/DeskSystemThreadMotorsDefinition.cs
new file mode 100644
index 000000000..6eda1d60c
--- /dev/null
+++ b/Software/Stubs Collection/stubs/addedfiles/DeskSystemThreadMotorsDefinition.cs
@@ -0,0 +1,382 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Hardware;
+using Tango.PMR.Printing;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+HardwarePidControl FeederPidControl = new HardwarePidControl();
+FeederPidControl.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.MotorFeeder;
+FeederPidControl.OutputProportionalPowerLimit = 1.0;
+FeederPidControl.OutputProportionalBand = 5;
+FeederPidControl.IntegralTime = 5;
+FeederPidControl.DerivativeTime = 0;
+FeederPidControl.SensorCorrectionAdjustment = 0;
+FeederPidControl.SensorMinValue = 0;
+FeederPidControl.SensorMaxValue = 0;
+FeederPidControl.SetPointRampRateorSoftStartRamp = 0;
+FeederPidControl.SetPointControlOutputRate = 4;
+FeederPidControl.ControlOutputType = 0;
+FeederPidControl.SsrControlOutputType = 0;
+FeederPidControl.OutputOnOffHysteresisValue = 0;
+FeederPidControl.ProcessVariableSamplingRate = 1000;
+FeederPidControl.PvInputFilterFactorMode = 4;
+FeederPidControl.OutputProportionalCycleTime = 0;
+FeederPidControl.AcHeatersHalfCycleTime = 0;
+FeederPidControl.ProportionalGain = 11.0;
+
+
+HardwarePidControl PoolerPidControl = new HardwarePidControl();
+PoolerPidControl.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.MotorPooler;
+PoolerPidControl.OutputProportionalPowerLimit = 1.0;
+PoolerPidControl.OutputProportionalBand = 5;
+PoolerPidControl.IntegralTime = 5;
+PoolerPidControl.DerivativeTime = 0;
+PoolerPidControl.SensorCorrectionAdjustment = 0;
+PoolerPidControl.SensorMinValue = 0;
+PoolerPidControl.SensorMaxValue = 0;
+PoolerPidControl.SetPointRampRateorSoftStartRamp = 0;
+PoolerPidControl.SetPointControlOutputRate = 4;
+PoolerPidControl.ControlOutputType = 0;
+PoolerPidControl.SsrControlOutputType = 0;
+PoolerPidControl.OutputOnOffHysteresisValue = 0;
+PoolerPidControl.ProcessVariableSamplingRate = 1000;
+PoolerPidControl.PvInputFilterFactorMode = 4;
+PoolerPidControl.OutputProportionalCycleTime = 0;
+PoolerPidControl.AcHeatersHalfCycleTime = 0;
+PoolerPidControl.ProportionalGain = 11.0;
+
+
+HardwarePidControl WinderPidControl = new HardwarePidControl();
+WinderPidControl.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.MotorWinder;
+WinderPidControl.OutputProportionalPowerLimit = 1.0;
+WinderPidControl.OutputProportionalBand = 5;
+WinderPidControl.IntegralTime = 5;
+WinderPidControl.DerivativeTime = 0;
+WinderPidControl.SensorCorrectionAdjustment = 0;
+WinderPidControl.SensorMinValue = 0;
+WinderPidControl.SensorMaxValue = 0;
+WinderPidControl.SetPointRampRateorSoftStartRamp = 0;
+WinderPidControl.SetPointControlOutputRate = 4;
+WinderPidControl.ControlOutputType = 0;
+WinderPidControl.SsrControlOutputType = 0;
+WinderPidControl.OutputOnOffHysteresisValue = 0;
+WinderPidControl.ProcessVariableSamplingRate = 1000;
+WinderPidControl.PvInputFilterFactorMode = 4;
+WinderPidControl.OutputProportionalCycleTime = 0;
+WinderPidControl.AcHeatersHalfCycleTime = 0;
+WinderPidControl.ProportionalGain = 11.0;
+
+
+HardwareDancer FeederDancer = new HardwareDancer();
+FeederDancer.HardwareDancerType = Tango.PMR.Hardware.HardwareDancerType.RightDancer;
+FeederDancer.Gradual = false;
+FeederDancer.K = 0;
+FeederDancer.X = 0;
+FeederDancer.PulsePerMmSpring = 0;
+FeederDancer.MaximalMovementMm = 20;
+FeederDancer.ZeroPoint = 14182;
+FeederDancer.ResolutionBits = 14;
+FeederDancer.ArmLength = 126;
+
+HardwareDancer PoolerDancer = new HardwareDancer();
+PoolerDancer.HardwareDancerType = Tango.PMR.Hardware.HardwareDancerType.MiddleDancer;
+PoolerDancer.Gradual = false;
+PoolerDancer.K = 0;
+PoolerDancer.X = 0;
+PoolerDancer.PulsePerMmSpring = 0;
+PoolerDancer.MaximalMovementMm = 20;
+PoolerDancer.ZeroPoint = 13247;
+PoolerDancer.ResolutionBits = 14;
+PoolerDancer.ArmLength = 126;
+
+HardwareDancer WinderDancer = new HardwareDancer();
+WinderDancer.HardwareDancerType = Tango.PMR.Hardware.HardwareDancerType.LeftDancer;
+WinderDancer.Gradual = false;
+WinderDancer.K = 0;
+WinderDancer.X = 0;
+WinderDancer.PulsePerMmSpring = 0;
+WinderDancer.MaximalMovementMm = 20;
+WinderDancer.ZeroPoint = 11193;
+WinderDancer.ResolutionBits = 14;
+WinderDancer.ArmLength = 126;
+
+HardwareMotor FeederMotor = new HardwareMotor();
+FeederMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoRdriving;
+FeederMotor.MinFrequency = 0;
+FeederMotor.MaxFrequency = 1000000;
+FeederMotor.SetMicroStep = 1;
+FeederMotor.MicroStep = 8;
+FeederMotor.MaxChangeSlope = 4095;
+FeederMotor.HighLengthMicroSecond = 0;
+FeederMotor.SpeedMaster = false;
+FeederMotor.PulsePerRound = 200;
+FeederMotor.PulleyRadius = 1.25;
+FeederMotor.ConfigWord = 0x1C80;
+FeederMotor.DirectionThreadWize = true;
+FeederMotor.KvalHold = 0x35;
+FeederMotor.KvalRun = 0x7f;
+FeederMotor.KvalAcc = 0x7f;
+FeederMotor.KvalDec = 0x7f;
+FeederMotor.OverCurrentThreshold = 7;
+FeederMotor.StallThreshold = 0x1F;
+FeederMotor.ThermalCompensationFactor = 0;
+FeederMotor.LowSpeedOptimization = false;
+FeederMotor.StSlp = 0x20;
+FeederMotor.IntSpd = 0x1A13;
+FeederMotor.FnSlpAcc = 0x50;
+FeederMotor.FnSlpDec = 0x50;
+
+HardwareMotor DryerMotor = new HardwareMotor();
+DryerMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoDryerDriving;
+DryerMotor.MinFrequency = 0;
+DryerMotor.MaxFrequency = 1000000;
+DryerMotor.SetMicroStep = 1;
+DryerMotor.MicroStep = 8;
+DryerMotor.MaxChangeSlope = 4095;
+DryerMotor.HighLengthMicroSecond = 0;
+DryerMotor.SpeedMaster = true;
+DryerMotor.PulsePerRound = 200;
+DryerMotor.PulleyRadius = 1.05;
+DryerMotor.ConfigWord = 0x1c80;
+DryerMotor.DirectionThreadWize = false;
+DryerMotor.KvalHold = 0x35;
+DryerMotor.KvalRun = 0x7f;
+DryerMotor.KvalAcc = 0x7f;
+DryerMotor.KvalDec = 0x7f;
+DryerMotor.OverCurrentThreshold = 7;
+DryerMotor.StallThreshold = 0x1F;
+DryerMotor.ThermalCompensationFactor = 0;
+DryerMotor.LowSpeedOptimization = false;
+DryerMotor.StSlp = 0x20;
+DryerMotor.IntSpd = 0x1A13;
+DryerMotor.FnSlpAcc = 0x50;
+DryerMotor.FnSlpDec = 0x50;
+
+HardwareMotor PoolerMotor = new HardwareMotor();
+PoolerMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoLdriving;
+PoolerMotor.MinFrequency = 0;
+PoolerMotor.MaxFrequency = 1000000;
+PoolerMotor.SetMicroStep = 1;
+PoolerMotor.MicroStep = 8;
+PoolerMotor.MaxChangeSlope = 10000;
+PoolerMotor.HighLengthMicroSecond = 0;
+PoolerMotor.SpeedMaster = false;
+PoolerMotor.PulsePerRound = 200;
+PoolerMotor.PulleyRadius = 1.25;
+PoolerMotor.ConfigWord = 0x1C80;
+PoolerMotor.DirectionThreadWize = true;
+PoolerMotor.KvalHold = 0x35;
+PoolerMotor.KvalRun = 0x7f;
+PoolerMotor.KvalAcc = 0x7f;
+PoolerMotor.KvalDec = 0x7f;
+PoolerMotor.OverCurrentThreshold = 7;
+PoolerMotor.StallThreshold = 0x1F;
+PoolerMotor.ThermalCompensationFactor = 0;
+PoolerMotor.LowSpeedOptimization = false;
+PoolerMotor.StSlp = 20;
+PoolerMotor.IntSpd = 0x1A13;
+PoolerMotor.FnSlpAcc = 0x50;
+PoolerMotor.FnSlpDec = 0x50;
+
+HardwareMotor WinderMotor = new HardwareMotor();
+WinderMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoWinder;
+WinderMotor.MinFrequency = 0;
+WinderMotor.MaxFrequency = 100000;
+WinderMotor.SetMicroStep = 1;
+WinderMotor.MicroStep = 16;
+WinderMotor.MaxChangeSlope = 0x7ff;
+WinderMotor.HighLengthMicroSecond = 0;
+WinderMotor.SpeedMaster = false;
+WinderMotor.PulsePerRound = 200;
+WinderMotor.PulleyRadius = 0.8;
+WinderMotor.ConfigWord = 0x1CA0;
+WinderMotor.DirectionThreadWize = false;
+WinderMotor.KvalHold = 0x08;
+WinderMotor.KvalRun = 0x20;
+WinderMotor.KvalAcc = 0x20;
+WinderMotor.KvalDec = 0x20;
+WinderMotor.OverCurrentThreshold = 0xF;
+WinderMotor.StallThreshold = 0x7F;
+WinderMotor.ThermalCompensationFactor = 0;
+WinderMotor.LowSpeedOptimization = false;
+WinderMotor.StSlp = 0x7;
+WinderMotor.IntSpd = 0x22C5;
+WinderMotor.FnSlpAcc = 0x15;
+WinderMotor.FnSlpDec = 0x15;
+
+HardwareMotor ScrewMotor = new HardwareMotor();
+ScrewMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoScrew;
+ScrewMotor.MinFrequency = 0;
+ScrewMotor.MaxFrequency = 100000;
+ScrewMotor.SetMicroStep = 1;
+ScrewMotor.MicroStep = 8;
+ScrewMotor.MaxChangeSlope = 0x7FF;
+ScrewMotor.HighLengthMicroSecond = 0;
+ScrewMotor.SpeedMaster = false;
+ScrewMotor.PulsePerRound = 200;
+ScrewMotor.PulleyRadius = 1.68;
+ScrewMotor.ConfigWord = 0x1CA0;
+ScrewMotor.DirectionThreadWize = true;
+ScrewMotor.KvalHold = 0x1;
+ScrewMotor.KvalRun = 0x20;
+ScrewMotor.KvalAcc = 0x20;
+ScrewMotor.KvalDec = 0x20;
+ScrewMotor.OverCurrentThreshold = 0xF;
+ScrewMotor.StallThreshold = 0x7F;
+ScrewMotor.ThermalCompensationFactor = 0;
+ScrewMotor.LowSpeedOptimization = false;
+ScrewMotor.StSlp = 0x7;
+ScrewMotor.IntSpd = 0x22C5;
+ScrewMotor.FnSlpAcc = 0x15;
+ScrewMotor.FnSlpDec = 0x15;
+
+
+HardwareMotor LeftRockerMotor = new HardwareMotor();
+LeftRockerMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoLloading;
+LeftRockerMotor.MinFrequency = 0;
+LeftRockerMotor.MaxFrequency = 1000000;
+LeftRockerMotor.SetMicroStep = 1;
+LeftRockerMotor.MicroStep = 4;
+LeftRockerMotor.MaxChangeSlope = 10000;
+LeftRockerMotor.HighLengthMicroSecond = 0;
+LeftRockerMotor.SpeedMaster = false;
+LeftRockerMotor.PulsePerRound = 200;
+LeftRockerMotor.PulleyRadius = 1.3;
+LeftRockerMotor.ConfigWord = 0xC80;
+LeftRockerMotor.DirectionThreadWize = false;
+LeftRockerMotor.KvalHold = 0x28;
+LeftRockerMotor.KvalRun = 0x5f;
+LeftRockerMotor.KvalAcc = 0x5f;
+LeftRockerMotor.KvalDec = 0x5f;
+LeftRockerMotor.OverCurrentThreshold = 7;
+LeftRockerMotor.StallThreshold = 0x1F;
+LeftRockerMotor.ThermalCompensationFactor = 0;
+LeftRockerMotor.LowSpeedOptimization = false;
+LeftRockerMotor.StSlp = 6;
+LeftRockerMotor.IntSpd = 0x44B8;
+LeftRockerMotor.FnSlpAcc = 0x14;
+LeftRockerMotor.FnSlpDec = 0x14;
+
+
+HardwareMotor RightRockerMotor = new HardwareMotor();
+RightRockerMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoRloading;
+RightRockerMotor.MinFrequency = 0;
+RightRockerMotor.MaxFrequency = 1000000;
+RightRockerMotor.SetMicroStep = 1;
+RightRockerMotor.MicroStep = 4;
+RightRockerMotor.MaxChangeSlope = 4095;
+RightRockerMotor.HighLengthMicroSecond = 0;
+RightRockerMotor.SpeedMaster = false;
+RightRockerMotor.PulsePerRound = 200;
+RightRockerMotor.PulleyRadius = 1.3;
+RightRockerMotor.ConfigWord = 0xC80;
+RightRockerMotor.DirectionThreadWize = true;
+RightRockerMotor.KvalHold = 0x28;
+RightRockerMotor.KvalRun = 0x5f;
+RightRockerMotor.KvalAcc = 0x5f;
+RightRockerMotor.KvalDec = 0x5f;
+RightRockerMotor.OverCurrentThreshold = 7;
+RightRockerMotor.StallThreshold = 0x1F;
+RightRockerMotor.ThermalCompensationFactor = 0;
+RightRockerMotor.LowSpeedOptimization = false;
+RightRockerMotor.StSlp = 6;
+RightRockerMotor.IntSpd = 0x44B8;
+RightRockerMotor.FnSlpAcc = 0x14;
+RightRockerMotor.FnSlpDec = 0x14;
+
+HardwareMotor Dispenser4Motor = new HardwareMotor();
+Dispenser4Motor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoDispenser7;
+/*Dispenser4Motor.MinFrequency = 0;
+Dispenser4Motor.MaxFrequency = 1000000;
+Dispenser4Motor.SetMicroStep = 1;
+Dispenser4Motor.MicroStep = 8;
+Dispenser4Motor.MaxChangeSlope = 0x7FF;
+Dispenser4Motor.HighLengthMicroSecond = 0;
+Dispenser4Motor.SpeedMaster = false;
+Dispenser4Motor.PulsePerRound = 200;
+Dispenser4Motor.PulleyRadius = 1.68;
+Dispenser4Motor.ConfigWord = 0x1CA0;
+Dispenser4Motor.DirectionThreadWize = true;
+Dispenser4Motor.KvalHold = 0x35;
+Dispenser4Motor.KvalRun = 0x7f;
+Dispenser4Motor.KvalAcc = 0x7f;
+Dispenser4Motor.KvalDec = 0x7f;
+Dispenser4Motor.OverCurrentThreshold = 0xF;
+Dispenser4Motor.StallThreshold = 0x7F;
+Dispenser4Motor.ThermalCompensationFactor = 0;
+Dispenser4Motor.LowSpeedOptimization = false;
+Dispenser4Motor.StSlp = 0x20;
+Dispenser4Motor.IntSpd = 0x1A13;
+Dispenser4Motor.FnSlpAcc = 0x50;
+Dispenser4Motor.FnSlpDec = 0x50;
+*/
+Dispenser4Motor.MinFrequency = 0;
+Dispenser4Motor.MaxFrequency = 1000000;
+Dispenser4Motor.SetMicroStep = 1;
+Dispenser4Motor.MicroStep = 1;
+Dispenser4Motor.MaxChangeSlope = 10000;
+Dispenser4Motor.HighLengthMicroSecond = 0;
+Dispenser4Motor.SpeedMaster = false;
+Dispenser4Motor.PulsePerRound = 200;
+Dispenser4Motor.PulleyRadius = 1.25;
+Dispenser4Motor.ConfigWord = 0x1C80;
+Dispenser4Motor.DirectionThreadWize = true;
+Dispenser4Motor.KvalHold = 0x35;
+Dispenser4Motor.KvalRun = 0x7f;
+Dispenser4Motor.KvalAcc = 0x7f;
+Dispenser4Motor.KvalDec = 0x7f;
+Dispenser4Motor.OverCurrentThreshold = 7;
+Dispenser4Motor.StallThreshold = 0x1F;
+Dispenser4Motor.ThermalCompensationFactor = 0;
+Dispenser4Motor.LowSpeedOptimization = false;
+Dispenser4Motor.StSlp = 0x20;
+Dispenser4Motor.IntSpd = 0x1A13;
+Dispenser4Motor.FnSlpAcc = 0x50;
+Dispenser4Motor.FnSlpDec = 0x50;
+
+
+
+HardwareDispenser hardwareDispenser = new HardwareDispenser();
+hardwareDispenser.HardwareDispenserType = Tango.PMR.Hardware.HardwareDispenserType.StandardDispenser;
+hardwareDispenser.Index = 6;
+hardwareDispenser.NlPerPulse = 2.4;
+hardwareDispenser.Capacity = 500;
+
+JobDispenser jobDispenser = new JobDispenser();
+jobDispenser.Index = 0;
+jobDispenser.Volume = 0;
+jobDispenser.DispenserStepDivision = Tango.PMR.Printing.DispenserStepDivision.Auto;
+jobDispenser.NanolitterPerSecond = 0;
+jobDispenser.NanoliterPerCentimeter = 0;
+jobDispenser.PulsePerSecond = 0;
+jobDispenser.DispenserLiquidType = Tango.PMR.Printing.DispenserLiquidType.Cyan;
+jobDispenser.LiquidMaxNanoliterPerCentimeter = 0;
+jobDispenser.NanoliterPerPulse = 0;
+
+HardwareWinder Winder = new HardwareWinder();
+Winder.HardwareWinderType = Tango.PMR.Hardware.HardwareWinderType.InternalWinder;
+Winder.MillimeterPerRotation = 20;
+
+//hardwareConfiguration.Motors.Add(FeederMotor);
+//hardwareConfiguration.Motors.Add(WinderMotor);
+//hardwareConfiguration.Motors.Add(DryerMotor);
+//hardwareConfiguration.Motors.Add(PoolerMotor);
+//hardwareConfiguration.Motors.Add(ScrewMotor);
+//hardwareConfiguration.Motors.Add(LeftRockerMotor);
+//hardwareConfiguration.Motors.Add(RightRockerMotor);
+
+//hardwareConfiguration.PidControls.Add(FeederPidControl);
+//hardwareConfiguration.PidControls.Add(PoolerPidControl);
+//hardwareConfiguration.PidControls.Add(WinderPidControl);
+
+//hardwareConfiguration.Dancers.Add(FeederDancer);
+//hardwareConfiguration.Dancers.Add(PoolerDancer);
+//hardwareConfiguration.Dancers.Add(WinderDancer);
diff --git a/Software/Stubs Collection/stubs/addedfiles/DispensersConfiguration.cs b/Software/Stubs Collection/stubs/addedfiles/DispensersConfiguration.cs
new file mode 100644
index 000000000..09289b348
--- /dev/null
+++ b/Software/Stubs Collection/stubs/addedfiles/DispensersConfiguration.cs
@@ -0,0 +1,62 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Hardware;
+using Tango.PMR.Printing;
+using Tango.PMR.Stubs;
+using Tango.Stubs;
+
+
+HardwareDispenser hardware1Dispenser = new HardwareDispenser();
+hardware1Dispenser.HardwareDispenserType = Tango.PMR.Hardware.HardwareDispenserType.StandardDispenser;
+hardware1Dispenser.Index = 0;
+hardware1Dispenser.NlPerPulse = 2.4;
+hardware1Dispenser.Capacity = 500;
+
+HardwareDispenser hardware2Dispenser = new HardwareDispenser();
+hardware2Dispenser.HardwareDispenserType = Tango.PMR.Hardware.HardwareDispenserType.StandardDispenser;
+hardware2Dispenser.Index = 1;
+hardware2Dispenser.NlPerPulse = 2.4;
+hardware2Dispenser.Capacity = 500;
+
+HardwareDispenser hardware3Dispenser = new HardwareDispenser();
+hardware3Dispenser.HardwareDispenserType = Tango.PMR.Hardware.HardwareDispenserType.StandardDispenser;
+hardware3Dispenser.Index = 2;
+hardware3Dispenser.NlPerPulse = 2.4;
+hardware3Dispenser.Capacity = 500;
+
+HardwareDispenser hardware4Dispenser = new HardwareDispenser();
+hardware4Dispenser.HardwareDispenserType = Tango.PMR.Hardware.HardwareDispenserType.StandardDispenser;
+hardware4Dispenser.Index = 3;
+hardware4Dispenser.NlPerPulse = 2.4;
+hardware4Dispenser.Capacity = 500;
+
+HardwareDispenser hardware5Dispenser = new HardwareDispenser();
+hardware5Dispenser.HardwareDispenserType = Tango.PMR.Hardware.HardwareDispenserType.StandardDispenser;
+hardware5Dispenser.Index = 4;
+hardware5Dispenser.NlPerPulse = 2.4;
+hardware5Dispenser.Capacity = 500;
+
+HardwareDispenser hardware6Dispenser = new HardwareDispenser();
+hardware6Dispenser.HardwareDispenserType = Tango.PMR.Hardware.HardwareDispenserType.StandardDispenser;
+hardware6Dispenser.Index = 5;
+hardware6Dispenser.NlPerPulse = 2.4;
+hardware6Dispenser.Capacity = 500;
+
+HardwareDispenser hardware7Dispenser = new HardwareDispenser();
+hardware7Dispenser.HardwareDispenserType = Tango.PMR.Hardware.HardwareDispenserType.StandardDispenser;
+hardware7Dispenser.Index = 6;
+hardware7Dispenser.NlPerPulse = 2.4;
+hardware7Dispenser.Capacity = 500;
+
+HardwareDispenser hardware8Dispenser = new HardwareDispenser();
+hardware8Dispenser.HardwareDispenserType = Tango.PMR.Hardware.HardwareDispenserType.StandardDispenser;
+hardware8Dispenser.Index = 7;
+hardware8Dispenser.NlPerPulse = 2.4;
+hardware8Dispenser.Capacity = 500;
diff --git a/Software/Stubs Collection/stubs/addedfiles/MotorsConfiguration.cs b/Software/Stubs Collection/stubs/addedfiles/MotorsConfiguration.cs
new file mode 100644
index 000000000..3ebf70b29
--- /dev/null
+++ b/Software/Stubs Collection/stubs/addedfiles/MotorsConfiguration.cs
@@ -0,0 +1,317 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Hardware;
+using Tango.PMR.Printing;
+using Tango.PMR.Stubs;
+using Tango.Stubs;
+
+HardwareMotor FeederMotor = new HardwareMotor();
+FeederMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoRdriving;
+FeederMotor.MinFrequency = 0;
+FeederMotor.MaxFrequency = 1000000;
+FeederMotor.SetMicroStep = 1;
+FeederMotor.MicroStep = 8;
+FeederMotor.MaxChangeSlope = 4095;
+FeederMotor.HighLengthMicroSecond = 0;
+FeederMotor.SpeedMaster = false;
+FeederMotor.PulsePerRound = 200;
+FeederMotor.PulleyRadius = 1.25;
+FeederMotor.ConfigWord = 0x1C80;
+FeederMotor.DirectionThreadWize = true;
+FeederMotor.KvalHold = 0x8;
+FeederMotor.KvalRun = 0x35;
+FeederMotor.KvalAcc = 0x7f;
+FeederMotor.KvalDec = 0x27;
+FeederMotor.OverCurrentThreshold = 7;
+FeederMotor.StallThreshold = 0x1F;
+FeederMotor.ThermalCompensationFactor = 0;
+FeederMotor.LowSpeedOptimization = false;
+FeederMotor.StSlp = 0x20;
+FeederMotor.IntSpd = 0x1A13;
+FeederMotor.FnSlpAcc = 0x50;
+FeederMotor.FnSlpDec = 0x50;
+FeederMotor.FsSpd = 0x27;
+
+HardwareMotor DryerMotor = new HardwareMotor();
+DryerMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoDryerDriving;
+DryerMotor.MinFrequency = 0;
+DryerMotor.MaxFrequency = 1000000;
+DryerMotor.SetMicroStep = 1;
+DryerMotor.MicroStep = 8;
+DryerMotor.MaxChangeSlope = 4095;
+DryerMotor.HighLengthMicroSecond = 0;
+DryerMotor.SpeedMaster = true;
+DryerMotor.PulsePerRound = 200;
+DryerMotor.PulleyRadius = 1.05;
+DryerMotor.ConfigWord = 0x1c80;
+DryerMotor.DirectionThreadWize = false;
+DryerMotor.KvalHold = 0x8;
+DryerMotor.KvalRun = 0x35;
+DryerMotor.KvalAcc = 0x7f;
+DryerMotor.KvalDec = 0x27;
+DryerMotor.OverCurrentThreshold = 7;
+DryerMotor.StallThreshold = 0x1F;
+DryerMotor.ThermalCompensationFactor = 0;
+DryerMotor.LowSpeedOptimization = false;
+DryerMotor.StSlp = 0x20;
+DryerMotor.IntSpd = 0x1A13;
+DryerMotor.FnSlpAcc = 0x50;
+DryerMotor.FnSlpDec = 0x50;
+DryerMotor.FsSpd = 0x27;
+
+HardwareMotor PoolerMotor = new HardwareMotor();
+PoolerMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoLdriving;
+PoolerMotor.MinFrequency = 0;
+PoolerMotor.MaxFrequency = 1000000;
+PoolerMotor.SetMicroStep = 1;
+PoolerMotor.MicroStep = 8;
+PoolerMotor.MaxChangeSlope = 10000;
+PoolerMotor.HighLengthMicroSecond = 0;
+PoolerMotor.SpeedMaster = false;
+PoolerMotor.PulsePerRound = 200;
+PoolerMotor.PulleyRadius = 1.25;
+PoolerMotor.ConfigWord = 0x1C80;
+PoolerMotor.DirectionThreadWize = true;
+PoolerMotor.KvalHold = 0x8;
+PoolerMotor.KvalRun = 0x35;
+PoolerMotor.KvalAcc = 0x7f;
+PoolerMotor.KvalDec = 0x27;
+PoolerMotor.OverCurrentThreshold = 7;
+PoolerMotor.StallThreshold = 0x1F;
+PoolerMotor.ThermalCompensationFactor = 0;
+PoolerMotor.LowSpeedOptimization = false;
+PoolerMotor.StSlp = 20;
+PoolerMotor.IntSpd = 0x1A13;
+PoolerMotor.FnSlpAcc = 0x50;
+PoolerMotor.FnSlpDec = 0x50;
+PoolerMotor.FsSpd = 0x27;
+
+HardwareMotor WinderMotor = new HardwareMotor();
+WinderMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoWinder;
+WinderMotor.MinFrequency = 0;
+WinderMotor.MaxFrequency = 100000;
+WinderMotor.SetMicroStep = 1;
+WinderMotor.MicroStep = 16;
+WinderMotor.MaxChangeSlope = 0x7ff;
+WinderMotor.HighLengthMicroSecond = 0;
+WinderMotor.SpeedMaster = false;
+WinderMotor.PulsePerRound = 200;
+WinderMotor.PulleyRadius = 0.8;
+WinderMotor.ConfigWord = 0x1CA0;
+WinderMotor.DirectionThreadWize = false;
+WinderMotor.KvalHold = 0x08;
+WinderMotor.KvalRun = 0x20;
+WinderMotor.KvalAcc = 0x20;
+WinderMotor.KvalDec = 0x3ff;
+WinderMotor.OverCurrentThreshold = 0xF;
+WinderMotor.StallThreshold = 0x7F;
+WinderMotor.ThermalCompensationFactor = 0;
+WinderMotor.LowSpeedOptimization = false;
+WinderMotor.StSlp = 0x7;
+WinderMotor.IntSpd = 0x22C5;
+WinderMotor.FnSlpAcc = 0x15;
+WinderMotor.FnSlpDec = 0x15;
+WinderMotor.FsSpd = 0x3ff;
+
+HardwareMotor ScrewMotor = new HardwareMotor();
+ScrewMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoScrew;
+ScrewMotor.MinFrequency = 0;
+ScrewMotor.MaxFrequency = 100000;
+ScrewMotor.SetMicroStep = 1;
+ScrewMotor.MicroStep = 8;
+ScrewMotor.MaxChangeSlope = 0x7FF;
+ScrewMotor.HighLengthMicroSecond = 0;
+ScrewMotor.SpeedMaster = false;
+ScrewMotor.PulsePerRound = 200;
+ScrewMotor.PulleyRadius = 1.68;
+ScrewMotor.ConfigWord = 0x1CA0;
+ScrewMotor.DirectionThreadWize = true;
+ScrewMotor.KvalHold = 0x1;
+ScrewMotor.KvalRun = 0x20;
+ScrewMotor.KvalAcc = 0x20;
+ScrewMotor.KvalDec = 0x27;
+ScrewMotor.OverCurrentThreshold = 0xF;
+ScrewMotor.StallThreshold = 0x7F;
+ScrewMotor.ThermalCompensationFactor = 0;
+ScrewMotor.LowSpeedOptimization = false;
+ScrewMotor.StSlp = 0x7;
+ScrewMotor.IntSpd = 0x22C5;
+ScrewMotor.FnSlpAcc = 0x15;
+ScrewMotor.FnSlpDec = 0x15;
+ScrewMotor.FsSpd = 0x27;
+
+
+HardwareMotor LeftRockerMotor = new HardwareMotor();
+LeftRockerMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoLloading;
+LeftRockerMotor.MinFrequency = 0;
+LeftRockerMotor.MaxFrequency = 1000000;
+LeftRockerMotor.SetMicroStep = 1;
+LeftRockerMotor.MicroStep = 4;
+LeftRockerMotor.MaxChangeSlope = 10000;
+LeftRockerMotor.HighLengthMicroSecond = 0;
+LeftRockerMotor.SpeedMaster = false;
+LeftRockerMotor.PulsePerRound = 200;
+LeftRockerMotor.PulleyRadius = 1.3;
+LeftRockerMotor.ConfigWord = 0xC80;
+LeftRockerMotor.DirectionThreadWize = false;
+LeftRockerMotor.KvalHold = 0x28;
+LeftRockerMotor.KvalRun = 0x5f;
+LeftRockerMotor.KvalAcc = 0x5f;
+LeftRockerMotor.KvalDec = 0x27;
+LeftRockerMotor.OverCurrentThreshold = 7;
+LeftRockerMotor.StallThreshold = 0x1F;
+LeftRockerMotor.ThermalCompensationFactor = 0;
+LeftRockerMotor.LowSpeedOptimization = false;
+LeftRockerMotor.StSlp = 6;
+LeftRockerMotor.IntSpd = 0x44B8;
+LeftRockerMotor.FnSlpAcc = 0x14;
+LeftRockerMotor.FnSlpDec = 0x14;
+LeftRockerMotor.FsSpd = 0x27;
+
+
+HardwareMotor RightRockerMotor = new HardwareMotor();
+RightRockerMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoRloading;
+RightRockerMotor.MinFrequency = 0;
+RightRockerMotor.MaxFrequency = 1000000;
+RightRockerMotor.SetMicroStep = 1;
+RightRockerMotor.MicroStep = 4;
+RightRockerMotor.MaxChangeSlope = 4095;
+RightRockerMotor.HighLengthMicroSecond = 0;
+RightRockerMotor.SpeedMaster = false;
+RightRockerMotor.PulsePerRound = 200;
+RightRockerMotor.PulleyRadius = 1.3;
+RightRockerMotor.ConfigWord = 0xC80;
+RightRockerMotor.DirectionThreadWize = true;
+RightRockerMotor.KvalHold = 0x28;
+RightRockerMotor.KvalRun = 0x5f;
+RightRockerMotor.KvalAcc = 0x5f;
+RightRockerMotor.KvalDec = 0x27;
+RightRockerMotor.OverCurrentThreshold = 7;
+RightRockerMotor.StallThreshold = 0x1F;
+RightRockerMotor.ThermalCompensationFactor = 0;
+RightRockerMotor.LowSpeedOptimization = false;
+RightRockerMotor.StSlp = 6;
+RightRockerMotor.IntSpd = 0x44B8;
+RightRockerMotor.FnSlpAcc = 0x14;
+RightRockerMotor.FnSlpDec = 0x14;
+RightRockerMotor.FsSpd = 0x27;
+
+HardwareMotor Dispenser4Motor = new HardwareMotor();
+Dispenser4Motor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoDispenser4;
+Dispenser4Motor.MinFrequency = 0;
+Dispenser4Motor.MaxFrequency = 100000;
+Dispenser4Motor.SetMicroStep = 1;
+Dispenser4Motor.MicroStep = 16;
+Dispenser4Motor.MaxChangeSlope = 0x7FF;
+Dispenser4Motor.HighLengthMicroSecond = 0;
+Dispenser4Motor.SpeedMaster = false;
+Dispenser4Motor.PulsePerRound = 400;
+Dispenser4Motor.PulleyRadius = 1.68;
+Dispenser4Motor.ConfigWord = 0x1CA0;
+Dispenser4Motor.DirectionThreadWize = true;
+Dispenser4Motor.KvalHold = 0x21;
+Dispenser4Motor.KvalRun = 0xc0;
+Dispenser4Motor.KvalAcc = 0x2e;
+Dispenser4Motor.KvalDec = 0x3ff;
+Dispenser4Motor.OverCurrentThreshold = 0xF;
+Dispenser4Motor.StallThreshold = 0x1F;
+Dispenser4Motor.ThermalCompensationFactor = 0;
+Dispenser4Motor.LowSpeedOptimization = false;
+Dispenser4Motor.StSlp = 0x9;
+Dispenser4Motor.IntSpd = 0x1AD2;
+Dispenser4Motor.FnSlpAcc = 0x26;
+Dispenser4Motor.FnSlpDec = 0x26;
+Dispenser4Motor.FsSpd = 0x3ff;
+
+HardwareMotor Dispenser7Motor = new HardwareMotor();
+Dispenser7Motor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoDispenser7;
+Dispenser7Motor.MinFrequency = 0;
+Dispenser7Motor.MaxFrequency = 100000;
+Dispenser7Motor.SetMicroStep = 1;
+Dispenser7Motor.MicroStep = 16;
+Dispenser7Motor.MaxChangeSlope = 0x7FF;
+Dispenser7Motor.HighLengthMicroSecond = 0;
+Dispenser7Motor.SpeedMaster = false;
+Dispenser7Motor.PulsePerRound = 400;
+Dispenser7Motor.PulleyRadius = 1.68;
+Dispenser7Motor.ConfigWord = 0x1CA0;
+Dispenser7Motor.DirectionThreadWize = true;
+Dispenser7Motor.KvalHold = 0x21;
+Dispenser7Motor.KvalRun = 0xc0;
+Dispenser7Motor.KvalAcc = 0x2e;
+Dispenser7Motor.KvalDec = 0x3ff;
+Dispenser7Motor.OverCurrentThreshold = 0xF;
+Dispenser7Motor.StallThreshold = 0x1F;
+Dispenser7Motor.ThermalCompensationFactor = 0;
+Dispenser7Motor.LowSpeedOptimization = false;
+Dispenser7Motor.StSlp = 0x9;
+Dispenser7Motor.IntSpd = 0x1AD2;
+Dispenser7Motor.FnSlpAcc = 0x26;
+Dispenser7Motor.FnSlpDec = 0x26;
+Dispenser7Motor.FsSpd = 0x3ff;
+
+HardwareMotor Dispenser8Motor = new HardwareMotor();
+Dispenser8Motor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoDispenser8;
+Dispenser8Motor.MinFrequency = 0;
+Dispenser8Motor.MaxFrequency = 100000;
+Dispenser8Motor.SetMicroStep = 1;
+Dispenser8Motor.MicroStep = 16;
+Dispenser8Motor.MaxChangeSlope = 0x7FF;
+Dispenser8Motor.HighLengthMicroSecond = 0;
+Dispenser8Motor.SpeedMaster = false;
+Dispenser8Motor.PulsePerRound = 400;
+Dispenser8Motor.PulleyRadius = 1.68;
+Dispenser8Motor.ConfigWord = 0x1CA0;
+Dispenser8Motor.DirectionThreadWize = true;
+Dispenser8Motor.KvalHold = 0x21;
+Dispenser8Motor.KvalRun = 0xc0;
+Dispenser8Motor.KvalAcc = 0x2e;
+Dispenser8Motor.KvalDec = 0x3ff;
+Dispenser8Motor.OverCurrentThreshold = 0xF;
+Dispenser8Motor.StallThreshold = 0x1F;
+Dispenser8Motor.ThermalCompensationFactor = 0;
+Dispenser8Motor.LowSpeedOptimization = false;
+Dispenser8Motor.StSlp = 0x9;
+Dispenser8Motor.IntSpd = 0x1AD2;
+Dispenser8Motor.FnSlpAcc = 0x26;
+Dispenser8Motor.FnSlpDec = 0x26;
+Dispenser8Motor.FsSpd = 0x3ff;
+
+HardwareMotor DryerLoadarm = new HardwareMotor();
+DryerLoadarm.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoDryerLoadarm;
+DryerLoadarm.MinFrequency = 0;
+DryerLoadarm.MaxFrequency = 1000000;
+DryerLoadarm.SetMicroStep = 1;
+DryerLoadarm.MicroStep = 1;
+DryerLoadarm.MaxChangeSlope = 10000;
+DryerLoadarm.HighLengthMicroSecond = 0;
+DryerLoadarm.SpeedMaster = false;
+DryerLoadarm.PulsePerRound = 200;
+DryerLoadarm.PulleyRadius = 1.25;
+DryerLoadarm.ConfigWord = 0x1C80;
+DryerLoadarm.DirectionThreadWize = false;
+DryerLoadarm.KvalHold = 0x35;
+DryerLoadarm.KvalRun = 0x7f;
+DryerLoadarm.KvalAcc = 0x7f;
+DryerLoadarm.KvalDec = 0x27;
+DryerLoadarm.OverCurrentThreshold = 7;
+DryerLoadarm.StallThreshold = 0x1F;
+DryerLoadarm.ThermalCompensationFactor = 0;
+DryerLoadarm.LowSpeedOptimization = false;
+DryerLoadarm.StSlp = 0x20;
+DryerLoadarm.IntSpd = 0x1A13;
+DryerLoadarm.FnSlpAcc = 0x50;
+DryerLoadarm.FnSlpDec = 0x50;
+DryerLoadarm.FsSpd = 0x27;
+
+HardwareWinder Winder = new HardwareWinder();
+Winder.HardwareWinderType = Tango.PMR.Hardware.HardwareWinderType.InternalWinder;
+Winder.MillimeterPerRotation = 20;
+
diff --git a/Software/Stubs Collection/stubs/addedfiles/PID_Configuration.cs b/Software/Stubs Collection/stubs/addedfiles/PID_Configuration.cs
new file mode 100644
index 000000000..984ed00e2
--- /dev/null
+++ b/Software/Stubs Collection/stubs/addedfiles/PID_Configuration.cs
@@ -0,0 +1,76 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Hardware;
+using Tango.PMR.Printing;
+using Tango.PMR.Stubs;
+using Tango.Stubs;
+
+HardwarePidControl FeederPidControl = new HardwarePidControl();
+FeederPidControl.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.MotorFeeder;
+FeederPidControl.OutputProportionalPowerLimit = 1.0;
+FeederPidControl.OutputProportionalBand = 5;
+FeederPidControl.IntegralTime = 5;
+FeederPidControl.DerivativeTime = 0;
+FeederPidControl.SensorCorrectionAdjustment = 0;
+FeederPidControl.SensorMinValue = 0;
+FeederPidControl.SensorMaxValue = 0;
+FeederPidControl.SetPointRampRateorSoftStartRamp = 0;
+FeederPidControl.SetPointControlOutputRate = 4;
+FeederPidControl.ControlOutputType = 0;
+FeederPidControl.SsrControlOutputType = 0;
+FeederPidControl.OutputOnOffHysteresisValue = 0;
+FeederPidControl.ProcessVariableSamplingRate = 1000;
+FeederPidControl.PvInputFilterFactorMode = 4;
+FeederPidControl.OutputProportionalCycleTime = 0;
+FeederPidControl.AcHeatersHalfCycleTime = 0;
+FeederPidControl.ProportionalGain = 11.0;
+
+
+HardwarePidControl PoolerPidControl = new HardwarePidControl();
+PoolerPidControl.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.MotorPooler;
+PoolerPidControl.OutputProportionalPowerLimit = 1.0;
+PoolerPidControl.OutputProportionalBand = 5;
+PoolerPidControl.IntegralTime = 5;
+PoolerPidControl.DerivativeTime = 0;
+PoolerPidControl.SensorCorrectionAdjustment = 0;
+PoolerPidControl.SensorMinValue = 0;
+PoolerPidControl.SensorMaxValue = 0;
+PoolerPidControl.SetPointRampRateorSoftStartRamp = 0;
+PoolerPidControl.SetPointControlOutputRate = 4;
+PoolerPidControl.ControlOutputType = 0;
+PoolerPidControl.SsrControlOutputType = 0;
+PoolerPidControl.OutputOnOffHysteresisValue = 0;
+PoolerPidControl.ProcessVariableSamplingRate = 1000;
+PoolerPidControl.PvInputFilterFactorMode = 4;
+PoolerPidControl.OutputProportionalCycleTime = 0;
+PoolerPidControl.AcHeatersHalfCycleTime = 0;
+PoolerPidControl.ProportionalGain = 11.0;
+
+
+HardwarePidControl WinderPidControl = new HardwarePidControl();
+WinderPidControl.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.MotorWinder;
+WinderPidControl.OutputProportionalPowerLimit = 1.0;
+WinderPidControl.OutputProportionalBand = 5;
+WinderPidControl.IntegralTime = 7;
+WinderPidControl.DerivativeTime = 0;
+WinderPidControl.SensorCorrectionAdjustment = 0;
+WinderPidControl.SensorMinValue = 0;
+WinderPidControl.SensorMaxValue = 0;
+WinderPidControl.SetPointRampRateorSoftStartRamp = 0;
+WinderPidControl.SetPointControlOutputRate = 4;
+WinderPidControl.ControlOutputType = 0;
+WinderPidControl.SsrControlOutputType = 0;
+WinderPidControl.OutputOnOffHysteresisValue = 0;
+WinderPidControl.ProcessVariableSamplingRate = 1000;
+WinderPidControl.PvInputFilterFactorMode = 4;
+WinderPidControl.OutputProportionalCycleTime = 0;
+WinderPidControl.AcHeatersHalfCycleTime = 0;
+WinderPidControl.ProportionalGain = 12.0;
+
diff --git a/Software/Stubs Collection/stubs/addedfiles/ThreadMotorsDefinition.cs b/Software/Stubs Collection/stubs/addedfiles/ThreadMotorsDefinition.cs
new file mode 100644
index 000000000..84a29bc3d
--- /dev/null
+++ b/Software/Stubs Collection/stubs/addedfiles/ThreadMotorsDefinition.cs
@@ -0,0 +1,314 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Hardware;
+using Tango.PMR.Printing;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+HardwarePidControl FeederPidControl = new HardwarePidControl();
+FeederPidControl.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.MotorFeeder;
+FeederPidControl.OutputProportionalPowerLimit = 1.0;
+FeederPidControl.OutputProportionalBand = 5;
+FeederPidControl.IntegralTime = 5;
+FeederPidControl.DerivativeTime = 0;
+FeederPidControl.SensorCorrectionAdjustment = 0;
+FeederPidControl.SensorMinValue = 0;
+FeederPidControl.SensorMaxValue = 0;
+FeederPidControl.SetPointRampRateorSoftStartRamp = 0;
+FeederPidControl.SetPointControlOutputRate = 4;
+FeederPidControl.ControlOutputType = 0;
+FeederPidControl.SsrControlOutputType = 0;
+FeederPidControl.OutputOnOffHysteresisValue = 0;
+FeederPidControl.ProcessVariableSamplingRate = 1000;
+FeederPidControl.PvInputFilterFactorMode = 4;
+FeederPidControl.OutputProportionalCycleTime = 0;
+FeederPidControl.AcHeatersHalfCycleTime = 0;
+FeederPidControl.ProportionalGain = 11.0;
+
+
+HardwarePidControl PoolerPidControl = new HardwarePidControl();
+PoolerPidControl.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.MotorPooler;
+PoolerPidControl.OutputProportionalPowerLimit = 1.0;
+PoolerPidControl.OutputProportionalBand = 5;
+PoolerPidControl.IntegralTime = 5;
+PoolerPidControl.DerivativeTime = 0;
+PoolerPidControl.SensorCorrectionAdjustment = 0;
+PoolerPidControl.SensorMinValue = 0;
+PoolerPidControl.SensorMaxValue = 0;
+PoolerPidControl.SetPointRampRateorSoftStartRamp = 0;
+PoolerPidControl.SetPointControlOutputRate = 4;
+PoolerPidControl.ControlOutputType = 0;
+PoolerPidControl.SsrControlOutputType = 0;
+PoolerPidControl.OutputOnOffHysteresisValue = 0;
+PoolerPidControl.ProcessVariableSamplingRate = 1000;
+PoolerPidControl.PvInputFilterFactorMode = 4;
+PoolerPidControl.OutputProportionalCycleTime = 0;
+PoolerPidControl.AcHeatersHalfCycleTime = 0;
+PoolerPidControl.ProportionalGain = 11.0;
+
+
+HardwarePidControl WinderPidControl = new HardwarePidControl();
+WinderPidControl.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.MotorWinder;
+WinderPidControl.OutputProportionalPowerLimit = 1.0;
+WinderPidControl.OutputProportionalBand = 5;
+WinderPidControl.IntegralTime = 5;
+WinderPidControl.DerivativeTime = 0;
+WinderPidControl.SensorCorrectionAdjustment = 0;
+WinderPidControl.SensorMinValue = 0;
+WinderPidControl.SensorMaxValue = 0;
+WinderPidControl.SetPointRampRateorSoftStartRamp = 0;
+WinderPidControl.SetPointControlOutputRate = 4;
+WinderPidControl.ControlOutputType = 0;
+WinderPidControl.SsrControlOutputType = 0;
+WinderPidControl.OutputOnOffHysteresisValue = 0;
+WinderPidControl.ProcessVariableSamplingRate = 1000;
+WinderPidControl.PvInputFilterFactorMode = 4;
+WinderPidControl.OutputProportionalCycleTime = 0;
+WinderPidControl.AcHeatersHalfCycleTime = 0;
+WinderPidControl.ProportionalGain = 11.0;
+
+
+HardwareDancer FeederDancer = new HardwareDancer();
+FeederDancer.HardwareDancerType = Tango.PMR.Hardware.HardwareDancerType.RightDancer;
+FeederDancer.Gradual = false;
+FeederDancer.K = 0;
+FeederDancer.X = 0;
+FeederDancer.PulsePerMmSpring = 0;
+FeederDancer.MaximalMovementMm = 15;
+FeederDancer.ZeroPoint = 14170;
+FeederDancer.ResolutionBits = 14;
+FeederDancer.ArmLength = 126;
+
+HardwareDancer PoolerDancer = new HardwareDancer();
+PoolerDancer.HardwareDancerType = Tango.PMR.Hardware.HardwareDancerType.MiddleDancer;
+PoolerDancer.Gradual = false;
+PoolerDancer.K = 0;
+PoolerDancer.X = 0;
+PoolerDancer.PulsePerMmSpring = 0;
+PoolerDancer.MaximalMovementMm = 15;
+PoolerDancer.ZeroPoint = 13347;
+PoolerDancer.ResolutionBits = 14;
+PoolerDancer.ArmLength = 126;
+
+HardwareDancer WinderDancer = new HardwareDancer();
+WinderDancer.HardwareDancerType = Tango.PMR.Hardware.HardwareDancerType.LeftDancer;
+WinderDancer.Gradual = false;
+WinderDancer.K = 0;
+WinderDancer.X = 0;
+WinderDancer.PulsePerMmSpring = 0;
+WinderDancer.MaximalMovementMm = 15;
+WinderDancer.ZeroPoint = 11320;
+WinderDancer.ResolutionBits = 14;
+WinderDancer.ArmLength = 126;
+
+HardwareMotor FeederMotor = new HardwareMotor();
+FeederMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoRdriving;
+FeederMotor.MinFrequency = 0;
+FeederMotor.MaxFrequency = 1000000;
+FeederMotor.SetMicroStep = 1;
+FeederMotor.MicroStep = 1;
+FeederMotor.MaxChangeSlope = 10000;
+FeederMotor.HighLengthMicroSecond = 0;
+FeederMotor.SpeedMaster = false;
+FeederMotor.PulsePerRound = 200;
+FeederMotor.PulleyRadius = 1.25;
+FeederMotor.ConfigWord = 0x1C80;
+FeederMotor.DirectionThreadWize = true;
+FeederMotor.KvalHold = 0x35;
+FeederMotor.KvalRun = 0x7f;
+FeederMotor.KvalAcc = 0x7f;
+FeederMotor.KvalDec = 0x7f;
+FeederMotor.OverCurrentThreshold = 7;
+FeederMotor.StallThreshold = 0x1F;
+FeederMotor.ThermalCompensationFactor = 0;
+FeederMotor.LowSpeedOptimization = false;
+FeederMotor.StSlp = 0x20;
+FeederMotor.IntSpd = 0x1A13;
+FeederMotor.FnSlpAcc = 0x50;
+FeederMotor.FnSlpDec = 0x50;
+
+HardwareMotor DryerMotor = new HardwareMotor();
+DryerMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoDryerDriving;
+DryerMotor.MinFrequency = 0;
+DryerMotor.MaxFrequency = 1000000;
+DryerMotor.SetMicroStep = 1;
+DryerMotor.MicroStep = 1;
+DryerMotor.MaxChangeSlope = 1000;
+DryerMotor.HighLengthMicroSecond = 0;
+DryerMotor.SpeedMaster = true;
+DryerMotor.PulsePerRound = 200;
+DryerMotor.PulleyRadius = 1.05;
+DryerMotor.ConfigWord = 0x1c80;
+DryerMotor.DirectionThreadWize = false;
+DryerMotor.KvalHold = 0x35;
+DryerMotor.KvalRun = 0x7f;
+DryerMotor.KvalAcc = 0x7f;
+DryerMotor.KvalDec = 0x7f;
+DryerMotor.OverCurrentThreshold = 7;
+DryerMotor.StallThreshold = 0x1F;
+DryerMotor.ThermalCompensationFactor = 0;
+DryerMotor.LowSpeedOptimization = false;
+DryerMotor.StSlp = 0x20;
+DryerMotor.IntSpd = 0x1A13;
+DryerMotor.FnSlpAcc = 0x50;
+DryerMotor.FnSlpDec = 0x50;
+
+HardwareMotor PoolerMotor = new HardwareMotor();
+PoolerMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoLdriving;
+PoolerMotor.MinFrequency = 0;
+PoolerMotor.MaxFrequency = 1000000;
+PoolerMotor.SetMicroStep = 1;
+PoolerMotor.MicroStep = 8;
+PoolerMotor.MaxChangeSlope = 10000;
+PoolerMotor.HighLengthMicroSecond = 0;
+PoolerMotor.SpeedMaster = false;
+PoolerMotor.PulsePerRound = 200;
+PoolerMotor.PulleyRadius = 1.25;
+PoolerMotor.ConfigWord = 0x1C80;
+PoolerMotor.DirectionThreadWize = true;
+PoolerMotor.KvalHold = 0x35;
+PoolerMotor.KvalRun = 0x7f;
+PoolerMotor.KvalAcc = 0x7f;
+PoolerMotor.KvalDec = 0x7f;
+PoolerMotor.OverCurrentThreshold = 7;
+PoolerMotor.StallThreshold = 0x1F;
+PoolerMotor.ThermalCompensationFactor = 0;
+PoolerMotor.LowSpeedOptimization = false;
+PoolerMotor.StSlp = 20;
+PoolerMotor.IntSpd = 0x1A13;
+PoolerMotor.FnSlpAcc = 0x50;
+PoolerMotor.FnSlpDec = 0x50;
+
+HardwareMotor WinderMotor = new HardwareMotor();
+WinderMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoWinder;
+WinderMotor.MinFrequency = 0;
+WinderMotor.MaxFrequency = 1000000;
+WinderMotor.SetMicroStep = 1;
+WinderMotor.MicroStep = 16;
+WinderMotor.MaxChangeSlope = 10000;
+WinderMotor.HighLengthMicroSecond = 0;
+WinderMotor.SpeedMaster = false;
+WinderMotor.PulsePerRound = 200;
+WinderMotor.PulleyRadius = 1.68;
+WinderMotor.ConfigWord = 0x1c80;
+WinderMotor.DirectionThreadWize = false;
+WinderMotor.KvalHold = 0x0F;
+WinderMotor.KvalRun = 0x15;
+WinderMotor.KvalAcc = 0x15;
+WinderMotor.KvalDec = 0x15;
+WinderMotor.OverCurrentThreshold = 7;
+WinderMotor.StallThreshold = 0x1F;
+WinderMotor.ThermalCompensationFactor = 0;
+WinderMotor.LowSpeedOptimization = false;
+WinderMotor.StSlp = 0x18;
+WinderMotor.IntSpd = 0x22C5;
+WinderMotor.FnSlpAcc = 0x22;
+WinderMotor.FnSlpDec = 0x22;
+
+HardwareMotor ScrewMotor = new HardwareMotor();
+ScrewMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoScrew;
+ScrewMotor.MinFrequency = 0;
+ScrewMotor.MaxFrequency = 1000000;
+ScrewMotor.SetMicroStep = 1;
+ScrewMotor.MicroStep = 8;
+ScrewMotor.MaxChangeSlope = 100;
+ScrewMotor.HighLengthMicroSecond = 0;
+ScrewMotor.SpeedMaster = false;
+ScrewMotor.PulsePerRound = 200;
+ScrewMotor.PulleyRadius = 1.25;
+ScrewMotor.ConfigWord = 0x1C80;
+ScrewMotor.DirectionThreadWize = false;
+ScrewMotor.KvalHold = 0x0F;
+ScrewMotor.KvalRun = 0x15;
+ScrewMotor.KvalAcc = 0x15;
+ScrewMotor.KvalDec = 0x15;
+ScrewMotor.OverCurrentThreshold = 7;
+ScrewMotor.StallThreshold = 0x1F;
+ScrewMotor.ThermalCompensationFactor = 0;
+ScrewMotor.LowSpeedOptimization = false;
+ScrewMotor.StSlp = 0x18;
+ScrewMotor.IntSpd = 0x22C5;
+ScrewMotor.FnSlpAcc = 0x22;
+ScrewMotor.FnSlpDec = 0x22;
+
+HardwareMotor LeftRockerMotor = new HardwareMotor();
+LeftRockerMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoLloading;
+LeftRockerMotor.MinFrequency = 0;
+LeftRockerMotor.MaxFrequency = 1000000;
+LeftRockerMotor.SetMicroStep = 1;
+LeftRockerMotor.MicroStep = 4;
+LeftRockerMotor.MaxChangeSlope = 10000;
+LeftRockerMotor.HighLengthMicroSecond = 0;
+LeftRockerMotor.SpeedMaster = false;
+LeftRockerMotor.PulsePerRound = 200;
+LeftRockerMotor.PulleyRadius = 1.3;
+LeftRockerMotor.ConfigWord = 0xC80;
+LeftRockerMotor.DirectionThreadWize = false;
+LeftRockerMotor.KvalHold = 0x28;
+LeftRockerMotor.KvalRun = 0x5f;
+LeftRockerMotor.KvalAcc = 0x5f;
+LeftRockerMotor.KvalDec = 0x5f;
+LeftRockerMotor.OverCurrentThreshold = 7;
+LeftRockerMotor.StallThreshold = 0x1F;
+LeftRockerMotor.ThermalCompensationFactor = 0;
+LeftRockerMotor.LowSpeedOptimization = false;
+LeftRockerMotor.StSlp = 6;
+LeftRockerMotor.IntSpd = 0x44B8;
+LeftRockerMotor.FnSlpAcc = 0x14;
+LeftRockerMotor.FnSlpDec = 0x14;
+
+
+HardwareMotor RightRockerMotor = new HardwareMotor();
+RightRockerMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoRloading;
+RightRockerMotor.MinFrequency = 0;
+RightRockerMotor.MaxFrequency = 1000000;
+RightRockerMotor.SetMicroStep = 1;
+RightRockerMotor.MicroStep = 4;
+RightRockerMotor.MaxChangeSlope = 10000;
+RightRockerMotor.HighLengthMicroSecond = 0;
+RightRockerMotor.SpeedMaster = false;
+RightRockerMotor.PulsePerRound = 200;
+RightRockerMotor.PulleyRadius = 1.3;
+RightRockerMotor.ConfigWord = 0xC80;
+RightRockerMotor.DirectionThreadWize = true;
+RightRockerMotor.KvalHold = 0x28;
+RightRockerMotor.KvalRun = 0x5f;
+RightRockerMotor.KvalAcc = 0x5f;
+RightRockerMotor.KvalDec = 0x5f;
+RightRockerMotor.OverCurrentThreshold = 7;
+RightRockerMotor.StallThreshold = 0x1F;
+RightRockerMotor.ThermalCompensationFactor = 0;
+RightRockerMotor.LowSpeedOptimization = false;
+RightRockerMotor.StSlp = 6;
+RightRockerMotor.IntSpd = 0x44B8;
+RightRockerMotor.FnSlpAcc = 0x14;
+RightRockerMotor.FnSlpDec = 0x14;
+
+
+
+HardwareWinder Winder = new HardwareWinder();
+Winder.HardwareWinderType = Tango.PMR.Hardware.HardwareWinderType.InternalWinder;
+Winder.MillimeterPerRotation = 20;
+
+//hardwareConfiguration.Motors.Add(FeederMotor);
+//hardwareConfiguration.Motors.Add(WinderMotor);
+//hardwareConfiguration.Motors.Add(DryerMotor);
+//hardwareConfiguration.Motors.Add(PoolerMotor);
+//hardwareConfiguration.Motors.Add(ScrewMotor);
+//hardwareConfiguration.Motors.Add(LeftRockerMotor);
+//hardwareConfiguration.Motors.Add(RightRockerMotor);
+
+//hardwareConfiguration.PidControls.Add(FeederPidControl);
+//hardwareConfiguration.PidControls.Add(PoolerPidControl);
+//hardwareConfiguration.PidControls.Add(WinderPidControl);
+
+//hardwareConfiguration.Dancers.Add(FeederDancer);
+//hardwareConfiguration.Dancers.Add(PoolerDancer);
+//hardwareConfiguration.Dancers.Add(WinderDancer);
diff --git a/Software/Stubs Collection/stubs/addedfiles/ThreadMotorsDefinition1.cs b/Software/Stubs Collection/stubs/addedfiles/ThreadMotorsDefinition1.cs
new file mode 100644
index 000000000..22e662930
--- /dev/null
+++ b/Software/Stubs Collection/stubs/addedfiles/ThreadMotorsDefinition1.cs
@@ -0,0 +1,316 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Hardware;
+using Tango.PMR.Printing;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+HardwarePidControl FeederPidControl = new HardwarePidControl();
+FeederPidControl.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.MotorFeeder;
+FeederPidControl.OutputProportionalPowerLimit = 1.0;
+FeederPidControl.OutputProportionalBand = 5;
+FeederPidControl.IntegralTime = 5;
+FeederPidControl.DerivativeTime = 0;
+FeederPidControl.SensorCorrectionAdjustment = 0;
+FeederPidControl.SensorMinValue = 0;
+FeederPidControl.SensorMaxValue = 0;
+FeederPidControl.SetPointRampRateorSoftStartRamp = 0;
+FeederPidControl.SetPointControlOutputRate = 4;
+FeederPidControl.ControlOutputType = 0;
+FeederPidControl.SsrControlOutputType = 0;
+FeederPidControl.OutputOnOffHysteresisValue = 0;
+FeederPidControl.ProcessVariableSamplingRate = 1000;
+FeederPidControl.PvInputFilterFactorMode = 4;
+FeederPidControl.OutputProportionalCycleTime = 0;
+FeederPidControl.AcHeatersHalfCycleTime = 0;
+FeederPidControl.ProportionalGain = 11.0;
+
+
+HardwarePidControl PoolerPidControl = new HardwarePidControl();
+PoolerPidControl.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.MotorPooler;
+PoolerPidControl.OutputProportionalPowerLimit = 1.0;
+PoolerPidControl.OutputProportionalBand = 5;
+PoolerPidControl.IntegralTime = 5;
+PoolerPidControl.DerivativeTime = 0;
+PoolerPidControl.SensorCorrectionAdjustment = 0;
+PoolerPidControl.SensorMinValue = 0;
+PoolerPidControl.SensorMaxValue = 0;
+PoolerPidControl.SetPointRampRateorSoftStartRamp = 0;
+PoolerPidControl.SetPointControlOutputRate = 4;
+PoolerPidControl.ControlOutputType = 0;
+PoolerPidControl.SsrControlOutputType = 0;
+PoolerPidControl.OutputOnOffHysteresisValue = 0;
+PoolerPidControl.ProcessVariableSamplingRate = 1000;
+PoolerPidControl.PvInputFilterFactorMode = 4;
+PoolerPidControl.OutputProportionalCycleTime = 0;
+PoolerPidControl.AcHeatersHalfCycleTime = 0;
+PoolerPidControl.ProportionalGain = 11.0;
+
+
+HardwarePidControl WinderPidControl = new HardwarePidControl();
+WinderPidControl.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.MotorWinder;
+WinderPidControl.OutputProportionalPowerLimit = 1.0;
+WinderPidControl.OutputProportionalBand = 5;
+WinderPidControl.IntegralTime = 7;
+WinderPidControl.DerivativeTime = 0;
+WinderPidControl.SensorCorrectionAdjustment = 0;
+WinderPidControl.SensorMinValue = 0;
+WinderPidControl.SensorMaxValue = 0;
+WinderPidControl.SetPointRampRateorSoftStartRamp = 0;
+WinderPidControl.SetPointControlOutputRate = 4;
+WinderPidControl.ControlOutputType = 0;
+WinderPidControl.SsrControlOutputType = 0;
+WinderPidControl.OutputOnOffHysteresisValue = 0;
+WinderPidControl.ProcessVariableSamplingRate = 1000;
+WinderPidControl.PvInputFilterFactorMode = 4;
+WinderPidControl.OutputProportionalCycleTime = 0;
+WinderPidControl.AcHeatersHalfCycleTime = 0;
+WinderPidControl.ProportionalGain = 12.0;
+
+
+HardwareDancer FeederDancer = new HardwareDancer();
+FeederDancer.HardwareDancerType = Tango.PMR.Hardware.HardwareDancerType.RightDancer;
+FeederDancer.Gradual = false;
+FeederDancer.K = 0;
+FeederDancer.X = 0;
+FeederDancer.PulsePerMmSpring = 0;
+FeederDancer.MaximalMovementMm = 15;
+FeederDancer.ZeroPoint = 14170;
+FeederDancer.ResolutionBits = 14;
+FeederDancer.ArmLength = 126;
+
+HardwareDancer PoolerDancer = new HardwareDancer();
+PoolerDancer.HardwareDancerType = Tango.PMR.Hardware.HardwareDancerType.MiddleDancer;
+PoolerDancer.Gradual = false;
+PoolerDancer.K = 0;
+PoolerDancer.X = 0;
+PoolerDancer.PulsePerMmSpring = 0;
+PoolerDancer.MaximalMovementMm = 15;
+PoolerDancer.ZeroPoint = 13347;
+PoolerDancer.ResolutionBits = 14;
+PoolerDancer.ArmLength = 126;
+
+HardwareDancer WinderDancer = new HardwareDancer();
+WinderDancer.HardwareDancerType = Tango.PMR.Hardware.HardwareDancerType.LeftDancer;
+WinderDancer.Gradual = false;
+WinderDancer.K = 0;
+WinderDancer.X = 0;
+WinderDancer.PulsePerMmSpring = 0;
+WinderDancer.MaximalMovementMm = 15;
+WinderDancer.ZeroPoint = 10900;
+WinderDancer.ResolutionBits = 14;
+WinderDancer.ArmLength = 126;
+
+HardwareMotor FeederMotor = new HardwareMotor();
+FeederMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoRdriving;
+FeederMotor.MinFrequency = 0;
+FeederMotor.MaxFrequency = 1000000;
+FeederMotor.SetMicroStep = 1;
+FeederMotor.MicroStep = 1;
+FeederMotor.MaxChangeSlope = 10000;
+FeederMotor.HighLengthMicroSecond = 0;
+FeederMotor.SpeedMaster = false;
+FeederMotor.PulsePerRound = 200;
+FeederMotor.PulleyRadius = 1.25;
+FeederMotor.ConfigWord = 0x1C80;
+FeederMotor.DirectionThreadWize = true;
+FeederMotor.KvalHold = 0x35;
+FeederMotor.KvalRun = 0x7f;
+FeederMotor.KvalAcc = 0x7f;
+FeederMotor.KvalDec = 0x7f;
+FeederMotor.OverCurrentThreshold = 7;
+FeederMotor.StallThreshold = 0x1F;
+FeederMotor.ThermalCompensationFactor = 0;
+FeederMotor.LowSpeedOptimization = false;
+FeederMotor.StSlp = 0x20;
+FeederMotor.IntSpd = 0x1A13;
+FeederMotor.FnSlpAcc = 0x50;
+FeederMotor.FnSlpDec = 0x50;
+
+HardwareMotor DryerMotor = new HardwareMotor();
+DryerMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoDryerDriving;
+DryerMotor.MinFrequency = 0;
+DryerMotor.MaxFrequency = 1000000;
+DryerMotor.SetMicroStep = 1;
+DryerMotor.MicroStep = 1;
+DryerMotor.MaxChangeSlope = 1000;
+DryerMotor.HighLengthMicroSecond = 0;
+DryerMotor.SpeedMaster = true;
+DryerMotor.PulsePerRound = 200;
+DryerMotor.PulleyRadius = 1.05;
+DryerMotor.ConfigWord = 0x1c80;
+DryerMotor.DirectionThreadWize = false;
+DryerMotor.KvalHold = 0x35;
+DryerMotor.KvalRun = 0x7f;
+DryerMotor.KvalAcc = 0x7f;
+DryerMotor.KvalDec = 0x7f;
+DryerMotor.OverCurrentThreshold = 7;
+DryerMotor.StallThreshold = 0x1F;
+DryerMotor.ThermalCompensationFactor = 0;
+DryerMotor.LowSpeedOptimization = false;
+DryerMotor.StSlp = 0x20;
+DryerMotor.IntSpd = 0x1A13;
+DryerMotor.FnSlpAcc = 0x50;
+DryerMotor.FnSlpDec = 0x50;
+
+HardwareMotor PoolerMotor = new HardwareMotor();
+PoolerMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoLdriving;
+PoolerMotor.MinFrequency = 0;
+PoolerMotor.MaxFrequency = 1000000;
+PoolerMotor.SetMicroStep = 1;
+PoolerMotor.MicroStep = 8;
+PoolerMotor.MaxChangeSlope = 10000;
+PoolerMotor.HighLengthMicroSecond = 0;
+PoolerMotor.SpeedMaster = false;
+PoolerMotor.PulsePerRound = 200;
+PoolerMotor.PulleyRadius = 1.25;
+PoolerMotor.ConfigWord = 0x1C80;
+PoolerMotor.DirectionThreadWize = true;
+PoolerMotor.KvalHold = 0x35;
+PoolerMotor.KvalRun = 0x7f;
+PoolerMotor.KvalAcc = 0x7f;
+PoolerMotor.KvalDec = 0x7f;
+PoolerMotor.OverCurrentThreshold = 7;
+PoolerMotor.StallThreshold = 0x1F;
+PoolerMotor.ThermalCompensationFactor = 0;
+PoolerMotor.LowSpeedOptimization = false;
+PoolerMotor.StSlp = 20;
+PoolerMotor.IntSpd = 0x1A13;
+PoolerMotor.FnSlpAcc = 0x50;
+PoolerMotor.FnSlpDec = 0x50;
+
+HardwareMotor WinderMotor = new HardwareMotor();
+WinderMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoWinder;
+WinderMotor.MinFrequency = 0;
+WinderMotor.MaxFrequency = 1000000;
+WinderMotor.SetMicroStep = 1;
+WinderMotor.MicroStep = 16;
+WinderMotor.MaxChangeSlope = 10000;
+WinderMotor.HighLengthMicroSecond = 0;
+WinderMotor.SpeedMaster = false;
+WinderMotor.PulsePerRound = 200;
+WinderMotor.PulleyRadius = 1.68;
+WinderMotor.ConfigWord = 0x1c80;
+WinderMotor.DirectionThreadWize = false;
+WinderMotor.KvalHold = 0x0F;
+WinderMotor.KvalRun = 0x15;
+WinderMotor.KvalAcc = 0x15;
+WinderMotor.KvalDec = 0x15;
+WinderMotor.OverCurrentThreshold = 7;
+WinderMotor.StallThreshold = 0x1F;
+WinderMotor.ThermalCompensationFactor = 0;
+WinderMotor.LowSpeedOptimization = false;
+WinderMotor.StSlp = 0x18;
+WinderMotor.IntSpd = 0x22C5;
+WinderMotor.FnSlpAcc = 0x22;
+WinderMotor.FnSlpDec = 0x22;
+
+HardwareMotor ScrewMotor = new HardwareMotor();
+ScrewMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoScrew;
+ScrewMotor.MinFrequency = 0;
+ScrewMotor.MaxFrequency = 1000000;
+ScrewMotor.SetMicroStep = 1;
+ScrewMotor.MicroStep = 8;
+ScrewMotor.MaxChangeSlope = 100;
+ScrewMotor.HighLengthMicroSecond = 0;
+ScrewMotor.SpeedMaster = false;
+ScrewMotor.PulsePerRound = 200;
+ScrewMotor.PulleyRadius = 1.25;
+ScrewMotor.ConfigWord = 0x1C80;
+ScrewMotor.DirectionThreadWize = false;
+ScrewMotor.KvalHold = 0x0F;
+ScrewMotor.KvalRun = 0x15;
+ScrewMotor.KvalAcc = 0x15;
+ScrewMotor.KvalDec = 0x15;
+ScrewMotor.OverCurrentThreshold = 7;
+ScrewMotor.StallThreshold = 0x1F;
+ScrewMotor.ThermalCompensationFactor = 0;
+ScrewMotor.LowSpeedOptimization = false;
+ScrewMotor.StSlp = 0x18;
+ScrewMotor.IntSpd = 0x22C5;
+ScrewMotor.FnSlpAcc = 0x22;
+ScrewMotor.FnSlpDec = 0x22;
+
+HardwareMotor LeftRockerMotor = new HardwareMotor();
+LeftRockerMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoLloading;
+LeftRockerMotor.MinFrequency = 20;
+LeftRockerMotor.LowSpeedOptimization = true;
+LeftRockerMotor.MaxFrequency = 1000000;
+LeftRockerMotor.SetMicroStep = 1;
+LeftRockerMotor.MicroStep = 4;
+LeftRockerMotor.MaxChangeSlope = 10000;
+LeftRockerMotor.HighLengthMicroSecond = 0;
+LeftRockerMotor.SpeedMaster = false;
+LeftRockerMotor.PulsePerRound = 200;
+LeftRockerMotor.PulleyRadius = 1.3;
+LeftRockerMotor.ConfigWord = 0xC80;
+LeftRockerMotor.DirectionThreadWize = false;
+LeftRockerMotor.KvalHold = 0x28;
+LeftRockerMotor.KvalRun = 0x5f;
+LeftRockerMotor.KvalAcc = 0x5f;
+LeftRockerMotor.KvalDec = 0x5f;
+LeftRockerMotor.OverCurrentThreshold = 7;
+LeftRockerMotor.StallThreshold = 0x1F;
+LeftRockerMotor.ThermalCompensationFactor = 0;
+LeftRockerMotor.LowSpeedOptimization = false;
+LeftRockerMotor.StSlp = 6;
+LeftRockerMotor.IntSpd = 0x44B8;
+LeftRockerMotor.FnSlpAcc = 0x14;
+LeftRockerMotor.FnSlpDec = 0x14;
+
+
+HardwareMotor RightRockerMotor = new HardwareMotor();
+RightRockerMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoRloading;
+RightRockerMotor.MinFrequency = 20;
+RightRockerMotor.LowSpeedOptimization = true;
+RightRockerMotor.MaxFrequency = 1000000;
+RightRockerMotor.SetMicroStep = 1;
+RightRockerMotor.MicroStep = 4;
+RightRockerMotor.MaxChangeSlope = 10000;
+RightRockerMotor.HighLengthMicroSecond = 0;
+RightRockerMotor.SpeedMaster = false;
+RightRockerMotor.PulsePerRound = 200;
+RightRockerMotor.PulleyRadius = 1.3;
+RightRockerMotor.ConfigWord = 0xC80;
+RightRockerMotor.DirectionThreadWize = true;
+RightRockerMotor.KvalHold = 0x28;
+RightRockerMotor.KvalRun = 0x5f;
+RightRockerMotor.KvalAcc = 0x5f;
+RightRockerMotor.KvalDec = 0x5f;
+RightRockerMotor.OverCurrentThreshold = 7;
+RightRockerMotor.StallThreshold = 0x1F;
+RightRockerMotor.ThermalCompensationFactor = 0;
+RightRockerMotor.LowSpeedOptimization = false;
+RightRockerMotor.StSlp = 6;
+RightRockerMotor.IntSpd = 0x44B8;
+RightRockerMotor.FnSlpAcc = 0x14;
+RightRockerMotor.FnSlpDec = 0x14;
+
+
+
+HardwareWinder Winder = new HardwareWinder();
+Winder.HardwareWinderType = Tango.PMR.Hardware.HardwareWinderType.InternalWinder;
+Winder.MillimeterPerRotation = 20;
+
+//hardwareConfiguration.Motors.Add(FeederMotor);
+//hardwareConfiguration.Motors.Add(WinderMotor);
+//hardwareConfiguration.Motors.Add(DryerMotor);
+//hardwareConfiguration.Motors.Add(PoolerMotor);
+//hardwareConfiguration.Motors.Add(ScrewMotor);
+//hardwareConfiguration.Motors.Add(LeftRockerMotor);
+//hardwareConfiguration.Motors.Add(RightRockerMotor);
+
+//hardwareConfiguration.PidControls.Add(FeederPidControl);
+//hardwareConfiguration.PidControls.Add(PoolerPidControl);
+//hardwareConfiguration.PidControls.Add(WinderPidControl);
+
+//hardwareConfiguration.Dancers.Add(FeederDancer);
+//hardwareConfiguration.Dancers.Add(PoolerDancer);
+//hardwareConfiguration.Dancers.Add(WinderDancer);
diff --git a/Software/Stubs Collection/stubs/addedfiles/ThreadMotorsDefinition2.cs b/Software/Stubs Collection/stubs/addedfiles/ThreadMotorsDefinition2.cs
new file mode 100644
index 000000000..a13aa92cf
--- /dev/null
+++ b/Software/Stubs Collection/stubs/addedfiles/ThreadMotorsDefinition2.cs
@@ -0,0 +1,316 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Hardware;
+using Tango.PMR.Printing;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+HardwarePidControl FeederPidControl = new HardwarePidControl();
+FeederPidControl.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.MotorFeeder;
+FeederPidControl.OutputProportionalPowerLimit = 1.0;
+FeederPidControl.OutputProportionalBand = 5;
+FeederPidControl.IntegralTime = 5;
+FeederPidControl.DerivativeTime = 0;
+FeederPidControl.SensorCorrectionAdjustment = 0;
+FeederPidControl.SensorMinValue = 0;
+FeederPidControl.SensorMaxValue = 0;
+FeederPidControl.SetPointRampRateorSoftStartRamp = 0;
+FeederPidControl.SetPointControlOutputRate = 4;
+FeederPidControl.ControlOutputType = 0;
+FeederPidControl.SsrControlOutputType = 0;
+FeederPidControl.OutputOnOffHysteresisValue = 0;
+FeederPidControl.ProcessVariableSamplingRate = 1000;
+FeederPidControl.PvInputFilterFactorMode = 4;
+FeederPidControl.OutputProportionalCycleTime = 0;
+FeederPidControl.AcHeatersHalfCycleTime = 0;
+FeederPidControl.ProportionalGain = 11.0;
+
+
+HardwarePidControl PoolerPidControl = new HardwarePidControl();
+PoolerPidControl.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.MotorPooler;
+PoolerPidControl.OutputProportionalPowerLimit = 1.0;
+PoolerPidControl.OutputProportionalBand = 5;
+PoolerPidControl.IntegralTime = 5;
+PoolerPidControl.DerivativeTime = 0;
+PoolerPidControl.SensorCorrectionAdjustment = 0;
+PoolerPidControl.SensorMinValue = 0;
+PoolerPidControl.SensorMaxValue = 0;
+PoolerPidControl.SetPointRampRateorSoftStartRamp = 0;
+PoolerPidControl.SetPointControlOutputRate = 4;
+PoolerPidControl.ControlOutputType = 0;
+PoolerPidControl.SsrControlOutputType = 0;
+PoolerPidControl.OutputOnOffHysteresisValue = 0;
+PoolerPidControl.ProcessVariableSamplingRate = 1000;
+PoolerPidControl.PvInputFilterFactorMode = 4;
+PoolerPidControl.OutputProportionalCycleTime = 0;
+PoolerPidControl.AcHeatersHalfCycleTime = 0;
+PoolerPidControl.ProportionalGain = 11.0;
+
+
+HardwarePidControl WinderPidControl = new HardwarePidControl();
+WinderPidControl.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.MotorWinder;
+WinderPidControl.OutputProportionalPowerLimit = 1.0;
+WinderPidControl.OutputProportionalBand = 5;
+WinderPidControl.IntegralTime = 7;
+WinderPidControl.DerivativeTime = 0;
+WinderPidControl.SensorCorrectionAdjustment = 0;
+WinderPidControl.SensorMinValue = 0;
+WinderPidControl.SensorMaxValue = 0;
+WinderPidControl.SetPointRampRateorSoftStartRamp = 0;
+WinderPidControl.SetPointControlOutputRate = 4;
+WinderPidControl.ControlOutputType = 0;
+WinderPidControl.SsrControlOutputType = 0;
+WinderPidControl.OutputOnOffHysteresisValue = 0;
+WinderPidControl.ProcessVariableSamplingRate = 1000;
+WinderPidControl.PvInputFilterFactorMode = 4;
+WinderPidControl.OutputProportionalCycleTime = 0;
+WinderPidControl.AcHeatersHalfCycleTime = 0;
+WinderPidControl.ProportionalGain = 12.0;
+
+
+HardwareDancer FeederDancer = new HardwareDancer();
+FeederDancer.HardwareDancerType = Tango.PMR.Hardware.HardwareDancerType.RightDancer;
+FeederDancer.Gradual = false;
+FeederDancer.K = 0;
+FeederDancer.X = 0;
+FeederDancer.PulsePerMmSpring = 0;
+FeederDancer.MaximalMovementMm = 15;
+FeederDancer.ZeroPoint = 14170;
+FeederDancer.ResolutionBits = 14;
+FeederDancer.ArmLength = 126;
+
+HardwareDancer PoolerDancer = new HardwareDancer();
+PoolerDancer.HardwareDancerType = Tango.PMR.Hardware.HardwareDancerType.MiddleDancer;
+PoolerDancer.Gradual = false;
+PoolerDancer.K = 0;
+PoolerDancer.X = 0;
+PoolerDancer.PulsePerMmSpring = 0;
+PoolerDancer.MaximalMovementMm = 15;
+PoolerDancer.ZeroPoint = 13347;
+PoolerDancer.ResolutionBits = 14;
+PoolerDancer.ArmLength = 126;
+
+HardwareDancer WinderDancer = new HardwareDancer();
+WinderDancer.HardwareDancerType = Tango.PMR.Hardware.HardwareDancerType.LeftDancer;
+WinderDancer.Gradual = false;
+WinderDancer.K = 0;
+WinderDancer.X = 0;
+WinderDancer.PulsePerMmSpring = 0;
+WinderDancer.MaximalMovementMm = 15;
+WinderDancer.ZeroPoint = 10900;
+WinderDancer.ResolutionBits = 14;
+WinderDancer.ArmLength = 126;
+
+HardwareMotor FeederMotor = new HardwareMotor();
+FeederMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoRdriving;
+FeederMotor.MinFrequency = 0;
+FeederMotor.MaxFrequency = 1000000;
+FeederMotor.SetMicroStep = 1;
+FeederMotor.MicroStep = 4;
+FeederMotor.MaxChangeSlope = 10000;
+FeederMotor.HighLengthMicroSecond = 0;
+FeederMotor.SpeedMaster = false;
+FeederMotor.PulsePerRound = 200;
+FeederMotor.PulleyRadius = 1.25;
+FeederMotor.ConfigWord = 0x1C80;
+FeederMotor.DirectionThreadWize = true;
+FeederMotor.KvalHold = 0x35;
+FeederMotor.KvalRun = 0x7f;
+FeederMotor.KvalAcc = 0x7f;
+FeederMotor.KvalDec = 0x7f;
+FeederMotor.OverCurrentThreshold = 7;
+FeederMotor.StallThreshold = 0x1F;
+FeederMotor.ThermalCompensationFactor = 0;
+FeederMotor.LowSpeedOptimization = false;
+FeederMotor.StSlp = 0x20;
+FeederMotor.IntSpd = 0x1A13;
+FeederMotor.FnSlpAcc = 0x50;
+FeederMotor.FnSlpDec = 0x50;
+
+HardwareMotor DryerMotor = new HardwareMotor();
+DryerMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoDryerDriving;
+DryerMotor.MinFrequency = 0;
+DryerMotor.MaxFrequency = 1000000;
+DryerMotor.SetMicroStep = 1;
+DryerMotor.MicroStep = 4;
+DryerMotor.MaxChangeSlope = 1000;
+DryerMotor.HighLengthMicroSecond = 0;
+DryerMotor.SpeedMaster = true;
+DryerMotor.PulsePerRound = 200;
+DryerMotor.PulleyRadius = 1.05;
+DryerMotor.ConfigWord = 0x1c80;
+DryerMotor.DirectionThreadWize = false;
+DryerMotor.KvalHold = 0x35;
+DryerMotor.KvalRun = 0x7f;
+DryerMotor.KvalAcc = 0x7f;
+DryerMotor.KvalDec = 0x7f;
+DryerMotor.OverCurrentThreshold = 7;
+DryerMotor.StallThreshold = 0x1F;
+DryerMotor.ThermalCompensationFactor = 0;
+DryerMotor.LowSpeedOptimization = false;
+DryerMotor.StSlp = 0x20;
+DryerMotor.IntSpd = 0x1A13;
+DryerMotor.FnSlpAcc = 0x50;
+DryerMotor.FnSlpDec = 0x50;
+
+HardwareMotor PoolerMotor = new HardwareMotor();
+PoolerMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoLdriving;
+PoolerMotor.MinFrequency = 0;
+PoolerMotor.MaxFrequency = 1000000;
+PoolerMotor.SetMicroStep = 1;
+PoolerMotor.MicroStep = 3;
+PoolerMotor.MaxChangeSlope = 10000;
+PoolerMotor.HighLengthMicroSecond = 0;
+PoolerMotor.SpeedMaster = false;
+PoolerMotor.PulsePerRound = 200;
+PoolerMotor.PulleyRadius = 1.25;
+PoolerMotor.ConfigWord = 0x1C80;
+PoolerMotor.DirectionThreadWize = true;
+PoolerMotor.KvalHold = 0x35;
+PoolerMotor.KvalRun = 0x7f;
+PoolerMotor.KvalAcc = 0x7f;
+PoolerMotor.KvalDec = 0x7f;
+PoolerMotor.OverCurrentThreshold = 7;
+PoolerMotor.StallThreshold = 0x1F;
+PoolerMotor.ThermalCompensationFactor = 0;
+PoolerMotor.LowSpeedOptimization = false;
+PoolerMotor.StSlp = 20;
+PoolerMotor.IntSpd = 0x1A13;
+PoolerMotor.FnSlpAcc = 0x50;
+PoolerMotor.FnSlpDec = 0x50;
+
+HardwareMotor WinderMotor = new HardwareMotor();
+WinderMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoWinder;
+WinderMotor.MinFrequency = 0;
+WinderMotor.MaxFrequency = 1000000;
+WinderMotor.SetMicroStep = 1;
+WinderMotor.MicroStep = 16;
+WinderMotor.MaxChangeSlope = 0x7ff;
+WinderMotor.HighLengthMicroSecond = 0;
+WinderMotor.SpeedMaster = false;
+WinderMotor.PulsePerRound = 200;
+WinderMotor.PulleyRadius = 1.68;
+WinderMotor.ConfigWord = 0x1CA0;
+WinderMotor.DirectionThreadWize = false;
+WinderMotor.KvalHold = 0x0F;
+WinderMotor.KvalRun = 0x15;
+WinderMotor.KvalAcc = 0x15;
+WinderMotor.KvalDec = 0x15;
+WinderMotor.OverCurrentThreshold = 0xF0;
+WinderMotor.StallThreshold = 0x7F;
+WinderMotor.ThermalCompensationFactor = 0;
+WinderMotor.LowSpeedOptimization = false;
+WinderMotor.StSlp = 0x18;
+WinderMotor.IntSpd = 0x22C5;
+WinderMotor.FnSlpAcc = 0x22;
+WinderMotor.FnSlpDec = 0x22;
+
+HardwareMotor ScrewMotor = new HardwareMotor();
+ScrewMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoScrew;
+ScrewMotor.MinFrequency = 0;
+ScrewMotor.MaxFrequency = 1000;
+ScrewMotor.SetMicroStep = 1;
+ScrewMotor.MicroStep = 4;
+ScrewMotor.MaxChangeSlope = 10000;
+ScrewMotor.HighLengthMicroSecond = 0;
+ScrewMotor.SpeedMaster = false;
+ScrewMotor.PulsePerRound = 200;
+ScrewMotor.PulleyRadius = 1.25;
+ScrewMotor.ConfigWord = 0x1C80;
+ScrewMotor.DirectionThreadWize = false;
+ScrewMotor.KvalHold = 0x0F;
+ScrewMotor.KvalRun = 0x15;
+ScrewMotor.KvalAcc = 0x15;
+ScrewMotor.KvalDec = 0x15;
+ScrewMotor.OverCurrentThreshold = 7;
+ScrewMotor.StallThreshold = 0x1F;
+ScrewMotor.ThermalCompensationFactor = 0;
+ScrewMotor.LowSpeedOptimization = false;
+ScrewMotor.StSlp = 0x18;
+ScrewMotor.IntSpd = 0x22C5;
+ScrewMotor.FnSlpAcc = 0x22;
+ScrewMotor.FnSlpDec = 0x22;// Request ----
+
+HardwareMotor LeftRockerMotor = new HardwareMotor();
+LeftRockerMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoLloading;
+LeftRockerMotor.MinFrequency = 20;
+LeftRockerMotor.LowSpeedOptimization = true;
+LeftRockerMotor.MaxFrequency = 1000000;
+LeftRockerMotor.SetMicroStep = 1;
+LeftRockerMotor.MicroStep = 2;
+LeftRockerMotor.MaxChangeSlope = 10000;
+LeftRockerMotor.HighLengthMicroSecond = 0;
+LeftRockerMotor.SpeedMaster = false;
+LeftRockerMotor.PulsePerRound = 200;
+LeftRockerMotor.PulleyRadius = 1.3;
+LeftRockerMotor.ConfigWord = 0xC80;
+LeftRockerMotor.DirectionThreadWize = false;
+LeftRockerMotor.KvalHold = 0x28;
+LeftRockerMotor.KvalRun = 0x5f;
+LeftRockerMotor.KvalAcc = 0x5f;
+LeftRockerMotor.KvalDec = 0x5f;
+LeftRockerMotor.OverCurrentThreshold = 7;
+LeftRockerMotor.StallThreshold = 0x1F;
+LeftRockerMotor.ThermalCompensationFactor = 0;
+LeftRockerMotor.LowSpeedOptimization = false;
+LeftRockerMotor.StSlp = 6;
+LeftRockerMotor.IntSpd = 0x44B8;
+LeftRockerMotor.FnSlpAcc = 0x14;
+LeftRockerMotor.FnSlpDec = 0x14;
+
+
+HardwareMotor RightRockerMotor = new HardwareMotor();
+RightRockerMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoRloading;
+RightRockerMotor.MinFrequency = 20;
+RightRockerMotor.LowSpeedOptimization = true;
+RightRockerMotor.MaxFrequency = 1000000;
+RightRockerMotor.SetMicroStep = 1;
+RightRockerMotor.MicroStep = 4;
+RightRockerMotor.MaxChangeSlope = 10000;
+RightRockerMotor.HighLengthMicroSecond = 0;
+RightRockerMotor.SpeedMaster = false;
+RightRockerMotor.PulsePerRound = 200;
+RightRockerMotor.PulleyRadius = 1.3;
+RightRockerMotor.ConfigWord = 0xC80;
+RightRockerMotor.DirectionThreadWize = true;
+RightRockerMotor.KvalHold = 0x28;
+RightRockerMotor.KvalRun = 0x5f;
+RightRockerMotor.KvalAcc = 0x5f;
+RightRockerMotor.KvalDec = 0x5f;
+RightRockerMotor.OverCurrentThreshold = 7;
+RightRockerMotor.StallThreshold = 0x1F;
+RightRockerMotor.ThermalCompensationFactor = 0;
+RightRockerMotor.LowSpeedOptimization = false;
+RightRockerMotor.StSlp = 6;
+RightRockerMotor.IntSpd = 0x44B8;
+RightRockerMotor.FnSlpAcc = 0x14;
+RightRockerMotor.FnSlpDec = 0x14;
+
+
+
+HardwareWinder Winder = new HardwareWinder();
+Winder.HardwareWinderType = Tango.PMR.Hardware.HardwareWinderType.InternalWinder;
+Winder.MillimeterPerRotation = 20;
+
+//hardwareConfiguration.Motors.Add(FeederMotor);
+//hardwareConfiguration.Motors.Add(WinderMotor);
+//hardwareConfiguration.Motors.Add(DryerMotor);
+//hardwareConfiguration.Motors.Add(PoolerMotor);
+//hardwareConfiguration.Motors.Add(ScrewMotor);
+//hardwareConfiguration.Motors.Add(LeftRockerMotor);
+//hardwareConfiguration.Motors.Add(RightRockerMotor);
+
+//hardwareConfiguration.PidControls.Add(FeederPidControl);
+//hardwareConfiguration.PidControls.Add(PoolerPidControl);
+//hardwareConfiguration.PidControls.Add(WinderPidControl);
+
+//hardwareConfiguration.Dancers.Add(FeederDancer);
+//hardwareConfiguration.Dancers.Add(PoolerDancer);
+//hardwareConfiguration.Dancers.Add(WinderDancer);
diff --git a/Software/Stubs Collection/stubs/addedfiles/newDeskSystemThreadMotorsDefinition.cs b/Software/Stubs Collection/stubs/addedfiles/newDeskSystemThreadMotorsDefinition.cs
new file mode 100644
index 000000000..34008fd61
--- /dev/null
+++ b/Software/Stubs Collection/stubs/addedfiles/newDeskSystemThreadMotorsDefinition.cs
@@ -0,0 +1,434 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Hardware;
+using Tango.PMR.Printing;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+HardwarePidControl FeederPidControl = new HardwarePidControl();
+FeederPidControl.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.MotorFeeder;
+FeederPidControl.OutputProportionalPowerLimit = 1.0;
+FeederPidControl.OutputProportionalBand = 5;
+FeederPidControl.IntegralTime = 5;
+FeederPidControl.DerivativeTime = 0;
+FeederPidControl.SensorCorrectionAdjustment = 0;
+FeederPidControl.SensorMinValue = 0;
+FeederPidControl.SensorMaxValue = 0;
+FeederPidControl.SetPointRampRateorSoftStartRamp = 0;
+FeederPidControl.SetPointControlOutputRate = 4;
+FeederPidControl.ControlOutputType = 0;
+FeederPidControl.SsrControlOutputType = 0;
+FeederPidControl.OutputOnOffHysteresisValue = 0;
+FeederPidControl.ProcessVariableSamplingRate = 1000;
+FeederPidControl.PvInputFilterFactorMode = 4;
+FeederPidControl.OutputProportionalCycleTime = 0;
+FeederPidControl.AcHeatersHalfCycleTime = 0;
+FeederPidControl.ProportionalGain = 11.0;
+
+
+HardwarePidControl PoolerPidControl = new HardwarePidControl();
+PoolerPidControl.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.MotorPooler;
+PoolerPidControl.OutputProportionalPowerLimit = 1.0;
+PoolerPidControl.OutputProportionalBand = 5;
+PoolerPidControl.IntegralTime = 5;
+PoolerPidControl.DerivativeTime = 0;
+PoolerPidControl.SensorCorrectionAdjustment = 0;
+PoolerPidControl.SensorMinValue = 0;
+PoolerPidControl.SensorMaxValue = 0;
+PoolerPidControl.SetPointRampRateorSoftStartRamp = 0;
+PoolerPidControl.SetPointControlOutputRate = 4;
+PoolerPidControl.ControlOutputType = 0;
+PoolerPidControl.SsrControlOutputType = 0;
+PoolerPidControl.OutputOnOffHysteresisValue = 0;
+PoolerPidControl.ProcessVariableSamplingRate = 1000;
+PoolerPidControl.PvInputFilterFactorMode = 4;
+PoolerPidControl.OutputProportionalCycleTime = 0;
+PoolerPidControl.AcHeatersHalfCycleTime = 0;
+PoolerPidControl.ProportionalGain = 11.0;
+
+
+HardwarePidControl WinderPidControl = new HardwarePidControl();
+WinderPidControl.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.MotorWinder;
+WinderPidControl.OutputProportionalPowerLimit = 1.0;
+WinderPidControl.OutputProportionalBand = 5;
+WinderPidControl.IntegralTime = 5;
+WinderPidControl.DerivativeTime = 0;
+WinderPidControl.SensorCorrectionAdjustment = 0;
+WinderPidControl.SensorMinValue = 0;
+WinderPidControl.SensorMaxValue = 0;
+WinderPidControl.SetPointRampRateorSoftStartRamp = 0;
+WinderPidControl.SetPointControlOutputRate = 4;
+WinderPidControl.ControlOutputType = 0;
+WinderPidControl.SsrControlOutputType = 0;
+WinderPidControl.OutputOnOffHysteresisValue = 0;
+WinderPidControl.ProcessVariableSamplingRate = 1000;
+WinderPidControl.PvInputFilterFactorMode = 4;
+WinderPidControl.OutputProportionalCycleTime = 0;
+WinderPidControl.AcHeatersHalfCycleTime = 0;
+WinderPidControl.ProportionalGain = 11.0;
+
+
+HardwareDancer FeederDancer = new HardwareDancer();
+FeederDancer.HardwareDancerType = Tango.PMR.Hardware.HardwareDancerType.RightDancer;
+FeederDancer.Gradual = false;
+FeederDancer.K = 0;
+FeederDancer.X = 0;
+FeederDancer.PulsePerMmSpring = 0;
+FeederDancer.MaximalMovementMm = 20;
+FeederDancer.ZeroPoint = 14182;
+FeederDancer.ResolutionBits = 14;
+FeederDancer.ArmLength = 126;
+
+HardwareDancer PoolerDancer = new HardwareDancer();
+PoolerDancer.HardwareDancerType = Tango.PMR.Hardware.HardwareDancerType.MiddleDancer;
+PoolerDancer.Gradual = false;
+PoolerDancer.K = 0;
+PoolerDancer.X = 0;
+PoolerDancer.PulsePerMmSpring = 0;
+PoolerDancer.MaximalMovementMm = 20;
+PoolerDancer.ZeroPoint = 13247;
+PoolerDancer.ResolutionBits = 14;
+PoolerDancer.ArmLength = 126;
+
+HardwareDancer WinderDancer = new HardwareDancer();
+WinderDancer.HardwareDancerType = Tango.PMR.Hardware.HardwareDancerType.LeftDancer;
+WinderDancer.Gradual = false;
+WinderDancer.K = 0;
+WinderDancer.X = 0;
+WinderDancer.PulsePerMmSpring = 0;
+WinderDancer.MaximalMovementMm = 20;
+WinderDancer.ZeroPoint = 11193;
+WinderDancer.ResolutionBits = 14;
+WinderDancer.ArmLength = 126;
+
+HardwareMotor FeederMotor = new HardwareMotor();
+FeederMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoRdriving;
+FeederMotor.MinFrequency = 0;
+FeederMotor.MaxFrequency = 1000000;
+FeederMotor.SetMicroStep = 1;
+FeederMotor.MicroStep = 1;
+FeederMotor.MaxChangeSlope = 10000;
+FeederMotor.HighLengthMicroSecond = 0;
+FeederMotor.SpeedMaster = false;
+FeederMotor.PulsePerRound = 200;
+FeederMotor.PulleyRadius = 1.25;
+FeederMotor.ConfigWord = 0x1C80;
+FeederMotor.DirectionThreadWize = true;
+FeederMotor.KvalHold = 0x35;
+FeederMotor.KvalRun = 0x7f;
+FeederMotor.KvalAcc = 0x7f;
+FeederMotor.KvalDec = 0x3Ff;
+FeederMotor.OverCurrentThreshold = 7;
+FeederMotor.StallThreshold = 0x1F;
+FeederMotor.ThermalCompensationFactor = 0;
+FeederMotor.LowSpeedOptimization = false;
+FeederMotor.StSlp = 0x20;
+FeederMotor.IntSpd = 0x1A13;
+FeederMotor.FnSlpAcc = 0x50;
+FeederMotor.FnSlpDec = 0x50;
+
+HardwareMotor DryerMotor = new HardwareMotor();
+DryerMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoDryerDriving;
+DryerMotor.MinFrequency = 0;
+DryerMotor.MaxFrequency = 1000000;
+DryerMotor.SetMicroStep = 1;
+DryerMotor.MicroStep = 1;
+DryerMotor.MaxChangeSlope = 1000;
+DryerMotor.HighLengthMicroSecond = 0;
+DryerMotor.SpeedMaster = true;
+DryerMotor.PulsePerRound = 200;
+DryerMotor.PulleyRadius = 1.05;
+DryerMotor.ConfigWord = 0x1c80;
+DryerMotor.DirectionThreadWize = false;
+DryerMotor.KvalHold = 0x35;
+DryerMotor.KvalRun = 0x7f;
+DryerMotor.KvalAcc = 0x7f;
+DryerMotor.KvalDec = 0x3Ff;
+DryerMotor.OverCurrentThreshold = 7;
+DryerMotor.StallThreshold = 0x1F;
+DryerMotor.ThermalCompensationFactor = 0;
+DryerMotor.LowSpeedOptimization = false;
+DryerMotor.StSlp = 0x20;
+DryerMotor.IntSpd = 0x1A13;
+DryerMotor.FnSlpAcc = 0x50;
+DryerMotor.FnSlpDec = 0x50;
+
+HardwareMotor PoolerMotor = new HardwareMotor();
+PoolerMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoLdriving;
+PoolerMotor.MinFrequency = 0;
+PoolerMotor.MaxFrequency = 1000000;
+PoolerMotor.SetMicroStep = 1;
+PoolerMotor.MicroStep = 8;
+PoolerMotor.MaxChangeSlope = 10000;
+PoolerMotor.HighLengthMicroSecond = 0;
+PoolerMotor.SpeedMaster = false;
+PoolerMotor.PulsePerRound = 200;
+PoolerMotor.PulleyRadius = 1.25;
+PoolerMotor.ConfigWord = 0x1C80;
+PoolerMotor.DirectionThreadWize = true;
+PoolerMotor.KvalHold = 0x35;
+PoolerMotor.KvalRun = 0x7f;
+PoolerMotor.KvalAcc = 0x7f;
+PoolerMotor.KvalDec = 0x3ff;
+PoolerMotor.OverCurrentThreshold = 7;
+PoolerMotor.StallThreshold = 0x1F;
+PoolerMotor.ThermalCompensationFactor = 0;
+PoolerMotor.LowSpeedOptimization = false;
+PoolerMotor.StSlp = 20;
+PoolerMotor.IntSpd = 0x1A13;
+PoolerMotor.FnSlpAcc = 0x50;
+PoolerMotor.FnSlpDec = 0x50;
+
+HardwareMotor WinderMotor = new HardwareMotor();
+WinderMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoWinder;
+WinderMotor.MinFrequency = 0;
+WinderMotor.MaxFrequency = 100000;
+WinderMotor.SetMicroStep = 1;
+WinderMotor.MicroStep = 16;
+WinderMotor.MaxChangeSlope = 0x7ff;
+WinderMotor.HighLengthMicroSecond = 0;
+WinderMotor.SpeedMaster = false;
+WinderMotor.PulsePerRound = 200;
+WinderMotor.PulleyRadius = 0.8;
+WinderMotor.ConfigWord = 0x1CA0;
+WinderMotor.DirectionThreadWize = false;
+WinderMotor.KvalHold = 0x08;
+WinderMotor.KvalRun = 0x20;
+WinderMotor.KvalAcc = 0x20;
+WinderMotor.KvalDec = 0x3ff;
+WinderMotor.OverCurrentThreshold = 0xF;
+WinderMotor.StallThreshold = 0x7F;
+WinderMotor.ThermalCompensationFactor = 0;
+WinderMotor.LowSpeedOptimization = false;
+WinderMotor.StSlp = 0x7;
+WinderMotor.IntSpd = 0x22C5;
+WinderMotor.FnSlpAcc = 0x15;
+WinderMotor.FnSlpDec = 0x15;
+
+HardwareMotor ScrewMotor = new HardwareMotor();
+ScrewMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoScrew;
+ScrewMotor.MinFrequency = 0;
+ScrewMotor.MaxFrequency = 100000;
+ScrewMotor.SetMicroStep = 1;
+ScrewMotor.MicroStep = 8;
+ScrewMotor.MaxChangeSlope = 0x7FF;
+ScrewMotor.HighLengthMicroSecond = 0;
+ScrewMotor.SpeedMaster = false;
+ScrewMotor.PulsePerRound = 200;
+ScrewMotor.PulleyRadius = 1.68;
+ScrewMotor.ConfigWord = 0x1CA0;
+ScrewMotor.DirectionThreadWize = true;
+ScrewMotor.KvalHold = 0x1;
+ScrewMotor.KvalRun = 0x20;
+ScrewMotor.KvalAcc = 0x20;
+ScrewMotor.KvalDec = 0x3ff;
+ScrewMotor.OverCurrentThreshold = 0xF;
+ScrewMotor.StallThreshold = 0x7F;
+ScrewMotor.ThermalCompensationFactor = 0;
+ScrewMotor.LowSpeedOptimization = false;
+ScrewMotor.StSlp = 0x7;
+ScrewMotor.IntSpd = 0x22C5;
+ScrewMotor.FnSlpAcc = 0x15;
+ScrewMotor.FnSlpDec = 0x15;
+
+
+HardwareMotor LeftRockerMotor = new HardwareMotor();
+LeftRockerMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoLloading;
+LeftRockerMotor.MinFrequency = 0;
+LeftRockerMotor.MaxFrequency = 1000000;
+LeftRockerMotor.SetMicroStep = 1;
+LeftRockerMotor.MicroStep = 4;
+LeftRockerMotor.MaxChangeSlope = 10000;
+LeftRockerMotor.HighLengthMicroSecond = 0;
+LeftRockerMotor.SpeedMaster = false;
+LeftRockerMotor.PulsePerRound = 200;
+LeftRockerMotor.PulleyRadius = 1.3;
+LeftRockerMotor.ConfigWord = 0xC80;
+LeftRockerMotor.DirectionThreadWize = false;
+LeftRockerMotor.KvalHold = 0x28;
+LeftRockerMotor.KvalRun = 0x5f;
+LeftRockerMotor.KvalAcc = 0x5f;
+LeftRockerMotor.KvalDec = 0x3ff;
+LeftRockerMotor.OverCurrentThreshold = 7;
+LeftRockerMotor.StallThreshold = 0x1F;
+LeftRockerMotor.ThermalCompensationFactor = 0;
+LeftRockerMotor.LowSpeedOptimization = false;
+LeftRockerMotor.StSlp = 6;
+LeftRockerMotor.IntSpd = 0x44B8;
+LeftRockerMotor.FnSlpAcc = 0x14;
+LeftRockerMotor.FnSlpDec = 0x14;
+
+
+HardwareMotor RightRockerMotor = new HardwareMotor();
+RightRockerMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoRloading;
+RightRockerMotor.MinFrequency = 0;
+RightRockerMotor.MaxFrequency = 1000000;
+RightRockerMotor.SetMicroStep = 1;
+RightRockerMotor.MicroStep = 4;
+RightRockerMotor.MaxChangeSlope = 10000;
+RightRockerMotor.HighLengthMicroSecond = 0;
+RightRockerMotor.SpeedMaster = false;
+RightRockerMotor.PulsePerRound = 200;
+RightRockerMotor.PulleyRadius = 1.3;
+RightRockerMotor.ConfigWord = 0xC80;
+RightRockerMotor.DirectionThreadWize = true;
+RightRockerMotor.KvalHold = 0x28;
+RightRockerMotor.KvalRun = 0x5f;
+RightRockerMotor.KvalAcc = 0x5f;
+RightRockerMotor.KvalDec = 0x3ff;
+RightRockerMotor.OverCurrentThreshold = 7;
+RightRockerMotor.StallThreshold = 0x1F;
+RightRockerMotor.ThermalCompensationFactor = 0;
+RightRockerMotor.LowSpeedOptimization = false;
+RightRockerMotor.StSlp = 6;
+RightRockerMotor.IntSpd = 0x44B8;
+RightRockerMotor.FnSlpAcc = 0x14;
+RightRockerMotor.FnSlpDec = 0x14;
+
+HardwareMotor Dispenser4Motor = new HardwareMotor();
+Dispenser4Motor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoDispenser4;
+Dispenser4Motor.MinFrequency = 0;
+Dispenser4Motor.MaxFrequency = 100000;
+Dispenser4Motor.SetMicroStep = 1;
+Dispenser4Motor.MicroStep = 16;
+Dispenser4Motor.MaxChangeSlope = 0x7FF;
+Dispenser4Motor.HighLengthMicroSecond = 0;
+Dispenser4Motor.SpeedMaster = false;
+Dispenser4Motor.PulsePerRound = 200;
+Dispenser4Motor.PulleyRadius = 1.68;
+Dispenser4Motor.ConfigWord = 0x1CA0;
+Dispenser4Motor.DirectionThreadWize = true;
+Dispenser4Motor.KvalHold = 0x21;
+Dispenser4Motor.KvalRun = 0xc0;
+Dispenser4Motor.KvalAcc = 0x2e;
+Dispenser4Motor.KvalDec = 0x3ff;
+Dispenser4Motor.OverCurrentThreshold = 0xF;
+Dispenser4Motor.StallThreshold = 0x1F;
+Dispenser4Motor.ThermalCompensationFactor = 0;
+Dispenser4Motor.LowSpeedOptimization = false;
+Dispenser4Motor.StSlp = 0x9;
+Dispenser4Motor.IntSpd = 0x1AD2;
+Dispenser4Motor.FnSlpAcc = 0x26;
+Dispenser4Motor.FnSlpDec = 0x26;
+
+HardwareMotor Dispenser7Motor = new HardwareMotor();
+Dispenser7Motor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoDispenser7;
+Dispenser7Motor.MinFrequency = 0;
+Dispenser7Motor.MaxFrequency = 100000;
+Dispenser7Motor.SetMicroStep = 1;
+Dispenser7Motor.MicroStep = 16;
+Dispenser7Motor.MaxChangeSlope = 0x7FF;
+Dispenser7Motor.HighLengthMicroSecond = 0;
+Dispenser7Motor.SpeedMaster = false;
+Dispenser7Motor.PulsePerRound = 200;
+Dispenser7Motor.PulleyRadius = 1.68;
+Dispenser7Motor.ConfigWord = 0x1CA0;
+Dispenser7Motor.DirectionThreadWize = true;
+Dispenser7Motor.KvalHold = 0x21;
+Dispenser7Motor.KvalRun = 0xc0;
+Dispenser7Motor.KvalAcc = 0x2e;
+Dispenser7Motor.KvalDec = 0x3ff;
+Dispenser7Motor.OverCurrentThreshold = 0xF;
+Dispenser7Motor.StallThreshold = 0x1F;
+Dispenser7Motor.ThermalCompensationFactor = 0;
+Dispenser7Motor.LowSpeedOptimization = false;
+Dispenser7Motor.StSlp = 0x9;
+Dispenser7Motor.IntSpd = 0x1AD2;
+Dispenser7Motor.FnSlpAcc = 0x26;
+Dispenser7Motor.FnSlpDec = 0x26;
+
+HardwareMotor Dispenser8Motor = new HardwareMotor();
+Dispenser8Motor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoDispenser8;
+Dispenser8Motor.MinFrequency = 0;
+Dispenser8Motor.MaxFrequency = 100000;
+Dispenser8Motor.SetMicroStep = 1;
+Dispenser8Motor.MicroStep = 16;
+Dispenser8Motor.MaxChangeSlope = 0x7FF;
+Dispenser8Motor.HighLengthMicroSecond = 0;
+Dispenser8Motor.SpeedMaster = false;
+Dispenser8Motor.PulsePerRound = 200;
+Dispenser8Motor.PulleyRadius = 1.68;
+Dispenser8Motor.ConfigWord = 0x1CA0;
+Dispenser8Motor.DirectionThreadWize = true;
+Dispenser8Motor.KvalHold = 0x21;
+Dispenser8Motor.KvalRun = 0xc0;
+Dispenser8Motor.KvalAcc = 0x2e;
+Dispenser8Motor.KvalDec = 0x3ff;
+Dispenser8Motor.OverCurrentThreshold = 0xF;
+Dispenser8Motor.StallThreshold = 0x1F;
+Dispenser8Motor.ThermalCompensationFactor = 0;
+Dispenser8Motor.LowSpeedOptimization = false;
+Dispenser8Motor.StSlp = 0x9;
+Dispenser8Motor.IntSpd = 0x1AD2;
+Dispenser8Motor.FnSlpAcc = 0x26;
+Dispenser8Motor.FnSlpDec = 0x26;
+HardwareMotor DryerLoadarm = new HardwareMotor();
+DryerLoadarm.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoDryerLoadarm;
+DryerLoadarm.MinFrequency = 0;
+DryerLoadarm.MaxFrequency = 1000000;
+DryerLoadarm.SetMicroStep = 1;
+DryerLoadarm.MicroStep = 1;
+DryerLoadarm.MaxChangeSlope = 10000;
+DryerLoadarm.HighLengthMicroSecond = 0;
+DryerLoadarm.SpeedMaster = false;
+DryerLoadarm.PulsePerRound = 200;
+DryerLoadarm.PulleyRadius = 1.25;
+DryerLoadarm.ConfigWord = 0x1C80;
+DryerLoadarm.DirectionThreadWize = false;
+DryerLoadarm.KvalHold = 0x35;
+DryerLoadarm.KvalRun = 0x7f;
+DryerLoadarm.KvalAcc = 0x7f;
+DryerLoadarm.KvalDec = 0x7f;
+DryerLoadarm.OverCurrentThreshold = 7;
+DryerLoadarm.StallThreshold = 0x1F;
+DryerLoadarm.ThermalCompensationFactor = 0;
+DryerLoadarm.LowSpeedOptimization = false;
+DryerLoadarm.StSlp = 0x20;
+DryerLoadarm.IntSpd = 0x1A13;
+DryerLoadarm.FnSlpAcc = 0x50;
+DryerLoadarm.FnSlpDec = 0x50;
+
+
+HardwareDispenser hardwareDispenser = new HardwareDispenser();
+hardwareDispenser.HardwareDispenserType = Tango.PMR.Hardware.HardwareDispenserType.StandardDispenser;
+hardwareDispenser.Index = 7;
+hardwareDispenser.NlPerPulse = 2.4;
+hardwareDispenser.Capacity = 500;
+
+JobDispenser jobDispenser = new JobDispenser();
+jobDispenser.Index = 0;
+jobDispenser.Volume = 0;
+jobDispenser.DispenserStepDivision = Tango.PMR.Printing.DispenserStepDivision.Auto;
+jobDispenser.NanolitterPerSecond = 0;
+jobDispenser.NanoliterPerCentimeter = 0;
+jobDispenser.PulsePerSecond = 0;
+jobDispenser.DispenserLiquidType = Tango.PMR.Printing.DispenserLiquidType.Cyan;
+jobDispenser.LiquidMaxNanoliterPerCentimeter = 0;
+jobDispenser.NanoliterPerPulse = 0;
+
+HardwareWinder Winder = new HardwareWinder();
+Winder.HardwareWinderType = Tango.PMR.Hardware.HardwareWinderType.InternalWinder;
+Winder.MillimeterPerRotation = 20;
+
+//hardwareConfiguration.Motors.Add(FeederMotor);
+//hardwareConfiguration.Motors.Add(WinderMotor);
+//hardwareConfiguration.Motors.Add(DryerMotor);
+//hardwareConfiguration.Motors.Add(PoolerMotor);
+//hardwareConfiguration.Motors.Add(ScrewMotor);
+//hardwareConfiguration.Motors.Add(LeftRockerMotor);
+//hardwareConfiguration.Motors.Add(RightRockerMotor);
+
+//hardwareConfiguration.PidControls.Add(FeederPidControl);
+//hardwareConfiguration.PidControls.Add(PoolerPidControl);
+//hardwareConfiguration.PidControls.Add(WinderPidControl);
+
+//hardwareConfiguration.Dancers.Add(FeederDancer);
+//hardwareConfiguration.Dancers.Add(PoolerDancer);
+//hardwareConfiguration.Dancers.Add(WinderDancer);
diff --git a/Software/Stubs Collection/stubs/fpgaTest.cs b/Software/Stubs Collection/stubs/fpgaTest.cs
new file mode 100644
index 000000000..605c40dc0
--- /dev/null
+++ b/Software/Stubs Collection/stubs/fpgaTest.cs
@@ -0,0 +1,29 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+public void OnExecute(StubManager stubManager)
+{
+
+
+//for (int i = 0; i< 1; i++)
+ //{
+// stubManager.Run<StubFpgaWriteRegResponse>("StubFpgaWriteRegRequest",0x600003f8,0x00AA);
+ stubManager.Run<StubFpgaReadRegResponse>("StubFpgaReadRegRequest",0x60000000);
+// stubManager.Run<StubFpgaReadRegResponse>("StubFpgaReadRegRequest",0x60000010);
+ Thread.Sleep(10);
+// stubManager.Run<StubFpgaWriteRegResponse>("StubFpgaWriteRegRequest",0x600007f8,0x00AA);
+ //stubManager.Run<StubFpgaReadRegResponse>("StubFpgaReadRegRequest",0x60000410);
+
+//}
+//Thread.Sleep(1000);
+}
+
diff --git a/Software/Stubs Collection/stubs/fpgaversionandtest.cs b/Software/Stubs Collection/stubs/fpgaversionandtest.cs
new file mode 100644
index 000000000..f51c48c5e
--- /dev/null
+++ b/Software/Stubs Collection/stubs/fpgaversionandtest.cs
@@ -0,0 +1,61 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+public void OnExecute(StubManager stubManager)
+{
+// Request ----
+// UInt32 : FPGAId
+
+// Response ----
+// UInt32 : FPGAId
+// UInt32 : Day
+// UInt32 : Month
+// UInt32 : Year
+// UInt32 : VerNum
+// String : Status
+// UInt32 : StatusWord
+
+
+StubFPGAReadBackRegRequest stubFPGAReadBackRegRequest = new StubFPGAReadBackRegRequest();
+stubFPGAReadBackRegRequest.FPGAId = 2;
+stubFPGAReadBackRegRequest.Value = 0x1231;
+
+
+StubFpgaWriteRegRequest stubFpgaWriteRegRequest = new StubFpgaWriteRegRequest();
+stubFpgaWriteRegRequest.Address = 0x60000220;
+stubFpgaWriteRegRequest.Value = 0x28;
+
+
+StubFpgaReadRegRequest stubFpgaReadRegRequest = new StubFpgaReadRegRequest();
+stubFpgaReadRegRequest.Address = 0x60000224;
+
+
+//for (int i = 0; i< 1; i++)
+ //{
+ //stubManager.Run<StubFPGAReadVersionResponse>("StubFPGAReadVersionRequest" ,2);
+ Thread.Sleep(10);
+ stubManager.Run<StubFpgaWriteRegResponse>(stubFpgaWriteRegRequest);
+ Thread.Sleep(10);
+ stubManager.Run<StubFpgaReadRegResponse>(stubFpgaReadRegRequest);
+ Thread.Sleep(10);
+ //stubManager.Run<StubFPGAReadBackRegResponse>(stubFPGAReadBackRegRequest);
+ Thread.Sleep(10);
+
+//}
+//Thread.Sleep(1000);
+
+
+//var response1= stubManager.Run<StubFpgaReadRegResponse>(stubFpgaReadRegRequest);
+
+
+}
+
diff --git a/Software/Stubs Collection/stubs/heatercommand.cs b/Software/Stubs Collection/stubs/heatercommand.cs
new file mode 100644
index 000000000..ed1435317
--- /dev/null
+++ b/Software/Stubs Collection/stubs/heatercommand.cs
@@ -0,0 +1,38 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+public void OnExecute(StubManager stubManager)
+{
+ {
+ /*var response = stubManager.Run<CalculateResponse>("calculate", 1, i);
+
+ if (response.Sum == 10)
+ {
+ stubManager.WriteLine("OK!");
+ }
+ else
+ {
+ stubManager.WriteLine(response.Sum);
+ }*/
+ }
+// Request ----
+// UInt32 : HeaterGroupId
+// Boolean : HeaterGroupOn
+// UInt32 : HeaterTemperatureReq
+
+// Response ----
+// UInt32 : HeaterGroupId
+// UInt32 : HeaterTemperatureSensor
+// String : Status
+// UInt32 : StatusWord
+ var response = stubManager.Run<StubHeaterResponse>("StubHeaterRequest" ,4, true, 300);
+} \ No newline at end of file
diff --git a/Software/Stubs Collection/stubs/michael stubs/Assemblies/Catridge_GPIs.cs b/Software/Stubs Collection/stubs/michael stubs/Assemblies/Catridge_GPIs.cs
new file mode 100644
index 000000000..96ba637a3
--- /dev/null
+++ b/Software/Stubs Collection/stubs/michael stubs/Assemblies/Catridge_GPIs.cs
@@ -0,0 +1,52 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+include "C:\To_Backup\Mulberry\Mulberry_current\Customers\Twine\Tango\Software\Stub_scripts\Tango_Defines_Basic.cs"
+include "C:\To_Backup\Mulberry\Mulberry_current\Customers\Twine\Tango\Software\Stub_scripts\Interfaces\Tango_Defines_GPI.cs"
+
+
+int CartridgePresentBit(Int32 Fpga, Int32 Addr)
+{
+
+ var RetVal = Fpga_Read_Reg(Fpga, Addr, 0);
+ for (int i=0; i<8; i++)
+ {
+ if ( ( RetVal.Value & (0x1<<i)) == (0x1<<i))
+ {
+ stubManager.Write("\n\t\t\tGPI activated: ");
+ stubManager.Write(F3_CARTx_PRES_02_Bits[i]);
+ stubManager.Write("\t\t\tBit no.: ");
+ stubManager.Write(i);
+ }
+
+ }
+ return 1;
+}
+
+
+
+public void OnExecute(StubManager stubManager)
+{
+
+ for (int i=0; i<1000; i++)
+ {
+
+ Thread.Sleep(1000);
+
+ stubManager.Write("\nScanning: F3_CARTx_PRES_02_Direct");
+ CartridgePresentBit(FPGA3, F3_CARTx_PRES_02_Direct);
+ stubManager.Write("\n\n");
+
+
+ }
+
+} \ No newline at end of file
diff --git a/Software/Stubs Collection/stubs/michael stubs/Assemblies/Diagnosticsrequest.cs b/Software/Stubs Collection/stubs/michael stubs/Assemblies/Diagnosticsrequest.cs
new file mode 100644
index 000000000..b085cc8de
--- /dev/null
+++ b/Software/Stubs Collection/stubs/michael stubs/Assemblies/Diagnosticsrequest.cs
@@ -0,0 +1,173 @@
+
+StopDiagnosticsRequest stopDiagnosticsRequest = new StopDiagnosticsRequest();
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Stubs;
+using Tango.PMR.Diagnostics;
+using Tango.Stubs.UI;
+
+public void OnExecute(StubManager stubManager)
+{
+ int i = 0;
+ StartDiagnosticsRequest startDiagnosticsRequest = new StartDiagnosticsRequest();
+/* stubManager.RunContinuous<StartDiagnosticsResponse>(startDiagnosticsRequest, (response1) =>
+ {
+
+ stubManager.WriteLine (String.Format("Data, Id {0}, Id {1}, Temp {2}, % {3}",++i,response1.Monitors.Dancer1Angle[0],response1.Monitors.Dancer2Angle[0],response1.Monitors.Dancer3Angle[0]));
+
+ });
+*/
+StopDiagnosticsRequest stopDiagnosticsRequest = new StopDiagnosticsRequest();
+ var response = stubManager.Run<StopDiagnosticsResponse>(stopDiagnosticsRequest);
+
+
+}
+/*
+StartDiagnosticsResponse startDiagnosticsResponse = new StartDiagnosticsResponse();
+
+DiagnosticsMonitors diagnosticsMonitors = new DiagnosticsMonitors();
+
+Double double = new Double();
+diagnosticsMonitors.Dancer1Angle.Add(double);
+
+Double double = new Double();
+diagnosticsMonitors.Dancer2Angle.Add(double);
+
+Double double = new Double();
+diagnosticsMonitors.Dancer3Angle.Add(double);
+
+Double double = new Double();
+diagnosticsMonitors.FeederMotorFrequency.Add(double);
+
+Double double = new Double();
+diagnosticsMonitors.DryerMotor.Add(double);
+
+Double double = new Double();
+diagnosticsMonitors.PollerMotor.Add(double);
+
+Double double = new Double();
+diagnosticsMonitors.WinderMotor.Add(double);
+
+Double double = new Double();
+diagnosticsMonitors.ScrewMotor.Add(double);
+
+Double double = new Double();
+diagnosticsMonitors.ThreadSpeed.Add(double);
+
+Double double = new Double();
+diagnosticsMonitors.MixerTemperature.Add(double);
+
+Double double = new Double();
+diagnosticsMonitors.HeadZone1Temperature.Add(double);
+
+Double double = new Double();
+diagnosticsMonitors.HeadZone2Temperature.Add(double);
+
+Double double = new Double();
+diagnosticsMonitors.HeadZone3Temperature.Add(double);
+
+Double double = new Double();
+diagnosticsMonitors.HeadAirFlow.Add(double);
+
+Double double = new Double();
+diagnosticsMonitors.FeederTension.Add(double);
+
+Double double = new Double();
+diagnosticsMonitors.PullerTension.Add(double);
+
+Double double = new Double();
+diagnosticsMonitors.DryerZone1Temperature.Add(double);
+
+Double double = new Double();
+diagnosticsMonitors.DryerZone2Temperature.Add(double);
+
+Double double = new Double();
+diagnosticsMonitors.DryerZone3Temperature.Add(double);
+
+Double double = new Double();
+diagnosticsMonitors.DryerAirFlow.Add(double);
+
+Double double = new Double();
+diagnosticsMonitors.WinderTension.Add(double);
+
+DoubleArray doubleArray = new DoubleArray();
+
+Double double = new Double();
+doubleArray.Data.Add(double);
+diagnosticsMonitors.DispensersMotorsFrequency.Add(doubleArray);
+
+DoubleArray doubleArray = new DoubleArray();
+
+Double double = new Double();
+doubleArray.Data.Add(double);
+diagnosticsMonitors.DispensersAngularEncoders.Add(doubleArray);
+
+DoubleArray doubleArray = new DoubleArray();
+
+Double double = new Double();
+doubleArray.Data.Add(double);
+diagnosticsMonitors.DispensersLinearPositions.Add(doubleArray);
+
+DoubleArray doubleArray = new DoubleArray();
+
+Double double = new Double();
+doubleArray.Data.Add(double);
+diagnosticsMonitors.DispensersPressure.Add(doubleArray);
+
+Double double = new Double();
+diagnosticsMonitors.MidTankPressure.Add(double);
+
+Double double = new Double();
+diagnosticsMonitors.FilterDeltaPressure.Add(double);
+
+Double double = new Double();
+diagnosticsMonitors.ChillerTemperature.Add(double);
+
+Double double = new Double();
+diagnosticsMonitors.Dispenser1MotorFrequency.Add(double);
+
+Double double = new Double();
+diagnosticsMonitors.Dispenser2MotorFrequency.Add(double);
+
+Double double = new Double();
+diagnosticsMonitors.Dispenser3MotorFrequency.Add(double);
+
+Double double = new Double();
+diagnosticsMonitors.Dispenser4MotorFrequency.Add(double);
+
+Double double = new Double();
+diagnosticsMonitors.Dispenser5MotorFrequency.Add(double);
+
+Double double = new Double();
+diagnosticsMonitors.Dispenser6MotorFrequency.Add(double);
+
+Double double = new Double();
+diagnosticsMonitors.Dispenser7MotorFrequency.Add(double);
+
+Double double = new Double();
+diagnosticsMonitors.Dispenser8MotorFrequency.Add(double);
+
+startDiagnosticsResponse.Monitors = monitors;
+
+DigitalPin digitalPin = new DigitalPin();
+digitalPin.Port = 0;
+digitalPin.Value = false;
+startDiagnosticsResponse.DigitalPins.Add(digitalPin);
+
+ValueComponentState valueComponentState = new ValueComponentState();
+valueComponentState.Component = Tango.PMR.Diagnostics.ValueComponent.Heater1Temp;
+valueComponentState.Value = 0;
+startDiagnosticsResponse.ComponentsStates.Add(valueComponentState);
+
+Event event = new Event();
+event.Type = Tango.PMR.Diagnostics.EventType.ThreadBreak;
+event.Message = null;
+startDiagnosticsResponse.Events.Add(event);
+*/ \ No newline at end of file
diff --git a/Software/Stubs Collection/stubs/michael stubs/Assemblies/Dispenser_3WValve.cs b/Software/Stubs Collection/stubs/michael stubs/Assemblies/Dispenser_3WValve.cs
new file mode 100644
index 000000000..9dc04c57f
--- /dev/null
+++ b/Software/Stubs Collection/stubs/michael stubs/Assemblies/Dispenser_3WValve.cs
@@ -0,0 +1,73 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+include "C:\To_Backup\Mulberry\Mulberry_current\Customers\Twine\Tango\Software\Stub_scripts\Tango_Defines_Basic.cs"
+include "C:\To_Backup\Mulberry\Mulberry_current\Customers\Twine\Tango\Software\Stub_scripts\Interfaces\Tango_Defines_3WValve.cs"
+
+
+int ThreeWayValve_Dispenser (Int32 DispNo)
+{
+ Int32 Valve = 0;
+ Int32 Bit;
+
+ //Enable Valve chip
+ SetBit(FPGA2, F2_DISPENSER_VALVE_OUT, (DispNo-1) + 8, 0x1);
+ stubManager.Write("\nEnabling Valve no. ");
+ stubManager.Write(DispNo);
+
+ //Flip direction
+ Bit = GetBit(FPGA2, F2_DISPENSER_VALVE_OUT, (DispNo-1));
+ Bit = Bit ^ 0x1;
+ SetBit(FPGA2, F2_DISPENSER_VALVE_OUT, (DispNo-1), (Bit & 0x1));
+ stubManager.Write("\nFlipping Valve no. ");
+ stubManager.Write(DispNo);
+
+ //Check if valve is BUSY
+ Bit = GetBit(FPGA2, F2_DISPENSER_VALVE_IN_Direct, 15-(DispNo-1));
+
+ while (Bit == 0x1)
+ {
+
+ Bit = GetBit(FPGA2, F2_DISPENSER_VALVE_IN_Direct, 15-(DispNo-1));
+ stubManager.Write("\nBUSY Valve no. ");
+ stubManager.Write(DispNo);
+
+ }
+
+ //Disable Valve chip
+ SetBit(FPGA2, F2_DISPENSER_VALVE_OUT, (DispNo-1)+8, (Bit & 0x1));
+ stubManager.Write("\nDisabling Valve no. ");
+ stubManager.Write(DispNo);
+
+ return 1;
+
+}
+
+
+
+
+public void OnExecute(StubManager stubManager)
+{
+
+ //Set Valve pre-scaler value so that pulse to valve is 50ms
+ Fpga_Write_Reg(FPGA2, F2_Prescaler1_reg12, 0x128, 0);
+
+ ThreeWayValve_Dispenser (1);
+ //ThreeWayValve_Dispenser (2);
+ //ThreeWayValve_Dispenser (3);
+ //ThreeWayValve_Dispenser (4);
+ //ThreeWayValve_Dispenser (5);
+ //ThreeWayValve_Dispenser (6);
+ //ThreeWayValve_Dispenser (7);
+ //ThreeWayValve_Dispenser (8);
+
+} \ No newline at end of file
diff --git a/Software/Stubs Collection/stubs/michael stubs/Assemblies/Dispenser_EncoderGPIO.cs b/Software/Stubs Collection/stubs/michael stubs/Assemblies/Dispenser_EncoderGPIO.cs
new file mode 100644
index 000000000..a23fbaf52
--- /dev/null
+++ b/Software/Stubs Collection/stubs/michael stubs/Assemblies/Dispenser_EncoderGPIO.cs
@@ -0,0 +1,48 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+include "C:\To_Backup\Mulberry\Mulberry_current\Customers\Twine\Tango\Software\Stub_scripts\Tango_Defines_Basic.cs"
+include "C:\To_Backup\Mulberry\Mulberry_current\Customers\Twine\Tango\Software\Stub_scripts\Interfaces\Tango_Defines_GPIO.cs"
+
+
+public void OnExecute(StubManager stubManager)
+{
+ //8..15 : F3_DISPENSER_ROTENC_C
+ //0...7 : F3_DISPENSER_ROTENC_Z
+ //Input F3_DISPENSER_ROTENC_IN_Direct
+ //Output F3_DISPENSER_ROTENC_OUT
+
+ Int32 i = 0;
+ int rv = 0;
+
+
+ rv = GetBit(FPGA3, F3_DISPENSER_ROTENC_IN_Direct, i);
+ stubManager.Write("\n\nRead GPI F3_DISPENSER_ROTENC_IN_Direct, bit "); stubManager.Write(i); stubManager.Write(", "); stubManager.Write(F3_DISPENSER_ROTENC_IN_Bits[i]);stubManager.Write(", = ");stubManager.Write(rv);
+ Thread.Sleep(50);
+
+ SetBit (FPGA3, F3_DISPENSER_ROTENC_OUT, i, 1);
+ stubManager.Write("\n\nSetting GPO F3_DISPENSER_ROTENC_OUT, bit "); stubManager.Write(i); stubManager.Write(", "); stubManager.Write(F3_DISPENSER_ROTENC_Bits[i]);
+ Thread.Sleep(50);
+
+ rv = GetBit(FPGA3, F3_DISPENSER_ROTENC_IN_Direct, i);
+ stubManager.Write("\n\nRead GPI F3_DISPENSER_ROTENC_IN_Direct, bit "); stubManager.Write(i); stubManager.Write(", "); stubManager.Write(F3_DISPENSER_ROTENC_IN_Bits[i]);stubManager.Write(", = ");stubManager.Write(rv);
+ Thread.Sleep(50);
+
+ SetBit (FPGA3, F3_DISPENSER_ROTENC_OUT, i, 0);
+ stubManager.Write("\n\nClearing GPO F3_DISPENSER_ROTENC_OUT, bit "); stubManager.Write(i); stubManager.Write(", "); stubManager.Write(F3_DISPENSER_ROTENC_Bits[i]);
+ Thread.Sleep(50);
+
+ rv = GetBit(FPGA3, F3_DISPENSER_ROTENC_IN_Direct, i);
+ stubManager.Write("\n\nRead GPI F3_DISPENSER_ROTENC_IN_Direct, bit "); stubManager.Write(i); stubManager.Write(", "); stubManager.Write(F3_DISPENSER_ROTENC_IN_Bits[i]);stubManager.Write(", = ");stubManager.Write(rv);
+ Thread.Sleep(50);
+
+} \ No newline at end of file
diff --git a/Software/Stubs Collection/stubs/michael stubs/Assemblies/Dispenser_LimitSwitch.cs b/Software/Stubs Collection/stubs/michael stubs/Assemblies/Dispenser_LimitSwitch.cs
new file mode 100644
index 000000000..5f3e26210
--- /dev/null
+++ b/Software/Stubs Collection/stubs/michael stubs/Assemblies/Dispenser_LimitSwitch.cs
@@ -0,0 +1,98 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+include "C:\To_Backup\Mulberry\Mulberry_current\Customers\Twine\Tango\Software\Stub_scripts\Tango_Defines_Basic.cs"
+include "C:\To_Backup\Mulberry\Mulberry_current\Customers\Twine\Tango\Software\Stub_scripts\Interfaces\Tango_Defines_LimitSwitch.cs"
+
+
+int LimitSW_Dispenser(Int32 Fpga, Int32 Adr, Int32 DispNo)
+{
+
+ var RetVal = Fpga_Read_Reg(Fpga, Adr, 0);
+
+ //RetVal.Value = RetVal.Value & F2_LS_0X_Up_Down_Pattern;
+
+ if ( (DispNo & 0x1) == 0x1)
+ {
+ if ( (RetVal.Value & 0x0020) == 0x0)
+ {
+ stubManager.Write("\nF2_LS_DISPENSER_UP_");
+ stubManager.Write(DispNo);
+
+ }
+ if ( (RetVal.Value & 0x0004) == 0x0)
+ {
+ stubManager.Write("\nF2_LS_DISPENSER_DOWN_");
+ stubManager.Write(DispNo);
+ }
+ if ( (RetVal.Value & 0x0002) == 0x0)
+ {
+ stubManager.Write("\nF2_LS_DISPENSER_50%_");
+ stubManager.Write(DispNo);
+ }
+ if ( (RetVal.Value & 0x0010) == 0x0)
+ {
+ stubManager.Write("\nF2_LS_DISPENSER_25%_");
+ stubManager.Write(DispNo);
+ }
+ }
+ else
+ {
+ if ( (RetVal.Value & 0x800) == 0x0)
+ {
+ stubManager.Write("\nF2_LS_DISPENSER_UP_");
+ stubManager.Write(DispNo);
+ }
+ if ( (RetVal.Value & 0x100) == 0x0)
+ {
+ stubManager.Write("\nF2_LS_DISPENSER_DOWN_");
+ stubManager.Write(DispNo);
+ }
+ if ( (RetVal.Value & 0x80) == 0x0)
+ {
+ stubManager.Write("\nF2_LS_DISPENSER_50%_");
+ stubManager.Write(DispNo);
+ }
+ if ( (RetVal.Value & 0x400) == 0x0)
+ {
+ stubManager.Write("\nF2_LS_DISPENSER_25%_");
+ stubManager.Write(DispNo);
+ }
+ }
+
+ return 1;
+}
+
+
+
+public void OnExecute(StubManager stubManager)
+{
+
+ for (int i=0; i<10000; i++)
+ {
+ LimitSW_Dispenser(FPGA2, F2_LS_01_Direct, 1);
+ //LimitSW_Dispenser(FPGA2, F2_LS_01_Direct, 2);
+ //LimitSW_Dispenser(FPGA2, F2_LS_02_Direct, 3);
+ //LimitSW_Dispenser(FPGA2, F2_LS_02_Direct, 4);
+ //LimitSW_Dispenser(FPGA2, F2_LS_03_Direct, 5);
+ //LimitSW_Dispenser(FPGA2, F2_LS_03_Direct, 6);
+ //LimitSW_Dispenser(FPGA2, F2_LS_04_Direct, 7);
+ //LimitSW_Dispenser(FPGA2, F2_LS_04_Direct, 8);
+
+ stubManager.Write("\nIndex =");
+ stubManager.Write(i);
+ Thread.Sleep(200);
+ }
+
+
+
+} \ No newline at end of file
diff --git a/Software/Stubs Collection/stubs/michael stubs/Assemblies/Dispenser_Motors.cs b/Software/Stubs Collection/stubs/michael stubs/Assemblies/Dispenser_Motors.cs
new file mode 100644
index 000000000..9f54b0cc2
--- /dev/null
+++ b/Software/Stubs Collection/stubs/michael stubs/Assemblies/Dispenser_Motors.cs
@@ -0,0 +1,51 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+include "D:\stubs\michael stubs\Tango_Defines_Basic.cs"
+include "D:\stubs\michael stubs\Interfaces\Tango_Defines_Motors.cs"
+
+
+int Motor_Dispenser(Int32 Fpga, Int32 HighAdr, Int32 LowAdr)
+{
+ Motor_OutOfReset();
+
+ Motor_HighZ(Fpga, HighAdr, LowAdr);
+
+ Motor_ReadCfg(Fpga, HighAdr, LowAdr);
+
+
+ Motor_Run(Fpga, HighAdr, LowAdr, 0x3fffff, 0x1);
+ Thread.Sleep(6000);
+ Motor_Run(Fpga, HighAdr, LowAdr, 0x3fffff, 0x0);
+ Thread.Sleep(6000);
+ Motor_HighZ(Fpga, HighAdr, LowAdr);
+
+ return 1;
+}
+
+
+
+public void OnExecute(StubManager stubManager)
+{
+
+// Motor_Dispenser(FPGA2, F2_MOTO_DISPENSER_A1_1_TX_01, F2_MOTO_DISPENSER_A1_1_TX_00);
+ //Motor_Dispenser(FPGA2, F2_MOTO_DISPENSER_A1_2_TX_01, F2_MOTO_DISPENSER_A1_2_TX_00);
+ //Motor_Dispenser(FPGA2, F2_MOTO_DISPENSER_A1_3_TX_01, F2_MOTO_DISPENSER_A1_3_TX_00);
+ Motor_Dispenser(FPGA2, F2_MOTO_DISPENSER_A1_4_TX_01, F2_MOTO_DISPENSER_A1_4_TX_00);
+ //Motor_Dispenser(FPGA2, F2_MOTO_DISPENSER_A1_5_TX_01, F2_MOTO_DISPENSER_A1_5_TX_00);
+ //Motor_Dispenser(FPGA2, F2_MOTO_DISPENSER_A1_6_TX_01, F2_MOTO_DISPENSER_A1_6_TX_00);
+ //Motor_Dispenser(FPGA2, F2_MOTO_DISPENSER_A1_7_TX_01, F2_MOTO_DISPENSER_A1_7_TX_00);
+ //Motor_Dispenser(FPGA2, F2_MOTO_DISPENSER_A1_8_TX_01, F2_MOTO_DISPENSER_A1_8_TX_00);
+
+
+
+} \ No newline at end of file
diff --git a/Software/Stubs Collection/stubs/michael stubs/Assemblies/Dispenser_PressureSensor.cs b/Software/Stubs Collection/stubs/michael stubs/Assemblies/Dispenser_PressureSensor.cs
new file mode 100644
index 000000000..041f6e1ba
--- /dev/null
+++ b/Software/Stubs Collection/stubs/michael stubs/Assemblies/Dispenser_PressureSensor.cs
@@ -0,0 +1,40 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+include "C:\To_Backup\Mulberry\Mulberry_current\Customers\Twine\Tango\Software\Stub_scripts\Tango_Defines_Basic.cs"
+
+
+/*
+
+Name Input channel Input parameter in the stub
+CHAN_DISPENSE_PRESSURE_1 ADC_CTL_CH2 2
+CHAN_DISPENSE_PRESSURE_2 ADC_CTL_CH3 3
+CHAN_DISPENSE_PRESSURE_3 ADC_CTL_CH4 4
+CHAN_DISPENSE_PRESSURE_4 ADC_CTL_CH5 5
+CHAN_DISPENSE_PRESSURE_5 ADC_CTL_CH6 6
+CHAN_DISPENSE_PRESSURE_6 ADC_CTL_CH7 7
+CHAN_DISPENSE_PRESSURE_7 ADC_CTL_CH8 8
+CHAN_DISPENSE_PRESSURE_8 ADC_CTL_CH9 9
+*/
+
+public void OnExecute(StubManager stubManager)
+{
+
+ for (int i=2; i<10; i++)
+ {
+ Thread.Sleep(1000);
+ var response = stubManager.Run<StubIntADCReadResponse>("StubIntADCReadRequest" ,i);
+ stubManager.Write("\nADC VALUE, DISPENSER "); stubManager.Write(i-1); stubManager.Write("\t"); stubManager.WriteHex(response.SamplingInBits, 4); stubManager.Write("\t"); stubManager.Write(response.VoltageSamplingMv); stubManager.Write(" mV");
+ }
+
+
+} \ No newline at end of file
diff --git a/Software/Stubs Collection/stubs/michael stubs/Assemblies/Dispenser_SSI.cs b/Software/Stubs Collection/stubs/michael stubs/Assemblies/Dispenser_SSI.cs
new file mode 100644
index 000000000..8c6f3a2b0
--- /dev/null
+++ b/Software/Stubs Collection/stubs/michael stubs/Assemblies/Dispenser_SSI.cs
@@ -0,0 +1,82 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+include "C:\To_Backup\Mulberry\Mulberry_current\Customers\Twine\Tango\Software\Stub_scripts\Tango_Defines_Basic.cs"
+include "C:\To_Backup\Mulberry\Mulberry_current\Customers\Twine\Tango\Software\Stub_scripts\Interfaces\Tango_Defines_SSI.cs"
+
+public void OnExecute(StubManager stubManager)
+{
+
+ int k = 0;
+
+ Fpga_Read_Reg(FPGA1, F1_Prescaler1_reg1,0 );
+ Fpga_Read_Reg(FPGA1, F1_Prescaler1_reg2,0 );
+
+ //Set output clock frequency to about 200 kHz
+ Fpga_Write_Reg(FPGA1, F1_Prescaler1_reg1, 0x0024, 0);
+ Fpga_Write_Reg(FPGA1, F1_Prescaler1_reg2, 0x0024, 0);
+
+ Fpga_Read_Reg(FPGA1, F1_Prescaler1_reg1, 0);
+ Fpga_Read_Reg(FPGA1, F1_Prescaler1_reg2, 0);
+
+ for (int i = 0; i < 100000; i++)
+ {
+
+
+ SSI_Read_Write(FPGA1, F1_RDANCER_ROTENC_MSB, F1_RDANCER_ROTENC_LSB, F1_RDANCER_ROTENC_TX);
+ SSI_Read_Write(FPGA1, F1_RSPARE_ROTENC_MSB, F1_RSPARE_ROTENC_LSB, F1_RSPARE_ROTENC_TX);
+ stubManager.Write("\n");
+ k++;
+ if ( (k & 0x8) == 0x08 ) {
+ k = 0;
+ stubManager.Write(" RDANCER RSPARE \n");
+ }
+
+ /*
+ stubManager.Write("\n\nF1_LDANCER1_ROTENC_TX");
+ ssi_loop(F1_LDANCER1_ROTENC_TX);
+ Thread.Sleep(1000);
+
+ stubManager.Write("\n\nF1_LDANCER2_ROTENC_TX");
+ ssi_loop(F1_LDANCER2_ROTENC_TX);
+ Thread.Sleep(1000);
+
+ stubManager.Write("\n\nF1_LSPARE_ROTENC_TX");
+ ssi_loop(F1_LSPARE_ROTENC_TX);
+ Thread.Sleep(1000);
+
+ stubManager.Write("\n\nF1_RDANCER_ROTENC_TX");
+ ssi_loop(F1_RDANCER_ROTENC_TX);
+ Thread.Sleep(1000);
+
+ stubManager.Write("\n\nF1_RSPARE_ROTENC_TX");
+ ssi_loop(F1_RSPARE_ROTENC_TX);
+ Thread.Sleep(1000);
+
+ */
+ }
+
+
+}
+
+/* Sample output when turning F1_RSPARE_ROTENC - output is 12 bits
+(F1_RSPARE_ROTENC_MSB, F1_RSPARE_ROTENC_LSB) = (#0000, #0A6F)
+(F1_RSPARE_ROTENC_MSB, F1_RSPARE_ROTENC_LSB) = (#0000, #0A71)
+(F1_RSPARE_ROTENC_MSB, F1_RSPARE_ROTENC_LSB) = (#0000, #0A68)
+(F1_RSPARE_ROTENC_MSB, F1_RSPARE_ROTENC_LSB) = (#0000, #09BA)
+(F1_RSPARE_ROTENC_MSB, F1_RSPARE_ROTENC_LSB) = (#0000, #0859)
+(F1_RSPARE_ROTENC_MSB, F1_RSPARE_ROTENC_LSB) = (#0000, #06C6)
+(F1_RSPARE_ROTENC_MSB, F1_RSPARE_ROTENC_LSB) = (#0000, #05EA)
+(F1_RSPARE_ROTENC_MSB, F1_RSPARE_ROTENC_LSB) = (#0000, #05CE)
+(F1_RSPARE_ROTENC_MSB, F1_RSPARE_ROTENC_LSB) = (#0000, #05B3)
+(F1_RSPARE_ROTENC_MSB, F1_RSPARE_ROTENC_LSB) = (#0000, #0599)
+(F1_RSPARE_ROTENC_MSB, F1_RSPARE_ROTENC_LSB) = (#0000, #0580)*/ \ No newline at end of file
diff --git a/Software/Stubs Collection/stubs/michael stubs/Assemblies/Dryer_Motors.cs b/Software/Stubs Collection/stubs/michael stubs/Assemblies/Dryer_Motors.cs
new file mode 100644
index 000000000..405957a74
--- /dev/null
+++ b/Software/Stubs Collection/stubs/michael stubs/Assemblies/Dryer_Motors.cs
@@ -0,0 +1,44 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+include "C:\To_Backup\Mulberry\Mulberry_current\Customers\Twine\Tango\Software\Stub_scripts\Tango_Defines_Basic.cs"
+include "C:\To_Backup\Mulberry\Mulberry_current\Customers\Twine\Tango\Software\Stub_scripts\Interfaces\Tango_Defines_Motors.cs"
+
+
+int Motor_Dispenser(Int32 Fpga, Int32 HighAdr, Int32 LowAdr)
+{
+ Motor_OutOfReset();
+
+ Motor_HighZ(Fpga, HighAdr, LowAdr);
+
+ Motor_ReadCfg(Fpga, HighAdr, LowAdr);
+
+
+ Motor_Run(Fpga, HighAdr, LowAdr, 0x3fffff, 0x1);
+ Thread.Sleep(6000);
+ Motor_Run(Fpga, HighAdr, LowAdr, 0x3fffff, 0x0);
+ Thread.Sleep(6000);
+ Motor_HighZ(Fpga, HighAdr, LowAdr);
+
+ return 1;
+}
+
+
+
+public void OnExecute(StubManager stubManager)
+{
+
+ Motor_Dispenser(FPGA1, F1_MOTO_DRYER_LOADARM_A1_TX_01, F1_MOTO_DRYER_LOADARM_A1_TX_00);
+ //Motor_Dispenser(FPGA1, F1_MOTO_DRYER_DRIVING_A1_TX_01, F1_MOTO_DRYER_DRIVING_A1_TX_00);
+ //Motor_Dispenser(FPGA1, F1_MOTO_DRYER_LID_A1_TX_01, F1_MOTO_DRYER_LID_A1_TX_00);
+
+} \ No newline at end of file
diff --git a/Software/Stubs Collection/stubs/michael stubs/Assemblies/Dryer_QEI.cs b/Software/Stubs Collection/stubs/michael stubs/Assemblies/Dryer_QEI.cs
new file mode 100644
index 000000000..eb3be1200
--- /dev/null
+++ b/Software/Stubs Collection/stubs/michael stubs/Assemblies/Dryer_QEI.cs
@@ -0,0 +1,35 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+include "C:\To_Backup\Mulberry\Mulberry_current\Customers\Twine\Tango\LAB_Tests\Main_PCB\ATP_Test\Scripts\Defines\Tango_Defines_Basic.cs"
+include "C:\To_Backup\Mulberry\Mulberry_current\Customers\Twine\Tango\LAB_Tests\Main_PCB\ATP_Test\Scripts\Defines\Tango_Defines_QEI.cs""
+
+
+public void OnExecute(StubManager stubManager)
+{
+
+ for (int i = 0; i < 100; i++)
+ {
+ stubManager.Write("\n");
+ var rv1 = Fpga_Read_Reg(FPGA1, F1_DRYER_LOADARM_ROTENC_lsb, 0);
+ var rv2 = Fpga_Read_Reg(FPGA1, F1_DRYER_LOADARM_ROTENC_msb, 0);
+
+ stubManager.WriteHex(rv2.Value, 4);
+ stubManager.Write("\t");
+ stubManager.WriteHex(rv1.Value, 4);
+
+ stubManager.Write("\n");
+
+ Thread.Sleep(400);
+ }
+
+} \ No newline at end of file
diff --git a/Software/Stubs Collection/stubs/michael stubs/Assemblies/DyeingHead_Motors.cs b/Software/Stubs Collection/stubs/michael stubs/Assemblies/DyeingHead_Motors.cs
new file mode 100644
index 000000000..b1e061612
--- /dev/null
+++ b/Software/Stubs Collection/stubs/michael stubs/Assemblies/DyeingHead_Motors.cs
@@ -0,0 +1,44 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+include "C:\To_Backup\Mulberry\Mulberry_current\Customers\Twine\Tango\Software\Stub_scripts\Tango_Defines_Basic.cs"
+include "C:\To_Backup\Mulberry\Mulberry_current\Customers\Twine\Tango\Software\Stub_scripts\Interfaces\Tango_Defines_Motors.cs"
+
+
+int Motor_Dispenser(Int32 Fpga, Int32 HighAdr, Int32 LowAdr)
+{
+ Motor_OutOfReset();
+
+ Motor_HighZ(Fpga, HighAdr, LowAdr);
+
+ Motor_ReadCfg(Fpga, HighAdr, LowAdr);
+
+
+ Motor_Run(Fpga, HighAdr, LowAdr, 0x3fffff, 0x1);
+ Thread.Sleep(6000);
+ Motor_Run(Fpga, HighAdr, LowAdr, 0x3fffff, 0x0);
+ Thread.Sleep(6000);
+ Motor_HighZ(Fpga, HighAdr, LowAdr);
+
+ return 1;
+}
+
+
+
+public void OnExecute(StubManager stubManager)
+{
+
+ Motor_Dispenser(FPGA1, F1_MOTO_DH_CLEANHEAD_A1_TX_01, F1_MOTO_DH_CLEANHEAD_A1_TX_00);
+ //Motor_Dispenser(FPGA1, F1_MOTO_DH_CLEANMECH_A1_TX_01, F1_MOTO_DH_CLEANMECH_A1_TX_00);
+ //Motor_Dispenser(FPGA1, F1_MOTO_DH_LID_A1_TX_01, F1_MOTO_DH_LID_A1_TX_00);
+
+} \ No newline at end of file
diff --git a/Software/Stubs Collection/stubs/michael stubs/Assemblies/DyeingHead_PT100.cs b/Software/Stubs Collection/stubs/michael stubs/Assemblies/DyeingHead_PT100.cs
new file mode 100644
index 000000000..6fd0c8237
--- /dev/null
+++ b/Software/Stubs Collection/stubs/michael stubs/Assemblies/DyeingHead_PT100.cs
@@ -0,0 +1,155 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+include "D:\stubs\michael stubs\Tango_Defines_Basic.cs"
+include "D:\stubs\michael stubs\Interfaces\Tango_Defines_PT100.cs"
+
+
+Int32 ADS1220_Setup(Int32 Fpga, Int32 HighAdr, Int32 LowAdr, Int32 BusyBitNo)
+{
+ ADS1220_Reset(Fpga, HighAdr, LowAdr);
+ ADS1220_WriteReg(Fpga, HighAdr, LowAdr, 0x0, 0x08);
+ //ADS1220_WriteReg(Fpga, HighAdr, LowAdr, 0x1, 0x04); //Continious mode
+ ADS1220_WriteReg(Fpga, HighAdr, LowAdr, 0x1, 0x00); //Single shot mode
+ ADS1220_WriteReg(Fpga, HighAdr, LowAdr, 0x2, 0x55);
+ ADS1220_WriteReg(Fpga, HighAdr, LowAdr, 0x3, 0x70);
+ //ADS1220_StartSync(Fpga, HighAdr, LowAdr);
+ return 1;
+}
+
+
+Int32 ADS1220_ConvertionProcess(Int32 Fpga, Int32 HighAdr, Int32 LowAdr, Int32 BusyBitNo)
+{
+ Int32 rv;
+
+ ADS1220_StartSync(Fpga, HighAdr, LowAdr);
+ Thread.Sleep(100);
+ //rv = ADS1220_GetConvertion(Fpga, HighAdr, LowAdr, BusyBitNo);
+ rv = ADS1220_LoadOutReg(Fpga, HighAdr, LowAdr, BusyBitNo);
+ stubManager.WriteHex( rv ,8); stubManager.Write("\t");
+ return rv;
+}
+
+
+public void OnExecute(StubManager stubManager)
+{
+ int rv = 0;
+ int k = 0;
+
+
+ ADS1220_Setup(FPGA2, F2_ANALOG_DRYER_TEMP1_1_TX_01, F2_ANALOG_DRYER_TEMP1_1_TX_00, 0);
+ ADS1220_Setup(FPGA2, F2_ANALOG_DRYER_TEMP2_1_TX_01, F2_ANALOG_DRYER_TEMP2_1_TX_00, 1);
+ ADS1220_Setup(FPGA2, F2_ANALOG_DRYER_TEMP3_1_TX_01, F2_ANALOG_DRYER_TEMP3_1_TX_00, 2);
+
+ ADS1220_Setup(FPGA2, F2_ANALOG_DYEINGH_TEMP1_1_TX_01, F2_ANALOG_DYEINGH_TEMP1_1_TX_00, 3);
+ ADS1220_Setup(FPGA2, F2_ANALOG_DYEINGH_TEMP2_1_TX_01, F2_ANALOG_DYEINGH_TEMP2_1_TX_00, 4);
+ ADS1220_Setup(FPGA2, F2_ANALOG_DYEINGH_TEMP3_1_TX_01, F2_ANALOG_DYEINGH_TEMP3_1_TX_00, 5);
+
+ ADS1220_Setup(FPGA2, F2_ANALOG_DYEINGH_TEMP4_1_TX_01, F2_ANALOG_DYEINGH_TEMP4_1_TX_00, 6);
+ ADS1220_Setup(FPGA2, F2_ANALOG_DYEINGH_TEMP5_1_TX_01, F2_ANALOG_DYEINGH_TEMP5_1_TX_00, 7);
+ ADS1220_Setup(FPGA2, F2_ANALOG_MIXCHIP_TEMP_1_TX_01, F2_ANALOG_MIXCHIP_TEMP_1_TX_00, 8);
+
+ ADS1220_Setup(FPGA2, F2_AN_ENCLOSURETEMP1_1_TX_01, F2_AN_ENCLOSURETEMP1_1_TX_00, 9);
+ ADS1220_Setup(FPGA2, F2_AN_ENCLOSURETEMP2_1_TX_01, F2_AN_ENCLOSURETEMP2_1_TX_00, 10);
+ ADS1220_Setup(FPGA2, F2_AN_ENCLOSURETEMP3_1_TX_01, F2_AN_ENCLOSURETEMP3_1_TX_00, 11);
+ stubManager.Write("DRYER_TEMP1\tDRYER_TEMP2\tDRYER_TEMP3\tDYH_TEMP1\tDYH_TEMP2\tDYH_TEMP3\tDYH_TEMP4\tDYH_TEMP5\tMIX_TEMP\tENCTEMP1\tENCTEMP2\tENCTEMP3\n");
+
+ /*
+ rv = ADS1220_Process(FPGA2, F2_ANALOG_DYEINGH_TEMP1_1_TX_01, F2_ANALOG_DYEINGH_TEMP1_1_TX_00, 3);
+ stubManager.Write("\nF2_ANALOG_DYEINGH_TEMP1_1_TX_01: ");
+ stubManager.WriteHex( rv ,8);
+*/
+ for (int i=0; i < 100; i++)
+ {
+
+ rv = ADS1220_ConvertionProcess(FPGA2, F2_ANALOG_DRYER_TEMP1_1_TX_01, F2_ANALOG_DRYER_TEMP1_1_TX_00, 0);
+ rv = ADS1220_ConvertionProcess(FPGA2, F2_ANALOG_DRYER_TEMP2_1_TX_01, F2_ANALOG_DRYER_TEMP2_1_TX_00, 1);
+ rv = ADS1220_ConvertionProcess(FPGA2, F2_ANALOG_DRYER_TEMP3_1_TX_01, F2_ANALOG_DRYER_TEMP3_1_TX_00, 2);
+
+ rv = ADS1220_ConvertionProcess(FPGA2, F2_ANALOG_DYEINGH_TEMP1_1_TX_01, F2_ANALOG_DYEINGH_TEMP1_1_TX_00, 3);
+ rv = ADS1220_ConvertionProcess(FPGA2, F2_ANALOG_DYEINGH_TEMP2_1_TX_01, F2_ANALOG_DYEINGH_TEMP2_1_TX_00, 4);
+ rv = ADS1220_ConvertionProcess(FPGA2, F2_ANALOG_DYEINGH_TEMP3_1_TX_01, F2_ANALOG_DYEINGH_TEMP3_1_TX_00, 5);
+
+ rv = ADS1220_ConvertionProcess(FPGA2, F2_ANALOG_DYEINGH_TEMP4_1_TX_01, F2_ANALOG_DYEINGH_TEMP4_1_TX_00, 6);
+ rv = ADS1220_ConvertionProcess(FPGA2, F2_ANALOG_DYEINGH_TEMP5_1_TX_01, F2_ANALOG_DYEINGH_TEMP5_1_TX_00, 7);
+ rv = ADS1220_ConvertionProcess(FPGA2, F2_ANALOG_MIXCHIP_TEMP_1_TX_01, F2_ANALOG_MIXCHIP_TEMP_1_TX_00, 8);
+
+ rv = ADS1220_ConvertionProcess(FPGA2, F2_AN_ENCLOSURETEMP1_1_TX_01, F2_AN_ENCLOSURETEMP1_1_TX_00, 9);
+ rv = ADS1220_ConvertionProcess(FPGA2, F2_AN_ENCLOSURETEMP2_1_TX_01, F2_AN_ENCLOSURETEMP2_1_TX_00, 10);
+ rv = ADS1220_ConvertionProcess(FPGA2, F2_AN_ENCLOSURETEMP3_1_TX_01, F2_AN_ENCLOSURETEMP3_1_TX_00, 11);
+
+ stubManager.Write("\n");
+
+ k++;
+ if ( (k & 0x10) == 0x10 )
+ {
+ k = 0;
+ stubManager.Write("\nDRYER_TEMP1\tDRYER_TEMP2\tDRYER_TEMP3\tDYH_TEMP1\tDYH_TEMP2\tDYH_TEMP3\tDYH_TEMP4\tDYH_TEMP5\tMIX_TEMP\tENCTEMP1\tENCTEMP2\tENCTEMP3\n");
+ }
+
+ }
+
+
+}
+
+ /*
+ ADS1220_LoadOutReg(FPGA2, F2_ANALOG_DYEINGH_TEMP1_1_TX_01, F2_ANALOG_DYEINGH_TEMP1_1_TX_00);
+ rv = ADS1220_GetConvertion(FPGA2, F2_ANALOG_DYEINGH_TEMP1_1_TX_01, F2_ANALOG_DYEINGH_TEMP1_1_TX_00, 3);
+ stubManager.WriteHex( rv ,8); stubManager.Write("\t\t\t");
+ ADS1220_LoadOutReg(FPGA2, F2_ANALOG_DYEINGH_TEMP2_1_TX_01, F2_ANALOG_DYEINGH_TEMP2_1_TX_00);
+ rv = ADS1220_GetConvertion(FPGA2, F2_ANALOG_DYEINGH_TEMP2_1_TX_01, F2_ANALOG_DYEINGH_TEMP2_1_TX_00, 4);
+ stubManager.WriteHex( rv ,8); stubManager.Write("\t\t\t");
+ ADS1220_LoadOutReg(FPGA2, F2_ANALOG_DYEINGH_TEMP3_1_TX_01, F2_ANALOG_DYEINGH_TEMP3_1_TX_00);
+ rv = ADS1220_GetConvertion(FPGA2, F2_ANALOG_DYEINGH_TEMP3_1_TX_01, F2_ANALOG_DYEINGH_TEMP3_1_TX_00, 5);
+ stubManager.WriteHex( rv ,8);
+ */
+
+
+ /*
+ rv = ADS1220_ReadReg(FPGA2, F2_ANALOG_DYEINGH_TEMP1_1_TX_01, F2_ANALOG_DYEINGH_TEMP1_1_TX_00, 0x0, 3) ;
+ stubManager.WriteHex( rv ,8);
+
+ rv = ADS1220_ReadReg(FPGA2, F2_ANALOG_DYEINGH_TEMP1_1_TX_01, F2_ANALOG_DYEINGH_TEMP1_1_TX_00, 0x1, 3) ;
+ stubManager.WriteHex( rv ,8);
+
+ rv = ADS1220_ReadReg(FPGA2, F2_ANALOG_DYEINGH_TEMP1_1_TX_01, F2_ANALOG_DYEINGH_TEMP1_1_TX_00, 0x2, 3) ;
+ stubManager.WriteHex( rv ,8);
+
+ rv = ADS1220_ReadReg(FPGA2, F2_ANALOG_DYEINGH_TEMP1_1_TX_01, F2_ANALOG_DYEINGH_TEMP1_1_TX_00, 0x3, 3) ;
+ stubManager.WriteHex( rv ,8);
+ */
+
+
+ //F2_ANALOG_DYEINGH_TEMP1
+ /*
+ ADS1220_Reset(FPGA2, F2_ANALOG_DYEINGH_TEMP1_1_TX_01, F2_ANALOG_DYEINGH_TEMP2_1_TX_00);
+ ADS1220_WriteReg(FPGA2, F2_ANALOG_DYEINGH_TEMP1_1_TX_01, F2_ANALOG_DYEINGH_TEMP1_1_TX_00, 0x0, 0x08);
+ ADS1220_WriteReg(FPGA2, F2_ANALOG_DYEINGH_TEMP1_1_TX_01, F2_ANALOG_DYEINGH_TEMP1_1_TX_00, 0x1, 0x04);
+ ADS1220_WriteReg(FPGA2, F2_ANALOG_DYEINGH_TEMP1_1_TX_01, F2_ANALOG_DYEINGH_TEMP1_1_TX_00, 0x2, 0x55);
+ ADS1220_WriteReg(FPGA2, F2_ANALOG_DYEINGH_TEMP1_1_TX_01, F2_ANALOG_DYEINGH_TEMP1_1_TX_00, 0x3, 0x70);
+ ADS1220_StartSync(FPGA2, F2_ANALOG_DYEINGH_TEMP1_1_TX_01, F2_ANALOG_DYEINGH_TEMP1_1_TX_00);
+
+ //F2_ANALOG_DYEINGH_TEMP2
+ ADS1220_Reset(FPGA2, F2_ANALOG_DYEINGH_TEMP2_1_TX_01, F2_ANALOG_DYEINGH_TEMP2_1_TX_00);
+ ADS1220_WriteReg(FPGA2, F2_ANALOG_DYEINGH_TEMP2_1_TX_01, F2_ANALOG_DYEINGH_TEMP2_1_TX_00, 0x0, 0x08);
+ ADS1220_WriteReg(FPGA2, F2_ANALOG_DYEINGH_TEMP2_1_TX_01, F2_ANALOG_DYEINGH_TEMP2_1_TX_00, 0x1, 0x04);
+ ADS1220_WriteReg(FPGA2, F2_ANALOG_DYEINGH_TEMP2_1_TX_01, F2_ANALOG_DYEINGH_TEMP2_1_TX_00, 0x2, 0x55);
+ ADS1220_WriteReg(FPGA2, F2_ANALOG_DYEINGH_TEMP2_1_TX_01, F2_ANALOG_DYEINGH_TEMP2_1_TX_00, 0x3, 0x70);
+ ADS1220_StartSync(FPGA2, F2_ANALOG_DYEINGH_TEMP2_1_TX_01, F2_ANALOG_DYEINGH_TEMP2_1_TX_00);
+
+ //F2_ANALOG_DYEINGH_TEMP3
+ ADS1220_Reset(FPGA2, F2_ANALOG_DYEINGH_TEMP3_1_TX_01, F2_ANALOG_DYEINGH_TEMP3_1_TX_00);
+ ADS1220_WriteReg(FPGA2, F2_ANALOG_DYEINGH_TEMP3_1_TX_01, F2_ANALOG_DYEINGH_TEMP3_1_TX_00, 0x0, 0x08);
+ ADS1220_WriteReg(FPGA2, F2_ANALOG_DYEINGH_TEMP3_1_TX_01, F2_ANALOG_DYEINGH_TEMP3_1_TX_00, 0x1, 0x04);
+ ADS1220_WriteReg(FPGA2, F2_ANALOG_DYEINGH_TEMP3_1_TX_01, F2_ANALOG_DYEINGH_TEMP3_1_TX_00, 0x2, 0x55);
+ ADS1220_WriteReg(FPGA2, F2_ANALOG_DYEINGH_TEMP3_1_TX_01, F2_ANALOG_DYEINGH_TEMP3_1_TX_00, 0x3, 0x70);
+ */ \ No newline at end of file
diff --git a/Software/Stubs Collection/stubs/michael stubs/Assemblies/DyeingHead_Valve.cs b/Software/Stubs Collection/stubs/michael stubs/Assemblies/DyeingHead_Valve.cs
new file mode 100644
index 000000000..34088924b
--- /dev/null
+++ b/Software/Stubs Collection/stubs/michael stubs/Assemblies/DyeingHead_Valve.cs
@@ -0,0 +1,32 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+include "C:\To_Backup\Mulberry\Mulberry_current\Customers\Twine\Tango\Software\Stub_scripts\Tango_Defines_Basic.cs"
+include "C:\To_Backup\Mulberry\Mulberry_current\Customers\Twine\Tango\Software\Stub_scripts\Interfaces\Tango_Defines_GPO.cs"
+
+
+public void OnExecute(StubManager stubManager)
+{
+
+ //for (int i=0; i<16; i++)
+ //{
+
+ Int32 i = 7; //VALVE_MIXCHIP_WASTECH
+
+ SetBit (FPGA1, F1_gpo_01, i, 1);
+ stubManager.Write("\n\nSetting GPO F1_gpo_01, bit "); stubManager.Write(i); stubManager.Write(", "); stubManager.Write(F1_gpo_01_Bits[i]);
+ Thread.Sleep(1000);
+ SetBit (FPGA1, F1_gpo_01, i, 0);
+ stubManager.Write("\nClearing GPO F1_gpo_01, bit "); stubManager.Write(i); stubManager.Write(", "); stubManager.Write(F1_gpo_01_Bits[i]);
+ Thread.Sleep(1000);
+ //}
+} \ No newline at end of file
diff --git a/Software/Stubs Collection/stubs/michael stubs/Assemblies/ElectricalEnclosure_Fans.cs b/Software/Stubs Collection/stubs/michael stubs/Assemblies/ElectricalEnclosure_Fans.cs
new file mode 100644
index 000000000..1b42d7b67
--- /dev/null
+++ b/Software/Stubs Collection/stubs/michael stubs/Assemblies/ElectricalEnclosure_Fans.cs
@@ -0,0 +1,42 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+include "C:\To_Backup\Mulberry\Mulberry_current\Customers\Twine\Tango\Software\Stub_scripts\Tango_Defines_Basic.cs"
+include "C:\To_Backup\Mulberry\Mulberry_current\Customers\Twine\Tango\Software\Stub_scripts\Interfaces\Tango_Defines_Tacho.cs"
+
+
+public void OnExecute(StubManager stubManager)
+{
+
+
+ Fpga_Read_Reg(FPGA1, F1_Prescaler1_reg5, 1); stubManager.Write("\n");
+ Fpga_Read_Reg(FPGA2, F2_Prescaler1_reg10, 1); stubManager.Write("\n");
+
+ //Fpga_Write_Reg(FPGA1, F1_Prescaler1_reg5, 0x0f, 0);
+ //Fpga_Write_Reg(FPGA2, F2_Prescaler1_reg1, 0x0f, 0);
+
+ for (int i = 0; i<1000; i++)
+ {
+ Fpga_Read_Reg(FPGA1, F1_Tacho_reg0, 1); stubManager.Write("\n");
+ Fpga_Read_Reg(FPGA1, F1_Tacho_reg1, 1); stubManager.Write("\n");
+ Fpga_Read_Reg(FPGA1, F1_Tacho_reg2, 1); stubManager.Write("\n");
+ Fpga_Read_Reg(FPGA1, F1_Tacho_reg3, 1); stubManager.Write("\n");
+ Fpga_Read_Reg(FPGA1, F1_Tacho_reg4, 1); stubManager.Write("\n");
+ Fpga_Read_Reg(FPGA1, F1_Tacho_reg5, 1); stubManager.Write("\n");
+ Fpga_Read_Reg(FPGA1, F1_Tacho_reg6, 1); stubManager.Write("\n");
+ Fpga_Read_Reg(FPGA1, F1_Tacho_reg7, 1); stubManager.Write("\n");
+ Fpga_Read_Reg(FPGA2, F2_Tacho_reg0, 1); stubManager.Write("\n");
+
+ stubManager.Write("\n\n");
+ Thread.Sleep(1000);
+ }
+} \ No newline at end of file
diff --git a/Software/Stubs Collection/stubs/michael stubs/Assemblies/ElectricalEnclosure_SSR_DH.cs b/Software/Stubs Collection/stubs/michael stubs/Assemblies/ElectricalEnclosure_SSR_DH.cs
new file mode 100644
index 000000000..61380e1a0
--- /dev/null
+++ b/Software/Stubs Collection/stubs/michael stubs/Assemblies/ElectricalEnclosure_SSR_DH.cs
@@ -0,0 +1,53 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+include "C:\To_Backup\Mulberry\Mulberry_current\Customers\Twine\Tango\Software\Stub_scripts\Tango_Defines_Basic.cs"
+include "C:\To_Backup\Mulberry\Mulberry_current\Customers\Twine\Tango\Software\Stub_scripts\Interfaces\Tango_Defines_SSR.cs"
+
+
+public void OnExecute(StubManager stubManager)
+{
+ //Read Dyeing head SSR register
+ Fpga_Read_Reg(FPGA2, F2_CTRL, 1);
+
+ //Write Mixing chip SSR/SSR no. 4
+ SetBit (FPGA2, F2_CTRL, 7, 1);
+ stubManager.Write("\nSetting SSR no. 4");
+ Thread.Sleep(4000);
+ SetBit (FPGA2, F2_CTRL, 7, 0);
+
+/*
+ //Write Dyeing head SSR/SSR no. 5
+ SetBit (FPGA2, F2_CTRL, 6, 1);
+ stubManager.Write("\nSetting SSR no. 5");
+ Thread.Sleep(4000);
+ SetBit (FPGA2, F2_CTRL, 6, 0);
+
+ //Write Dyeing head SSR/SSR no. 6
+ SetBit (FPGA2, F2_CTRL, 5, 1);
+ stubManager.Write("\nSetting SSR no. 6");
+ Thread.Sleep(4000);
+ SetBit (FPGA2, F2_CTRL, 5, 0);
+
+ //Write Dyeing head SSR/SSR no. 7
+ SetBit (FPGA2, F2_CTRL, 4, 1);
+ stubManager.Write("\nSetting SSR no. 7");
+ Thread.Sleep(4000);
+ SetBit (FPGA2, F2_CTRL, 4, 0);
+
+ //Write Dyeing head SSR/SSR no. 8
+ SetBit (FPGA2, F2_CTRL, 3, 1);
+ stubManager.Write("\nSetting SSR no. 8");
+ Thread.Sleep(4000);
+ SetBit (FPGA2, F2_CTRL, 3, 0);
+*/
+} \ No newline at end of file
diff --git a/Software/Stubs Collection/stubs/michael stubs/Assemblies/ElectricalEnclosure_SSR_Dryer.cs b/Software/Stubs Collection/stubs/michael stubs/Assemblies/ElectricalEnclosure_SSR_Dryer.cs
new file mode 100644
index 000000000..47fc0954f
--- /dev/null
+++ b/Software/Stubs Collection/stubs/michael stubs/Assemblies/ElectricalEnclosure_SSR_Dryer.cs
@@ -0,0 +1,37 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+include "C:\To_Backup\Mulberry\Mulberry_current\Customers\Twine\Tango\Software\Stub_scripts\Tango_Defines_Basic.cs"
+include "C:\To_Backup\Mulberry\Mulberry_current\Customers\Twine\Tango\Software\Stub_scripts\Interfaces\Tango_Defines_SSR.cs"
+
+
+public void OnExecute(StubManager stubManager)
+{
+ //Write GPO_DRYER_SSR1_CTRL SSR/SSR no. 1
+ SetBit (FPGA2, F2_CTRL, 10, 1);
+ stubManager.Write("\nTesting SSR no. 1");
+ Thread.Sleep(4000);
+ SetBit (FPGA2, F2_CTRL, 10, 0);
+
+ //Write GPO_DRYER_SSR2_CTRL SSR/SSR no. 2
+ SetBit (FPGA2, F2_CTRL, 9, 1);
+ stubManager.Write("\nTesting SSR no. 2");
+ Thread.Sleep(4000);
+ SetBit (FPGA2, F2_CTRL, 9, 0);
+
+ //Write GPO_DRYER_SSR3_CTRL SSR/SSR no. 3
+ SetBit (FPGA2, F2_CTRL, 8, 1);
+ stubManager.Write("\nTesting SSR no. 3");
+ Thread.Sleep(4000);
+ SetBit (FPGA2, F2_CTRL, 8, 0);
+
+} \ No newline at end of file
diff --git a/Software/Stubs Collection/stubs/michael stubs/Assemblies/ElectricalEnclosure_SSR_Misc.cs b/Software/Stubs Collection/stubs/michael stubs/Assemblies/ElectricalEnclosure_SSR_Misc.cs
new file mode 100644
index 000000000..01dfd2f51
--- /dev/null
+++ b/Software/Stubs Collection/stubs/michael stubs/Assemblies/ElectricalEnclosure_SSR_Misc.cs
@@ -0,0 +1,51 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+include "C:\To_Backup\Mulberry\Mulberry_current\Customers\Twine\Tango\Software\Stub_scripts\Tango_Defines_Basic.cs"
+include "C:\To_Backup\Mulberry\Mulberry_current\Customers\Twine\Tango\Software\Stub_scripts\Interfaces\Tango_Defines_SSR.cs"
+
+
+public void OnExecute(StubManager stubManager)
+{
+ //Read Dyeing head SSR register
+ //Fpga_Read_Reg(FPGA2, F2_CTRL, 1);
+/*
+ //Write GPO_DILUTORPUMP_SSR10_CTRL SSR/SSR no. 10
+ SetBit (FPGA1, F1_gpo_01, 2, 1);
+ stubManager.Write("\nSetting SSR no. 10");
+ Thread.Sleep(4000);
+ SetBit (FPGA1, F1_gpo_01, 2, 0);
+
+ //Write GPO_EXTWINDER_SSR11_CTRL SSR/SSR no. 11
+ SetBit (FPGA3, F3_GPO_01_bus, 4, 1);
+ stubManager.Write("\nSetting SSR no. 11");
+ Thread.Sleep(4000);
+ SetBit (FPGA3, F3_GPO_01_bus, 4, 0);
+
+ //Write GPO_SPARE_SSR12_CTRL SSR/SSR no. 12
+ SetBit (FPGA2, F2_CTRL, 1, 1);
+ stubManager.Write("\nSetting SSR no. 12");
+ Thread.Sleep(4000);
+ SetBit (FPGA2, F2_CTRL, 1, 0);
+*/
+ //GPO_CHILLER_SSR9_CTRL = bit2 = 2
+ //F2_GPO_SPARE_SSR13_CTRL = bit0 = 0
+
+ Int32 i = 2;
+ SetBit (FPGA2, F2_CTRL, i, 1);
+ stubManager.Write("\n\nSetting GPO F2_CTRL, bit "); stubManager.Write(i); stubManager.Write(", "); stubManager.Write(F2_CTRL_Bits[i]);
+ Thread.Sleep(1000);
+ SetBit (FPGA1, F2_CTRL, i, 0);
+ stubManager.Write("\nClearing GPO F2_CTRL, bit "); stubManager.Write(i); stubManager.Write(", "); stubManager.Write(F2_CTRL_Bits[i]);
+ Thread.Sleep(1000);
+
+} \ No newline at end of file
diff --git a/Software/Stubs Collection/stubs/michael stubs/Assemblies/LTFU_LimitSwitch.cs b/Software/Stubs Collection/stubs/michael stubs/Assemblies/LTFU_LimitSwitch.cs
new file mode 100644
index 000000000..cc9d945ab
--- /dev/null
+++ b/Software/Stubs Collection/stubs/michael stubs/Assemblies/LTFU_LimitSwitch.cs
@@ -0,0 +1,103 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+include "C:\To_Backup\Mulberry\Mulberry_current\Customers\Twine\Tango\Software\Stub_scripts\Tango_Defines_Basic.cs"
+include "C:\To_Backup\Mulberry\Mulberry_current\Customers\Twine\Tango\Software\Stub_scripts\Interfaces\Tango_Defines_LimitSwitch.cs"
+
+public void OnExecute(StubManager stubManager)
+{
+
+ int k = 0;
+
+ for (int i = 0; i < 10000; i++)
+ {
+
+ stubManager.Write("\n\nIndex =");
+ stubManager.WriteHex(k,2);
+ k++;
+
+ var RetVal_02 = Fpga_Read_Reg(FPGA1, F1_LS_02_Direct, 0);
+ var RetVal_03 = Fpga_Read_Reg(FPGA1, F1_LS_03_Direct, 0);
+
+ stubManager.Write("\nF1_LS_02_Direct =");
+ stubManager.WriteHex(RetVal_02.Value,4);
+ stubManager.Write("\nF1_LS_03_Direct =");
+ stubManager.WriteHex(RetVal_03.Value,4);
+
+ if ( (RetVal_02.Value & 0x10) == 0x0)
+ {
+ stubManager.Write("\n F1_LS_LPIVOT_UP");
+ }
+ if ( (RetVal_02.Value & 0x20) == 0x0)
+ {
+ stubManager.Write("\n F1_LS_LPIVOT_DOWN");
+ }
+ /*
+ if ( (RetVal_02.Value & 0x40) == 0x0)
+ {
+ stubManager.Write("\n F1_LS_LOADARM_RIGHT");
+ }
+ if ( (RetVal_02.Value & 0x80) == 0x0)
+ {
+ stubManager.Write("\n F1_LS_LOADARM_LEFT");
+ }*/
+ if ( (RetVal_02.Value & 0x100) == 0x0)
+ {
+ stubManager.Write("\n F1_LS_LLOADMOTOR_UP");
+ }
+ if ( (RetVal_02.Value & 0x200) == 0x0)
+ {
+ //Not working - fault in assembly
+ // stubManager.Write("\n F1_LS_LLOADMOTOR_DOWN");
+ }
+/*
+ if ( (RetVal_02.Value & 0x400) == 0x0)
+ {
+ stubManager.Write("\n F1_LS_LDANCER2_UP");
+ }
+ if ( (RetVal_02.Value & 0x800) == 0x0)
+ {
+ stubManager.Write("\n F1_LS_LDANCER2_DOWN");
+ }
+ */
+ if ( (RetVal_02.Value & 0x1000) == 0x0)
+ {
+ stubManager.Write("\n F1_LS_LDANCER1_UP");
+ }
+ if ( (RetVal_02.Value & 0x2000) == 0x0)
+ {
+ stubManager.Write("\n F1_LS_LDANCER1_DOWN");
+ }
+
+
+
+ Thread.Sleep(1000);
+ }
+
+
+}
+
+/* Sample output - no limit switches are activated
+
+Index =#00
+F1_LS_02_Direct =#3130
+F1_LS_03_Direct =#0BE0
+
+Index =#01
+F1_LS_02_Direct =#3130
+F1_LS_03_Direct =#0BE0
+
+Index =#02
+F1_LS_02_Direct =#3130
+F1_LS_03_Direct =#0BE0
+
+*/ \ No newline at end of file
diff --git a/Software/Stubs Collection/stubs/michael stubs/Assemblies/LTFU_Motors.cs b/Software/Stubs Collection/stubs/michael stubs/Assemblies/LTFU_Motors.cs
new file mode 100644
index 000000000..58f86f0d1
--- /dev/null
+++ b/Software/Stubs Collection/stubs/michael stubs/Assemblies/LTFU_Motors.cs
@@ -0,0 +1,74 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+include "C:\To_Backup\Mulberry\Mulberry_current\Customers\Twine\Tango\Software\Stub_scripts\Tango_Defines_Basic.cs"
+include "C:\To_Backup\Mulberry\Mulberry_current\Customers\Twine\Tango\Software\Stub_scripts\Interfaces\Tango_Defines_Motors.cs"
+
+public void OnExecute(StubManager stubManager)
+{
+ Motor_OutOfReset();
+
+ Motor_HighZ(FPGA1, F1_MOTO_LDRIVING_TX1, F1_MOTO_LDRIVING_TX0);
+ Motor_HighZ(FPGA1, F1_MOTO_LLOADING_TX1, F1_MOTO_LLOADING_TX0);
+ Motor_HighZ(FPGA1, F1_MOTO_LDANCER1_TX1, F1_MOTO_LDANCER1_TX0);
+ Motor_HighZ(FPGA1, F1_MOTO_LDANCER2_TX1, F1_MOTO_LDANCER2_TX0);
+ Motor_HighZ(FPGA1, F1_MOTO_LPIVOT1_TX1, F1_MOTO_LPIVOT1_TX0);
+
+ Motor_ReadCfg(FPGA1, F1_MOTO_LDRIVING_TX1, F1_MOTO_LDRIVING_TX0);
+ Motor_ReadCfg(FPGA1, F1_MOTO_LLOADING_TX1, F1_MOTO_LLOADING_TX0);
+ Motor_ReadCfg(FPGA1, F1_MOTO_LDANCER1_TX1, F1_MOTO_LDANCER1_TX0);
+ Motor_ReadCfg(FPGA1, F1_MOTO_LDANCER2_TX1, F1_MOTO_LDANCER2_TX0);
+ Motor_ReadCfg(FPGA1, F1_MOTO_LPIVOT1_TX1, F1_MOTO_LPIVOT1_TX0);
+
+
+ Motor_Run(FPGA1, F1_MOTO_LDRIVING_TX1, F1_MOTO_LDRIVING_TX0, 0xffff, 0x1);
+ Thread.Sleep(6000);
+ Motor_HighZ(FPGA1, F1_MOTO_LDRIVING_TX1, F1_MOTO_LDRIVING_TX0);
+
+
+ Motor_Move_Loop(FPGA1, F1_MOTO_LLOADING_TX1, F1_MOTO_LLOADING_TX0, 0x3200, 0x1, 4);
+ Motor_HighZ(FPGA1, F1_MOTO_LLOADING_TX1, F1_MOTO_LLOADING_TX0);
+
+ Motor_Move_Loop(FPGA1, F1_MOTO_LDANCER1_TX1, F1_MOTO_LDANCER1_TX0, 0x3200, 0x1, 4);
+ Motor_HighZ(FPGA1, F1_MOTO_LDANCER1_TX1, F1_MOTO_LDANCER1_TX0);
+
+// Motor_Move_Loop(FPGA1, F1_MOTO_LDANCER2_TX1, F1_MOTO_LDANCER2_TX0, 0x3200, 0x1, 4);
+// Motor_HighZ(FPGA1, F1_MOTO_LDANCER2_TX1, F1_MOTO_LDANCER2_TX0);
+
+ Motor_Move_Loop(FPGA1, F1_MOTO_LPIVOT1_TX1, F1_MOTO_LPIVOT1_TX0, 0x3200, 0x1, 4);
+ Motor_HighZ(FPGA1, F1_MOTO_LPIVOT1_TX1, F1_MOTO_LPIVOT1_TX0);
+
+
+}
+
+/* Script outputs motor driver chip config register
+FPGA Reg. Read (FPGA Base, Addr, Data): (#60000000, #0226, #002E)
+
+FPGA Reg. Read (FPGA Base, Addr, Data): (#60000000, #0224, #8800)
+
+FPGA Reg. Read (FPGA Base, Addr, Data): (#60000000, #0236, #002E)
+
+FPGA Reg. Read (FPGA Base, Addr, Data): (#60000000, #0234, #8800)
+
+FPGA Reg. Read (FPGA Base, Addr, Data): (#60000000, #02C6, #002E)
+
+FPGA Reg. Read (FPGA Base, Addr, Data): (#60000000, #02C4, #8800)
+
+FPGA Reg. Read (FPGA Base, Addr, Data): (#60000000, #02D6, #002E)
+
+FPGA Reg. Read (FPGA Base, Addr, Data): (#60000000, #02D4, #8800)
+
+FPGA Reg. Read (FPGA Base, Addr, Data): (#60000000, #0306, #002E)
+
+FPGA Reg. Read (FPGA Base, Addr, Data): (#60000000, #0304, #8800)
+
+*/ \ No newline at end of file
diff --git a/Software/Stubs Collection/stubs/michael stubs/Assemblies/LTFU_SSI.cs b/Software/Stubs Collection/stubs/michael stubs/Assemblies/LTFU_SSI.cs
new file mode 100644
index 000000000..851054706
--- /dev/null
+++ b/Software/Stubs Collection/stubs/michael stubs/Assemblies/LTFU_SSI.cs
@@ -0,0 +1,76 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+include "C:\To_Backup\Mulberry\Mulberry_current\Customers\Twine\Tango\Software\Stub_scripts\Tango_Defines_Basic.cs"
+include "C:\To_Backup\Mulberry\Mulberry_current\Customers\Twine\Tango\Software\Stub_scripts\Interfaces\Tango_Defines_SSI.cs"
+
+
+public void OnExecute(StubManager stubManager)
+{
+ int k = 0;
+ Fpga_Read_Reg(FPGA1, F1_Prescaler1_reg1, 0);
+ Fpga_Read_Reg(FPGA1, F1_Prescaler1_reg2, 0);
+
+ //Set output clock frequency to about 200 kHz
+ Fpga_Write_Reg(FPGA1, F1_Prescaler1_reg1, 0x0024, 0);
+ Fpga_Write_Reg(FPGA1, F1_Prescaler1_reg2, 0x0024, 0);
+
+ Fpga_Read_Reg(FPGA1, F1_Prescaler1_reg1, 0);
+ Fpga_Read_Reg(FPGA1, F1_Prescaler1_reg2, 0);
+
+ for (int i = 0; i < 100000; i++)
+ {
+
+
+
+
+
+ SSI_Read_Write(FPGA1, F1_LDANCER1_ROTENC_MSB, F1_LDANCER1_ROTENC_LSB, F1_LDANCER1_ROTENC_TX);
+ SSI_Read_Write(FPGA1, F1_LDANCER2_ROTENC_MSB, F1_LDANCER2_ROTENC_LSB, F1_LDANCER2_ROTENC_TX);
+ stubManager.Write("\n");
+ k++;
+ if ( (k & 0x8) == 0x08 ) {
+ k = 0;
+ stubManager.Write(" LDANCER1 LDANCER2 \n");
+ }
+
+ /*
+ stubManager.Write("\n\nF1_LDANCER1_ROTENC_TX");
+ ssi_loop(F1_LDANCER1_ROTENC_TX);
+ Thread.Sleep(1000);
+
+ stubManager.Write("\n\nF1_LDANCER2_ROTENC_TX");
+ ssi_loop(F1_LDANCER2_ROTENC_TX);
+ Thread.Sleep(1000);
+
+ stubManager.Write("\n\nF1_LSPARE_ROTENC_TX");
+ ssi_loop(F1_LSPARE_ROTENC_TX);
+ Thread.Sleep(1000);
+
+ */
+ }
+
+
+}
+
+/* Sample output when turning F1_RSPARE_ROTENC - output is 12 bits
+(F1_RSPARE_ROTENC_MSB, F1_RSPARE_ROTENC_LSB) = (#0000, #0A6F)
+(F1_RSPARE_ROTENC_MSB, F1_RSPARE_ROTENC_LSB) = (#0000, #0A71)
+(F1_RSPARE_ROTENC_MSB, F1_RSPARE_ROTENC_LSB) = (#0000, #0A68)
+(F1_RSPARE_ROTENC_MSB, F1_RSPARE_ROTENC_LSB) = (#0000, #09BA)
+(F1_RSPARE_ROTENC_MSB, F1_RSPARE_ROTENC_LSB) = (#0000, #0859)
+(F1_RSPARE_ROTENC_MSB, F1_RSPARE_ROTENC_LSB) = (#0000, #06C6)
+(F1_RSPARE_ROTENC_MSB, F1_RSPARE_ROTENC_LSB) = (#0000, #05EA)
+(F1_RSPARE_ROTENC_MSB, F1_RSPARE_ROTENC_LSB) = (#0000, #05CE)
+(F1_RSPARE_ROTENC_MSB, F1_RSPARE_ROTENC_LSB) = (#0000, #05B3)
+(F1_RSPARE_ROTENC_MSB, F1_RSPARE_ROTENC_LSB) = (#0000, #0599)
+(F1_RSPARE_ROTENC_MSB, F1_RSPARE_ROTENC_LSB) = (#0000, #0580)*/ \ No newline at end of file
diff --git a/Software/Stubs Collection/stubs/michael stubs/Assemblies/Midtank_Float.cs b/Software/Stubs Collection/stubs/michael stubs/Assemblies/Midtank_Float.cs
new file mode 100644
index 000000000..a51017019
--- /dev/null
+++ b/Software/Stubs Collection/stubs/michael stubs/Assemblies/Midtank_Float.cs
@@ -0,0 +1,72 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+include "C:\To_Backup\Mulberry\Mulberry_current\Customers\Twine\Tango\Software\Stub_scripts\Tango_Defines_Basic.cs"
+include "C:\To_Backup\Mulberry\Mulberry_current\Customers\Twine\Tango\Software\Stub_scripts\Interfaces\Tango_Defines_GPI.cs"
+
+
+int MidtankFloat(Int32 Fpga, Int32 Addr)
+{
+
+ string[] BitsToCheck = { "rsvd", "rsvd", "rsvd", "rsvd", "rsvd", "rsvd", "rsvd", "rsvd", "rsvd", "rsvd", "rsvd", "rsvd", "rsvd", "rsvd", "rsvd", "rsvd"};
+ var RetVal = Fpga_Read_Reg(Fpga, Addr, 0);
+
+ if ( (Fpga == FPGA3) && (Addr == F3_MIDTANK_01_Direct))
+ {
+ BitsToCheck = F3_MIDTANK_01_Bits;
+
+ }
+ else if ( (Fpga == FPGA3) && (Addr == F3_MIDTANK_02_Direct))
+ {
+ BitsToCheck = F3_MIDTANK_02_Bits;
+ }
+
+ for (int i=0; i<16; i++)
+ {
+
+ if ( ( RetVal.Value & (0x1<<i)) == (0x1<<i))
+ {
+ stubManager.Write("\n\t\t\tGPI activated: ");
+ stubManager.Write(BitsToCheck[i]);
+ stubManager.Write("\t\t\tBit no.: ");
+ stubManager.Write(i);
+ //stubManager.Write("\n");
+ }
+
+ }
+
+ return 1;
+}
+
+
+
+public void OnExecute(StubManager stubManager)
+{
+
+ for (int i=0; i<10000; i++)
+ {
+
+ //stubManager.Write("\nIndex =");
+ //stubManager.Write(i);
+ Thread.Sleep(1000);
+
+ stubManager.Write("\nScanning: F3_MIDTANK_01_Direct");
+ MidtankFloat(FPGA3, F3_MIDTANK_01_Direct);
+ stubManager.Write("\n\n");
+
+
+ stubManager.Write("\nScanning: F3_MIDTANK_02_Direct");
+ MidtankFloat(FPGA3, F3_MIDTANK_02_Direct);
+ stubManager.Write("\n\n");
+
+ }
+} \ No newline at end of file
diff --git a/Software/Stubs Collection/stubs/michael stubs/Assemblies/Midtank_Valves.cs b/Software/Stubs Collection/stubs/michael stubs/Assemblies/Midtank_Valves.cs
new file mode 100644
index 000000000..84ef7021a
--- /dev/null
+++ b/Software/Stubs Collection/stubs/michael stubs/Assemblies/Midtank_Valves.cs
@@ -0,0 +1,32 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+include "C:\To_Backup\Mulberry\Mulberry_current\Customers\Twine\Tango\Software\Stub_scripts\Tango_Defines_Basic.cs"
+include "C:\To_Backup\Mulberry\Mulberry_current\Customers\Twine\Tango\Software\Stub_scripts\Interfaces\Tango_Defines_GPO.cs"
+
+
+public void OnExecute(StubManager stubManager)
+{
+
+ //for (int i=0; i<16; i++)
+ //{
+
+ Int32 i = 0; //Midtank Valve index
+
+ SetBit (FPGA3, F3_VALVE_OUT, i, 1);
+ stubManager.Write("\n\nSetting GPO F3_VALVE_OUT, bit "); stubManager.Write(i); stubManager.Write(", "); stubManager.Write(F3_VALVE_Bits[i]);
+ Thread.Sleep(1000);
+ SetBit (FPGA3, F3_VALVE_OUT, i, 0);
+ stubManager.Write("\nClearing GPO F3_VALVE_OUT, bit "); stubManager.Write(i); stubManager.Write(", "); stubManager.Write(F3_VALVE_Bits[i]);
+ Thread.Sleep(1000);
+ //}
+} \ No newline at end of file
diff --git a/Software/Stubs Collection/stubs/michael stubs/Assemblies/RTFU_GPO.cs b/Software/Stubs Collection/stubs/michael stubs/Assemblies/RTFU_GPO.cs
new file mode 100644
index 000000000..a319b1525
--- /dev/null
+++ b/Software/Stubs Collection/stubs/michael stubs/Assemblies/RTFU_GPO.cs
@@ -0,0 +1,33 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+include "C:\To_Backup\Mulberry\Mulberry_current\Customers\Twine\Tango\Software\Stub_scripts\Tango_Defines_Basic.cs"
+include "C:\To_Backup\Mulberry\Mulberry_current\Customers\Twine\Tango\Software\Stub_scripts\Interfaces\Tango_Defines_GPO.cs"
+include "C:\To_Backup\Mulberry\Mulberry_current\Customers\Twine\Tango\Software\Stub_scripts\Interfaces\Tango_Defines_Motors.cs"
+
+
+
+public void OnExecute(StubManager stubManager)
+{
+
+ Int32 i = 11; //Midtank Valve index
+
+ SetBit (FPGA1, F1_Moto_Driver_SW1, i, 1);
+ stubManager.Write("\n\nSetting GPO F1_Moto_Driver_SW1, bit "); stubManager.Write(i); stubManager.Write(", "); stubManager.Write(F1_Moto_Driver_SW1_Bits[i]);
+ Thread.Sleep(1000);
+ SetBit (FPGA1, F1_Moto_Driver_SW1, i, 0);
+ stubManager.Write("\nClearing GPO F1_Moto_Driver_SW1, bit "); stubManager.Write(i); stubManager.Write(", "); stubManager.Write(F1_Moto_Driver_SW1_Bits[i]);
+ Thread.Sleep(1000);
+
+
+}
+
diff --git a/Software/Stubs Collection/stubs/michael stubs/Assemblies/RTFU_LimitSwitch.cs b/Software/Stubs Collection/stubs/michael stubs/Assemblies/RTFU_LimitSwitch.cs
new file mode 100644
index 000000000..e25bc99ee
--- /dev/null
+++ b/Software/Stubs Collection/stubs/michael stubs/Assemblies/RTFU_LimitSwitch.cs
@@ -0,0 +1,86 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+include "C:\To_Backup\Mulberry\Mulberry_current\Customers\Twine\Tango\Software\Stub_scripts\Tango_Defines_Basic.cs"
+include "C:\To_Backup\Mulberry\Mulberry_current\Customers\Twine\Tango\Software\Stub_scripts\Interfaces\Tango_Defines_LimitSwitch.cs"
+
+
+public void OnExecute(StubManager stubManager)
+{
+
+ int k = 0;
+
+ for (int i = 0; i < 10000; i++)
+ {
+
+ stubManager.Write("\n\nIndex =");
+ stubManager.WriteHex(k,2);
+ k++;
+
+ var RetVal_02 = Fpga_Read_Reg(FPGA1, F1_LS_02_Direct, 0);
+ var RetVal_03 = Fpga_Read_Reg(FPGA1, F1_LS_03_Direct, 0);
+
+ stubManager.Write("\nF1_LS_02_Direct =");
+ stubManager.WriteHex(RetVal_02.Value,4);
+ stubManager.Write("\nF1_LS_03_Direct =");
+ stubManager.WriteHex(RetVal_03.Value,4);
+
+
+ if ( (RetVal_03.Value & 0x40) == 0x0)
+ {
+ stubManager.Write("\nF1_LS_RLOADMOTOR_UP");
+ }
+ if ( (RetVal_03.Value & 0x80) == 0x0)
+ {
+ stubManager.Write("\nF1_LS_RLOADMOTOR_DOWN");
+ }
+
+
+ if ( (RetVal_03.Value & 0x100) == 0x0)
+ {
+ stubManager.Write("\nF1_LS_RDANCER_UP");
+
+ }
+ if ( (RetVal_03.Value & 0x200) == 0x0)
+ {
+ stubManager.Write("\nF1_LS_RDANCER_DOWN");
+ }
+ if ( (RetVal_03.Value & 0x20) == 0x0)
+ {
+ stubManager.Write("\nF1_LS_RDANCER_LONG");
+ }
+
+ // F1_LS_RDANCER_UP and F1_LS_RDANCER_DOWN are swapped
+ // LS_RDANCER_LONG = LS_RLOADARMUP
+
+
+ Thread.Sleep(1000);
+ }
+
+
+}
+
+/* Sample output - no limit switches are activated
+
+Index =#00
+F1_LS_02_Direct =#3130
+F1_LS_03_Direct =#0BE0
+
+Index =#01
+F1_LS_02_Direct =#3130
+F1_LS_03_Direct =#0BE0
+
+Index =#02
+F1_LS_02_Direct =#3130
+F1_LS_03_Direct =#0BE0
+
+*/ \ No newline at end of file
diff --git a/Software/Stubs Collection/stubs/michael stubs/Assemblies/RTFU_Motors.cs b/Software/Stubs Collection/stubs/michael stubs/Assemblies/RTFU_Motors.cs
new file mode 100644
index 000000000..5df179475
--- /dev/null
+++ b/Software/Stubs Collection/stubs/michael stubs/Assemblies/RTFU_Motors.cs
@@ -0,0 +1,66 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+
+include "C:\To_Backup\Mulberry\Mulberry_current\Customers\Twine\Tango\Software\Stub_scripts\Tango_Defines_Basic.cs"
+include "C:\To_Backup\Mulberry\Mulberry_current\Customers\Twine\Tango\Software\Stub_scripts\Interfaces\Tango_Defines_Motors.cs"
+
+
+public void OnExecute(StubManager stubManager)
+{
+ Motor_OutOfReset();
+
+ Motor_HighZ(FPGA1, F1_MOTO_RLOADING_TX1, F1_MOTO_RLOADING_TX0);
+ Motor_HighZ(FPGA1, F1_MOTO_RDRIVING_TX1, F1_MOTO_RDRIVING_TX0);
+ Motor_HighZ(FPGA1, F1_MOTO_RLOADARM_TX1, F1_MOTO_RLOADARM_TX0);
+ Motor_HighZ(FPGA1, F1_MOTO_RDANCER_TX1, F1_MOTO_RDANCER_TX0);
+
+ Motor_ReadCfg(FPGA1, F1_MOTO_RLOADING_TX1, F1_MOTO_RLOADING_TX0);
+ Motor_ReadCfg(FPGA1, F1_MOTO_RDRIVING_TX1, F1_MOTO_RDRIVING_TX0);
+ Motor_ReadCfg(FPGA1, F1_MOTO_RLOADARM_TX1, F1_MOTO_RLOADARM_TX0);
+ Motor_ReadCfg(FPGA1, F1_MOTO_RDANCER_TX1, F1_MOTO_RDANCER_TX0);
+
+
+ Motor_Run(FPGA1, F1_MOTO_RDRIVING_TX1, F1_MOTO_RDRIVING_TX0, 0xffff, 0x1);
+ Thread.Sleep(6000);
+ Motor_HighZ(FPGA1, F1_MOTO_RDRIVING_TX1, F1_MOTO_RDRIVING_TX0);
+
+ Motor_Move_Loop(FPGA1, F1_MOTO_RLOADING_TX1, F1_MOTO_RLOADING_TX0, 0x3200, 0x1, 8);
+ Motor_HighZ(FPGA1, F1_MOTO_RLOADING_TX1, F1_MOTO_RLOADING_TX0);
+
+ //Motor_Move_Loop(FPGA1, F1_MOTO_RLOADARM_TX1, F1_MOTO_RLOADARM_TX0, 0x3200, 0x1, 8);
+ //Motor_HighZ(FPGA1, F1_MOTO_RLOADARM_TX1, F1_MOTO_RLOADARM_TX0);
+
+ Motor_Move_Loop(FPGA1, F1_MOTO_RDANCER_TX1, F1_MOTO_RDANCER_TX0, 0x1200, 0x1, 8);
+ Motor_HighZ(FPGA1, F1_MOTO_RDANCER_TX1, F1_MOTO_RDANCER_TX0);
+
+
+}
+
+/* Script outputs motor driver chip config register
+FPGA Reg. Read* (FPGA Base, Addr, Data): (#60000000, #0206, #002E)
+
+FPGA Reg. Read* (FPGA Base, Addr, Data): (#60000000, #0204, #8800)
+
+FPGA Reg. Read* (FPGA Base, Addr, Data): (#60000000, #0216, #002E)
+
+FPGA Reg. Read* (FPGA Base, Addr, Data): (#60000000, #0214, #8800)
+
+FPGA Reg. Read* (FPGA Base, Addr, Data): (#60000000, #02A6, #002E)
+
+FPGA Reg. Read* (FPGA Base, Addr, Data): (#60000000, #02A4, #8800)
+
+FPGA Reg. Read* (FPGA Base, Addr, Data): (#60000000, #02B6, #002E)
+
+FPGA Reg. Read* (FPGA Base, Addr, Data): (#60000000, #02B4, #8800)
+
+*/
diff --git a/Software/Stubs Collection/stubs/michael stubs/Assemblies/RTFU_SSI.cs b/Software/Stubs Collection/stubs/michael stubs/Assemblies/RTFU_SSI.cs
new file mode 100644
index 000000000..8c6f3a2b0
--- /dev/null
+++ b/Software/Stubs Collection/stubs/michael stubs/Assemblies/RTFU_SSI.cs
@@ -0,0 +1,82 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+include "C:\To_Backup\Mulberry\Mulberry_current\Customers\Twine\Tango\Software\Stub_scripts\Tango_Defines_Basic.cs"
+include "C:\To_Backup\Mulberry\Mulberry_current\Customers\Twine\Tango\Software\Stub_scripts\Interfaces\Tango_Defines_SSI.cs"
+
+public void OnExecute(StubManager stubManager)
+{
+
+ int k = 0;
+
+ Fpga_Read_Reg(FPGA1, F1_Prescaler1_reg1,0 );
+ Fpga_Read_Reg(FPGA1, F1_Prescaler1_reg2,0 );
+
+ //Set output clock frequency to about 200 kHz
+ Fpga_Write_Reg(FPGA1, F1_Prescaler1_reg1, 0x0024, 0);
+ Fpga_Write_Reg(FPGA1, F1_Prescaler1_reg2, 0x0024, 0);
+
+ Fpga_Read_Reg(FPGA1, F1_Prescaler1_reg1, 0);
+ Fpga_Read_Reg(FPGA1, F1_Prescaler1_reg2, 0);
+
+ for (int i = 0; i < 100000; i++)
+ {
+
+
+ SSI_Read_Write(FPGA1, F1_RDANCER_ROTENC_MSB, F1_RDANCER_ROTENC_LSB, F1_RDANCER_ROTENC_TX);
+ SSI_Read_Write(FPGA1, F1_RSPARE_ROTENC_MSB, F1_RSPARE_ROTENC_LSB, F1_RSPARE_ROTENC_TX);
+ stubManager.Write("\n");
+ k++;
+ if ( (k & 0x8) == 0x08 ) {
+ k = 0;
+ stubManager.Write(" RDANCER RSPARE \n");
+ }
+
+ /*
+ stubManager.Write("\n\nF1_LDANCER1_ROTENC_TX");
+ ssi_loop(F1_LDANCER1_ROTENC_TX);
+ Thread.Sleep(1000);
+
+ stubManager.Write("\n\nF1_LDANCER2_ROTENC_TX");
+ ssi_loop(F1_LDANCER2_ROTENC_TX);
+ Thread.Sleep(1000);
+
+ stubManager.Write("\n\nF1_LSPARE_ROTENC_TX");
+ ssi_loop(F1_LSPARE_ROTENC_TX);
+ Thread.Sleep(1000);
+
+ stubManager.Write("\n\nF1_RDANCER_ROTENC_TX");
+ ssi_loop(F1_RDANCER_ROTENC_TX);
+ Thread.Sleep(1000);
+
+ stubManager.Write("\n\nF1_RSPARE_ROTENC_TX");
+ ssi_loop(F1_RSPARE_ROTENC_TX);
+ Thread.Sleep(1000);
+
+ */
+ }
+
+
+}
+
+/* Sample output when turning F1_RSPARE_ROTENC - output is 12 bits
+(F1_RSPARE_ROTENC_MSB, F1_RSPARE_ROTENC_LSB) = (#0000, #0A6F)
+(F1_RSPARE_ROTENC_MSB, F1_RSPARE_ROTENC_LSB) = (#0000, #0A71)
+(F1_RSPARE_ROTENC_MSB, F1_RSPARE_ROTENC_LSB) = (#0000, #0A68)
+(F1_RSPARE_ROTENC_MSB, F1_RSPARE_ROTENC_LSB) = (#0000, #09BA)
+(F1_RSPARE_ROTENC_MSB, F1_RSPARE_ROTENC_LSB) = (#0000, #0859)
+(F1_RSPARE_ROTENC_MSB, F1_RSPARE_ROTENC_LSB) = (#0000, #06C6)
+(F1_RSPARE_ROTENC_MSB, F1_RSPARE_ROTENC_LSB) = (#0000, #05EA)
+(F1_RSPARE_ROTENC_MSB, F1_RSPARE_ROTENC_LSB) = (#0000, #05CE)
+(F1_RSPARE_ROTENC_MSB, F1_RSPARE_ROTENC_LSB) = (#0000, #05B3)
+(F1_RSPARE_ROTENC_MSB, F1_RSPARE_ROTENC_LSB) = (#0000, #0599)
+(F1_RSPARE_ROTENC_MSB, F1_RSPARE_ROTENC_LSB) = (#0000, #0580)*/ \ No newline at end of file
diff --git a/Software/Stubs Collection/stubs/michael stubs/Assemblies/Spare_Motors.cs b/Software/Stubs Collection/stubs/michael stubs/Assemblies/Spare_Motors.cs
new file mode 100644
index 000000000..9e08fcf2e
--- /dev/null
+++ b/Software/Stubs Collection/stubs/michael stubs/Assemblies/Spare_Motors.cs
@@ -0,0 +1,53 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+
+include "C:\To_Backup\Mulberry\Mulberry_current\Customers\Twine\Tango\Software\Stub_scripts\Tango_Defines_Basic.cs"
+include "C:\To_Backup\Mulberry\Mulberry_current\Customers\Twine\Tango\Software\Stub_scripts\Interfaces\Tango_Defines_Motors.cs"
+
+
+public void OnExecute(StubManager stubManager)
+{
+ Motor_OutOfReset();
+
+ Motor_Move_Loop(FPGA3, F3_MOTO_SPARE1_1_A1_TX_01, F3_MOTO_SPARE1_1_A1_TX_00, 0x3200, 0x1, 8);
+ Motor_HighZ(FPGA3, F3_MOTO_SPARE1_1_A1_TX_01, F3_MOTO_SPARE1_1_A1_TX_00);
+
+ Motor_Move_Loop(FPGA3, F3_MOTO_SPARE1_2_A1_TX_01, F3_MOTO_SPARE1_2_A1_TX_00, 0x3200, 0x1, 8);
+ Motor_HighZ(FPGA3, F3_MOTO_SPARE1_2_A1_TX_01, F3_MOTO_SPARE1_2_A1_TX_00);
+
+ Motor_Move_Loop(FPGA3, F3_MOTO_SPARE2_1_A1_TX_01, F3_MOTO_SPARE2_1_A1_TX_00, 0x3200, 0x1, 8);
+ Motor_HighZ(FPGA3, F3_MOTO_SPARE2_1_A1_TX_01, F3_MOTO_SPARE2_1_A1_TX_00);
+
+ Motor_Move_Loop(FPGA3, F3_MOTO_SPARE2_2_A1_TX_01, F3_MOTO_SPARE2_2_A1_TX_00, 0x3200, 0x1, 8);
+ Motor_HighZ(FPGA3, F3_MOTO_SPARE2_2_A1_TX_01, F3_MOTO_SPARE2_2_A1_TX_00);
+
+}
+
+/* Script outputs motor driver chip config register
+FPGA Reg. Read* (FPGA Base, Addr, Data): (#60000000, #0206, #002E)
+
+FPGA Reg. Read* (FPGA Base, Addr, Data): (#60000000, #0204, #8800)
+
+FPGA Reg. Read* (FPGA Base, Addr, Data): (#60000000, #0216, #002E)
+
+FPGA Reg. Read* (FPGA Base, Addr, Data): (#60000000, #0214, #8800)
+
+FPGA Reg. Read* (FPGA Base, Addr, Data): (#60000000, #02A6, #002E)
+
+FPGA Reg. Read* (FPGA Base, Addr, Data): (#60000000, #02A4, #8800)
+
+FPGA Reg. Read* (FPGA Base, Addr, Data): (#60000000, #02B6, #002E)
+
+FPGA Reg. Read* (FPGA Base, Addr, Data): (#60000000, #02B4, #8800)
+
+*/
diff --git a/Software/Stubs Collection/stubs/michael stubs/Assemblies/WHS_Analog.cs b/Software/Stubs Collection/stubs/michael stubs/Assemblies/WHS_Analog.cs
new file mode 100644
index 000000000..725287d84
--- /dev/null
+++ b/Software/Stubs Collection/stubs/michael stubs/Assemblies/WHS_Analog.cs
@@ -0,0 +1,33 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+include "C:\To_Backup\Mulberry\Mulberry_current\Customers\Twine\Tango\Software\Stub_scripts\Tango_Defines_Basic.cs"
+
+
+/*
+
+Name Input channel Input parameter in the stub
+CHAN_AIR_PRESSURE_1 ADC_CTL_CH0 0
+CHAN_AIR_PRESSURE_2 ADC_CTL_CH1 1
+CHAN_VOCSENS ADC_CTL_CH10 10
+*/
+
+public void OnExecute(StubManager stubManager)
+{
+
+ for (int i=0; i<22; i++)
+ {
+ var response = stubManager.Run<StubIntADCReadResponse>("StubIntADCReadRequest" ,i);
+ stubManager.Write("\nADC VALUE, "); stubManager.Write(i); stubManager.Write("\t\t"); stubManager.WriteHex(response.SamplingInBits, 4); stubManager.Write("\t\t"); stubManager.Write(response.VoltageSamplingMv); stubManager.Write(" mV");
+ }
+
+} \ No newline at end of file
diff --git a/Software/Stubs Collection/stubs/michael stubs/Assemblies/Winder_Motors.cs b/Software/Stubs Collection/stubs/michael stubs/Assemblies/Winder_Motors.cs
new file mode 100644
index 000000000..553e9a5d0
--- /dev/null
+++ b/Software/Stubs Collection/stubs/michael stubs/Assemblies/Winder_Motors.cs
@@ -0,0 +1,55 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+include "C:\To_Backup\Mulberry\Mulberry_current\Customers\Twine\Tango\Software\Stub_scripts\Tango_Defines_Basic.cs"
+include "C:\To_Backup\Mulberry\Mulberry_current\Customers\Twine\Tango\Software\Stub_scripts\Interfaces\Tango_Defines_Motors.cs"
+
+
+int Motor_Dispenser(Int32 Fpga, Int32 HighAdr, Int32 LowAdr)
+{
+
+
+ Motor_OutOfReset();
+ Motor_GetStatus( Fpga, HighAdr, LowAdr);
+ //Motor_GetStatus( Fpga, HighAdr, LowAdr);
+ Motor_HighZ(Fpga, HighAdr, LowAdr);
+ Motor_ReadCfg( Fpga, HighAdr, LowAdr);
+ //Motor_GetParam( Fpga, HighAdr, LowAdr, 0x0a);
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x0a, 0x08000000);
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x13, 0x0f000000);
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x18, 0x2e080000);
+ Motor_ReadCfg( Fpga, HighAdr, LowAdr);
+ //Motor_GetParam( Fpga, HighAdr, LowAdr, 0x0a);
+
+ Motor_Run(Fpga, HighAdr, LowAdr, 0x0fffff, 0x1);
+ Thread.Sleep(8000);
+ Motor_GetStatus( Fpga, HighAdr, LowAdr);
+ //Motor_ReadCfg( Fpga, HighAdr, LowAdr);
+
+
+
+ Motor_HighZ(Fpga, HighAdr, LowAdr);
+
+
+
+ return 1;
+}
+
+
+
+public void OnExecute(StubManager stubManager)
+{
+
+ Motor_Dispenser(FPGA1, F1_MOTO_SCREW_A1_TX_01, F1_MOTO_SCREW_A1_TX_00);
+ //Motor_Dispenser(FPGA1, F1_MOTO_WINDER_A1_TX_01, F1_MOTO_WINDER_A1_TX_00);
+
+} \ No newline at end of file
diff --git a/Software/Stubs Collection/stubs/michael stubs/Assemblies/Winder_QEI_Test.cs b/Software/Stubs Collection/stubs/michael stubs/Assemblies/Winder_QEI_Test.cs
new file mode 100644
index 000000000..a3a8cd9cc
--- /dev/null
+++ b/Software/Stubs Collection/stubs/michael stubs/Assemblies/Winder_QEI_Test.cs
@@ -0,0 +1,77 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+include "C:\To_Backup\Mulberry\Mulberry_current\Customers\Twine\Tango\Software\Stub_scripts\Tango_Defines_Basic.cs"
+include "C:\To_Backup\Mulberry\Mulberry_current\Customers\Twine\Tango\Software\Stub_scripts\Interfaces\Tango_Defines_Motors.cs"
+
+const Int32 F1_SCREW_ROTENC_lsb = 0x100 ; // Value of the lsb of the QEI register
+const Int32 F1_SCREW_ROTENC_msb = 0x102 ; // 10bits Value of the Msb of the QEI register, 1bit Direction of movement, 5bits Reserved
+const Int32 F1_SCREW_ROTENC_index = 0x104 ; // value of index counter
+
+
+
+int Motor_Dispenser(Int32 Fpga, Int32 HighAdr, Int32 LowAdr)
+{
+ Motor_HighZ(Fpga, HighAdr, LowAdr);
+ Thread.Sleep(1000);
+
+ Motor_OutOfReset();
+ //Motor_GetStatus( Fpga, HighAdr, LowAdr);
+ Motor_GetStatus( Fpga, HighAdr, LowAdr);
+ Motor_GetStatus( Fpga, HighAdr, LowAdr);
+ Motor_HighZ(Fpga, HighAdr, LowAdr);
+ //Motor_GetParam( Fpga, HighAdr, LowAdr, 0x0a);
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x0a, 0x01000000); //Set KVAL_RUN to 0x01
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x0b, 0x04000000); //Set KVAL_ACC to 0x04
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x05, 0x00200000); //Set Acceleration to 0x002
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x13, 0x0f000000); //Set over current detect to 6 A
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x18, 0x2e080000); //Disable shutdown by over current detect
+ //Motor_ReadCfg( Fpga, HighAdr, LowAdr);
+ //Motor_GetParam( Fpga, HighAdr, LowAdr, 0x0a);
+
+ Motor_Run(Fpga, HighAdr, LowAdr, 0x2fffff, 0x1);
+
+ for (int i = 0; i<2000; i++)
+ {
+ stubManager.Write("\n");
+ var rv1 = Fpga_Read_Reg(FPGA1, F1_SCREW_ROTENC_lsb, 0);
+ var rv2 = Fpga_Read_Reg(FPGA1, F1_SCREW_ROTENC_msb, 0);
+ stubManager.WriteHex(rv2.Value, 4);
+ stubManager.WriteHex(rv1.Value, 4);
+ //Motor_GetStatus( Fpga, HighAdr, LowAdr);
+
+
+ //Thread.Sleep(100);
+ }
+
+ Motor_GetStatus( Fpga, HighAdr, LowAdr);
+ //Motor_ReadCfg( Fpga, HighAdr, LowAdr);
+
+
+
+ Motor_HighZ(Fpga, HighAdr, LowAdr);
+
+
+
+ return 1;
+}
+
+
+
+public void OnExecute(StubManager stubManager)
+{
+
+ Motor_Dispenser(FPGA1, F1_MOTO_SCREW_A1_TX_01, F1_MOTO_SCREW_A1_TX_00);
+ //Motor_Dispenser(FPGA1, F1_MOTO_WINDER_A1_TX_01, F1_MOTO_WINDER_A1_TX_00);
+
+
+} \ No newline at end of file
diff --git a/Software/Stubs Collection/stubs/michael stubs/Assemblies/Winder_Screw_Motors.cs b/Software/Stubs Collection/stubs/michael stubs/Assemblies/Winder_Screw_Motors.cs
new file mode 100644
index 000000000..3337b0ca7
--- /dev/null
+++ b/Software/Stubs Collection/stubs/michael stubs/Assemblies/Winder_Screw_Motors.cs
@@ -0,0 +1,113 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+include "C:\Twine Code\stubs\michael stubs\Tango_Defines_Basic.cs"
+include "C:\Twine Code\stubs\michael stubs\Interfaces\Tango_Defines_Motors.cs"
+
+
+int Winder_Motor_CFG(Int32 Fpga, Int32 HighAdr, Int32 LowAdr)
+{
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x05, 0x00400000); //Acceleration
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x06, 0x00400000); //Deceleration
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x07, 0x00ff0000); //Maximum speed
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x08, 0x00000000); //Minimum speed and low speed optimization
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x09, 0x01000000); //Holding Kval
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x0a, 0x20000000); //Constant speed Kval
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x0b, 0x20000000); //Acceleration starting Kval
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x0c, 0x20000000); //Deceleration starting Kval
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x0d, 0x22c50000); //BEMF comp. curve intersect speed
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x0e, 0x07000000); //BEMF comp. curve starting slope
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x0f, 0x15000000); //BEMF comp. curve final slope (acceleration)
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x10, 0x15000000); //BEMF comp. curve final slope (deceleration)
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x11, 0x00000000); //Thermal compensation factor
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x13, 0x0f000000); //OCD threshold - Needs to be optimized. For now set to maximum
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x14, 0x7f000000); //STALL threshold - Needs to be optimized. For now set to maximum
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x15, 0x00ff0000); //Full step speed
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x16, 0x04000000); //Step mode and sync signal setup: Step mode: 1/16 step, Sync signal: Disabled
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x17, 0xff000000); //Alarms enables
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x18, 0x1ca00000); //IC configuration: Int. osc @16MHz (no clock output),
+ //SW input: HardStop interrupt, Motor supply voltage compensation: Enabled,
+ //Overcurrent shutdown: Enabled, Output slew-rate: Fastest, fPWM = fosc x 2 / 512
+ return 1;
+}
+
+int Screw_Motor_CFG(Int32 Fpga, Int32 HighAdr, Int32 LowAdr)
+{
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x05, 0x07ff0000); //Acceleration
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x06, 0x0fff0000); //Deceleration
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x07, 0x03ff0000); //Maximum speed - used for testing screw arm max speed
+ //Motor_SetParam( Fpga, HighAdr, LowAdr, 0x07, 0x000f0000); //Maximum speed - used for testing screw arm movent at low speed -> max. current
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x08, 0x00000000); //Minimum speed and low speed optimization
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x09, 0x01000000); //Holding Kval
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x0a, 0x20000000); //Constant speed Kval
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x0b, 0x20000000); //Acceleration starting Kval
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x0c, 0x20000000); //Deceleration starting Kval
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x0d, 0x22c50000); //BEMF comp. curve intersect speed
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x0e, 0x07000000); //BEMF comp. curve starting slope
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x0f, 0x15000000); //BEMF comp. curve final slope (acceleration)
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x10, 0x15000000); //BEMF comp. curve final slope (deceleration)
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x11, 0x00000000); //Thermal compensation factor
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x13, 0x0f000000); //OCD threshold
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x14, 0x7f000000); //STALL threshold - Needs to be optimized. For now set to maximum
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x15, 0x03ff0000); //Full step speed - Needs to be optimized. For now set to maximum
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x16, 0x05000000); //Step mode and sync signal setup: Step mode: 1/32 step, Sync signal: Disabled
+// Motor_SetParam( Fpga, HighAdr, LowAdr, 0x17, 0xff000000); //Alarms enables. Commented out since register can only be written during "stop". Trying to write during "High-Z" caused busy-bit to be stuck low
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x18, 0x1ca00000); //IC configuration: Int. osc @16MHz (no clock output),
+ //SW input: HardStop interrupt, Motor supply voltage compensation: Enabled,
+ //Overcurrent shutdown: Enabled, Output slew-rate: Fastest, fPWM = fosc x 2 / 512
+ return 1;
+}
+
+
+int Winder_Motor_Go(Int32 Fpga, Int32 HighAdr, Int32 LowAdr)
+ {
+ //Motor_Run(Fpga, HighAdr, LowAdr, 0x016f00, 0x1); // 7 rps, 1400 full steps/second
+ //Motor_Run(Fpga, HighAdr, LowAdr, 0x02de00, 0x1); //14 rps, 2800 full steps/second
+ Motor_Run(Fpga, HighAdr, LowAdr, 0x039580, 0x1); //17.5 rps, 3500 full steps/second
+ //Motor_HighZ(Fpga, HighAdr, LowAdr);
+ return 1;
+ }
+
+
+int Screw_Motor_Go(Int32 Fpga, Int32 HighAdr, Int32 LowAdr)
+ {
+ Motor_Move_Loop_Screw(Fpga, HighAdr, LowAdr, 0x4200<<1, 0x1, 100); //0x4200 x 2 1/32 steps, 100 times back and forth
+ Motor_HighZ(Fpga, HighAdr, LowAdr);
+ return 1;
+ }
+
+
+public void OnExecute(StubManager stubManager)
+{
+
+ Int32 Bit = 0 ;
+ Motor_OutOfReset();
+ Thread.Sleep(50);
+ Motor_DriverReset();
+ Thread.Sleep(50);
+ Motor_OutOfReset();
+
+ Motor_HighZ(FPGA1, F1_MOTO_SCREW_A1_TX_01, F1_MOTO_SCREW_A1_TX_00);
+ Motor_HighZ(FPGA1, F1_MOTO_WINDER_A1_TX_01, F1_MOTO_WINDER_A1_TX_00);
+
+ //Configure motor drivers
+ Winder_Motor_CFG(FPGA1, F1_MOTO_WINDER_A1_TX_01, F1_MOTO_WINDER_A1_TX_00);
+ Screw_Motor_CFG(FPGA1, F1_MOTO_SCREW_A1_TX_01, F1_MOTO_SCREW_A1_TX_00);
+
+ //Run/move motors
+ Winder_Motor_Go(FPGA1, F1_MOTO_WINDER_A1_TX_01, F1_MOTO_WINDER_A1_TX_00);
+ Screw_Motor_Go(FPGA1, F1_MOTO_SCREW_A1_TX_01, F1_MOTO_SCREW_A1_TX_00);
+
+ Motor_HighZ(FPGA1, F1_MOTO_SCREW_A1_TX_01, F1_MOTO_SCREW_A1_TX_00);
+ Motor_HighZ(FPGA1, F1_MOTO_WINDER_A1_TX_01, F1_MOTO_WINDER_A1_TX_00);
+
+} \ No newline at end of file
diff --git a/Software/Stubs Collection/stubs/michael stubs/Assemblies/screw_motor.cs b/Software/Stubs Collection/stubs/michael stubs/Assemblies/screw_motor.cs
new file mode 100644
index 000000000..3337b0ca7
--- /dev/null
+++ b/Software/Stubs Collection/stubs/michael stubs/Assemblies/screw_motor.cs
@@ -0,0 +1,113 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+include "C:\Twine Code\stubs\michael stubs\Tango_Defines_Basic.cs"
+include "C:\Twine Code\stubs\michael stubs\Interfaces\Tango_Defines_Motors.cs"
+
+
+int Winder_Motor_CFG(Int32 Fpga, Int32 HighAdr, Int32 LowAdr)
+{
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x05, 0x00400000); //Acceleration
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x06, 0x00400000); //Deceleration
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x07, 0x00ff0000); //Maximum speed
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x08, 0x00000000); //Minimum speed and low speed optimization
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x09, 0x01000000); //Holding Kval
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x0a, 0x20000000); //Constant speed Kval
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x0b, 0x20000000); //Acceleration starting Kval
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x0c, 0x20000000); //Deceleration starting Kval
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x0d, 0x22c50000); //BEMF comp. curve intersect speed
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x0e, 0x07000000); //BEMF comp. curve starting slope
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x0f, 0x15000000); //BEMF comp. curve final slope (acceleration)
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x10, 0x15000000); //BEMF comp. curve final slope (deceleration)
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x11, 0x00000000); //Thermal compensation factor
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x13, 0x0f000000); //OCD threshold - Needs to be optimized. For now set to maximum
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x14, 0x7f000000); //STALL threshold - Needs to be optimized. For now set to maximum
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x15, 0x00ff0000); //Full step speed
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x16, 0x04000000); //Step mode and sync signal setup: Step mode: 1/16 step, Sync signal: Disabled
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x17, 0xff000000); //Alarms enables
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x18, 0x1ca00000); //IC configuration: Int. osc @16MHz (no clock output),
+ //SW input: HardStop interrupt, Motor supply voltage compensation: Enabled,
+ //Overcurrent shutdown: Enabled, Output slew-rate: Fastest, fPWM = fosc x 2 / 512
+ return 1;
+}
+
+int Screw_Motor_CFG(Int32 Fpga, Int32 HighAdr, Int32 LowAdr)
+{
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x05, 0x07ff0000); //Acceleration
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x06, 0x0fff0000); //Deceleration
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x07, 0x03ff0000); //Maximum speed - used for testing screw arm max speed
+ //Motor_SetParam( Fpga, HighAdr, LowAdr, 0x07, 0x000f0000); //Maximum speed - used for testing screw arm movent at low speed -> max. current
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x08, 0x00000000); //Minimum speed and low speed optimization
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x09, 0x01000000); //Holding Kval
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x0a, 0x20000000); //Constant speed Kval
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x0b, 0x20000000); //Acceleration starting Kval
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x0c, 0x20000000); //Deceleration starting Kval
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x0d, 0x22c50000); //BEMF comp. curve intersect speed
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x0e, 0x07000000); //BEMF comp. curve starting slope
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x0f, 0x15000000); //BEMF comp. curve final slope (acceleration)
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x10, 0x15000000); //BEMF comp. curve final slope (deceleration)
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x11, 0x00000000); //Thermal compensation factor
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x13, 0x0f000000); //OCD threshold
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x14, 0x7f000000); //STALL threshold - Needs to be optimized. For now set to maximum
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x15, 0x03ff0000); //Full step speed - Needs to be optimized. For now set to maximum
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x16, 0x05000000); //Step mode and sync signal setup: Step mode: 1/32 step, Sync signal: Disabled
+// Motor_SetParam( Fpga, HighAdr, LowAdr, 0x17, 0xff000000); //Alarms enables. Commented out since register can only be written during "stop". Trying to write during "High-Z" caused busy-bit to be stuck low
+ Motor_SetParam( Fpga, HighAdr, LowAdr, 0x18, 0x1ca00000); //IC configuration: Int. osc @16MHz (no clock output),
+ //SW input: HardStop interrupt, Motor supply voltage compensation: Enabled,
+ //Overcurrent shutdown: Enabled, Output slew-rate: Fastest, fPWM = fosc x 2 / 512
+ return 1;
+}
+
+
+int Winder_Motor_Go(Int32 Fpga, Int32 HighAdr, Int32 LowAdr)
+ {
+ //Motor_Run(Fpga, HighAdr, LowAdr, 0x016f00, 0x1); // 7 rps, 1400 full steps/second
+ //Motor_Run(Fpga, HighAdr, LowAdr, 0x02de00, 0x1); //14 rps, 2800 full steps/second
+ Motor_Run(Fpga, HighAdr, LowAdr, 0x039580, 0x1); //17.5 rps, 3500 full steps/second
+ //Motor_HighZ(Fpga, HighAdr, LowAdr);
+ return 1;
+ }
+
+
+int Screw_Motor_Go(Int32 Fpga, Int32 HighAdr, Int32 LowAdr)
+ {
+ Motor_Move_Loop_Screw(Fpga, HighAdr, LowAdr, 0x4200<<1, 0x1, 100); //0x4200 x 2 1/32 steps, 100 times back and forth
+ Motor_HighZ(Fpga, HighAdr, LowAdr);
+ return 1;
+ }
+
+
+public void OnExecute(StubManager stubManager)
+{
+
+ Int32 Bit = 0 ;
+ Motor_OutOfReset();
+ Thread.Sleep(50);
+ Motor_DriverReset();
+ Thread.Sleep(50);
+ Motor_OutOfReset();
+
+ Motor_HighZ(FPGA1, F1_MOTO_SCREW_A1_TX_01, F1_MOTO_SCREW_A1_TX_00);
+ Motor_HighZ(FPGA1, F1_MOTO_WINDER_A1_TX_01, F1_MOTO_WINDER_A1_TX_00);
+
+ //Configure motor drivers
+ Winder_Motor_CFG(FPGA1, F1_MOTO_WINDER_A1_TX_01, F1_MOTO_WINDER_A1_TX_00);
+ Screw_Motor_CFG(FPGA1, F1_MOTO_SCREW_A1_TX_01, F1_MOTO_SCREW_A1_TX_00);
+
+ //Run/move motors
+ Winder_Motor_Go(FPGA1, F1_MOTO_WINDER_A1_TX_01, F1_MOTO_WINDER_A1_TX_00);
+ Screw_Motor_Go(FPGA1, F1_MOTO_SCREW_A1_TX_01, F1_MOTO_SCREW_A1_TX_00);
+
+ Motor_HighZ(FPGA1, F1_MOTO_SCREW_A1_TX_01, F1_MOTO_SCREW_A1_TX_00);
+ Motor_HighZ(FPGA1, F1_MOTO_WINDER_A1_TX_01, F1_MOTO_WINDER_A1_TX_00);
+
+} \ No newline at end of file
diff --git a/Software/Stubs Collection/stubs/michael stubs/Interfaces/Tango_Defines_3WValve.cs b/Software/Stubs Collection/stubs/michael stubs/Interfaces/Tango_Defines_3WValve.cs
new file mode 100644
index 000000000..f7dd95a1e
--- /dev/null
+++ b/Software/Stubs Collection/stubs/michael stubs/Interfaces/Tango_Defines_3WValve.cs
@@ -0,0 +1,16 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+ //Reg Name Functionlity/Contents D15 D14 D13 D12 D11 D10 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0
+const Int32 F2_Prescaler1_reg12 = 0x122; // Variable for prescaler divisions parambit15 parambit14 parambit13 parambit12 parambit11 parambit10 parambit9 parambit8 parambit7 parambit6 parambit5 parambit4 parambit3 parambit2 parambit1 parambit0
+const Int32 F2_DISPENSER_VALVE_OUT = 0x0C2; // Writes to values. Readback the values that are currently in the GPO register F2_DISPENSER_VALVE_EN_8 F2_DISPENSER_VALVE_EN_7 F2_DISPENSER_VALVE_EN_6 F2_DISPENSER_VALVE_EN_5 F2_DISPENSER_VALVE_EN_4 F2_DISPENSER_VALVE_EN_3 F2_DISPENSER_VALVE_EN_2 F2_DISPENSER_VALVE_EN_1 F2_DISPENSER_VALVE_C1_8/F2_DISPENSER_VALVE_C2_8 F2_DISPENSER_VALVE_C1_7/F2_DISPENSER_VALVE_C2_7 F2_DISPENSER_VALVE_C1_6/F2_DISPENSER_VALVE_C2_6 F2_DISPENSER_VALVE_C1_5/F2_DISPENSER_VALVE_C2_5 F2_DISPENSER_VALVE_C1_4/F2_DISPENSER_VALVE_C2_4 F2_DISPENSER_VALVE_C1_3/F2_DISPENSER_VALVE_C2_3 F2_DISPENSER_VALVE_C1_2/F2_DISPENSER_VALVE_C2_2 F2_DISPENSER_VALVE_C1_1/F2_DISPENSER_VALVE_C2_1
+const Int32 F2_DISPENSER_VALVE_IN_Direct = 0x060; // Reads the direct values that are currently being sent to the fpga. Valve_busy_0 Valve_busy_1 Valve_busy_2 Valve_busy_3 Valve_busy_4 Valve_busy_5 Valve_busy_6 Valve_busy_7 F2_DISPENSER_VALVE_OCD_1 F2_DISPENSER_VALVE_OCD_2 F2_DISPENSER_VALVE_OCD_3 F2_DISPENSER_VALVE_OCD_4 F2_DISPENSER_VALVE_OCD_5 F2_DISPENSER_VALVE_OCD_6 F2_DISPENSER_VALVE_OCD_7 F2_DISPENSER_VALVE_OCD_8
diff --git a/Software/Stubs Collection/stubs/michael stubs/Interfaces/Tango_Defines_GPI.cs b/Software/Stubs Collection/stubs/michael stubs/Interfaces/Tango_Defines_GPI.cs
new file mode 100644
index 000000000..23aa257d0
--- /dev/null
+++ b/Software/Stubs Collection/stubs/michael stubs/Interfaces/Tango_Defines_GPI.cs
@@ -0,0 +1,33 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+
+const Int32 F1_GPI_EXTWINDER_Direct = 0x070 ; // "F1_GPI_EXTWINDER_3", "F1_GPI_EXTWINDER_2", "F1_GPI_EXTWINDER_1", "F1_GPI_TFEED_BREAK_2", "F1_GPI_TFEED_BREAK_1", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv"
+const Int32 F2_GPI_REGISTER1_Direct = 0x070 ; // "F2_GPI_CHILLER_STAT1", "F2_GPI_CHILLER_FAULT", "F2_GPI_AIRFLOW_FLAP", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv"
+const Int32 F3_GPI_01_Direct = 0x020 ; // "F3_GPI_WCONTAINER_WARN", "F3_GPI_WCONTAINER_FULL", "GPI_SW_FILTER_PRES", "F3_GPI_PANSW6", "F3_GPI_PANSW5", "F3_GPI_PANSW4", "F3_GPI_PANSW3", "F3_GPI_PANSW2", "F3_GPI_PANSW1", "F3_MON_5V_IF ", "F3_MON_5V_RS ", "F3_MON_3V3_IF ", "F3_MON_3V3_IF ", "F3_MON_5V_BP", "rsv", "rsv"
+const Int32 F3_GPI_02_Direct = 0x090 ; // "F3_GPI_TACTSW4", "F3_GPI_TACTSW3", "F3_GPI_TACTSW2", "F3_GPI_TACTSW1", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv"
+
+const Int32 F3_MIDTANK_01_Direct = 0x030 ; // "F3_MIDTANK2_LVL4_FLOAT_2", "F3_MIDTANK2_LVL4_FLOAT_1", "F3_MIDTANK2_LVL3_FLOAT_2", "F3_MIDTANK2_LVL3_FLOAT_1", "F3_MIDTANK2_LVL2_FLOAT_2", "F3_MIDTANK2_LVL2_FLOAT_1", "F3_MIDTANK2_LVL1_FLOAT_2", "F3_MIDTANK2_LVL1_FLOAT_1", "F3_MIDTANK1_LVL4_FLOAT_2", "F3_MIDTANK1_LVL4_FLOAT_1", "F3_MIDTANK1_LVL3_FLOAT_2", "F3_MIDTANK1_LVL3_FLOAT_1", "F3_MIDTANK1_LVL2_FLOAT_2", "F3_MIDTANK1_LVL2_FLOAT_1", "F3_MIDTANK1_LVL1_FLOAT_2", "F3_MIDTANK1_LVL1_FLOAT_1"
+const Int32 F3_MIDTANK_02_Direct = 0x040 ; // "F3_MIDTANK4_LVL4_FLOAT_2", "F3_MIDTANK4_LVL4_FLOAT_1", "F3_MIDTANK4_LVL3_FLOAT_2", "F3_MIDTANK4_LVL3_FLOAT_1", "F3_MIDTANK4_LVL2_FLOAT_2", "F3_MIDTANK4_LVL2_FLOAT_1", "F3_MIDTANK4_LVL1_FLOAT_2", "F3_MIDTANK4_LVL1_FLOAT_1", "F3_MIDTANK3_LVL4_FLOAT_2", "F3_MIDTANK3_LVL4_FLOAT_1", "F3_MIDTANK3_LVL3_FLOAT_2", "F3_MIDTANK3_LVL3_FLOAT_1", "F3_MIDTANK3_LVL2_FLOAT_2", "F3_MIDTANK3_LVL2_FLOAT_1", "F3_MIDTANK3_LVL1_FLOAT_2", "F3_MIDTANK3_LVL1_FLOAT_1"
+
+const Int32 F3_CARTx_PRES_02_Direct = 0x070 ; // "F3_CART8_PRES", "F3_CART7_PRES", "F3_CART6_PRES", "F3_CART5_PRES", "F3_CART4_PRES", "F3_CART3_PRES", "F3_CART2_PRES", "F3_CART1_PRES", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv"
+
+
+string[] F1_GPI_EXTWINDER_Bits = { "F1_GPI_EXTWINDER_3", "F1_GPI_EXTWINDER_2", "F1_GPI_EXTWINDER_1", "F1_GPI_TFEED_BREAK_2", "F1_GPI_TFEED_BREAK_1", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv"};
+string[] F2_GPI_REGISTER1_Bits = { "F2_GPI_CHILLER_STAT1", "F2_GPI_CHILLER_FAULT", "F2_GPI_AIRFLOW_FLAP", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv"};
+string[] F3_GPI_01_Bits = { "F3_GPI_WCONTAINER_WARN", "F3_GPI_WCONTAINER_FULL", "GPI_SW_FILTER_PRES", "F3_GPI_PANSW6", "F3_GPI_PANSW5", "F3_GPI_PANSW4", "F3_GPI_PANSW3", "F3_GPI_PANSW2", "F3_GPI_PANSW1", "F3_MON_5V_IF ", "F3_MON_5V_RS ", "F3_MON_3V3_IF ", "F3_MON_3V3_IF ", "F3_MON_5V_BP", "rsv", "rsv"};
+string[] F3_GPI_02_Bits = { "F3_GPI_TACTSW4", "F3_GPI_TACTSW3", "F3_GPI_TACTSW2", "F3_GPI_TACTSW1", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv"};
+
+string[] F3_MIDTANK_01_Bits = {"F3_MIDTANK2_LVL4_FLOAT_2", "F3_MIDTANK2_LVL4_FLOAT_1", "F3_MIDTANK2_LVL3_FLOAT_2", "F3_MIDTANK2_LVL3_FLOAT_1", "F3_MIDTANK2_LVL2_FLOAT_2", "F3_MIDTANK2_LVL2_FLOAT_1", "F3_MIDTANK2_LVL1_FLOAT_2", "F3_MIDTANK2_LVL1_FLOAT_1", "F3_MIDTANK1_LVL4_FLOAT_2", "F3_MIDTANK1_LVL4_FLOAT_1", "F3_MIDTANK1_LVL3_FLOAT_2", "F3_MIDTANK1_LVL3_FLOAT_1", "F3_MIDTANK1_LVL2_FLOAT_2", "F3_MIDTANK1_LVL2_FLOAT_1", "F3_MIDTANK1_LVL1_FLOAT_2", "F3_MIDTANK1_LVL1_FLOAT_1"};
+string[] F3_MIDTANK_02_Bits = {"F3_MIDTANK4_LVL4_FLOAT_2", "F3_MIDTANK4_LVL4_FLOAT_1", "F3_MIDTANK4_LVL3_FLOAT_2", "F3_MIDTANK4_LVL3_FLOAT_1", "F3_MIDTANK4_LVL2_FLOAT_2", "F3_MIDTANK4_LVL2_FLOAT_1", "F3_MIDTANK4_LVL1_FLOAT_2", "F3_MIDTANK4_LVL1_FLOAT_1", "F3_MIDTANK3_LVL4_FLOAT_2", "F3_MIDTANK3_LVL4_FLOAT_1", "F3_MIDTANK3_LVL3_FLOAT_2", "F3_MIDTANK3_LVL3_FLOAT_1", "F3_MIDTANK3_LVL2_FLOAT_2", "F3_MIDTANK3_LVL2_FLOAT_1", "F3_MIDTANK3_LVL1_FLOAT_2", "F3_MIDTANK3_LVL1_FLOAT_1"};
+string[] F3_CARTx_PRES_02_Bits = {"F3_CART8_PRES", "F3_CART7_PRES", "F3_CART6_PRES", "F3_CART5_PRES", "F3_CART4_PRES", "F3_CART3_PRES", "F3_CART2_PRES", "F3_CART1_PRES", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv"};
+
diff --git a/Software/Stubs Collection/stubs/michael stubs/Interfaces/Tango_Defines_GPIO.cs b/Software/Stubs Collection/stubs/michael stubs/Interfaces/Tango_Defines_GPIO.cs
new file mode 100644
index 000000000..e330a9fc1
--- /dev/null
+++ b/Software/Stubs Collection/stubs/michael stubs/Interfaces/Tango_Defines_GPIO.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+const Int32 F3_DISPENSER_ROTENC_IN_Direct = 0x050 ; // "F3_DISPENSER_ROTENC_Z_INP_8", "F3_DISPENSER_ROTENC_Z_INP_7", "F3_DISPENSER_ROTENC_Z_INP_6", "F3_DISPENSER_ROTENC_Z_INP_5", "F3_DISPENSER_ROTENC_Z_INP_4", "F3_DISPENSER_ROTENC_Z_INP_3", "F3_DISPENSER_ROTENC_Z_INP_2", "F3_DISPENSER_ROTENC_Z_INP_1", "F3_DISPENSER_ROTENC_C_INP_8", "F3_DISPENSER_ROTENC_C_INP_7", "F3_DISPENSER_ROTENC_C_INP_6", "F3_DISPENSER_ROTENC_C_INP_5", "F3_DISPENSER_ROTENC_C_INP_4", "F3_DISPENSER_ROTENC_C_INP_3", "F3_DISPENSER_ROTENC_C_INP_2", "F3_DISPENSER_ROTENC_C_INP_1"
+const Int32 F3_DISPENSER_ROTENC_OUT = 0x0F2 ; // "F3_DISPENSER_ROTENC_Z_OUT_8", "F3_DISPENSER_ROTENC_Z_OUT_7", "F3_DISPENSER_ROTENC_Z_OUT_6", "F3_DISPENSER_ROTENC_Z_OUT_5", "F3_DISPENSER_ROTENC_Z_OUT_4", "F3_DISPENSER_ROTENC_Z_OUT_3", "F3_DISPENSER_ROTENC_Z_OUT_2", "F3_DISPENSER_ROTENC_Z_OUT_1", "F3_DISPENSER_ROTENC_C_OUT_8", "F3_DISPENSER_ROTENC_C_OUT_7", "F3_DISPENSER_ROTENC_C_OUT_6", "F3_DISPENSER_ROTENC_C_OUT_5", "F3_DISPENSER_ROTENC_C_OUT_4", "F3_DISPENSER_ROTENC_C_OUT_3", "F3_DISPENSER_ROTENC_C_OUT_2", "F3_DISPENSER_ROTENC_C_OUT_1"
+
+string[] F3_DISPENSER_ROTENC_IN_Bits = {"F3_DISPENSER_ROTENC_Z_INP_8", "F3_DISPENSER_ROTENC_Z_INP_7", "F3_DISPENSER_ROTENC_Z_INP_6", "F3_DISPENSER_ROTENC_Z_INP_5", "F3_DISPENSER_ROTENC_Z_INP_4", "F3_DISPENSER_ROTENC_Z_INP_3", "F3_DISPENSER_ROTENC_Z_INP_2", "F3_DISPENSER_ROTENC_Z_INP_1", "F3_DISPENSER_ROTENC_C_INP_8", "F3_DISPENSER_ROTENC_C_INP_7", "F3_DISPENSER_ROTENC_C_INP_6", "F3_DISPENSER_ROTENC_C_INP_5", "F3_DISPENSER_ROTENC_C_INP_4", "F3_DISPENSER_ROTENC_C_INP_3", "F3_DISPENSER_ROTENC_C_INP_2", "F3_DISPENSER_ROTENC_C_INP_1"};
+string[] F3_DISPENSER_ROTENC_Bits = {"F3_DISPENSER_ROTENC_Z_OUT_8", "F3_DISPENSER_ROTENC_Z_OUT_7", "F3_DISPENSER_ROTENC_Z_OUT_6", "F3_DISPENSER_ROTENC_Z_OUT_5", "F3_DISPENSER_ROTENC_Z_OUT_4", "F3_DISPENSER_ROTENC_Z_OUT_3", "F3_DISPENSER_ROTENC_Z_OUT_2", "F3_DISPENSER_ROTENC_Z_OUT_1", "F3_DISPENSER_ROTENC_C_OUT_8", "F3_DISPENSER_ROTENC_C_OUT_7", "F3_DISPENSER_ROTENC_C_OUT_6", "F3_DISPENSER_ROTENC_C_OUT_5", "F3_DISPENSER_ROTENC_C_OUT_4", "F3_DISPENSER_ROTENC_C_OUT_3", "F3_DISPENSER_ROTENC_C_OUT_2", "F3_DISPENSER_ROTENC_C_OUT_1"}; \ No newline at end of file
diff --git a/Software/Stubs Collection/stubs/michael stubs/Interfaces/Tango_Defines_GPO.cs b/Software/Stubs Collection/stubs/michael stubs/Interfaces/Tango_Defines_GPO.cs
new file mode 100644
index 000000000..6694722d2
--- /dev/null
+++ b/Software/Stubs Collection/stubs/michael stubs/Interfaces/Tango_Defines_GPO.cs
@@ -0,0 +1,21 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+
+const Int32 F3_VALVE_OUT = 0x0E2 ; // "F3_MIDTANK2MANIF4_VALVE_2", "F3_MIDTANK2MANIF4_VALVE_1", "F3_MIDTANK2MANIF3_VALVE_2", "F3_MIDTANK2MANIF3_VALVE_1", "F3_MIDTANK2MANIF2_VALVE_2", "F3_MIDTANK2MANIF2_VALVE_1", "F3_MIDTANK2MANIF1_VALVE_2", "F3_MIDTANK2MANIF1_VALVE_1", "F3_CART2MIDTANK4_VALVE_2", "F3_CART2MIDTANK4_VALVE_1", "F3_CART2MIDTANK3_VALVE_2", "F3_CART2MIDTANK3_VALVE_1", "F3_CART2MIDTANK2_VALVE_2", "F3_CART2MIDTANK2_VALVE_1", "F3_CART2MIDTANK1_VALVE_2", "F3_CART2MIDTANK1_VALVE_1"
+string[] F3_VALVE_Bits = {"F3_MIDTANK2MANIF4_VALVE_2", "F3_MIDTANK2MANIF4_VALVE_1", "F3_MIDTANK2MANIF3_VALVE_2", "F3_MIDTANK2MANIF3_VALVE_1", "F3_MIDTANK2MANIF2_VALVE_2", "F3_MIDTANK2MANIF2_VALVE_1", "F3_MIDTANK2MANIF1_VALVE_2", "F3_MIDTANK2MANIF1_VALVE_1", "F3_CART2MIDTANK4_VALVE_2", "F3_CART2MIDTANK4_VALVE_1", "F3_CART2MIDTANK3_VALVE_2", "F3_CART2MIDTANK3_VALVE_1", "F3_CART2MIDTANK2_VALVE_2", "F3_CART2MIDTANK2_VALVE_1", "F3_CART2MIDTANK1_VALVE_2", "F3_CART2MIDTANK1_VALVE_1"};
+
+const Int32 F1_gpo_01 = 0x3D2 ; // "F1_GPO_WASTECH_PUMP2", "F1_GPO_WHS_WTANKPUMP2", "F1_GPO_DILUTORPUMP_SSR10_CTRL ", "F1_GPO_EXTWINDER_3 ", "F1_GPO_EXTWINDER_2 ", "F1_GPO_EXTWINDER_1 ", "F1_VALVE_WASTE_TANK ", "F1_VALVE_MIXCHIP_WASTECH", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv"
+string[] F1_gpo_01_Bits = { "F1_GPO_WASTECH_PUMP2", "F1_GPO_WHS_WTANKPUMP2", "F1_GPO_DILUTORPUMP_SSR10_CTRL ", "F1_GPO_EXTWINDER_3 ", "F1_GPO_EXTWINDER_2 ", "F1_GPO_EXTWINDER_1 ", "F1_VALVE_WASTE_TANK ", "F1_VALVE_MIXCHIP_WASTECH", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv"};
+
+const Int32 F3_GPO_01_bus = 0x0C2 ; // "F3_GPO_LED4", "F3_GPO_LED3", "F3_GPO_LED2", "F3_GPO_LED1", "F3_GPO_EXTWINDER_SSR11_CTRL ", "F3_GPO_BUZZER", "F3_SPARE2_ROTENC_CLK", "F3_SPARE1_ROTENC_CLK", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv"
+string[] F3_GPO_01_bus_Bits = { "F3_GPO_LED4", "F3_GPO_LED3", "F3_GPO_LED2", "F3_GPO_LED1", "F3_GPO_EXTWINDER_SSR11_CTRL ", "F3_GPO_BUZZER", "F3_SPARE2_ROTENC_CLK", "F3_SPARE1_ROTENC_CLK", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv"};
diff --git a/Software/Stubs Collection/stubs/michael stubs/Interfaces/Tango_Defines_LimitSwitch.cs b/Software/Stubs Collection/stubs/michael stubs/Interfaces/Tango_Defines_LimitSwitch.cs
new file mode 100644
index 000000000..343ba7555
--- /dev/null
+++ b/Software/Stubs Collection/stubs/michael stubs/Interfaces/Tango_Defines_LimitSwitch.cs
@@ -0,0 +1,39 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+
+
+//Reg Name Functionlity/Contents D15 D14 D13 D12 D11 D10 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0
+
+/*** LTFU and RTFU Limit switches ***/
+const Int32 F1_LS_01_Direct = 0x020 ; // Reads the direct values that are currently being sent to the fpga. rsv rsv F1_LS_DH_CLEAN_DOWN F1_LS_DH_CLEAN_LEFT F1_LS_DH_CLEAN_RIGHT F1_LS_DH_CLEAN_UP F1_LS_DH_LID_CLEANING F1_LS_DH_LID_CLOSED F1_LS_DH_LID_OPEN F1_LS_DH_SPARE2 F1_LS_DRYER_LID_CLOSED F1_LS_DRYER_LID_OPEN F1_LS_DRYER_SPARE1 F1_LS_DRYER_SPARE2 F1_LS_DRYER_SPARE3 F1_LS_DRYER_SPARE4
+const Int32 F1_LS_02_Direct = 0x030 ; // Reads the direct values that are currently being sent to the fpga. rsv rsv F1_LS_LDANCER1_DOWN F1_LS_LDANCER1_UP F1_LS_LDANCER2_DOWN F1_LS_LDANCER2_UP F1_LS_LLOADMOTOR_DOWN F1_LS_LLOADMOTOR_UP F1_LS_LOADARM_LEFT F1_LS_LOADARM_RIGHT F1_LS_LPIVOT_DOWN F1_LS_LPIVOT_UP F1_LS_LSPARE1 F1_LS_LSPARE2 F1_LS_PIVOT_SPARE1 F1_LS_PIVOT_SPARE2
+const Int32 F1_LS_03_Direct = 0x040 ; // Reads the direct values that are currently being sent to the fpga. rsv rsv rsv rsv F1_SW_SPOOL_EXISTS F1_SW_SPARE F1_LS_RDANCER_DOWN F1_LS_RDANCER_UP F1_LS_RLOADMOTOR_DOWN F1_LS_RLOADMOTOR_UP F1_LS_RLOADRAM_DOWN F1_LS_RLOADRAM_UP F1_LS_RSPARE1 F1_LS_RSPARE2 F1_LS_SCREW_LEFT F1_LS_SCREW_RIGHT
+
+/*** Dispenser switches ***/
+const Int32 F2_LS_01_Direct = 0x020 ; // Reads the direct values that are currently being sent to the fpga. rsv rsv rsv rsv F2_LS_DISPENSER_UP_2 F2_LS_DISPENSER_25_2 F2_LS_DISPENSER_75_2 F2_LS_DISPENSER_DOWN_2 F2_LS_DISPENSER_50_2 F2_LS_DISPENSER_SPARE_2 F2_LS_DISPENSER_UP_1 F2_LS_DISPENSER_25_1 F2_LS_DISPENSER_75_1 F2_LS_DISPENSER_DOWN_1 F2_LS_DISPENSER_50_1 F2_LS_DISPENSER_SPARE_1
+const Int32 F2_LS_02_Direct = 0x030 ; // Reads the direct values that are currently being sent to the fpga. rsv rsv rsv rsv F2_LS_DISPENSER_UP_4 F2_LS_DISPENSER_25_4 F2_LS_DISPENSER_75_4 F2_LS_DISPENSER_DOWN_4 F2_LS_DISPENSER_50_4 F2_LS_DISPENSER_SPARE_4 F2_LS_DISPENSER_UP_3 F2_LS_DISPENSER_25_3 F2_LS_DISPENSER_75_3 F2_LS_DISPENSER_DOWN_3 F2_LS_DISPENSER_50_3 F2_LS_DISPENSER_SPARE_3
+const Int32 F2_LS_03_Direct = 0x040 ; // Reads the direct values that are currently being sent to the fpga. rsv rsv rsv rsv F2_LS_DISPENSER_UP_6 F2_LS_DISPENSER_25_6 F2_LS_DISPENSER_75_6 F2_LS_DISPENSER_DOWN_6 F2_LS_DISPENSER_50_6 F2_LS_DISPENSER_SPARE_6 F2_LS_DISPENSER_UP_5 F2_LS_DISPENSER_25_5 F2_LS_DISPENSER_75_5 F2_LS_DISPENSER_DOWN_5 F2_LS_DISPENSER_50_5 F2_LS_DISPENSER_SPARE_5
+const Int32 F2_LS_04_Direct = 0x080 ; // Reads the direct values that are currently being sent to the fpga. rsv rsv rsv rsv F2_LS_DISPENSER_UP_8 F2_LS_DISPENSER_25_8 F2_LS_DISPENSER_75_8 F2_LS_DISPENSER_DOWN_8 F2_LS_DISPENSER_50_8 F2_LS_DISPENSER_SPARE_8 F2_LS_DISPENSER_UP_7 F2_LS_DISPENSER_25_7 F2_LS_DISPENSER_75_7 F2_LS_DISPENSER_DOWN_7 F2_LS_DISPENSER_50_7 F2_LS_DISPENSER_SPARE_7
+
+const Int32 F3_LS_01_Direct = 0x080 ; // Reads the direct values that are currently being sent to the fpga. rsv rsv rsv rsv rsv rsv rsv rsv F3_LS_SPARE1_1 F3_LS_SPARE1_2 F3_LS_SPARE1_3 F3_LS_SPARE1_4 F3_LS_SPARE2_1 F3_LS_SPARE2_2 F3_LS_SPARE2_3 F3_LS_SPARE2_4
+
+string[] F1_LS_01_Bits = { "F1_LS_DRYER_SPARE4", "F1_LS_DRYER_SPARE3", "F1_LS_DRYER_SPARE2", "F1_LS_DRYER_SPARE1", "F1_LS_DRYER_LID_OPEN", "F1_LS_DRYER_LID_CLOSED", "F1_LS_DH_SPARE2", "F1_LS_DH_LID_OPEN", "F1_LS_DH_LID_CLOSED", "F1_LS_DH_LID_CLEANING", "F1_LS_DH_CLEAN_UP", "F1_LS_DH_CLEAN_RIGHT", "F1_LS_DH_CLEAN_LEFT", "F1_LS_DH_CLEAN_DOWN", "rsv", "rsv"};
+string[] F1_LS_02_Bits = { "F1_LS_PIVOT_SPARE2", "F1_LS_PIVOT_SPARE1", "F1_LS_LSPARE2", "F1_LS_LSPARE1", "F1_LS_LPIVOT_UP", "F1_LS_LPIVOT_DOWN", "F1_LS_LOADARM_RIGHT", "F1_LS_LOADARM_LEFT", "F1_LS_LLOADMOTOR_UP", "F1_LS_LLOADMOTOR_DOWN", "F1_LS_LDANCER2_UP", "F1_LS_LDANCER2_DOWN", "F1_LS_LDANCER1_UP", "F1_LS_LDANCER1_DOWN", "rsv", "rsv"};
+string[] F1_LS_03_Bits = { "F1_LS_SCREW_RIGHT", "F1_LS_SCREW_LEFT", "F1_LS_RSPARE2", "F1_LS_RSPARE1", "F1_LS_RLOADRAM_UP", "F1_LS_RLOADRAM_DOWN", "F1_LS_RLOADMOTOR_UP", "F1_LS_RLOADMOTOR_DOWN", "F1_LS_RDANCER_UP", "F1_LS_RDANCER_DOWN", "F1_SW_SPARE", "F1_SW_SPOOL_EXISTS", "rsv", "rsv", "rsv", "rsv"};
+string[] F2_LS_01_Bits = { "F2_LS_DISPENSER_SPARE_1", "F2_LS_DISPENSER_50_1", "F2_LS_DISPENSER_DOWN_1", "F2_LS_DISPENSER_75_1", "F2_LS_DISPENSER_25_1", "F2_LS_DISPENSER_UP_1", "F2_LS_DISPENSER_SPARE_2", "F2_LS_DISPENSER_50_2", "F2_LS_DISPENSER_DOWN_2", "F2_LS_DISPENSER_75_2", "F2_LS_DISPENSER_25_2", "F2_LS_DISPENSER_UP_2", "rsv", "rsv", "rsv", "rsv"};
+string[] F2_LS_02_Bits = { "F2_LS_DISPENSER_SPARE_3", "F2_LS_DISPENSER_50_3", "F2_LS_DISPENSER_DOWN_3", "F2_LS_DISPENSER_75_3", "F2_LS_DISPENSER_25_3", "F2_LS_DISPENSER_UP_3", "F2_LS_DISPENSER_SPARE_4", "F2_LS_DISPENSER_50_4", "F2_LS_DISPENSER_DOWN_4", "F2_LS_DISPENSER_75_4", "F2_LS_DISPENSER_25_4", "F2_LS_DISPENSER_UP_4", "rsv", "rsv", "rsv", "rsv"};
+string[] F2_LS_03_Bits = { "F2_LS_DISPENSER_SPARE_5", "F2_LS_DISPENSER_50_5", "F2_LS_DISPENSER_DOWN_5", "F2_LS_DISPENSER_75_5", "F2_LS_DISPENSER_25_5", "F2_LS_DISPENSER_UP_5", "F2_LS_DISPENSER_SPARE_6", "F2_LS_DISPENSER_50_6", "F2_LS_DISPENSER_DOWN_6", "F2_LS_DISPENSER_75_6 ", "F2_LS_DISPENSER_25_6 ", "F2_LS_DISPENSER_UP_6 ", "rsv", "rsv", "rsv", "rsv"};
+string[] F2_LS_04_Bits = { "F2_LS_DISPENSER_SPARE_7", "F2_LS_DISPENSER_50_7", "F2_LS_DISPENSER_DOWN_7", "F2_LS_DISPENSER_75_7", "F2_LS_DISPENSER_25_7", "F2_LS_DISPENSER_UP_7", "F2_LS_DISPENSER_SPARE_8", "F2_LS_DISPENSER_50_8", "F2_LS_DISPENSER_DOWN_8", "F2_LS_DISPENSER_75_8", "F2_LS_DISPENSER_25_8", "F2_LS_DISPENSER_UP_8", "rsv", "rsv", "rsv", "rsv"};
+string[] F3_LS_01_Bits = { "F3_LS_SPARE2_4", "F3_LS_SPARE2_3", "F3_LS_SPARE2_2", "F3_LS_SPARE2_1", "F3_LS_SPARE1_4", "F3_LS_SPARE1_3", "F3_LS_SPARE1_2", "F3_LS_SPARE1_1", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv"};
+
+
diff --git a/Software/Stubs Collection/stubs/michael stubs/Interfaces/Tango_Defines_Motors.cs b/Software/Stubs Collection/stubs/michael stubs/Interfaces/Tango_Defines_Motors.cs
new file mode 100644
index 000000000..a2bd85fbe
--- /dev/null
+++ b/Software/Stubs Collection/stubs/michael stubs/Interfaces/Tango_Defines_Motors.cs
@@ -0,0 +1,413 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+//Reg Name Functionlity/Contents D15 D14 D13 D12 D11 D10 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0
+const Int32 F1_Moto_Driver_NBUSY1_Direct = 0x050;// Reads the direct values that are currently being sent to the fpga. rsv rsv rsv rsv rsv F1_MOTO_DH_CLEANHEAD_A1_NBUSY F1_MOTO_DH_CLEANMECH_A1_NBUSY F1_MOTO_DH_LID_A1_NBUSY F1_MOTO_DRYER_DRIVING_A1_NBUSY F1_MOTO_DRYER_LID_A1_NBUSY F1_MOTO_DRYER_LOADARM_A1_NBUSY F1_MOTO_LDANCER1_A1_NBUSY F1_MOTO_LDANCER2_A1_NBUSY F1_MOTO_LDRIVING_A1_NBUSY F1_MOTO_LLOADING_A1_NBUSY F1_MOTO_LPIVOT1_A1_NBUSY
+const Int32 F1_Moto_Driver_NBUSY2_Direct = 0x060;// Reads the direct values that are currently being sent to the fpga. rsv rsv rsv rsv rsv rsv rsv rsv rsv rsv F1_MOTO_RDANCER_A1_NBUSY F1_MOTO_RDRIVING_A1_NBUSY F1_MOTO_RLOADARM_A1_NBUSY F1_MOTO_RLOADING_A1_NBUSY F1_MOTO_SCREW_A1_NBUSY F1_MOTO_WINDER_A1_NBUSY
+const Int32 F2_Moto_Driver_NBUSY1_Direct = 0x050;// Reads the direct values that are currently being sent to the fpga. rsv rsv rsv rsv rsv rsv rsv rsv F2_MOTO_DISPENSER_A1_1_NBUSY F2_MOTO_DISPENSER_A1_2_NBUSY F2_MOTO_DISPENSER_A1_3_NBUSY F2_MOTO_DISPENSER_A1_4_NBUSY F2_MOTO_DISPENSER_A1_5_NBUSY F2_MOTO_DISPENSER_A1_6_NBUSY F2_MOTO_DISPENSER_A1_7_NBUSY F2_MOTO_DISPENSER_A1_8_NBUSY
+const Int32 F3_Moto_Driver_NBUSY1_Direct = 0x060;// Reads the direct values that are currently being sent to the fpga. rsv rsv rsv rsv rsv rsv rsv rsv rsv rsv rsv F3_MOTO_SPARE3_1_A1_NBUSY F3_MOTO_SPARE2_2_A1_NBUSY F3_MOTO_SPARE2_1_A1_NBUSY F3_MOTO_SPARE1_2_A1_NBUSY F3_MOTO_SPARE1_1_A1_NBUSY
+
+/*** Motor Driver Reset Signals ***/
+//Reg Name Functionlity/Contents D15 D14 D13 D12 D11 D10 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0
+
+const Int32 F1_Moto_Driver_NSTBYRST1 = 0x0B2 ; // "F1_MOTO_LPIVOT1_A1_NSTBYRST", "F1_MOTO_LLOADING_A1_NSTBYRST", "F1_MOTO_LDRIVING_A1_NSTBYRST", "F1_MOTO_LDANCER2_A1_NSTBYRST", "F1_MOTO_LDANCER1_A1_NSTBYRST", "F1_MOTO_DRYER_LOADARM_A1_NSTBYRST", "F1_MOTO_DRYER_LID_A1_NSTBYRST", "F1_MOTO_DRYER_DRIVING_A1_NSTBYRST", "F1_MOTO_DH_LID_A1_NSTBYRST", "F1_MOTO_DH_CLEANMECH_A1_NSTBYRST", "F1_MOTO_DH_CLEANHEAD_A1_NSTBYRST", "rsv", "rsv", "rsv", "rsv", "rsv"
+string[] F1_Moto_Driver_NSTBYRST1_Bits = {"F1_MOTO_LPIVOT1_A1_NSTBYRST", "F1_MOTO_LLOADING_A1_NSTBYRST", "F1_MOTO_LDRIVING_A1_NSTBYRST", "F1_MOTO_LDANCER2_A1_NSTBYRST", "F1_MOTO_LDANCER1_A1_NSTBYRST", "F1_MOTO_DRYER_LOADARM_A1_NSTBYRST", "F1_MOTO_DRYER_LID_A1_NSTBYRST", "F1_MOTO_DRYER_DRIVING_A1_NSTBYRST", "F1_MOTO_DH_LID_A1_NSTBYRST", "F1_MOTO_DH_CLEANMECH_A1_NSTBYRST", "F1_MOTO_DH_CLEANHEAD_A1_NSTBYRST", "rsv", "rsv", "rsv", "rsv", "rsv"};
+
+const Int32 F1_Moto_Driver_NSTBYRST2 = 0x0C2 ; // "F1_MOTO_WINDER_A1_NSTBYRST", "F1_MOTO_SCREW_A1_NSTBYRST", "F1_MOTO_RLOADING_A1_NSTBYRST", "F1_MOTO_RLOADARM_A1_NSTBYRST", "F1_MOTO_RDRIVING_A1_NSTBYRST", "F1_MOTO_RDANCER_A1_NSTBYRST", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv"
+string[] F1_Moto_Driver_NSTBYRST2_Bits = {"F1_MOTO_WINDER_A1_NSTBYRST", "F1_MOTO_SCREW_A1_NSTBYRST", "F1_MOTO_RLOADING_A1_NSTBYRST", "F1_MOTO_RLOADARM_A1_NSTBYRST", "F1_MOTO_RDRIVING_A1_NSTBYRST", "F1_MOTO_RDANCER_A1_NSTBYRST", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv"};
+
+const Int32 F2_Moto_Driver_NSTBYRST1 = 0x0B2 ; // "F2_MOTO_DISPENSER_A1_8_NSTBYRST", "F2_MOTO_DISPENSER_A1_7_NSTBYRST", "F2_MOTO_DISPENSER_A1_6_NSTBYRST", "F2_MOTO_DISPENSER_A1_5_NSTBYRST", "F2_MOTO_DISPENSER_A1_4_NSTBYRST", "F2_MOTO_DISPENSER_A1_3_NSTBYRST", "F2_MOTO_DISPENSER_A1_2_NSTBYRST", "F2_MOTO_DISPENSER_A1_1_NSTBYRST", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv"
+string[] F2_Moto_Driver_NSTBYRST1_Bits = {"F2_MOTO_DISPENSER_A1_8_NSTBYRST", "F2_MOTO_DISPENSER_A1_7_NSTBYRST", "F2_MOTO_DISPENSER_A1_6_NSTBYRST", "F2_MOTO_DISPENSER_A1_5_NSTBYRST", "F2_MOTO_DISPENSER_A1_4_NSTBYRST", "F2_MOTO_DISPENSER_A1_3_NSTBYRST", "F2_MOTO_DISPENSER_A1_2_NSTBYRST", "F2_MOTO_DISPENSER_A1_1_NSTBYRST", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv"};
+
+const Int32 F3_Moto_Driver_NSTBYRST1 = 0x0B2 ; // "F3_MOTO_SPARE3_1_A1_NSTBYRST", "F3_MOTO_SPARE2_2_A1_NSTBYRST", "F3_MOTO_SPARE2_1_A1_NSTBYRST", "F3_MOTO_SPARE1_2_A1_NSTBYRST", "F3_MOTO_SPARE1_1_A1_NSTBYRST", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv"
+string[] F3_Moto_Driver_NSTBYRST1_Bits = {"F3_MOTO_SPARE3_1_A1_NSTBYRST", "F3_MOTO_SPARE2_2_A1_NSTBYRST", "F3_MOTO_SPARE2_1_A1_NSTBYRST", "F3_MOTO_SPARE1_2_A1_NSTBYRST", "F3_MOTO_SPARE1_1_A1_NSTBYRST", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv"};
+
+/*** SW signals ***/
+const Int32 F1_Moto_Driver_SW1 = 0x0D2 ; // "F1_MOTO_LPIVOT1_A1_SW ", "F1_MOTO_LLOADING_A1_SW ", "F1_MOTO_LDRIVING_A1_SW ", "F1_MOTO_LDANCER2_A1_SW ", "F1_MOTO_LDANCER1_A1_SW ", "F1_MOTO_DRYER_LOADARM_A1_SW ", "F1_MOTO_DRYER_LID_A1_SW ", "F1_MOTO_DRYER_DRIVING_A1_SW ", "F1_MOTO_DH_LID_A1_SW ", "F1_MOTO_DH_CLEANMECH_A1_SW ", "F1_MOTO_DH_CLEANHEAD_A1_SW", "F1_GPO_TFEED_BREAK_1", "F1_GPO_TFEED_BREAK_2", "rsv", "rsv", "rsv"
+string[] F1_Moto_Driver_SW1_Bits = {"F1_MOTO_LPIVOT1_A1_SW ", "F1_MOTO_LLOADING_A1_SW ", "F1_MOTO_LDRIVING_A1_SW ", "F1_MOTO_LDANCER2_A1_SW ", "F1_MOTO_LDANCER1_A1_SW ", "F1_MOTO_DRYER_LOADARM_A1_SW ", "F1_MOTO_DRYER_LID_A1_SW ", "F1_MOTO_DRYER_DRIVING_A1_SW ", "F1_MOTO_DH_LID_A1_SW ", "F1_MOTO_DH_CLEANMECH_A1_SW ", "F1_MOTO_DH_CLEANHEAD_A1_SW", "F1_GPO_TFEED_BREAK_1", "F1_GPO_TFEED_BREAK_2", "rsv", "rsv", "rsv"};
+const Int32 F1_Moto_Driver_SW2 = 0x0E2 ; // "F1_MOTO_WINDER_A1_SW", "F1_MOTO_SCREW_A1_SW ", "F1_MOTO_RLOADING_A1_SW ", "F1_MOTO_RLOADARM_A1_SW ", "F1_MOTO_RDRIVING_A1_SW ", "F1_MOTO_RDANCER_A1_SW ", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv"
+//const Int32 F2_Moto_Driver_SW1 = 0x0D2 ; // "F1_MOTO_LPIVOT1_A1_SW ", "F1_MOTO_LLOADING_A1_SW ", "F1_MOTO_LDRIVING_A1_SW ", "F1_MOTO_LDANCER2_A1_SW ", "F1_MOTO_LDANCER1_A1_SW ", "F1_MOTO_DRYER_LOADARM_A1_SW ", "F1_MOTO_DRYER_LID_A1_SW ", "F1_MOTO_DRYER_DRIVING_A1_SW ", "F1_MOTO_DH_LID_A1_SW ", "F1_MOTO_DH_CLEANMECH_A1_SW ", "F1_MOTO_DH_CLEANHEAD_A1_SW", "F1_GPO_TFEED_BREAK_1", "F1_GPO_TFEED_BREAK_2", "rsv", "rsv", "rsv"
+const Int32 F3_Moto_Driver_SW1 = 0x0D2 ; // "F3_MOTO_SPARE1_1_A1_SW", "F3_MOTO_SPARE1_2_A1_SW", "F3_MOTO_SPARE2_1_A1_SW", "F3_MOTO_SPARE2_2_A1_SW", "F3_MOTO_SPARE3_1_A1_SW", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv", "rsv"
+
+
+/*** RTFU Motors ***/
+const Int32 F1_MOTO_RLOADING_TX1 = 0x0202;
+const Int32 F1_MOTO_RLOADING_TX0 = 0x0200;
+const Int32 F1_MOTO_RLOADING_RX1 = 0x0206;
+const Int32 F1_MOTO_RLOADING_RX0 = 0x0204;
+const Int32 F1_MOTO_RDRIVING_TX1 = 0x0212;
+const Int32 F1_MOTO_RDRIVING_TX0 = 0x0210;
+const Int32 F1_MOTO_RDRIVING_RX1 = 0x0216;
+const Int32 F1_MOTO_RDRIVING_RX0 = 0x0214;
+const Int32 F1_MOTO_RLOADARM_TX1 = 0x02a2;
+const Int32 F1_MOTO_RLOADARM_TX0 = 0x02a0;
+const Int32 F1_MOTO_RDANCER_TX1 = 0x02b2;
+const Int32 F1_MOTO_RDANCER_TX0 = 0x02b0;
+
+/*** LTFU Motors ***/
+const Int32 F1_MOTO_LDRIVING_TX1 = 0x0222;
+const Int32 F1_MOTO_LDRIVING_TX0 = 0x0220;
+const Int32 F1_MOTO_LDRIVING_RX1 = 0x0226;
+const Int32 F1_MOTO_LDRIVING_RX0 = 0x0224;
+const Int32 F1_MOTO_LLOADING_TX1 = 0x0232;
+const Int32 F1_MOTO_LLOADING_TX0 = 0x0230;
+const Int32 F1_MOTO_LDANCER1_TX1 = 0x02c2;
+const Int32 F1_MOTO_LDANCER1_TX0 = 0x02c0;
+const Int32 F1_MOTO_LDANCER2_TX1 = 0x02d2;
+const Int32 F1_MOTO_LDANCER2_TX0 = 0x02d0;
+const Int32 F1_MOTO_LDANCER2_A1_AMT_OF_WORDS = 0x02d8;
+const Int32 F1_MOTO_LPIVOT1_TX1 = 0x0302;
+const Int32 F1_MOTO_LPIVOT1_TX0 = 0x0300;
+const Int32 F1_MOTO_LPIVOT1_A1_AMT_OF_WORDS = 0x0308;
+
+/*** Dryer Motors ***/
+const Int32 F1_MOTO_DRYER_LOADARM_A1_TX_00 = 0x240 ;
+const Int32 F1_MOTO_DRYER_LOADARM_A1_TX_01 = 0x242 ;
+const Int32 F1_MOTO_DRYER_LOADARM_A1_RX_00 = 0x244 ;
+const Int32 F1_MOTO_DRYER_LOADARM_A1_RX_01 = 0x246 ;
+const Int32 F1_MOTO_DRYER_DRIVING_A1_TX_00 = 0x250 ;
+const Int32 F1_MOTO_DRYER_DRIVING_A1_TX_01 = 0x252 ;
+const Int32 F1_MOTO_DRYER_DRIVING_A1_RX_00 = 0x254 ;
+const Int32 F1_MOTO_DRYER_DRIVING_A1_RX_01 = 0x256 ;
+const Int32 F1_MOTO_DRYER_LID_A1_TX_00 = 0x2E0 ;
+const Int32 F1_MOTO_DRYER_LID_A1_TX_01 = 0x2E2 ;
+const Int32 F1_MOTO_DRYER_LID_A1_RX_00 = 0x2E4 ;
+const Int32 F1_MOTO_DRYER_LID_A1_RX_01 = 0x2E6 ;
+
+/*** Dyeing Head Motors ***/
+const Int32 F1_MOTO_DH_CLEANHEAD_A1_TX_00 = 0x260 ;
+const Int32 F1_MOTO_DH_CLEANHEAD_A1_TX_01 = 0x262 ;
+const Int32 F1_MOTO_DH_CLEANHEAD_A1_RX_00 = 0x264 ;
+const Int32 F1_MOTO_DH_CLEANHEAD_A1_RX_01 = 0x266 ;
+const Int32 F1_MOTO_DH_CLEANMECH_A1_TX_00 = 0x270 ;
+const Int32 F1_MOTO_DH_CLEANMECH_A1_TX_01 = 0x272 ;
+const Int32 F1_MOTO_DH_CLEANMECH_A1_RX_00 = 0x274 ;
+const Int32 F1_MOTO_DH_CLEANMECH_A1_RX_01 = 0x276 ;
+const Int32 F1_MOTO_DH_LID_A1_TX_00 = 0x2F0 ;
+const Int32 F1_MOTO_DH_LID_A1_TX_01 = 0x2F2 ;
+const Int32 F1_MOTO_DH_LID_A1_RX_00 = 0x2F4 ;
+const Int32 F1_MOTO_DH_LID_A1_RX_01 = 0x2F6 ;
+
+/*** Winder Motors ***/
+const Int32 F1_MOTO_SCREW_A1_TX_00 = 0x280 ;
+const Int32 F1_MOTO_SCREW_A1_TX_01 = 0x282 ;
+const Int32 F1_MOTO_SCREW_A1_RX_00 = 0x284 ;
+const Int32 F1_MOTO_SCREW_A1_RX_01 = 0x286 ;
+const Int32 F1_MOTO_WINDER_A1_TX_00 = 0x290 ;
+const Int32 F1_MOTO_WINDER_A1_TX_01 = 0x292 ;
+const Int32 F1_MOTO_WINDER_A1_RX_00 = 0x294 ;
+const Int32 F1_MOTO_WINDER_A1_RX_01 = 0x296 ;
+
+/*** Dispenser Motors ***/
+const Int32 F2_MOTO_DISPENSER_A1_1_TX_00 = 0x320 ; // The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
+const Int32 F2_MOTO_DISPENSER_A1_1_TX_01 = 0x322 ; // The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
+const Int32 F2_MOTO_DISPENSER_A1_1_RX_00 = 0x324 ; // The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
+const Int32 F2_MOTO_DISPENSER_A1_1_RX_01 = 0x326 ; // The 16 Lsb bits of the shifted in data.
+const Int32 F2_MOTO_DISPENSER_A1_1_AMT_OF_WORDS = 0x328 ; // The amount of spi words (usually byte sized) per transmission.
+const Int32 F2_MOTO_DISPENSER_A1_2_TX_00 = 0x330 ; // The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
+const Int32 F2_MOTO_DISPENSER_A1_2_TX_01 = 0x332 ; // The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
+const Int32 F2_MOTO_DISPENSER_A1_2_RX_00 = 0x334 ; // The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
+const Int32 F2_MOTO_DISPENSER_A1_2_RX_01 = 0x336 ; // The 16 Lsb bits of the shifted in data.
+const Int32 F2_MOTO_DISPENSER_A1_2AMT_OF_WORDS = 0x338 ; // The amount of spi words (usually byte sized) per transmission.
+const Int32 F2_MOTO_DISPENSER_A1_3_TX_00 = 0x340 ; // The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
+const Int32 F2_MOTO_DISPENSER_A1_3_TX_01 = 0x342 ; // The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
+const Int32 F2_MOTO_DISPENSER_A1_3_RX_00 = 0x344 ; // The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
+const Int32 F2_MOTO_DISPENSER_A1_3_RX_01 = 0x346 ; // The 16 Lsb bits of the shifted in data.
+const Int32 F2_MOTO_DISPENSER_A1_3_AMT_OF_WORDS = 0x348 ; // The amount of spi words (usually byte sized) per transmission.
+const Int32 F2_MOTO_DISPENSER_A1_4_TX_00 = 0x350 ; // The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
+const Int32 F2_MOTO_DISPENSER_A1_4_TX_01 = 0x352 ; // The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
+const Int32 F2_MOTO_DISPENSER_A1_4_RX_00 = 0x354 ; // The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
+const Int32 F2_MOTO_DISPENSER_A1_4_RX_01 = 0x356 ; // The 16 Lsb bits of the shifted in data.
+const Int32 F2_MOTO_DISPENSER_A1_4_AMT_OF_WORDS = 0x358 ; // The amount of spi words (usually byte sized) per transmission.
+const Int32 F2_MOTO_DISPENSER_A1_5_TX_00 = 0x360 ; // The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
+const Int32 F2_MOTO_DISPENSER_A1_5_TX_01 = 0x362 ; // The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
+const Int32 F2_MOTO_DISPENSER_A1_5_RX_00 = 0x364 ; // The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
+const Int32 F2_MOTO_DISPENSER_A1_5_RX_01 = 0x366 ; // The 16 Lsb bits of the shifted in data.
+const Int32 F2_MOTO_DISPENSER_A1_5_AMT_OF_WORDS = 0x368 ; // The amount of spi words (usually byte sized) per transmission.
+const Int32 F2_MOTO_DISPENSER_A1_6_TX_00 = 0x370 ; // The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
+const Int32 F2_MOTO_DISPENSER_A1_6_TX_01 = 0x372 ; // The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
+const Int32 F2_MOTO_DISPENSER_A1_6_RX_00 = 0x374 ; // The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
+const Int32 F2_MOTO_DISPENSER_A1_6_RX_01 = 0x376 ; // The 16 Lsb bits of the shifted in data.
+const Int32 F2_MOTO_DISPENSER_A1_6_AMT_OF_WORDS = 0x378 ; // The amount of spi words (usually byte sized) per transmission.
+const Int32 F2_MOTO_DISPENSER_A1_7_TX_00 = 0x380 ; // The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
+const Int32 F2_MOTO_DISPENSER_A1_7_TX_01 = 0x382 ; // The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
+const Int32 F2_MOTO_DISPENSER_A1_7_RX_00 = 0x384 ; // The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
+const Int32 F2_MOTO_DISPENSER_A1_7_RX_01 = 0x386 ; // The 16 Lsb bits of the shifted in data.
+const Int32 F2_MOTO_DISPENSER_A1_7_AMT_OF_WORDS = 0x388 ; // The amount of spi words (usually byte sized) per transmission.
+const Int32 F2_MOTO_DISPENSER_A1_8_TX_00 = 0x390 ; // The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
+const Int32 F2_MOTO_DISPENSER_A1_8_TX_01 = 0x392 ; // The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
+const Int32 F2_MOTO_DISPENSER_A1_8_RX_00 = 0x394 ; // The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
+const Int32 F2_MOTO_DISPENSER_A1_8_RX_01 = 0x396 ; // The 16 Lsb bits of the shifted in data.
+const Int32 F2_MOTO_DISPENSER_A1_8_AMT_OF_WORDS = 0x398 ; // The amount of spi words (usually byte sized) per transmission.
+
+
+
+const Int32 F3_MOTO_SPARE1_1_A1_TX_00 = 0x200 ;
+const Int32 F3_MOTO_SPARE1_1_A1_TX_01 = 0x202 ;
+const Int32 F3_MOTO_SPARE1_1_A1_RX_00 = 0x204 ;
+const Int32 F3_MOTO_SPARE1_1_A1_RX_01 = 0x206 ;
+const Int32 F3_MOTO_SPARE1_1_A1_AMT_OF_WORDS = 0x208 ;
+const Int32 F3_MOTO_SPARE1_2_A1_TX_00 = 0x210 ;
+const Int32 F3_MOTO_SPARE1_2_A1_TX_01 = 0x212 ;
+const Int32 F3_MOTO_SPARE1_2_A1_RX_00 = 0x214 ;
+const Int32 F3_MOTO_SPARE1_2_A1_RX_01 = 0x216 ;
+const Int32 F3_MOTO_SPARE1_2_A1_AMT_OF_WORDS = 0x218 ;
+const Int32 F3_MOTO_SPARE2_1_A1_TX_00 = 0x220 ;
+const Int32 F3_MOTO_SPARE2_1_A1_TX_01 = 0x222 ;
+const Int32 F3_MOTO_SPARE2_1_A1_RX_00 = 0x224 ;
+const Int32 F3_MOTO_SPARE2_1_A1_RX_01 = 0x226 ;
+const Int32 F3_MOTO_SPARE2_1_A1_AMT_OF_WORDS = 0x228 ;
+const Int32 F3_MOTO_SPARE2_2_A1_TX_00 = 0x230 ;
+const Int32 F3_MOTO_SPARE2_2_A1_TX_01 = 0x232 ;
+const Int32 F3_MOTO_SPARE2_2_A1_RX_00 = 0x234 ;
+const Int32 F3_MOTO_SPARE2_2_A1_RX_01 = 0x236 ;
+const Int32 F3_MOTO_SPARE2_2_A1_AMT_OF_WORDS = 0x238 ;
+
+
+/*** Spare Motor ***/
+const Int32 F3_MOTO_SPARE3_1_A1_TX_00 = 0x240;
+const Int32 F3_MOTO_SPARE3_1_A1_TX_01 = 0x242;
+const Int32 F3_MOTO_SPARE3_1_A1_RX_00 = 0x244;
+const Int32 F3_MOTO_SPARE3_1_A1_RX_01 = 0x246;
+const Int32 F3_MOTO_SPARE3_1_A1_AMT_OF_WORDS = 0x248;
+
+/*** Motor Driver Commands ***/
+const Int32 MOTORDRIVER_HIGHZ_COMMAND_MSB = 0xa800;
+const Int32 MOTORDRIVER_HIGHZ_COMMAND_LSB = 0x0000;
+
+const Int32 MOTORDRIVER_RUN_COMMAND_MSB = 0x5000;
+const Int32 MOTORDRIVER_RUN_COMMAND_LSB = 0x0000;
+
+const Int32 MOTORDRIVER_MOVE_COMMAND_MSB = 0x4000;
+const Int32 MOTORDRIVER_MOVE_COMMAND_LSB = 0x0000;
+
+const Int32 MOTORDRIVER_RDCFG_COMMAND_MSB = 0x3800;
+const Int32 MOTORDRIVER_RDCFG_COMMAND_LSB = 0x0000;
+
+const Int32 MOTORDRIVER_RDSTATUS_COMMAND_MSB = 0x3900;
+const Int32 MOTORDRIVER_RDSTATUS_COMMAND_LSB = 0x0000;
+
+const Int32 MOTORDRIVER_RDSTEPREG_COMMAND_MSB = 0x3600;
+const Int32 MOTORDRIVER_RDSTEPREG_COMMAND_LSB = 0x0000;
+
+const Int32 MOTORDRIVER_WRSTEPREG_COMMAND_MSB = 0x1600;
+const Int32 MOTORDRIVER_WRSTEPREG_COMMAND_LSB = 0x0000;
+
+const Int32 MOTORDRIVER_GETSTATUS_COMMAND_MSB = 0xd000;
+const Int32 MOTORDRIVER_GETSTATUS_COMMAND_LSB = 0x0000;
+
+int Motor_OutOfReset()
+{
+
+ //Pull all L6470 motor drivers out of reset
+ Fpga_Write_Reg(FPGA1, F1_Moto_Driver_NSTBYRST1, 0x07ff,0);
+ Fpga_Write_Reg(FPGA1, F1_Moto_Driver_NSTBYRST2, 0x003f,0);
+ Fpga_Write_Reg(FPGA2, F2_Moto_Driver_NSTBYRST1, 0x00ff,0);
+ Fpga_Write_Reg(FPGA3, F3_Moto_Driver_NSTBYRST1, 0x001f,0);
+
+ /*
+ Fpga_Read_Reg(FPGA1, F1_Moto_Driver_NSTBYRST1,0);
+ Fpga_Read_Reg(FPGA1, F1_Moto_Driver_NSTBYRST2,0);
+ Fpga_Read_Reg(FPGA2, F2_Moto_Driver_NSTBYRST1,0);
+ Fpga_Read_Reg(FPGA3, F3_Moto_Driver_NSTBYRST1,0);
+ */
+ return 1;
+
+}
+
+int Motor_DriverReset()
+{
+ Fpga_Write_Reg(FPGA1, F1_Moto_Driver_NSTBYRST1, 0x0000,0);
+ Fpga_Write_Reg(FPGA1, F1_Moto_Driver_NSTBYRST2, 0x0000,0);
+ Fpga_Write_Reg(FPGA2, F2_Moto_Driver_NSTBYRST1, 0x0000,0);
+ Fpga_Write_Reg(FPGA3, F3_Moto_Driver_NSTBYRST1, 0x0000,0);
+
+ return 1;
+}
+
+int Motor_HighZ(Int32 Fpga, Int32 HighAdr, Int32 LowAdr)
+{
+
+ Fpga_Write_Reg(Fpga, HighAdr, MOTORDRIVER_HIGHZ_COMMAND_MSB,0);
+ Fpga_Write_Reg(Fpga, LowAdr, MOTORDRIVER_HIGHZ_COMMAND_LSB,0);
+
+ return 1;
+}
+
+int Motor_Run(Int32 Fpga, Int32 HighAdr, Int32 LowAdr, Int32 Speed, Int32 Direction)
+{
+
+ var RunCmdHigh = ( ((MOTORDRIVER_RUN_COMMAND_MSB >> 8) + (Direction & 0x1)) << 8 ) + ( (Speed & 0x0fffff) >> 16);
+ var RunCmdLow = (Speed & 0xffff);
+
+ Fpga_Write_Reg(Fpga, HighAdr, RunCmdHigh, 0);
+ Fpga_Write_Reg(Fpga, LowAdr, RunCmdLow, 0);
+
+ return 1;
+}
+
+int Motor_Move(Int32 Fpga, Int32 HighAdr, Int32 LowAdr, Int32 NumOfSteps, Int32 Direction)
+{
+
+ var MoveCmdHigh = ( ((MOTORDRIVER_MOVE_COMMAND_MSB >> 8) + (Direction & 0x1)) << 8 ) + ( (NumOfSteps & 0x3fffff) >> 16);
+ var MoveCmdLow = (NumOfSteps & 0xffff);
+
+ Fpga_Write_Reg(Fpga, HighAdr, MoveCmdHigh, 0);
+ Fpga_Write_Reg(Fpga, LowAdr, MoveCmdLow, 0);
+
+ return 1;
+}
+
+int Motor_Move_Loop(Int32 Fpga, Int32 HighAdr, Int32 LowAdr, Int32 NumOfSteps, Int32 Direction, Int32 NumOfLoops)
+{
+
+ for (int i = 0; i < NumOfLoops; i++)
+ {
+ Motor_Move(Fpga, HighAdr, LowAdr, NumOfSteps, Direction);
+ Thread.Sleep(1000);
+ Motor_Move(Fpga, HighAdr, LowAdr, NumOfSteps, Direction^0x1);
+ Thread.Sleep(1000);
+ }
+ return 1;
+
+}
+
+int Motor_Move_Loop_Screw(Int32 Fpga, Int32 HighAdr, Int32 LowAdr, Int32 NumOfSteps, Int32 Direction, Int32 NumOfLoops)
+{
+ Int32 Bit = 0;
+ for (int i = 0; i < NumOfLoops; i++)
+ {
+ Motor_Move(Fpga, HighAdr, LowAdr, NumOfSteps, Direction);
+ Bit = GetBit(FPGA1, F1_Moto_Driver_NBUSY2_Direct, 1);
+ while (Bit == 0x0)
+ {
+ Bit = GetBit(FPGA1, F1_Moto_Driver_NBUSY2_Direct, 1);
+ }
+
+ Motor_Move(Fpga, HighAdr, LowAdr, NumOfSteps, Direction^0x1);
+ Bit = GetBit(FPGA1, F1_Moto_Driver_NBUSY2_Direct, 1);
+ while (Bit == 0x0)
+ {
+ Bit = GetBit(FPGA1, F1_Moto_Driver_NBUSY2_Direct, 1);
+ }
+
+ }
+ return 1;
+
+}
+
+
+
+int Motor_ReadCfg(Int32 Fpga, Int32 HighAdr, Int32 LowAdr)
+{
+
+ Fpga_Write_Reg(Fpga, HighAdr, MOTORDRIVER_RDCFG_COMMAND_MSB, 0);
+ Fpga_Write_Reg(Fpga, LowAdr, MOTORDRIVER_RDCFG_COMMAND_LSB, 0);
+ Fpga_Read_Reg(Fpga, HighAdr+4, 1);
+ Fpga_Read_Reg(Fpga, LowAdr+4, 1);
+
+ return 1;
+}
+
+int Motor_ReadStatus(Int32 Fpga, Int32 HighAdr, Int32 LowAdr)
+{
+
+ Fpga_Write_Reg(Fpga, HighAdr, MOTORDRIVER_RDSTATUS_COMMAND_MSB, 0);
+ Fpga_Write_Reg(Fpga, LowAdr, MOTORDRIVER_RDSTATUS_COMMAND_LSB, 0);
+ Fpga_Read_Reg(Fpga, HighAdr+4, 1);
+ Fpga_Read_Reg(Fpga, LowAdr+4, 1);
+
+ return 1;
+}
+
+int Motor_GetStatus(Int32 Fpga, Int32 HighAdr, Int32 LowAdr)
+{
+
+ Fpga_Write_Reg(Fpga, HighAdr, MOTORDRIVER_GETSTATUS_COMMAND_MSB, 0);
+ Fpga_Write_Reg(Fpga, LowAdr, MOTORDRIVER_GETSTATUS_COMMAND_LSB, 0);
+ Fpga_Read_Reg(Fpga, HighAdr+4, 1);
+ Fpga_Read_Reg(Fpga, LowAdr+4, 1);
+
+ return 1;
+}
+
+
+// ParaData1 shall be left justified i.e. <Byte1><Byte0><0x00><0x00>
+int Motor_SetParam(Int32 Fpga, Int32 HighAdr, Int32 LowAdr, Int32 ParaAddr, uint ParaData1)
+{
+
+ Int32 Temp = 0;
+ Temp = (ParaAddr << 8 ) + ( (Int32) ParaData1 >> 24);
+ Fpga_Write_Reg(Fpga, HighAdr, Temp, 0);
+ Temp = ((Int32)ParaData1 >> 8) & 0xffff;
+ Fpga_Write_Reg(Fpga, LowAdr, Temp, 0);
+ Thread.Sleep(50);
+ //Fpga_Read_Reg(Fpga, HighAdr+4, 1);
+ //Fpga_Read_Reg(Fpga, LowAdr+4, 1);
+
+ return 1;
+}
+
+int Motor_GetParam(Int32 Fpga, Int32 HighAdr, Int32 LowAdr, Int32 ParaAddr)
+{
+
+ Int32 Temp = 0;
+ Temp = (ParaAddr + 0x20) << 8 ;
+ Fpga_Write_Reg(Fpga, HighAdr, Temp, 0);
+ Temp = 0x0;
+ Fpga_Write_Reg(Fpga, LowAdr, Temp, 0);
+ Fpga_Read_Reg(Fpga, HighAdr+4, 1);
+ Fpga_Read_Reg(Fpga, LowAdr+4, 1);
+
+ return 1;
+}
+
+/*
+int Motor_IsBusy(Int32 Fpga, Int32 HighAdr, Int32 LowAdr, Int32 BusyRegister, Int32 BusyBitNo)
+{
+ int temp1 = 0;
+ int tmp3 = 0;
+
+ tmp3 = (int) GetBit(Fpga, F2_SPI_Busy1_Direct, BusyBitNo);
+
+ while ( tmp3 == 1)
+ {
+ tmp3 = (int) GetBit(Fpga, F2_SPI_Busy1_Direct, BusyBitNo);
+ stubManager.Write("\n\nBUSY");
+ }
+
+ var RV_High = Fpga_Read_Reg(Fpga, HighAdr+4, 0);
+ var RV_Low = Fpga_Read_Reg(Fpga, LowAdr+4, 0);
+
+ temp = ( (int) RV_High.Value << 16) + (int) RV_Low.Value;
+
+ return temp;
+
+}
+*/
+
+/*
+int Motor_SetStep(Int32 Fpga, Int32 HighAdr, Int32 LowAdr, Int32 StepVal)
+{
+
+ var RetVal = Fpga_Read_Reg(Fpga, HighAdr+4, 1);
+ Fpga_Read_Reg(Fpga, LowAdr+4, 1);
+ Fpga_Write_Reg(Fpga, HighAdr, MOTORDRIVER_RDCFG_COMMAND_MSB, 1);
+ Fpga_Write_Reg(Fpga, LowAdr, MOTORDRIVER_RDCFG_COMMAND_LSB, 1);
+
+}
+const Int32 MOTORDRIVER_RDSTEPREG_COMMAND_MSB = 0x3600;
+const Int32 MOTORDRIVER_RDSTEPREG_COMMAND_LSB = 0x0000;
+
+const Int32 MOTORDRIVER_WRSTEPREG_COMMAND_MSB = 0x1600;
+const Int32 MOTORDRIVER_WRSTEPREG_COMMAND_LSB = 0x0000;
+*/
diff --git a/Software/Stubs Collection/stubs/michael stubs/Interfaces/Tango_Defines_PT100.cs b/Software/Stubs Collection/stubs/michael stubs/Interfaces/Tango_Defines_PT100.cs
new file mode 100644
index 000000000..efa5a061d
--- /dev/null
+++ b/Software/Stubs Collection/stubs/michael stubs/Interfaces/Tango_Defines_PT100.cs
@@ -0,0 +1,219 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+
+const Int32 F2_ANALOG_DYEINGH_TEMP1_1_TX_00 = 0x200 ;
+const Int32 F2_ANALOG_DYEINGH_TEMP1_1_TX_01 = 0x202 ;
+const Int32 F2_ANALOG_DYEINGH_TEMP1_1_RX_00 = 0x204 ;
+const Int32 F2_ANALOG_DYEINGH_TEMP1_1_RX_01 = 0x206 ;
+const Int32 F2_ANALOG_DYEINGH_TEMP1_1_AMT_OF_WORDS = 0x208 ;
+const Int32 F2_AN_ENCLOSURETEMP1_1_TX_00 = 0x210 ;
+const Int32 F2_AN_ENCLOSURETEMP1_1_TX_01 = 0x212 ;
+const Int32 F2_AN_ENCLOSURETEMP1_1_RX_00 = 0x214 ;
+const Int32 F2_AN_ENCLOSURETEMP1_1_RX_01 = 0x216 ;
+const Int32 F2_AN_ENCLOSURETEMP1_1_AMT_OF_WORDS = 0x218 ;
+const Int32 F2_ANALOG_DYEINGH_TEMP2_1_TX_00 = 0x220 ;
+const Int32 F2_ANALOG_DYEINGH_TEMP2_1_TX_01 = 0x222 ;
+const Int32 F2_ANALOG_DYEINGH_TEMP2_1_RX_00 = 0x224 ;
+const Int32 F2_ANALOG_DYEINGH_TEMP2_1_RX_01 = 0x226 ;
+const Int32 F2_ANALOG_DYEINGH_TEMP2_1_AMT_OF_WORDS = 0x228 ;
+const Int32 F2_AN_ENCLOSURETEMP2_1_TX_00 = 0x230 ;
+const Int32 F2_AN_ENCLOSURETEMP2_1_TX_01 = 0x232 ;
+const Int32 F2_AN_ENCLOSURETEMP2_1_RX_00 = 0x234 ;
+const Int32 F2_AN_ENCLOSURETEMP2_1_RX_01 = 0x236 ;
+const Int32 F2_AN_ENCLOSURETEMP2_1_AMT_OF_WORDS = 0x238 ;
+const Int32 F2_ANALOG_DYEINGH_TEMP3_1_TX_00 = 0x240 ;
+const Int32 F2_ANALOG_DYEINGH_TEMP3_1_TX_01 = 0x242 ;
+const Int32 F2_ANALOG_DYEINGH_TEMP3_1_RX_00 = 0x244 ;
+const Int32 F2_ANALOG_DYEINGH_TEMP3_1_RX_01 = 0x246 ;
+const Int32 F2_ANALOG_DYEINGH_TEMP3_1_AMT_OF_WORDS = 0x248 ;
+const Int32 F2_AN_ENCLOSURETEMP3_1_TX_00 = 0x250 ;
+const Int32 F2_AN_ENCLOSURETEMP3_1_TX_01 = 0x252 ;
+const Int32 F2_AN_ENCLOSURETEMP3_1_RX_00 = 0x254 ;
+const Int32 F2_AN_ENCLOSURETEMP3_1_RX_01 = 0x256 ;
+const Int32 F2_AN_ENCLOSURETEMP3_1_AMT_OF_WORDS = 0x258 ;
+const Int32 F2_ANALOG_DYEINGH_TEMP4_1_TX_00 = 0x260 ;
+const Int32 F2_ANALOG_DYEINGH_TEMP4_1_TX_01 = 0x262 ;
+const Int32 F2_ANALOG_DYEINGH_TEMP4_1_RX_00 = 0x264 ;
+const Int32 F2_ANALOG_DYEINGH_TEMP4_1_RX_01 = 0x266 ;
+const Int32 F2_ANALOG_DYEINGH_TEMP4_1_AMT_OF_WORDS = 0x268 ;
+const Int32 F2_ANALOG_DRYER_TEMP1_1_TX_00 = 0x270 ;
+const Int32 F2_ANALOG_DRYER_TEMP1_1_TX_01 = 0x272 ;
+const Int32 F2_ANALOG_DRYER_TEMP1_1_RX_00 = 0x274 ;
+const Int32 F2_ANALOG_DRYER_TEMP1_1_RX_01 = 0x276 ;
+const Int32 F2_ANALOG_DRYER_TEMP1_1_AMT_OF_WORDS = 0x278 ;
+const Int32 F2_ANALOG_DYEINGH_TEMP5_1_TX_00 = 0x280 ;
+const Int32 F2_ANALOG_DYEINGH_TEMP5_1_TX_01 = 0x282 ;
+const Int32 F2_ANALOG_DYEINGH_TEMP5_1_RX_00 = 0x284 ;
+const Int32 F2_ANALOG_DYEINGH_TEMP5_1_RX_01 = 0x286 ;
+const Int32 F2_ANALOG_DYEINGH_TEMP5_1_AMT_OF_WORDS = 0x288 ;
+const Int32 F2_ANALOG_DRYER_TEMP2_1_TX_00 = 0x290 ;
+const Int32 F2_ANALOG_DRYER_TEMP2_1_TX_01 = 0x292 ;
+const Int32 F2_ANALOG_DRYER_TEMP2_1_RX_00 = 0x294 ;
+const Int32 F2_ANALOG_DRYER_TEMP2_1_RX_01 = 0x296 ;
+const Int32 F2_ANALOG_DRYER_TEMP2_1_AMT_OF_WORDS = 0x298 ;
+const Int32 F2_ANALOG_MIXCHIP_TEMP_1_TX_00 = 0x2A0 ;
+const Int32 F2_ANALOG_MIXCHIP_TEMP_1_TX_01 = 0x2A2 ;
+const Int32 F2_ANALOG_MIXCHIP_TEMP_1_RX_00 = 0x2A4 ;
+const Int32 F2_ANALOG_MIXCHIP_TEMP_1_RX_01 = 0x2A6 ;
+const Int32 F2_ANALOG_MIXCHIP_TEMP_1_AMT_OF_WORDS = 0x2A8 ;
+const Int32 F2_ANALOG_DRYER_TEMP3_1_TX_00 = 0x2B0 ;
+const Int32 F2_ANALOG_DRYER_TEMP3_1_TX_01 = 0x2B2 ;
+const Int32 F2_ANALOG_DRYER_TEMP3_1_RX_00 = 0x2B4 ;
+const Int32 F2_ANALOG_DRYER_TEMP3_1_RX_01 = 0x2B6 ;
+const Int32 F2_ANALOG_DRYER_TEMP3_1_AMT_OF_WORDS = 0x2B8 ;
+
+
+
+const Int32 F2_SPI_Busy1_Direct = 0x090; // Reads the direct values that are currently being sent to the fpga. spi_busy15 spi_busy14 spi_busy13 spi_busy12 F2_AN_ENCLOSURETEMP3_1_BUSY F2_AN_ENCLOSURETEMP2_1_BUSY F2_AN_ENCLOSURETEMP1_1_BUSY F2_ANALOG_MIXCHIP_TEMP_1_BUSY F2_ANALOG_DYEINGH_TEMP5_1_BUSY F2_ANALOG_DYEINGH_TEMP4_1_BUSY F2_ANALOG_DYEINGH_TEMP3_1_BUSY F2_ANALOG_DYEINGH_TEMP2_1_BUSY F2_ANALOG_DYEINGH_TEMP1_1_BUSY F2_ANALOG_DRYER_TEMP3_1_BUSY F2_ANALOG_DRYER_TEMP2_1_BUSY F2_ANALOG_DRYER_TEMP1_1_BUSY
+
+const Int32 F2_Prescaler1_reg3 = 0x3e4; // Parameter for prescaler divisions - 3bit spi temp low duty cycle value for pmw rsv rsv rsv rsv rsv rsv rsv rsv rsv rsv rsv rsv rsv parambit2 parambit1 parambit0
+const Int32 F2_Prescaler1_reg4 = 0x3e6; // Parameter for prescaler divisions - 3bit spi temp high duty cycle value for pmw rsv rsv rsv rsv rsv rsv rsv rsv rsv rsv rsv rsv rsv parambit2 parambit1 parambit0
+
+const Int32 ADS1220_RESET = 0x06 ; // RESET Reset the device 0000 011x
+const Int32 ADS1220_START_SYNC = 0x08 ; // START/SYNC Start or restart conversions 0000 100x
+const Int32 ADS1220_POWERDOWN = 0x02 ; // POWERDOWN Enter power-down mode 0000 001x
+const Int32 ADS1220_RDATA = 0x10 ; // RDATA Read data by command 0001 xxxx
+const Int32 ADS1220_RREG = 0x20 ; // RREG Read nn registers starting at address rr 0010 rrnn
+const Int32 ADS1220_WREG = 0x40 ; // WREG Write nn registers starting at address rr 0010 rrnn
+
+int ADS1220_Reset(Int32 Fpga, Int32 HighAdr, Int32 LowAdr)
+{
+ //Amount of words = 1
+ Fpga_Write_Reg(Fpga, HighAdr+6, 0x1, 0);
+ Fpga_Write_Reg(Fpga, HighAdr, (ADS1220_RESET ) << 8, 0);
+ Fpga_Write_Reg(Fpga, LowAdr, 0x0000, 0);
+
+ return 1;
+}
+
+
+Int32 ADS1220_LoadOutReg(Int32 Fpga, Int32 HighAdr, Int32 LowAdr, Int32 BusyBitNo)
+{
+
+ int tmp3 = 0;
+ Int32 temp = 0;
+
+ //Amount of words = 4
+ Fpga_Write_Reg(Fpga, HighAdr+6, 0x4, 0);
+ Fpga_Write_Reg(Fpga, HighAdr, (ADS1220_RDATA ) << 8, 0);
+ Fpga_Write_Reg(Fpga, LowAdr, 0x0000, 0);
+
+ tmp3 = (int) GetBit(Fpga, F2_SPI_Busy1_Direct, BusyBitNo);
+
+ while ( tmp3 == 1)
+ {
+ tmp3 = (int) GetBit(Fpga, F2_SPI_Busy1_Direct, BusyBitNo);
+ stubManager.Write("\n\nBUSY");
+ }
+
+ var RV_High = Fpga_Read_Reg(Fpga, HighAdr+4, 0);
+ var RV_Low = Fpga_Read_Reg(Fpga, LowAdr+4, 0);
+
+ temp = ( (Int32) RV_High.Value << 16) + (Int32) RV_Low.Value;
+
+ return temp;
+
+}
+int ADS1220_ReadReg(Int32 Fpga, Int32 HighAdr, Int32 LowAdr, Int32 RegAddr, Int32 BusyBitNo)
+{
+
+ int temp = 0;
+ int tmp3 = 0;
+
+
+ //Amount of words = 2
+ Fpga_Write_Reg(Fpga, HighAdr+6, 0x2, 0);
+
+ Fpga_Write_Reg(Fpga, HighAdr, (ADS1220_RREG + (RegAddr << 2 )) << 8, 0);
+ Fpga_Write_Reg(Fpga, LowAdr, 0x0000, 0);
+
+
+ tmp3 = (int) GetBit(Fpga, F2_SPI_Busy1_Direct, BusyBitNo);
+
+ while ( tmp3 == 1)
+ {
+ tmp3 = (int) GetBit(Fpga, F2_SPI_Busy1_Direct, BusyBitNo);
+ stubManager.Write("\n\nBUSY");
+ }
+
+ var RV_High = Fpga_Read_Reg(Fpga, HighAdr+4, 0);
+ var RV_Low = Fpga_Read_Reg(Fpga, LowAdr+4, 0);
+
+ temp = ( (int) RV_High.Value << 16) + (int) RV_Low.Value;
+
+ return temp;
+
+}
+
+int ADS1220_WriteReg(Int32 Fpga, Int32 HighAdr, Int32 LowAdr, Int32 RegAddr, Int32 Data)
+{
+
+ int temp = 0;
+ int tmp3 = 0;
+
+ //Amount of words = 2
+ Fpga_Write_Reg(Fpga, HighAdr+6, 0x2, 0);
+
+ Fpga_Write_Reg(Fpga, HighAdr, ((ADS1220_WREG + (RegAddr << 2) ) << 8) + (Data & 0xff), 0);
+ Fpga_Write_Reg(Fpga, LowAdr, 0x0000, 0);
+
+ return 1;
+
+}
+
+int ADS1220_StartSync(Int32 Fpga, Int32 HighAdr, Int32 LowAdr)
+{
+ //Amount of words = 1
+ Fpga_Write_Reg(Fpga, HighAdr+6, 0x1, 0);
+ Fpga_Write_Reg(Fpga, HighAdr, (ADS1220_START_SYNC ) << 8, 0);
+ Fpga_Write_Reg(Fpga, LowAdr, 0x0000, 0);
+
+ return 1;
+}
+
+/*
+int ADS1220_GetContiniuosConvertion(Int32 Fpga, Int32 HighAdr, Int32 LowAdr)
+{
+ //Amount of words = 1
+ Fpga_Write_Reg(Fpga, HighAdr+6, 0x1, 0);
+ Fpga_Write_Reg(Fpga, HighAdr, (ADS1220_START_SYNC ) << 8, 0);
+ Fpga_Write_Reg(Fpga, LowAdr, 0x0000, 0);
+}
+
+*/
+Int32 ADS1220_GetConvertion(Int32 Fpga, Int32 HighAdr, Int32 LowAdr, Int32 BusyBitNo)
+{
+ int tmp3 = 0;
+ Int32 temp = 0;
+
+ //Amount of words = 3
+ Fpga_Write_Reg(Fpga, HighAdr+6, 0x3, 0);
+
+ Fpga_Write_Reg(Fpga, HighAdr, 0x0000, 0);
+ Fpga_Write_Reg(Fpga, LowAdr, 0x0000, 0);
+
+ tmp3 = (int) GetBit(Fpga, F2_SPI_Busy1_Direct, BusyBitNo);
+
+ while ( tmp3 == 1)
+ {
+ tmp3 = (int) GetBit(Fpga, F2_SPI_Busy1_Direct, BusyBitNo);
+ stubManager.Write("\n\nBUSY");
+ }
+
+ var RV_High = Fpga_Read_Reg(Fpga, HighAdr+4, 0);
+ var RV_Low = Fpga_Read_Reg(Fpga, LowAdr+4, 0);
+
+ temp = ( (Int32) RV_High.Value << 16) + (Int32) RV_Low.Value;
+
+ return temp;
+}
diff --git a/Software/Stubs Collection/stubs/michael stubs/Interfaces/Tango_Defines_QEI.cs b/Software/Stubs Collection/stubs/michael stubs/Interfaces/Tango_Defines_QEI.cs
new file mode 100644
index 000000000..b3b676baf
--- /dev/null
+++ b/Software/Stubs Collection/stubs/michael stubs/Interfaces/Tango_Defines_QEI.cs
@@ -0,0 +1,37 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+Int32 F1_SCREW_ROTENC_lsb = 0x100 ; // Value of the lsb of the QEI register
+Int32 F1_SCREW_ROTENC_msb = 0x102 ; // 10bits Value of the Msb of the QEI register, 1bit Direction of movement, 5bits Reserved
+Int32 F1_SCREW_ROTENC_index = 0x104 ; // value of index counter
+Int32 F1_RSPARE_ROTENC_lsb = 0x110 ; // Value of the lsb of the QEI register
+Int32 F1_RSPARE_ROTENC_msb = 0x112 ; // 10bits Value of the Msb of the QEI register, 1bit Direction of movement, 5bits Reserved
+Int32 F1_RSPARE_ROTENC_index = 0x114 ; // value of index counter
+Int32 F1_LSPARE1_ROTENC_lsb = 0x120 ; // Value of the lsb of the QEI register
+Int32 F1_LSPARE1_ROTENC_msb = 0x122 ; // 10bits Value of the Msb of the QEI register, 1bit Direction of movement, 5bits Reserved
+Int32 F1_LSPARE1_ROTENC_index = 0x124 ; // value of index counter
+Int32 F1_RSPEEDSENS_ROTENC_lsb = 0x130 ; // Value of the lsb of the QEI register
+Int32 F1_RSPEEDSENS_ROTENC_msb = 0x132 ; // 10bits Value of the Msb of the QEI register, 1bit Direction of movement, 5bits Reserved
+Int32 F1_RSPEEDSENS_ROTENC_index = 0x134 ; // value of index counter
+Int32 F1_LSPARE2_ROTENC_lsb = 0x140 ; // Value of the lsb of the QEI register
+Int32 F1_LSPARE2_ROTENC_msb = 0x142 ; // 10bits Value of the Msb of the QEI register, 1bit Direction of movement, 5bits Reserved
+Int32 F1_LSPARE2_ROTENC_index = 0x144 ; // value of index counter
+Int32 F1_DRYER_LOADARM_ROTENC_lsb = 0x150 ; // Value of the lsb of the QEI register
+Int32 F1_DRYER_LOADARM_ROTENC_msb = 0x152 ; // 10bits Value of the Msb of the QEI register, 1bit Direction of movement, 5bits Reserved
+Int32 F1_DRYER_LOADARM_ROTENC_index = 0x154 ; // value of index counter
+Int32 F3_SPARE1_ROTENC_lsb = 0x100 ; // Value of the lsb of the QEI register
+Int32 F3_SPARE1_ROTENC_msb = 0x102 ; // 10bits Value of the Msb of the QEI register, 1bit Direction of movement, 5bits Reserved
+Int32 F3_SPARE1_ROTENC_index = 0x104 ; // value of index counter
+Int32 F3_RSPARE_ROTENC_lsb = 0x110 ; // Value of the lsb of the QEI register
+Int32 F3_RSPARE_ROTENC_msb = 0x112 ; // 10bits Value of the Msb of the QEI register, 1bit Direction of movement, 5bits Reserved
+Int32 F3_RSPARE_ROTENC_index = 0x114 ; // value of index counter
+
diff --git a/Software/Stubs Collection/stubs/michael stubs/Interfaces/Tango_Defines_SSI.cs b/Software/Stubs Collection/stubs/michael stubs/Interfaces/Tango_Defines_SSI.cs
new file mode 100644
index 000000000..1b69ad4a4
--- /dev/null
+++ b/Software/Stubs Collection/stubs/michael stubs/Interfaces/Tango_Defines_SSI.cs
@@ -0,0 +1,76 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+
+/*** LTFU SSI Encoders ***/
+const Int32 F1_LDANCER1_ROTENC_MSB = 0x01c2;
+const Int32 F1_LDANCER1_ROTENC_LSB = 0x01c0;
+const Int32 F1_LDANCER1_ROTENC_TX = 0x01ce;
+
+const Int32 F1_LDANCER2_ROTENC_MSB = 0x01b2;
+const Int32 F1_LDANCER2_ROTENC_LSB = 0x01b0;
+const Int32 F1_LDANCER2_ROTENC_TX = 0x01be;
+
+const Int32 F1_LSPARE_ROTENC_MSB = 0x0192;
+const Int32 F1_LSPARE_ROTENC_LSB = 0x0190;
+const Int32 F1_LSPARE_ROTENC_TX = 0x019e;
+
+/*** RTFU SSI Encoders ***/
+const Int32 F1_RDANCER_ROTENC_MSB = 0x01a2;
+const Int32 F1_RDANCER_ROTENC_LSB = 0x01a0;
+const Int32 F1_RDANCER_ROTENC_TX = 0x01ae;
+
+const Int32 F1_RSPARE_ROTENC_MSB = 0x0182;
+const Int32 F1_RSPARE_ROTENC_LSB = 0x0180;
+const Int32 F1_RSPARE_ROTENC_TX = 0x018e;
+
+/*** RTFU and LTFU SSI Prescalers ***/
+const Int32 F1_Prescaler1_reg1 = 0x03e0;
+const Int32 F1_Prescaler1_reg2 = 0x03e2;
+const Int32 F1_SPI_Busy1_Direct = 0x0090;
+
+
+
+int ssi_loop(Int32 Addr)
+ {
+ var RetValue = Fpga_Read_Reg(FPGA1, F1_SPI_Busy1_Direct,10);
+ if ( (RetValue.Value&0x1f) == 0)
+ {
+
+ //stubManager.Write("\nWriting to F1 DANCER TX");
+ //Trigger SSI Tx
+ Fpga_Write_Reg(FPGA1, Addr, 0xffff, 0);
+
+ //Wait for SSI sequence to finish
+ Thread.Sleep(800);
+ }
+ RetValue.Value = 1;
+
+ return 1;
+
+ }
+
+int SSI_Read_Write(Int32 Fpga, Int32 HighAdr, Int32 LowAdr, Int32 TxAdr)
+ {
+ var rv1 = Fpga_Read_Reg(Fpga, HighAdr, 0);
+ var rv2 = Fpga_Read_Reg(Fpga, LowAdr, 0);
+ stubManager.Write(" Adr = ");
+ stubManager.WriteHex(TxAdr,4);
+ stubManager.Write(" (");
+ stubManager.WriteHex(rv1.Value,4); stubManager.Write(", ");
+ stubManager.WriteHex(rv2.Value,4); stubManager.Write(")");
+ //if ( (rv2.Value&0x200) == 0x200) stubManager.Write(" Error");
+ Fpga_Write_Reg(Fpga, TxAdr, 0xffff, 0);
+ Thread.Sleep(100);
+
+ return 1;
+ } \ No newline at end of file
diff --git a/Software/Stubs Collection/stubs/michael stubs/Interfaces/Tango_Defines_SSR.cs b/Software/Stubs Collection/stubs/michael stubs/Interfaces/Tango_Defines_SSR.cs
new file mode 100644
index 000000000..8eae235ea
--- /dev/null
+++ b/Software/Stubs Collection/stubs/michael stubs/Interfaces/Tango_Defines_SSR.cs
@@ -0,0 +1,20 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+
+
+//Reg Name Functionlity/Contents D15 D14 D13 D12 D11 D10 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0
+const Int32 F2_CTRL = 0x0E2; // Writes to values. Readback the values that are currently in the GPO register rsv rsv rsv rsv F2_GPO_PDOWN_RL1_CTRL F2_GPO_DRYER_SSR1_CTRL F2_GPO_DRYER_SSR2_CTRL F2_GPO_DRYER_SSR3_CTRL F2_GPO_MIXCHIP_SSR4_CTRL F2_GPO_DYEINGH_SSR5_CTRL F2_GPO_DYEINGH_SSR6_CTRL F2_GPO_DYEINGH_SSR7_CTRL F2_GPO_DYEINGH_SSR8_CTRL F2_GPO_CHILLER_SSR9_CTRL F2_GPO_SPARE_SSR12_CTRL F2_GPO_SPARE_SSR13_CTRL
+string[] F2_CTRL_Bits = {"F2_GPO_SPARE_SSR13_CTRL", "F2_GPO_SPARE_SSR12_CTRL", "F2_GPO_CHILLER_SSR9_CTRL", "F2_GPO_DYEINGH_SSR8_CTRL", "F2_GPO_DYEINGH_SSR7_CTRL", "F2_GPO_DYEINGH_SSR6_CTRL", "F2_GPO_DYEINGH_SSR5_CTRL", "F2_GPO_MIXCHIP_SSR4_CTRL", "F2_GPO_DRYER_SSR3_CTRL", "F2_GPO_DRYER_SSR2_CTRL", "F2_GPO_DRYER_SSR1_CTRL", "F2_GPO_PDOWN_RL1_CTRL", "rsv", "rsv", "rsv", "rsv"};
+
+const Int32 F1_gpo_01 = 0x3D2;//Miscellaneous output register, 16bits rsv rsv rsv rsv rsv rsv rsv rsv F1_VALVE_MIXCHIP_WASTECH F1_VALVE_WASTE_TANK F1_GPO_EXTWINDER_1 F1_GPO_EXTWINDER_2 F1_GPO_EXTWINDER_3 F1_GPO_DILUTORPUMP_SSR10_CTRL F1_GPO_WHS_WTANKPUMP2 F1_GPO_WASTECH_PUMP2
+const Int32 F3_GPO_01_bus = 0x0C2; //Writes to values. Readback thevaluessthat are currently in the GPO registerrsv rsv rsv rsv rsv rsv rsv rsv F3_SPARE1_ROTENC_CLK F3_SPARE2_ROTENC_CLK F3_GPO_BUZZER F3_GPO_EXTWINDER_SSR11_CTRL F3_GPO_LED1 F3_GPO_LED2 F3_GPO_LED3 F3_GPO_LED4
diff --git a/Software/Stubs Collection/stubs/michael stubs/Interfaces/Tango_Defines_Tacho.cs b/Software/Stubs Collection/stubs/michael stubs/Interfaces/Tango_Defines_Tacho.cs
new file mode 100644
index 000000000..8b6ece7ce
--- /dev/null
+++ b/Software/Stubs Collection/stubs/michael stubs/Interfaces/Tango_Defines_Tacho.cs
@@ -0,0 +1,27 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+
+
+const Int32 F1_Tacho_reg0 = 0x3C0 ;
+const Int32 F1_Tacho_reg1 = 0x3C2 ;
+const Int32 F1_Tacho_reg2 = 0x3C4 ;
+const Int32 F1_Tacho_reg3 = 0x3C6 ;
+const Int32 F1_Tacho_reg4 = 0x3C8 ;
+const Int32 F1_Tacho_reg5 = 0x3CA ;
+const Int32 F1_Tacho_reg6 = 0x3CC ;
+const Int32 F1_Tacho_reg7 = 0x3CE ;
+const Int32 F2_Tacho_reg0 = 0x3C0 ;
+
+const Int32 F1_Prescaler1_reg5 = 0x3E8 ; // Parameter for prescaler divisions -amount of prescaled clocks for counter of signal All Tachos. rsv rsv rsv rsv rsv rsv rsv rsv parambit7 parambit6 parambit5 parambit4 parambit3 parambit2 parambit1 parambit0
+const Int32 F2_Prescaler1_reg10 = 0x102 ; // Variable for prescaler divisions -amount of prescaled clocks for counter of signal Blower Tacho. 8 bits parambit15 parambit14 parambit13 parambit12 parambit11 parambit10 parambit9 parambit8 parambit7 parambit6 parambit5 parambit4 parambit3 parambit2 parambit1 parambit0
+
diff --git a/Software/Stubs Collection/stubs/michael stubs/Read_SW_FPGA_Version.cs b/Software/Stubs Collection/stubs/michael stubs/Read_SW_FPGA_Version.cs
new file mode 100644
index 000000000..21b98e46a
--- /dev/null
+++ b/Software/Stubs Collection/stubs/michael stubs/Read_SW_FPGA_Version.cs
@@ -0,0 +1,115 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+
+include "C:\To_Backup\Mulberry\Mulberry_current\Customers\Twine\Tango\Software\Stub_scripts\Tango_Defines_Basic.cs"
+
+public void OnExecute(StubManager stubManager)
+{
+
+//var response10 = stubManager.Run<StubFpgaWriteRegResponse>("StubFpgaWriteRegRequest" ,0x60000222, 0x3800);
+//Thread.Sleep(10000);
+//var response11 = stubManager.Run<StubFpgaWriteRegResponse>("StubFpgaWriteRegRequest" ,0x60000220, 0x0000);
+
+
+ var response_swid = stubManager.Run<StubReadEmbeddedVersionResponse>("StubReadEmbeddedVersionRequest" , true);
+ stubManager.Write("\nTIVA MCU SW Version (Major, Minor, Patch, Build, Version String): (");
+ stubManager.WriteHex(response_swid.VerMajor,4);
+ stubManager.Write(", ");
+ stubManager.WriteHex(response_swid.VerMinor,4);
+ stubManager.Write(", ");
+ stubManager.WriteHex(response_swid.VerPatch,4);
+ stubManager.Write(", ");
+ stubManager.WriteHex(response_swid.VerBuild,4);
+ stubManager.Write(", ");
+ stubManager.Write(response_swid.Version);
+ stubManager.Write(")\n");
+
+
+ //F1 Version and test register
+ var response = stubManager.Run<StubFpgaReadRegResponse>("StubFpgaReadRegRequest" ,FPGA1);
+ stubManager.Write("\nFPGA_1 Version #ddmm: ");
+ stubManager.WriteHex(response.Value,4);
+ response.Value = 0;
+
+ response = stubManager.Run<StubFpgaReadRegResponse>("StubFpgaReadRegRequest" ,FPGA1 + 0x10);
+ stubManager.Write("\nFPGA_1 Version #yyvv: ");
+ stubManager.WriteHex(response.Value,4);
+ response.Value = 0;
+
+ stubManager.Write("\nFPGA_1 Test register, write 0xCAFE, expects 0x3501: ");
+ var response_tmp = stubManager.Run<StubFpgaWriteRegResponse>("StubFpgaWriteRegRequest" ,0x600003f0, 0xCAFE);
+ response_tmp = stubManager.Run<StubFpgaWriteRegResponse>("StubFpgaWriteRegRequest" ,0x600003f0, 0xCAFE);
+ response = stubManager.Run<StubFpgaReadRegResponse>("StubFpgaReadRegRequest" ,0x600003f0);
+ response.Value = response.Value & 0xffff;
+ stubManager.WriteHex(response.Value,4);
+ response.Value = 0;
+
+ //F2 Version and test register
+ response = stubManager.Run<StubFpgaReadRegResponse>("StubFpgaReadRegRequest" ,0x60000400);
+ stubManager.Write("\n\nFPGA_2 Version #ddmm: ");
+ stubManager.WriteHex(response.Value,4);
+ response.Value = 0;
+
+ response = stubManager.Run<StubFpgaReadRegResponse>("StubFpgaReadRegRequest" ,0x60000410);
+ stubManager.Write("\nFPGA_2 Version #yyvv: ");
+ stubManager.WriteHex(response.Value,4);
+ response.Value = 0;
+
+ stubManager.Write("\nFPGA_2 Test register, write 0xCAFE, expects 0x3501: ");
+ response_tmp = stubManager.Run<StubFpgaWriteRegResponse>("StubFpgaWriteRegRequest" ,0x600007f0, 0xCAFE);
+ response_tmp = stubManager.Run<StubFpgaWriteRegResponse>("StubFpgaWriteRegRequest" ,0x600007f0, 0xCAFE);
+ response = stubManager.Run<StubFpgaReadRegResponse>("StubFpgaReadRegRequest" ,0x600007f0);
+ response.Value = response.Value & 0xffff;
+ stubManager.WriteHex(response.Value,4);
+ response.Value = 0;
+
+ //F3 Version and test register
+ response = stubManager.Run<StubFpgaReadRegResponse>("StubFpgaReadRegRequest" ,0x60000800);
+ stubManager.Write("\n\nFPGA_3 Version #ddmm: ");
+ stubManager.WriteHex(response.Value,4);
+ response.Value = 0;
+
+ response = stubManager.Run<StubFpgaReadRegResponse>("StubFpgaReadRegRequest" ,0x60000810);
+ stubManager.Write("\nFPGA_3 Version #yyvv: ");
+ stubManager.WriteHex(response.Value,4);
+ response.Value = 0;
+
+ stubManager.Write("\nFPGA_3 Test register, write 0xCAFE, expects 0x3501: ");
+ response_tmp = stubManager.Run<StubFpgaWriteRegResponse>("StubFpgaWriteRegRequest" ,0x60000bf0, 0xCAFE);
+ response_tmp = stubManager.Run<StubFpgaWriteRegResponse>("StubFpgaWriteRegRequest" ,0x60000bf0, 0xCAFE);
+ response = stubManager.Run<StubFpgaReadRegResponse>("StubFpgaReadRegRequest" ,0x60000bf0);
+ response.Value = response.Value & 0xffff;
+ stubManager.WriteHex(response.Value,4);
+ response.Value = 0;
+
+
+}
+
+/* Example Script Output
+18:49:16.20: Executing script 'Read_SW_FPGA_Version.cs'...
+
+TIVA MCU SW Version (Major, Minor, Patch, Build, Version String): (#0001, #0000, #0000, #0001, Tango01 May 7 2018 16:38:08)
+
+FPGA_1 Version #ddmm: #0905
+FPGA_1 Version #yyvv: #1801
+FPGA_1 Test register, write 0x1234, expects 0xEDCB: #EDCB
+
+FPGA_2 Version #ddmm: #0905
+FPGA_2 Version #yyvv: #1801
+FPGA_2 Test register, write 0x1234, expects 0xEDCB: #EDCB
+
+FPGA_3 Version #ddmm: #0805
+FPGA_3 Version #yyvv: #1802
+FPGA_3 Test register, write 0x1234, expects 0xEDCB: #0000
+
+*/
diff --git a/Software/Stubs Collection/stubs/michael stubs/Stub_scripts.rar b/Software/Stubs Collection/stubs/michael stubs/Stub_scripts.rar
new file mode 100644
index 000000000..8b8dd1d4d
--- /dev/null
+++ b/Software/Stubs Collection/stubs/michael stubs/Stub_scripts.rar
Binary files differ
diff --git a/Software/Stubs Collection/stubs/michael stubs/Tango_Defines_Basic.cs b/Software/Stubs Collection/stubs/michael stubs/Tango_Defines_Basic.cs
new file mode 100644
index 000000000..b692583b2
--- /dev/null
+++ b/Software/Stubs Collection/stubs/michael stubs/Tango_Defines_Basic.cs
@@ -0,0 +1,92 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+
+const Int32 FPGA1 = 0x60000000;
+const Int32 FPGA2 = 0x60000400;
+const Int32 FPGA3 = 0x60000800;
+
+const Int32 TEST_REG = 0x3f0;
+
+
+StubFpgaReadRegResponse Fpga_Read_Reg(Int32 Fpga, Int32 Addr, Int32 Verbose)
+{
+ var response = stubManager.Run<StubFpgaReadRegResponse>("StubFpgaReadRegRequest" , Fpga + Addr);
+ response.Value = response.Value & 0xffff;
+
+ if (Verbose == 1) {
+ stubManager.Write("\n\nFPGA Reg. Read (FPGA Base, Addr, Data): (");
+ stubManager.WriteHex(Fpga,4);
+ stubManager.Write(", ");
+ stubManager.WriteHex(Addr,4);
+ stubManager.Write(", ");
+ stubManager.WriteHex(response.Value,4);
+ stubManager.Write(")");
+ }
+
+ return response;
+}
+
+int Fpga_Write_Reg(Int32 Fpga, Int32 Addr, Int32 Data, Int32 Verbose)
+{
+ if (Verbose == 1) {
+ stubManager.Write("\n\nFPGA Reg. Write (FPGA Base, Addr, Data): (");
+ stubManager.WriteHex(Fpga,4);
+ stubManager.Write(", ");
+ stubManager.WriteHex(Addr,4);
+ stubManager.Write(", ");
+ stubManager.WriteHex(Data,4);
+ stubManager.Write(")");
+ }
+ var response = stubManager.Run<StubFpgaWriteRegResponse>("StubFpgaWriteRegRequest" ,Fpga + Addr, Data);
+
+ return 1;
+}
+
+Int32 GetBit(Int32 Fpga, Int32 Adr, Int32 BitNo)
+{
+ Int32 BitMask;
+ var RetVal = Fpga_Read_Reg(Fpga, Adr, 0);
+ BitMask = 0x1 << BitNo;
+ if ( ( (Int32) RetVal.Value & BitMask) == BitMask )
+ {
+ return 1;
+ }
+ else
+ {
+ return 0;
+ }
+
+}
+
+Int32 SetBit (Int32 Fpga, Int32 Adr, Int32 BitNo, Int32 Bit)
+{
+ Int32 BitMask;
+ var RetVal = Fpga_Read_Reg(Fpga, Adr, 0);
+ Int32 RV = (Int32) RetVal.Value;
+
+ if (Bit == 0x1)
+ {
+ BitMask = 0x1 << BitNo;
+ RV = RV | BitMask;
+ Fpga_Write_Reg(Fpga, Adr, RV , 0);
+ }
+ else if (Bit == 0x0)
+ {
+ BitMask = ~(0x1 << BitNo);
+ RV = RV & BitMask;
+ Fpga_Write_Reg(Fpga, Adr, RV , 0);
+ }
+ return 1;
+}
+
+
diff --git a/Software/Stubs Collection/stubs/motorInitForMichael.cs b/Software/Stubs Collection/stubs/motorInitForMichael.cs
new file mode 100644
index 000000000..f6e30ae51
--- /dev/null
+++ b/Software/Stubs Collection/stubs/motorInitForMichael.cs
@@ -0,0 +1,75 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Hardware;
+using Tango.PMR.Printing;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+public void OnExecute(StubManager stubManager)
+{
+//SystemResetRequest systemResetRequest = new SystemResetRequest();
+//var response1 = stubManager.Run<SystemResetResponse>(systemResetRequest);
+// stubManager.Run("StubGPIOWriteBitRequest" ,"P", 4, true);//ON
+ Thread.Sleep(10);
+// stubManager.Run("StubGPIOWriteBitRequest" ,"P", 4, false);//OFF
+// stubManager.Run("StubGPIOWriteBitRequest" ,"P", 4, true);//ON
+
+UploadHardwareConfigurationRequest uploadHardwareConfigurationRequest = new UploadHardwareConfigurationRequest();
+
+HardwareConfiguration hardwareConfiguration = new HardwareConfiguration();
+
+
+HardwareMotor hardwareMotor1 = new HardwareMotor();
+hardwareMotor1.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoRdriving;
+hardwareMotor1.MinFrequency = 0;
+hardwareMotor1.MaxFrequency = 30000;
+hardwareMotor1.SetMicroStep = 1;
+hardwareMotor1.MicroStep = 2;
+hardwareMotor1.MaxChangeSlope = 500;
+hardwareMotor1.HighLengthMicroSecond = 0;
+hardwareMotor1.SpeedMaster = false;
+hardwareMotor1.PulsePerRound = 200;
+hardwareMotor1.PulleyRadius = 1.3;
+hardwareMotor1.ConfigWord = 0;
+hardwareMotor1.DirectionThreadWize = true;
+hardwareMotor1.KvalHold = 0x28;
+hardwareMotor1.KvalRun = 0x5f;
+hardwareMotor1.KvalAcc = 0x5f;
+hardwareMotor1.KvalDec = 0x5f;
+hardwareMotor1.OverCurrentThreshold = 7;
+hardwareMotor1.StallThreshold = 0;
+hardwareMotor1.ThermalCompensationFactor = 0;
+hardwareMotor1.LowSpeedOptimization = false;
+hardwareMotor1.StSlp = 6;
+hardwareMotor1.IntSpd = 0x44B8;
+hardwareMotor1.FnSlpAcc = 0x14;
+hardwareMotor1.FnSlpDec = 0x14;
+hardwareConfiguration.Motors.Add(hardwareMotor1);
+
+stubManager.WriteLine("data.data length = " + hardwareConfiguration.CalculateSize());
+
+
+uploadHardwareConfigurationRequest.HardwareConfiguration = hardwareConfiguration;
+var response = stubManager.Run<UploadHardwareConfigurationResponse>(uploadHardwareConfigurationRequest);
+ /*Thread.Sleep(5000);
+
+ stubManager.Run("StubGPIOWriteBitRequest" ,"Q", 7, false);//OFF
+ Thread.Sleep(10);
+ stubManager.Run("StubGPIOWriteBitRequest" ,"Q", 4, true);//ON
+ Thread.Sleep(10);
+ stubManager.Run("StubGPIOWriteBitRequest" ,"Q", 4, false);//OFF
+ Thread.Sleep(10);
+ stubManager.Run("StubGPIOWriteBitRequest" ,"Q", 4, true);//ON
+
+*/
+
+
+}
+
diff --git a/Software/Stubs Collection/stubs/motorrun.cs b/Software/Stubs Collection/stubs/motorrun.cs
new file mode 100644
index 000000000..b735f217c
--- /dev/null
+++ b/Software/Stubs Collection/stubs/motorrun.cs
@@ -0,0 +1,35 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+public void OnExecute(StubManager stubManager)
+{
+ // FALSE - to the body
+ //TRUE out
+ var response3 = stubManager.Run<StubMotorRunResponse>("StubMotorRunRequest" ,15, false, 50);
+ Thread.Sleep(600);
+ for (int i = 0; i < 100; i++)
+ {
+
+ var response = stubManager.Run<StubMotorRunResponse>("StubMotorRunRequest" ,14, false, 20);
+ Thread.Sleep(600);
+ var response1 = stubManager.Run<StubMotorRunResponse>("StubMotorRunRequest" ,14, true, 20);
+ Thread.Sleep(600);
+ }
+
+//var response1 = stubManager.Run<StubMotorStatusResponse>("StubMotorStatusRequest" ,14, true);
+//Thread.Sleep(1000);
+// var response = stubManager.Run<StubMotorRunResponse>("StubMotorRunRequest" ,24, false, 20);
+// Thread.Sleep(700);
+
+var response2 = stubManager.Run<StubMotorStopResponse>("StubMotorStopRequest" ,15, 0);
+var response4 = stubManager.Run<StubMotorStopResponse>("StubMotorStopRequest" ,14, 0);
+}
diff --git a/Software/Stubs Collection/stubs/readPosition.cs b/Software/Stubs Collection/stubs/readPosition.cs
new file mode 100644
index 000000000..acf04f8c1
--- /dev/null
+++ b/Software/Stubs Collection/stubs/readPosition.cs
@@ -0,0 +1,30 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.Stubs.UI;
+using Tango.PMR.Stubs;
+
+public void OnExecute(StubManager stubManager)
+{
+
+StubDancerPositionRequest stubDancerPositionRequest = new StubDancerPositionRequest();
+stubDancerPositionRequest.DancerID = 0;
+StubMotorSpeedRequest stubMotorSpeedRequest = new StubMotorSpeedRequest();
+stubMotorSpeedRequest.MotorID = 18;
+
+for (int i = 0;i<100;i++)
+ {
+ stubManager.Run<StubDancerPositionResponse>(stubDancerPositionRequest);
+// stubManager.Run<StubFpgaReadRegResponse>("StubFpgaReadRegRequest",0x60000010);
+ Thread.Sleep(100);
+ stubManager.Run<StubMotorSpeedResponse>(stubMotorSpeedRequest);
+ Thread.Sleep(1000);
+}
+}
+
diff --git a/Software/Stubs Collection/stubs/rightdancercontrol.cs b/Software/Stubs Collection/stubs/rightdancercontrol.cs
new file mode 100644
index 000000000..5be748d1c
--- /dev/null
+++ b/Software/Stubs Collection/stubs/rightdancercontrol.cs
@@ -0,0 +1,191 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Hardware;
+using Tango.PMR.Printing;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+public void OnExecute(StubManager stubManager)
+{
+
+stubManager.RequestTimeout = 2000;
+
+UploadHardwareConfigurationRequest uploadHardwareConfigurationRequest = new UploadHardwareConfigurationRequest();
+
+HardwareConfiguration hardwareConfiguration = new HardwareConfiguration();
+
+
+HardwarePidControl hardwarePidControl1 = new HardwarePidControl();
+hardwarePidControl1.HardwarePidControlType = Tango.PMR.Hardware.HardwarePidControlType.MotorFeeder;
+hardwarePidControl1.OutputProportionalPowerLimit = 80;
+hardwarePidControl1.OutputProportionalBand = 5;
+hardwarePidControl1.IntegralTime = 5;
+hardwarePidControl1.DerivativeTime = 0;
+hardwarePidControl1.SensorCorrectionAdjustment = 0;
+hardwarePidControl1.SensorMinValue = 0;
+hardwarePidControl1.SensorMaxValue = 0;
+hardwarePidControl1.SetPointRampRateorSoftStartRamp = 0;
+hardwarePidControl1.SetPointControlOutputRate = 4;
+hardwarePidControl1.ControlOutputType = 0;
+hardwarePidControl1.SsrControlOutputType = 0;
+hardwarePidControl1.OutputOnOffHysteresisValue = 0;
+hardwarePidControl1.ProcessVariableSamplingRate = 1000;
+hardwarePidControl1.PvInputFilterFactorMode = 4;
+hardwarePidControl1.OutputProportionalCycleTime = 0;
+hardwarePidControl1.AcHeatersHalfCycleTime = 0;
+hardwarePidControl1.ProportionalGain = 11.0;
+hardwareConfiguration.PidControls.Add(hardwarePidControl1);
+
+HardwareDancer hardwareDancer1 = new HardwareDancer();
+hardwareDancer1.HardwareDancerType = Tango.PMR.Hardware.HardwareDancerType.RightDancer;
+hardwareDancer1.Gradual = false;
+hardwareDancer1.K = 0;
+hardwareDancer1.X = 0;
+hardwareDancer1.PulsePerMmSpring = 0;
+hardwareDancer1.MaximalMovementMm = 15;
+hardwareDancer1.ZeroPoint = 9784;
+hardwareDancer1.ResolutionBits = 14;
+hardwareDancer1.ArmLength = 126;
+hardwareConfiguration.Dancers.Add(hardwareDancer1);
+
+
+HardwareMotor hardwareMotor1 = new HardwareMotor();
+hardwareMotor1.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoRdriving;
+hardwareMotor1.MinFrequency = 0;
+hardwareMotor1.MaxFrequency = 50000;
+hardwareMotor1.SetMicroStep = 1;
+hardwareMotor1.MicroStep = 32;
+hardwareMotor1.MaxChangeSlope = 10000;
+hardwareMotor1.HighLengthMicroSecond = 0;
+hardwareMotor1.SpeedMaster = false;
+hardwareMotor1.PulsePerRound = 200;
+hardwareMotor1.PulleyRadius = 1.25;
+hardwareMotor1.ConfigWord = 0x1c80;
+hardwareMotor1.DirectionThreadWize = true;
+hardwareMotor1.KvalHold = 0x35;
+hardwareMotor1.KvalRun = 0x7f;
+hardwareMotor1.KvalAcc = 0x7f;
+hardwareMotor1.KvalDec = 0x7f;
+hardwareMotor1.OverCurrentThreshold = 7;
+hardwareMotor1.StallThreshold = 0x1F;
+hardwareMotor1.ThermalCompensationFactor = 0;
+hardwareMotor1.LowSpeedOptimization = false;
+hardwareMotor1.StSlp = 0x20;
+hardwareMotor1.IntSpd = 0x1A13;
+hardwareMotor1.FnSlpAcc = 0x50;
+hardwareMotor1.FnSlpDec = 0x50;
+hardwareConfiguration.Motors.Add(hardwareMotor1);
+
+
+HardwareMotor hardwareMotor7 = new HardwareMotor();
+hardwareMotor7.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoRloading;
+hardwareMotor7.MinFrequency = 0;
+hardwareMotor7.MaxFrequency = 15000;
+hardwareMotor7.SetMicroStep = 1;
+hardwareMotor7.MicroStep = 64;
+hardwareMotor7.MaxChangeSlope = 1000;
+hardwareMotor7.HighLengthMicroSecond = 0;
+hardwareMotor7.SpeedMaster = false;
+hardwareMotor7.PulsePerRound = 200;
+hardwareMotor7.PulleyRadius = 1.25;
+hardwareMotor7.ConfigWord = 0xC80;
+hardwareMotor7.DirectionThreadWize = true;
+hardwareMotor7.KvalHold = 0x28;
+hardwareMotor7.KvalRun = 0x5f;
+hardwareMotor7.KvalAcc = 0x5f;
+hardwareMotor7.KvalDec = 0x5f;
+hardwareMotor7.OverCurrentThreshold = 7;
+hardwareMotor7.StallThreshold = 0x1F;
+hardwareMotor7.ThermalCompensationFactor = 0;
+hardwareMotor7.LowSpeedOptimization = false;
+hardwareMotor7.StSlp = 6;
+hardwareMotor7.IntSpd = 0x44B8;
+hardwareMotor7.FnSlpAcc = 0x14;
+hardwareMotor7.FnSlpDec = 0x14;
+hardwareConfiguration.Motors.Add(hardwareMotor7);
+
+stubManager.WriteLine("data.data length = " + hardwareConfiguration.CalculateSize());
+
+
+uploadHardwareConfigurationRequest.HardwareConfiguration = hardwareConfiguration;
+var response = stubManager.Run<UploadHardwareConfigurationResponse>(uploadHardwareConfigurationRequest);
+ Thread.Sleep(10000);
+
+JobRequest jobRequest = new JobRequest();
+
+JobTicket jobTicket = new JobTicket();
+jobTicket.Name = "Stubs Job";
+jobTicket.EnableInterSegment = false;
+jobTicket.InterSegmentLength = 50;
+jobTicket.Length = 1000;
+
+ProcessParameters processParameters = new ProcessParameters();
+processParameters.DyeingSpeed = 40;
+processParameters.TableIndex = 0;
+
+jobTicket.ProcessParameters = processParameters;
+jobTicket.WindingMethod = Tango.PMR.Printing.JobWindingMethod.Embroidery;
+
+JobSpool jobSpool = new JobSpool();
+jobSpool.JobSpoolType = Tango.PMR.Printing.JobSpoolType.StandardSpool;
+jobSpool.Length = 1000;
+jobSpool.Weight = 0;
+jobSpool.Diameter = 0;
+jobSpool.StartOffsetPulses = 50;
+jobSpool.BackingRate = 10;
+jobSpool.SegmentOffsetPulses = 4000;
+jobSpool.BottomBackingRate = 70;
+jobSpool.RotationsPerPassage = 7;
+
+jobTicket.Spool = jobSpool;
+
+JobSegment jobSegment = new JobSegment();
+jobSegment.Name = "Segment1";
+jobSegment.Length = 8;
+
+JobBrushStop jobBrushStop = new JobBrushStop();
+jobBrushStop.Index = 0;
+jobBrushStop.OffsetPercent = 0;
+jobBrushStop.OffsetMeters = 0;
+
+JobDispenser jobDispenser = new JobDispenser();
+jobDispenser.Index = 2;
+jobDispenser.Volume = 10;
+jobDispenser.DispenserStepDivision = Tango.PMR.Printing.DispenserStepDivision.Auto;
+jobDispenser.NanolitterPerSecond = 10;
+jobDispenser.NanoliterPerCentimeter = 10;
+jobDispenser.PulsePerSecond = 500;
+jobDispenser.DispenserLiquidType = Tango.PMR.Printing.DispenserLiquidType.Cyan;
+jobDispenser.LiquidMaxNanoliterPerCentimeter = 40;
+jobDispenser.NanoliterPerPulse = 10;
+jobBrushStop.Dispensers.Add(jobDispenser);
+jobSegment.BrushStops.Add(jobBrushStop);
+jobTicket.Segments.Add(jobSegment);
+
+jobRequest.JobTicket = jobTicket;
+
+ Thread.Sleep(50);
+
+stubManager.WriteLine("data.data length = " + jobRequest.CalculateSize());
+ var response2 = stubManager.Run<JobResponse>(jobRequest);
+ Thread.Sleep(100);
+
+ int i=0;
+stubManager.RunContinuous<StubHeatingTestPollResponse>("StubHeatingTestPollRequest",(response1) =>
+ {
+// stubManager.WriteLine (String.Format("Data, {0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}",++i,response1.Zone1Temp,response1.Zone2Temp,response1.Heater1Active,response1.Heater2Active,response1.Heater1Percentage,response1.Heater2Percentage,response1.InfoMessage));
+ stubManager.WriteLine (String.Format("Feeder, {0}, Orig {1}, Err {2}, Calc {3}, read {4}, {5}",++i,response1.Zone1Temp,response1.Zone2Temp,response1.Heater1Percentage,response1.Heater2Percentage, response1.InfoMessage));
+
+ },0);
+
+
+
+}
+
diff --git a/Software/Stubs Collection/stubs/shutdownheaters.cs b/Software/Stubs Collection/stubs/shutdownheaters.cs
new file mode 100644
index 000000000..e4dff8cdb
--- /dev/null
+++ b/Software/Stubs Collection/stubs/shutdownheaters.cs
@@ -0,0 +1,25 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+public void OnExecute(StubManager stubManager)
+{
+// var response = stubManager.Run<CalculateResponse>("calculate", 1, i);
+
+// Request ----
+// UInt32 : Address
+// UInt32 : Value
+
+// Response ----
+// String : Status
+// UInt32 : StatusWord
+var response = stubManager.Run<StubFpgaWriteRegResponse>("StubFpgaWriteRegRequest" ,0x600004e2, 0);
+} \ No newline at end of file
diff --git a/Software/Stubs Collection/stubs/simple job request.cs b/Software/Stubs Collection/stubs/simple job request.cs
new file mode 100644
index 000000000..8057173b6
--- /dev/null
+++ b/Software/Stubs Collection/stubs/simple job request.cs
@@ -0,0 +1,143 @@
+// Request ----
+// UInt32 : MotorID
+
+// Response ----
+// UInt32 : MotorID
+// UInt32 : Position
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Printing;
+using Tango.PMR.Diagnostics;
+using Tango.PMR.Stubs;
+using Tango.Stubs;
+
+public void OnExecute(StubManager stubManager)
+{
+
+
+// Request ----
+// Double : A
+// Double : B
+
+// Response ----
+// Double : Sum
+//var response1 = stubManager.Run<CalculateResponse>("CalculateRequest" ,6, 7);
+
+JobRequest jobRequest = new JobRequest();
+
+JobTicket jobTicket = new JobTicket();
+jobTicket.Name = "Stubs Job";
+jobTicket.EnableInterSegment = false;
+jobTicket.InterSegmentLength = 50;
+jobTicket.Length = 1000;
+
+ProcessParameters processParameters = new ProcessParameters();
+// SPEEED
+processParameters.DyeingSpeed = 5;
+// HEAT
+processParameters.DryerZone1Temp = 100;
+
+
+processParameters.MixerTemp = 0;
+processParameters.DryerBufferLength = 20;
+processParameters.MinInkUptake = 0;
+processParameters.HeadZone1Temp = 50;
+processParameters.HeadZone2Temp = 150;
+processParameters.HeadZone3Temp = 150;
+processParameters.DryerZone2Temp = 0;
+processParameters.DryerZone3Temp = 0;
+processParameters.FeederTension = 0;
+processParameters.PullerTension = 0;
+processParameters.WinderTension = 0;
+processParameters.HeadAirFlow = 0;
+processParameters.DryerAirFlow = 0;
+processParameters.TableIndex = 0;
+
+jobTicket.ProcessParameters = processParameters;
+jobTicket.WindingMethod = Tango.PMR.Printing.JobWindingMethod.Embroidery;
+
+JobSpool jobSpool = new JobSpool();
+jobSpool.JobSpoolType = Tango.PMR.Printing.JobSpoolType.StandardSpool;
+jobSpool.Length = 800;
+jobSpool.Weight = 0;
+jobSpool.Diameter = 3.0;
+jobSpool.StartOffsetPulses = 250;
+jobSpool.BackingRate = 10;
+jobSpool.SegmentOffsetPulses = 750;
+jobSpool.BottomBackingRate = 70;
+jobSpool.RotationsPerPassage = 3;
+
+jobTicket.Spool = jobSpool;
+
+JobSegment jobSegment = new JobSegment();
+jobSegment.Name = "Segment1";
+// LENGTH
+jobSegment.Length = 30.0;
+
+JobBrushStop jobBrushStop = new JobBrushStop();
+jobBrushStop.Index = 0;
+jobBrushStop.OffsetPercent = 0;
+jobBrushStop.OffsetMeters = 0;
+
+JobDispenser jobDispenser = new JobDispenser();
+jobDispenser.Index = 6;
+jobDispenser.Volume = 10;
+jobDispenser.DispenserStepDivision = Tango.PMR.Printing.DispenserStepDivision.Auto;
+jobDispenser.NanolitterPerSecond = 500;
+jobDispenser.NanoliterPerCentimeter = 10;
+jobDispenser.PulsePerSecond = 0;
+jobDispenser.DispenserLiquidType = Tango.PMR.Printing.DispenserLiquidType.Cyan;
+jobDispenser.LiquidMaxNanoliterPerCentimeter = 40;
+jobDispenser.NanoliterPerPulse = 2.4;
+jobBrushStop.Dispensers.Add(jobDispenser);
+jobSegment.BrushStops.Add(jobBrushStop);
+jobTicket.Segments.Add(jobSegment);
+
+jobRequest.JobTicket = jobTicket;
+
+
+ var response = stubManager.Run<JobResponse>(jobRequest);
+ int i=0;
+/*stubManager.WriteLine("data.data length = " + jobRequest.CalculateSize());
+*/
+stubManager.RunContinuous<JobResponse>(jobRequest,(response1) =>
+ {
+ stubManager.WriteLine (String.Format("Data, {0}, {1} meters, {2}",++i,response1.Status.Progress*jobSegment.Length,response1.Status.Message));
+
+ });
+/* stubManager.RunContinuous<ProgressResponse>(request, (response) =>
+ {
+
+ stubManager.WriteLine(response.Progress);
+
+ });
+*/
+
+ //int i=0;
+/*stubManager.RunContinuous<StubHeatingTestPollResponse>("StubHeatingTestPollRequest",(response1) =>
+ {
+// stubManager.WriteLine (String.Format("Data, {0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}",++i,response1.Zone1Temp,response1.Zone2Temp,response1.Heater1Active,response1.Heater2Active,response1.Heater1Percentage,response1.Heater2Percentage,response1.InfoMessage));
+ stubManager.WriteLine (String.Format("Data, Id {0}, Id {1}, Temp {2}, % {3}, Active {4}, {5}",++i,response1.Zone1Temp,response1.Zone2Temp,response1.Heater1Percentage,response1.Heater1Active,response1.InfoMessage));
+
+ },0);
+
+
+/*StartDiagnosticsRequest startDiagnosticsRequest = new StartDiagnosticsRequest();
+//stubManager.RunContinuous<StartDiagnosticsResponse>(startDiagnosticsRequest,(response1) =>
+stubManager.RunContinuous<StartDiagnosticsResponse>(startDiagnosticsRequest,(response1) =>
+ {
+ stubManager.WriteLine (String.Format("Data, {0}, H1 {1}, H2{2}, H3 {3}, D1 {4}, D2 {5}",++i,response1.Monitors.HeadZone1Temperature[0],response1.Monitors.HeadZone2Temperature[0],response1.Monitors.HeadZone3Temperature[0],response1.Monitors.DryerZone1Temperature[0],response1.Monitors.DryerZone2Temperature[0]));
+ stubManager.WriteLine (String.Format("Data, {0}, DR {1}, DM{2}, DL {3}, Feeder {4}",++i,response1.Monitors.Dancer1Angle[0],response1.Monitors.Dancer2Angle[0],response1.Monitors.Dancer3Angle[0],response1.Monitors.FeederMotorFrequency[0]));
+
+ },0);
+
+*/
+}
+
diff --git a/Software/Stubs Collection/stubs/systemreset.cs b/Software/Stubs Collection/stubs/systemreset.cs
new file mode 100644
index 000000000..37f60a955
--- /dev/null
+++ b/Software/Stubs Collection/stubs/systemreset.cs
@@ -0,0 +1,21 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Hardware;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+
+public void OnExecute(StubManager stubManager)
+{
+SystemResetRequest systemResetRequest = new SystemResetRequest();
+
+var response1 = stubManager.Run<SystemResetResponse>(systemResetRequest);
+}
+
diff --git a/Software/Stubs Collection/stubs/test dryer.cs b/Software/Stubs Collection/stubs/test dryer.cs
new file mode 100644
index 000000000..103885b47
--- /dev/null
+++ b/Software/Stubs Collection/stubs/test dryer.cs
@@ -0,0 +1,69 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Hardware;
+using Tango.PMR.Printing;
+using Tango.PMR.Stubs;
+using Tango.Stubs;
+
+
+public void OnExecute(StubManager stubManager)
+{
+ Thread.Sleep(10);
+HardwareMotor DryerMotor = new HardwareMotor();
+DryerMotor.HardwareMotorType = Tango.PMR.Hardware.HardwareMotorType.MotoDryerDriving;
+DryerMotor.MinFrequency = 0;
+DryerMotor.MaxFrequency = 100000;
+DryerMotor.SetMicroStep = 1;
+DryerMotor.MicroStep = 16;
+DryerMotor.MaxChangeSlope = 0x7ff;
+DryerMotor.HighLengthMicroSecond = 0;
+DryerMotor.SpeedMaster = false;
+DryerMotor.PulsePerRound = 200;
+DryerMotor.PulleyRadius = 0.8;
+DryerMotor.ConfigWord = 0x1C80;
+DryerMotor.DirectionThreadWize = false;
+DryerMotor.KvalHold = 0x08;
+DryerMotor.KvalRun = 0x35;
+DryerMotor.KvalAcc = 0x7f;
+DryerMotor.KvalDec = 0x27;
+DryerMotor.OverCurrentThreshold = 0x7;
+DryerMotor.StallThreshold = 0x1F;
+DryerMotor.ThermalCompensationFactor = 0;
+DryerMotor.LowSpeedOptimization = false;
+DryerMotor.StSlp = 0x20;
+DryerMotor.IntSpd = 0x1A13;
+DryerMotor.FnSlpAcc = 0x50;
+DryerMotor.FnSlpDec = 0x50;
+DryerMotor.FsSpd = 0x27;
+
+
+UploadHardwareConfigurationRequest uploadHardwareConfigurationRequest = new UploadHardwareConfigurationRequest();
+
+HardwareConfiguration hardwareConfiguration = new HardwareConfiguration();
+
+hardwareConfiguration.Motors.Add(DryerMotor);
+
+stubManager.WriteLine("data.data length = " + hardwareConfiguration.CalculateSize());
+
+
+uploadHardwareConfigurationRequest.HardwareConfiguration = hardwareConfiguration;
+//var response = stubManager.Run<UploadHardwareConfigurationResponse>(uploadHardwareConfigurationRequest);
+ /*Thread.Sleep(5000);*/
+//var response3 = stubManager.Run<StubValveResponse>("StubValveRequest" ,6, 10, false);
+var response4 = stubManager.Run<StubMotorRunResponse>("StubMotorRunRequest" ,3, false, 1600);
+Thread.Sleep(1000);
+//open valve toward the midtank, stop dispenser
+//var response3 = stubManager.Run<StubValveResponse>("StubValveRequest" ,6, 10, false);
+//var response2 = stubManager.Run<StubMotorStopResponse>("StubMotorStopRequest" ,3,2);
+
+
+
+}
+
diff --git a/Software/Stubs Collection/stubs/testinterface.cs b/Software/Stubs Collection/stubs/testinterface.cs
new file mode 100644
index 000000000..46eb0a12c
--- /dev/null
+++ b/Software/Stubs Collection/stubs/testinterface.cs
@@ -0,0 +1,34 @@
+using System;
+using System.Text;
+using System.Linq;
+using System.Drawing;
+using System.Diagnostics;
+using System.Windows.Forms;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using Tango.PMR.Stubs;
+using Tango.Stubs.UI;
+
+public void OnExecute(StubManager stubManager)
+{
+ for (int i = 0; i < 200; i++)
+ {
+ //TEST GPIO USER LED:
+ //stubManager.RequestTimeout = 200;
+ stubManager.Run("StubGPIOWriteBitRequest" ,"P", 4, true);//ON
+ Thread.Sleep(1000);
+ stubManager.Run("StubGPIOWriteBitRequest" ,"P", 4, false);//ON
+ Thread.Sleep(1000);
+// stubManager.Run("StubGPIOWriteBitRequest" ,"Q", 7, false);//OFF
+// Thread.Sleep(1000);
+
+CalculateRequest calculateRequest = new CalculateRequest();
+calculateRequest.A = i;
+calculateRequest.B = i+1;
+ stubManager.Run<CalculateResponse>(calculateRequest);//ON
+ Thread.Sleep(1000);
+
+ }
+}
+