Motion » History » Version 4
Andrej Cimperšek, 07/11/2010 07:17 PM
1 | 1 | Andrej Cimperšek | h1. Motion |
---|---|---|---|
2 | 1 | Andrej Cimperšek | |
3 | 1 | Andrej Cimperšek | !https://redmine.pint.upr.si/attachments/download/337/API_motion.png! |
4 | 2 | Andrej Cimperšek | |
5 | 2 | Andrej Cimperšek | |
6 | 2 | Andrej Cimperšek | <pre><code class="java"> |
7 | 2 | Andrej Cimperšek | /** |
8 | 2 | Andrej Cimperšek | * Motion API |
9 | 2 | Andrej Cimperšek | * @author Andrej Cimperšek |
10 | 2 | Andrej Cimperšek | */ |
11 | 2 | Andrej Cimperšek | public interface Motion { |
12 | 3 | Andrej Cimperšek | /** |
13 | 3 | Andrej Cimperšek | * Sets parameters for next motor move |
14 | 3 | Andrej Cimperšek | * @param steps |
15 | 3 | Andrej Cimperšek | * @param freq |
16 | 3 | Andrej Cimperšek | */ |
17 | 3 | Andrej Cimperšek | public void SetMove0(int steps, float freq); |
18 | 3 | Andrej Cimperšek | |
19 | 3 | Andrej Cimperšek | /** |
20 | 3 | Andrej Cimperšek | * Sets parameters for next motor move |
21 | 3 | Andrej Cimperšek | * @param steps |
22 | 3 | Andrej Cimperšek | * @param freq |
23 | 3 | Andrej Cimperšek | */ |
24 | 3 | Andrej Cimperšek | public void SetMove1(int steps, float freq); |
25 | 4 | Andrej Cimperšek | |
26 | 3 | Andrej Cimperšek | /** |
27 | 3 | Andrej Cimperšek | * Moves motors according to set moves |
28 | 3 | Andrej Cimperšek | */ |
29 | 3 | Andrej Cimperšek | public void Run(); |
30 | 4 | Andrej Cimperšek | |
31 | 3 | Andrej Cimperšek | /** |
32 | 4 | Andrej Cimperšek | * Sets angular velocity in steps / sec |
33 | 3 | Andrej Cimperšek | * @param omega0 |
34 | 3 | Andrej Cimperšek | */ |
35 | 3 | Andrej Cimperšek | public void SetInitialAngularVel0(float omega0); |
36 | 3 | Andrej Cimperšek | |
37 | 3 | Andrej Cimperšek | /** |
38 | 4 | Andrej Cimperšek | * Sets angular velocity in steps / sec |
39 | 3 | Andrej Cimperšek | * @param omega0 |
40 | 3 | Andrej Cimperšek | */ |
41 | 3 | Andrej Cimperšek | public void SetInitialAngularVel1(float omega0); |
42 | 3 | Andrej Cimperšek | |
43 | 3 | Andrej Cimperšek | /** |
44 | 4 | Andrej Cimperšek | * Sets angular acceleration in steps / sec^2 |
45 | 3 | Andrej Cimperšek | * @param accel |
46 | 3 | Andrej Cimperšek | */ |
47 | 3 | Andrej Cimperšek | public void SetAngularAcceleration0(float accel); |
48 | 3 | Andrej Cimperšek | |
49 | 3 | Andrej Cimperšek | /** |
50 | 4 | Andrej Cimperšek | * Sets angular acceleration in steps / sec^2 |
51 | 3 | Andrej Cimperšek | * @param accel |
52 | 3 | Andrej Cimperšek | */ |
53 | 3 | Andrej Cimperšek | public void SetAngularAcceleration1(float accel); |
54 | 3 | Andrej Cimperšek | |
55 | 3 | Andrej Cimperšek | /** |
56 | 3 | Andrej Cimperšek | * |
57 | 3 | Andrej Cimperšek | * @param steps |
58 | 3 | Andrej Cimperšek | */ |
59 | 3 | Andrej Cimperšek | public void SetLackCorrection0(short steps); |
60 | 3 | Andrej Cimperšek | |
61 | 3 | Andrej Cimperšek | /** |
62 | 4 | Andrej Cimperšek | * |
63 | 3 | Andrej Cimperšek | * @param steps |
64 | 3 | Andrej Cimperšek | */ |
65 | 3 | Andrej Cimperšek | public void SetLackCorrection1(short steps); |
66 | 3 | Andrej Cimperšek | |
67 | 3 | Andrej Cimperšek | /** |
68 | 4 | Andrej Cimperšek | * Sets angular deceleration in steps / sec^2 |
69 | 3 | Andrej Cimperšek | * @param decel |
70 | 3 | Andrej Cimperšek | */ |
71 | 3 | Andrej Cimperšek | public void SetAngularDeceleration0(float decel); |
72 | 3 | Andrej Cimperšek | |
73 | 3 | Andrej Cimperšek | /** |
74 | 4 | Andrej Cimperšek | * Sets angular deceleration in steps / sec^2 |
75 | 3 | Andrej Cimperšek | * @param decel |
76 | 3 | Andrej Cimperšek | */ |
77 | 3 | Andrej Cimperšek | public void SetAngularDeceleration1(float decel); |
78 | 4 | Andrej Cimperšek | |
79 | 3 | Andrej Cimperšek | /** |
80 | 3 | Andrej Cimperšek | * Sets position for stepper 0 |
81 | 3 | Andrej Cimperšek | * @param position |
82 | 3 | Andrej Cimperšek | */ |
83 | 3 | Andrej Cimperšek | public void SetPosition0(int position); |
84 | 3 | Andrej Cimperšek | |
85 | 3 | Andrej Cimperšek | /** |
86 | 3 | Andrej Cimperšek | * Sets position for stepper 1 |
87 | 3 | Andrej Cimperšek | * @param position |
88 | 3 | Andrej Cimperšek | */ |
89 | 3 | Andrej Cimperšek | public void SetPosition1(int position); |
90 | 3 | Andrej Cimperšek | |
91 | 3 | Andrej Cimperšek | /** |
92 | 3 | Andrej Cimperšek | * Stops motor 0 |
93 | 3 | Andrej Cimperšek | */ |
94 | 3 | Andrej Cimperšek | public void StopMotor0(); |
95 | 3 | Andrej Cimperšek | |
96 | 3 | Andrej Cimperšek | /** |
97 | 3 | Andrej Cimperšek | * Stops motor 1 |
98 | 3 | Andrej Cimperšek | */ |
99 | 3 | Andrej Cimperšek | public void StopMotor1(); |
100 | 3 | Andrej Cimperšek | |
101 | 3 | Andrej Cimperšek | /** |
102 | 3 | Andrej Cimperšek | * Disables current on motor 0 |
103 | 3 | Andrej Cimperšek | */ |
104 | 3 | Andrej Cimperšek | public void MotorOff0(); |
105 | 3 | Andrej Cimperšek | |
106 | 3 | Andrej Cimperšek | /** |
107 | 3 | Andrej Cimperšek | * Disables current on motor 1 |
108 | 3 | Andrej Cimperšek | */ |
109 | 3 | Andrej Cimperšek | public void MotorOff1(); |
110 | 3 | Andrej Cimperšek | |
111 | 3 | Andrej Cimperšek | /** |
112 | 3 | Andrej Cimperšek | * Gets positions of both motors |
113 | 3 | Andrej Cimperšek | * @return Position |
114 | 3 | Andrej Cimperšek | */ |
115 | 3 | Andrej Cimperšek | public Position GetPosition(); |
116 | 4 | Andrej Cimperšek | |
117 | 3 | Andrej Cimperšek | /** |
118 | 3 | Andrej Cimperšek | * Set continuous key movement |
119 | 3 | Andrej Cimperšek | */ |
120 | 3 | Andrej Cimperšek | public void SetContinuousKeyMovement(); |
121 | 3 | Andrej Cimperšek | |
122 | 3 | Andrej Cimperšek | /** |
123 | 3 | Andrej Cimperšek | * Set single step key movement |
124 | 3 | Andrej Cimperšek | */ |
125 | 3 | Andrej Cimperšek | public void SetSingleStepKeyMovement(); |
126 | 3 | Andrej Cimperšek | |
127 | 3 | Andrej Cimperšek | /** |
128 | 3 | Andrej Cimperšek | * Simulate Left Key Press |
129 | 3 | Andrej Cimperšek | */ |
130 | 3 | Andrej Cimperšek | public void SimulateLeftKeyPress(); |
131 | 3 | Andrej Cimperšek | |
132 | 3 | Andrej Cimperšek | /** |
133 | 3 | Andrej Cimperšek | * Simulate Left Key Release |
134 | 3 | Andrej Cimperšek | */ |
135 | 3 | Andrej Cimperšek | public void SimulateLeftKeyRelease(); |
136 | 3 | Andrej Cimperšek | |
137 | 3 | Andrej Cimperšek | /** |
138 | 3 | Andrej Cimperšek | * Simulate Right Key Press |
139 | 3 | Andrej Cimperšek | */ |
140 | 3 | Andrej Cimperšek | public void SimulateRightKeyPress(); |
141 | 3 | Andrej Cimperšek | |
142 | 3 | Andrej Cimperšek | /** |
143 | 3 | Andrej Cimperšek | * Simulate Right Key Release |
144 | 3 | Andrej Cimperšek | */ |
145 | 3 | Andrej Cimperšek | public void SimulateRightKeyRelease(); |
146 | 3 | Andrej Cimperšek | |
147 | 3 | Andrej Cimperšek | /** |
148 | 3 | Andrej Cimperšek | * Simulate Up Key Press |
149 | 3 | Andrej Cimperšek | */ |
150 | 3 | Andrej Cimperšek | public void SimulateUpKeyPress(); |
151 | 3 | Andrej Cimperšek | |
152 | 3 | Andrej Cimperšek | /** |
153 | 3 | Andrej Cimperšek | * Simulate Up Key Release |
154 | 3 | Andrej Cimperšek | */ |
155 | 3 | Andrej Cimperšek | public void SimulateUpKeyRelease(); |
156 | 3 | Andrej Cimperšek | |
157 | 3 | Andrej Cimperšek | /** |
158 | 3 | Andrej Cimperšek | * Simulate Down Key Press |
159 | 3 | Andrej Cimperšek | */ |
160 | 3 | Andrej Cimperšek | public void SimulateDownKeyPress(); |
161 | 1 | Andrej Cimperšek | |
162 | 1 | Andrej Cimperšek | /** |
163 | 1 | Andrej Cimperšek | * Simulate Down Key Release |
164 | 1 | Andrej Cimperšek | */ |
165 | 1 | Andrej Cimperšek | public void SimulateDownKeyRelease(); |
166 | 1 | Andrej Cimperšek | |
167 | 1 | Andrej Cimperšek | /** |
168 | 1 | Andrej Cimperšek | * Sets automatic position reporting. |
169 | 4 | Andrej Cimperšek | * 0..turns off automatic position reporting, 50..9999 autoreport interval in milliseconds |
170 | 1 | Andrej Cimperšek | * @param interval |
171 | 1 | Andrej Cimperšek | */ |
172 | 3 | Andrej Cimperšek | public void AutomaticPositionReporting(short interval); |
173 | 4 | Andrej Cimperšek | } |
174 | 4 | Andrej Cimperšek | </code></pre> |
175 | 4 | Andrej Cimperšek | |
176 | 4 | Andrej Cimperšek | <pre><code class="java"> |
177 | 4 | Andrej Cimperšek | /** |
178 | 4 | Andrej Cimperšek | * Motors position |
179 | 4 | Andrej Cimperšek | * @author Andrej Cimperšek |
180 | 4 | Andrej Cimperšek | */ |
181 | 4 | Andrej Cimperšek | public class Position { |
182 | 4 | Andrej Cimperšek | public int position0; |
183 | 4 | Andrej Cimperšek | public int position1; |
184 | 2 | Andrej Cimperšek | } |
185 | 2 | Andrej Cimperšek | </code></pre> |