MC_AxCtrlSlowDownOnPressureEx_BkPlcMc

MC_AxCtrlSlowDownOnPressureEx_BkPlcMc 1:

The function block brakes an axis in such a way that the actual value in Actual does not exceed the setpoint specified in Setpoint.

In most cases, the actual pressure or actual force can be measured with function blocks of the type MC_AxRtReadPressureSingle_BkPlcMc or MC_AxRtReadPressureDiff_BkPlcMc or MC_AxRtReadForceSingle_BkPlcMc or MC_AxRtReadForceDiff_BkPlcMc.

MC_AxCtrlSlowDownOnPressureEx_BkPlcMc 2: Inputs

VAR_INPUT
    Enable:           BOOL:=FALSE;
    EnableRelief:     BOOL:=FALSE;
    Setpoint:         LREAL;
    Actual:           LREAL;
    FeedVelocity:     LREAL:=0.0;
    pParam:           POINTER TO ST_TcPctrlParam:=0;
END_VAR

Name

Type

Description

Enable

BOOL

A TRUE at this input enables the controller.

EnableRelief

BOOL

A TRUE at this input allows the controller to actively back off if necessary.

Setpoint

LREAL

The setpoint for the actual value to be limited.

Actual

LREAL

The current value of the variable to be limited.

FeedVelocity

LREAL

If the object against which the pressure or force is applied is moving, its velocity can be pre-controlled here.

pParam

POINTER TO ST_TcPctrlParam

The address of a structure of the type ST_TcPctrlParam can be transferred here. If this input is unused or if 0 is applied to it, the control parameters from the parameters of the axis are used.

MC_AxCtrlSlowDownOnPressureEx_BkPlcMc 3: Inputs/outputs

VAR_INOUT
    Axis:             Axis_Ref_BkPlcMc;
END_VAR

Name

Type

Description

Axis

Axis_Ref_BkPlcMc

Here, the address of a variable of type Axis_Ref_BkPlcMc should be transferred.

MC_AxCtrlSlowDownOnPressureEx_BkPlcMc 4: Outputs

VAR_OUTPUT
    Busy:             BOOL;
    Active:           BOOL;
    Error:            BOOL;
    ErrorID:          UDINT;
END_VAR

Name

Type

Description

Busy

BOOL

A TRUE at this output indicates that the function block is enabled. This does not necessarily mean that it is actively intervening in the behavior of the axis.

Active

BOOL

A TRUE at this output indicates that the function block is enabled and is actively intervening in the behavior of the axis.

Error

BOOL

The occurrence of an error is indicated here.

ErrorID

UDINT

An encoded indication of the cause of the error is provided here.

Behavior of the function block

The function block is placed in an idling state by a FALSE at Enable or if the axis is not enabled by the controller. Busy, Active and Error are then FALSE.

If Enable is TRUE, a series of prerequisites is checked.

If one of these prerequisites is not satisfied, then Busy and Active are FALSE and Error is TRUE. Otherwise Busy is TRUE.

The sign of Setpoint determines the working direction of the function block. If it is positive, it intervenes when Actual approaches the setpoint from below in an ascending direction. Active is only TRUE if the function block intervenes.

The function block determines the difference between the setpoint and the actual value, taking into account the working direction, and calculates the still permissible velocity with the kP from the parameter structure used. If the target velocity exceeds this value, Active goes TRUE and the velocity is limited.

When the actual value reaches the setpoint, the still permissible velocity = 0.0 and the axis should come to a standstill now at the latest. If the actual value continues to increase, an opposite movement is only triggered with EnableRelief.

In some applications, a force or pressure must be exerted against a moving object. In this case, the control accuracy can be improved by providing the controller with a suitable pre-control at FeedVelocity.

Integration of the function block in the application

A function block of this type must be called after the actual value and actual pressure acquisition, and after the control value generation. If function blocks are called for velocity or position control, they must also be placed in front of the pressure controller function block. The MC_AxRtFinish_BkPlcMc function block to be positioned after the controller function block then considers the response automatically.