SMC_GroupSetAxisLimitFactors (FB)

FUNCTION_BLOCK SMC_GroupSetAxisLimitFactors

This function block sets limit factors for the maximum velocity, acceleration, and jerk of each axis. The limits are effective only for movements commanded after this function block returns done.

Calling this function block does not cause any movement and does not influence the ongoing motion of the axis group.

The factors for all axes currently configured in the axis group need to be provided. Each individual factor needs to be positive and not greater than 1.

Initially, all factors are 1. The factors are not reset when the axis group is disabled or enabled. If an axis is removed from the group, the limit factors for this axis are reset. If the axis is added again, later, then the limit factors are 1.

The axis group must not be in state GroupDisabled or GroupErrorStop when this FB receives the rising edge on execute.

The factors can be read with SMC_GroupReadAxisLimitFactors.

The factors are used in combination with the ancillary limits, the global limits, the factors given at the movement function blocks, and the override as follows:

  • G: the global axis limits stored in the axis configuration,

  • M: the factors given at the movement function blocks (inputs VelFactor, AccFactor, …),

  • F: the factors set with this function block,

  • O: the current override factors, and

  • A: the ancillary axis limits set with SMC_GroupSetAncillaryAxisLimits.

The effective axis limits L are computed from these inputs as L = O * min(A, M * F * G).

InOut:

Scope

Name

Type

Initial

Comment

Inout

AxisGroup

AXIS_GROUP_REF_SM3

Reference to an axis group

Input

Execute

BOOL

Sets the factors on rising edge.

VelFactors

ARRAY [0..(SMC_RCNST.MAX_AXES - 1)] OF LREAL

The velocity factors for all axes

AccFactors

ARRAY [0..(SMC_RCNST.MAX_AXES - 1)] OF LREAL

The acceleration factors for all axes

JerkFactors

ARRAY [0..(SMC_RCNST.MAX_AXES - 1)] OF LREAL

The jerk factors for all axes

TorqueFactors

ARRAY [0..(SMC_RCNST.MAX_AXES - 1)] OF LREAL

[SMC_RCNST.MAX_AXES(1)]

The torque factors for all axes. A dynamic model must have been set using SMC_GroupSetDynamics for these factors to have an effect.

Output

Done

BOOL

The limits have been set successfully.

Busy

BOOL

The FB is not finished.

Error

BOOL

Signals that an error has occurred within the function block.

ErrorID

SMC_ERROR

Error identification