MC_VelocityProfile, MCP_VelocityProfile – Velocity profile
Block SymbolsLicensing group: MOTION CONTROL
Function Description
The MC_PositionProfile block commands a timeposition locked motion profile. Block implements two possibilities for definition of timevelocity function:
1. sequence of values: the user defines a sequence of timevelocity 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\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 timeinterval is for $x=0$, end of timeinterval 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_PositionProfile 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 rampin 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) 
VelocityScale  Overall scale factor in value  Double (F64) 
Offset  Overall profile offset in value  Double (F64) 
BufferMode  Buffering mode  Long (I32) 



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 



Parameters
alg  Algorithm for interpolation $\odot $1  Long (I32) 



cSeg  Number of profile segments $\odot $3  Long (I32) 
times  Times when segments are switched $\odot $[0 15 25 30]  Double (F64) 
values  Values or interpolating polynomial coefficients (a0, a1, a2, ...) $\odot $[0 100 100 50]  Double (F64) 
Example
[Previous] [Back to top] [Up] [Next]
2020 © REX Controls s.r.o., www.rexygen.com