FB_QSpline - PrepareEqDisX (Method)
Type: |
Method |
Available as of: |
V1.0.0.0 |
Generation of a QSpline with equidistant X values
Based on the transferred list i_plrYList, this method generates a QSpline with equidistant 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_lrXstart |
LREAL |
Initial value of the X range |
i_lrXend |
LREAL |
End value of the X range |
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 |
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 |
62 |
The pointer on YList is invalid. |
|
InputParameterInvalid |
63 |
The spline is numerically ill-conditioned. |
|
InputParameterInvalid |
65 |
XStart is greater than XEnd. |
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 equidistant X values was successful.
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: |
XstartGreaterXend |
Enumeration value: |
65 |
Description: |
XStart is greater than XEnd. |
Issue |
Cause |
Solution |
---|---|---|
- |
The assigned value of the stCam.lrXStart variable is too high. |
The value of the stCam.lrXStart variable must be less than the value of the stCam.lrXEnd variable. |