kmlMotBase.cpp
Go to the documentation of this file.
1 //
2 // C++ Implementation: kmlMotBase
3 //
4 // Description:
5 //
6 //
7 // Author: Tiziano Müller <tiziano.mueller@neuronics.ch>, (C) 2006
8 //
9 // Copyright: See COPYING file that comes with this distribution
10 //
11 //
12 
13 #include "KNI/kmlMotBase.h"
14 
16 #include "common/Timer.h"
17 #include <iostream>
18 
19 
20 bool CMotBase::init(CKatBase* _own, const TMotDesc _motDesc, CCplBase* _protocol) {
21  gnl.own = _own;
22  gnl.SID = _motDesc.slvID;
23  protocol = _protocol;
24  try {
25  if (protocol != NULL)
26  recvSFW();
27  } catch (ParameterReadingException pre) {
28  sfw.type = 0; // set position controller for now
29  return true;
30  }
31  return true;
32 }
33 
34 
36  byte p[32]; //packet
37  byte buf[256]; //readbuf
38  byte sz = 0; //readbuf size
39 
40  recvPVP();
41 
42  p[0] = 'C';
43  p[1] = gnl.SID;
44  p[2] = MCF_FREEZE; // Flag to freeze
45  p[3] = (byte)(GetPVP()->pos >> 8);
46  p[4] = (byte)(GetPVP()->pos);
47 
48  protocol->comm(p,buf,&sz);
49 
51 }
52 
53 void CMotBase::sendAPS(const TMotAPS* _aps) {
54  byte p[32]; //packet
55  byte buf[256]; //readbuf
56  byte sz = 0; //readbuf size
57 
58  p[0] = 'C';
59  p[1] = gnl.SID + 128;
60  p[2] = _aps->mcfAPS;
61  p[3] = (byte)(_aps->actpos >> 8);
62  p[4] = (byte)(_aps->actpos);
63 
64  protocol->comm(p,buf,&sz);
65 
66  if (!buf[1])
67  throw ParameterWritingException("APS");
68 
69  aps = *_aps;
70 
71 }
72 
73 void CMotBase::sendTPS(const TMotTPS* _tps) {
74  byte p[32]; //packet
75  byte buf[256]; //readbuf
76  byte sz = 0; //readbuf size
77 
78  p[0] = 'C';
79  p[1] = gnl.SID;
80  p[2] = _tps->mcfTPS;
81  p[3] = (byte)(_tps->tarpos >> 8);
82  p[4] = (byte)(_tps->tarpos);
83 
84  protocol->comm(p,buf,&sz);
85  if (!buf[1])
86  throw ParameterWritingException("TPS");
87  tps = *_tps;
88 }
89 
91 
92  byte p[32]; //packet
93  byte buf[256]; //readbuf
94  byte sz = 0; //readbuf size
95 
96  p[0] = 'D';
97  p[1] = gnl.SID;
98 
99  protocol->comm(p,buf,&sz);
100  if (!buf[1])
101  throw ParameterReadingException("PVP");
102  pvp.msf = (TMotStsFlg)buf[2];
103  pvp.pos = (((short)buf[3])<<8) | buf[4];
104  pvp.vel = (((short)buf[5])<<8) | buf[6];
105  pvp.pwm = buf[7];
106 
107 }
108 
110  byte p[32]; //packet
111  byte buf[256]; //readbuf
112  byte sz = 0; //readbuf size
113 
114  p[0] = 'V';
115  p[1] = gnl.SID;
116  p[2] = 32;
117 
118  protocol->comm(p,buf,&sz);
119  if (!buf[1])
120  throw ParameterReadingException("SFW");
121  sfw.version = buf[3];
122  sfw.subversion = buf[4];
123  sfw.revision = buf[5];
124  sfw.type = buf[6];
125  sfw.subtype = buf[7];
126 
127 }
128 
129 
130 void CMotBase::setSpeedLimits(short positiveVelocity, short negativeVelocity) {
131 
132  byte p[32]; //packet
133  byte buf[256]; //readbuf
134  byte sz = 0; //readbuf size
135  p[0] = 'S';
136  p[1] = gnl.SID;
137  p[2] = 3; // subcommand 3 "Set Speed Limits"
138  p[3] = static_cast<byte>(positiveVelocity);
139  p[4] = static_cast<byte>(negativeVelocity);
140  p[5] = 0;
141 
142  protocol->comm(p,buf,&sz);
143 
144  dyl.maxnspeed = dyl.maxnspeed_nmp = negativeVelocity;
145  dyl.maxpspeed = dyl.maxpspeed_nmp = positiveVelocity;
146 
147 }
148 
150 
151  byte p[32]; //packet
152  byte buf[256]; //readbuf
153  byte sz = 0; //readbuf size
154  p[0] = 'S';
155  p[1] = gnl.SID;
156  p[2] = 4; // subcommand 4 "Set Acceleration Limit"
157  p[3] = static_cast<byte>(acceleration);
158  p[4] = 0;
159  p[5] = 0;
160 
161  protocol->comm(p,buf,&sz);
162  dyl.maxaccel_nmp = dyl.maxaccel = static_cast<byte>(acceleration);
163 }
164 
165 void CMotBase::setPwmLimits(byte maxppwm, byte maxnpwm) {
166 
167  if (sfw.type == 1) return; // can not set pwm limit on current controller
168 
169  byte p[32]; //packet
170  byte buf[256]; //readbuf
171  byte sz = 0; //readbuf size
172  p[0] = 'S';
173  p[1] = gnl.SID;
174  p[2] = 2; // subcommand 2 "Set PWM Limits"
175  p[3] = maxppwm;
176  p[4] = maxnpwm;
177  p[5] = 0;
178 
179  protocol->comm(p,buf,&sz);
180  scp.maxppwm_nmp = scp.maxppwm = maxppwm;
181  scp.maxnpwm_nmp = scp.maxnpwm = maxnpwm;
182 
183  return;
184 }
185 
187 
188  byte p[32]; //packet
189  byte buf[256]; //readbuf
190  byte sz = 0; //readbuf size
191  p[0] = 'S';
192  p[1] = gnl.SID;
193  p[2] = 1; // subcommand 1 "Set Controller Parameters"
194  p[3] = kSpeed;
195  p[4] = kPos;
196  p[5] = kI;
197 
198  protocol->comm(p,buf,&sz);
199  scp.kspeed_nmp = scp.kP_speed = kSpeed;
200  scp.kpos_nmp = scp.kP = kPos;
201  scp.kI_nmp = kI; // no corresponding old motor parameter
202 
203  return;
204 }
205 
206 void CMotBase::setCrashLimit(int limit) {
207 
208  byte p[32]; //packet
209  byte buf[256]; //readbuf
210  byte sz = 0; //readbuf size
211  p[0] = 'S';
212  p[1] = gnl.SID;
213  p[2] = 5; // subcommand 5 "Set Crash Limit"
214  p[3] = (byte) (limit >> 8);
215  p[4] = (byte) limit;
216  p[5] = 0;
217 
218  protocol->comm(p,buf,&sz);
219  scp.crash_limit_nmp = limit;
220 
221  return;
222 }
223 
224 void CMotBase::setCrashLimitLinear(int limit_lin) {
225 
226  byte p[32]; //packet
227  byte buf[256]; //readbuf
228  byte sz = 0; //readbuf size
229  p[0] = 'S';
230  p[1] = gnl.SID;
231  p[2] = 6; // subcommand 6 "Set Crash Limit Linear"
232  p[3] = (byte) (limit_lin >> 8);
233  p[4] = (byte) limit_lin;
234  p[5] = 0;
235 
236  protocol->comm(p,buf,&sz);
237  scp.crash_limit_lin_nmp = limit_lin;
238 
239  return;
240 }
242 //for Katana400s:
244  byte p[32];
245  byte buf[256];
246  byte sz = 0;
247  p[0] = 'S';
248  p[1] = gnl.SID;
249  p[2] = 7;
250  p[3] = (byte) limit; //for both the linear and non-linear the same:
251  p[4] = (byte) limit;
252  p[5] = 0;
253  protocol->comm(p,buf,&sz);
254  scp.crash_limit_nmp = limit;
255  return;
256 }
258 //for Katana400s:
260  byte p[32];
261  byte buf[256];
262  byte sz = 0;
263  p[0] = 'S';
264  p[1] = gnl.SID;
265  p[2] = 5;
266  p[3] = (byte) (limit >> 8);
267  p[4] = (byte) limit;
268  p[5] = 0;
269  protocol->comm(p,buf,&sz);
270  scp.crash_limit_nmp = limit;
271  return;
272 }
273 
274 void CMotBase::getParameterOrLimit(int subcommand, byte* R1, byte* R2, byte* R3) {
275  // illegal subcommand
276  if ((subcommand > 255) || (subcommand < 240)) {
277  *R1 = 0;
278  *R2 = 0;
279  *R3 = 0;
280  return;
281  }
282  byte p[32]; //packet
283  byte buf[256]; //readbuf
284  byte sz = 0; //readbuf size
285  p[0] = 'S';
286  p[1] = gnl.SID;
287  p[2] = (byte) subcommand;
288  p[3] = 0;
289  p[4] = 0;
290  p[5] = 0;
291  protocol->comm(p,buf,&sz);
292  *R1 = buf[3];
293  *R2 = buf[4];
294  *R3 = buf[5];
295 
296  return;
297 }
298 
299 void CMotBase::sendSpline(short targetPosition, short duration, short p1, short p2, short p3, short p4) {
300  std::vector<byte> sendBuf(14), recvBuf(2, 0);
301  byte readBytes = 0;
302 
303  sendBuf[0] = 'G';
304  sendBuf[1] = gnl.SID;
305  sendBuf[2] = static_cast<byte>(targetPosition >> 8);
306  sendBuf[3] = static_cast<byte>(targetPosition);
307  sendBuf[4] = static_cast<byte>(duration >> 8);
308  sendBuf[5] = static_cast<byte>(duration);
309 
310  sendBuf[6] = static_cast<byte>(p1 >> 8);
311  sendBuf[7] = static_cast<byte>(p1);
312  sendBuf[8] = static_cast<byte>(p2 >> 8);
313  sendBuf[9] = static_cast<byte>(p2);
314  sendBuf[10] = static_cast<byte>(p3 >> 8);
315  sendBuf[11] = static_cast<byte>(p3);
316  sendBuf[12] = static_cast<byte>(p4 >> 8);
317  sendBuf[13] = static_cast<byte>(p4);
318 
319  protocol->comm(&sendBuf.front(), &recvBuf.front(), &readBytes);
320 }
321 
322 
323 void
324 CMotBase::setInitialParameters(double angleOffset, double angleRange, int encodersPerCycle, int encoderOffset, int rotationDirection) {
325 
326  _initialParameters.angleOffset = angleOffset;
327  _initialParameters.angleRange = angleRange;
328  _initialParameters.encoderOffset = encoderOffset;
329  _initialParameters.encodersPerCycle = encodersPerCycle;
330  _initialParameters.rotationDirection = rotationDirection;
331 
332  _initialParameters.angleStop = angleOffset + angleRange;
333 
334  int encoderStop = encoderOffset - rotationDirection*static_cast<int>(encodersPerCycle*(angleRange/(2.0*M_PI)));
335 
336  _encoderLimits.enc_minpos = (encoderOffset > encoderStop) ? encoderStop : encoderOffset;
337  _encoderLimits.enc_maxpos = (encoderOffset < encoderStop) ? encoderStop : encoderOffset;
338  _encoderLimits.enc_per_cycle = encodersPerCycle;
340 }
341 
342 void
343 CMotBase::setCalibrationParameters(bool doCalibration, short order, TSearchDir direction, TMotCmdFlg motorFlagAfter, int encoderPositionAfter) {
344  _calibrationParameters.enable = doCalibration;
346  _calibrationParameters.dir = direction;
347  _calibrationParameters.mcf = motorFlagAfter;
348  _calibrationParameters.encoderPositionAfter = encoderPositionAfter;
350 }
351 
352 void
353 CMotBase::setCalibrated(bool calibrated) {
355 }
356 
357 void
358 CMotBase::setTolerance(int tolerance) {
359  _encoderLimits.enc_tolerance = tolerance;
360 }
361 
363  return (angle >= _initialParameters.angleOffset) && (angle <= _initialParameters.angleStop);
364 }
365 bool CMotBase::checkEncoderInRange(int encoder) {
366  return (encoder >= _encoderLimits.enc_minpos) && (encoder <= _encoderLimits.enc_maxpos);
367 }
368 
369 
370 void CMotBase::inc(int dif, bool wait, int tolerance, long timeout) {
371  recvPVP();
372  mov( GetPVP()->pos + dif, wait, tolerance, timeout);
373 }
374 
375 void CMotBase::dec(int dif, bool wait, int tolerance, long timeout) {
376  recvPVP();
377  mov(GetPVP()->pos - dif, wait, tolerance, timeout);
378 }
379 
380 void CMotBase::mov(int tar, bool wait, int tolerance, long timeout) {
381 
382  if (!checkEncoderInRange(tar))
383  throw MotorOutOfRangeException();
384 
385  tps.mcfTPS = MCF_ON;
386  tps.tarpos = tar;
387 
388  sendTPS(&tps);
389 
390  if (wait)
391  waitForMotor(tar,tolerance,0,timeout);
392  else
393  return;
394 }
395 
396 void CMotBase::waitForMotor(int target, int encTolerance, short mode,
397  int waitTimeout) {
398  const long POLLFREQUENCY = 200;
399  KNI::Timer t(waitTimeout), poll_t(POLLFREQUENCY);
400  t.Start();
401  while (true) {
402  if (t.Elapsed())
403  throw MotorTimeoutException();
404  poll_t.Start();
405  recvPVP();
406  if (GetPVP()->msf == 40)
407  throw MotorCrashException();
408  switch(mode)
409  {
410  case 0:
411  if (std::abs(target - GetPVP()->pos) < encTolerance)
412  return; // position reached
413  break;
414  case 1:
415  if (GetPVP()->msf == MSF_DESPOS)
416  return; // non-linear movement reached
417  break;
418  case 2:
419  if (GetPVP()->msf == MSF_NLINMOV)
420  return; // linear movement reached
421  break;
422  }
423  poll_t.WaitUntilElapsed();
424  }
425 }
426 
427 void CMotBase::incDegrees(double dif, bool wait, int tolerance, long timeout) {
428  int dir;
429  _initialParameters.rotationDirection == DIR_NEGATIVE ? dir = 1 : dir = -1;
430  int enc = (int) (dif / 360 * dir * (double) _initialParameters.encodersPerCycle);
431  inc(enc, wait, tolerance, timeout);
432 }
433 
434 void CMotBase::decDegrees(double dif, bool wait, int tolerance, long timeout) {
435  int dir;
436  _initialParameters.rotationDirection == DIR_NEGATIVE ? dir = 1 : dir = -1;
437  int enc = (int) (dif / 360 * dir * (double) _initialParameters.encodersPerCycle);
438  dec(enc, wait, tolerance, timeout);
439 }
440 
441 void CMotBase::movDegrees(double tar, bool wait, int tolerance, long timeout) {
443  mov(enc, wait, tolerance, timeout);
444 }
short actpos
actual position
Definition: kmlMotBase.h:98
int acceleration
_encT rad2enc(_angleT const &angle, _angleT const &angleOffset, _encT const &epc, _encT const &encOffset, _encT const &rotDir)
TMotCmdFlg mcf
motor flag after calibration
Definition: kmlMotBase.h:187
unsigned char byte
type specification (8 bit)
Definition: cdlBase.h:29
void setTolerance(int tolerance)
Definition: kmlMotBase.cpp:358
TMotTPS tps
target position
Definition: kmlMotBase.h:228
int encoderPositionAfter
Definition: kmlMotBase.h:189
bool checkEncoderInRange(int encoder)
Definition: kmlMotBase.cpp:365
byte maxppwm
max. val for pos. voltage
Definition: kmlMotBase.h:114
void setControllerParameters(byte kSpeed, byte kPos, byte kI)
Set the controller parameters.
Definition: kmlMotBase.cpp:186
void setCalibrated(bool calibrated)
Definition: kmlMotBase.cpp:353
TMotPVP pvp
reading motor parameters
Definition: kmlMotBase.h:231
TMotInit _initialParameters
Definition: kmlMotBase.h:235
void setPwmLimits(byte maxppwm, byte maxnpwm)
Set the PWM limits (for the drive controller)
Definition: kmlMotBase.cpp:165
CCplBase * protocol
protocol interface
Definition: kmlMotBase.h:262
Abstract base class for protocol definiton.
Definition: cplBase.h:47
const int POLLFREQUENCY
Polling position every POLLFREQUENCY milliseconds.
Definition: kmlExt.cpp:36
TMotGNL gnl
motor generals
Definition: kmlMotBase.h:226
bool enable
enable/disable
Definition: kmlMotBase.h:183
int enc_per_cycle
number of encoder units needed to complete 360 degrees;
Definition: kmlMotBase.h:175
void sendTPS(const TMotTPS *_tps)
send data
Definition: kmlMotBase.cpp:73
void inc(int dif, bool wait=false, int tolerance=100, long timeout=TM_ENDLESS)
Increments the motor specified by an index postion in encoder units.
Definition: kmlMotBase.cpp:370
const TMotPVP * GetPVP()
Definition: kmlMotBase.h:246
int encoderOffset
Definition: kmlMotBase.h:200
void sendSpline(short targetPosition, short duration, short p1, short p2, short p3, short p4)
Definition: kmlMotBase.cpp:299
int encodersPerCycle
Definition: kmlMotBase.h:201
non-linear movement ended, new: poly move finished
Definition: kmlMotBase.h:65
void recvPVP()
receive data
Definition: kmlMotBase.cpp:90
Base Katana class.
Definition: kmlBase.h:132
void decDegrees(double dif, bool wait=false, int tolerance=100, long timeout=TM_ENDLESS)
Decrements the motor specified by an index postion in degrees.
Definition: kmlMotBase.cpp:434
[TPS] target position
Definition: kmlMotBase.h:103
CKatBase * own
parent robot
Definition: kmlMotBase.h:80
void setAccelerationLimit(short acceleration)
Set the acceleration limits.
Definition: kmlMotBase.cpp:149
byte maxppwm_nmp
Max. value for positive voltage (0 => 0%, +70 => 100%)
Definition: kmlMotBase.h:127
byte revision
firmware revision number
Definition: kmlMotBase.h:89
[APS] actual position
Definition: kmlMotBase.h:96
TSearchDir
Definition: kmlMotBase.h:69
TMotStsFlg
status flags
Definition: kmlMotBase.h:58
short maxnspeed
max. allowed reverse speed; pos!
Definition: kmlMotBase.h:146
void setCalibrationParameters(bool doCalibration, short order, TSearchDir direction, TMotCmdFlg motorFlagAfter, int encoderPositionAfter)
Definition: kmlMotBase.cpp:343
void getParameterOrLimit(int subcommand, byte *R1, byte *R2, byte *R3)
Definition: kmlMotBase.cpp:274
byte maxnpwm
max. val for neg. voltage; pos!
Definition: kmlMotBase.h:115
int crash_limit_lin_nmp
Limit of error in position in linear movement.
Definition: kmlMotBase.h:133
TMotSFW sfw
slave firmware
Definition: kmlMotBase.h:232
void WaitUntilElapsed() const
Definition: Timer.cpp:78
bool isCalibrated
Definition: kmlMotBase.h:190
double angleStop
Definition: kmlMotBase.h:207
virtual void comm(const byte *pack, byte *buf, byte *size)=0
Base communication function.
byte subtype
slave subtype
Definition: kmlMotBase.h:91
TMotAPS aps
actual position
Definition: kmlMotBase.h:227
void setPositionCollisionLimit(int limit)
Set the collision limit.
Definition: kmlMotBase.cpp:259
TMotCLB _calibrationParameters
calibration structure
Definition: kmlMotBase.h:233
void mov(int tar, bool wait=false, int tolerance=100, long timeout=TM_ENDLESS)
Moves the motor specified by an index to a given target position in encoder units.
Definition: kmlMotBase.cpp:380
byte kI_nmp
Integral factor (1/kI) of control output added to the final control output.
Definition: kmlMotBase.h:131
byte SID
slave ID
Definition: kmlMotBase.h:81
int rotationDirection
Definition: kmlMotBase.h:204
short maxpspeed
max. allowed forward speed
Definition: kmlMotBase.h:145
void incDegrees(double dif, bool wait=false, int tolerance=100, long timeout=TM_ENDLESS)
Increments the motor specified by an index postion in degrees.
Definition: kmlMotBase.cpp:427
void sendAPS(const TMotAPS *_aps)
send data
Definition: kmlMotBase.cpp:53
double angleRange
Definition: kmlMotBase.h:203
void setCrashLimitLinear(int limit_lin)
Set the crash limit linear.
Definition: kmlMotBase.cpp:224
bool checkAngleInRange(double angle)
check limits in encoder values
Definition: kmlMotBase.cpp:362
short tarpos
target position
Definition: kmlMotBase.h:105
void setCrashLimit(int limit)
Set the crash limit.
Definition: kmlMotBase.cpp:206
TMotDYL dyl
dynamic limits
Definition: kmlMotBase.h:230
byte slvID
slave number
Definition: kmlMotBase.h:35
void Start()
Definition: Timer.cpp:51
int enc[10]
double angleOffset
Definition: kmlMotBase.h:202
short pos
position
Definition: kmlMotBase.h:164
FloatVector * angle
int enc_minpos
motor&#39;s minimum position in encoder values
Definition: kmlMotBase.h:173
int crash_limit_nmp
Limit of error in position.
Definition: kmlMotBase.h:132
TMotSCP scp
static controller parameters
Definition: kmlMotBase.h:229
bool init(CKatBase *_own, const TMotDesc _motDesc, CCplBase *protocol)
Definition: kmlMotBase.cpp:20
short order
order in which this motor will be calibrated. range: 0..5
Definition: kmlMotBase.h:184
void setInitialParameters(double angleOffset, double angleRange, int encodersPerCycle, int encoderOffset, int rotationDirection)
Definition: kmlMotBase.cpp:324
int enc_maxpos
motor&#39;s maximum position in encoder values
Definition: kmlMotBase.h:174
void resetBlocked()
unblock the motor.
Definition: kmlMotBase.cpp:35
TSearchDir dir
search direction for mech. stopper
Definition: kmlMotBase.h:186
byte kP_speed
Proportional factor of the speed compensator.
Definition: kmlMotBase.h:121
void dec(int dif, bool wait=false, int tolerance=100, long timeout=TM_ENDLESS)
Decrements the motor specified by an index postion in encoder units.
Definition: kmlMotBase.cpp:375
TMotStsFlg msf
motor status flag
Definition: kmlMotBase.h:163
set the motor on
Definition: kmlMotBase.h:52
motor description (partly)
Definition: kmlMotBase.h:34
short vel
velocity
Definition: kmlMotBase.h:165
TMotCmdFlg mcfAPS
motor command flag
Definition: kmlMotBase.h:97
byte type
controller type
Definition: kmlMotBase.h:90
byte maxaccel_nmp
Maximal acceleration and deceleration.
Definition: kmlMotBase.h:154
byte maxaccel
max acceleration
Definition: kmlMotBase.h:142
TMotCmdFlg
command flags
Definition: kmlMotBase.h:48
byte subversion
firmware subversion number
Definition: kmlMotBase.h:88
freeze the motor
Definition: kmlMotBase.h:51
byte maxnpwm_nmp
Max. value for negative voltage (0 => 0%, +70 => 100%)
Definition: kmlMotBase.h:128
void waitForMotor(int tar, int encTolerance=100, short mode=0, int waitTimeout=TM_ENDLESS)
Waits until the Motor has reached the given targen position.
Definition: kmlMotBase.cpp:396
void recvSFW()
receive data
Definition: kmlMotBase.cpp:109
int enc_range
motor&#39;s range in encoder values
Definition: kmlMotBase.h:172
TMotCmdFlg mcfTPS
motor command flag
Definition: kmlMotBase.h:104
byte pwm
pulse with modulation
Definition: kmlMotBase.h:166
byte kP
prop. factor of pos comp
Definition: kmlMotBase.h:116
short maxpspeed_nmp
Max. allowed forward speed.
Definition: kmlMotBase.h:155
int enc_tolerance
encoder units of tolerance to accept that a position has been reached
Definition: kmlMotBase.h:176
void setSpeedCollisionLimit(int limit)
Set the collision limit.
Definition: kmlMotBase.cpp:243
byte version
firmware version number
Definition: kmlMotBase.h:87
byte kpos_nmp
Proportional factor of position compensator.
Definition: kmlMotBase.h:130
in desired position, new: fixed, state holding
Definition: kmlMotBase.h:62
short maxnspeed_nmp
Max. allowed reverse speed.
Definition: kmlMotBase.h:156
TMotENL _encoderLimits
motor limits in encoder values
Definition: kmlMotBase.h:234
void setSpeedLimits(short positiveVelocity, short negativeVelocity)
Set speed limits.
Definition: kmlMotBase.cpp:130
byte kspeed_nmp
Proportional factor of speed compensator.
Definition: kmlMotBase.h:129
void movDegrees(double tar, bool wait=false, int tolerance=100, long timeout=TM_ENDLESS)
Moves the motor specified by an index to a given target position in degrees.
Definition: kmlMotBase.cpp:441


kni
Author(s): Martin Günther
autogenerated on Fri Jan 3 2020 04:01:16