Motion Control
Trapezoid Motion v2
Description

Trapezoid Motion v2

Provides the velocity commands to the motor drive that will achieve the fastest trapezoidal move from the current position to the position where Position Error is zero.

The position error input is typically produced by one of the following motion control function blocks; Position Point, Indexed Cyclic Position, or Indexed Linear Position. Alternatively, for manual or direct entry of position commands, simply use a Floating Point > Subtractor function block directly with Linear Position or Cyclic Position.

It is important to set the ramp times to realistic values. The motor must be able to accelerate or decelerate to 100% speed within that time. Do not set to a value less than the built-in ramp times in the drive.

The exact setting of the Nominal Time parameter is critical and must be carefully calculated. A convenient calculator is provided by clicking on the 'i' information button that is displayed in that parameter's box in the function block view. The nominal time is the exact number of seconds that it takes for the position error to change by 1.0000 at a continuous 100% speed. Generally, when the nominal time is set too short, the target will be undershot. With the time too long, the target is overshot.

Click on the Tuning button to view or change more details regarding the loop latency, final approach, and move completion.

Latency should represent the realistic complete loop latency including mechanical, motor, drive, comms, update times, etc. Extending the latency is required with slower loops to avoid overshoot.

Final Approach gain is set to zero by default because there is typically enough momentum during the latency period to enter the move completion window.

Move Complete Window is used to eliminate nuisance movement around the target and assist with machine coordination via the Move Complete flag. It is a function of both actual position error and speed command scaling.

Design a complete motion control solution with three function blocks. The following pictures show examples of Trapezoid Motion v2 function blocks in three different systems. The first allows an index command to choose any position along evenly divided intervals. The second allows up to 100 positions to be pre-defined and selected via an index. The third system accepts explicit position commands.

Availability
  • Available only in the dw2xx-v2 series products
  • Requires library: Precision Motion (option -39)
  • Firmware versions 0x2106 and later
savvy-SFD Graphic trapezoidMotion2
Graphic with Parameters trapezoidMotion2

Parameters

Position Error Input, Read-write, Analog (32-bit IEEE-754 floating point value)
-340E36 to 340E36

Position Error

The position error input is typically produced by one of the following motion control function blocks; Position Point, Indexed Cyclic Position, or Indexed Linear Position. Alternatively, for manual or direct entry of position commands, simply use a Floating Point > Subtractor function block directly with Linear Position or Cyclic Position.

Speed Setpoint Output, Read-only, Analog (signed 16-bit integer)
-327.67 % to 327.67 %

Speed Setpoint

The velocity commands to the motor drive that will achieve the fastest trapezoidal move from the current position to the position where Position Error is zero.

Status Output, Read-only, Enumerated (signed 16-bit integer)

Status

The current state of the move.

Equals zero for 'Move Complete' and non-zero when moving. This can be useful (convenient) for machine-sequencing.


0 = Move Complete
1 = Final Approach
2 = Accelerating
3 = Speed Clamped
4 = Decelerating
Move Complete Window Internal Parameter, Read-write, Analog (signed 16-bit integer)
0.001 % to 1.000 %

Move Complete Window

Move Complete Window is used to eliminate nuisance movement around the target and assist with machine coordination via the Move Complete flag. It is a function of both actual position error and speed command scaling.

Maximum Speed Input, Read-write, Analog (signed 16-bit integer)
0.00 % to 327.67 %

Trapezoid Motion - Max Speed

This speed may not be reached with long ramps and / or short moves.

Status indicates Speed Clamped when this speed is reached.


Acceleration Time Input, Read-write, Time or Rate (signed 16-bit integer)
0.1 s to 3000.0 s

Trapezoid Motion - Acceleration Time

The time to accelerate from zero speed to Maximum Speed.

This time is usually be determined by the capabilities and requirements of the application. Factors may include available motor torque, gain requirements and load momentum.

It is important to set the ramp times to realistic values. The motor must be able to accelerate or decelerate to 100% speed within that time. Do not set to a value less than the built-in ramp times in the drive.


Deceleration Time Input, Read-write, Time or Rate (signed 16-bit integer)
0.1 s to 3000.0 s

Trapezoid Motion - Deceleration Time

The time to decelerate from Maximum Speed to zero speed.

This time is usually be determined by the capabilities and requirements of the application. Factors may include available motor torque, gain requirements and load momentum.

It is important to set the ramp times to realistic values. The motor must be able to accelerate or decelerate to 100% speed within that time. Do not set to a value less than the built-in ramp times in the drive.


Latency Internal Parameter, Read-write, Analog (signed 16-bit integer)
0 ms to 1000 ms

Latency

Latency should represent the realistic complete loop latency including mechanical, motor, drive, comms, update times, etc. Extending the latency is required with slower loops to avoid overshoot.

Final Approach Internal Parameter, Read-write, Analog (signed 16-bit integer)
0.00 % to 327.67 %

Final Approach

Final Approach gain is set to zero by default because there is typically enough momentum during the latency period to enter the move completion window.

Hold Input, Read-write, Boolean (signed 16-bit integer)

Trapezoid Motion - Hold

Hold causes Speed Setpoint to immediately reset to 0.00% when activated.

Speed Setpoint accelerates according to Acceleration Time after Hold becomes Inactive.


0 = Inactive
1 = Hold
Pause Input, Read-write, Boolean (signed 16-bit integer)

Trapezoid Motion - Pause

Pause causes Speed Setpoint to ramp to 0.00% according to Deceleration Time when active.

Speed Setpoint accelerates according to Acceleration Time after Pause becomes Inactive.


0 = Inactive
1 = Pause
Nominal Time Input, Read-write, Analog (32-bit IEEE-754 floating point value)
0.0 s to 40000.0 s

Nominal Time

The exact setting of the Nominal Time parameter is critical and must be carefully calculated. A convenient calculator is provided by clicking on the 'i' information button that is displayed in that parameter's box in the function block view. The nominal time is the exact number of seconds that it takes for the position error to change by 1.0000 at a continuous 100% speed. Generally, when the nominal time is set too short, the target will be undershot. With the time too long, the target is overshot.