MC_MoveVelocity

MC_MoveVelocity 1:

This function block commands an endless movement with a specified velocity.

Syntax

Definition:

FUNCTION_BLOCK MC_MoveVelocity
VAR_IN_OUT
    Axis           : Reference To AXIS_REF;
END_VAR
VAR_INPUT
    Execute        : BOOL;
    Velocity       : LREAL;
    Acceleration   : LREAL;
    Deceleration   : LREAL;
    Jerk           : LREAL;
    BufferMode     : EBufferMode;
END_VAR
VAR_OUTPUT
    InVelocity     : BOOL;
    Busy           : BOOL;
    Active         : BOOL;
    CommandAborted : BOOL;
    Error          : BOOL;
    ErrorId        : UDINT;
END_VAR

MC_MoveVelocity 2: Inputs

Name

Type

Default

Description

Execute

BOOL

 

Trigger the command with rising edge.

Velocity

LREAL

#Invalid

Commanded velocity ([PosUnit]/s, the sign of this parameter determines the direction of movement).

Acceleration

LREAL

#Default

Maximum acceleration ([PosUnit]/s^2, positive)

Deceleration

LREAL

#Default

Maximum deceleration ([PosUnit]/s^2, positive)

Jerk

LREAL

#Default

Maximum jerk ([PosUnit]/s^3, positive)

BufferMode

EBufferMode

Aborting

Chronological sequence of the command

MC_MoveVelocity 3: In/Outputs

Name

Type

Description

Axis

Reference To AXIS_REF

Reference to the axis

MC_MoveVelocity 4: Outputs

Name

Type

Description

InVelocity

BOOL

Commanded velocity reached

Busy

BOOL

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

Active

BOOL

Function block has active control on the axis.

CommandAborted

BOOL

Command is aborted by another command.

Error

BOOL

Error occurred within function block.

ErrorId

UDINT

Error identifier

Weiterführende Informationen

Mit dem Funktionsbaustein MC_MoveVelocity wird eine Endlosfahrt mit vorgegebener Geschwindigkeit und Richtung gestartet. Sobald die vorgegebene konstante Geschwindigkeit erreicht ist, wird der Ausgang InVelocity gesetzt und die Funktion des Funktionsbausteins ist abgeschlossen. Es erfolgt keine weitere Überwachung der Bewegung durch den Funktionsbaustein. Wird das Kommando während der Beschleunigungsphase abgebrochen wird der Ausgang CommandAborted und im Fehlerfall der Ausgang Error gesetzt.

Die Bewegung kann mit einem MC_Halt und MC_Stop angehalten oder durch ein anderes Bewegungskommando abgelöst werden.

Wird ein Bewegungskommando mit dem Eingang BufferMode = Tc3_Mc3Base.EBufferMode.Aborting auf eine gekoppelte Slave-Achse angewendet, so führt dieses zum automatischen Abkoppeln der Achse und anschließendem Ausführen des Kommandos.

Hinweis zum Umstieg von NC2 zu MC3

Der MC3 Funktionsbaustein MC_MoveVelocity hat im Gegensatz zum gleichnamigen NC2 Funktionsbaustein einen vorzeichenbehafteten Velocity-Eingang. Durch das Vorzeichen wird die Bewegungsrichtung vorgegeben.

Versionsinformation

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