Function that brings the indicated unit to the set value with a trapezoidal velocity profile.
NOTE: It is analogous to the mv_to() function of the same name with inline parameterization.
Syntax |
real mv_to (i32 result, stru_mvto stru [, real overDec=0]) |
||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
return |
Variable containing information about the state of the function (see returns codes).
|
||||||||||||||
stru |
Structure of type stru_mvto containing parameters related to movement |
||||||||||||||
overDec |
Deceleration percentage to be applied in case the mission target is approached runtime when it is already decelerating. (optional, default 0) If negative, 0 is assumed. The resulting acceleration will be: dec +(overDec / 100) * dec. (e.g. if dec = 120 and overDec = 25 the deceleration will result 150) |
||||||||||||||
Result |
Updated value returned by the function |
||||||||||||||
Validity |
Rule |
||||||||||||||
Note |
overDec can be useful in case of calculation of stop target, on variation of digital input (e.g., photocell) |
Example of use:
|