MDI_MoveRelative (FB)

FUNCTION_BLOCK MDI_MoveRelative

This function block is used to command a controlled motion of a specified distance relative to the actual position at the time of the execution.

Note

This function block only supports e5x0 drive.

InOut:

Scope

Name

Type

Initial

Comment

Input

Execute

BOOL

FALSE

Starts the motion on a rising edge.

Distance

REAL

Target distance for the move (in user units), range>0 if the axis type is modulo.

Velocity

REAL

100

Maximum velocity (not necessarily reached) in user units/sec, range>0.

Acceleration

REAL

1000

Acceleration rate in user units/sec^2, range>0.

Deceleration

REAL

1000

Deceleration rate in user units/sec^2, range>0.

Inout

Axis

MDI_AxisRef

Reference to the axis structure.

Output

Done

BOOL

Indicates that the axis has reached the target position successfully.

Busy

BOOL

Sets to true while the relative move is in progress.

CommandAborted

BOOL

Command is aborted by another command from other MDI function block.

Error

BOOL

Signals that an error has occurred within function block.

ErrorID

ERROR_ID

Contains the error code when there is an error.