MC_AccelerationProfile, MCP_AccelerationProfile – Acceleration profile

Block SymbolsLicensing group: MOTION CONTROL
PIC PIC

Function Description
The MC_AccelerationProfile and MCP_AccelerationProfile blocks offer the same functionality, the only difference is that some of the inputs are available as parameters in the MCP_ version of the block.

The MC_PositionProfile block commands a time-position locked motion profile. Block implements two possibilities for definition of time-acceleration function:

1. sequence of values: the user defines a sequence of time-acceleration pairs. In each time interval, the values of velocity are interpolated. Times sequence is in array times, position sequence is in array values. Time sequence must be increasing and must start with zero or zero must be between the first and last point. Execution always starts from zero time, so if the sequence start with negative time, part of the profile is not executed (could be used for debugging or time shift). For MC_VelocityProfile and MC_AccelerationProfile interpolation is linear, but for MC_PositionProfile, 3rd order polynomial is used in order to avoid steps in velocity.

2. spline: time sequence is the same as in previous case. Each interval is interpolated by 5th order polynomial p(x) = a5x5 + a4x4 + a3x3 + a2x2 + a1x + a0 where beginning of the time-interval is for x = 0, end of time-interval is for x = 1 and factors ai are put in array values in ascending order (e.g. array values contains 6 values for each interval). This method allows smaller number of intervals and there is special editor for synthesis of the interpolating spline function.

For both case, the time sequence could be equally spaced and then array times includes only the first (usually zero) and last point.

Note 1: input TimePosition is missing, because all path data are in parameters of the block.

Note 2: parameter values must be set as vector in all cases, e.g. text string must not include semicolon.

Note 3: incorrect parameter cSeg (higher then real size of arrays times and/or values) leads to unpredictable result and in some cases crashes whole runtime execution (The problem is platform dependent and currently it is known only for SIMULINK - crash of whole MATLAB).

Note 4: in the spline mode, polynomial is always 5th order and always in position (also for sibling block MC_PositionProfile and MC_VelocityProfile) and it couldn’t be changed. As the special editor exists, this is not important limitation.

Note 5: The block does not include ramp-in mode. If start position and/or velocity of profile is different from actual (commanded) position of axis, block fails with error -707 (step). It is recommended to use BufferMode=BlendingNext to eliminate the problem with start velocity.

Inputs

uAxis

Axis reference (only RM_Axis.axisRefuAxis or yAxisuAxis connections are allowed)

Reference

Execute

The block is activated on rising edge

Bool

TimeScale

Overall scale factor in time

Double (F64)

AccelerationScale

Overall scale factor in value

Double (F64)

Offset

Overall profile offset in value

Double (F64)

BufferMode

Buffering mode

Long (I32)

1 ....

Aborting (start immediately)

2 ....

Buffered (start after finish of previous motion)

3 ....

Blending low (start after finishing the previous motion, previous motion finishes with the lowest velocity of both commands)

4 ....

Blending high (start after finishing the previous motion, previous motion finishes with the lowest velocity of both commands)

5 ....

Blending previous (start after finishing the previous motion, previous motion finishes with its final velocity)

6 ....

Blending next (start after finishing the previous motion, previous motion finishes with the starting velocity of the next block)

Outputs

yAxis

Axis reference (only RM_Axis.axisRefuAxis or yAxisuAxis connections are allowed)

Reference

Done

Algorithm finished

Bool

CommandAborted

Algorithm was aborted

Bool

Busy

Algorithm not finished yet

Bool

Active

The block is controlling the axis

Bool

Error

Error occurred

Bool

ErrorID

Result of the last operation

Error

i ....

REXYGEN general error

Parameters

alg

Algorithm for interpolation  2

Long (I32)

1 ....

Sequence of time/value pairs

2 ....

Sequence of equidistant values

3 ....

Spline

4 ....

Equidistant spline

cSeg

Number of profile segments  3

Long (I32)

times

Times when segments are switched  [0 30]

Double (F64)

values

Values or interpolating polynomial coefficients (a0, a1, a2, ...)  [0 100 100 50]

Double (F64)

Example

PIC

PIC

2020 © REX Controls s.r.o., www.rexygen.com