FB_LinearTrackingVelOverrideScaling - EvaluateScaledVelOverride (Method)

Overview

Type:

Method

Available as of:

V1.7.3.0

This chapter provides information on:

Task

This method is used to evaluate a scaled velocity override value based on the state of the robot and the reachability of a target in a linear tracking system.

Description

This method evaluates a velocity override value to scale the velocity of a robot during its motion toward a target in a linear tracking system. The scaling is adjusted based on the reachability of the target, the time required by the robot to reach it and the velocity of the linear tracking system.

This method must be called during the motion requiring the scaling of the velocity override. The reason is that the velocity override value is continuously updated based on the system state, allowing, for example, to react to variations in the velocity of the tracking system.

NOTE:
  • Before calling this method, a successful call of the Configuration method must be performed. If the function block is properly configured, the property xConfigDone is set to TRUE.

  • The scaled velocity override value is returned by the method but not automatically applied to the robot.

  • Starting from the velocity override value, the algorithm can return a scaled velocity override in the range [0.0, i_lrMaxVelOverride].

  • The algorithm returns a scaled velocity override value of zero if the target is not reachable, like in the case of a tracking system reaching zero velocity while the target is not yet reachable.

  • The algorithm returns a velocity override value of i_lrMaxVelOverride as soon as the target becomes reachable.

  • ROB.IF_RobotConfigurationAdvanced.lrMinVelOverrideVariation can be used to reduce the CPU load required for recalculating the motion profile due to minor variations of the velocity override value.

  • A new value of IF_RobotMotion.lrVelOverride is only accepted if the last value is fully processed (typically 3 Sercos cycles), thus do not execute the method EvaluateScaledVelOverride more than 3 times the Sercos cycle time.

Interface

Input

Data type

Description

i_stTargetPosition

SE_MATH.ST_Vector3D

Target position to be reached in relation to the tracking coordinate system.

i_etTrackingCoordinateSystem

ROB.ET_CoordinateSystem

Specification of the coordinate system to be considered in the calculation. The positions i_stTargetPosition and i_lrTrackingContactPosition are referring to this coordinate system.

i_lrTrackingContactPosition

LREAL

Position along the tracking direction where the robot will reach the target.

i_lrMaxVelOverride

LREAL

Maximum velocity override that the robot is allowed to use for the motion.

Input

Data type

Description

q_xError

BOOL

TRUE: An error occurred during last command. For more information refer also to q_etResult and q_sResultMsg.

q_etResult

SERT.ET_Result

Provides diagnostic and status information.

If q_xError = FALSE, then q_etResult provides status information.

If q_xError = TRUE, then q_etResult provides diagnostic/error information.

The enumeration ET_Result contains the possible values of the POU operation results.

q_sResultMsg

STRING[255]

Provides additional information about the status of the POU.

Return Value

Data type

Description

LREAL

The method returns the scaled velocity override value.

Diagnostic Messages

q_xError

q_etResult

Enumeration value of q_etResult

Description

FALSE

Ok

0

Ok

FALSE

TargetAlreadyReachable

20

The selected target is already reachable.

FALSE

TargetNotReachable

21

The selected target is not reachable.

FALSE

RemainingTimeNotAvailable

30

The estimation of the robot motion remaining time is not available.

TRUE

NotConfigured

29

The function block is not configured.

TRUE

VelOverrideRange

24

The provided value for the velocity override is outside the valid range.

TRUE

CoordinateSystemInvalid

25

The provided coordinate system value is not valid.

CoordinateSystemInvalid

Enumeration name:

CoordinateSystemInvalid

Enumeration value:

25

Description:

The provided coordinate system value is not valid.

Issue

Cause

Solution

The evaluation of the velocity override value was not successful.

i_etTrackingCoordinateSystem contains an invalid value.

Ensure that i_etTrackingCoordinateSystem is in the range [ROB.ET_CoordinateSystem.Tracking1..ROB.ET_CoordianteSystem.Tracking30].

NotConfigured

Enumeration name:

NotConfigured

Enumeration value:

29

Description:

The function block is not configured.

Issue

Cause

Solution

The evaluation of the velocity override value was not successful.

The function block is not configured yet.

Ensure that the method Configuration was called successfully before calling this method.

OK

Enumeration name:

Ok

Enumeration value:

0

Description:

Ok

The method was called successfully.

RemainingTimeNotAvailable

Enumeration name:

RemainingTimeNotAvailable

Enumeration value:

30

Description:

The estimation of the robot motion remaining time is not available.

The velocity override value is returned, limited by the value of i_lrMaxVelOverride.

TargetAlreadyReachable

Enumeration name:

TargetAlreadyReachable

Enumeration value:

20

Description:

The selected target is already reachable.

The velocity override value has been set to i_lrMaxVelOverride.

TargetNotReachable

Enumeration name:

TargetNotReachable

Enumeration value:

21

Description:

The selected target is already reachable.

The velocity override value has been set to zero.

VelOverrideRange

Enumeration name:

VelOverrideRange

Enumeration value:

24

Description:

The provided value for the velocity override is outside the valid range.

Issue

Cause

Solution

The evaluation of the velocity override value was not successful.

The value of i_lrMaxVelOverride is less than 0.0 or greater than 100.0.

Ensure that 0.0 <= i_lrMaxVelOverride <= 100.0.