VisuStruct3DTrack (FB)ΒΆ
FUNCTION_BLOCK VisuStruct3DTrack
This FB hosts a path or a track consisting of a number of points in 3D
The data array has a ring buffer design.
The points are added into the array after each other, while udiNumberOfPointsToDraw is incremented by 1.
After udiNumberOfPointsToDraw equals udiNumberOfPointsInArray, the data provider can override the first point again.
udiNumberOfPointsInArray is no longer incremented, but udiFirstPoint must be incremented, because the oldest point is the one, which is located one position after the newly generated one.
- InOut:
- Scope - Name - Type - Comment - Input - pData- POINTER TO ARRAY [0..0] OF VisuStruct3DPathPoint - points to an array of VisuStruct3DPathPoint elements - udiNumberOfPointsInArray- UDINT- number of elements (points) of the above array - udiFirstPoint- UDINTcontains the position of first point of the path or track. 0 means that- pData^[0]is the first point:0 <=- udiFirstPoint<- udiNumberOfPointsInArray- udiNumberOfPointsToDraw- UDINTdefines how many of the points are valid and must be painted:0 <=- udiNumberOfPointsToDraw<=- udiNumberOfPointsInArray- pProjection- POINTER TO Projection - Feedback of projection into path/track is done by: - VisuStruct3DTrack.pProjection. It is a variable that is set by the visualization element. The application may only read it. It contains information of the projection: by using the method- Projection.Applyor- Projection.ApplyVone can see if the transformed position lies inside the visu painting area described by- Projection.ElementRector outside.
