MC_Stop_BkPlcMc (from V3.0)

MC_Stop_BkPlcMc (from V3.0) 1:

The function block cancels a current axis motion and monitors the stop operation.

MC_Stop_BkPlcMc (from V3.0) 2:

The stop operation initiated by this function block cannot be interrupted by other function blocks. A function block MC_Halt_BkPlcMc should be used to enable an axis restart during a stop operation.

MC_Stop_BkPlcMc (from V3.0) 3: Inputs

VAR_INPUT
    Execute:        BOOL;
    Deceleration:   LREAL;  (ab/from V3.0.5)
    Jerk:           LREAL;  (ab/from V3.0.5)
    RampTime:       LREAL;  (ab/from V3.0.5)
    BufferMode:     MC_BufferMode_BkPlcMc:=Aborting_BkPlcMc;    (ab/from V3.0.8)
END_VAR

Name

Type

Description

Execute

BOOL

A rising edge at this input ends a movement being carried out by the axis.

Deceleration

LREAL

[mm/s2] The deceleration to be applied.

Jerk

LREAL

[mm/s3] The jerk to be applied.

RampTime

LREAL

[s] The required stopping time.

BufferMode

MC_BufferMode_BkPlcMc

reserved. This input is provided in preparation for a future build. It should currently either not be assigned or assigned the constant Aborting_BkPlcMc. (from V3.0.8)

MC_Stop_BkPlcMc (from V3.0) 4: 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_Stop_BkPlcMc (from V3.0) 5: Outputs

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

Name

Type

Description

Busy

BOOL

Indicates that a command is being processed.

Done

BOOL

This indicates successful processing of the operation.

Error

BOOL

The occurrence of an error is indicated here.

ErrorID

UDINT

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

Active

BOOL

Indicates that a command is being processed.

CommandAborted

BOOL

Indicates that processing of this command was aborted by another command.

Behavior of the function block

On a rising edge at Execute the function block checks the transferred axis interface. A number of problems can be detected and reported during this process:

The Stop operation begins if these checks can be carried out without problems. Deceleration is used, if this parameter is recognizably greater than 0. Otherwise RampTime is used to calculate a deceleration, taking into account the reference velocity. If a jerk-limiting control value generator is selected, Jerk is used if this parameter is recognizably greater than 0. If none of the mentioned parameters is recognizably greater than 0, the axis parameter MaxDec and MaxJerk are used.

The next reachable position is determined and used as new target position, taken into account the current set velocity and the currently valid parameters. Once this position has been reached, the axis assumes its regular behavior in idle state.

MC_Stop_BkPlcMc (from V3.0) 6:

The RampTime specifies the time during which the axis is to be decelerated from its reference speed to standstill. If the axis moves with a different velocity, the braking time reduces accordingly. If control value generators with creep mode are used, the corresponding time is added to the braking time.

If the motion algorithm reports an error code while the movement is being executed, the system responds with Error and ErrorID:=the motion algorithm's error code. If the complete processing is prevented by the activity of another function block, the system responds with CommandAborted. Successful completion of the operation is reported with Done.

A falling edge at Execute clears all the pending output signals. If Execute is set to FALSE while the operation is still active, the initiated stop continues unaffected. The signals provided at the end of the movement (Error, ErrorID, Done) are made available for one cycle.

MC_Stop_BkPlcMc (from V3.0) 7:

The output Active is currently identical to the output Busy.