aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Stubs Collection/stubs/Read dancer Position.cs
blob: 7e38f4059ba55f531b9f597349b20ab1df6cf281 (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
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.UI;

public void OnExecute(StubManager stubManager)
{
	// Request ----
	// UInt32 : DancerID
	
	// Response ----
	// UInt32 : DancerID
	// UInt32 : Position
	// UInt32 : GeneralStatus
	// UInt32 : DetailedStatus
	var response = stubManager.Run<StubDancerPositionResponse>("StubDancerPositionRequest" ,0); // Left 1 - pooler -0, Left 2 winder - 1, Right feeder - 3, 4 speed sensor
	stubManager.WriteLineHex(response.Position,4); //14 Bit
	stubManager.WriteLineHex(response.GeneralStatus,1); //2 Bit
	stubManager.WriteLineHex(response.DetailedStatus,1); //8 Bit
}