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.

4.3.12.1.1<br />

4.3.12.2 Dynamic Color Control<br />

By connecting a process variable to the 'Colors Variable' field, the color of the respective object or the global<br />

color definitions can be influenced during runtime. The variable to be used must be at least 16 bits − thus, type<br />

INT or UINT.<br />

The higher value byte represents the foreground color (0−255).<br />

The lower value byte represents the background color (0−255).<br />

The text can be set to blink by simply swapping the variable bytes.<br />

If both bytes are set to the same value, then the text is hidden.<br />

The interval and combinations are dependent on the control application.<br />

Note:<br />

The appropriate color values can be found in the general color table. Specific colors can be read directly from<br />

the tool tips index value in the color dialog box. Not all panels provide the same colors. In each case, the table<br />

can be modified to specific user needs.<br />

Example:<br />

A brief example for dynamic color arrangement.<br />

Text blink effect:<br />

/* Task needs to run in a 100 ms task class */<br />

#include #include /* Macros for foreground and background color<br />

definition */ #define VC_COLOR UINT #define COLOR(FOREGROUND, BACKGROUND) ((FOREGROUND

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

Saved successfully!

Ooh no, something went wrong!