Function that brings the specified axis to the predetermined position value with a trapezoidal velocity-time profile.
NOTE: It is analogous to the mv_to() function of the same name with parameterization by structure.
Syntax |
real mv_to (i32 result, i32 nAx, real pDes, real sDes, real aDes [, real dDes=-aDes] [, real sovraDec=0]) |
||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
result |
Variable containing information about the status of the function (see returns codes).
|
||||||||||||||||
nAx |
Number of the axis to be moved (1-32) |
||||||||||||||||
pDes |
Target position |
||||||||||||||||
sDes |
Speed |
||||||||||||||||
aDes |
Acceleration |
||||||||||||||||
dDes |
Deceleration. (optional, default -aDes) |
||||||||||||||||
sovraDec |
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: dDes +(overDec / 100) * dDes. (e.g. if dDes = 120 and overDec = 25 the deceleration will result 150) |
||||||||||||||||
Result |
Updated value returned by the function |
||||||||||||||||
Validity |
Rule |
||||||||||||||||
Note |
overDec can be useful in the case of stop target calculation, on variation of a digital input (e.g., photocell). If CAM alarm enabled the mission is limited to end of strokes. The FR is not honored |
Example of use:
For a concrete example see in the RDE environment: Workspace -> Specials -> Examples Library. |