### MC_PositionProfile, MCP_PositionProfile –  Position profile

Block SymbolsLicensing group: MOTION CONTROL

Function Description

The MC_PositionProfile and MCP_PositionProfile 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-position function:

1. sequence of values: the user defines a sequence of time-position pairs. In each time interval, the values of position 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 interpolate byd 5th order polynomial $p\left(x\right)={a}_{5}{x}^{5}+{a}_{4}{x}^{4}+{a}_{3}{x}^{3}+{a}_{2}{x}^{2}+{a}_{1}x+{a}_{0}$ where beginning of the time-interval is for $x=0$, end of time-interval is for $x=1$ and factors ${a}_{i}$ 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_VelocityProfile and MC_AccelerationProfile) 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.axisRef–uAxis or yAxis–uAxis connections are allowed) Reference Execute The block is activated on rising edge Bool TimeScale Overall scale factor in time Double (F64) PositionScale 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.axisRef–uAxis or yAxis–uAxis 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  $\odot$2 Long (I32) 1 .... Sequence of time/value pairs 2 .... Sequence of equidistant values 3 .... Spline 4 .... Equidistant spline cSeg Number of profile segments  $\odot$3 Long (I32) times Times when segments are switched  $\odot$[0 30] Double (F64) values Values or interpolating polynomial coefficients (a0, a1, a2, ...)  $\odot$[0 100 100 50] Double (F64)

Example

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