23.11.2012 Views

2 Visual Components Manuals

2 Visual Components Manuals

2 Visual Components Manuals

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Introduction to <strong>Visual</strong> <strong>Components</strong> 2.3<br />

arrangement for particular picture elements may also be used.<br />

Note:<br />

Color values have not changed. These can be taken directly from the data structure in the global color setting.<br />

4.14.1.2 Changing Pictures<br />

<strong>Visual</strong> <strong>Components</strong> V2.1 can now manage up to 65,000 pictures in a project. In earlier projects, only 250<br />

pictures were possible.<br />

If picture numbers are used in the project for changing pictures or for evaluating the current picture number, the<br />

application (source) is to be modified as follows:<br />

• Variable data types for changing pictures, as well as for the current picture number, have been changed<br />

from USINT (8−bit) to UINT (16−bit). Therefore, the picture number or picture change data point has to<br />

be changed to a UINT data type.<br />

• 255 is no longer written to the variable to confirm a picture change. Instead, the variable takes the value<br />

65535. In the application source code, the query for a successful picture change must now correspond<br />

to 65535 and not 255.<br />

Picture change variables which are not of type INT or UINT produce a compiler error.<br />

VISU:(0):Error Variable for picture change from PLC "picture_number" must have data type of INT or<br />

UINT<br />

4.14.1.3 API Functions from the VISAPI Library<br />

The VISAPI library introduced in version 2.0 has been substantially expanded (see also VISAPI Documentation).<br />

Because of the ability to manage several projects on the target system, it became necessary to introduce an<br />

additional parameter. This additional parameter specifies the target project (handle).<br />

Furthermore, a few term names have changed.<br />

It is therefore necessary to revise and test all functions programmed with the VISAPI. Existing functions will not<br />

be changed for future upgrades.<br />

4.14.1.4 Keys and Key Matrix for Touch Systems<br />

Keys<br />

In version 2.0, touch−based panel support was only available using a fixed grid of touch keys. Touch keys were<br />

also only available in a fixed size.<br />

In the current version, buttons or HotSpots can be represented in any size, position, function, and color − with or<br />

without bitmaps or text.<br />

Existing keys on a touch system are automatically converted to HotSpots. For each touch key, a dashed<br />

rectangles is drawn on the display screen for the new HotSpot. The HotSpot takes over the properties of the<br />

key.<br />

These HotSpots can then be later moved and resized.<br />

In many cases, these HotSpots can be switched to buttons to meet the necessary appearance requirements of<br />

the application. In this way, the project becomes clearer (buttons instead of dynamic bitmaps and overlapping<br />

HotSpots) and performance is improved (see also Creating Keys on the Touch Screen).<br />

Key Matrix<br />

The key matrix for touch−operated devices was set to a fixed grid (40 pixels x 40 pixels). Variables for changing<br />

the key matrix received the touch position in an array of 192 bytes directly converted using the touch position.<br />

This computation was based on the fixed 40x40 pixel grid.<br />

Buttons and HotSpots status are currently transferred in the key matrix.<br />

It is recommended to use buttons and HotSpots instead of the touch matrix used in the project parameters.<br />

For this transition, one of two possibilities can be used:<br />

4.14.1.2 Changing Pictures 445

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!