SMC_SetSoftwareLimits (FB)

 

FUNCTION_BLOCK SMC_SetSoftwareLimits

Sets the position limits and the corresponding error reaction of an axis. If the axis is used in the context of coordinated motion, the corre­sponding axis group has to be reenabled in order to take into account the new limits for coordinated motion computations.

Note

The effective error deceleration is the maximum of the configured maximum deceleration of the axis, the value of SWL_Er­ror_Deceleration, and the value derived from SWL_Error_­MaxDistance and the current velocity. (SWL_Error_MaxDistance is only taken into account if the value is positive.)

InOut:

Scope

Name

Type

Comment

Inout

Axis

AXIS_REF_SM3

Axis to change

Input

bExecute

BOOL

Rising edge: Rising edge: Starts the execution of the function block. Applies the Changes.

SWL_Activated

BOOL

TRUE: Activates the position limits.

SWL_Positive

LREAL

The positive limit switch ([u])

SWL_Negative

LREAL

The negative limit switch ([u])

SWL_Error_Decelerate

BOOL

Deprecated, the axis decelerates always if a deceleration is configured (`SWL_Error_Deceleration, SWL_Error_MaxDistance) or in the maximum deceleration (see SMC_ChangeDynamicLimits.fMaxDeceleration or drive configuration).

SWL_Error_Deceleration

LREAL

The (positive) deceleration in [u/s²]

SWL_Error_MaxDistance

LREAL

The maximum braking distance in [u], only applied if positive.

Output

bDone

BOOL

TRUE: Success

bError

BOOL

TRUE: Error has occured within the function block.

ErrorID

SMC_ERROR

Error identification.