aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Stubs Collection/stubs/Scripts/Assemblies/Header/magner_ssr.cs
blob: 54e3f48446dc43a7fc83cf292488b83cd5a6eba0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
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_SSR.cs"                          	
//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)
{  
Int32 Bit = 1;	
	
   //Write GPO_DRYER_SSR1_CTRL SSR/SSR no. 1
   //SetBit (FPGA2, F2_CTRL, 0, 1);
   stubManager.Write("\nTesting SSR no. 13 of magnet");
   //Thread.Sleep(4000);

//var response = stubManager.Run<StubMotorRunResponse>("StubMotorRunRequest" ,2, true, 50);


	stubManager.Write("\n***   Open Lid Head ");
			Bit = 1;

	/*while (Bit != 0x0)		//wait until LTFU LOADRAM Down
			{	
					Bit = GetBit(FPGA1, F1_LS_01_Direct,7);	
					Thread.Sleep(10);
			}
		Thread.Sleep(100);
					stubManager.Write("\n--------1--------");

					
	stubManager.Write("\n***   Close Lid Head ");
			Bit = 1;
 response = stubManager.Run<StubMotorRunResponse>("StubMotorRunRequest" ,2, false, 50);

	while (Bit != 0x0)		//wait until LTFU LOADRAM Down
			{	
					Bit = GetBit(FPGA1, F1_LS_01_Direct,8);	
					Thread.Sleep(10);
			}
		Thread.Sleep(100);
					stubManager.Write("\n--------2--------");

  response = stubManager.Run<StubMotorRunResponse>("StubMotorRunRequest" ,2, true, 0);*/

     SetBit (FPGA2, F2_CTRL, 0, 1);//open
     SetBit (FPGA2, F2_CTRL, 0, 0);//close
     
     
//    var response = stubManager.Run<StubMotorRunResponse>("StubMotorRunRequest" ,0, true, 50); motor clean
	
//response = stubManager.Run<StubMotorRunResponse>("StubMotorRunRequest" ,1, true, 50); motor clean

     
     

}