MC_ReadActualVelocity

MC_ReadActualVelocity 1:

This function block reads the current axis actual velocity.
In case of an invalid actual velocity value, the Velocity output is set to 0 and the Valid output is set to FALSE.

Syntax

Definition:

FUNCTION_BLOCK MC_ReadActualVelocity
VAR_IN_OUT
    Axis     : Reference To AXIS_REF;
END_VAR
VAR_INPUT
    Enable   : BOOL;
END_VAR
VAR_OUTPUT
    Valid    : BOOL;
    Busy     : BOOL;
    Error    : BOOL;
    ErrorId  : UDINT;
    Velocity : LREAL;
END_VAR

MC_ReadActualVelocity 2: Inputs

Name

Type

Description

Enable

BOOL

Read the actual velocity continuously while Enable = TRUE.

MC_ReadActualVelocity 3: In/Outputs

Name

Type

Description

Axis

Reference To AXIS_REF

Reference to the axis

MC_ReadActualVelocity 4: Outputs

Name

Type

Description

Valid

BOOL

Valid output available at function block

Busy

BOOL

Function block is not finished and new output values are to be expected.

Error

BOOL

Error occurred within function block.

ErrorId

UDINT

Error identifier

Velocity

LREAL

Actual velocity ([PosUnit]/s)

Weiterführende Informationen

Alternativ kann die Istgeschwindigkeit aus der PLC über die AXIS_REF-Struktur ausgelesen werden.

myAxis.McToPlc.Act.Velocity

Versionsinformation

  • TwinCAT Standard >= v3.1.4026.23.1
  • TF5500 MC3 Base >= v4.0.6