aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Stubs Collection/stubs/Scripts/Assemblies/Winder/Screw_Encoder.cs
blob: 88a2e703ab27f2fb1080241b994cff9646c3370c (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
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)
{

UInt32 temp	;
	
	
	
	
	
	// Request ----
// UInt32 : Address

// Response ----
// UInt32 : Address
// UInt32 : Value
// String : Status
// UInt32 : StatusWord

while (true)
	{
var response = stubManager.Run<StubFpgaReadRegResponse>("StubFpgaReadRegRequest" ,0x60000100);
var response1 = stubManager.Run<StubFpgaReadRegResponse>("StubFpgaReadRegRequest" ,0x60000102);

temp=(response.Value & 0xffff )+((response1.Value & 0xffff )<<16);
temp=temp&0x0fffffff;
stubManager.WriteHex(temp,8);
stubManager.Write("\n");

		Thread.Sleep(100);

}
}