blob: 1200072156cf96644b42bfa4ced7bb2a9491b54a (
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
|
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;
const Int32 x_GET_STATUS = 0xD0;
public void OnExecute(StubManager stubManager)
{
var response = stubManager.Run<StubMotorResponse>("StubMotorRequest" ,12, (x_GET_STATUS)<<16, 0, 0);
stubManager.Write("x_GET_STATUS = ");
stubManager.WriteHex(response.RecivedData,4);
stubManager.Write("\n\n");
UInt32 HIZ = response.RecivedData&1;
stubManager.Write("HIZ = ");
stubManager.WriteHex(HIZ,1);
stubManager.Write("\n\n");
// Request ----
// UInt32 : MotorID
// Boolean : ClearStatus
// Response ----
// UInt32 : MotorID
// Boolean : SCKMOD
// Boolean : STEPLOSSB
// Boolean : STEPLOSSA
// Boolean : OCD
// Boolean : THSD
// Boolean : THWRN
// Boolean : UVLO
// Boolean : WRONGCMD
// Boolean : NOTPERFCMD
// UInt32 : MOTSTATUS
// Boolean : DIR
// Boolean : SWEVN
// Boolean : SWF
// Boolean : BUSY
// Boolean : HiZ
//response = stubManager.Run<StubMotorStatusResponse>("StubMotorStatusRequest" ,12, true);
}
|