Bitmap

You can do the following settings in category ‘Bitmap’ in  the visualization element configuration dialog box:

Specify, which image file should be used. This specification can be static or dynamic. If there are entries both in the ‘Bitmap’ field and in the ‘Bitmap Variable’ field, then that in the ‘Bitmap’ field will be ignored:

Bitmap: Static definition: You can enter the path of an image file available in the local file system. Via button … the standard dialog for browsing for a file will be opened, where you can select the desired file.

Bitmap variable: Dynamic definition: A project variable of type STRING can be entered here, containing the name of the image file currently to be used. This allows dynamic change of images in online mode, but only works with image files which are entered in the project-global “bitmap list” ( ‘Extras’ ‘Bitmap list’). The string-variable always only must get assigned the file name, even if there is a full path specified in the bitmap list.

See in the following example ‘stBitmap’ as string-variable, which is got assigned various image files that are part of the global bitmap list.

CASE nId     OF

0: stBitmap     := 'background.bmp';

1: stBitmap     := 'deutest.bmp';

2: stBitmap     := 'alarm.bmp';

END_CASE

If  stBitmap e.g. is declared in object PLC_PRG, it can be entered here in the configuration dialog in field ‘Bitmap variable’ like follows: “PLC_PRG.stBitmap”.

The following entries affect the frame of the bitmap:

By selecting Anisotropic, Isotropic or Fixed you specify how the bitmap should react to changes in the size of the frame. Anisotropic means that the bitmap remains the same size as the frame which allows you to change the height and width of the bitmap independently. Isotropic means that the bitmap retains the same proportions even if the overall size is changed (i.e., the relationship between height and width is maintained). If Fixed is selected, the original size of the bitmap will be maintained regardless of the size of the frame.

If the Clip option is selected together with the Fixed setting, only that portion of the bitmap that is contained within the frame will be displayed.

If you select the Draw option, the frame will be displayed in the color selected in the Color and Alarm color buttons in the color dialog boxes (standard or target-specific options). The alarm color will only be used if the variable in the Change Color field in the Variable category is TRUE.

In the selection list in the lower part of the dialog you can define whether the bitmap should be inserted in the project (Embed) or whether just a link to an external bitmap-file (path as entered above in the ‘Bitmap’ field) should be created (Remember the link). It is reasonable to keep the bitmap file in the project directory, because then you can enter a relative path. Otherwise you would enter an absolute path and this might cause problems in case you want to transfer the project to another working environment.

../_images/3d85f387538a163c0a317f347a66d3ed