Skip to main content

Overview

CODESYS SoftMotion distinguishes between movements which only act on a single axis and movements in which two axes are synchronized (for example, via electronic cams or virtual gears). The latter is described on the Synchronous Movements of Two Axes help page.

Basically, the motion blocks which act only on a single axis can be subdivided into the following categories:

Table 26. Motion Blocks

Function Block

Description

MC_MoveAbsolute

Executes a movement to the specified position

MC_MoveRelative

Executes a movement by the specified distance relative to the current position

MC_MoveAdditive

Executes a movement by the specified distance relative to the last commanded target position of another movement (for example, from MC_MoveAbsolute)

MC_MoveSuperimposed

Executes a movement by the specified relative distance in addition to another active movement (for example, from MC_MoveAbsolute). The active movement is not aborted.

MC_MoveVelocity

Executes a continuously running movement at the specified velocity

SMC_MoveContinuousAbsolute

Executes a movement to the specified position. In this case, the target position is reached at a defined velocity which is maintained afterwards.

SMC_MoveContinuousRelative

Executes a movement by the specified distance relative to the current position. In this case, the target position is reached at a defined velocity which is maintained afterwards.

MC_Jog

Executes a continuously running movement at the specified velocity as long as the axis should move forwards or backwards

SMC_Inch

Executes a movement by the specified distance relative to the current position as long as the axis should move forwards or backwards



Table 27. Halting of movements

Function Block

Description

MC_Halt

Executes a controlled stop, interrupts any active movement, and brings the axis to a standstill. MC_Halt is intended for normal operating conditions because the stop can be interrupted by new movements. In addition, operation can be resumed more easily after a stop because the axis remains in an operational state.

MC_Stop

Executes a controlled stop, interrupts any active movement, and brings the axis to a standstill. MC_Stop is intended for emergency situations because the stop cannot be interrupted by new movements. After the stop has been made, the axis is in a stop state so that no new movements are accepted. New movements are only possible again after the stop has been completed and the Execute input is set to FALSE.

MC_HaltSuperImposed

Executes a controlled stop of SuperImposed movements. The underlying movement is not aborted in the process



Table 28. Homing

Function Block

Description

MC_Home

Starts a homing of the axis controlled by the drive. The operation and its parameters depend on the drive and the manufacturer.

SMC_Homing

Starts a homing of the axis controlled by the controller

MC_SetPosition

Does not move the axis, but only shifts the zero point. In this way, the block can be used for referencing, for example. Moreover, the block can also be called during an active movement.



Table 29. Special movements

Function Block

Description

SMC_FollowPosition

Writes the set position of the axis. This can be used to pass your own calculated trajectories to the axis.

SMC_FollowVelocity

Writes the set velocity of the axis. This can be used to pass your own calculated trajectories to the axis.

SMC_FollowPositionVelocity

Writes the set position and velocity of the axis. This can be used to pass your own calculated trajectories to the axis.

SMC_FollowSetValues

Selectively writes the set position, velocity, acceleration, jerk, and/or the set target torque of the axis. This can be used to pass your own calculated trajectories to the axis.

SMC_SetTorque

Writes the set torque of the axis. Depending on the operating mode of the axis, the value is used either for torque feed forward control or as the torque which the axis is supposed to apply.