aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Stubs Collection/stubs/powestep01_change_mode.cs
blob: 75939ea87f907f7a0875a6f15b47ce3be91a0a71 (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
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;


Int32 i  = 6; // to run only for specific motor 

public void OnExecute(StubManager stubManager)
{
	for (i = 6; i < 14; i++)
	{
		//stubManager.Run<ProgressResponse>("ProgressRequest" ,0x01,  0x010000 + (i<<8) + 0x00); //change motor driver 25 to voltage mode;
		stubManager.Run<ProgressResponse>("ProgressRequest" ,0x01, 0x010000 + (i<<8) + 0x08); //change motor driver 06 to current mode;
		Thread.Sleep(10); //Sleep for 10 milli.
		
	}
}