Writing a curve point table from the IEC program

Curve point tables can also be written from the IEC program by means of pointer access. Both types of curve point tables ("PointsList" and "SplinePointsList") provide a pointer to the internal array in which the curve point pairs are stored.

Proceed as follows to read the curve point table from the IEC program using this pointer:

  1. Declare a local variable pastPoints of the type POINTER TO ARRAY [0..1024] (for writing a "PointsList") or of the type POINTER TO ARRAY [0..64] (for writing a "PointsListSpline"):
    • POINTER TO ARRAY [0..1024] OF SEW_MK_MultiMotionCam.SEW_ICam.SEW_IPG_Base.ST_Point
    • POINTER TO ARRAY [0..64] OF SEW_MK_MultiMotionCam.SEW_ICam.SEW_IPG_Base.ST_Point
  2. Assign the corresponding property of the "PointsList" or "PointsListSpline" to the local variable.
    • pastPoints:=PointsList_Achsname.pastPoints;
  3. Use the local variable to write curve point pairs in the "PointsList" or "PointsListSpline".
    • pastPoints[0].lrX:=…
      pastPoints[0].lrY:=…
      pastPoints[1].lrX:=…
      pastPoints[1].lrY:=…
  4. Specify the number of curve points.
    • PointsList_Achsname.uiNumberOfPoints:=…
  5. Use the constructor of the required interpolation method to configure the appropriate segment in the curve description. There is a separate constructor for each interpolation method:
    • itfConstructors4.itfLinearInterpolation.AddSegment(itfPointsList)
    • itfConstructors4.itfPolynom3Interpolation.AddSegment(itfPointsList)
    • itfConstructors4.itfSplineInterpolation.AddSegment(itfPointsListSpline)
Sample program:

The following is a program example in which curve points are assigned to a curve point table of the type "PointsList" and a linear interpolation is configured with the help of the corresponding constructor.

The declaration part contains the following declarations:

The following sequence is programmed in the "Main" action: