This function is used to realize tracking of a SLAVE axis against a MASTER axis. The function performs jerked movements computed with a pentic curve, cam of the position of the master axis.
Premise
Tracking can be single or cyclically repeated in fixed cycle or variable cycle.
The master could be a controlled physical axis, but also a simple external reference (e.g., a line encoder) or even a virtual quota constructed and evolved by the application software.
In any case, during the execution of the function, the master must always evolve in the same direction.
The slave could be a controlled physical axis, but also a simple unit constructed and evolved by the application software. It could be a linear axis of limited excursion or a cyclic axis (e.g., rotary).
Types of the follow2 function
The syntax of follow2 varies according to:
•MASTER and SLAVE both not associated with an axis -> mv_follow2()
•MASTER not associated with an axis, SLAVE associated with an axis -> mva_follow2()
•MASTER and SLAVE both associated with an axis (typical case) -> mva_follow2_m()
Syntax |
i32 mva_follow2_m (stru_follow2_sm stru1 [, real period=0 [, stru_follow2info stru2=NULL]) |
||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
stru1 |
Structure of type stru_follow2_sm containing movement-related parameters |
||||||||||||||||||
period |
Time interval between two consecutive executions of this function. (optional, default 0) If 0 is assumed to be equal to SI |
||||||||||||||||||
stru2 |
Structure of type stru_follow2info where to save ancillary (out) data. (optional, default NULL) |
||||||||||||||||||
Result |
Variable containing information about the status of the function (see returns codes).
|
||||||||||||||||||
Validity |
Rule |
||||||||||||||||||
Note |
The configuration of the function is done through the auxiliary data structure |