Visualization element ‘Path3D’

Symbol: a1fbc5bbf8304ab7c0a8640e00b727ab_475b07db2eeeddf3c0a8640e00e5fb6e

Tag: Special control elements

The visualization element Path3D graphically displays the curves of two independent records as a 3D path. It is specially designed for use with CODESYS SoftMotion CNC in order to display the trajectory of a machine tool or a robot. The programmed path (path) and the path actually travelled (track) is visualized.

Although the visualization element is designed for use with CODESYS SoftMotion CNC, it can also be used to display any other record. In this case the application must provide the path data. The example application 3D Path Generator, which is available in the CODESYS Store, shows how these data can be generated.

If the element is used together with SoftMotion CNC, then function blocks from the library SM3_CNC_Visu help to generate the data from the path and track. These function blocks are used by the sample project CNC_File_3DPath, which is stored in the installation directory of CODESYS.

  • SMC_PathCopier
  • SMC_PathCopierCompleteQueue
  • SMC_PathCopierFile
  • SMC_PositionTracker

A description of the function blocks can be found in the library manager in the library SM3_CNC_Visu.

See also

  • CNC example 6: use of Path3D with SoftMotion CNC: smUsingPath3DWithSoftMotionCNC

Element properties

Element name For example, GenElemInst_1
Type of element Path3D

Element property ‘Position’

The position defines the location and size of the element in the visualization window. These are based on the Cartesian coordinate system. The origin is located at the upper left corner of the window. The positive horizontal x-axis runs to the right. The positive vertical y-axis runs downwards.

X

X coordinate of the upper left corner of the element

Specified in pixels.

Example: 10.

Y

Y coordinate of the upper left corner of the element

Specified in pixels.

Example: 10.

Width

Specified in pixels.

Example: 150

Height

Specified in pixels.

Example: 30

Note

You can also change the values by dragging the box symbols ( a1fbc5bbf8304ab7c0a8640e00b727ab_7b449e02d0393877c0a8640e01fd8c9e ) to other positions in the editor.

See also

Path description

Path data (VisuStruct3DTrack)

Variable of the type VisuStruct3DTrack, which is declared in the IEC code. Example: PLC_PRG.pc.vs3dt. A description of the structure can be found in the library manager in the library VisuElem3DPath.library.

The data structure describes a path or track through a certain number of points. The points are determined and buffered by the application. The track typically displays the last n positions, so that only a certain part of them is ever displayed at any one time. VisuStruct3DTrack.pProjection is a variable that is set by the visualization element and contains information about the path/track projection. It can be read (only) by the application. In addition, the methods Projection.Apply or .ApplyV can be used in order to see whether the transformed position lies inside or outside the visualization display area, which is defined by Projection.ElementRect.

Path color Color of the path drawn
Path line width Path line width in pixels, e.g.: “2”
Style of boundary points

Display of the points between two successive objects in the path

  • End points are not displayed
  • End points are marked with a circle
  • End points are marked with a cross
  • End points are marked with a plus

Track description

The track data are structured in exactly the same way as the path data: VisuStruct3DTrack

Track data (VisuStruct3DTrack) Variable of the type VisuStruct3DTrack, which is declared in the IEC code. Example: PLC_PRG.pc.vs3dt. A description of the structure can be found in the library manager in the library VisuElem3DPath.library.
Track color Color of the track drawn
Track line width Track line width in pixels, e.g.: “2”

Camera control

The camera position for the 3D mode is controlled with a reference to the external data structure. This structure allows the following operations:

  • Shifting to the left/to the right/upwards/downwards
  • Rotation around the X/Y/Z axis
  • Resetting of the view at X/Y, Y/Z or Z/X level, so that the path and the track are completely visible.
Control data (VisuStruct3DControl)

Variable of the type VisuStruct3DControl, which is declared in the IEC code. Example: PLC_PRG.pc.vs3dc.

A description of the structure can be found in the library manager in the library VisuElem3DPath.

The values can be set via the application itself or via the visualization element ControlPanel. The library VisuElem3DPath contains ready-to-use visualization frames that provide a possible user interface for these data.

Additional aspects

Coordinate system a1fbc5bbf8304ab7c0a8640e00b727ab_9a3f06830c0506c5c0a8640e012f0ace : The coordinate system is displayed
Grid a1fbc5bbf8304ab7c0a8640e00b727ab_9a3f06830c0506c5c0a8640e012f0ace : Grid lines are displayed
Grid color Color of the grid lines

Highlighting

Individual parts of the path can be visually highlighted. This is typically used to mark the already processed part of a track with a different color. Each point in the path is given a unique ID, which in the case of a CNC editor is linked with the object ID on which the point lies. This ID (“highlight ID”) can be specified via the application so that dynamic elements/parts of the track can be highlighted.

Highlight mode

Select one of the following highlight modes:

  • Only the element whose ID corresponds to the value of the variable is highlighted.
  • All elements whose ID (linked with the object ID in the case of a CNC editor) is smaller than or equal to the value in Variable are highlighted.
Variable Project variable that specifies the ID of an element. Example: PLC_PRG.iVarElementID. This “highlight ID” is taken into account for the setting of the highlight mode. The variable must be set in the IEC application.
Highlight color  

Element look

Frame line width Width of the frame around the element, in pixels, for example: “1”
Frame line style

Select one of these style types for the frame line:

  • Solid
  • Dashes
  • Dots
  • Dash Dot
  • Dash Dot Dot
  • Hollow
Transparent background

a1fbc5bbf8304ab7c0a8640e00b727ab_9a3f06830c0506c5c0a8640e012f0ace : The background of the element is displayed transparently.

a1fbc5bbf8304ab7c0a8640e00b727ab_4681610f0c058035c0a8640e0049916a : The background of the element is displayed in the defined background color.

Background color  

Element property ‘Access rights’

Requirement: User management is set up for the visualization.

Access rights

Opens the Access rights dialog box for changing the access rights for the element.

Status messages:

  • Not set. All rights.: Access rights for all user groups : operable
  • Rights are assigned: limited rights: Access is restricted for at least one group.

See also