Please enable JavaScript to view this site.

This function is used to perform tracking of a SLAVE against a MASTER, with the master not associated with an 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 (stru_follow2_s stru1 [, real period=0 [, stru_follow2info stru2=NULL])

stru1

Structure of type stru_follow2_s containing parameters related to movement

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 auxiliary data (out). (optional, default NULL)

Result

Variable containing information about the status of the function (see returns codes).

Value

Description

2 [M_POSITIONING]

Initial positioning requested by setting the relative bits of the command parameter

3 [M_WAITING]

The slave axis is waiting to start

4 [M_WAITING_NEXT_CYCLE]

No conditions to start, waiting for the next appointment

5 [M_FOLLOWING]

The slave axis has started tracking the master

8 [M_SYNCHRONIZED]

The slave axis has tracked and is synchronized to the master

17 [M_DECEL]

The slave axis has finished the synchronization phase and is decelerating

7 [M_HOMING]

The slave axis is returning to the parking point

-6 [M_IN_ALARM]

The function is in alarm, see errorCode

Validity

Rule

Note

The configuration of the function is done through the auxiliary data structure

 

  

Keyboard Navigation

F7 for caret browsing
Hold ALT and press letter

This Info: ALT+q
Page Header: ALT+h
Topic Header: ALT+t
Topic Body: ALT+b
Contents: ALT+c
Search: ALT+s
Exit Menu/Up: ESC