Dynamics

The IPlcDynamicConstraint interface is accepted by many positioning commands as an optional input to constrain the permitted values for velocity, acceleration, deceleration or jerk during motion. There are different types of constraints, often combinations of different types are accepted, which are combined in a DynamicConstraint_Container:

If several constraints act at the same time, all of them will be respected. Therefore, there is no need for the user to calculate which constraint will have the most limiting effect on the dynamics during the motion. Ineffective constraints, for example a constraint to the Z coordinate during a pure XY movement, are ignored.

The following special values are supported:

Example plot for acceleration in 2D

Dynamics 1:

2D velocity (not plotted, in direction of travel):

Dynamics 2:

2D acceleration:

Dynamics 3:

Tangential acceleration in the direction of travel:

Dynamics 4:

Possible constraints for acceleration:

DynamicConstraint_PathXY:

Dynamics 5:
Dynamics 6:

DynamicConstraint_CartesianXY:

Dynamics 7:

DynamicConstraint_Coordinates:

Dynamics 8:
Dynamics 9:
Dynamics 10:
Dynamics 11:

Example PLC

PROGRAM MAIN
VAR
    ConstraintPath : DynamicConstraint_PathXY;
    ConstraintCoords : DynamicConstraint_Coordinates;
    ConstraintCombined : DynamicConstraint_Container;
END_VAR
// Velocity in XY is limited to 1000, the derivative of this velocity with respect to time is limited to 5000.
// No restriction on the jerk.

    ConstraintPath.SetValuesVADJ(V := 1000, A := 5000, D:= 5000, J := MC_IGNORE);

// Acceleration, deceleration and jerk of the X-coordinate are limited to their default values.

    ConstraintCoords.SetLimit(Coordinate := Coord_Mcs_X, V := MC_IGNORE, A := MC_DEFAULT, D := MC_DEFAULT, J := MC_DEFAULT);

// The velocity of the C-coordinate is limited to its default value. Acceleration, deceleration and jerk are limited to specific values.

    ConstraintCoords.SetLimit(Coordinate := Coord_Mcs_C1, V := MC_DEFAULT, A := 1000, D := 1000, J := 10000);

// The constraints on path and coordinates are combined into a single object.

    ConstraintCombined.AddConstraint(ConstraintPath);
    ConstraintCombined.AddConstraint(ConstraintCoords);