MC_StepAbsoluteSwitchDetection_BkPlcMc

MC_StepAbsoluteSwitchDetection_BkPlcMc 1:

The function block is used for referencing via a limit switch. The function block outputs the position of the cam to the outside via RecordedPosition. No position is set.

MC_StepAbsoluteSwitchDetection_BkPlcMc 2: Inputs

VAR_INPUT
    Execute:              BOOL;
    Direction:            MC_Direction_BkPlcMc;
    SwitchMode:           MC_SwitchMode_BkPlcMc;
    ReferenceSignal:      MC_Ref_Signal_Ref_BkPlcMc;
    Velocity:             LREAL;
    Acceleration:         LREAL;
    Deceleration:         LREAL;
    Jerk:                 LREAL;
    SetPosition:          LREAL;
    TorqueLimit:          LREAL;
    TimeLimit:            TIME;
    DistanceLimit:        LREAL;
    BufferMode:           MC_BufferMode_BkPlcMc:=Aborting_BkPlcMc;
END_VAR

Name

Type

Description

Execute

BOOL

The homing is initiated by a rising edge at this input.

Direction

MC_Direction_BkPlcMc

The direction is specified via MC_Direction_BkPlcMc.

SwitchMode

MC_SwitchMode_BkPlcMc

The type of signal detection is specified via MC_SwitchMode_BkPlcMc.

ReferenceSignal

MC_Ref_Signal_Ref_BkPlcMc

The signal state of the cam is communicated via MC_Ref_Signal_Ref_BkPlcMc.

Velocity

LREAL

[mm/s] The required motion velocity in actual value units of the axis per second.

Acceleration

LREAL

[mm/s2] The required acceleration in actual value units of the axis per square second. If this parameter is 0.0, it is replaced by a default value from the axis parameters.

Deceleration

LREAL

[mm/s2] The required deceleration in actual value units of the axis per square second. If this parameter is 0.0, it is replaced by a default value from the axis parameters.

Jerk

LREAL

[mm/s3] The required jerk in actual value units of the axis per square second. If this parameter is 0.0, it is replaced by a default value from the axis parameters.

SetPosition

LREAL

Required position on the referencing cam.

TorqueLimit

LREAL

reserved

TimeLimit

TIME

After this time, the referencing is canceled with error. At zero, time monitoring is disabled.

DistanceLimit

LREAL

After this distance, the referencing will be aborted with an error. At zero, the distance monitoring is disabled.

BufferMode

MC_BufferMode_BkPlcMc

 

MC_StepAbsoluteSwitchDetection_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_StepAbsoluteSwitchDetection_BkPlcMc 4: Outputs

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

Name

Type

Description

Done

BOOL

Successful processing is indicated here

Busy

BOOL

Indicates that a command is being processed.

Active

BOOL

Readiness for operation is indicated here.

CommandAborted

BOOL

Here an abort of the command is indicated.

Error

BOOL

The occurrence of an error is indicated here.

ErrorID

UDINT

An encoded error message is provided here.

RecordedPosition

LREAL

[mm] Determined position of the referencing cam.

Behavior of the function block

On a rising edge at Execute only MC_Positive_Direction_BkPlcMc, MC_Negative_Direction_BkPlcMc, MC_SwitchPositive_Direction_BkPlcMc, MC_SwitchNegative_Direction_BkPlcMc are accepted at the parameter Direction. The parameters Velocity, Acceleration, Deceleration and Jerk are transferred to MC_MoveVelocity_BkPlcMc. After the cam has been detected, the position is communicated via RecordedPosition and a MC_Halt_BkPlcMc aborts the movement.

During processing, the function block reports Busy and Active. After successful processing Done is reported back. If a subordinate function block reports an error, this is reported via Error and ErrorID.