CMC_SInterPolation (FB)
FUNCTION_BLOCK CMC_SInterPolation
The function block can be used for a simple point-to-point interpolation.
- Behavior of inputs
Enable |
Stop |
Behavior |
|---|---|---|
FALSE |
x |
Output Position = ActualPosition |
TRUE |
FALSE |
Interpolates output Position to reach TargetPosition with the given velocity and acceleration. |
TRUE |
TRUE |
Ramps down to velocity = 0. |
- Behavior of outputs
InSync |
Active |
Behavior |
|---|---|---|
FALSE |
TRUE |
Function block is activated, position and velocity is not yet reached. |
TRUE |
FALSE |
Function block is activated, position is reached, output Position = TargetPosition. |
FALSE |
TRUE |
Function block is either disabled or stopped, velocity |
- Different use cases for this block
- Use in Combination with MC_MoveByExternalReference
- Use to Create a Simple, basic positioning Axis
Note
This block has to be called within the REAL-TIME task
- InOut:
Scope
Name
Type
Initial
Comment
Input
EnableBOOLLevel triggered, Enables the interpolation
StopBOOLStop, level triggered, interpolate down to velocity = 0
TargetPositionLREAL[u] Target position
ActualPositionLREAL[u] Actual position
VelocityLREAL1
[u/s] Value of the maximum velocity (not necessarily reached). Range: >0
AccelerationLREAL1
[u/s^2]Value of the acceleration and deceleration. Range: >0
CycleLREAL10
[ms] Cycle time of the PLC program.
Output
PositionLREAL[u] New absolute position
InSyncBOOLPosition reached TargetPosition
ActiveBOOLInterpolation active