Image switcher

The element image switcher displays an image consisting of three referenced images. If a mouse action occurs while the visualization is running, the image that is displayed changes. The consequences of mouse actions are configurable via the element behavior. Further information on the options for the integration of images in the visualization can be found in the section "Images" in the "Application hints".

Properties editor

The properties of a visualization element - except alignment and order - can all be configured in the properties editor. By default, this editor opens next to the visualization editor, or it can be opened explicitly via the "Properties" command (which can be found in the View menu as standard).

A property can be modified by editing the field "Value". To this end, an input field, a selection list, a dialog or checkbox that can be activated is provided in this field, depending on the element type. The value field opens

If a variable is assigned,

Working in the list of properties can be made easier with the aid of default, sorting and filter functions.

Element properties

All element properties and their descriptions are listed below.

Element name

The element name can be changed. Standard name is "GenElemInst_x". "x" stands for a sequential number.

Element type

The element type is entered here. For three element groups it is possible to switch between the corresponding elements by changing the element type:

Position

Here you can define the position (X/Y coordinates) and size (width and height) of the element in pixels. The origin is in the top left corner of the window. The positive x-axis is on the right, the positive y-axis runs downwards. If the values edited, the displayed element is simultaneously modified in the visualization editor.

X

Horizontal position in pixels – X=0 is the left edge of the window.

Y

Vertical position in pixels – Y=0 is the upper edge of the window.

Width

Width of the element in pixels

Height

Height of the element in pixels

Auxiliary setting

Variable

Assignment of a boolean variable, whose state changes according to the user input. Depending on the element behavior the variable is TRUE, as long as the mouse button is pressed (image button), or the value changes with each mouse click (image switcher).

Image settings

To keep the entries for the image names uniform, the name of the image pool should be specified as a prefix. This is not necessary if the images are managed via the GlobalImagePool, since this is in any case searched first.

Image on

ID of a bitmap from the image pool. The image is shown in On state.

Image off

ID of a bitmap from the image pool. The image is shown in Off state.

Image pressed

ID of a bitmap from the image pool. At runtime the visualization shows the referenced image, as soon as the element receives the mouse action "right mouse button pressed".

Requirement: Element behavior is image switcher.

Transparency

If this option is enabled, the image is drawn fully transparent for a section defined by the transparency color.

Transparency color

Here you can set the color that is shown fully transparent in the image.

Example: If the image background is white and the transparency color is also white, the background is drawn fully transparent.

Requirement: Transparency is enabled.

Scaling type

Here you can specify how the element responds to changes in the frame size:

  • Isotropic: Height and width of the image are changed with the frame. Their original proportions are retained, however.
  • Anisotropic: The image fills the whole frame, irrespective of its proportions.
  • Unscaled: The image size is specified and remains unchanged, if the frame size changes.

Horizontal alignment

Only available if the "Expert" option is activated for the properties editor and if the image scaling type is "isotropic". This is used to explicitly maintain the horizontal alignment to another element (as defined in the basic visualization), if the visualization is used within a scaled frame. See above: "Isotropic" setting

  • Left
  • Centered
  • Right

Vertical alignment

Only available if the "Expert" option is activated for the properties editor and if the image scaling type is "isotropic". This is used to explicitly maintain the vertical alignment to another element (as defined in the basic visualization), if the visualization is used within a scaled frame. See above: "Isotropic" setting

  • Top
  • Centered
  • Bottom

Element behavior

Here you can select the element behavior:

  • Image switcher: The state of the element and therefore the image and the variable toggle with each mouse click.
  • Image button: ‘Image on’ is displayed and the variable is TRUE, as long as the mouse button is pressed. In this state the image that is referenced in "Image pressed" is not used.

FALSE keys

If this option is enabled, the variable is set to FALSE by pressing the mouse button. Otherwise the variable is set to TRUE.

Requirement: Image switcher is set in element behavior.

Texts

Tooltip

Here you can set the text to be used as tooltip for the element. It only appears in the visualization at runtime.

State variables

These are dynamic definitions of the availability of the element in online mode.

Invisibility

Specification of a boolean variable. If this returns TRUE, the element is invisible in online mode.

Input disabled

Specification of a boolean variable. If TRUE is returned, inputs for the element have no effect. Also, the element itself is greyed out in the visualization, to indicate that no user inputs are possible.

If the visualization uses the user management, the elements for user groups with access right "only visible" are grayed out.

Access rights

This setting relates to the access rights for the individual element. Click to open the Access rights dialog. The setting is only available if a user management was added to the PLC project. The following status messages are available:

Not set. All rights.

The default message is set, if the element is shown as available for all groups.

Rights are issued: Limited rights.

The message is set, if the element is shown with limited behavior for at least one group.