aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Stubs Collection/stubs/MotorInit.cs
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2018-07-04 15:57:56 +0300
committerShlomo Hecht <shlomo@twine-s.com>2018-07-04 15:57:56 +0300
commitfdf45caba5c70e4a368ab5fc62398ac3cccc697c (patch)
treec60b9c924b085ff8af3f614af22b852dd3b7c22a /Software/Stubs Collection/stubs/MotorInit.cs
parent1246a201b4600899b4e11243ffb9ff300674750d (diff)
downloadTango-fdf45caba5c70e4a368ab5fc62398ac3cccc697c.tar.gz
Tango-fdf45caba5c70e4a368ab5fc62398ac3cccc697c.zip
Stubs collection
Diffstat (limited to 'Software/Stubs Collection/stubs/MotorInit.cs')
-rw-r--r--Software/Stubs Collection/stubs/MotorInit.cs38
1 files changed, 38 insertions, 0 deletions
diff --git a/Software/Stubs Collection/stubs/MotorInit.cs b/Software/Stubs Collection/stubs/MotorInit.cs
new file mode 100644
index 000000000..3a9ee4a90
--- /dev/null
+++ b/Software/Stubs Collection/stubs/MotorInit.cs
@@ -0,0 +1,38 @@
+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)
+{
+
+StubMotorInitRequest stubMotorInitRequest = new StubMotorInitRequest();
+stubMotorInitRequest.MotorID = 3;
+stubMotorInitRequest.MicroSteps = 8;
+stubMotorInitRequest.SetMicroSteps = false;
+stubMotorInitRequest.ACC = 0;
+stubMotorInitRequest.SetACC = false;
+stubMotorInitRequest.DEC = 0;
+stubMotorInitRequest.SetDec = false;
+stubMotorInitRequest.MaxSpeed = 8000;
+stubMotorInitRequest.SetMaxSpeed = false;
+
+
+
+
+ var response = stubManager.Run<StubMotorInitResponse>(stubMotorInitRequest);
+
+ if (response.MotorID == 3)
+ {
+ stubManager.WriteLine("OK!");
+ }
+
+}
+