MC_AxisSetDefaults

PLCopen motion icon Pipe Network motion icon

 Function Block - Sets the default kinematic parameters for an axis.

Inputs

Input

Data Type

Range

Unit

Default

Description

Execute

BOOL

FALSE, TRUE

N/A

No default

On the rising edge, request to set the default kinematic parameters.

Axis

AXIS_REF

No range

N/A

No default

Reference to the axis which has its default kinematic parameters set.

Velocity

LREAL

0 < Velocity < (20 * Acceleration) and
0 < Velocity < (20 * Deceleration)

User unit/sec

No default

The default velocity.

See Limitations on Acceleration and Jerk.

Acceleration

LREAL

Jerk > (Acceleration / 2)

User unit/sec2

No default

Trapezoidal: Acceleration rate.

S-curve: Maximum acceleration.

Deceleration

LREAL

Jerk > (Deceleration / 2)

User unit/sec2

No default

Trapezoidal: Deceleration rate.

S-curve: Unused.

See S-curve and Trapezoidal Acceleration / Deceleration.

Jerk

LREAL

Jerk > (Acceleration / 2) and Jerk > (Deceleration / 2)

User unit/sec3

No default

Trapezoidal: 0 (zero).

S-curve: Constant jerk.


  • The Jerk value is ignored for motion.
    Only trapezoidal motion is supported.

Outputs

Output

Data Type

Range

Unit

Description

Done

BOOL

FALSE, TRUE

N/A

If TRUE, the command completed successfully.

Error

BOOL

FALSE, TRUE

N/A

If TRUE, an error has occurred.

ErrorID

INT

-2147483648 to 2147483647

N/A

Indicates the error if Error output is TRUE.

See PLCopen Function Block ErrorIDs.

Remarks

  • See Coordinated Motion, the top-level topic for Coordinated Motion.
  • The MC_AxisSetDefaults function block sets the default kinematic variables for MC_MoveDirAbs and MC_MoveDirRel.
    • These variables are only used with the MC_MoveDir function blocks.
  • Each axis in the group must have the default kinematic parameters of Velocity, Acceleration, and Deceleration set to values greater than 0 (zero).
    • Each axis in the group must have these values set before a direct move can be started.
  • The function block returns an error if the group state is not GroupStandby or GroupDisabled.

Figure 1: MC_AxisSetDefaults

FBD Language Example

FFLD Language Example

IL Language Example

Not available.

ST Language Example

 (* ST MC_AxisSetDefaults Example *)

default_velocity       := 50.0; 
default_acceleration   := 250.0;
default_deceleration   := 300.0;
default_jerk           := 1000.0;

Inst_MC_AxisSetDefaults ( TRUE, CoordAxis1_ref, default_velocity, default_acceleration, default_deceleration, default_jerk);

See Also