aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Stubs Collection/stubs/Scripts/Assemblies/Header/header_LimitSwitch.cs
diff options
context:
space:
mode:
authorMirta <mirta@twine-s.com>2020-12-30 16:39:52 +0200
committerMirta <mirta@twine-s.com>2020-12-30 16:39:52 +0200
commit00a491d93733d4625ad329b2ba8237f445364b3f (patch)
tree4b24c6fa78d7648f4bb7cefafa464bb0b063fec4 /Software/Stubs Collection/stubs/Scripts/Assemblies/Header/header_LimitSwitch.cs
parent124ad4150f80c6846fdee41dbbda9848c105f6e5 (diff)
downloadTango-00a491d9.tar.gz
Tango-00a491d9.zip
merge
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