Function that brings the controlled unit from the current speed (corresponding to the first function call) to the desired speed, controlling acceleration with the specified jerk.
Variation of the desired units (target position, steady state speed, acceleration and jerk) is possible at any time.
The function ends its work when it stops at the specified target position.
NOTE: It is analogous to the mv_to_cj() function, but this one only allows you to start with an initial velocity of 0.
Syntax |
i32 mv_to_cjv (stru_mvtocjv|stru_mvtocjve stru [, i32 holdFlag=0] [, real fr=1]) |
||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
stru |
Variable of type stru_mvtocjv or stru_mvtocjve containing the parameters of the function |
||||||||||||||||
holdFlag |
Flag to command the hold state to the mission. (optional, default 0) |
||||||||||||||||
fr |
Velocity reduction value (0-1). (optional, default 1) See fr |
||||||||||||||||
Result |
Returns the state of the function (see return codes):
|
||||||||||||||||
Validity |
Rule |
||||||||||||||||
Note |
You can increase the diagnostics in the report via the predefined variable sys_flag.10. In the stru_mvtocjve, in case of dSpeed=0, you have automatic writing of the stop position and its time required |
Example of use:
|