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 />

• Once a handle is available, then the panel resources are requested using VA_Saccess. It is possible for<br />

drawing operations to be carried out only after a successful call (return value is 0).<br />

• If the panel resources can be successfully requested with VA_Saccess, then the drawing function can<br />

be called. The function names display the respective tasks, and parameters are listed in the<br />

documentation for the respective function in the reference manual.<br />

(Click the corresponding function in the Library Manager and press F1 to receive help).<br />

• Finally, the resources are released by the program with VA_Srelease.<br />

Warning:<br />

Only call VA_Srelease if VA_Saccess has returned 0.<br />

Warning:<br />

Always call VA_Srelease if VA_Saccess was successfully executed! Otherwise the <strong>Visual</strong> <strong>Components</strong><br />

editor can no longer output to the display and the visualization freezes.<br />

4.2.4 Sample Projects<br />

<strong>Visual</strong> <strong>Components</strong> sample projects can also be installed when installing B&R Automation Software. These<br />

examples can be used as ideas for separate projects and for becoming acquainted with <strong>Visual</strong> <strong>Components</strong>.<br />

In the following sections, the sample projects delivered with <strong>Visual</strong> <strong>Components</strong> are described together with<br />

respect to the hardware used and the appropriate functions.<br />

Note:<br />

B&R Automation Software setup can be run at any time to install the example projects.<br />

Basic functions of <strong>Visual</strong> <strong>Components</strong> are shown in the example projects (Step 1 − Step 7). They indicate<br />

solutions for frequent terms when creating a <strong>Visual</strong> <strong>Components</strong> visualization application.<br />

4.2.4.1 Example: Step 1<br />

Project Name: BrAutomation\Samples\<strong>Visual</strong><strong>Components</strong>\Step1.pgp<br />

Target System: 4P0420.00−490 (4 lines of 20 characters, keys) PP21<br />

Contents: Start page, page change, simple input and output fields<br />

Remark: Scaling function for input/output field<br />

4.2.4.2 Example: Step 2<br />

Project Name: BrAutomation\Samples\<strong>Visual</strong><strong>Components</strong>\Step2.pgp<br />

Target System: 4P3040.00−490 (320x240 pixels, keys) PP41<br />

Contents:<br />

Remark:<br />

4.2.4.3 Example: Step 3<br />

Project Name: BrAutomation\Samples\<strong>Visual</strong><strong>Components</strong>\Step3.pgp<br />

Target<br />

System:<br />

Contents:<br />

Start page, page change, simple input and output fields, language switch,<br />

bitmap display, LED control, using a global picture<br />

Use of Up/Down input, LEDs are on/off/blinking/blinking fast, dynamic<br />

bitmap output using an ANSI C task<br />

IPC2001 (AR 2.61) with 5D2519.02 display (320x240 pixels, color display with keys)<br />

Start page, page change, simple output fields, simple selection using a ListBox, advanced text<br />

output<br />

Remark: Use of the LED and key matrix, language switching, Up/Down input, dynamic bitmaps<br />

4.2.4 Sample Projects 271

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

Saved successfully!

Ooh no, something went wrong!