Controls

The NuGet package Beckhoff.TwinCAT.HMI.Vision.Controls (TwinCAT package "TwinCAT.HMI.Vision.Controls") provides some controls for displaying and manipulating Vision data. This documentation assumes basic knowledge of TwinCAT HMI concepts see TE2000 and refers to them. A detailed description of the use of controls can also be found there.

Controls

The package contains the following controls that can be added to HMI pages via the HMI Toolbox:

Control

Category

Description

Image Watch

Vision

  • Displaying images
  • Zoom and drag options
  • Extracting image information
  • Marking image areas with different shapes
  • Multi-image selection
  • Overlay graphics
  • Toolbar with operating functions
  • Infobar for displaying image and shape information

Color

Vision

Displaying and setting colors

Rectangle (Interactive)

Shapes

Interactive display and drawing of a rectangle.

Polygon (Interactive)

Shapes

Interactive display and drawing of a polygon.

Controls 1:

Shape controls

The Rectangle (Interactive) and Polygon (Interactive) controls are primarily auxiliary controls that are reused in the Image Watch control. If necessary, they can also be used alone. In addition, the controls can also be used for derived shapes such as a point, a line, a circle, an ellipse or a square with the help of their attributes.

In addition, the package contains the following help functions:

Function

Category

Description

BoxColorConverter

Vision

Converts the ColorValue attribute of the Color control for display in the color box and vice versa.

ConvertColor

Vision

Converts color values between different formats.

PixelColorFormatter

Formatting

Formats the PixelColor attribute of the Image Watch control to text for display in the toolbar.

ShapeValueFormatter

Formatting

Formats the ShapeValue attribute of the Image Watch control to text for display in the toolbar.

ToRotatedRectangle

Data Conversion

Converts a rectangle of type TcVnRectangle to type TcVnRotatedRectangle.

ToUprightRectangle

Data Conversion

Converts a rectangle of type TcVnRotatedRectangle to type TcVnRectangle.