Skip to main content

Visualization Element: Analog Clock

Symbol:

_visu_icon_clock.png

Category: Date/Time Controls

The element is a clock that displays the current time of day. The clock can also display a random time.

Element properties

Are all element properties available?

All properties are available only after you select the Advanced option or the All categories filter in Properties.

Element name

Example: GenElemInst_1

Tip

Assign individual names for elements so that they are found faster in the element list.

Element Type

Analog Clock

Position

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

X

The X-coordinate (in pixels) of the upper left corner of the element

Example: 10

Y

The Y-coordinate (in pixels) of the upper left corner of the element

Example: 10

Width

Specified in pixels

Example: 150

Height

Specified in pixels

Example: 30

Tip

You can change the values by dragging the box _visu_icon_position_element.png symbols to other positions in the editor.

Time display

Use system time

standard icon: The system time of the PLC (local time zone) is displayed.

Note

When the variable VisuElems.Visu_DateTime.DisplayUTC is also set to TRUE, the universal time (UTC) is displayed.

Tip

Hint: Implement the setting of the UTC variable as a user input in your visualization.

Variable

Requirement: The Use system time property is not activated.

Variable (TOD, TIME_OF_DAY) for a time which is not the system time

Example: PLC_PRG.todTimeTokio

Tip

You can programmatically switch the local time zone of the system time to universal time (UTC).

When the variable VisuElems.Visu_DateTime.DisplayUTC is set to TRUE, the system time is displayed as universal time (UTC). By default, the variable VisuElems.Visu_DateTime.DisplayUTC is set to FALSE so that the system time is displayed in the local time zone.

For the display of date and time values, you can extend the respective format string with the time zone code Z. For an output in local system time, the offset is then displayed in universal time (UTC). For example, dd:MM:yyyy HH:mm:ss:ms:Z outputs 01.08.2021 12:00:00:001:+02:00. When universal time (UTC) is displayed, the UTC code is also displayed. 01.08.2021 10:00:00:001:Z

Design

Design

  • From style: All settings are preconfigured according to the style.

  • Explicit: The Settings property is available. Here you can customize the analog clock.

Settings

Requirement: The Property is Explicit. Only then is the Clock Settings category visible.

Table 16. Background

Image color

. Color variants of the default background image
  • Yellow

  • Red

  • Blue

  • Green

  • Black

Own background

Background display with the specific Image. Replaces the default background image.

Image

Image from an image pool or library

Example: myImagepool.myImage

Transparent color

The transparent color in the image representation.

Example: White. Means that the white parts of the image are transparent

Use background color

standard icon: The image background is displayed using the color defined in the Background color property.

Requirement: No image reference is given in the Image property.

Background color

Style color or color

Requirement: Use background color is enabled.



Table 17. Arrows

Arrow type

Example: Thin pointer

Color of hour hand

Color of minute hand

Color of second hand

Style color or color for the hands



Table 18. Lines

Line type

. Clock face graduation
  • None

  • Line: Graduation lines by hour

  • Hours and minutes: Hour and minute division with lines

  • Dots: Graduation dots by hour

Color

Color of the clock face graduation

Line width

Line weight of the clock face graduation

Scale in 3D

standard icon: Representation of the clock face with 3D effect



Table 19. Numerics

Style of numerics

. Digits on the clock face
  • None

  • Quarter

  • All

Font

Font for displaying the digits

Font color

Font for displaying the digits



Table 20. Midpoint

Color

Color of the center of the clock



Table 21. Positioning

Usage of

  • Default style values: Default setting of the style values

  • User-defined settings: User-defined settings in the subordinate Positioning property.

Positioning

Requirement: Visible when the Usage or property is set to Individual settings.

Numerics movement

Value (in pixels) for shifting the digits

Example: 80

Line movement

Value (in pixels) for shifting the hour lines

Example: 100

Hands scaling

Factor for scaling the length of the hour hand

You can customize the exact position of the hour hand relative to the background image.

Example: 100



Scaling type

Scaling type

Defines the scaling for height and width of the element

  • Anisotropic:

    The background image is scaled to the size of the element The height and width are scaled independently of each other.

  • Isotropic:

    The background image is scaled to the size of the element, retaining its proportion. The proportion of height and width is fixed.

Center

The properties contain fixed values for the coordinates of the point of rotation. The rotation point is displayed in the editor as the _visu_icon_center_point.png symbol and is used as the center for rotation and scaling.

Tip

You can also change the values by dragging the _visu_icon_center_point.png symbol to another position in the editor.

X

X-coordinate of the point of rotation

Y

Y-coordinate of the point of rotation

Absolute movement

The properties can be assigned to IEC variables for controlling the position of the element dynamically. The reference point is the upper left corner of the element. At runtime, the entire element is moved.

Movement

X

  • Variable (numeric data type) for the X-position (in pixels)

    Example: PLC_PRG.iPos_X

Increasing this value at runtime moves the element to the right.

Y

Increasing this value at runtime moves the element downwards.

Rotation

Variable (numeric data type) for the angle of rotation (in degrees)

Example: PLC_PRG.iAngle1

The midpoint of the element rotates at the Center point. This rotation point is shown as the _visu_icon_center_point.png symbol.

At runtime, the alignment of the element remains the same with respect to the coordinate system of the visualization. Increasing the value rotates the element to the right.

_visu_img_prp_rotation.png

Interior rotation

Variable (numeric data type) for the angle of rotation (in degrees)

Example: PLC_PRG.iAngle2

At runtime, the element rotates about the point of rotation specified in Center according to the value of the variable. In addition, the alignment of the element rotates according to the coordinate system of the visualization. Increasing the value in the code rotates clockwise.

The rotation point is shown as the _visu_icon_center_point.png symbol.

Note

If a static angle of rotation is specified in the Position → Angle property, then the static angle of rotation is added to the variable angle of rotation (offset) when the visualization is executed.

_visu_img_prp_inner_rotation.png

Tip

You can combine the variables to a Unit conversion.

Tip

The X, Y, Rotation, and Interior rotation properties are supported by the "Client Animation" functionality.

State variables

The variables control the element behavior dynamically.

Invisible

Variable (BOOL) for toggling the visibility of the element

TRUE: The element is not visible at runtime.

Tip

The Invisible property is supported by the "Client Animation" functionality.

Animation

Tip

These properties are available only when you have selected the Support client animations and overlay of native elements option in the Visualization Manager.

Animation duration

Variable for the duration (in milliseconds) in which the element runs an animation

  • Variable (integer value)

    Example: Menu.tContent with VAR tContent : INT := 500; END_VAR

  • Integer literal

    Example: 500

. Animatable properties
  • Absolute movement, Movement, X, Y

  • Absolute movement, Rotation

  • Absolute movement, Interior rotation

  • Absolute movement, Exterior rotation

The animated movement is executed when at least one value of an animatable property has changed. The movement then executed is not jerky, but is smooth within the specified animation duration. The visualization element travels to the specified position while rotating dynamically. The transitions are smooth.

Move to foreground

Variable (BOOL) for setting the element in the foreground

TRUE: At runtime, the visualization element is displayed in the foreground.

FALSE: At runtime, the visualization element is displayed in the layer where it was inserted in the visualization editor.

Example: bIsInForeground with VAR bIsInForeground : BOOL := FALSE; END_VAR