MC_MoveRelative

MC_MoveRelative 1:

This function block commands a motion of a specified distance relative to the set position at the time the command gets active.

Syntax

Definition:

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

MC_MoveRelative 2: Inputs

Name

Type

Default

Description

Execute

BOOL

 

Trigger the command with rising edge.

Distance

LREAL

#Invalid

Relative distance ([PosUnit])

Velocity

LREAL

#Invalid

Maximum velocity ([PosUnit]/s, positive)

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_MoveRelative 3: In/Outputs

Name

Type

Description

Axis

Reference To AXIS_REF

Reference to the axis

MC_MoveRelative 4: Outputs

Name

Type

Description

Done

BOOL

Commanded distance 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

Versionsinformation

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