FC_CSplineFromArray - General Information
Type: |
Function |
Available as of: |
SystemInterface_1.32.6.0 |
Versions: |
Current version |
Calculate the coefficients for a curve from a supporting point table.
The function is an improvement of FC_CSplineFromFile():
oIt obtains its supporting points from arrays and creates a profile on its own and returns the ProfilId. The necessary, time-consuming file operations for FC_CSplineFromFile() are omitted completely, which makes the function FC_CSplineFromArray() faster.
oThe restriction to equidistant supporting points was removed.
Input |
Data type |
Description |
---|---|---|
diSplineType |
DINT |
o0 -> natural spline o1 -> spline with preset boundary derivatives o2 -> periodic spline |
i_diNumOfPoints |
DINT |
Number of cam points (>= 3, <= 10000) |
i_lrStartSlope |
LREAL |
Left boundary slope (only relevant for diSplineType = 1) |
i_lrEndSlope |
LREAL |
Right boundary slope (only relevant for diSplineType = 1) |
i_plrXList |
POINTER TO LREAL |
Pointer to array of X coordinates. If i_plrXList = 0, the function assumes that you are using equidistant cam points that are evenly distributed over the [0,1] interval. |
i_plrYList |
POINTER TO LREAL |
Pointer to array of Y coordinates |
Data type |
Description |
---|---|
DINT |
>0: ProfilId of the profile -1: i_diNumOfPoints is outside the permitted range 3 ... 10000 -2: CSpline equation system singular -4: Invalid spline type -9: Not enough memory available -10: List of X values is not in ascending order -11: No valid list of Y values (for example, pointer = ZERO) -12: Profile table is full |
diProfileId := FC_CSplineFromArray(
i_diSplineType := 1,
i_diNumOfPoints := 10,
i_lrStartSlope := 0.0,
i_lrEndSlope := 0.0,
i_plrXList := ADR(X[0]),
i_plrYList:=ADR(Y[0]) );