aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Stubs Collection/stubs/ScrewMotorMov.cs
blob: 6b3ffe626e680002aaeef6f3062f9f69e838cea9 (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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
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);
}