FB_QSpline - PrepareVarDisX (Method)
Type: |
Method |
Available as of: |
V1.0.0.0 |
Generation of a QSpline with discretionary (strictly monotonic increasing) X values
Based on the transferred lists i_plrXList and i_plrYList, this method generates a QSpline with discretionary (strictly monotonic increasing) X values considering the X values i_lrXStart and i_lrXEnd as well as the slopes i_lrMStart and i_lrMEnd and the bends i_lrKStart and i_lrKEnd.
NOTE: For generating a QSpline, 25 * (i_diNumberofPoints + 1) * (i_diNumberofPoints + 1) + 160 * (i_diNumberofPoints + 1) bytes dynamic memory are required. Therefore, the parameter IEC-Programm\DynIecDataSize of the PLC configuration must be selected adequately.
Input |
Data type |
Description |
---|---|---|
i_diNumberOfPoints |
DINT |
Number of value pairs to be interpolated. Value range: 3 .. Gc_diMaxNumberOfSplinePoints |
i_plrXList |
POINTER TO LREAL |
Pointer to the array containing the X values The array must at least contain i_diNumberOfPoints elements to help prevent memory access errors. |
i_plrYList |
POINTER TO LREAL |
Pointer to the array containing the Y values. The array must at least contain i_diNumberOfPoints elements to help prevent memory access errors. |
i_lrMstart |
LREAL |
Start point slope |
i_lrMend |
LREAL |
End point slope |
i_lrKStart |
LREAL |
Start point bend |
i_lrKEnd |
LREAL |
End point bend |
Output |
Data type |
Description |
---|---|---|
q_etDiag |
General library-independent statement on the diagnostic. A value unequal to GD.ET_Diag.Ok corresponds to a diagnostic message. |
|
q_etDiagExt |
ET_DiagExt |
POU-specific output on the diagnostic. q_etDiag = GD.ET_Diag.Ok -> status message q_etDiag <> GD.ET_Diag.Ok -> diagnostic message |
q_sMsg |
STRING[80] |
Event-triggered message which gives more detailed information on the diagnostic state. |
q_etDiag |
q_etDiagExt |
Enumeration value |
Description |
---|---|---|---|
OK |
0 |
Ok |
|
ExecutionAborted |
59 |
Insufficient dynamic memory |
|
InputParameterInvalid |
58 |
NumberOfPoints is outside the valid range. |
|
InputParameterInvalid |
61 |
The pointer on XList is invalid. |
|
InputParameterInvalid |
62 |
The pointer on YList is invalid. |
|
InputParameterInvalid |
63 |
The spline is numerically ill-conditioned. |
|
InputParameterInvalid |
60 |
XList is not strictly monotonic increasing. |
Enumeration name: |
InsufficientDynamicMemory |
Enumeration value: |
59 |
Description: |
Insufficient dynamic memory |
Issue |
Cause |
Solution |
---|---|---|
- |
There is not enough dynamic memory available. |
The DynIECDataSize parameter in the PLC Configuration must be increased. |
Enumeration name: |
NumberOfPointsRange |
Enumeration value: |
58 |
Description: |
NumberOfPoints is outside the valid range. |
Issue |
Cause |
Solution |
---|---|---|
- |
An invalid number of spline points has been transferred at the i_diNumberOfPoints input. |
The i_diNumberOfPoints input must be >= 3 and <= Gc_diMaxNumberOfSplinePoints. |
Enumeration name: |
Ok |
Enumeration value: |
0 |
Description: |
Ok |
The generation of the QSpline with arbitrary X values was successful.
Enumeration name: |
PointerXListInvalid |
Enumeration value: |
61 |
Description: |
The pointer on XList is invalid. |
Issue |
Cause |
Solution |
---|---|---|
- |
An invalid pointer was transferred to input i_plrXList. |
Verify the pointer at input i_plrXList. |
Enumeration name: |
PointerYListInvalid |
Enumeration value: |
62 |
Description: |
The pointer on YList is invalid. |
Issue |
Cause |
Solution |
---|---|---|
- |
An invalid pointer was transferred to input i_plrYList. |
Verify the pointer at input i_plrYList. |
Enumeration name: |
PoorNumericCondition |
Enumeration value: |
63 |
Description: |
The spline is numerically ill-conditioned. |
Issue |
Cause |
Solution |
---|---|---|
- |
The distance between two spline points is too small. |
Verify the spline point list. |
Enumeration name: |
XListNotStrictlyMonotonic |
Enumeration value: |
60 |
Description: |
XList is not strictly monotonic increasing. |
Issue |
Cause |
Solution |
---|---|---|
- |
The transferred list of X values is not strictly monotonic increasing. |
See the output q_sMsg to find out which point of the X-values it is. Verify the list of x values. |