aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Stubs Collection/stubs/Scripts/Assemblies/Header/header_LimitSwitch.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Stubs Collection/stubs/Scripts/Assemblies/Header/header_LimitSwitch.cs')
-rw-r--r--Software/Stubs Collection/stubs/Scripts/Assemblies/Header/header_LimitSwitch.cs48
1 files changed, 48 insertions, 0 deletions
diff --git a/Software/Stubs Collection/stubs/Scripts/Assemblies/Header/header_LimitSwitch.cs b/Software/Stubs Collection/stubs/Scripts/Assemblies/Header/header_LimitSwitch.cs
new file mode 100644
index 000000000..4454e9c63
--- /dev/null
+++ b/Software/Stubs Collection/stubs/Scripts/Assemblies/Header/header_LimitSwitch.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;
+
+include "..\..\Defines\Tango_Defines_Basic.cs"
+include "Tango_Defines_LimitSwitch.cs"
+//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_LimitSwitch.cs"
+
+
+
+
+public void OnExecute(StubManager stubManager)
+{
+
+ uint Temp = 0;
+ int counter = 0;
+ stubManager.Write("\nReading register F1_LS_01_Direct: ");
+ var RetVal = Fpga_Read_Reg(FPGA1, F1_LS_01_Direct, 0);
+ stubManager.WriteHex(RetVal.Value,4);
+ Temp = RetVal.Value;
+ stubManager.Write("\nActivate limit switches one-by-one");
+
+ while ( counter != 10000)
+ {
+ RetVal = Fpga_Read_Reg(FPGA1, F1_LS_01_Direct, 0);
+ if (RetVal.Value != Temp)
+ {
+ stubManager.Write("\nRegister F1_LS_01_Direct new value: ");
+ stubManager.WriteHex(RetVal.Value,4);
+ counter = counter + 1;
+ }
+ Thread.Sleep(100);
+ Temp = RetVal.Value;
+
+ }
+
+
+
+} \ No newline at end of file