MC_AccelerationProfile, MCP_AccelerationProfile – Acceleration profile
Block SymbolsLicensing group: MOTION CONTROL
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 where beginning of the time-interval is for , end of time-interval is for and factors 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.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) |
AccelerationScale | 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 2 | Long (I32) |
|
|
|
nmax | Number of profile segments 3 | Long (I32) |
times | Times when segments are switched | Reference |
values | Values or interpolating polynomial coefficients (a0, a1, a2, ...) | Reference |
Example
[Previous] [Back to top] [Up] [Next]
2024 © REX Controls s.r.o., www.rexygen.com