MC_SEW_ConfigCubicInterpolation

With this function block, the user configures a specific segment within a cam profile so that a cubic interpolation of a curve point table takes place there. The cam profile is given by CamTableID (an object of type CamDescription) and the number of the segment within the cam profile is given by uiSegmentNr. In addition, a reference to a curve point table (an object of type ST_PointsList) must be transferred to rstPointsList.

The function block should not be called in the task in which the setpoint generation takes place (usually TaskHighPrio). It is recommended for the function block to be called either in a free-running task or a cyclical task with a priority that is lower than the priority of the TaskHighPrio.

VAR_INPUT

Variable name

Data type

Description

Execute

BOOL

Start execution of the function block

rstPointsList

REFERENCE TO ST_PointsList

Reference to a structure of type ST_PointsList, which contains the points to be interpolated.

CamTableID

MC_CAM_ID

Object of type CamDescription

uiSegmentNo

UINT

Number of the cam segment in which the linear interpolation is to be configured.

eInterpMode

E_InterpMode

Define behavior at the margins:

  • Extrapolation
  • CyclicCont
  • AddPoints

stPStart

ST_Point

With eInterpMode = AddPoints, the speed in the first curve point is determined as if the interpolation before the first curve point would run through the stPStart point.

stPEnd

ST_Point

With eInterpMode = AddPoints, the speed in the last curve point is determined as if the interpolation after the last curve point would run through the stPEnd point.

VAR_OUTPUT

Variable name

Data type

Description

Done

BOOL

The configuration was successful.

Busy

BOOL

The configuration is being carried out.

Error

BOOL

An error has occurred in the function block

ErrorID

MC_ErrorId

Error number