IF_MoveSyncFromStandstill - StartSyncToExternalMaster (Method)

Overview

Type:

Method

Available as of:

V1.0.0.0

Task

Synchronization of the selected carrier to an external master.

Description

The method StartSyncToExternalMaster allows a one-to-one synchronization of the carrier to an external master.

NOTE: When executing this move command, you override previous move commands.

In synchronized movements of a carrier connected to an external master or to a master carrier in front or behind, the movement of the selected carrier is controlled by the master.

 CAUTION
CARRIER Collision
Define the master movement in a way that avoids collisions with other carriers.
Failure to follow these instructions can result in injury or equipment damage.
NOTE: You can use the function block FB_CrashPrevention as an additional protection measure to help avoid collisions.

As a precondition for calling the method StartSyncToExternalMaster, the selected carrier must be in standstill. The external master can be in motion. The value of the parameter RefVelocity must be 0. For more information on the carrier object Lexium MC Carrier and the parameter RefVelocity within the user function MovementData, refer to the Lexium™ MC multi carrier Device Objects and Parameters Guide.

In a section of the master movement defined by the start parameter i_lrXStartPhasingToMaster and the end parameter i_lrXEndPhasingToMaster, the carrier is phasing (synchronizing) to the master movement.

The start cam is defined as follows: In the same time period, the carrier runs half of the distance that the master moves between i_lrXStartPhasingToMaster and i_lrXEndPhasingToMaster (see example).

If i_lrXStartPhasingToMaster = 0 and i_lrXEndPhasingToMaster = 0, no start cam is calculated.

After phasing, the carrier follows the external master with a one-to-one cam.

With the synchronized movement, the carrier follows the master one-to-one without considering the motion parameters specified in the method SetMotionParameter.

NOTE: If you use a C2C Encoder Input as a master, you can use the parameter C2CEncoderInput.ApplicationDelay to compensate for the delay between the master encoder (i.e. the carrier) and the C2C Encoder Output on the other controller. For carrier synchronization, an additional delay of one Sercos cycle occuring on the C2C Encoder Output side of the C2C network must be input via the parameter ApplicationDelay. The method IF_MoveSyncFromStandstill.StartSyncToExternalMaster() uses both delay parameters ApplicationDelay and DataDelay (the delay of the C2C network itself) to compensate for all delays.
For more information, refer to the description of the Synchronized Carrier Movement via C2C in the Lexium™ MC multi carrier Device Objects and Parameters Guide .
For additional information, refer also to the description of the function FC_SetMasterEncoder() in the SystemInterface library and to the description of the C2C Encoder Input delay parameters in the LMC Pro Device Objects and Parameters Guide.

Example

If i_lrXStartPhasingToMaster = 100 and i_lrXEndPhasingToMaster = 300, the master moves 200 mm while the selected carrier (connected carrier) moves 100 mm during phasing up.

Start cam example
Code example
Motion example

Feedbacks

Feedbacks are available in the interface IF_CarrierFeedbackMoveSyncFromStandstill.

Inputs

Input

Data type

Description

i_ifMaster

SystemConfigurationItf.IF_Master

Access to the interface of the external master.

For more information on the interface IF_Master, refer to the SystemConfigurationItf library.

i_etMasterSetposMode

SMG.ET_SetposMode

Access to the enumeration ET_SetposMode for the Setpos of the master position.

For more information on the enumeration ET_SetposMode, refer to the PD_SoMotionGenerator library

i_lrMasterSetposValue

LREAL

Value for the Setpos of the master position

i_lrXStartPhasingToMaster

LREAL

Position of the external master where the phasing (synchronization) of the carrier to the master movement starts.
NOTE: i_lrXStartPhasingToMaster < i_lrXEndPhasingToMaster

i_lrXEndPhasingToMaster

LREAL

Position of the external master where the phasing (synchronization) of the carrier to the master movement ends.
NOTE: i_lrXEndPhasingToMaster > i_lrXStartPhasingToMaster

i_xMasterPositiveDirection

BOOL

If i_xMasterPositiveDirection is set to TRUE, the external master is moving in positive direction.
If i_xMasterPositiveDirection is set to FALSE, the external master is moving in negative direction.

i_xInvertedMovementToMaster

BOOL

If i_xInvertedMovementToMaster is set to TRUE, the carrier moves in inverse direction of the master movement. If the master moves for example with positive velocity, the carrier moves with negative velocity.
If i_xInvertedMovementToMaster is set to FALSE, the carrier moves in the same direction as the master. If the master moves for example with positive velocity, the carrier also moves with positive velocity.

Outputs

Output

Data type

Description

q_xError

BOOL

Indicates TRUE if an error has been detected. For details, refer to q_etResult and q_sResultMsg.

q_etResult

ET_Result

Provides diagnostic and status information as a numeric value.
If q_xError = FALSE, q_etResult provides status information.
If q_xError = TRUE, q_etResult provides diagnostic/error information.

q_sResultMsg

STRING [255]

Provides additional diagnostic and status information as a text message.

Call Examples

Before executing the method StartSyncToExternalMaster, the method SetMotionParameter must be called at least once.

Example:

...ifMotion.SetMotionParameter(...)
...ifMoveSyncFromStandstill.StartSyncToExternalMaster(...)