MC_AxisSetDefaults

PLCopen motion icon Pipe Network motion icon

 Function BlockClosed A function block groups an algorithm and a set of private data. It has inputs and outputs. - Sets the default kinematic parameters for an axis.

Inputs

Input

Data Type

Range

Unit

Default

Description

Execute

BOOL

0, 1

N/A

No default

On the rising edgeClosed The transition of a digital signal from low to high. AKA: positive 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.

VelocityClosed For a group of axes this means: In ACS the velocities of the different axes. In MCS and PCS it provides the velocity of the TCP

LREAL

0 < Velocity < (20 * AccelerationClosed A change in velocity over time. Because velocity is a vector, it can change in two ways: a change in magnitude and/or a change in direction. In one dimension, acceleration is the rate at which something speeds up or slows down. However, more generally, acceleration is a vector quantity expressing the change with time of the velocity both in magnitude and in direction. See these Wikipedia articles for more information: http://en.wikipedia.org/wiki/Velocity http://en.wikipedia.org/wiki/Euclidean_vector http://en.wikipedia.org/wiki/Rate_(mathematics)) and
0 < Velocity < (20 * Deceleration)

User unit/sec

No default

The default velocity.

See Limitations on Acceleration and Jerk.

Acceleration

LREAL

(Velocity / 20) < Acceleration < (2 * Jerk)

User unit/sec2

No default

Trapezoidal: Acceleration rate.

S-curve: Maximum acceleration.

Deceleration

LREAL

(Velocity / 20) < Deceleration < (2 * Jerk)

User unit/sec2

No default

Trapezoidal: Deceleration rate.

S-curve: Unused.

See S-curve and Trapezoidal Acceleration / Deceleration.

Jerk

LREAL

(Velocity / 20) < Acceleration < (2 * Jerk) and (Velocity / 20) < Deceleration < (2 * Jerk)

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

DINT

-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, Deceleration, and Jerk set to values greater than 0 (zero).
  • The function block returns an error if the group state is not GroupStandby or GroupDisabled.

  • Jerk with a non-zero value is currently not supported for coordinated motion.
    Jerk parameters are ignored.

Figure 1: MC_AxisSetDefaults

FBD Language Example

FFLD Language Example

IL Language Example

            BEGIN_ILClosed Instruction list - This is a low-level language and resembles assembly.
     CAL Inst_MC_AxisSetDefaults( TRUE, CoordAxis1_Ref, default_velocity, default_acceleration, default_deceleration, default_jerk)
END_IL

ST Language Example

 (* STClosed Structured text - A high-level language that is block structured and syntactically resembles Pascal. 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