IF_MoveSyncFromStandstill - CalculatePositionForRestartCurveCompensation (Method)

Overview

Type:

Method

Available as of:

V1.2.5.0

Task

Calculating the restart position of a carrier for restarting a synchronized movement with curve compensation.

Description

The movement of a carrier with the move commands StartSyncToCarrierInFront (for a synchronized movement) and StartCurveCompensationToCarrierInFront (for additional curve compensation) is executed on two channels:
  • Channel A: movement of the master carrier to which the selected carrier is synchronized

  • Channel B: additional movement for curve compensation

For more information on the use of channels, refer to Move Commands and Channels.

The following situations require the calculation of the restart position:
  • In case of a stop or an emergency stop of the machine through the application or in case of a Sercos reboot, the motion values on channel B are transferred to channel A (see general information on channel bundling).

    For a visual illustration, refer to the curve compensation stop video sequence.

  • The carrier is moved out of its initial position after a stop.
    Initial Position
    Smaller distance
    Larger distance

Restart procedure

For restarting a stopped synchronized movement with curve compensation, proceed as follows:

Step

Action

Comment

1

Call the method CalculatePositionForRestartCurveCompensation to determine the restart position.
The input parameter i_lrDistanceBothCarrierOnStraight corresponds to the distance of the carriers defined on a straight part of the track. The value can be read from the parameter lrDistanceToMasterAtStartSync (see feedback interface IF_CarrierFeedbackMoveSyncFromStandstillParameter) or it is known from the application:

The output parameter q_lrRestartPosition indicates the calculated position required for a restart of the carrier when executing the method StartCurveCompensationToCarrierInFront.

The output parameter q_lrDistanceToRestart indicates the positive or negative distance of the carrier to the restart position:

2

Execute a move command, for example the move command MoveGapControl, to move the carrier to the restart position.

-

3

Wait until the carrier is in restart position.

-

4

Call the method StartSyncToCarrierInFront.

-

5

Call the method StartCurveCompensationToCarrierInFront to split the position of the carrier to channel A and B.

Result: The selected carrier is ready to follow the master carrier.

Inputs

Input

Data type

Description

i_lrDistanceBothCarrierOnStraight

LREAL

Indicates the distance from the reference position of the carrier on channel A to the reference position of the master at the start of the synchronization.
NOTE: The superimposed parts of the movement on channel B are not considered for the distance.
NOTE: The value can be read, for example, from the parameter lrDistanceToMasterAtStartSync (see feedback interface IF_CarrierFeedbackMoveSyncFromStandstillParameter).

Outputs

Output

Data type

Description

q_lrRestartPosition

LREAL

Indicates the calculated position required for a restart of the carrier when executing the method StartCurveCompensationToCarrierInFront.

q_lrDistanceToRestartPosition

LREAL

Indicates the distance of the carrier to the restart position. If the carrier is in front of the restart position, the value of this parameter is positive. If the carrier is behind the restart position, the value of this parameter is negative.

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.