23.11.2012 Views

2 Visual Components Manuals

2 Visual Components Manuals

2 Visual Components Manuals

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

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


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

Contents (3.9.2005)<br />

1 Welcome to <strong>Visual</strong> <strong>Components</strong>.......................................................................................................................1<br />

1.1 <strong>Visual</strong>ization in B&R Automation Studio...............................................................................................1<br />

1.2 <strong>Visual</strong> <strong>Components</strong>..............................................................................................................................1<br />

2 <strong>Visual</strong> <strong>Components</strong> <strong>Manuals</strong>............................................................................................................................3<br />

3 <strong>Visual</strong> <strong>Components</strong> Reference Manual............................................................................................................5<br />

3.1 Editor (Operation) Reference...............................................................................................................5<br />

3.1.1 Shortcut Keys − Reference.........................................................................................................5<br />

3.1.1.1 Picture Editor.....................................................................................................................5<br />

3.1.1.2 Fonts.................................................................................................................................5<br />

3.1.1.3 Bitmaps.............................................................................................................................5<br />

3.1.1.4 Text groups.......................................................................................................................5<br />

3.1.2 Toolbars − Reference.................................................................................................................5<br />

3.1.2.1 Project...............................................................................................................................6<br />

3.1.2.2 Picture Editor.....................................................................................................................6<br />

3.1.2.3 Variables...........................................................................................................................6<br />

3.1.2.4 Fonts.................................................................................................................................6<br />

3.1.2.5 Bitmaps.............................................................................................................................7<br />

3.1.2.6 Text Groups.......................................................................................................................7<br />

3.1.2.7 Alarm System....................................................................................................................7<br />

3.1.2.8 Languages.........................................................................................................................7<br />

3.2 Screen Elements (Fields) − Reference................................................................................................7<br />

3.2.1 Static Picture Elements − Reference..........................................................................................8<br />

3.2.1.1 Static Text Picture Element − Reference..........................................................................9<br />

3.2.1.2 Static Picture Element Line − Reference.........................................................................14<br />

3.2.1.3 Static Picture Element Rectangle − Reference...............................................................17<br />

3.2.1.4 Static Picture Element Ellipse − Reference.....................................................................21<br />

3.2.1.5 Static Picture Element Background Bitmap − Reference................................................24<br />

3.2.2 Input Fields − Reference...........................................................................................................26<br />

3.2.2.1 Numeric Input Field − Reference.....................................................................................27<br />

3.2.2.2 String Input Field − Reference........................................................................................40<br />

3.2.2.3 Password Input Field − Reference..................................................................................52<br />

3.2.2.4 ListBox Input Field − Reference......................................................................................60<br />

3.2.3 Output Fields − Reference........................................................................................................67<br />

3.2.3.1 Numeric Output Field − Reference..................................................................................68<br />

3.2.3.2 String Output Field − Reference......................................................................................77<br />

3.2.3.3 Date/Time Output Field − Reference...............................................................................82<br />

3.2.3.4 Advanced Text Output Field − Reference.......................................................................87<br />

3.2.3.5 Bar Graph Output Field − Reference..............................................................................93<br />

3.2.3.6 ListBox Output Field − Reference.................................................................................100<br />

3.2.3.7 Bitmap Graphic Output Field − Reference....................................................................105<br />

3.2.4 Touch−Operated Fields − Reference.....................................................................................109<br />

3.2.4.1 Button Touch−Operated Field − Reference..................................................................109<br />

3.2.4.2 HotSpot Touch−Operated Field − Reference................................................................124<br />

3.3 Programming Interface for Controller Tasks − VISAPI.....................................................................134<br />

3.3.1 Requirements and Initializing.................................................................................................134<br />

3.3.2 Graphics and Text................................................................................................................134<br />

3.3.3 Setting Contrast and Brightness...........................................................................................134<br />

3.3.4 Reading the Key Matrix........................................................................................................135<br />

3.3.5 Touch Screen .......................................................................................................................135<br />

3.3.6 Manual Project Control.........................................................................................................135<br />

3.3.7 Reading Alarm Lists.............................................................................................................135<br />

3.3.8 Palettes..................................................................................................................................135<br />

3.3.8.1 Copying a Rectangular Screen Area − VA_CopyScreenRect.......................................136<br />

3.3.8.2 Displaying a Bitmap − VA_DrawBitmap........................................................................137<br />

3.3.8.3 Deleting the Alarm History − VA_DelAlarmHistory........................................................138<br />

3.3.8.4 Graphics and Text Output − VA_Ellipse........................................................................139<br />

3.3.8.5 VA_ExchangeFont........................................................................................................140<br />

3.3.8.6 Read Current Alarm List − VA_GetActAlarmList...........................................................140<br />

i


Contents (3.9.2005)<br />

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

3 <strong>Visual</strong> <strong>Components</strong> Reference Manual<br />

3.3.8.7 Reading Alarm Lists − VA_GetAlarmList.......................................................................142<br />

3.3.8.8 Alarm Information at the Cursor Position − VA_GetAlCurPos.......................................143<br />

3.3.8.9 Touch Screen Calibration − VA_GetCalStatus..............................................................144<br />

3.3.8.10 Determining Contrast − VA_GetContrast....................................................................146<br />

3.3.8.11 Reading Display Information − VA_GetDisplayInfo.....................................................147<br />

3.3.8.12 Reading Alarm Lists − VA_GetExAlarmList................................................................148<br />

3.3.8.13 Reading the Key Matrix − VA_GetKeyMatrix..............................................................149<br />

3.3.8.14 Querying the Palette Color − VA_GetPaletteColor......................................................149<br />

3.3.8.15 Graphics and Text Output − VA_GetTextByTextGroup..............................................150<br />

3.3.8.16 User−Defined Touch Operation − VA_GetTouchAction..............................................151<br />

3.3.8.17 VA_Invblnk.................................................................................................................153<br />

3.3.8.18 Graphics and Text Output − VA_Line.........................................................................153<br />

3.3.8.19 Acknowledging Alarms from a Certain Group − VA_QuitAlarms.................................154<br />

3.3.8.20 Graphics and Text Output − VA_Rect.........................................................................155<br />

3.3.8.21 Graphics and Text Output − VA_Redraw....................................................................156<br />

3.3.8.22 Requirements and Initialization − VA_Saccess...........................................................157<br />

3.3.8.23 Saving Settings − VA_SaveSettings...........................................................................159<br />

3.3.8.24 Disable − enable backlight − VA_SetBacklight...........................................................160<br />

3.3.8.25 Setting Contrast and Brightness − VA_SetBrightness................................................160<br />

3.3.8.26 Setting Contrast and Brightness − VA_SetContrast....................................................161<br />

3.3.8.27 Setting the Palette Color − VA_SetPaletteColor.........................................................163<br />

3.3.8.28 Requirements and Initialization − VA_Setup...............................................................164<br />

3.3.8.29 Requirements and Initialization − VA_SetupX.............................................................165<br />

3.3.8.30 Manual Project Control − VA_SetUserParam.............................................................165<br />

3.3.8.31 Shutdown − VA_Shutdown.........................................................................................166<br />

3.3.8.32 Requirements and Initialization − VA_Srelease..........................................................166<br />

3.3.8.33 Manual Project Control − VA_StartProject..................................................................167<br />

3.3.8.34 Touch Screen Calibration − VA_StartTouchCal..........................................................169<br />

3.3.8.35 Manual Project Control − VA_StopProject..................................................................169<br />

3.3.8.36 Graphics and Text Output − VA_Textout....................................................................171<br />

3.3.9 Color Table − VISAPI..............................................................................................................172<br />

3.3.9.1 Color Palette for IPC Color Displays Reserved Colors: 255 − can be used for<br />

transparent effect........................................................................................................172<br />

3.3.9.2 Color Palette for SG3 Black/White DisplaysReserved Colors: none...........................174<br />

3.3.10 Error Codes − VISAPI...........................................................................................................174<br />

3.3.10.1 Error Codes.................................................................................................................174<br />

3.4 Supported Hardware − Reference...................................................................................................175<br />

3.4.1 Key Matrix...............................................................................................................................175<br />

3.4.1.1 Operator Panels for the CAN Controller C130..............................................................175<br />

3.4.1.2 PowerPanel Controllers.................................................................................................175<br />

3.4.1.3 Operator Panels for the IPC2001 Family......................................................................175<br />

3.4.1.4 Operator Panels for the IPC5000 Family......................................................................175<br />

3.4.2 Key Matrix − Panel 4B1270.00−490.......................................................................................175<br />

3.4.3 Key Matrix − Panel 4D1164.00−590.......................................................................................176<br />

3.4.4 Key Matrix − Panel 4D1165.00−490.......................................................................................177<br />

3.4.5 Key Matrix − Panel 4D1166.00−490.......................................................................................178<br />

3.4.6 Key Matrix − Panel 4D1167.00−490.......................................................................................178<br />

3.4.7 Key Matrix − Panel 4P0420.00−490.......................................................................................179<br />

3.4.8 Key Matrix − Panel 4P3040.00−490.......................................................................................180<br />

3.4.9 Key Matrix − Panel 5D2000.02...............................................................................................181<br />

3.4.10 Key Matrix − Panel 5D2210.01.............................................................................................182<br />

3.4.11 Key Matrix − Panel 5D2210.01C (Compact IPC2001)..........................................................183<br />

3.4.12 Key Matrix − Panel 5D2219.01.............................................................................................184<br />

3.4.13 Key Matrix − Panel 5D2219.02.............................................................................................185<br />

3.4.14 Key Matrix − Panel 5D2500.01.............................................................................................186<br />

3.4.15 Key Matrix − Panel 5D2500.02.............................................................................................187<br />

3.4.16 Key Matrix − Panel 5D2500.10.............................................................................................188<br />

3.4.17 Key Matrix − Panel 5D2500.22.............................................................................................189<br />

3.4.18 Key Matrix − Panel 5D2510.01.............................................................................................190<br />

ii


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

Contents (3.9.2005)<br />

3 <strong>Visual</strong> <strong>Components</strong> Reference Manual<br />

3.4.19 Key Matrix − Panel 5D2510.10.............................................................................................191<br />

3.4.20 Key Matrix − Panel 5D2510.22.............................................................................................192<br />

3.4.21 Key Matrix − Panel 5D2519.01.............................................................................................193<br />

3.4.22 Key Matrix − Panel 5D2519.02.............................................................................................194<br />

3.4.23 Key Matrix − Panel 5D5210.01.............................................................................................194<br />

3.4.24 Key Matrix − Panel 5D5211.02.............................................................................................195<br />

3.4.25 Key Matrix − Panel 5D5211.03.............................................................................................196<br />

3.4.26 Key Matrix − Panel 5D5212.02.............................................................................................197<br />

3.4.27 Key Matrix − Panel 5D5212.04.............................................................................................198<br />

3.4.28 Key Matrix − Panel 5D5500.10.............................................................................................199<br />

3.4.29 Key Matrix − Panel 5D5501.01.............................................................................................200<br />

3.4.30 Key Matrix − Panel 5D5510.10.............................................................................................201<br />

3.4.31 Key Matrix − Panel 5D5600.01.............................................................................................202<br />

3.4.32 Key Matrix − Panel 5D5600.02.............................................................................................203<br />

3.4.33 Key Matrix − Panel 5D5600.03.............................................................................................203<br />

3.4.34 Key Matrix − Panel 5D5601.01.............................................................................................204<br />

3.4.35 Key Matrix − Panel 5D5601.02.............................................................................................205<br />

3.4.36 Key Matrix − Panel 5D5601.03.............................................................................................205<br />

3.5 Software Modules on the Controller.................................................................................................206<br />

3.5.1 Executable <strong>Visual</strong> <strong>Components</strong> Modules...............................................................................206<br />

3.5.1.1 Module Versions............................................................................................................207<br />

3.5.1.2 VC Project Management Module..................................................................................207<br />

3.5.1.3 VC Interpreter Module...................................................................................................207<br />

3.5.1.4 VC VGA Display Driver.................................................................................................207<br />

3.5.1.5 VC IPC Key Driver.........................................................................................................207<br />

3.5.1.6 VC IPC Touch Driver.....................................................................................................208<br />

3.5.1.7 VC CAN Panel Driver....................................................................................................208<br />

3.5.1.8 VC Power Panel Driver.................................................................................................208<br />

3.5.1.9 VC Printer Driver...........................................................................................................208<br />

3.5.1.10 VC AT Keyboard Driver...............................................................................................208<br />

3.5.1.11 VC Graphics Driver for PPxx.......................................................................................208<br />

3.5.1.12 VC Graphics Driver for PPxx.......................................................................................209<br />

3.5.1.13 Compact IPC2001 Modules (Example).......................................................................209<br />

3.5.1.14 CP360 Modules (Example).........................................................................................209<br />

3.5.1.15 CP476 Modules (Example).........................................................................................210<br />

3.5.2 <strong>Visual</strong> <strong>Components</strong> Data Modules.........................................................................................211<br />

3.5.3 Internal Details About Project Storage....................................................................................211<br />

3.5.3.1 Project Storage Example...............................................................................................211<br />

4 <strong>Visual</strong> <strong>Components</strong> User's Manual..............................................................................................................215<br />

4.1 Welcome to <strong>Visual</strong> <strong>Components</strong>......................................................................................................215<br />

4.1.1 New Functions in <strong>Visual</strong> <strong>Components</strong> 2.4..............................................................................215<br />

4.1.2 New Visapi Functions.............................................................................................................215<br />

4.1.3 New Functions in <strong>Visual</strong> <strong>Components</strong> 2.3..............................................................................215<br />

4.1.4 New Functions in <strong>Visual</strong> <strong>Components</strong> 2.2..............................................................................216<br />

4.1.5 New Functions in <strong>Visual</strong> <strong>Components</strong> 2.1..............................................................................217<br />

4.2 Getting Started with <strong>Visual</strong> <strong>Components</strong> 2.4....................................................................................219<br />

4.2.1 CP476 with B127 CAN Display − Example.............................................................................219<br />

4.2.1.1 CAN − Step 1: Creating a New Automation Studio Project...........................................219<br />

4.2.1.2 CAN − Step 2: Inserting a Display.................................................................................220<br />

4.2.1.3 CAN − Step 3: Inserting PV Variables...........................................................................223<br />

4.2.1.4 CAN − Step 4: Applying Global Settings to <strong>Visual</strong> <strong>Components</strong>...................................227<br />

4.2.1.5 CAN − Step 5: Inserting an Input Field..........................................................................227<br />

4.2.1.6 CAN − Step 6: Inserting an Output Field.......................................................................229<br />

4.2.1.7 CAN − Step 7: Connecting an LED with a Process Variable.........................................231<br />

4.2.1.8 CAN − Step 8: Defining INC/DEC Keys........................................................................232<br />

4.2.1.9 CAN − Step 9: Compiling and Transferring the Project.................................................233<br />

4.2.1.10 CAN − Step 10: Test Operations.................................................................................234<br />

4.2.2 Compact IPC2002 − Example................................................................................................235<br />

iii


Contents (3.9.2005)<br />

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

4 <strong>Visual</strong> <strong>Components</strong> User's Manual<br />

4.2.2.1 IPC − Step 1: Creating a New Automation Studio Project.............................................235<br />

4.2.2.2 IPC − Step 2: Inserting a Display..................................................................................236<br />

4.2.2.3 IPC − Step 3: Inserting PV Variables............................................................................239<br />

4.2.2.4 IPC − Step 4: Applying Global Settings to <strong>Visual</strong> <strong>Components</strong>.....................................242<br />

4.2.2.5 IPC − Step 5: Adding Pictures.......................................................................................243<br />

4.2.2.6 IPC − Step 6: Adding Bitmaps.......................................................................................244<br />

4.2.2.7 IPC − Step 7: Creating a Text Group............................................................................246<br />

4.2.2.8 IPC − Step 8: Creating HotSpots for Changing Pictures...............................................248<br />

4.2.2.9 IPC − Step 9: Page 1 (INIT_PIC) − Inserting a Dynamic Bitmap..................................251<br />

4.2.2.10 IPC − Step 10: Page 2 − Ellipse with a Dynamic, Changeable Fill Color....................256<br />

4.2.2.11 IPC − Step 11: Page 3 − Inserting a ListBox with Control Buttons..............................258<br />

4.2.2.12 IPC − Step 12: Compiling and Transferring the Project..............................................261<br />

4.2.2.13 IPC − Step 13: Test Operations..................................................................................262<br />

4.2.3 Getting Started with the VISAPI Programming Interface........................................................263<br />

4.2.3.1 Visapi − Tutorial − Inserting the Visapi Library..............................................................263<br />

4.2.3.2 Visapi − Tutorial − Inserting a Cyclic Task....................................................................265<br />

4.2.3.3 Visapi − Tutorial − Automation Basic Example.............................................................267<br />

4.2.3.4 Visapi − Tutorial − Preparing the C Example................................................................268<br />

4.2.3.5 Visapi − Tutorial − Finishing the C Example.................................................................270<br />

4.2.4 Sample Projects......................................................................................................................271<br />

4.2.4.1 Example: Step 1............................................................................................................271<br />

4.2.4.2 Example: Step 2............................................................................................................271<br />

4.2.4.3 Example: Step 3............................................................................................................271<br />

4.2.4.4 Example: Step 4............................................................................................................272<br />

4.2.4.5 Example: Step 5............................................................................................................272<br />

4.2.4.6 Example: Step 6............................................................................................................272<br />

4.2.4.7 Example: Step 7 − CAN ..............................................................................................272<br />

4.2.4.8 Example: Step 8 − VGA / CAN.....................................................................................272<br />

4.2.4.9 Example: VC_Demo......................................................................................................272<br />

4.2.4.10 Example: VC_WebDemo............................................................................................273<br />

4.2.4.11 Example: VC_Alarm....................................................................................................273<br />

4.3 Working with <strong>Visual</strong> <strong>Components</strong>.....................................................................................................273<br />

4.3.1 Resource Types......................................................................................................................274<br />

4.3.2 Creating a <strong>Visual</strong> <strong>Components</strong> Project...................................................................................274<br />

4.3.2.1 Creating a <strong>Visual</strong> <strong>Components</strong> Project.........................................................................274<br />

4.3.2.2 Inserting a Panel Object................................................................................................275<br />

4.3.3 Creating Advanced <strong>Visual</strong> <strong>Components</strong> Projects...................................................................276<br />

4.3.3.1 Several Software Objects and One Panel.....................................................................277<br />

4.3.3.2 Several Software Objects and Several Panels..............................................................277<br />

4.3.4 Editor Views............................................................................................................................278<br />

4.3.5 Picture Management...............................................................................................................278<br />

4.3.5.1 General Picture Management.......................................................................................278<br />

4.3.5.2 Adding a New Picture....................................................................................................279<br />

4.3.5.3 Deleting a Picture..........................................................................................................280<br />

4.3.5.4 Renaming a Picture.......................................................................................................280<br />

4.3.5.5 Changing the Picture Sequence....................................................................................280<br />

4.3.5.6 Changing Special Picture Properties.............................................................................280<br />

4.3.5.7 Defining the Start Picture..............................................................................................281<br />

4.3.5.8 Defining the Global Picture............................................................................................282<br />

4.3.6 Picture Editor..........................................................................................................................282<br />

4.3.6.1 General Picture Editor Operation..................................................................................282<br />

4.3.6.2 Grid and Snap−to−Grid Functions.................................................................................282<br />

4.3.6.3 Zoom Function..............................................................................................................283<br />

4.3.7 Variable Editor........................................................................................................................283<br />

4.3.7.1 Variable Editor...............................................................................................................283<br />

4.3.7.2 Variable View by Picture...............................................................................................284<br />

4.3.7.3 Variable Selection Dialog Box.......................................................................................285<br />

4.3.8 Text Group Editor...................................................................................................................285<br />

4.3.8.1 Text Group Editor (Overview)........................................................................................285<br />

iv


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

Contents (3.9.2005)<br />

4 <strong>Visual</strong> <strong>Components</strong> User's Manual<br />

4.3.8.2 Inserting a New Text Group..........................................................................................286<br />

4.3.8.3 Inserting a Text into a Text Group.................................................................................286<br />

4.3.8.4 Changing Texts in a Text Group...................................................................................287<br />

4.3.8.5 Deleting Texts and Text Groups....................................................................................287<br />

4.3.8.6 Arranging Texts in a Group...........................................................................................287<br />

4.3.8.7 Variable Numbering of Text Groups..............................................................................287<br />

4.3.9 Bitmap Management...............................................................................................................288<br />

4.3.9.1 Bitmap Manager Overview............................................................................................288<br />

4.3.9.2 Inserting Bitmaps .........................................................................................................289<br />

4.3.9.3 Creating Bitmaps...........................................................................................................290<br />

4.3.9.4 Editing Bitmaps.............................................................................................................290<br />

4.3.9.5 Deleting Bitmaps...........................................................................................................290<br />

4.3.9.6 External Bitmap Editor..................................................................................................291<br />

4.3.9.7 Transparent Bitmaps.....................................................................................................291<br />

4.3.9.8 Color Table....................................................................................................................292<br />

4.3.10 Font Management.................................................................................................................293<br />

4.3.10.1 General Font Management.........................................................................................293<br />

4.3.10.2 Inserting Fonts.............................................................................................................294<br />

4.3.10.3 Changing Fonts...........................................................................................................295<br />

4.3.10.4 Deleting Fonts.............................................................................................................295<br />

4.3.10.5 B&R, Standard Fonts, and Windows..........................................................................295<br />

4.3.10.6 More Information About Fonts.....................................................................................295<br />

4.3.11 Language Management........................................................................................................296<br />

4.3.12 Color Configuration...............................................................................................................296<br />

4.3.12.1 Setting Standard Colors..............................................................................................296<br />

4.3.12.2 Dynamic Color Control................................................................................................298<br />

4.3.13 Importing / Exporting Resources..........................................................................................298<br />

4.3.13.1 Exporting Pictures.......................................................................................................299<br />

4.3.13.2 Importing Pictures.......................................................................................................300<br />

4.3.14 Project Options.....................................................................................................................301<br />

4.3.14.1 Project−Specific Configuration....................................................................................301<br />

4.3.15 Project Options.....................................................................................................................305<br />

4.3.15.1 Global Settings − General...........................................................................................305<br />

4.3.15.2 Global Settings − Project.............................................................................................306<br />

4.3.15.3 Global Settings − Picture.............................................................................................307<br />

4.3.15.4 Grid − Settings............................................................................................................307<br />

4.4 <strong>Visual</strong> <strong>Components</strong> User's Manual..................................................................................................308<br />

4.4.1 Touch Configuration...............................................................................................................308<br />

4.4.1.1 Change Settings............................................................................................................309<br />

4.5 Arranging Static Picture <strong>Components</strong>..............................................................................................310<br />

4.5.1 Texts.......................................................................................................................................310<br />

4.5.1.1 Inserting Text.................................................................................................................310<br />

4.5.1.2 Texts..............................................................................................................................311<br />

4.5.1.3 Texts..............................................................................................................................312<br />

4.5.1.4 Texts..............................................................................................................................314<br />

4.5.2 Lines.......................................................................................................................................314<br />

4.5.2.1 Drawing Lines................................................................................................................314<br />

4.5.3 Rectangle and Square............................................................................................................315<br />

4.5.3.1 Drawing Rectangles......................................................................................................315<br />

4.5.3.2 Rectangle and Square...................................................................................................316<br />

4.5.4 Ellipse and Circle....................................................................................................................317<br />

4.5.4.1 Drawing Circles and Ellipses.........................................................................................317<br />

4.5.4.2 Ellipse and Circle...........................................................................................................317<br />

4.5.5 Arranging Static Picture <strong>Components</strong>.....................................................................................318<br />

4.5.5.1 Overlapping Static Objects............................................................................................318<br />

4.5.6 Background Bitmaps...............................................................................................................320<br />

4.6 Configuring Output Fields for Data...................................................................................................321<br />

4.6.1 Recommendations..................................................................................................................321<br />

4.6.2 Displaying Texts and Numbers...............................................................................................322<br />

v


Contents (3.9.2005)<br />

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

4 <strong>Visual</strong> <strong>Components</strong> User's Manual<br />

4.6.2.1 General..........................................................................................................................322<br />

4.6.2.2 Output Numeric.............................................................................................................325<br />

4.6.2.3 Output String.................................................................................................................327<br />

4.6.2.4 Output Date/Time..........................................................................................................327<br />

4.6.3 Displaying Analog Values.......................................................................................................328<br />

4.6.3.1 Bar Graph Output..........................................................................................................328<br />

4.6.4 Text and Graphics Output Using an Index..............................................................................331<br />

4.6.4.1 Advanced Text Output...................................................................................................332<br />

4.6.4.2 ListBox...........................................................................................................................334<br />

4.6.4.3 Bitmap Graphic..............................................................................................................335<br />

4.7 Configuring Input Fields for Data......................................................................................................337<br />

4.7.1 ListBox....................................................................................................................................337<br />

4.7.1.1 Text group .................................................................................................................337<br />

4.7.1.2 Option bytes.................................................................................................................338<br />

4.7.1.3 Cursor Character..........................................................................................................338<br />

4.7.1.4 Selected Item................................................................................................................338<br />

4.7.1.5 Status .................................................................................................................338<br />

4.7.1.6 Colors Foreground and background colors, as well color variables for the ListBox<br />

input control, can be specified for the selected item and the locked element in the<br />

Color dialog box..........................................................................................................338<br />

4.7.1.7 Completion Data Point..................................................................................................339<br />

4.7.1.8 Locking Input.................................................................................................................340<br />

4.7.1.9 Description...................................................................................................................340<br />

4.7.2 Numeric Input.........................................................................................................................341<br />

4.7.2.1 Formatting and Handling Input......................................................................................341<br />

4.7.2.2 Connecting Variables....................................................................................................344<br />

4.7.2.3 Additional Settings.........................................................................................................346<br />

4.7.3 Text Input................................................................................................................................347<br />

4.7.3.1 Formatting the Input......................................................................................................347<br />

4.7.3.2 Input Field Operation.....................................................................................................349<br />

4.7.3.3 Connecting Variables....................................................................................................350<br />

4.7.3.4 Additional Settings.........................................................................................................352<br />

4.7.4 Securing Input with Password Levels.....................................................................................352<br />

4.7.4.1 Configuring Locking for Input Fields..............................................................................353<br />

4.7.4.2 Entering Passwords......................................................................................................354<br />

4.7.5 Using Input Fields on Touch Screens.....................................................................................355<br />

4.7.5.1 Using Touch Keypads...................................................................................................355<br />

4.8 Advanced Control of Screen Elements............................................................................................358<br />

4.8.1 Recommendations for New Users..........................................................................................358<br />

4.8.2 Changing Colors Using Variables...........................................................................................358<br />

4.8.2.1 Connection....................................................................................................................359<br />

4.8.2.2 Color Variable Structure................................................................................................359<br />

4.8.2.3 Application Possibilities.................................................................................................360<br />

4.8.3 Controlling Fields with Status Variables.................................................................................361<br />

4.8.3.1 Connection....................................................................................................................361<br />

4.8.3.2 Assignment....................................................................................................................361<br />

4.8.3.3 Application Possibilities.................................................................................................363<br />

4.8.4 Advanced Text Group Options − Formatted Texts.................................................................363<br />

4.8.4.1 Connection....................................................................................................................364<br />

4.8.4.2 Format...........................................................................................................................364<br />

4.8.4.3 Data Point......................................................................................................................365<br />

4.9 VC Project Multilingual Capabilities..................................................................................................365<br />

4.9.1 Project Multilingual Capabilities..............................................................................................365<br />

4.9.1.1 Adding and Activating Text Layers................................................................................365<br />

4.9.2 Project Multilingual Capabilities..............................................................................................366<br />

4.9.2.1 Configuring Texts in Several Languages......................................................................366<br />

4.9.3 Project Multilingual Capabilities..............................................................................................367<br />

4.9.3.1 Switching Languages During the Design Phase...........................................................367<br />

4.9.4 Project Multilingual Capabilities..............................................................................................368<br />

vi


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

Contents (3.9.2005)<br />

4 <strong>Visual</strong> <strong>Components</strong> User's Manual<br />

4.9.4.1 Text Groups in Several Languages...............................................................................368<br />

4.9.5 Multilingual Project Capabilities..............................................................................................368<br />

4.9.5.1 Switching Languages During Runtime..........................................................................368<br />

4.9.6 Multilingual Project Capabilities..............................................................................................369<br />

4.9.6.1 Importing and Exporting Texts......................................................................................369<br />

4.10 Keys, LED, and Touch Support......................................................................................................371<br />

4.10.1 Configuring Panel Keys........................................................................................................372<br />

4.10.2 Configuring Keys to Picture Levels.......................................................................................375<br />

4.10.2.1 Key Editor....................................................................................................................375<br />

4.10.2.2 Key List........................................................................................................................376<br />

4.10.2.3 Assigning Keys............................................................................................................376<br />

4.10.3 Creating Keys on the Touch Display....................................................................................378<br />

4.10.3.1 Inserting Touch−Operated Fields................................................................................378<br />

4.10.3.2 HotSpot.......................................................................................................................378<br />

4.10.3.3 Touch Button...............................................................................................................380<br />

4.10.4 Using Function Keys.............................................................................................................384<br />

4.10.4.1 Interaction with Control Variables................................................................................384<br />

4.10.4.2 Controlling Picture Changes........................................................................................387<br />

4.10.4.3 Navigating Input Fields................................................................................................388<br />

4.10.5 Configuring Several Key Levels............................................................................................389<br />

4.10.5.1 Setting the 'Switch Levels' Key....................................................................................389<br />

4.10.5.2 Configuring Additional Key Levels...............................................................................390<br />

4.10.5.3 Additional Settings.......................................................................................................391<br />

4.10.6 Configuring and Controlling LEDs........................................................................................391<br />

4.10.6.1 Configuration in the Editor...........................................................................................392<br />

4.10.6.2 Direct Operation from the Control Application.............................................................393<br />

4.10.7 Using the Key Matrix.............................................................................................................394<br />

4.10.7.1 Using the Key Matrix...................................................................................................394<br />

4.10.7.2 Key Matrix from <strong>Visual</strong> <strong>Components</strong> Version 2.0........................................................396<br />

4.11 Alarm System.................................................................................................................................396<br />

4.11.1 Notes for <strong>Visual</strong> <strong>Components</strong> Version 2.0 Users.................................................................397<br />

4.11.2 Preparations.........................................................................................................................397<br />

4.11.2.1 Defining the Alarm Bit Field.........................................................................................397<br />

4.11.2.2 Enabling the Alarm System.........................................................................................398<br />

4.11.3 Configuring the Alarm System..............................................................................................399<br />

4.11.3.1 Global Configuration....................................................................................................399<br />

4.11.4 Using Alarm Groups.............................................................................................................400<br />

4.11.4.1 Preset Alarms..............................................................................................................400<br />

4.11.4.2 Adding, Removing, and Editing Groups......................................................................401<br />

4.11.4.3 Alarm Group Parameters............................................................................................402<br />

4.11.5 Creating and Configuring Alarms..........................................................................................403<br />

4.11.5.1 Setting Up and Editing Alarms....................................................................................403<br />

4.11.5.2 Alarm Properties..........................................................................................................404<br />

4.11.6 Alarm <strong>Visual</strong>ization...............................................................................................................406<br />

4.11.6.1 Alarm Line...................................................................................................................407<br />

4.11.6.2 Alarm List....................................................................................................................408<br />

4.11.6.3 Alarm Summary...........................................................................................................409<br />

4.11.6.4 Alarm History...............................................................................................................410<br />

4.11.7 Optimizing the Alarm Display................................................................................................411<br />

4.11.7.1 Adjusting the Display Format......................................................................................411<br />

4.11.7.2 Adjusting Status Abbreviations....................................................................................413<br />

4.11.7.3 Filtering the Displayed Alarm......................................................................................414<br />

4.11.8 Printing Alarms.....................................................................................................................416<br />

4.11.8.1 Activating the Alarm Printer.........................................................................................416<br />

4.11.8.2 Configuring the Printer................................................................................................416<br />

4.11.8.3 Configuring Status Texts.............................................................................................418<br />

4.11.8.4 Configuring the Print Format.......................................................................................418<br />

4.11.9 Group Alarms........................................................................................................................419<br />

4.11.9.1 Operation.....................................................................................................................419<br />

vii


Contents (3.9.2005)<br />

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

4 <strong>Visual</strong> <strong>Components</strong> User's Manual<br />

4.11.9.2 Settings.......................................................................................................................420<br />

4.11.9.3 Choosing Alarms for the Group...................................................................................421<br />

4.11.10 Bypass and Acknowledgement Images..............................................................................422<br />

4.11.10.1 Usage........................................................................................................................422<br />

4.11.10.2 Setting Parameters....................................................................................................422<br />

4.11.11 General − VISAPI...............................................................................................................423<br />

4.11.11.1 General Information...................................................................................................423<br />

4.11.11.2 Requirements............................................................................................................424<br />

4.11.12 General/Drawing − VISAPI.................................................................................................425<br />

4.12 Tips and Tricks...............................................................................................................................425<br />

4.12.1 A Few Tips............................................................................................................................425<br />

4.12.2 Configuring a Help Picture....................................................................................................426<br />

4.12.2.1 Problem.......................................................................................................................426<br />

4.12.2.2 Solution.......................................................................................................................426<br />

4.12.3 Input Field Cursor Navigation..............................................................................................426<br />

4.12.3.1 Problem.......................................................................................................................426<br />

4.12.3.2 Solution.......................................................................................................................426<br />

4.12.4 Blinking Text (or Button)......................................................................................................427<br />

4.12.4.1 Problem.......................................................................................................................427<br />

4.12.4.2 Solution.......................................................................................................................427<br />

4.12.5 Adjusting the Touch Keypad.................................................................................................428<br />

4.12.6 Tips and Tricks.....................................................................................................................428<br />

4.12.6.1 Logging User Actions..................................................................................................428<br />

4.12.7 Tips and Tricks.....................................................................................................................429<br />

4.12.7.1 Creating Recipe Management.....................................................................................429<br />

4.12.7.2 Executing the Recipe Page.........................................................................................430<br />

4.12.7.3 Code in Automation Basic...........................................................................................431<br />

4.12.7.4 Code in ANSI C...........................................................................................................432<br />

4.12.8 VC System Tuning................................................................................................................432<br />

4.12.9 Tips and Tricks − Touch Pad................................................................................................433<br />

4.12.10 Importing / Exporting Panel Projects..................................................................................434<br />

4.12.10.1 Exporting Panel Objects............................................................................................434<br />

4.12.10.2 Importing Panel Objects............................................................................................436<br />

4.13 Frequently Asked Questions (FAQ)...............................................................................................438<br />

4.13.1 Frequently Asked Questions (FAQ) − Input Fields...............................................................438<br />

4.13.2 Frequently Asked Questions (FAQ) − Scaling......................................................................438<br />

4.13.2.1 General........................................................................................................................438<br />

4.13.2.2 Mathematics Reference..............................................................................................438<br />

4.13.2.3 Restrictions.................................................................................................................439<br />

4.13.2.4 Internal Performance..................................................................................................440<br />

4.13.2.5 Decimal Places..........................................................................................................440<br />

4.13.2.6 Scaling Output.............................................................................................................441<br />

4.13.2.7 Scaling Input................................................................................................................442<br />

4.13.3 Frequently Asked Questions (FAQ) − Keys..........................................................................443<br />

4.13.4 Frequently Asked Questions (FAQ) − VISAPI......................................................................443<br />

4.14 Upgrading <strong>Visual</strong> <strong>Components</strong> 2.0 Projects...................................................................................444<br />

4.14.1 Modification Notes................................................................................................................444<br />

4.14.1.1 Color Representation for IPC Projects........................................................................444<br />

4.14.1.2 Changing Pictures.......................................................................................................445<br />

4.14.1.3 API Functions from the VISAPI Library.......................................................................445<br />

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

4.14.1.5 VCInfo Data Structure.................................................................................................446<br />

4.14.1.6 Character Set Representation.....................................................................................446<br />

4.14.1.7 Customer−Specific Panels..........................................................................................446<br />

4.14.2 Upgrading <strong>Visual</strong> <strong>Components</strong> 2.0 Projects.........................................................................446<br />

4.14.2.1 HotSpot Controls for the Key Matrix............................................................................446<br />

4.14.2.2 Calculating the Key Matrix...........................................................................................447<br />

viii


1 Welcome to <strong>Visual</strong> <strong>Components</strong><br />

1.2 <strong>Visual</strong> <strong>Components</strong><br />

1.1 <strong>Visual</strong>ization in<br />

B&R Automation<br />

Studio<br />

In addition to supporting uniform<br />

configuration for control and<br />

positioning projects, B&R<br />

Automation Studio also provides<br />

the necessary platform used for<br />

structuring and integrating<br />

complete visualization<br />

applications.<br />

<strong>Visual</strong> <strong>Components</strong> can be used to configure visualization projects which use text and graphics. Possiblities for<br />

visualization applications are defined when the visualization hardware is selected in Automation Studio. Pictures<br />

can include input and output fields, as well as static or dynamic bitmaps. Using the common database interface,<br />

these are connected with control variables configured in the Automation Studio application. Static and dynamic<br />

texts can also be created for several languages.<br />

All parts of an automation application are saved together in a single project. The control program, motion objects<br />

(axis configuration and software), and the visualization application form a single functional unit which is<br />

controlled completely by Automation Studio.<br />

Once again, Version 2.4 has added many new functions.<br />

New users of <strong>Visual</strong> <strong>Components</strong> are recommended to start with the tutorials. Additional details can then be<br />

learned in the Working with <strong>Visual</strong> <strong>Components</strong> section.<br />

The User's Manual contains comprehensive introductions to all visualization elements. These are grouped<br />

according to their field of application.<br />

Details concerning <strong>Visual</strong> <strong>Components</strong>, its different fields, supported operator panels, and the runtime system<br />

are extensively covered in the <strong>Visual</strong> <strong>Components</strong> Reference Manual.<br />

Editing <strong>Visual</strong> <strong>Components</strong> projects which were created with Version 2.0 is described in the Upgrade Notes<br />

section. Projects which were created or edited with <strong>Visual</strong> <strong>Components</strong> Version 2.1 can immediately be opened<br />

and revised. Interfaces for touch−operated panels have to be reconfigured though. (See Touch Configuration)<br />

1 Welcome to <strong>Visual</strong> <strong>Components</strong> 1


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

2 1 Welcome to <strong>Visual</strong> <strong>Components</strong>


2 <strong>Visual</strong> <strong>Components</strong> <strong>Manuals</strong><br />

Documentation for <strong>Visual</strong> <strong>Components</strong> consists of a User's Manual and a Reference Manual.<br />

<strong>Visual</strong> <strong>Components</strong> User's Manual<br />

The User's Manual describes all functions, operations, and processes involved in creating a <strong>Visual</strong> <strong>Components</strong><br />

visualization application. FAQs and examples are also included so various tasks can be carried out.<br />

<strong>Visual</strong> <strong>Components</strong> Reference Manual<br />

The Reference Manual contains details about the various elements of a <strong>Visual</strong> <strong>Components</strong> visualization<br />

application, as well as its programing interface.<br />

2 <strong>Visual</strong> <strong>Components</strong> <strong>Manuals</strong> 3


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

4 2 <strong>Visual</strong> <strong>Components</strong> <strong>Manuals</strong>


3 <strong>Visual</strong> <strong>Components</strong> Reference Manual<br />

This manual should be considered a reference tool for the following topics in <strong>Visual</strong> <strong>Components</strong>.<br />

3.1 Editor (Operation) Reference<br />

The <strong>Visual</strong> <strong>Components</strong> editor is outfitted with toolbars and shortcut keys for convenient use and to guarantee<br />

efficient work. Many <strong>Visual</strong> <strong>Components</strong> editor functions can therefore be reached comfortably and quickly.<br />

3.1.1 Shortcut Keys − Reference<br />

3.1.1.1 Picture Editor<br />

Shortcut Key Function<br />

Alt + Enter Picture properties<br />

Ins Insert new page<br />

Ctrl + Draw ellipse Draws a circle<br />

Ctrl + Draw rectangle Draws a square<br />

Ctrl + Draw line Draws horizontal or vertical line<br />

Ctrl When the Ctrl key is pressed, several objects can be selected<br />

Ctrl + C Copies selected object<br />

Ctrl + X Cuts selected object<br />

Ctrl + V Pastes selected object<br />

Ctrl + D Switches input field sequence on/off<br />

Del Clear<br />

Cursor keys Exact pixel positioning of selected object(s)<br />

Shift + Tab Switches the selected graphic element<br />

3.1.1.2 Fonts<br />

Shortcut Key Function<br />

Alt +Enter Font properties<br />

Ins Inserts new font<br />

Ctrl + C Copies selected font<br />

Ctrl + H Cuts selected font<br />

Ctrl + V Inserts selected font<br />

Del Delete<br />

3.1.1.3 Bitmaps<br />

Shortcut Key Function<br />

Del Delete<br />

Ins Insert bitmap<br />

3.1.1.4 Text groups<br />

Shortcut Key Function<br />

Del Delete<br />

Ins Inserts text group<br />

3.1.2 Toolbars − Reference<br />

This section describes the icons in the toolbar. Depending on which editor is being used, icons in the toolbar will<br />

be either activated or deactivated.<br />

3 <strong>Visual</strong> <strong>Components</strong> Reference Manual 5


Icons are described from left to right.<br />

3.1.2.1 Project<br />

• Edit project comments<br />

• Open <strong>Visual</strong> <strong>Components</strong> settings dialog box<br />

3.1.2.2 Picture Editor<br />

• Insert new picture<br />

• Delete picture<br />

• Rename picture<br />

• Move picture up<br />

• Move picture down<br />

• Activate simulation mode<br />

• Select text layer (default)<br />

• Activate selection mode<br />

• Configure text input field<br />

• Draw line<br />

• Draw rectangle or square<br />

• Draw ellipse or circle<br />

• Select touch elements (button, hotspot)<br />

• Select input field (numeric, alphanumeric, or password)<br />

• Select output field (numeric, alphanumeric, bar graph, advanced text, date/time, dynamic bitmap, or<br />

ListBox)<br />

• Insert alarm field<br />

• Insert background bitmap<br />

• Zoom in<br />

• Zoom out<br />

• Show/Hide grid, grid settings<br />

3.1.2.3 Variables<br />

• Insert variable<br />

• Delete variable<br />

• Modify variable<br />

• Update the view<br />

• Name of the picture for the variable view (PIC3)<br />

3.1.2.4 Fonts<br />

• Insert font<br />

• Delete font<br />

• Rename font<br />

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

6 3.1.2.1 Project


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

3.1.2.5 Bitmaps<br />

• Insert bitmap<br />

• Delete bitmap<br />

• Rename bitmap<br />

• Edit bitmap<br />

• Zoom in on bitmap<br />

• Zoom out from bitmap<br />

3.1.2.6 Text Groups<br />

• Insert text group or text<br />

• Delete text group<br />

• Rename text group<br />

• Move text up<br />

• Move text down<br />

3.1.2.7 Alarm System<br />

• Insert new alarm group<br />

• Delete alarm group<br />

• Rename alarm group<br />

• Move alarm text up<br />

• Move alarm text down<br />

3.1.2.8 Languages<br />

• Insert new text layer<br />

• Delete text layer<br />

• Rename text layer<br />

• Compile text layer (activate)<br />

3.2 Screen Elements (Fields) − Reference<br />

<strong>Visual</strong> <strong>Components</strong> uses individual screen elements to create visualization applications. These elements are<br />

called fields in the following sections. A complete visualization project can be created by combining and<br />

configuring a series of these different fields in pictures.<br />

Every field in <strong>Visual</strong> <strong>Components</strong> is used, placed, edited, and configured in the same way. Details of these steps<br />

can be found in the User's Manual.<br />

Fields in a <strong>Visual</strong> <strong>Components</strong> application are classified into groups according to how they are used. Each one<br />

of these groups is described in its own section in this documentation.<br />

Fields Description<br />

Static Picture<br />

Elements<br />

Static picture elements are used to create the framework for a picture. As a rule, static<br />

elements do not represent any information, nor do they allow any input. Instead, they are<br />

usually used to label, group, and arrange active picture elements.<br />

Static picture elements are only drawn once when the picture is changed. After that, they are<br />

no longer updated. Because of this, they only load the system down the first time the picture<br />

3.1.2.5 Bitmaps 7


Input Fields<br />

Output Fields<br />

Touch−Operated<br />

Fields<br />

is changed. This isn't true, however, for elements which use status variables or variables for<br />

active color assignment. Details about controlling colors can be found in the Setting Color<br />

section of the User's Manual.<br />

Static picture elements can be placed on different layers with the editor. The layer displayed<br />

can be changed using ''Bring Forward'' and ''Send Backward'' in the object's shortcut menu<br />

(see Overlapping Objects). This overlap is then converted into a character sequence for the<br />

target system.<br />

Input fields allow information to be entered into process variables in various forms. The type<br />

of input field determines the different ways that this information is used. Most input fields<br />

accept the entry of numeric and alphanumeric characters.<br />

When numeric and alphanumeric characters are entered on systems with touch screen<br />

displays, <strong>Visual</strong> <strong>Components</strong> automatically adjusts the input fields on the touch screen to an<br />

appropriate display size. This happens automatically and does not have to be configured or<br />

programmed.<br />

When numeric and alphanumeric characters are entered using operator panel keys, the<br />

desired characters must first be configured on the panel keys depending on the needs of the<br />

application. There are several key levels provided as an option for doing so (max. 4).<br />

<strong>Visual</strong> <strong>Components</strong> provides input fields for all usual data types of process variables which<br />

can be entered into a visualization application.<br />

Output fields are used to represent information on the visualization device. Data shown<br />

comes from process variables from the control application. As a rule, output fields cannot be<br />

controlled or influenced by the user.<br />

Since no user interaction takes place, output fields function in the same way on touch screen<br />

systems as they do on other systems.<br />

<strong>Visual</strong> <strong>Components</strong> provides output fields for all usual data types of process variables used<br />

in a control application. Some data types can be displayed in different ways. Because of this,<br />

the user is able to choose the best suited representation for each application.<br />

Touch−operated fields either partially or completely replace operator panel key functions on<br />

systems with graphic touch screens. These include all touch screens with QVGA, VGA, or<br />

larger displays which are connected to the IPC2001 and IPC5000 families.<br />

Touch−operated fields are operated exclusively through the touch of correspondingly<br />

configured surfaces on the touch screen. Simultaneous operation using panel keys can be<br />

achieved by having a function key configured at the same time for the same action.<br />

3.2.1 Static Picture Elements − Reference<br />

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

Static picture elements are used to create the framework for a picture. As a rule, static elements do not<br />

represent any information, nor do they allow any input. Instead, they are usually used to label, group, and<br />

arrange active picture elements.<br />

Static picture elements are only drawn once when the picture is changed. After that, they are no longer updated.<br />

Because of this, they only load the system down the first time the picture is changed. This isn't true, however, for<br />

elements which use status variables or variables for active color assignment. Details about controlling colors can<br />

be found in the Setting Color section of the User's Manual.<br />

Static picture elements can be placed on different layers with the editor. The layer displayed can be changed<br />

using ''Bring Forward'' and ''Send Backward'' in the object's shortcut menu (see Overlapping Objects). This<br />

overlap is then converted into a character sequence for the target system.<br />

The number of static picture elements available depends on the type of panel used. The documentation for each<br />

individual picture element contains details about it's availability on various target systems.<br />

In general, static picture elements are reached using the toolbar in the <strong>Visual</strong> <strong>Components</strong> editor. They can also<br />

be found under the 'Tools' menu when the editor is active.<br />

8 3.2.1 Static Picture Elements − Reference


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

Static Picture<br />

Element<br />

Text<br />

Line<br />

Rectangle and<br />

Square<br />

Ellipse and<br />

Circle<br />

Background<br />

Bitmap<br />

Description<br />

This text element outputs a predefined text (from the editor) with a selectable font and size.<br />

Using language−switching (integrated in <strong>Visual</strong> <strong>Components</strong>), text can be configured for several<br />

langauges and switched at any time during runtime.<br />

Aside from language−switching, texts themselves can no longer be changed during runtime. If<br />

this is necessary, a suitable output field must be used instead.<br />

Using this picture element, lines can be created to optically organize the picture and to delineate<br />

and arrange the other fields in the picture. Lines can be created using any color supported by<br />

the display.<br />

Horizontal and vertical lines can be represented on all graphics−capable displays; diagonal lines<br />

can be represented on all graphics−capable displays except for CAN and serial controllers or<br />

operator panels.<br />

This picture element is used to draw rectangles in a picture. Rectangles can be output as either<br />

shaded ("filled") or unshaded. Any color can be selected for the border or "filling" and, if<br />

necessary, changed during runtime using a process variable. Rectangles may be used to group<br />

different fields together in the picture or for schematic representation.<br />

Rectangles can be output on all graphic displays (even semi−graphic displays on CAN and<br />

serial controllers).<br />

This picture element allows ellipses of any height and width to be displayed (they must be able<br />

to fit completely in the picture). Border and shading colors can be configured separately.<br />

Transparent (empty) shading for ellipses is also possible. Because of the possibility of<br />

connecting a variable to control ellipse color, they are very well suited as status indicators, for<br />

example.<br />

Ellipses can be output on all full−graphic displays, but not semi−graphic displays on CAN and<br />

serial controllers.<br />

This picture element allows a bitmap to be displayed as a background or picture arrangement<br />

element. The bitmap to be displayed must have already been inserted in the <strong>Visual</strong> <strong>Components</strong><br />

Bitmap Manager.<br />

The bitmap cannot be changed during runtime. If this is necessary, then an output field bitmap<br />

can be used instead.<br />

3.2.1.1 Static Text Picture Element − Reference<br />

This text element outputs a predefined text (from the editor) with a selectable font and size. Using<br />

language−switching (integrated in <strong>Visual</strong> <strong>Components</strong>), text can be configured for several langauges and<br />

switched at any time during runtime.<br />

Aside from language−switching, texts themselves can no longer be changed during runtime. If this is necessary,<br />

a suitable output field must be used instead.<br />

General<br />

Summary of the basic properties of this static picture element.<br />

Function Displays texts.<br />

Availability This field can be used by all systems supported by <strong>Visual</strong> <strong>Components</strong>.<br />

Appearance<br />

Configured text is displayed with the defined font and size.<br />

Special functions:<br />

• Visible/Invisible switching using the Status process variable<br />

• Selectable foreground and background colors<br />

• Fully selectable fonts<br />

Individual Colors The following can be individually set for static text:<br />

3.2.1.1 Static Text Picture Element − Reference 9


• Foreground color (text color)<br />

• Background color<br />

All colors can either be set in the editor or during runtime using a process<br />

variable.<br />

Properties<br />

Static text properties are set under the various tabs of the Properties dialog box. The properties of the field can<br />

be displayed by double−clicking on the static text in the editor and are automatically shown after a new field is<br />

inserted.<br />

Available settings are described respectively on their own pages. The following list provides an outline of the<br />

possible settings (tabs), as well as references to detailed information.<br />

Text<br />

Parameter<br />

Colors<br />

Under this tab, text size, font, and content are defined for individual languages. The Text Input<br />

dialog box can also be opened for text entry.<br />

Basic parameters of static text such as its position and status are found under this tab. This page<br />

must be configured for all created static texts.<br />

Settings under this tab can be used to specify user−defined color settings and to connect process<br />

variables for controlling colors. This is very useful for color displays, but can also be used for<br />

black/white displays.<br />

3.2.1.1.1 Static Text Picture Element − Properties: Parameter<br />

Provides general settings for the static text picture element.<br />

3.2.1.1.1.1 Image<br />

Position<br />

Contains various settings for formatting the field on the screen.<br />

Left Specifies the position of the upper−left corner along the X axis (interval from the left display margin).<br />

Values for these parameters begin with 0 on the left margin and increase to the width of the display minus<br />

one pixel (on the right margin).<br />

Possible Settings for Full<br />

Graphic Displays<br />

Possible Settings for Text<br />

and Semi−Graphic Displays<br />

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

The field can be placed freely in the display, so that Left can be set from 0<br />

to the width of the display minus the width of the field in pixels.<br />

On text and semi−graphic displays, such as those which can be connected<br />

to the C130 CAN Controller, fields can only be placed evenly on every<br />

10 3.2.1.1 Static Text Picture Element − Reference


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

Top<br />

sixth X−coordinate ( Left = 0, 6, 12, 18, etc.).<br />

Specifies the position of the upper−left corner along the Y axis (interval from the upper display margin).<br />

Values for these parameters begin with 0 on the upper margin and increase to the height of the display<br />

minus one pixel (on the lower margin).<br />

Possible Settings for Full<br />

Graphic Displays<br />

Possible Settings for Text<br />

and Semi−Graphic Displays<br />

The field can be placed freely in the display, so that Top can be set from 0<br />

to the height of the display minus the height of the field in pixels.<br />

On text and semi−graphic displays, such as those which can be connected<br />

to the CAN Controller C130, fields can only be placed evenly on every<br />

eighth Y−coordinate (Top = 0, 8, 16, 24, etc.).<br />

Status<br />

Contains various settings for formatting the field on the screen.<br />

Source<br />

Assign...<br />

For the general operation of dialog boxes.<br />

OK<br />

Cancel<br />

Used to input or display the connected variable.<br />

Possible Settings Name of a UINT process variable<br />

Possible Values Bit 0 If 1, the field is invisible.<br />

All other bits are reserved.<br />

The Assign... button opens a dialog box to select a variable for the Source field. By<br />

default, only variables of suitable types are displayed.<br />

Buttons<br />

Applies settings and closes the dialog box. If settings cannot be applied because of an error, it is<br />

indicated and the dialog box is not closed.<br />

Note:<br />

All changes are applied, including those made under different (hidden) tabs.<br />

Closes the dialog box and discards any changes made.<br />

Warning:<br />

All changes will be discarded, including those made under different (hidden) tabs.<br />

Help Displays help for this tab.<br />

3.2.1.1.2 Static Text Picture Element − Properties: Text<br />

Under this tab, text size, font, and content are defined for individual languages. The Text Input dialog box can<br />

also be opened for text entry.<br />

3.2.1.1.2.1 Image<br />

3.2.1.1 Static Text Picture Element − Reference 11


Defines the text font on the screen.<br />

Logical Font<br />

Font<br />

Used to input or display desired fonts.<br />

Possible Settings Any font in the project can be selected.<br />

Text Table<br />

Contains the text to be displayed in the present languages.<br />

Language<br />

Column<br />

Text Column<br />

All languages defined in the project are listed in the Language column. Double−clicking on the<br />

desired language opens the Text Input dialog box for the text to be displayed for this language.<br />

Corresponding texts for the present languages are entered in this column. By default, the text<br />

entered in the first line ('default' language) will be applied automatically to all other text layers. By<br />

double−clicking on a text, it can be edited in the table.<br />

For the general operation of dialog boxes.<br />

OK<br />

Cancel<br />

Buttons<br />

Applies settings and closes the dialog box. If settings cannot be applied because of an error, it is<br />

indicated and the dialog box is not closed.<br />

Note:<br />

All changes are applied, including those made under different (hidden) tabs.<br />

Closes the dialog box and discards any changes made.<br />

Warning:<br />

All changes will be discarded, including those made under different (hidden) tabs.<br />

Help Displays help for this tab.<br />

3.2.1.1.3 Static Text Picture Element − Properties: Colors<br />

Allows colors to be set for static text.<br />

3.2.1.1.3.1 Image<br />

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

12 3.2.1.1 Static Text Picture Element − Reference


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

Allows colors to be set in the editor.<br />

Use Global<br />

Foreground<br />

Background<br />

Use<br />

Transparent<br />

Color<br />

Colors<br />

If this option is selected, then settings in the project options are applied to this element.<br />

Therefore, settings for foreground and background cannot be made.<br />

Selects the text color. This setting can only be activated if the Use Global option is not selected.<br />

Possible Settings for<br />

Full Graphic Displays<br />

Any desired color from a palette of 256 colors can be chosen.<br />

Standard palette colors are illustrated in the reference manual.<br />

Customer−specific operator panels can have their own color<br />

palettes. Correct colors are always indicated in the selection list.<br />

Possible Settings for Text and semi−graphic displays, such as those which can be<br />

Text and Semi−Graphic connected to the C130 CAN controller, support only black and white<br />

Displays<br />

colors. This is also true for the PP21 and PP41 Power Panels and<br />

their customer−specific varieties.<br />

Allows the choice of the static text background color. This setting is only activated if the Use<br />

Global and Use Transparent Color are not selected.<br />

Possible Settings for<br />

Full Graphic Displays<br />

Any desired color from a palette of 256 colors can be chosen.<br />

Standard palette colors are illustrated in the reference manual.<br />

Customer−specific operator panels can have their own color<br />

palettes. Correct colors are always indicated in the selection list.<br />

Possible Settings for Text and semi−graphic displays, such as those which can be<br />

Text and Semi−Graphic connected to the C130 CAN controller, support only black and white<br />

Displays<br />

colors. This is also true for the PP21 and PP41 Power Panels and<br />

their customer−specific varieties.<br />

If Use Transparent Color is selected, only the foreground color can be changed. This applies<br />

both for fixed colors set using the dialog box and colors set using a process variable.<br />

Colors variable<br />

Allows color to be manipulated with a process variable during runtime.<br />

Source Used to input or display the connected variable.<br />

Possible Settings Name of a UINT process variable<br />

Possible Values Bits 0−7 The low byte contains the static text background<br />

3.2.1.1 Static Text Picture Element − Reference 13


Assign...<br />

color.<br />

Bits 8−15 The high byte contains the static text color.<br />

For both of these settings, the same colors which can be used for foreground and<br />

background in the editor are possible (see above).<br />

The Assign... button opens a dialog box to select a variable for the Source field. By default, only<br />

variables of suitable types are displayed.<br />

For the general operation of dialog boxes.<br />

OK<br />

Buttons<br />

Applies settings and closes the dialog box. If settings cannot be applied because of an error, it is<br />

indicated and the dialog box is not closed.<br />

Note:<br />

All changes are applied, including those made under different (hidden) tabs.<br />

Cancel Closes the dialog box and discards any changes made.<br />

3.2.1.2 Static Picture Element Line − Reference<br />

Using this picture element, lines can be created to optically organize the picture and to delineate and arrange<br />

the other fields in the picture. Lines can be created using any color supported by the display.<br />

Horizontal and vertical lines can be represented on all graphic displays. Diagonal lines can be represented on all<br />

graphic displays except for CAN and serial controllers or operator panels.<br />

General<br />

Summary of the basic properties of this static picture element.<br />

Function Displays lines.<br />

Availability<br />

Appearance<br />

Individual<br />

Colors<br />

Horizontal and vertical lines can be represented on all graphic displays (even semi−graphic on<br />

CAN and serial controllers) Diagonal lines can be be represented on all graphic displays except<br />

for CAN and serial controllers or panels.<br />

Lines will be displayed in the project exactly as they are configured in the editor.<br />

Special functions:<br />

• Visible/Invisible switching using the Status process variable<br />

• Selectable line color<br />

The following can be individually set for lines:<br />

• Line color<br />

All colors can either be set in the editor or during runtime using a process variable.<br />

Properties<br />

Line properties are set under the various tabs of the Properties dialog box. Properties can be reached by<br />

double−clicking on the line in the editor.<br />

Available settings are described respectively on their own pages. The following list provides an outline of the<br />

possible settings (tabs), as well as references to detailed information.<br />

Parameter<br />

Colors<br />

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

Basic parameters of the line such as position and status are defined under this tab. This page must<br />

be configured for all created lines.<br />

Settings under this tab can be used to specify user−defined color settings and to connect process<br />

variables for controlling colors. This is very useful for color displays, but can also be used for<br />

black/white displays.<br />

14 3.2.1.2 Static Picture Element Line − Reference


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

3.2.1.2.1 Static Picture Element Line − Properties: Parameter<br />

Provides general settings for the static picture element line.<br />

3.2.1.2.1.1 Image<br />

Position<br />

Contains various settings for line formatting on the screen.<br />

Left<br />

Top<br />

Right<br />

Specifies the position of the upper−left corner along the X axis (interval from the left<br />

display margin). Values for these parameters begin with 0 on the left margin and<br />

increase to the width of the display minus one pixel (on the right margin).<br />

Possible Settings for Full<br />

Graphic Displays<br />

Possible Settings for Text<br />

and Semi−Graphic Displays<br />

The line can be placed freely in the display, so that Left<br />

can be set from 0 to the width of the display minus the<br />

width of the field in pixels.<br />

Whether lines can be used and in which manner can be<br />

found in the hardware description of each display.<br />

Specifies the position of the upper−left corner along the Y axis (interval from the upper<br />

display margin). Values for these parameters begin with 0 on the upper margin and<br />

increase to the height of the display minus one pixel (on the lower margin).<br />

Possible Settings for Full<br />

Graphic Displays<br />

Possible Settings for Text<br />

and Semi−Graphic Displays<br />

The line can be placed freely in the display, so that Top<br />

can be set from 0 to the height of the display minus the<br />

height of the field in pixels.<br />

Whether lines can be used and in which manner can be<br />

found in the hardware description of each display.<br />

Specifies the position of the lower−right corner along the X axis (distance from the left<br />

display margin). Values for these parameters begin with 0 on the left margin and<br />

increase to the width of the display minus one pixel (on the right margin). The value here<br />

must be larger than that in the Left field.<br />

Possible Settings for Full<br />

Graphic Displays<br />

Possible Settings for Text<br />

and Semi−Graphic Displays<br />

The line can be placed freely in the display, so that<br />

Right can be set from 0 to width of the display minus the<br />

width of the field in pixels.<br />

Whether lines can be used and in which manner can be<br />

found in the hardware description of each display.<br />

Bottom Specifies the position of the lower−right corner along the Y axis (distance from the upper<br />

display margin). Values for these parameters begin with 0 on the upper margin and<br />

increase to the height of the display minus one pixel (on the lower margin). The value<br />

here must be larger than that in the Top field.<br />

Possible Settings for Full The line can be placed freely in the display, so that<br />

3.2.1.2 Static Picture Element Line − Reference 15


Graphic Displays Bottom can be set from 0 to the height of display minus<br />

the height of the field in pixels.<br />

Possible Settings for Text<br />

and Semi−Graphic Displays<br />

Whether lines can be used and in which manner can be<br />

found in the hardware description of each display.<br />

Status<br />

Contains various settings for line formatting on the screen.<br />

Source<br />

Assign...<br />

For the general operation of dialog boxes.<br />

OK<br />

Cancel<br />

Used to input or display the connected variable.<br />

Possible Settings Name of a UINT process variable<br />

Possible Values Bit 0 If 1, the line is invisible.<br />

All other bits are reserved.<br />

The Assign... button opens a dialog box to select a variable for the Source field. By<br />

default, only variables of suitable types are displayed.<br />

Buttons<br />

Applies settings and closes the dialog box. If settings cannot be applied because of an error, it is<br />

indicated and the dialog box is not closed.<br />

Note:<br />

All changes are applied, including those made under different (hidden) tabs.<br />

Closes the dialog box and discards any changes made.<br />

Warning:<br />

All changes will be discarded, including those made under different (hidden) tabs.<br />

Help Displays help for this tab.<br />

3.2.1.2.2 Static Picture Element Line − Properties: Colors<br />

Allows colors to be set for the line.<br />

3.2.1.2.2.1 Image<br />

Allows colors to be set in the editor.<br />

Use<br />

Global<br />

Line<br />

Color<br />

Colors<br />

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

If this option is selected, then settings in the project options are applied to this element. In addition, no<br />

setting for Line Color can be made.<br />

Selects the line color. This setting can only be activated if the Use Global option is not selected.<br />

16 3.2.1.2 Static Picture Element Line − Reference


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

Possible Settings for Full<br />

Graphic Displays<br />

Possible Settings for Text and<br />

Semi−Graphic Displays<br />

Any desired color from a palette of 256 colors can be chosen.<br />

Standard palette colors are illustrated in the reference manual.<br />

Customer−specific operator panels can have their own color<br />

palettes. Correct colors are always indicated in the selection list.<br />

Text and semi−graphic displays, such as those which can be<br />

connected to the C130 CAN controller, support only black and<br />

white colors. This is also true for the PP21 and PP41 Power<br />

Panels and their customer−specific varieties.<br />

Colors variable<br />

Allows color to be manipulated with a process variable during runtime.<br />

Source<br />

Assign...<br />

For the general operation of dialog boxes.<br />

OK<br />

Used to input or display the connected variable.<br />

Possible Settings Name of a UINT process variable<br />

Possible Values Bits 0−7 In this case, the low byte has no effect on the display.<br />

Bits 8−15 The high byte contains the line color.<br />

The same colors are possible for this setting as for the setting Line<br />

Color in the editor (see above).<br />

The Assign... button opens a dialog box to select a variable for the Source field. By<br />

default, only variables of suitable types are displayed.<br />

Buttons<br />

Applies settings and closes the dialog box. If settings cannot be applied because of an error, it is<br />

indicated and the dialog box is not closed.<br />

Note:<br />

All changes are applied, including those made under different (hidden) tabs.<br />

Cancel Closes the dialog box and discards any changes made.<br />

3.2.1.3 Static Picture Element Rectangle − Reference<br />

This picture element is used to draw rectangles in a picture. Rectangles can be output as either shaded ("filled")<br />

or unshaded. Any color can be selected for the border or "filling" and, if necessary, changed during runtime<br />

using a process variable. Rectangles may be used to group different fields together in the picture or for<br />

schematic representation.<br />

Rectangles can be output on all graphic displays (even semi−graphic displays on CAN and serial controllers).<br />

General<br />

Summary of the basic properties of this static picture element.<br />

Function Displays rectangles.<br />

Availability<br />

Appearance<br />

Individual<br />

Colors<br />

Rectangles can be output on all graphic displays (even semi−graphic displays on CAN and<br />

serial controllers).<br />

Rectangles will be displayed in the project exactly as they are configured in the editor.<br />

Special functions:<br />

• Visible/Invisible switching using the Status process variable<br />

• Selectable border and filling colors<br />

The following can be individually set for rectangles:<br />

• Foreground color (border color)<br />

• Background color (filling color)<br />

All colors can either be set in the editor or during runtime using a process variable.<br />

3.2.1.3 Static Picture Element Rectangle − Reference 17


Properties<br />

Rectangle properties are set under the various tabs of the Properties dialog box. Properties can be reached by<br />

double−clicking on the rectangle in the editor.<br />

Available settings are described respectively on their own pages. The following list provides an outline of the<br />

possible settings (tabs), as well as references to detailed information.<br />

Parameter<br />

Colors<br />

Basic parameters of the rectangle such as its position and status are found under this tab. This page<br />

must be configured for all created rectangles.<br />

Settings under this tab can be used to specify user−defined color settings and to connect process<br />

variables for controlling colors. This is very useful for color displays, but can also be used for<br />

black/white displays.<br />

3.2.1.3.1 Static Picture Element Rectangle − Properties: Parameter<br />

Provides general settings for the rectangle static picture element.<br />

3.2.1.3.1.1 Image<br />

Position<br />

Contains various settings for formatting the rectangle on the screen.<br />

Left<br />

Top<br />

Specifies the position of the upper−left corner along the X axis (interval from the left display margin).<br />

Values for these parameters begin with 0 on the left margin and increase to the width of the display<br />

minus one pixel (on the right margin).<br />

Possible Settings for Full<br />

Graphic Displays<br />

Possible Settings for Text and<br />

Semi−Graphic Displays<br />

The rectangle can be placed freely in the display, so that Left can<br />

be set from 0 to the width of the display minus the width of the field<br />

in pixels.<br />

Whether rectangles can be used and in which manner can be found<br />

in the hardware description of each display.<br />

Specifies the position of the upper−left corner along the Y axis (interval from the upper display margin).<br />

Values for these parameters begin with 0 on the upper margin and increase to the height of the display<br />

minus one pixel (on the lower margin).<br />

Possible Settings for Full<br />

Graphic Displays<br />

Possible Settings for Text and<br />

Semi−Graphic Displays<br />

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

The rectangle can be placed freely in the display, so that Top can be<br />

set from 0 to the height of the display minus the height of the field in<br />

pixels.<br />

Whether rectangles can be used and in which manner can be found<br />

in the hardware description of each display.<br />

Right Specifies the position of the lower−right corner along the X axis (distance from the left display margin).<br />

Values for these parameters begin with 0 on the left margin and increase to the width of the display<br />

minus one pixel (on the right margin). The value here must be larger than that in the Left field.<br />

18 3.2.1.3 Static Picture Element Rectangle − Reference


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

Bottom<br />

Possible Settings for Full<br />

Graphic Displays<br />

Possible Settings for Text and<br />

Semi−Graphic Displays<br />

The rectangle can be placed freely in the display, so that Right can<br />

be set from 0 to the width of the display minus the width of the field<br />

in pixels.<br />

Whether rectangles can be used and in which manner can be found<br />

in the hardware description of each display.<br />

Specifies the position of the lower−right corner along the Y axis (distance from the upper display<br />

margin). Values for these parameters begin with 0 on the upper margin and increase to the height of<br />

the display minus one pixel (on the lower margin). The value here must be larger than that in the Top<br />

field.<br />

Possible Settings for Full<br />

Graphic Displays<br />

Possible Settings for Text and<br />

Semi−Graphic Displays<br />

The rectangle can be placed freely in the display, so that Bottom can<br />

be set from 0 to the height of the display minus the height of the field<br />

in pixels.<br />

Whether rectangles can be used and in which manner can be found<br />

in the hardware description of each display.<br />

Status<br />

Contains various settings for formatting the rectangle on the screen.<br />

Source<br />

Assign...<br />

For the general operation of dialog boxes.<br />

OK<br />

Cancel<br />

Used to input or display the connected variable.<br />

Possible Settings Name of a UINT process variable<br />

Possible Values Bit 0 If 1, the rectangle is invisible.<br />

All other bits are reserved.<br />

The Assign... button opens a dialog box to select a variable for the Source field. By<br />

default, only variables of suitable types are displayed.<br />

Buttons<br />

Applies settings and closes the dialog box. If settings cannot be applied because of an error, it is<br />

indicated and the dialog box is not closed.<br />

Note:<br />

All changes are applied, including those made under different (hidden) tabs.<br />

Closes the dialog box and discards any changes made.<br />

Warning:<br />

All changes will be discarded, including those made under different (hidden) tabs.<br />

Help Displays help for this tab.<br />

3.2.1.3.2 Static Picture Element Rectangle − Properties: Colors<br />

Allows colors to be set for the rectangle.<br />

3.2.1.3.2.1 Image<br />

3.2.1.3 Static Picture Element Rectangle − Reference 19


Allows colors to be set in the editor.<br />

Use Global<br />

Foreground<br />

Background<br />

Fill<br />

Colors<br />

If this option is selected, then settings in the project options are applied to this element. Therefore,<br />

settings for foreground and background cannot be made.<br />

Selects the color for the rectangle border. This setting can only be activated if the Use Global<br />

option is not selected.<br />

Possible Settings for<br />

Full Graphic Displays<br />

Possible Settings for<br />

Text and Semi−Graphic<br />

Displays<br />

Any desired color from a palette of 256 colors can be chosen. Standard<br />

palette colors are illustrated in the reference manual.<br />

Customer−specific operator panels can have their own color palettes.<br />

Correct colors are always indicated in the selection list.<br />

Text and semi−graphic displays, such as those which can be connected<br />

to the C130 CAN controller, support only black and white colors. This is<br />

also true for the PP21 and PP41 Power Panels and their<br />

customer−specific varieties.<br />

Selects the color for rectangle shading. This setting is only active if the option Use Global is not<br />

selected and the box Fill is checked.<br />

Possible Settings for<br />

Full Graphic Displays<br />

Possible Settings for<br />

Text and Semi−Graphic<br />

Displays<br />

Any desired color from a palette of 256 colors can be chosen. Standard<br />

palette colors are illustrated in the reference manual.<br />

Customer−specific operator panels can have their own color palettes.<br />

Correct colors are always indicated in the selection list.<br />

Text and semi−graphic displays, such as those which can be connected<br />

to the C130 CAN controller, support only black and white colors. This is<br />

also true for the PP21 and PP41 Power Panels and their<br />

customer−specific varieties.<br />

If Fill is selected, the rectangle will be filled in with the background color. If not, the inside of the<br />

rectangle will be transparent.<br />

Colors variable<br />

Allows color to be manipulated with a process variable during runtime.<br />

Source<br />

Used to input or display the connected variable.<br />

Possible Settings Name of a UINT process variable<br />

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

Possible Values Bits 0−7 The low byte contains the rectangle background (filling)<br />

color.<br />

Bits 8−15 The high byte contains the rectangle foreground (border)<br />

color.<br />

For both of these settings, the same colors which can be used for foreground and<br />

background in the editor are possible (see above).<br />

20 3.2.1.3 Static Picture Element Rectangle − Reference


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

The Assign... button opens a dialog box to select a variable for the Source field. By default, only<br />

Assign...<br />

variables of suitable types are displayed.<br />

For the general operation of dialog boxes.<br />

OK<br />

Buttons<br />

Applies settings and closes the dialog box. If settings cannot be applied because of an error, it is<br />

indicated and the dialog box is not closed.<br />

Note:<br />

All changes are applied, including those made under different (hidden) tabs.<br />

Cancel Closes the dialog box and discards any changes made.<br />

3.2.1.4 Static Picture Element Ellipse − Reference<br />

This picture element allows ellipses of any height and width to be displayed (they must be able to fit completely<br />

in the picture). Border and shading colors can be configured separately. Transparent (empty) shading for<br />

ellipses is also possible. Because of the possibility of connecting a variable to control ellipse color, they are very<br />

well suited as status indicators, for example.<br />

Ellipses can be output on all full−graphic displays, but not semi−graphic displays on CAN and serial controllers.<br />

General<br />

Summary of the basic properties of this static picture element.<br />

Function Displays ellipses.<br />

Availability<br />

Appearance<br />

Individual Colors<br />

Ellipses can be output on all full−graphic displays, but not semi−graphic displays on<br />

CAN and serial controllers.<br />

Ellipses will be displayed in the project exactly as they are configured in the editor.<br />

Special functions:<br />

• Visible/Invisible switching using the Status process variable<br />

• Selectable border and filling colors<br />

The following can be individually set for ellipses:<br />

• Foreground color (border color)<br />

• Background color (filling color)<br />

All colors can either be set in the editor or during runtime using a process variable.<br />

Properties<br />

Ellipse properties are set under the various tabs of the Properties dialog box. They can be reached by<br />

double−clicking on the ellipse in the editor.<br />

Available settings are described respectively on their own pages. The following list provides an outline of the<br />

possible settings (tabs), as well as references to detailed information.<br />

Parameter<br />

Colors<br />

Basic parameters of the ellipse such as its position and status are defined under this tab. This page<br />

must be configured for all created ellipses.<br />

Settings under this tab can be used to specify user−defined color settings and to connect process<br />

variables for controlling colors. This is very useful for color displays, but can also be used for<br />

black/white displays.<br />

3.2.1.4.1 Static Picture Element Ellipse − Properties: Parameter<br />

Provides general settings for the static picture element ellipse.<br />

3.2.1.4.1.1 Image<br />

3.2.1.4 Static Picture Element Ellipse − Reference 21


Position<br />

Contains various settings for ellipse formatting on the screen.<br />

Left<br />

Top<br />

Right<br />

Bottom<br />

Specifies the position of the upper−left corner along the X axis (interval from the left display margin).<br />

Values for these parameters begin with 0 on the left margin and increase to the width of the display<br />

minus one pixel (on the right margin).<br />

Possible Settings for Full<br />

Graphic Displays<br />

Possible Settings for Text and<br />

Semi−Graphic Displays<br />

The ellipse can be placed freely in the display, so that Left can be<br />

set from 0 to the width of the display minus the width of the field in<br />

pixels.<br />

Whether ellipses can be used and in which manner can be found in<br />

the hardware description of each display.<br />

Specifies the position of the upper−left corner along the Y axis (interval from the upper display margin).<br />

Values for these parameters begin with 0 on the upper margin and increase to the height of the display<br />

minus one pixel (on the lower margin).<br />

Possible Settings for Full<br />

Graphic Displays<br />

Possible Settings for Text and<br />

Semi−Graphic Displays<br />

The ellipse can be placed freely in the display, so that Top can be<br />

set from 0 to the height of the display minus the height of the field in<br />

pixels.<br />

Whether ellipses can be used and in which manner can be found in<br />

the hardware description of each display.<br />

Specifies the position of the lower−right corner along the X axis (distance from the left display margin).<br />

Values for these parameters begin with 0 on the left margin and increase to the width of the display<br />

minus one pixel (on the right margin). The value here must be larger than that in the Left field.<br />

Possible Settings for Full<br />

Graphic Displays<br />

Possible Settings for Text and<br />

Semi−Graphic Displays<br />

The ellipse can be placed freely in the display, so that Right can be<br />

set from 0 to width of the display minus the width of the field in<br />

pixels.<br />

Whether ellipses can be used and in which manner can be found in<br />

the hardware description of each display.<br />

Specifies the position of the lower−right corner along the Y axis (distance from the upper display<br />

margin). Values for these parameters begin with 0 on the upper margin and increase to the height of<br />

the display minus one pixel (on the lower margin). The value here must be larger than that in the Top<br />

field.<br />

Possible Settings for Full<br />

Graphic Displays<br />

Possible Settings for Text and<br />

Semi−Graphic Displays<br />

The ellipse can be placed freely in the display, so that Bottom can<br />

be set from 0 to the height of display minus the height of the field in<br />

pixels.<br />

The respective display's hardware description will disclose whether<br />

ellipses can be used and in which manner.<br />

Status<br />

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

22 3.2.1.4 Static Picture Element Ellipse − Reference


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

Contains various settings for formatting the ellipse on the screen.<br />

Source<br />

Assign...<br />

For the general operation of dialog boxes.<br />

OK<br />

Cancel<br />

Used to input or display the connected variable.<br />

Possible Settings Name of a UINT process variable<br />

Possible Values Bit 0 If 1, the ellipse is invisible.<br />

All other bits are reserved.<br />

The Assign... button opens a dialog box to select a variable for the Source field. By<br />

default, only variables of suitable types are displayed.<br />

Buttons<br />

Applies settings and closes the dialog box. If settings cannot be applied because of an error, it is<br />

indicated and the dialog box is not closed.<br />

Note:<br />

All changes are applied, including those made under different (hidden) tabs.<br />

Closes the dialog box and discards any changes made.<br />

Warning:<br />

All changes will be discarded, including those made under different (hidden) tabs.<br />

Help Displays help for this tab.<br />

3.2.1.4.2 Static Picture Element Ellipse − Properties: Colors<br />

Allows colors to be set for the ellipse.<br />

3.2.1.4.2.1 Image<br />

Allows colors to be set in the editor.<br />

Use Global<br />

Colors<br />

If this option is selected, then settings in the project options are applied to this element. Therefore,<br />

settings for foreground and background cannot be made.<br />

Foreground Selects the color for the ellipse border. This setting can only be activated if the Use Global option<br />

is not selected.<br />

Possible Settings for<br />

Full Graphic Displays<br />

Any desired color from a palette of 256 colors can be chosen. Standard<br />

palette colors are illustrated in the reference manual.<br />

Customer−specific operator panels can have their own color palettes.<br />

Correct colors are always indicated in the selection list.<br />

Possible Settings for Text and semi−graphic displays, such as those which can be connected<br />

3.2.1.4 Static Picture Element Ellipse − Reference 23


Background<br />

Fill<br />

Text and Semi−Graphic<br />

Displays<br />

to the C130 CAN controller, support only black and white colors. This is<br />

also true for the PP21 and PP41 Power Panels and their<br />

customer−specific varieties.<br />

Selects the color for ellipse shading. This setting is only active if the option Use Global is not<br />

selected and the box Fill is checked.<br />

Possible Settings for<br />

Full Graphic Displays<br />

Possible Settings for<br />

Text and Semi−Graphic<br />

Displays<br />

Any desired color from a palette of 256 colors can be chosen. Standard<br />

palette colors are illustrated in the reference manual.<br />

Customer−specific operator panels can have their own color palettes.<br />

Correct colors are always indicated in the selection list.<br />

Text and semi−graphic displays, such as those which can be connected<br />

to the C130 CAN controller, support only black and white colors. This is<br />

also true for the PP21 and PP41 Power Panels and their<br />

customer−specific varieties.<br />

If Fill is selected, the ellipse will be filled in with the background color. If not, the inside of the<br />

ellipse will be transparent.<br />

Colors variable<br />

Allows color to be manipulated with a process variable during runtime.<br />

Source<br />

Assign...<br />

Used to input or display the connected variable.<br />

Possible Settings Name of a UINT process variable<br />

Possible Values Bits 0−7 The low byte contains the ellipse background (filling)<br />

color.<br />

Bits 8−15 The high byte contains the ellipse foreground (border)<br />

color.<br />

For both of these settings, the same colors which can be used for foreground and<br />

background in the editor are possible (see above).<br />

The Assign... button opens a dialog box to select a variable for the Source field. By default, only<br />

variables of suitable types are displayed.<br />

For the general operation of dialog boxes.<br />

OK<br />

Buttons<br />

Applies settings and closes the dialog box. If settings cannot be applied because of an error, it is<br />

indicated and the dialog box is not closed.<br />

Note:<br />

All changes are applied, including those made under different (hidden) tabs.<br />

Cancel Closes the dialog box and discards any changes made.<br />

3.2.1.5 Static Picture Element Background Bitmap − Reference<br />

This picture element allows a bitmap to be displayed as a background or picture arrangement element. The<br />

bitmap to be displayed must have already been inserted in the <strong>Visual</strong> <strong>Components</strong> Bitmap Manager.<br />

The bitmap cannot be changed during runtime. If this is necessary, then an output field bitmap can be used<br />

instead.<br />

General<br />

Summary of the basic properties of this static picture element.<br />

Function Displays bitmaps.<br />

Availability<br />

Full graphics panels with bitmap support<br />

• IPC2001 and IPC5000 families with 1/4 VGA, VGA, or larger<br />

display<br />

• Power Panel PP41 (only monochrome bitmaps)<br />

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

24 3.2.1.5 Static Picture Element Background Bitmap − Reference


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

The bitmap is shown on the display as it is in the editor.<br />

Appearance Special functions:<br />

• Visible/Invisible switching using the Status process variable<br />

Properties<br />

Background bitmap properties are set under the tabs of the Properties dialog box. Field properties can also be<br />

displayed by double−clicking on the bitmap in the editor and are automatically shown after a new bitmap is<br />

inserted.<br />

All available settings are found under one tab.<br />

3.2.1.5.1 Static Picture Element Background Bitmap − Properties<br />

Provides general settings for the background bitmap static picture element.<br />

3.2.1.5.1.1 Image<br />

Bitmap<br />

Specifies the bitmap to be displayed.<br />

Used to inputs or display the bitmap to be shown.<br />

Bitmap<br />

Possible Settings Any bitmaps inserted in the project tree.<br />

Position<br />

Contains various settings for positioning the bitmap on the screen.<br />

X<br />

Specifies the position of the upper−left corner along the X axis (interval from the left display margin). Values<br />

for these parameters begin with 0 on the left margin and increase to the width of the display minus one pixel<br />

(on the right margin).<br />

Possible Settings for<br />

Full Graphic Displays<br />

The bitmap can be placed freely in the display, so that X can be set from 0 to the<br />

width of the display minus the width of the field in pixels. However, the bitmap must<br />

be able to fit completely in the display.<br />

Y Specifies the position of the upper−left corner along the Y axis (interval from the upper display margin).<br />

Values for these parameters begin with 0 on the upper margin and increase to the height of the display minus<br />

one pixel (on the lower margin).<br />

3.2.1.5 Static Picture Element Background Bitmap − Reference 25


Possible Settings for Full<br />

Graphic Displays<br />

The bitmap can be placed freely in the display, so that Y can be set from 0 to<br />

the height of the display minus the height of the field in pixels. However, the<br />

bitmap must be able to fit completely in the display.<br />

Status<br />

Contains various settings for formatting the bitmap on the screen.<br />

Source<br />

Assign...<br />

Preview<br />

Displays the selected bitmap.<br />

For the general operation of dialog boxes.<br />

OK<br />

Cancel<br />

Used to input or display the connected variable.<br />

Possible Settings Name of a UINT process variable<br />

Possible Values Bit 0 If 1, the bitmap is invisible.<br />

All other bits are reserved.<br />

The Assign... button opens a dialog box to select a variable for the Source field. By<br />

default, only variables of suitable types are displayed.<br />

Buttons<br />

Applies settings and closes the dialog box. If settings cannot be applied because of an error, it is<br />

indicated and the dialog box is not closed.<br />

Note:<br />

All changes are applied, including those made under different (hidden) tabs.<br />

Closes the dialog box and discards any changes made.<br />

Warning:<br />

All changes will be discarded, including those made under different (hidden) tabs.<br />

Help Displays help for this tab.<br />

3.2.2 Input Fields − Reference<br />

Input fields allow information to be entered into process variables in various forms. The type of input field<br />

determines the different ways that this information is used. Most input fields accept the entry of numeric and<br />

alphanumeric characters.<br />

When numeric and alphanumeric characters are entered on systems with touch screen displays, <strong>Visual</strong><br />

<strong>Components</strong> automatically adjusts the input fields on the touch screen to an appropriate display size. This<br />

happens automatically and does not have to be configured or programmed.<br />

When numeric and alphanumeric characters are entered using operator panel keys, the desired characters must<br />

first be configured on the panel keys depending on the needs of the application. There are several key levels<br />

provided as an option for doing so (max. 4).<br />

<strong>Visual</strong> <strong>Components</strong> provides input fields for all usual data types of process variables which can be entered into<br />

a visualization application.<br />

Input Field Description<br />

Numeric<br />

Input Field<br />

String Input<br />

Field<br />

Password<br />

Input Field<br />

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

This type of input field allows numeric data to be entered. When the input field is inactive, the<br />

current state of the connected variable is displayed. Therefore, this type of input field is an output<br />

field at the same time.<br />

This type of input field allows text to be input into the visualization application. When the input<br />

field is inactive, the current state of the connected variable is displayed. Therefore, this type of<br />

input field is an output field at the same time.<br />

With this type of input field, a user level (password level) can be selected by entering a<br />

corresponding password. Entered text is only evaluated internally − the application itself contains<br />

26 3.2.2 Input Fields − Reference


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

ListBox<br />

Input Field<br />

the numeric information about which user level is currently set.<br />

Up to three password−protected user levels are supported and are determined by the last corretly<br />

entered password. Levels are defined numerically: 1 for the lowest authorization up to 3 for the<br />

highest.<br />

Fewer password levels can optionally be used, but additional levels are not supported with this<br />

type of field. Entering an incorrect password changes the password level to 0.<br />

Passwords are defined in the editor during the design phase and cannot be changed during<br />

runtime. If changing a password during runtime or more password levels are necessary, then an<br />

string input field can be used instead. Password evaluation must then be programmed into the<br />

control application.<br />

This type of input field can be used to select a text from a list of texts without having to change the<br />

control variable by scrolling. A desired entry can be selected with a separate selecting key.<br />

3.2.2.1 Numeric Input Field − Reference<br />

This type of input field allows numeric data to be entered. When the input field is inactive, the current state of the<br />

connected variable is displayed. Therefore, this type of input field is an output field at the same time.<br />

General<br />

Summary of the basic properties of these types of input fields.<br />

Function Display and input of numeric process variables in text form<br />

Data Types<br />

The following data types can be used for this field:<br />

USINT, SINT, UINT, INT, UDINT, DINT, and REAL<br />

Availability This field can be used by all systems supported by <strong>Visual</strong> <strong>Components</strong>.<br />

Special<br />

Features<br />

Appearance<br />

Individual<br />

Colors<br />

Special Functions:<br />

• Value scaling for display and input<br />

• Input limiting to a selected value range<br />

• Input locking using numeric password levels (configurable) or the connected Status<br />

process variable for simple user management.<br />

• Notification during or after entry takes place using the Status and Completion Data Point<br />

process variables. This allows reactions to the input and synchronized data acquisition<br />

from external stations.<br />

The value is output as a sequence of digits on the display and is controlled using operator panel<br />

keys or the virtual keypad for touch screens.<br />

Special Functions:<br />

• Visible/Invisible switching using the Status process variable<br />

• Selectable foreground and background colors<br />

• Display of the decimal point in adjustable positions<br />

• Display of incorrect/missing variables (field filled in with hyphens '−')<br />

• Overflow display (field filled in with asterisks '*')<br />

• Optional display of preceding zeroes<br />

• Fully selectable fonts<br />

The following can be individually set for each input field of this type:<br />

• Foreground color (text color)<br />

• Background color<br />

All colors can either be set in the editor or during runtime using a process variable.<br />

Input Optional, using one or more of the following methods:<br />

• Numerically using panel keys<br />

• Numerically using the automatically displayed virtual keypad on panels with touch<br />

screens<br />

3.2.2.1 Numeric Input Field − Reference 27


• Using fully configurable Up/Down function keys (increases/decreases the value by<br />

degrees)<br />

Properties<br />

Input field properties are set under the various tabs of the Properties dialog box. Field properties can be<br />

displayed by double−clicking on the input field in the editor and are automatically shown after a new field is<br />

inserted.<br />

Available settings are described respectively on their own pages. The following list provides an outline of the<br />

possible settings (tabs), as well as references to detailed information.<br />

Parameter<br />

Colors<br />

Scaling<br />

Up/Down<br />

Completion<br />

Locking<br />

Simulation<br />

Basic parameters of input fields such as position, size, connected variable, and status are defined<br />

under this tab. Settings under this tab have to be adjusted for all input fields created.<br />

Settings under this tab can be used to specify user−defined color settings and to connect process<br />

variables for controlling colors. This is very useful for color displays, but can also be used for<br />

black/white displays.<br />

Scaling allows the value range on the PLC to be converted to another range of values on the<br />

visualization device. This means the user can select a suitable value range for calculation, editing,<br />

and display.<br />

No adjustments under this tab are necessary if the value of the variable should be displayed 1:1.<br />

The permitted input range can also be limited under this tab.<br />

Under this tab, the input field can be configured to use +/− keys. In this way, values can be<br />

increased or decreased more easily. This option is also useful for operator panel with very few<br />

keys.<br />

For normal numeric input, settings under this tab are not important.<br />

Notification setting using input in the field. This can be used to check the input value in the<br />

application or trigger other actions.<br />

These settings are optional.<br />

Using these settings, editing input fields can be restricted to certain user or password levels.<br />

If the field is not restricted, then these settings do not have to be adjusted.<br />

Allows the input of a display value for the editor's Simulation mode. In this mode, pictures for<br />

documentation can be created with the value set here displayed in the field.<br />

Inputting this information is optional.<br />

3.2.2.1.1 Numeric Input Field − Properties: Parameter<br />

Provides general settings for numeric input fields.<br />

3.2.2.1.1.1 Image<br />

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

28 3.2.2.1 Numeric Input Field − Reference


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

Format<br />

Contains various settings for formatting the field on the screen.<br />

Number of Digits<br />

Digits after Decimal<br />

Point<br />

Font<br />

Display Leading<br />

Zeroes<br />

Specifies the amount of digits which should be displayed. If a decimal point is output, then<br />

the resulting field is one character wider than is specified here.<br />

Possible Settings 1 to 10 digits for DINT, UDINT, and FLOAT process variables<br />

1 to 5 digits for other data types.<br />

The field must be able to fit in the picture with its set size and font.<br />

Specifies how many digits (of those designated in Number of Digits) should be shown<br />

after the decimal point.<br />

Possible Settings There must be at least one position before the decimal point left<br />

open. Therefore, the setting can be a maximum of Number of Digits −<br />

1.<br />

Selects the font which should be used for the input field.<br />

Possible Settings Any font in the project can be selected.<br />

If this option is selected, then open spaces before the first significant digit are filled with<br />

zeroes. Otherwise, blank spaces fill up the rest of the vacant area.<br />

Position<br />

Contains various settings for formatting the field on the screen.<br />

X<br />

Specifies the position of the upper left corner along the X axis (interval from the left display<br />

margin). Values for these parameters begin with 0 on the left margin and increase to the<br />

width of the display minus one pixel (on the right margin).<br />

Possible Settings for Full<br />

Graphic Displays<br />

Possible Settings for Text<br />

and Semi−Graphic<br />

Displays<br />

This field can be placed freely on the screen. Therefore, X can<br />

be set from 0 to the width of the display minus the width of the<br />

field in pixels.<br />

On text and semi−graphic displays, such as those which can be<br />

connected to the C130 CAN controller, fields can only be<br />

placed evenly on every sixth X−coordinate (X = 0, 6, 12, 18,<br />

etc.).<br />

3.2.2.1 Numeric Input Field − Reference 29


Y<br />

Specifies the position of the upper left corner along the Y axis (interval from the upper display<br />

margin). Values for these parameters begin with 0 on the upper margin and increase to the<br />

height of the display minus one pixel (on the lower margin).<br />

Possible Settings for Full<br />

Graphic Displays<br />

Possible Settings for Text<br />

and Semi−Graphic<br />

Displays<br />

The field can be placed freely in the display. Therefore, Y can<br />

be set from 0 to the height of the display minus the height of the<br />

field in pixels.<br />

On text and semi−graphic displays, such as those which can be<br />

connected to the C130 CAN controller, fields can only be placed<br />

evenly on every eighth Y−coordinate (Y = 0, 8, 16, 24, etc.).<br />

Data Point<br />

Allows a variable to be connected which is displayed and operated with this input field.<br />

Source<br />

Assign...<br />

Used to input or display the connected variable.<br />

Possible Settings Name of a process variable with one of the following data types:<br />

USINT, SINT, UINT, INT, UDINT, DINT, or REAL.<br />

The Assign... button opens a dialog box to select a variable for the Source field. By<br />

default, only variables of suitable types are displayed.<br />

Status<br />

Contains various settings for formatting the field on the screen.<br />

Source<br />

Assign...<br />

Preview<br />

Displays the field with the current settings.<br />

For the general operation of dialog boxes.<br />

OK<br />

Cancel<br />

Used to input or display the connected variable.<br />

Possible Settings Name of a UINT process variable<br />

Possible Values Bit 0 If 1, the input field is invisible.<br />

Bit 1 If 1, then input is locked.<br />

Bit 14 Is set to 1 while the input field has the focus (is<br />

highlighted). The focus determines which input field is to<br />

accept input from the operator panel.<br />

If the input field loses the focus, then this bit is reset back<br />

to 0.<br />

Bit 15 Is set to 1 while the input field is activated (the value in the<br />

input field is being edited). It will be set back to 0 after the<br />

input has been completed or cancelled.<br />

All other bits are reserved.<br />

The Assign... button opens a dialog box to select a variable for the Source field. By<br />

default, only variables of suitable types are displayed.<br />

Buttons<br />

Applies settings and closes the dialog box. If settings cannot be applied because of an error, it is<br />

indicated and the dialog box is not closed.<br />

Note:<br />

All changes are applied, including those made under different (hidden) tabs.<br />

Closes the dialog box and discards any changes made.<br />

Warning:<br />

All changes will be discarded, including those made under different (hidden) tabs.<br />

Help Displays help for this tab.<br />

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

30 3.2.2.1 Numeric Input Field − Reference


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

3.2.2.1.2 Numeric Input Field − Properties: Colors<br />

Allows colors to be set for the field's display.<br />

3.2.2.1.2.1 Image<br />

Allows colors to be set in the editor.<br />

Use Global<br />

Foreground<br />

Background<br />

Colors<br />

If this option is selected, then settings in the project options are applied to this input field.<br />

Therefore, settings for foreground and background cannot be made.<br />

Selects the text color used for this input field. This setting can only be activated if the Use Global<br />

option is not selected.<br />

Possible Settings for<br />

Full Graphic Displays<br />

Possible Settings for<br />

Text and Semi−Graphic<br />

Displays<br />

Any desired color from a palette of 256 colors can be chosen. Standard<br />

palette colors are illustrated in the reference manual.<br />

Customer−specific operator panels can have their own color palettes.<br />

Correct colors are always indicated in the selection list.<br />

Text and semi−graphic displays, such as those which can be connected<br />

to the C130 CAN controller, support only black and white colors. This is<br />

also true for the PP21 and PP41 Power Panels and their<br />

customer−specific varieties.<br />

Selects the input field's background color. This setting can only be activated if the Use Global<br />

option is not selected.<br />

Possible Settings for<br />

Full Graphic Displays<br />

Possible Settings for<br />

Text and Semi−Graphic<br />

Displays<br />

Any desired color from a palette of 256 colors can be chosen. Standard<br />

palette colors are illustrated in the reference manual.<br />

Customer−specific operator panels can have their own color palettes.<br />

Correct colors are always indicated in the selection list.<br />

Text and semi−graphic displays, such as those which can be connected<br />

to the C130 CAN controller, support only black and white colors. This is<br />

also true for the PP21 and PP41 Power Panels and their<br />

customer−specific varieties.<br />

Colors variable<br />

Allows color to be manipulated with a process variable during runtime.<br />

3.2.2.1 Numeric Input Field − Reference 31


Source<br />

Assign...<br />

Used to input or display the connected variable.<br />

Possible Settings Name of a UINT process variable<br />

Possible Values Bits 0−7 The low byte contains the input field background<br />

color.<br />

Bits 8−15 The high byte contains the input field text color.<br />

For both of these settings, the same colors which can be used for foreground and<br />

background in the editor are possible (see above).<br />

The Assign... button opens a dialog box to select a variable for the Source field. By default, only<br />

variables of suitable types are displayed.<br />

For the general operation of dialog boxes.<br />

OK<br />

Cancel<br />

Buttons<br />

Applies settings and closes the dialog box. If settings cannot be applied because of an error, it is<br />

indicated and the dialog box is not closed.<br />

Note:<br />

All changes are applied, including those made under different (hidden) tabs.<br />

Closes the dialog box and discards any changes made.<br />

Warning:<br />

All changes will be discarded, including those made under different (hidden) tabs.<br />

Help Displays help for this tab.<br />

3.2.2.1.3 Numeric Input Field − Properties: Scaling/Limits<br />

Enables flexible scaling of displayed or entered values.<br />

3.2.2.1.3.1 Image<br />

Enables scaling for this input field<br />

Scaling<br />

Active<br />

Scaling/Limits<br />

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

If this option is selected, the value in the input field is scaled, and input is then limited to the<br />

specified value range.<br />

32 3.2.2.1 Numeric Input Field − Reference


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

Otherwise, the actual numeric value of the process variable is displayed, and input is limited only<br />

by the connected variable data type.<br />

The other fields under this tab are only enabled when this option is selected.<br />

PLC Value Range<br />

Specifies the allowed value range on the controller for the connected process variable. The range set here is<br />

scaled to the range set under Scaled Value Range for the display and input of the value in the input field.<br />

Parameters<br />

from PLC<br />

0% Value<br />

0% Source<br />

Assign...<br />

100% Value<br />

100% Source<br />

Assign...<br />

This field determines whether a 0% value and a 100% value are input in the editor (box<br />

unchecked) or if a process variable should be selected during runtime (box checked).<br />

The dialog box displays the necessary configuration fields which correspond to this setting.<br />

Specifies the lower limit of the permitted value range for the process variable on the PLC. This<br />

setting is only available if Parameters from PLC is not selected.<br />

Possible Settings Corresponds to the value range of the connected process variable.<br />

Defines the process variable which contains the lower limit of the value range for the variable<br />

processed with this input field on the PLC during runtime. This setting is only available if<br />

Parameters from PLC is selected.<br />

Possible Settings Name of a variable with the same data type as the variable connected to<br />

the input field. This variable can accept values like those defined under<br />

0% Value.<br />

The Assign... button opens a dialog box to select a variable for the 0% Source field. By default,<br />

only variables of suitable types are displayed.<br />

Specifies the upper limit of the permitted value range for the process variable on the PLC. This<br />

setting is only available if Parameters from PLC is not selected.<br />

Possible Settings Corresponds to the value range of the connected process variable.<br />

Defines the process variable which contains the upper limit of the value range for the variable<br />

processed with this input field on the PLC during runtime. This setting is only available if<br />

Parameters from PLC is selected.<br />

Possible Settings Name of a variable with the same data type as the variable connected to<br />

the input field. This variable can accept values like those defined under<br />

100% Value.<br />

The Assign... button opens a dialog box to select a variable for the 100% Source field. By<br />

default, only variables of suitable types are displayed.<br />

Scaled Value Range<br />

Specifies the permitted value range for the variable input and display in the visualization application. During<br />

input and display, this range is scaled to the process variable range set under PLC Value Range.<br />

Parameters<br />

from PLC<br />

This field determines whether a 0% value and a 100% value are input in the editor (box<br />

unchecked) or if a process variable should be selected during runtime (box checked).<br />

The dialog box displays the necessary configuration fields which correspond to this setting.<br />

0% Value Specifies the lower limit of the permitted value range for the process variable on the control<br />

panel.<br />

Possible Settings Possible settings are limited by the input field width in<br />

characters so that limits can be entered and represented in the<br />

input field.<br />

In addition, input is limited by the connected variable data type<br />

as follows.<br />

USINT SINT Value range from −99999 to 99999 (limited by<br />

3.2.2.1 Numeric Input Field − Reference 33


0% Source<br />

Assign...<br />

100% Value<br />

INT UINT the maximum input field width of 5 characters).<br />

DINT Value range from −2147483648 to 2147483647<br />

UDINT Value range from 0 to 4294967295<br />

REAL Value range from −9999999999 to 9999999999<br />

These specifications apply when no decimal places are set. If<br />

decimal places are used, the specification refers to the units in<br />

the selected definition.<br />

Example:<br />

A SINT variable can be scaled from −999.99 to +999.99 when 2<br />

set decimal places are used.<br />

In this way, invalid input is automatically corrected to valid data.<br />

Defines the process variable which contains the lower limit of the value range for the variable<br />

processed with this input field on the control panel during runtime. This setting is only available<br />

if Parameters from PLC is selected.<br />

Possible Settings Variables with the following data types can be connected to this property<br />

depending on the data type of the variable connected to the input field.<br />

USINT SINT Variables of data types USINT, SINT, INT, UINT, or DINT<br />

INT UINT DINT can be used independent of the data point of the<br />

connected variable.<br />

UDINT UDINT<br />

REAL REAL<br />

(The data type has to be able to accept the desired limits<br />

during runtime!)<br />

This variable can accept values like those defined under 0% Value.<br />

The Assign... button opens a dialog box to select a variable for the 0% Source field. By default,<br />

only variables of suitable types are displayed.<br />

Specifies the upper limit of the allowed value range for the process variable on the control<br />

panel.<br />

Possible Settings Possible settings are limited by the input field width in<br />

characters so that limits can be entered and represented in the<br />

input field.<br />

In addition, input is limited by the connected variable data type<br />

as follows.<br />

USINT SINT<br />

INT UINT<br />

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

Value range from −99999 to 99999 (limited by<br />

the maximum input field width to 5 characters).<br />

DINT Value range from −2147483648 to 2147483647<br />

UDINT Value range from 0 to 4294967295<br />

REAL Value range from −9999999999 to 9999999999<br />

These specifications apply when no decimal places are set. If<br />

decimal places are used, the specification refers to the units in<br />

the selected definition.<br />

Example:<br />

A SINT variable can be scaled from −999.99 to +999.99 when 2<br />

decimal places are set.<br />

In this way, invalid input is automatically corrected to valid data.<br />

34 3.2.2.1 Numeric Input Field − Reference


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

100% Source<br />

Assign...<br />

Determines the process variable which contains the upper limit of the value range for the<br />

variable processed with this input field on the control panel during runtime. This setting is only<br />

available if Parameters from PLC is selected.<br />

Possible Settings Depending on the data type of the variable connected to the input field,<br />

variables with the following data types can be connected:<br />

USINT SINT Variables of data types USINT, SINT, INT, UINT, or DINT<br />

INT UINT DINT can be used independent of the data point of the<br />

connected variable.<br />

UDINT UDINT<br />

REAL REAL<br />

(The data type has to be able to accept the desired limits<br />

during runtime!)<br />

This variable can accept values like those defined under 100% Value.<br />

The Assign... button opens a dialog box to select a variable for the 100% Source field. By<br />

default, only variables of suitable types are displayed.<br />

Shift Decimal Point<br />

Using this setting, the decimal point in the input field can be moved during runtime using a variable from the<br />

control application.<br />

This setting is only available if Scaling Active is selected under this tab and at least 1 decimal place is specified<br />

in the Digits after Decimal Point field under the Parameter tab (otherwise, there is no space set aside for the<br />

decimal point).<br />

Warning!<br />

To guarantee that a field using dynamic decimal shifts acts the same way as a field with decimal places fixed<br />

when the same number of decimal places are used, decimal point shifting accesses the maximum value of the<br />

display scaling. The maximum value is multiplied by 10 for each addition decimal place which results. This can<br />

lead to problems recognizing the maximum allowed input value since it may be that the configuration input limit<br />

has to be shifted down by the additional decimal position to provide the automatic input standardization.<br />

Example:<br />

Configured: 0 − 10000 PLC value range; 0 − 1000 Display value range<br />

1 fixed decimal place.<br />

The field (UINT variable ) has a maximum of 7 places available (5 for the value range + 1 for the decimal + 1 for<br />

the sign). −−> 6 places available for numeric display.<br />

Input: 1000 becomes 1000.0. If one decimal place is now added, then inputting 1000 will lead to the correct<br />

value on the PLC (= 10000), but it wouldn't be able to displayed on the screen since it would be output as<br />

'1000.00', requiring 7 characters.<br />

Result: The Runtime evaluates it as an transgression but can't standardize the value since it cannot be<br />

displayed.<br />

Therefore, you should pay attention to the following during configuration:<br />

− What is the maximum amount of decimal places that I want to use?<br />

− If the most amount of decimal places is used with the maximum input value, can the value still be displayed?<br />

Source<br />

Determines the process variable which contains the number of additional decimal places to be<br />

displayed. If fewer decimal places should be displayed, then the value of the variable has to be<br />

negative. The resulting number of decimal places is determined by adding the value of this process<br />

variable with the value set in the Digits after Decimal Place field under the Parameter tab. This<br />

number must be able to fit in the selected field size.<br />

Possible Settings Name of a process variable of type USINT (default) or SINT. Data type SINT must<br />

be used if negative decimal point shifts are necessary (fewer decimal places).<br />

Assign... The Assign... button opens a dialog box to select a variable for the Source field. By default, only<br />

variables of suitable types are displayed.<br />

3.2.2.1 Numeric Input Field − Reference 35


Note:<br />

The Type−Filter button must be unchecked in the dialog box to select a variable of type SINT.<br />

For the general operation of dialog boxes.<br />

OK<br />

Cancel<br />

Buttons<br />

Applies settings and closes the dialog box. If settings cannot be applied because of an error, it is<br />

indicated and the dialog box is not closed.<br />

Note:<br />

All changes are applied, including those made under different (hidden) tabs.<br />

Closes the dialog box and discards any changes made.<br />

Warning:<br />

All changes will be discarded, including those made under different (hidden) tabs.<br />

Help Displays help for this tab.<br />

3.2.2.1.4 Numeric Input Field − Properties: Up/Down<br />

Allows input using Up/Down keys in place of numeric input. If Up/Down input is enabled, then it is no longer<br />

possible to use the numeric keypad or the touch pad for input. Keys for Up/Down input are configured in the<br />

picture settings and apply for the entire page.<br />

3.2.2.1.4.1 Image<br />

Settings for changing the variable using Up/Down keys<br />

Up/Down<br />

Input<br />

UpDown<br />

Enables up/down input for this input field. The value in the input field can be increased or<br />

decreased via the keys displayed below if the input field is highlighted (is the active input field).<br />

For the general operation of dialog boxes.<br />

Buttons<br />

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

OK Applies settings and closes the dialog box. If settings cannot be applied because of an error, it is<br />

indicated and the dialog box is not closed.<br />

36 3.2.2.1 Numeric Input Field − Reference


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

Cancel<br />

Note:<br />

All changes are applied, including those made under different (hidden) tabs.<br />

Closes the dialog box and discards any changes made.<br />

Warning:<br />

All changes will be discarded, including those made under different (hidden) tabs.<br />

Help Displays help for this tab.<br />

3.2.2.1.5 Numeric Input Field − Properties: Completion<br />

Allows notification about input in the input field.<br />

3.2.2.1.5.1 Image<br />

Completion Data Point<br />

Sets the connected variable to a fixed value each time the field is processed.<br />

Source<br />

Assign...<br />

Completion<br />

Value<br />

Used to input or display the connected variable.<br />

Possible Settings Name of a UINT process variable. The same variable can be<br />

connected to several input fields as a completion data point.<br />

Possible Values The variable is set to the value in Completion value after the input<br />

field is processed by the user of <strong>Visual</strong> <strong>Components</strong> Runtime.<br />

<strong>Visual</strong> <strong>Components</strong> does not further evaluate the connected<br />

variable.<br />

The Assign... button opens a dialog box to select a variable for the Source field. By default, only<br />

variables of suitable types are displayed.<br />

After the input field is processed, the value is written to the process variable specified under<br />

Source.<br />

Possible Settings Any acceptable value for variables of type UINT (0 to 65535)<br />

For the general operation of dialog boxes.<br />

OK<br />

Buttons<br />

3.2.2.1 Numeric Input Field − Reference 37


Cancel<br />

Applies settings and closes the dialog box. If settings cannot be applied because of an error, it is<br />

indicated and the dialog box is not closed.<br />

Note:<br />

All changes are applied, including those made under different (hidden) tabs.<br />

Closes the dialog box and discards any changes made.<br />

Warning:<br />

All changes will be discarded, including those made under different (hidden) tabs.<br />

Help Displays help for this tab.<br />

3.2.2.1.6 Numeric Input Field − Properties: Locking<br />

Allows the input field to be locked depending on the current user or password entered.<br />

3.2.2.1.6.1 Image<br />

Enables input field locking<br />

Locking Active<br />

Locking<br />

If selected, this input field can be locked during runtime. A locked input field is displayed but<br />

cannot be highlighted or accept new input.<br />

Locking only affects the input field, not the connected variable. Another input field on the<br />

same page can allow a different value to be written to the process variable even if this field is<br />

locked.<br />

The other options under this tab can only be enabled when this option is selected.<br />

Password for Locking<br />

Defines the variable holding the current password level. Password levels are managed as numeric values. They<br />

can be provided either via the password input field or the application.<br />

Source Used to input or display the connected variable.<br />

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

Possible Settings Name of a USINT process variable. The same variable can be and usually is<br />

used as a password level for several input fields.<br />

38 3.2.2.1 Numeric Input Field − Reference


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

Assign...<br />

Possible Values <strong>Visual</strong> <strong>Components</strong> supports up to 63 (0−63) password levels<br />

The Assign... button opens a dialog box to select a variable for the Source field. By default, only<br />

variables of suitable types are displayed.<br />

Input locked if...<br />

Determines which conditions must be met for input to be locked.<br />

Input locked if...<br />

Password Level<br />

Defines a logical condition under which the input is locked. Any of the following settings can be<br />

selected:<br />

Password level is 0 The field is locked when the connected Password process variable has<br />

the value 0. In every other case, the input is unlocked.<br />

Password value<br />

< Level<br />

Password value<br />

>= Level<br />

The field is locked when the process variable connected to the<br />

Password has a smaller value than is shown in the Password Level<br />

field. If the value of the variable is larger or equal to the contents of the<br />

Password Level field, then the input field will be unlocked.<br />

The field is locked if the process variable connected to Password has a<br />

larger or equal value than the value shown in the Password Level field.<br />

If the contents of the variable are smaller than the value in the<br />

Password Level field, then the input field will be unlocked.<br />

Defines the comparative value for the settings Password < Level and Password >= Level under<br />

Input Locked If....<br />

Possible Settings 0 to 63<br />

For the general operation of dialog boxes.<br />

OK<br />

Cancel<br />

Buttons<br />

Applies settings and closes the dialog box. If settings cannot be applied because of an error, it is<br />

indicated and the dialog box is not closed.<br />

Note:<br />

All changes are applied, including those made under different (hidden) tabs.<br />

Closes the dialog box and discards any changes made.<br />

Warning:<br />

All changes will be discarded, including those made under different (hidden) tabs.<br />

Help Displays help for this tab.<br />

3.2.2.1.7 Numeric Input Field − Properties: Simulation<br />

Input of the displayed value in the editor's Simulation mode.<br />

3.2.2.1.7.1 Image<br />

3.2.2.1 Numeric Input Field − Reference 39


Simulation Value<br />

Determines the value which should be shown in the input field during the editor's Simulation mode. Simulation<br />

mode can be used to create visualization pictures for product documentation. <strong>Visual</strong> <strong>Components</strong> does not use<br />

these settings in any other place.<br />

Simulation<br />

Value<br />

CharBox<br />

Desired display of the input field as a character string in Simulation mode.<br />

Possible Settings Any character string which can be displayed in the input field as a result of its<br />

set length. <strong>Visual</strong> <strong>Components</strong> does not check the format or the value of the<br />

input.<br />

The entire character set of the selected font can be displayed using this button. Characters can<br />

therefore be input that are not available with the current keyboard settings. A character can be<br />

inserted into the Simulation Value field by double clicking on it in the CharBox.<br />

It is displayed using the input field's set font.<br />

Possible Settings Settings<br />

For the general operation of dialog boxes.<br />

OK<br />

Cancel<br />

Buttons<br />

Applies settings and closes the dialog box. If settings cannot be applied because of an error, it is<br />

indicated and the dialog box is not closed.<br />

Note:<br />

All changes are applied, including those made under different (hidden) tabs.<br />

Closes the dialog box and discards any changes made.<br />

Warning:<br />

All changes will be discarded, including those made under different (hidden) tabs.<br />

Help Displays help for this tab.<br />

3.2.2.2 String Input Field − Reference<br />

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

This type of input field allows text to be input into the visualization application. When the input field is inactive,<br />

the current state of the connected variable is displayed. Therefore, this type of input field is an output field at the<br />

same time.<br />

40 3.2.2.2 String Input Field − Reference


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

General<br />

Summary of the basic properties of these types of input fields.<br />

Function Displays and inputs text from and in process variables of type STRING[]<br />

Data Types<br />

Availability<br />

Special Features<br />

Appearance<br />

Individual Colors<br />

Input<br />

The following data types can be used for this field:<br />

STRING[]<br />

This field can be used by all systems supported by <strong>Visual</strong> <strong>Components</strong>.<br />

Depending on the number of panel keys, it may not be possible to input all characters<br />

via the panel itself. However, this does not diminish the basic function of the input field.<br />

Special Functions:<br />

• Support of additional keys for cursor navigation and tabulator control for<br />

convenient input.<br />

• Editing of text longer than the field allows by scrolling field content.<br />

• Input locking using numeric password levels (configurable) or the connected<br />

Status process variable for simple user management.<br />

• Notification during or after entry takes place using the Status and Completion<br />

Data Point process variables. This allows reactions to the input and<br />

synchronized data acquisition from external stations.<br />

The value is output as a series of characters on the display and is controlled via<br />

operator panel keys or the virtual keypad on touch screens.<br />

Special Functions:<br />

• Visible/Invisible switching using the Status process variable<br />

• Selectable foreground and background colors<br />

• Display of incorrect/missing variables (field filled in with hyphens '−')<br />

• Fully selectable fonts<br />

The following can be individually set for each input field of this type:<br />

• Foreground color (text color)<br />

• Background color<br />

All colors can either be set in the editor or during runtime using a process variable.<br />

Optional, using one or more of the following methods:<br />

• Character input using panel keys<br />

• Using the automatically displayed virtual keypad on panels with touch screens<br />

When panel keys are used to input, additional keys can be configured for convenient<br />

cursor navigation. The virtual keypad automatically displayed on touch screens provides<br />

these possibilities automatically (1/4 VGA system touch screens are limited by space<br />

and only provide a portion of the possible keys).<br />

Properties<br />

Input field properties are set under the various tabs of the Properties dialog box. Field properties can be<br />

displayed by double−clicking on the input field in the editor and are automatically shown after a new field is<br />

inserted.<br />

Available settings are described respectively on their own pages. The following list provides an outline of the<br />

possible settings (tabs), as well as references to detailed information.<br />

Parameter<br />

Colors<br />

Basic parameters of input fields such as position, size, connected variable, and status are defined<br />

under this tab. Settings under this tab have to be adjusted for all input fields created.<br />

Settings under this tab can be used to specify user−defined color settings and to connect process<br />

variables for controlling colors. This is very useful for color displays, but can also be used for<br />

black/white displays.<br />

Keys Allows additional keys to be configured for cursor navigation and tabulator control (TAB) for<br />

systems with operator panel keys. These settings make it easier to input but are not absolutely<br />

3.2.2.2 String Input Field − Reference 41


Completion<br />

Locking<br />

Simulation<br />

necessary.<br />

In addition, the input field's edit mode is set under this tab. This mode affects both the handling of<br />

panel keys and the keypad automatically displayed on touch systems.<br />

Notification setting using input in the field. This can be used to check the input value in the<br />

application or trigger other actions.<br />

These settings are optional.<br />

Using these settings, editing input fields can be restricted to certain user or password levels.<br />

If the field is not restricted, then these settings do not have to be adjusted.<br />

Allows the input of a display value for the editor's Simulation mode. In this mode, pictures for<br />

documentation can be created with the value set here displayed in the field.<br />

Inputting this information is optional.<br />

3.2.2.2.1 String Input Field − Properties: Parameter<br />

Provides the settings for the string input field.<br />

3.2.2.2.1.1 Image<br />

Format<br />

Contains various settings for formatting the field on the screen.<br />

Number of Characters<br />

Font<br />

Specifies the number of characters which should be displayed. The text may be longer<br />

than the width of the input field. During editing the text is scrolled so that the field is<br />

visible.<br />

Possible Settings The field must be able to fit in the picture with its set size and font.<br />

The entered and displayed text cannot be longer than the space<br />

provided for the connected variable (i.e. array elements of type<br />

STRING).<br />

Selects the font which should be used for this input field.<br />

Possible Settings Any font in the project can be selected.<br />

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

42 3.2.2.2 String Input Field − Reference


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

Position<br />

Specifies the position of the input field in pixels on the screen.<br />

X<br />

Y<br />

Specifies the position of the upper left corner along the X axis (interval from the left display<br />

margin). Values for these parameters begin with 0 on the left margin and increase to the<br />

width of the display minus one pixel (on the right margin).<br />

Possible Settings for Full<br />

Graphic Displays<br />

Possible Settings for Text<br />

and Semi−Graphic<br />

Displays<br />

This field can be placed freely on the screen. Therefore, X can<br />

be set from 0 to the width of the display minus the width of the<br />

field in pixels.<br />

On text and semi−graphic displays, such as those which can be<br />

connected to the C130 CAN controller, fields can only be<br />

placed evenly on every sixth X−coordinate (X = 0, 6, 12, 18,<br />

etc.).<br />

Specifies the position of the upper left corner along the Y axis (interval from the upper display<br />

margin). Values for these parameters begin with 0 on the upper margin and increase to the<br />

height of the display minus one pixel (on the lower margin).<br />

Possible Settings for Full<br />

Graphic Displays<br />

Possible Settings for Text<br />

and Semi−Graphic<br />

Displays<br />

The field can be placed freely in the display. Therefore, Y can<br />

be set from 0 to the height of the display minus the height of the<br />

field in pixels.<br />

On text and semi−graphic displays, such as those which can be<br />

connected to the C130 CAN controller, fields can only be placed<br />

evenly on every eighth Y−coordinate (Y = 0, 8, 16, 24, etc.).<br />

Destination Data Point<br />

Allows a variable to be connected which is displayed and operated with this input field.<br />

Source<br />

Assign...<br />

Used to input or display the connected variable.<br />

Possible Settings Name of a process variable of data type STRING [] (array of variables of data<br />

type STRING, ANSI C programmers must use data type plcstring[])<br />

The Assign... button opens a dialog box to select a variable for the Source field. By default, only<br />

variables of suitable types are displayed.<br />

It must be noted that the entire array is selected, not just one element from it.<br />

Status<br />

Contains various settings for formatting the field on the screen.<br />

Source<br />

Assign...<br />

Used to input or display the connected variable.<br />

Possible Settings Name of a UINT process variable<br />

Possible Values Bit 0 If 1, the input field is invisible.<br />

Bit 1 If 1, then input is locked.<br />

Bit 14 Is set to 1 while the input field has the focus (is<br />

highlighted). The focus determines which input field is to<br />

accept input from the operator panel.<br />

If the input field loses the focus, then this bit is reset back<br />

to 0.<br />

Bit 15 Is set to 1 while the input field is activated (the value in the<br />

input field is being edited). It will be set back to 0 after the<br />

input has been completed or cancelled.<br />

All other bits are reserved.<br />

The Assign... button opens a dialog box to select a variable for the Source field. By<br />

default, only variables of suitable types are displayed.<br />

3.2.2.2 String Input Field − Reference 43


Preview<br />

Displays the field with the current settings.<br />

For the general operation of dialog boxes.<br />

OK<br />

Cancel<br />

Buttons<br />

Applies settings and closes the dialog box. If settings cannot be applied because of an error, it is<br />

indicated and the dialog box is not closed.<br />

Note:<br />

All changes are applied, including those made under different (hidden) tabs.<br />

Closes the dialog box and discards any changes made.<br />

Warning:<br />

All changes will be discarded, including those made under different (hidden) tabs.<br />

Help Displays help for this tab.<br />

3.2.2.2.2 String Input Field − Properties: Colors<br />

Allows colors to be set for the field's display.<br />

3.2.2.2.2.1 Image<br />

Allows colors to be set in the editor.<br />

Use Global<br />

Colors<br />

If this option is selected, then settings in the project options are applied to this input field.<br />

Therefore, settings for foreground and background cannot be made.<br />

Foreground Selects the text color used for this input field. This setting can only be activated if the Use Global<br />

option is not selected.<br />

Possible Settings for<br />

Full Graphic Displays<br />

Possible Settings for<br />

Text and Semi−Graphic<br />

Displays<br />

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

Any desired color from a palette of 256 colors can be chosen. Standard<br />

palette colors are illustrated in the reference manual.<br />

Customer−specific operator panels can have their own color palettes.<br />

Correct colors are always indicated in the selection list.<br />

Text and semi−graphic displays, such as those which can be connected<br />

to the C130 CAN controller, support only black and white colors. This is<br />

also true for the PP21 and PP41 Power Panels and their<br />

44 3.2.2.2 String Input Field − Reference


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

Background<br />

customer−specific varieties.<br />

Selects the input field's background color. This setting can only be activated if the Use Global<br />

option is not selected.<br />

Possible Settings for<br />

Full Graphic Displays<br />

Possible Settings for<br />

Text and Semi−Graphic<br />

Displays<br />

Any desired color from a palette of 256 colors can be chosen. Standard<br />

palette colors are illustrated in the reference manual.<br />

Customer−specific operator panels can have their own color palettes.<br />

Correct colors are always indicated in the selection list.<br />

Text and semi−graphic displays, such as those which can be connected<br />

to the C130 CAN controller, support only black and white colors. This is<br />

also true for the PP21 and PP41 Power Panels and their<br />

customer−specific varieties.<br />

Colors variable<br />

Allows color to be manipulated with a process variable during runtime.<br />

Source<br />

Assign...<br />

Used to input or display the connected variable.<br />

Possible Settings Name of a UINT process variable<br />

Possible Values Bits 0−7 The low byte contains the input field background<br />

color.<br />

Bits 8−15 The high byte contains the input field text color.<br />

For both of these settings, the same colors which can be used for foreground and<br />

background in the editor are possible (see above).<br />

The Assign... button opens a dialog box to select a variable for the Source field. By default, only<br />

variables of suitable types are displayed.<br />

For the general operation of dialog boxes.<br />

OK<br />

Cancel<br />

Buttons<br />

Applies settings and closes the dialog box. If settings cannot be applied because of an error, it is<br />

indicated and the dialog box is not closed.<br />

Note:<br />

All changes are applied, including those made under different (hidden) tabs.<br />

Closes the dialog box and discards any changes made.<br />

Warning:<br />

All changes will be discarded, including those made under different (hidden) tabs.<br />

Help Displays help for this tab.<br />

3.2.2.2.3 String Input Field − Properties: Keys<br />

Allows additional keys to be set for conveniently editing string input. These settings only matter for the<br />

corresponding input field and only so long as it is highlighted (has the keyboard focus).<br />

In addition, the field's edit mode is set here.<br />

3.2.2.2.3.1 Image<br />

3.2.2.2 String Input Field − Reference 45


Keys<br />

Defines additional keys to conveniently edit strings on the visualization device. All settings are optional, and<br />

keys which have already been assigned a corresponding function are not available.<br />

Cursor Left<br />

key<br />

Cursor<br />

Right key<br />

Delete key<br />

Backspace<br />

key<br />

With this assigned function key, the cursor moves one character to the left without altering the<br />

input. If the cursor is already in the furthest leftmost position, pressing this key is ignored.<br />

This only applies to the input field for which this setting is active.<br />

Possible Settings Any unassigned function key on the operator panel can be configured for this<br />

action. The same function key can be used for several input fields as a cursor<br />

key or for other field−specific key functions.<br />

With this assigned function key, the cursor moves one character to the right without altering the<br />

input. If the cursor is already in the furthest rightmost position, pressing this key is ignored. The<br />

cursor can be inserted after the last input character so that new input can be added onto the end.<br />

This only applies to the input field for which this setting is active.<br />

Possible Settings Any unassigned function key on the operator panel can be configured for this<br />

action. The same function key can be used for several input fields as a cursor<br />

key or for other field−specific key functions.<br />

The characters under the cursor are deleted using this assigned function key. The remaining<br />

characters to the right of the cursor are moved back accordingly. If the cursor is at the end of the<br />

input so that it is not under any characters, then pressing this key is ignored.<br />

This only applies to the input field for which this setting is active.<br />

Possible Settings Any unassigned function key on the operator panel can be configured for this<br />

action. The same function key can be used for several input fields as a cursor<br />

key or for other field−specific key functions.<br />

With this assigned function key the characters left of the cursor are deleted. The cursor and the<br />

remaining characters are moved to the left accordingly. If the cursor is already in the leftmost<br />

position or the input field is empty, then pressing this key is ignored.<br />

This only applies to the input field for which this setting is active.<br />

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

Possible Settings Any unassigned function key on the operator panel can be configured for this<br />

action. The same function key can be used for several input fields as a cursor<br />

46 3.2.2.2 String Input Field − Reference


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

key or for other field−specific key functions.<br />

Tabulator<br />

Allows a key to be assigned for tabulator (TAB) movement. Pressing this key moves the cursor several<br />

characters towards the end of the input (to the right). In doing so, the input in the field is not altered as would<br />

normally occur on a PC.<br />

Auto Tab Mode<br />

Tab key<br />

Tab Distance<br />

If this option is selected and the Tab key is pressed, the cursor will move to the position that<br />

follows the next non−alphabetic character. Generally, this will move the cursor to the next word.<br />

Punctuation and numbers are considered separators and are skipped over.<br />

If this option is selected, then the Tab Distance setting has no effect.<br />

The cursor can be moved several characters to the right using this assigned function key. The<br />

number of characters the cursor moves is set with AutoTab Mode or Tab Distance. If the cursor<br />

is already too far to the right to move the set tabulator distance, it moves to the end of the input.<br />

If the cursor is already at the end of the input, then pressing this button is ignored.<br />

This only applies to the input field for which this setting is active.<br />

Possible Settings Any unassigned function key on the operator panel can be configured for<br />

this action. The same function key can be used for several input fields as a<br />

cursor key or for other field−specific key functions.<br />

Using this setting, the distance of the cursor tabulator movement to the right can be set. This<br />

setting is only considered when the option Auto Tabulator is not enabled.<br />

Possible Settings Values from 1 to 9 can be set using the up and down buttons. Any<br />

value between 1 and one less than the width of the field is possible.<br />

Mode<br />

Sets the input field's edit mode. This determines whether the existing input is edited or replaced, and whether<br />

characters are displayed normally or hidden, as is the case with passwords.<br />

Edit Mode Specifies how the existing field contents should be edited or replaced. The<br />

following settings can be selected:<br />

Edit In this mode, an input field is edited normally. If the content<br />

should be changed, then the previous contents must first<br />

be deleted using the Delete and/or Backspace keys.<br />

Clear In this mode, the previously existing text is basically<br />

overwritten. Editing the old text is not possible since it is<br />

deleted when the first key is pressed to enter new input in<br />

the active field.<br />

Key−Dependent This mode combines the two previous modes depending<br />

on the first key used when editing the field.<br />

If the first key pressed is a cursor key, then the appropriate<br />

cursor movement occurs and the text is preserved. This<br />

behavior corresponds to Edit mode.<br />

In every other case, the text is completely replaced. This<br />

behavior corresponds then to Clear mode.<br />

Password This mode functions basically the same way as Clear<br />

mode except the characters entered (or the existing<br />

characters) are not displayed on the screen. Instead, a<br />

definable substitute character is displayed for each input<br />

character.<br />

In this way, password entry (and similar data) can be input<br />

without having to be displayed on the screen.<br />

3.2.2.2 String Input Field − Reference 47


Password Char<br />

For the general operation of dialog boxes.<br />

OK<br />

Cancel<br />

The characters to be displayed in place of the actual<br />

characters can be set in Password Char. An asterisk (*) is<br />

used by default.<br />

This setting is important in Password mode and specifies the character that<br />

should be output in place of displaying characters which are input. The<br />

character checks that something was entered but does not supply any<br />

information about what it actually was.<br />

Possible Settings Any individual character which exists in the input<br />

field's font set can be chosen. The corresponding<br />

(chosen) character is input directly into the field.<br />

Default Setting * (asterisk)<br />

Buttons<br />

Applies settings and closes the dialog box. If settings cannot be applied because of an error, it is<br />

indicated and the dialog box is not closed.<br />

Note:<br />

All changes are applied, including those made under different (hidden) tabs.<br />

Closes the dialog box and discards any changes made.<br />

Warning:<br />

All changes will be discarded, including those made under different (hidden) tabs.<br />

Help Displays help for this tab.<br />

3.2.2.2.4 String Input Field − Properties: Completion<br />

Allows notification about input in the input field.<br />

3.2.2.2.4.1 Image<br />

Completion Data Point<br />

Sets the connected variable to a fixed value each time the field is processed.<br />

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

48 3.2.2.2 String Input Field − Reference


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

Source<br />

Assign...<br />

Completion<br />

Value<br />

Used to input or display the connected variable.<br />

Possible Settings Name of a UINT process variable. The same variable can be<br />

connected to several input fields as a completion data point.<br />

Possible Values The variable is set to the value in Completion value after the input<br />

field is processed by the user of <strong>Visual</strong> <strong>Components</strong> Runtime.<br />

<strong>Visual</strong> <strong>Components</strong> does not further evaluate the connected<br />

variable.<br />

The Assign... button opens a dialog box to select a variable for the Source field. By default, only<br />

variables of suitable types are displayed.<br />

After the input field is processed, the value is written to the process variable specified under<br />

Source.<br />

Possible Settings Any acceptable value for variables of type UINT (0 to 65535)<br />

For the general operation of dialog boxes.<br />

OK<br />

Cancel<br />

Buttons<br />

Applies settings and closes the dialog box. If settings cannot be applied because of an error, it is<br />

indicated and the dialog box is not closed.<br />

Note:<br />

All changes are applied, including those made under different (hidden) tabs.<br />

Closes the dialog box and discards any changes made.<br />

Warning:<br />

All changes will be discarded, including those made under different (hidden) tabs.<br />

Help Displays help for this tab.<br />

3.2.2.2.5 String Input Field − Properties: Locking<br />

Allows the input field to be locked depending on the current user or password entered.<br />

3.2.2.2.5.1 Image<br />

Locking<br />

3.2.2.2 String Input Field − Reference 49


Enables input field locking<br />

Locking Active<br />

If selected, this input field can be locked during runtime. A locked input field is displayed but<br />

cannot be highlighted or accept new input.<br />

Locking only affects the input field, not the connected variable. Another input field on the<br />

same page can allow a different value to be written to the process variable even if this field is<br />

locked.<br />

The other options under this tab can only be enabled when this option is selected.<br />

Password for Locking<br />

Defines the variable holding the current password level. Password levels are managed as numeric values. They<br />

can be provided either via the password input field or the application.<br />

Source<br />

Assign...<br />

Used to input or display the connected variable.<br />

Possible Settings Name of a USINT process variable. The same variable can be and usually is<br />

used as a password level for several input fields.<br />

Possible Values <strong>Visual</strong> <strong>Components</strong> supports up to 63 (0−63) password levels<br />

The Assign... button opens a dialog box to select a variable for the Source field. By default, only<br />

variables of suitable types are displayed.<br />

Input locked if...<br />

Determines which conditions must be met for input to be locked.<br />

Input locked if...<br />

Password Level<br />

Defines a logical condition under which the input is locked. Any of the following settings can be<br />

selected:<br />

Password level is 0 The field is locked when the connected Password process variable has<br />

the value 0. In every other case, the input is unlocked.<br />

Password value<br />

< Level<br />

Password value<br />

>= Level<br />

The field is locked when the process variable connected to the<br />

Password has a smaller value than is shown in the Password Level<br />

field. If the value of the variable is larger or equal to the contents of the<br />

Password Level field, then the input field will be unlocked.<br />

The field is locked if the process variable connected to Password has a<br />

larger or equal value than the value shown in the Password Level field.<br />

If the contents of the variable are smaller than the value in the<br />

Password Level field, then the input field will be unlocked.<br />

Defines the comparative value for the settings Password < Level and Password >= Level under<br />

Input Locked If....<br />

Possible Settings 0 to 63<br />

For the general operation of dialog boxes.<br />

OK<br />

Cancel<br />

Buttons<br />

Applies settings and closes the dialog box. If settings cannot be applied because of an error, it is<br />

indicated and the dialog box is not closed.<br />

Note:<br />

All changes are applied, including those made under different (hidden) tabs.<br />

Closes the dialog box and discards any changes made.<br />

Warning:<br />

All changes will be discarded, including those made under different (hidden) tabs.<br />

Help Displays help for this tab.<br />

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

50 3.2.2.2 String Input Field − Reference


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

3.2.2.2.6 String Input Field − Properties: Simulation<br />

Input of the displayed value in the editor's Simulation mode.<br />

3.2.2.2.6.1 Image<br />

Simulation Value<br />

Determines the value which should be shown in the input field during the editor's Simulation mode. Simulation<br />

mode can be used to create visualization pictures for product documentation. <strong>Visual</strong> <strong>Components</strong> does not use<br />

these settings in any other place.<br />

Simulation<br />

Value<br />

CharBox<br />

Desired display of the input field as a character string in Simulation mode.<br />

Possible Settings Any character string which can be displayed in the input field as a result of its<br />

set length. <strong>Visual</strong> <strong>Components</strong> does not check the format or the value of the<br />

input.<br />

The entire character set of the selected font can be displayed using this button. Characters can<br />

therefore be input that are not available with the current keyboard settings. A character can be<br />

inserted into the Simulation Value field by double clicking on it in the CharBox.<br />

It is displayed using the input field's set font.<br />

Possible Settings Settings<br />

For the general operation of dialog boxes.<br />

OK<br />

Cancel<br />

Buttons<br />

Applies settings and closes the dialog box. If settings cannot be applied because of an error, it is<br />

indicated and the dialog box is not closed.<br />

Note:<br />

All changes are applied, including those made under different (hidden) tabs.<br />

Closes the dialog box and discards any changes made.<br />

Warning:<br />

All changes will be discarded, including those made under different (hidden) tabs.<br />

Help Displays help for this tab.<br />

3.2.2.2 String Input Field − Reference 51


3.2.2.3 Password Input Field − Reference<br />

With this type of input field, a user level (password level) can be selected by entering a corresponding password.<br />

Entered text is only evaluated internally − the application itself contains the numeric information about which<br />

user level is currently set.<br />

Up to three password−protected user levels are supported and are determined by the last corretly entered<br />

password. Levels are defined numerically: 1 for the lowest authorization up to 3 for the highest.<br />

Fewer password levels can optionally be used, but additional levels are not supported with this type of field.<br />

Entering an incorrect password changes the password level to 0.<br />

Passwords are defined in the editor during the design phase and cannot be changed during runtime. If changing<br />

a password during runtime or more password levels are necessary, then an string input field can be used<br />

instead.<br />

General<br />

Summary of the basic properties of these types of input fields.<br />

Function Selects password level by entering a password.<br />

Data Types<br />

Availability<br />

Special Features<br />

Appearance<br />

Individual Colors<br />

Input<br />

The following data types can be used for this field:<br />

USINT process variable for outputting the current password level to the application<br />

Entering a password takes place by inputting characters (alphanumeric).<br />

This field can be used by all systems supported by <strong>Visual</strong> <strong>Components</strong>.<br />

Depending on the number of panel keys, it may not be possible to input all characters<br />

via the panel itself. However, this does not diminish the basic function of the input field.<br />

Passwords must be chosen in such a way that they can even be input from the operator<br />

panel. This is not checked by the <strong>Visual</strong> <strong>Components</strong> editor.<br />

Special Functions:<br />

• Up to 4 password levels, of which 3 are secured with passwords<br />

• Simple configuration of passwords in the <strong>Visual</strong> <strong>Components</strong> editor<br />

• Locking of input using the connected Status process variable<br />

• Notification during or after entry takes place using the Status and Completion<br />

Data Point process variables. This allows reactions to the input and<br />

synchronized data acquisition from external stations.<br />

Password are concealed when they are output so that they cannot be read. At the<br />

outset, the password appears blank after each picture change since only the current<br />

password level is stored, and not the last concluded input.<br />

Special Functions:<br />

• Visible/Invisible switching using the Status process variable<br />

• Selectable foreground and background colors<br />

• Display of incorrect/missing variables (field filled in with hyphens '−')<br />

• Fully selectable fonts<br />

The following can be individually set for each input field of this type:<br />

• Foreground color (text color)<br />

• Background color<br />

All colors can either be set in the editor or during runtime using a process variable.<br />

Optional, using one or more of the following methods:<br />

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

• Character input using panel keys<br />

• Using the virtual keypad which is automatically displayed on panels with touch<br />

screens<br />

52 3.2.2.3 Password Input Field − Reference


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

Properties<br />

Input field properties are set under the various tabs of the Properties dialog box. Field properties can be<br />

displayed by double−clicking on the input field in the editor and are automatically shown after a new field is<br />

inserted.<br />

Available settings are described respectively on their own pages. The following list provides an outline of the<br />

possible settings (tabs), as well as references to detailed information.<br />

Parameter<br />

Colors<br />

Passwords<br />

Completion<br />

Basic parameters of input fields such as position, size, connected variable, and status are defined<br />

under this tab. Settings under this tab have to be adjusted for all input fields created.<br />

Settings under this tab can be used to specify user−defined color settings and to connect process<br />

variables for controlling colors. This is very useful for color displays, but can also be used for<br />

black/white displays.<br />

Sets the number of password levels as well as their accompanying passwords. These settings are<br />

usually adjusted for each created field.<br />

Notification setting using input in the field. This can be used to check the input value in the<br />

application or trigger other actions. For example, picture elements can be shown or hidden using<br />

their Status variables.<br />

These settings are optional.<br />

3.2.2.3.1 Password Input Field − Properties: Parameter<br />

Provides the settings for the password input field.<br />

3.2.2.3.1.1 Image<br />

Format<br />

Contains various settings for formatting the field on the screen.<br />

Number of characters Specifies the number of characters which should be displayed.<br />

Possible Settings 1 to 10 characters (passwords can be a maximum of 10 characters<br />

long)<br />

The field must be able to fit in the picture with its set size and font.<br />

3.2.2.3 Password Input Field − Reference 53


Font<br />

Echo Character<br />

There cannot be more text than the width of the field allows. That<br />

means that passwords cannot be set to a length longer than the field<br />

itself.<br />

Selects the font which should be used for this input field.<br />

Possible Settings Any font in the project can be selected.<br />

Chooses the character to be displayed in place of the character being entered. Actual<br />

input is not shown on the screen for security reasons.<br />

Possible Settings Any individual character which exists in the input field's font set can<br />

be chosen. The corresponding (chosen) character is input directly<br />

into the field.<br />

Default Setting * (asterisk)<br />

Position<br />

Specifies the position of the input field in pixels on the screen.<br />

X<br />

Y<br />

Specifies the position of the upper left corner along the X axis (interval from the left display<br />

margin). Values for these parameters begin with 0 on the left margin and increase to the<br />

width of the display minus one pixel (on the right margin).<br />

Possible Settings for Full<br />

Graphic Displays<br />

Possible Settings for Text<br />

and Semi−Graphic<br />

Displays<br />

This field can be placed freely on the screen. Therefore, X can<br />

be set from 0 to the width of the display minus the width of the<br />

field in pixels.<br />

On text and semi−graphic displays, such as those which can be<br />

connected to the C130 CAN controller, fields can only be<br />

placed evenly on every sixth X−coordinate (X = 0, 6, 12, 18,<br />

etc.).<br />

Specifies the position of the upper left corner along the Y axis (interval from the upper display<br />

margin). Values for these parameters begin with 0 on the upper margin and increase to the<br />

height of the display minus one pixel (on the lower margin).<br />

Possible Settings for Full<br />

Graphic Displays<br />

Possible Settings for Text<br />

and Semi−Graphic<br />

Displays<br />

The field can be placed freely in the display. Therefore, Y can<br />

be set from 0 to the height of the display minus the height of the<br />

field in pixels.<br />

On text and semi−graphic displays, such as those which can be<br />

connected to the C130 CAN controller, fields can only be placed<br />

evenly on every eighth Y−coordinate (Y = 0, 8, 16, 24, etc.).<br />

Destination (Password) Data Point<br />

Allows the connection of the variable which should be controlled with this input field. This variable is assigned to<br />

the password level corresponding to the last correctly entered password. If an incorrect password is entered,<br />

the password variable is reset to 0.<br />

Source<br />

Assign...<br />

Used to input or display the connected variable.<br />

Possible Settings Name of a process variable of data type UINT.<br />

The Assign... button opens a dialog box to select a variable for the Source field. By<br />

default, only variables of suitable types are displayed.<br />

Status<br />

Contains various settings for formatting the field on the screen.<br />

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

54 3.2.2.3 Password Input Field − Reference


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

Source<br />

Assign...<br />

Preview<br />

Displays the field with the current settings.<br />

For the general operation of dialog boxes.<br />

OK<br />

Cancel<br />

Used to input or display the connected variable.<br />

Possible Settings Name of a UINT process variable<br />

Possible Values Bit 0 If 1, the input field is invisible.<br />

Bit 1 If 1, then input is locked.<br />

Bit 14 Is set to 1 while the input field has the focus (is<br />

highlighted). The focus determines which input field is to<br />

accept input from the operator panel.<br />

If the input field loses the focus, then this bit is reset back<br />

to 0.<br />

Bit 15 Is set to 1 while the input field is activated (the value in the<br />

input field is being edited). It will be set back to 0 after the<br />

input has been completed or cancelled.<br />

All other bits are reserved.<br />

The Assign... button opens a dialog box to select a variable for the Source field. By<br />

default, only variables of suitable types are displayed.<br />

Buttons<br />

Applies settings and closes the dialog box. If settings cannot be applied because of an error, it is<br />

indicated and the dialog box is not closed.<br />

Note:<br />

All changes are applied, including those made under different (hidden) tabs.<br />

Closes the dialog box and discards any changes made.<br />

Warning:<br />

All changes will be discarded, including those made under different (hidden) tabs.<br />

Help Displays help for this tab.<br />

3.2.2.3.2 Password Input Field − Properties: Colors<br />

Allows colors to be set for the field's display.<br />

3.2.2.3.2.1 Image<br />

3.2.2.3 Password Input Field − Reference 55


Allows colors to be set in the editor.<br />

Use Global<br />

Foreground<br />

Background<br />

Colors<br />

If this option is selected, then settings in the project options are applied to this input field.<br />

Therefore, settings for foreground and background cannot be made.<br />

Selects the text color used for this input field. This setting can only be activated if the Use Global<br />

option is not selected.<br />

Possible Settings for<br />

Full Graphic Displays<br />

Possible Settings for<br />

Text and Semi−Graphic<br />

Displays<br />

Any desired color from a palette of 256 colors can be chosen. Standard<br />

palette colors are illustrated in the reference manual.<br />

Customer−specific operator panels can have their own color palettes.<br />

Correct colors are always indicated in the selection list.<br />

Text and semi−graphic displays, such as those which can be connected<br />

to the C130 CAN controller, support only black and white colors. This is<br />

also true for the PP21 and PP41 Power Panels and their<br />

customer−specific varieties.<br />

Selects the input field's background color. This setting can only be activated if the Use Global<br />

option is not selected.<br />

Possible Settings for<br />

Full Graphic Displays<br />

Possible Settings for<br />

Text and Semi−Graphic<br />

Displays<br />

Any desired color from a palette of 256 colors can be chosen. Standard<br />

palette colors are illustrated in the reference manual.<br />

Customer−specific operator panels can have their own color palettes.<br />

Correct colors are always indicated in the selection list.<br />

Text and semi−graphic displays, such as those which can be connected<br />

to the C130 CAN controller, support only black and white colors. This is<br />

also true for the PP21 and PP41 Power Panels and their<br />

customer−specific varieties.<br />

Colors variable<br />

Allows color to be manipulated with a process variable during runtime.<br />

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

56 3.2.2.3 Password Input Field − Reference


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

Source<br />

Assign...<br />

Used to input or display the connected variable.<br />

Possible Settings Name of a UINT process variable<br />

Possible Values Bits 0−7 The low byte contains the input field background<br />

color.<br />

Bits 8−15 The high byte contains the input field text color.<br />

For both of these settings, the same colors which can be used for foreground and<br />

background in the editor are possible (see above).<br />

The Assign... button opens a dialog box to select a variable for the Source field. By default, only<br />

variables of suitable types are displayed.<br />

For the general operation of dialog boxes.<br />

OK<br />

Cancel<br />

Buttons<br />

Applies settings and closes the dialog box. If settings cannot be applied because of an error, it is<br />

indicated and the dialog box is not closed.<br />

Note:<br />

All changes are applied, including those made under different (hidden) tabs.<br />

Closes the dialog box and discards any changes made.<br />

Warning:<br />

All changes will be discarded, including those made under different (hidden) tabs.<br />

Help Displays help for this tab.<br />

3.2.2.3.3 Password Input Field − Properties: Passwords<br />

Provides settings for password levels as well as corresponding passwords. Passwords can be defined during<br />

the creation phase, but they may not be changed during runtime. If this is necessary, an input string can be used<br />

instead.<br />

3.2.2.3.3.1 Image<br />

Passwords<br />

3.2.2.3 Password Input Field − Reference 57


Allows passwords to be defined for each individual password level (as well as the number of password levels<br />

themselves) during the creation phase.<br />

Number of<br />

Password Levels<br />

Password #1<br />

Password #2<br />

Password #3<br />

The number of password levels which manage the input field. Here, level 0 (no password) is<br />

also counted.<br />

Possible Settings 2 to 4<br />

Password for password level 1, the lowest password level (except level 0 which requires no<br />

password and is also the default for an incorrectly given password).<br />

Possible Settings A string of 1 to 6 characters. It should be noted that the corresponding<br />

characters have to be able to be input from the operator panel.<br />

Password for password level 2.<br />

Possible Settings A string of 1 to 6 characters. It should be noted that the corresponding<br />

characters have to be able to be input from the operator panel.<br />

Password for password level 3, the highest possible password level.<br />

Possible Settings A string of 1 to 6 characters. It should be noted that the corresponding<br />

characters have to be able to be input from the operator panel.<br />

For the general operation of dialog boxes.<br />

OK<br />

Cancel<br />

Buttons<br />

Applies settings and closes the dialog box. If settings cannot be applied because of an error, it is<br />

indicated and the dialog box is not closed.<br />

Note:<br />

All changes are applied, including those made under different (hidden) tabs.<br />

Closes the dialog box and discards any changes made.<br />

Warning:<br />

All changes will be discarded, including those made under different (hidden) tabs.<br />

Help Displays help for this tab.<br />

3.2.2.3.4 Password Input Field − Properties: Completion<br />

Allows notification about input in the input field.<br />

3.2.2.3.4.1 Image<br />

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

58 3.2.2.3 Password Input Field − Reference


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

Completion Data Point<br />

Sets the connected variable to a fixed value each time the field is processed.<br />

Source<br />

Assign...<br />

Completion<br />

Value<br />

Used to input or display the connected variable.<br />

Possible Settings Name of a UINT process variable. The same variable can be<br />

connected to several input fields as a completion data point.<br />

Possible Values The variable is set to the value in Completion value after the input<br />

field is processed by the user of <strong>Visual</strong> <strong>Components</strong> Runtime.<br />

<strong>Visual</strong> <strong>Components</strong> does not further evaluate the connected<br />

variable.<br />

The Assign... button opens a dialog box to select a variable for the Source field. By default, only<br />

variables of suitable types are displayed.<br />

After the input field is processed, the value is written to the process variable specified under<br />

Source.<br />

Possible Settings Any acceptable value for variables of type UINT (0 to 65535)<br />

For the general operation of dialog boxes.<br />

OK<br />

Cancel<br />

Buttons<br />

Applies settings and closes the dialog box. If settings cannot be applied because of an error, it is<br />

indicated and the dialog box is not closed.<br />

Note:<br />

All changes are applied, including those made under different (hidden) tabs.<br />

Closes the dialog box and discards any changes made.<br />

Warning:<br />

All changes will be discarded, including those made under different (hidden) tabs.<br />

Help Displays help for this tab.<br />

3.2.2.3 Password Input Field − Reference 59


3.2.2.4 ListBox Input Field − Reference<br />

This input field can be used to display a list of texts from a text group on the screen underneath one another. A<br />

text can then be selected and highlighted using a process variable.<br />

If more texts are defined in the text group or the process variable than there is space set in the ListBox output<br />

field, then a corresponding excerpt is displayed. This ensures that the selected highlighted text is always visible.<br />

Text elements can be selected by the user with this type of input field. This is done using a cursor which can<br />

switch between individual texts without changing the connected process variable. The selection can be<br />

confirmed with a separately configured key.<br />

General<br />

Summary of the basic properties of these types of output fields.<br />

Function<br />

Data Types<br />

Displays vertically arranged lists of texts from a text group in a process variable with<br />

highlighting based on a numerical index from a process variable.<br />

The following data types can be displayed for this field:<br />

UINT − Chooses which text should be highlighted.<br />

Availability This field can be used by all systems supported by <strong>Visual</strong> <strong>Components</strong>.<br />

Special<br />

Features<br />

Representation<br />

Individual<br />

Colors<br />

Special functions:<br />

• Almost any number of texts can be defined during creation in the <strong>Visual</strong> <strong>Components</strong><br />

editor and displayed during runtime (limited by the memory capacity of the target<br />

system).<br />

• Texts can be translated either conveniently in the editor or using external tools<br />

• Any desired operation can be implemented in the application using additional function<br />

keys or touch−operated fields.<br />

• Text groups can be used several times.<br />

• A cursor can be used inside the ListBox without the connected PV having to change.<br />

• A byte array can also be used to switch texts invisible or locked.<br />

• A cursor character even allows black/white displays to be used.<br />

Texts are output as a vertical list and are either extended to the set length with blank spaces or<br />

shortened if necessary. Because of this, the entire field always appears as a rectangle.<br />

Special functions:<br />

• Automatic display of the correct text section so that the highlighted text is always<br />

visible in the picture. (as soon as the control is switched from input mode)<br />

• Visible/Invisible switching using the Status process variable<br />

• Selectable foreground and background colors as well as a separate color for<br />

highlighted text.<br />

• Display of incorrect/missing variables (field filled in with hyphens '−')<br />

• Configurable color for text locking state<br />

• Fully selectable fonts<br />

The following can be individually set for each output field of this type:<br />

• Foreground color (text color)<br />

• Background color<br />

• Foreground color (text color) for highlighted text<br />

• Background color for highlighted text<br />

• Foreground color for locked text<br />

• Background color for locked text<br />

All colors can either be set in the editor or during runtime using a process variable.<br />

Properties<br />

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

Input field properties are set under the various tabs of the Properties dialog box. Field properties can be<br />

displayed by double−clicking on the input field in the editor and are automatically shown after a new field is<br />

inserted.<br />

60 3.2.2.4 ListBox Input Field − Reference


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

Available settings are described respectively on their own pages. The following list provides an outline of the<br />

possible settings (tabs), as well as references to detailed information.<br />

Parameter<br />

Colors<br />

Keys<br />

Basic parameters of input fields such as position, size, connected variable, and status are defined<br />

under this tab. Settings under this tab have to be adjusted for all input fields created.<br />

Settings under this tab can be used to specify user−defined color settings and to connect process<br />

variables for controlling colors. This is very useful for color displays, but can also be used for<br />

black/white displays.<br />

The keys for navigating in the ListBox are defined with this setting.<br />

For each ListBox, individual keys can be defined for navigation. Additionally, keys that were defined<br />

in the global picture settings can be accepted.<br />

Notification setting using input in the field. This can be used to check the input value in the<br />

application or trigger other actions. For example, picture elements can be shown or hidden using<br />

their Status variables.<br />

Completion<br />

These settings are optional.<br />

Locking<br />

Description<br />

Settings under this tab can be used to specify user−defined color settings and to connect process<br />

variables for controlling colors. This is very useful for color displays, but can also be used for<br />

black/white displays.<br />

Descriptive text about this input field can be entered under this tab. This text is saved in the <strong>Visual</strong><br />

<strong>Components</strong> project but is not transferred to or processed on the target system.<br />

This text is optional but useful for project documentation.<br />

3.2.2.4.1 ListBox Input Field − Properties: Parameter<br />

Provides settings for the ListBox input field.<br />

3.2.2.4.1.1 Image<br />

Appearance<br />

Contains various settings for formatting the field on the screen.<br />

X Specifies the position of the upper−left corner along the X axis (interval from the left display<br />

margin). Values for these parameters begin with 0 on the left margin and increase to the<br />

width of the display minus one pixel (on the right margin).<br />

3.2.2.4 ListBox Input Field − Reference 61


Y<br />

Max. Text Length<br />

Rows<br />

Font<br />

Text Group<br />

Possible Settings for Full<br />

Graphic Displays<br />

Possible Settings for Text and<br />

Semi−Graphic Displays<br />

This field can be placed freely on the screen. Therefore,<br />

X can be set from 0 to the width of the display minus the<br />

width of the field in pixels.<br />

On text and semi−graphic displays, such as those which<br />

can be connected to the C130 CAN controller, fields can<br />

only be placed evenly on every sixth X−coordinate (X =<br />

0, 6, 12, 18, etc.).<br />

Specifies the position of the upper−left corner along the Y axis (interval from the upper<br />

display margin). Values for these parameters begin with 0 on the upper margin and increase<br />

to the height of the display minus one pixel (on the lower margin).<br />

Possible Settings for Full<br />

Graphic Displays<br />

Possible Settings for Text<br />

and Semi−Graphic<br />

Displays<br />

The field can be placed freely in the display. Therefore, Y can<br />

be set from 0 to the height of the display minus the height of the<br />

field in pixels.<br />

On text and semi−graphic displays, such as those which can be<br />

connected to the C130 CAN controller, fields can only be placed<br />

evenly on every eighth Y−coordinate (Y = 0, 8, 16, 24, etc.).<br />

Specifies the maximum number of characters which can be displayed in a ListBox line. Texts<br />

longer than the allowed length will be truncated; blank spaces are used to "fill in" shorter<br />

texts.<br />

Possible Settings The field must be able to fit in the picture with its set size and<br />

font.<br />

Specifies the number of rows that will be displayed in the ListBox which also becomes the<br />

height of the output field.<br />

Possible Settings The field must be able to fit in the picture with its set size and<br />

font.<br />

Chooses the output field font.<br />

Possible Settings Any font in the project can be selected.<br />

Texts Sources and Options<br />

Selects the text group which should be output in this control at runtime. Its index must begin<br />

with 0 and rise consecutively.<br />

Option Bytes Byte array for controlling invisible/locked texts<br />

Cursor<br />

Character<br />

Displays an additional character for the text which has the focus (cursor)<br />

Variables<br />

Selected Item Variable which contains the index of the selected text<br />

Status Variable for switching the control invisible/locked<br />

For the general operation of dialog boxes.<br />

OK<br />

Cancel<br />

Buttons<br />

Applies settings and closes the dialog box. If settings cannot be applied because of an error, it is<br />

indicated and the dialog box is not closed.<br />

Note:<br />

All changes are applied, including those made under different (hidden) tabs.<br />

Closes the dialog box and discards any changes made.<br />

Attention:<br />

All changes will be discarded, including those made under different (hidden) tabs.<br />

Help Displays help for this tab.<br />

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

62 3.2.2.4 ListBox Input Field − Reference


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

3.2.2.4.2 ListBox Input Field − Properties: Colors<br />

Allows colors to be set for the field's display.<br />

3.2.2.4.2.1 Image<br />

The 'Selected Item' area contains the selected element. This is the item which is linked with the PV.<br />

In the 'Disabled Item' section, color settings can be made for items which have been locked with the byte array.<br />

Allows colors to be set in the editor.<br />

Use Global<br />

Foreground<br />

Background<br />

Colors<br />

If this option is selected, then settings in the project options are applied to this input field.<br />

Therefore, settings for foreground and background cannot be made.<br />

Selects the text color used for this input field. This setting can only be activated if the Use Global<br />

option is not selected.<br />

Possible Settings for<br />

Full Graphic Displays<br />

Possible Settings for<br />

Text and Semi−Graphic<br />

Displays<br />

Any desired color from a palette of 256 colors can be chosen. Standard<br />

palette colors are illustrated in the reference manual.<br />

Customer−specific operator panels can have their own color palettes.<br />

Correct colors are always indicated in the selection list.<br />

Text and semi−graphic displays, such as those which can be connected<br />

to the C130 CAN controller, support only black and white colors. This is<br />

also true for the PP21 and PP41 Power Panels and their<br />

customer−specific varieties.<br />

Selects the input field's background color. This setting can only be activated if the Use Global<br />

option is not selected.<br />

Possible Settings for<br />

Full Graphic Displays<br />

Possible Settings for<br />

Text and Semi−Graphic<br />

Displays<br />

Any desired color from a palette of 256 colors can be chosen. Standard<br />

palette colors are illustrated in the reference manual.<br />

Customer−specific operator panels can have their own color palettes.<br />

Correct colors are always indicated in the selection list.<br />

Text and semi−graphic displays, such as those which can be connected<br />

to the C130 CAN controller, support only black and white colors. This is<br />

also true for the PP21 and PP41 Power Panels and their<br />

customer−specific varieties.<br />

3.2.2.4 ListBox Input Field − Reference 63


Colors variable<br />

Allows color to be manipulated with a process variable during runtime.<br />

Source<br />

Assign...<br />

Used to input or display the connected variable.<br />

Possible Settings Name of a UINT process variable<br />

Possible Values Bits 0−7 The low byte contains the input field background<br />

color.<br />

Bits 8−15 The high byte contains the input field text color.<br />

For both of these settings, the same colors which can be used for foreground and<br />

background in the editor are possible (see above).<br />

The Assign... button opens a dialog box to select a variable for the Source field. By default, only<br />

variables of suitable types are displayed.<br />

For the general operation of dialog boxes.<br />

OK<br />

Cancel<br />

Buttons<br />

Applies settings and closes the dialog box. If settings cannot be applied because of an error, it is<br />

indicated and the dialog box is not closed.<br />

Note:<br />

All changes are applied, including those made under different (hidden) tabs.<br />

Closes the dialog box and discards any changes made.<br />

Attention:<br />

All changes will be discarded, including those made under different (hidden) tabs.<br />

Help Displays help for this tab.<br />

3.2.2.4.3 ListBox Input Field − Properties: Completion<br />

Allows notification about input in the input field.<br />

3.2.2.4.3.1 Image<br />

Completion Data Point<br />

Sets the connected variable to a fixed value each time the field is processed.<br />

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

64 3.2.2.4 ListBox Input Field − Reference


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

Source<br />

Assign...<br />

Completion<br />

Value<br />

Used to input or display the connected variable.<br />

Possible Settings Name of a UINT process variable. The same variable can be<br />

connected to several input fields as a completion data point.<br />

Possible Values The variable is set to the value in Completion value after the input<br />

field is processed by the user of <strong>Visual</strong> <strong>Components</strong> Runtime.<br />

<strong>Visual</strong> <strong>Components</strong> does not further evaluate the connected<br />

variable.<br />

The Assign... button opens a dialog box to select a variable for the Source field. By default, only<br />

variables of suitable types are displayed.<br />

After the input field is processed, the value is written to the process variable specified under<br />

Source.<br />

Possible Settings Any acceptable value for variables of type UINT (0 to 65535)<br />

For the general operation of dialog boxes.<br />

OK<br />

Cancel<br />

Buttons<br />

Applies settings and closes the dialog box. If settings cannot be applied because of an error, it is<br />

indicated and the dialog box is not closed.<br />

Note:<br />

All changes are applied, including those made under different (hidden) tabs.<br />

Closes the dialog box and discards any changes made.<br />

Attention:<br />

All changes will be discarded, including those made under different (hidden) tabs.<br />

Help Displays help for this tab.<br />

3.2.2.4.4 ListBox Input Field − Properties: Locking<br />

Allows the input field to be locked depending on the current user or password entered.<br />

3.2.2.4.4.1 Image<br />

3.2.2.4 ListBox Input Field − Reference 65


Enables input field locking<br />

Locking<br />

Locking<br />

If selected, this input field can be locked during runtime. A locked input field is displayed but cannot be<br />

highlighted or accept new input.<br />

Locking only affects the input field, not the connected variable. Another input field on the same page<br />

can allow a different value to be written to the process variable even if this field is locked.<br />

The other options under this tab can only be enabled when this option is selected.<br />

Password for Locking<br />

Defines the variable holding the current password level. Password levels are managed as numeric values. They<br />

can be provided either via the password input field or the application.<br />

Source<br />

Assign...<br />

Used to input or display the connected variable.<br />

Possible Settings Name of a USINT process variable. The same variable can be and usually is<br />

used as a password level for several input fields.<br />

Possible Values <strong>Visual</strong> <strong>Components</strong> supports up to 63 (0−63) password levels<br />

The Assign... button opens a dialog box to select a variable for the Source field. By default, only<br />

variables of suitable types are displayed.<br />

Input locked if...<br />

Determines which conditions must be met for input to be locked.<br />

Input locked if...<br />

Password Level<br />

Defines a logical condition under which the input is locked. Any of the following settings can be<br />

selected:<br />

Password level is 0 The field is locked when the connected Password process variable has<br />

the value 0. In every other case, the input is unlocked.<br />

Password value<br />

< Level<br />

Password value<br />

>= Level<br />

The field is locked when the process variable connected to the<br />

Password has a smaller value than is shown in the Password Level<br />

field. If the value of the variable is larger or equal to the contents of the<br />

Password Level field, then the input field will be unlocked.<br />

The field is locked if the process variable connected to Password has a<br />

larger or equal value than the value shown in the Password Level field.<br />

If the contents of the variable are smaller than the value in the<br />

Password Level field, then the input field will be unlocked.<br />

Defines the comparative value for the settings Password < Level and Password >= Level under<br />

Input Locked If....<br />

Possible Settings 0 to 63<br />

For the general operation of dialog boxes.<br />

OK<br />

Cancel<br />

Buttons<br />

Applies settings and closes the dialog box. If settings cannot be applied because of an error, it is<br />

indicated and the dialog box is not closed.<br />

Note:<br />

All changes are applied, including those made under different (hidden) tabs.<br />

Closes the dialog box and discards any changes made.<br />

Attention:<br />

All changes will be discarded, including those made under different (hidden) tabs.<br />

Help Displays help for this tab.<br />

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

66 3.2.2.4 ListBox Input Field − Reference


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

3.2.2.4.5 ListBox Input Field − Properties: Keys<br />

Allows keys to be configured for navigation in the ListBox.<br />

3.2.2.4.5.1 Image<br />

Use global tabs up/down<br />

settings<br />

Key Assignment<br />

If this option is selected, then the global tabs for up/down settings are used for<br />

navigation in the ListBox.<br />

Up key Control key for upward movement in the control<br />

Up key Control key for downward movement in the control<br />

Select key Control key for selecting the text item marked with the cursor<br />

For the general operation of dialog boxes.<br />

OK<br />

Cancel<br />

Buttons<br />

Applies settings and closes the dialog box. If settings cannot be applied because of an error, it is<br />

indicated and the dialog box is not closed.<br />

Note:<br />

All changes are applied, including those made under different (hidden) tabs.<br />

Closes the dialog box and discards any changes made.<br />

Attention:<br />

All changes will be discarded, including those made under different (hidden) tabs.<br />

Help Displays help for this tab.<br />

3.2.3 Output Fields − Reference<br />

Output fields are used to represent information on the visualization device. Data shown comes from process<br />

variables from the control application. As a rule, output fields cannot be controlled or influenced by the user.<br />

Since no user interaction takes place, output fields function in the same way on touch screen systems as they<br />

do on other systems.<br />

<strong>Visual</strong> <strong>Components</strong> provides output fields for all usual data types of process variables used in a control<br />

application. Some data types can be displayed in different ways. Because of this, the user is able to choose the<br />

3.2.2.4 ListBox Input Field − Reference 67


est suited representation for each application.<br />

Output Fields Description<br />

Numeric Output Field This field allows data to be output in numeric form.<br />

String Output Field This field allows text to be output on the visualization unit.<br />

Date/Time Output Field<br />

Advanced Text Output<br />

Field<br />

Bar Graph Output Field<br />

ListBox Output Field<br />

Bitmap Output Field<br />

3.2.3.1 Numeric Output Field − Reference<br />

This field allows data to be output in numeric form.<br />

This output field allows the system date and time to be output. A series of fixed,<br />

predefined output formats are provided to do this. If these do not suffice, formatting<br />

can be configured in the control application and an output string can be used. This is<br />

also necessary to display other, different date and time information.<br />

This field allows text to be output based on a numeric index read from a process<br />

variable during visualization runtime. This provides a simple way to switch between<br />

a predefined number of texts.<br />

This output field allows numeric data to be output in the form of a movable bar<br />

graph. By default, bar graphs do not have any borders or other embellishments.<br />

These can be added easily as needed in the <strong>Visual</strong> <strong>Components</strong> project.<br />

Using this output field, a list of texts can be shown on the screen underneath one<br />

another. They can be used either from a text group or a process variable. A text can<br />

be highlighted and selected using a process variable.<br />

If more texts are defined in the text group or the process variable than there is<br />

space set in the ListBox output field, then a corresponding excerpt is displayed. This<br />

ensures that the selected highlighted text is always visible.<br />

The ListBox output field doesn't allow user interaction, either from panel keys or<br />

touch screen keypads. Thus, any necessary operations need to be implemented in<br />

the application.<br />

This field allows a bitmap graphic to be output depending on a numeric value read<br />

from a process variable during runtime. In this way, predefined bitmaps can be<br />

output depending on a process variable value.<br />

General<br />

Summary of the basic properties of these types of output fields.<br />

Function Display of numeric process variables in text form<br />

Data Types<br />

The following data types can be displayed for this field:<br />

USINT, SINT, UINT, INT, UDINT, DINT, and REAL<br />

Availability This field can be used by all systems supported by <strong>Visual</strong> <strong>Components</strong>.<br />

Special Features<br />

Appearance<br />

Special functions:<br />

• Scaling of the values for display<br />

The value is output as a series of numbers in the picture.<br />

Special functions:<br />

• Visible/Invisible switching using the Status process variable<br />

• Selectable foreground and background colors<br />

• Display of the decimal point in adjustable positions<br />

• Display of incorrect/missing variables (field filled in with hyphens '−')<br />

• Overflow display (field filled in with asterisks '*')<br />

• Optional display of preceding zeroes<br />

• Fully selectable fonts<br />

Individual Colors The following can be individually set for each output field of this type:<br />

• Foreground color (text color)<br />

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

68 3.2.3.1 Numeric Output Field − Reference


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

• Background color<br />

All colors can either be set in the editor or during runtime using a process<br />

variable.<br />

Properties<br />

Output field properties are set under the various tabs of the Properties dialog box. Field properties can be<br />

displayed by double−clicking on the output field in the editor and are automatically shown after a new field is<br />

inserted.<br />

Available settings are described respectively on their own pages. The following list provides an outline of the<br />

possible settings (tabs), as well as references to detailed information.<br />

Parameter<br />

Colors<br />

Scaling<br />

Simulation<br />

Description<br />

Basic parameters of the output field, such as position, size, connected variable, and status are<br />

defined under this tab. Settings under this tab have to be configured for all output fields created.<br />

Settings under this tab can be used to specify user−defined color settings and to connect process<br />

variables for controlling colors. This is very useful for color displays, but can also be used for<br />

black/white displays.<br />

Scaling allows the value range on the PLC to be converted to another range of values on the<br />

visualization device. This means the user can select a suitable value range for calculation, editing,<br />

and display.<br />

No adjustments under this tab are necessary if the value of the variable should be displayed 1:1.<br />

Allows the input of a display value for the editor's Simulation mode. In this mode, pictures for<br />

documentation can be created with the value set here displayed in the field.<br />

Inputting this information is optional.<br />

Descriptive text about this output field can be entered under this tab. This text is saved in the <strong>Visual</strong><br />

<strong>Components</strong> project but is not transferred to or processed on the target system.<br />

This text is optional but useful for project documentation.<br />

3.2.3.1.1 Numeric Output Field − Properties: Parameter<br />

Provides general settings for numeric output.<br />

3.2.3.1.1.1 Image<br />

3.2.3.1 Numeric Output Field − Reference 69


Format<br />

Contains various settings for formatting the field on the screen.<br />

Number of Digits<br />

Digits after Decimal<br />

Point<br />

Font<br />

Display Leading<br />

Zeroes<br />

Specifies the amount of digits which should be displayed. If a decimal point is output, then<br />

the resulting field is one character wider than is specified here.<br />

Possible Settings 1 to 10 digits for DINT, UDINT, and FLOAT process variables<br />

1 to 5 digits for other data types.<br />

The field must be able to fit in the picture with its set size and font.<br />

Specifies how many digits (of those designated in Number of Digits) should be shown<br />

after the decimal point.<br />

Possible Settings There must be at least one position before the decimal point left<br />

open. Therefore, the setting can be a maximum of Number of Digits −<br />

1.<br />

Chooses the output field font.<br />

Possible Settings Any font in the project can be selected.<br />

If this option is selected, then open spaces before the first significant digit are filled with<br />

zeroes. Otherwise, blank spaces fill up the rest of the vacant area.<br />

Position<br />

Contains various settings for formatting the field on the screen.<br />

X<br />

Y<br />

Specifies the position of the upper left corner along the X axis (interval from the left display<br />

margin). Values for these parameters begin with 0 on the left margin and increase to the<br />

width of the display minus one pixel (on the right margin).<br />

Possible Settings for Full<br />

Graphic Displays<br />

Possible Settings for Text<br />

and Semi−Graphic<br />

Displays<br />

This field can be placed freely on the screen. Therefore, X can<br />

be set from 0 to the width of the display minus the width of the<br />

field in pixels.<br />

On text and semi−graphic displays, such as those which can be<br />

connected to the C130 CAN controller, fields can only be<br />

placed evenly on every sixth X−coordinate (X = 0, 6, 12, 18,<br />

etc.).<br />

Specifies the position of the upper left corner along the Y axis (interval from the upper display<br />

margin). Values for these parameters begin with 0 on the upper margin and increase to the<br />

height of the display minus one pixel (on the lower margin).<br />

Possible Settings for Full<br />

Graphic Displays<br />

Possible Settings for Text<br />

and Semi−Graphic<br />

Displays<br />

The field can be placed freely in the display. Therefore, Y can<br />

be set from 0 to the height of the display minus the height of the<br />

field in pixels.<br />

On text and semi−graphic displays, such as those which can be<br />

connected to the C130 CAN controller, fields can only be placed<br />

evenly on every eighth Y−coordinate (Y = 0, 8, 16, 24, etc.).<br />

Data Point<br />

Allows the connection of the variable which should be displayed with this output field.<br />

Source<br />

Assign...<br />

Used to input or display the connected variable.<br />

Possible Settings Name of a process variable with one of the following data types:<br />

USINT, SINT, UINT, INT, UDINT, DINT, or REAL.<br />

The Assign... button opens a dialog box to select a variable for the Source field. By<br />

default, only variables of suitable types are displayed.<br />

Status<br />

Contains various settings for formatting the field on the screen.<br />

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

70 3.2.3.1 Numeric Output Field − Reference


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

Source<br />

Assign...<br />

Preview<br />

Displays the field with the current settings.<br />

For the general operation of dialog boxes.<br />

OK<br />

Cancel<br />

Used to input or display the connected variable.<br />

Possible Settings Name of a UINT process variable<br />

Possible Values Bit 0 If 1, the output field is invisible.<br />

All other bits are reserved.<br />

The Assign... button opens a dialog box to select a variable for the Source field. By<br />

default, only variables of suitable types are displayed.<br />

Buttons<br />

Applies settings and closes the dialog box. If settings cannot be applied because of an error, it is<br />

indicated and the dialog box is not closed.<br />

Note:<br />

All changes are applied, including those made under different (hidden) tabs.<br />

Closes the dialog box and discards any changes made.<br />

Warning:<br />

All changes will be discarded, including those made under different (hidden) tabs.<br />

Help Displays help for this tab.<br />

3.2.3.1.2 Numeric Output Field − Properties: Colors<br />

Allows colors to be set for the field's display.<br />

3.2.3.1.2.1 Image<br />

Allows colors to be set in the editor.<br />

Colors<br />

Use Global If this option is selected the settings in the project options are adopted for this output field.<br />

3.2.3.1 Numeric Output Field − Reference 71


Foreground<br />

Background<br />

Therefore, settings for foreground and background cannot be made.<br />

Allows the selection of color for the output field text. This setting can only be activated if the Use<br />

Global option is not selected.<br />

Possible Settings for<br />

Full Graphic Displays<br />

Possible Settings for<br />

Text and Semi−Graphic<br />

Displays<br />

Any desired color from a palette of 256 colors can be chosen. Standard<br />

palette colors are illustrated in the reference manual.<br />

Customer−specific operator panels can have their own color palettes.<br />

Correct colors are always indicated in the selection list.<br />

Text and semi−graphic displays, such as those which can be connected<br />

to the C130 CAN controller, support only black and white colors. This is<br />

also true for the PP21 and PP41 Power Panels and their<br />

customer−specific varieties.<br />

Allows the selection of the output field's background color. This setting can only be activated if the<br />

Use Global option is not selected.<br />

Possible Settings for<br />

Full Graphic Displays<br />

Possible Settings for<br />

Text and Semi−Graphic<br />

Displays<br />

Any desired color from a palette of 256 colors can be chosen. Standard<br />

palette colors are illustrated in the reference manual.<br />

Customer−specific operator panels can have their own color palettes.<br />

Correct colors are always indicated in the selection list.<br />

Text and semi−graphic displays, such as those which can be connected<br />

to the C130 CAN controller, support only black and white colors. This is<br />

also true for the PP21 and PP41 Power Panels and their<br />

customer−specific varieties.<br />

Colors variable<br />

Allows color to be manipulated with a process variable during runtime.<br />

Source<br />

Assign...<br />

Used to input or display the connected variable.<br />

Possible Settings Name of a UINT process variable<br />

Possible Values Bits 0−7 The low byte contains the output field background<br />

color.<br />

Bits 8−15 The high byte contains the output field text color.<br />

For both of these settings, the same colors which can be used for foreground and<br />

background in the editor are possible (see above).<br />

The Assign... button opens a dialog box to select a variable for the Source field. By default, only<br />

variables of suitable types are displayed.<br />

For the general operation of dialog boxes.<br />

OK<br />

Cancel<br />

Buttons<br />

Applies settings and closes the dialog box. If settings cannot be applied because of an error, it is<br />

indicated and the dialog box is not closed.<br />

Note:<br />

All changes are applied, including those made under different (hidden) tabs.<br />

Closes the dialog box and discards any changes made.<br />

Warning:<br />

All changes will be discarded, including those made under different (hidden) tabs.<br />

Help Displays help for this tab.<br />

3.2.3.1.3 Numeric Output Field − Properties: Scaling/Limits<br />

Allows the flexible scaling of the displayed value.<br />

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

72 3.2.3.1 Numeric Output Field − Reference


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

3.2.3.1.3.1 Image<br />

Enables scaling for this output field<br />

Scaling<br />

Active<br />

Scaling<br />

If this option is selected, the value in the output field is scaled. Otherwise, the actual numeric value<br />

of the process variable is shown.<br />

The other fields under this tab are only enabled when this option is selected.<br />

PLC Value Range<br />

Displays the permissible value range of the PLC for the connected process variable. The range set here is<br />

scaled to the range set under Scaled Value Range for displaying the value in the output field.<br />

Parameters<br />

from PLC<br />

0% Value<br />

0% Source<br />

Assign...<br />

100% Value<br />

This field determines whether a 0% value and a 100% value are input in the editor (box<br />

unchecked) or if a process variable should be selected during runtime (box checked).<br />

The dialog box displays the necessary configuration fields which correspond to this setting.<br />

Specifies the lower limit of the permitted value range for the process variable on the PLC. This<br />

setting is only available if Parameters from PLC is not selected.<br />

Possible Settings Corresponds to the value range of the connected process variable.<br />

Defines the process variable which contains the lower limit of the value range for the variable<br />

processed with this input field on the PLC during runtime. This setting is only available if<br />

Parameters from PLC is selected.<br />

Possible Settings Name of a variable with the same data type as the variable connected to<br />

the input field. This variable can accept values like those defined under<br />

0% Value.<br />

The Assign... button opens a dialog box to select a variable for the 0% Source field. By default,<br />

only variables of suitable types are displayed.<br />

Specifies the upper limit of the permitted value range for the process variable on the PLC. This<br />

setting is only available if Parameters from PLC is not selected.<br />

Possible Settings Corresponds to the value range of the connected process variable.<br />

100% Source Defines the process variable which contains the upper limit of the value range for the variable<br />

3.2.3.1 Numeric Output Field − Reference 73


Assign...<br />

processed with this input field on the PLC during runtime. This setting is only available if<br />

Parameters from PLC is selected.<br />

Possible Settings Name of a variable with the same data type as the variable connected to<br />

the input field. This variable can accept values like those defined under<br />

100% Value.<br />

The Assign... button opens a dialog box to select a variable for the 100% Source field. By<br />

default, only variables of suitable types are displayed.<br />

Scaled Value Range<br />

Specifies the acceptable value range for the input and display in the visualization unit. During display, this<br />

range is scaled to the process variable range set under PLC Value Range.<br />

Parameters<br />

from PLC<br />

0% Value<br />

This field determines whether a 0% value and a 100% value are input in the editor (box<br />

unchecked) or if a process variable should be selected during runtime (box checked).<br />

The dialog box displays the necessary configuration fields which correspond to this setting.<br />

Specifies the lower limit of the permitted value range for the process variable on the control<br />

panel.<br />

Possible Settings Possible settings are limited by the input field width in<br />

characters so that limits can be entered and represented in the<br />

input field.<br />

In addition, input is limited by the connected variable data type<br />

as follows.<br />

USINT SINT<br />

INT UINT<br />

Value range from −99999 to 99999 (limited by<br />

the maximum input field width to 5 characters).<br />

DINT Value range from −2147483648 to 2147483647<br />

UDINT Value range from 0 to 4294967295<br />

REAL Value range from −9999999999 to 9999999999<br />

These specifications apply when no decimal places are set. If<br />

decimal places are used, the specification refers to the units in<br />

the selected definition.<br />

Example:<br />

A SINT variable can be scaled from −999.99 to +999.99 when 2<br />

decimal places are set.<br />

In this way, invalid input is automatically corrected to valid data.<br />

0% Source Defines the process variable which contains the lower limit of the value range for the variable<br />

processed with this input field on the control panel during runtime. This setting is only available<br />

if Parameters from PLC is selected.<br />

Possible Settings Depending on the data type of the variable connected to the input field,<br />

variables with the following data types can be connected:<br />

USINT SINT Variables of data types USINT, SINT, INT, UINT, or DINT<br />

INT UINT DINT can be used independent of the data point of the<br />

connected variable.<br />

UDINT UDINT<br />

REAL REAL<br />

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

(The data type has to be able to accept the desired limits<br />

during runtime!)<br />

74 3.2.3.1 Numeric Output Field − Reference


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

Assign...<br />

100% Value<br />

100% Source<br />

Assign...<br />

This variable can accept values like those defined under 0% Value.<br />

The Assign... button opens a dialog box to select a variable for the 0% Source field. By default,<br />

only variables of suitable types are displayed.<br />

Specifies the upper limit of the allowed value range for the process variable on the control<br />

panel.<br />

Possible Settings Possible settings are limited by the input field width in<br />

characters so that limits can be entered and represented in the<br />

input field.<br />

In addition, input is limited by the connected variable data type<br />

as follows.<br />

USINT SINT<br />

INT UINT<br />

Value range from −99999 to 99999 (limited by<br />

the maximum input field width to 5 characters).<br />

DINT Value range from −2147483648 to 2147483647<br />

UDINT Value range from 0 to 4294967295<br />

REAL Value range from −9999999999 to 9999999999<br />

These specifications apply when no decimal places are set. If<br />

decimal places are used, the specification refers to the units in<br />

the selected definition.<br />

Example:<br />

A SINT variable can be scaled from −999.99 to +999.99 when 2<br />

decimal places are set.<br />

In this way, invalid input is automatically corrected to valid data.<br />

Determines the process variable which contains the upper limit of the value range for the<br />

variable processed with this input field on the control panel during runtime. This setting is only<br />

available if Parameters from PLC is selected.<br />

Possible Settings Depending on the data type of the variable connected to the input field,<br />

variables with the following data types can be connected:<br />

USINT SINT Variables of data types USINT, SINT, INT, UINT, or DINT<br />

INT UINT DINT can be used independent of the data point of the<br />

connected variable.<br />

UDINT UDINT<br />

REAL REAL<br />

(The data type has to be able to accept the desired limits<br />

during runtime!)<br />

This variable can accept values like those defined under 100% Value.<br />

The Assign... button opens a dialog box to select a variable for the 100% Source field. By<br />

default, only variables of suitable types are displayed.<br />

Shift Decimal Point<br />

Using this setting, the decimal point in the output field can be moved during runtime using a variable from the<br />

control application.<br />

This setting is only available if Scaling Active is selected under this tab and at least 1 decimal place is specified<br />

in the Digits after Decimal Point field under the Parameter tab (otherwise, there is no space set aside for the<br />

decimal point).<br />

Source Determines the process variable which contains the number of additional decimal places to be<br />

displayed. If fewer decimal places should be displayed, then the value of the variable has to be<br />

3.2.3.1 Numeric Output Field − Reference 75


Assign...<br />

negative. The resulting number of decimal places is determined by adding the value of this process<br />

variable with the value set in the Digits after Decimal Place field under the Parameter tab. This<br />

number must be able to fit in the selected field size.<br />

Possible Settings Name of a process variable of type USINT (default) or SINT. Data type SINT must<br />

be used if negative decimal point shifts are necessary (fewer decimal places).<br />

The Assign... button opens a dialog box to select a variable for the Source field. By default, only<br />

variables of suitable types are displayed.<br />

Note: The Type−Filter button must be unchecked in the dialog box to select a variable of type<br />

SINT.<br />

For the general operation of dialog boxes.<br />

OK<br />

Cancel<br />

Buttons<br />

Applies settings and closes the dialog box. If settings cannot be applied because of an error, it is<br />

indicated and the dialog box is not closed.<br />

Note:<br />

All changes are applied, including those made under different (hidden) tabs.<br />

Closes the dialog box and discards any changes made.<br />

Warning:<br />

All changes will be discarded, including those made under different (hidden) tabs.<br />

Help Displays help for this tab.<br />

3.2.3.1.4 Numeric Output Field − Properties: Simulation<br />

Input of the displayed value in the editor's Simulation mode.<br />

3.2.3.1.4.1 Image<br />

Simulation Value<br />

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

Specifies the output field value that should be displayed in the editor's Simulation mode. Simulation mode can<br />

be used to create visualization pictures for product documentation. <strong>Visual</strong> <strong>Components</strong> does not use these<br />

settings in any other place.<br />

76 3.2.3.1 Numeric Output Field − Reference


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

Simulation<br />

Value<br />

CharBox<br />

Desired display of the output field in simulation mode as a character string.<br />

Possible Settings Any character string which can be displayed in the output field using the the<br />

set length. <strong>Visual</strong> <strong>Components</strong> does not check the format or the value of the<br />

input.<br />

The entire character set of the selected font can be displayed using this button. Characters can<br />

therefore be input that are not available with the current keyboard settings. A character can be<br />

inserted into the Simulation Value field by double−clicking on it in the CharBox.<br />

It is displayed using the input field's set font.<br />

For the general operation of dialog boxes.<br />

OK<br />

Cancel<br />

Buttons<br />

Applies settings and closes the dialog box. If settings cannot be applied because of an error, it is<br />

indicated and the dialog box is not closed.<br />

Note:<br />

All changes are applied, including those made under different (hidden) tabs.<br />

Closes the dialog box and discards any changes made.<br />

Warning:<br />

All changes will be discarded, including those made under different (hidden) tabs.<br />

Help Displays help for this tab.<br />

3.2.3.2 String Output Field − Reference<br />

This field allows text to be output on the visualization unit.<br />

General<br />

Summary of the basic properties of these types of output fields.<br />

Function Display of text of process variables of type STRING[]<br />

Data Types<br />

The following data types can be displayed for this field:<br />

STRING[]<br />

Availability This field can be used by all systems supported by <strong>Visual</strong> <strong>Components</strong>.<br />

Special Features None<br />

Appearance<br />

Individual Colors<br />

The value will be output as a series of characters in the display.<br />

Special functions:<br />

• Visible/Invisible switching using the Status process variable<br />

• Selectable foreground and background colors<br />

• Display of incorrect/missing variables (field filled in with hyphens '−')<br />

• Fully selectable fonts<br />

The following can be individually set for each output field of this type:<br />

• Foreground color (text color)<br />

• Background color<br />

All colors can either be set in the editor or during runtime using a process<br />

variable.<br />

Properties<br />

Output field properties are set under the various tabs of the Properties dialog box. Field properties can be<br />

displayed by double−clicking on the output field in the editor and are automatically shown after a new field is<br />

inserted.<br />

3.2.3.2 String Output Field − Reference 77


Available settings are described respectively on their own pages. The following list provides an outline of the<br />

possible settings (tabs), as well as references to detailed information.<br />

Parameter<br />

Colors<br />

Simulation<br />

Description<br />

Basic parameters of the output field, such as position, size, connected variable, and status are<br />

defined under this tab. Settings under this tab have to be configured for all output fields created.<br />

Settings under this tab can be used to specify user−defined color settings and to connect process<br />

variables for controlling colors. This is very useful for color displays, but can also be used for<br />

black/white displays.<br />

Allows the input of a display value for the editor's Simulation mode. In this mode, pictures for<br />

documentation can be created with the value set here displayed in the field.<br />

Inputting this information is optional.<br />

Descriptive text about this output field can be entered under this tab. This text is saved in the <strong>Visual</strong><br />

<strong>Components</strong> project but is not transferred to or processed on the target system.<br />

This text is optional but useful for project documentation.<br />

3.2.3.2.1 String Output Field − Properties: Parameter<br />

Provides general settings for the string output field.<br />

3.2.3.2.1.1 Image<br />

Format<br />

Contains various settings for formatting the field on the screen.<br />

Number of Characters<br />

Font<br />

Specifies the number of characters which should be displayed.<br />

Possible Settings The field must be able to fit in the picture with its set size and<br />

font.<br />

Chooses the output field font.<br />

Possible Settings Any font in the project can be selected.<br />

Position<br />

Specifies the position of the output field in pixels on the screen.<br />

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

X Specifies the position of the upper left corner along the X axis (interval from the left display<br />

margin). Values for these parameters begin with 0 on the left margin and increase to the<br />

78 3.2.3.2 String Output Field − Reference


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

Y<br />

width of the display minus one pixel (on the right margin).<br />

Possible Settings for Full<br />

Graphic Displays<br />

Possible Settings for Text<br />

and Semi−Graphic<br />

Displays<br />

This field can be placed freely on the screen. Therefore, X can<br />

be set from 0 to the width of the display minus the width of the<br />

field in pixels.<br />

On text and semi−graphic displays, such as those which can be<br />

connected to the C130 CAN controller, fields can only be<br />

placed evenly on every sixth X−coordinate (X = 0, 6, 12, 18,<br />

etc.).<br />

Specifies the position of the upper left corner along the Y axis (interval from the upper display<br />

margin). Values for these parameters begin with 0 on the upper margin and increase to the<br />

height of the display minus one pixel (on the lower margin).<br />

Possible Settings for Full<br />

Graphic Displays<br />

Possible Settings for Text<br />

and Semi−Graphic<br />

Displays<br />

The field can be placed freely in the display. Therefore, Y can<br />

be set from 0 to the height of the display minus the height of the<br />

field in pixels.<br />

On text and semi−graphic displays, such as those which can be<br />

connected to the C130 CAN controller, fields can only be placed<br />

evenly on every eighth Y−coordinate (Y = 0, 8, 16, 24, etc.).<br />

Destination Data Point<br />

Allows the connection of the variable which should be displayed with this output field.<br />

Source<br />

Assign...<br />

Used to input or display the connected variable.<br />

Possible Settings Name of a process variable of data type STRING [] (array of variables of data<br />

type STRING, ANSI C programmers must use data type plcstring[])<br />

The Assign... button opens a dialog box to select a variable for the Source field. By default, only<br />

variables of suitable types are displayed.<br />

It must be noted that the entire array is selected, not just one element from it.<br />

Status<br />

Contains various settings for formatting the field on the screen.<br />

Source<br />

Assign...<br />

Preview<br />

Displays the field with the current settings.<br />

For the general operation of dialog boxes.<br />

OK<br />

Cancel<br />

Used to input or display the connected variable.<br />

Possible Settings Name of a UINT process variable<br />

Possible Values Bit 0 If 1, the output field is invisible.<br />

All other bits are reserved.<br />

The Assign... button opens a dialog box to select a variable for the Source field. By<br />

default, only variables of suitable types are displayed.<br />

Buttons<br />

Applies settings and closes the dialog box. If settings cannot be applied because of an error, it is<br />

indicated and the dialog box is not closed.<br />

Note:<br />

All changes are applied, including those made under different (hidden) tabs.<br />

Closes the dialog box and discards any changes made.<br />

Warning:<br />

All changes will be discarded, including those made under different (hidden) tabs.<br />

3.2.3.2 String Output Field − Reference 79


Help Displays help for this tab.<br />

3.2.3.2.2 String Output Field − Properties: Colors<br />

Allows colors to be set for the field's display.<br />

3.2.3.2.2.1 Image<br />

Allows colors to be set in the editor.<br />

Use Global<br />

Foreground<br />

Background<br />

Colors<br />

If this option is selected the settings in the project options are adopted for this output field.<br />

Therefore, settings for foreground and background cannot be made.<br />

Allows the selection of color for the output field text. This setting can only be activated if the Use<br />

Global option is not selected.<br />

Possible Settings for<br />

Full Graphic Displays<br />

Possible Settings for<br />

Text and Semi−Graphic<br />

Displays<br />

Any desired color from a palette of 256 colors can be chosen. Standard<br />

palette colors are illustrated in the reference manual.<br />

Customer−specific operator panels can have their own color palettes.<br />

Correct colors are always indicated in the selection list.<br />

Text and semi−graphic displays, such as those which can be connected<br />

to the C130 CAN controller, support only black and white colors. This is<br />

also true for the PP21 and PP41 Power Panels and their<br />

customer−specific varieties.<br />

Allows the selection of the output field's background color. This setting can only be activated if the<br />

Use Global option is not selected.<br />

Possible Settings for<br />

Full Graphic Displays<br />

Possible Settings for<br />

Text and Semi−Graphic<br />

Displays<br />

Any desired color from a palette of 256 colors can be chosen. Standard<br />

palette colors are illustrated in the reference manual.<br />

Customer−specific operator panels can have their own color palettes.<br />

Correct colors are always indicated in the selection list.<br />

Text and semi−graphic displays, such as those which can be connected<br />

to the C130 CAN controller, support only black and white colors. This is<br />

also true for the PP21 and PP41 Power Panels and their<br />

customer−specific varieties.<br />

Colors variable<br />

Allows color to be manipulated with a process variable during runtime.<br />

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

80 3.2.3.2 String Output Field − Reference


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

Source<br />

Assign...<br />

Used to input or display the connected variable.<br />

Possible Settings Name of a UINT process variable<br />

Possible Values Bits 0−7 The low byte contains the output field background<br />

color.<br />

Bits 8−15 The high byte contains the output field text color.<br />

For both of these settings, the same colors which can be used for foreground and<br />

background in the editor are possible (see above).<br />

The Assign... button opens a dialog box to select a variable for the Source field. By default, only<br />

variables of suitable types are displayed.<br />

For the general operation of dialog boxes.<br />

OK<br />

Cancel<br />

Buttons<br />

Applies settings and closes the dialog box. If settings cannot be applied because of an error, it is<br />

indicated and the dialog box is not closed.<br />

Note:<br />

All changes are applied, including those made under different (hidden) tabs.<br />

Closes the dialog box and discards any changes made.<br />

Warning:<br />

All changes will be discarded, including those made under different (hidden) tabs.<br />

Help Displays help for this tab.<br />

3.2.3.2.3 String Output Field − Properties: Simulation<br />

Input of the displayed value in the editor's Simulation mode.<br />

3.2.3.2.3.1 Image<br />

Simulation Value<br />

Specifies the output field value that should be displayed in the editor's Simulation mode. Simulation mode can<br />

be used to create visualization pictures for product documentation. <strong>Visual</strong> <strong>Components</strong> does not use these<br />

settings in any other place.<br />

Desired display of the output field in simulation mode as a character string.<br />

3.2.3.2 String Output Field − Reference 81


Simulation<br />

Value<br />

CharBox<br />

Possible Settings Any character string which can be displayed in the output field using the the<br />

set length. <strong>Visual</strong> <strong>Components</strong> does not check the format or the value of the<br />

input.<br />

The entire character set of the selected font can be displayed using this button. Characters can<br />

therefore be input that are not available with the current keyboard settings. A character can be<br />

inserted into the Simulation Value field by double−clicking on it in the CharBox.<br />

It is displayed using the input field's set font.<br />

For the general operation of dialog boxes.<br />

OK<br />

Cancel<br />

Buttons<br />

Applies settings and closes the dialog box. If settings cannot be applied because of an error, it is<br />

indicated and the dialog box is not closed.<br />

Note:<br />

All changes are applied, including those made under different (hidden) tabs.<br />

Closes the dialog box and discards any changes made.<br />

Warning:<br />

All changes will be discarded, including those made under different (hidden) tabs.<br />

Help Displays help for this tab.<br />

3.2.3.3 Date/Time Output Field − Reference<br />

This output field is used to output the system date and time. A series of fixed, predefined output formats are<br />

provided to do this. If these do not suffice, formatting can be configured in the control application and an output<br />

string can be used. This is also necessary to display other, different date and time information.<br />

General<br />

Summary of the basic properties of these types of output fields.<br />

Function Displays controller date and/or time information (system time).<br />

Data Types<br />

The following data types can be displayed for this field:<br />

None (the system time is displayed)<br />

Availability This field can be used by all systems supported by <strong>Visual</strong> <strong>Components</strong>.<br />

Special<br />

Features<br />

Appearance<br />

Individual<br />

Colors<br />

Uses predefined date and time formats. User−specific formats can only be implemented in the<br />

control application and displayed with output strings or a combination of several numeric output<br />

fields.<br />

The value will be output as a series of characters in the display.<br />

Special functions:<br />

• Automatic formatting of date/time information<br />

• Visible/Invisible switching using the Status process variable<br />

• Selectable foreground and background colors<br />

• Display of incorrect/missing variables (field filled in with hyphens '−')<br />

• Fully selectable fonts<br />

The following can be individually set for each output field of this type:<br />

• Foreground color (text color)<br />

• Background color<br />

All colors can either be set in the editor or during runtime using a process variable.<br />

Properties<br />

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

Output field properties are set under the various tabs of the Properties dialog box. Field properties can be<br />

displayed by double−clicking on the output field in the editor and are automatically shown after a new field is<br />

inserted.<br />

82 3.2.3.3 Date/Time Output Field − Reference


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

Available settings are described respectively on their own pages. The following list provides an outline of the<br />

possible settings (tabs), as well as references to detailed information.<br />

Parameter<br />

Colors<br />

Simulation<br />

Description<br />

Basic parameters for the output fields such as position, size, and status are defined under this tab.<br />

Settings under this tab have to be configured for all output fields created.<br />

Settings under this tab can be used to specify user−defined color settings and to connect process<br />

variables for controlling colors. This is very useful for color displays, but can also be used for<br />

black/white displays.<br />

Allows the input of a display value for the editor's Simulation mode. In this mode, pictures for<br />

documentation can be created with the value set here displayed in the field.<br />

Inputting this information is optional.<br />

Descriptive text about this output field can be entered under this tab. This text is saved in the <strong>Visual</strong><br />

<strong>Components</strong> project but is not transferred to or processed on the target system.<br />

This text is optional but useful for project documentation.<br />

3.2.3.3.1 Date/Time Output Field − Properties: Parameter<br />

Provides general settings for date/time output fields.<br />

3.2.3.3.1.1 Image<br />

Format<br />

Contains various settings for formatting the field on the screen.<br />

Time Format Determines the format in which the date and/or time is displayed.<br />

Possible Settings Any of the formats out of the selection list:<br />

• DD.MM.YY HH:MM:SS<br />

• MM.DD.YY HH:MM:SSa<br />

• HH:MM:SS<br />

• HH:MM:SSa<br />

• HH:MM<br />

• HH:MMa<br />

Meanings of the abbreviations<br />

DD Day displayed with two digits<br />

MM Month displayed with two digits<br />

3.2.3.3 Date/Time Output Field − Reference 83


Font<br />

YY Year displayed with two digits<br />

HH Hour displayed with two digits<br />

MM Minutes<br />

SS Seconds<br />

a AM/PM display. In the other formats, a 24−hour display is<br />

used. AM/PM display is only represented by one<br />

character (a/p).<br />

Other characters (periods, colons, spaces) are output just as<br />

they appear in the format.<br />

The selected format determines the width of the field, so a<br />

separated display of the field size is not necessary or possible.<br />

The field must be able to fit in the picture with its set size and<br />

font.<br />

Chooses the font which should be used for the output field.<br />

Possible Settings Any font in the project can be selected.<br />

Position<br />

Specifies the position of the output field in pixels on the screen.<br />

X<br />

Y<br />

Specifies the position of the upper left corner along the X axis (interval from the left display<br />

margin). Values for these parameters begin with 0 on the left margin and increase to the<br />

width of the display minus one pixel (on the right margin).<br />

Possible Settings for Full<br />

Graphic Displays<br />

Possible Settings for Text<br />

and Semi−Graphic<br />

Displays<br />

This field can be placed freely on the screen. Therefore, X can<br />

be set from 0 to the width of the display minus the width of the<br />

field in pixels.<br />

On text and semi−graphic displays, such as those which can be<br />

connected to the C130 CAN controller, fields can only be<br />

placed evenly on every sixth X−coordinate (X = 0, 6, 12, 18,<br />

etc.).<br />

Specifies the position of the upper left corner along the Y axis (interval from the upper display<br />

margin). Values for these parameters begin with 0 on the upper margin and increase to the<br />

height of the display minus one pixel (on the lower margin).<br />

Possible Settings for Full<br />

Graphic Displays<br />

Possible Settings for Text<br />

and Semi−Graphic<br />

Displays<br />

The field can be placed freely in the display. Therefore, Y can<br />

be set from 0 to the height of the display minus the height of the<br />

field in pixels.<br />

On text and semi−graphic displays, such as those which can be<br />

connected to the C130 CAN controller, fields can only be placed<br />

evenly on every eighth Y−coordinate (Y = 0, 8, 16, 24, etc.).<br />

Status<br />

Contains various settings for formatting the field on the screen.<br />

Source<br />

Assign...<br />

Preview<br />

Displays the field with the current settings.<br />

Used to input or display the connected variable.<br />

Possible Settings Name of a UINT process variable<br />

Possible Values Bit 0 If 1, the output field is invisible.<br />

All other bits are reserved.<br />

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

The Assign... button opens a dialog box to select a variable for the Source field. By<br />

default, only variables of suitable types are displayed.<br />

84 3.2.3.3 Date/Time Output Field − Reference


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

For the general operation of dialog boxes.<br />

OK<br />

Cancel<br />

Buttons<br />

Applies settings and closes the dialog box. If settings cannot be applied because of an error, it is<br />

indicated and the dialog box is not closed.<br />

Note:<br />

All changes are applied, including those made under different (hidden) tabs.<br />

Closes the dialog box and discards any changes made.<br />

Warning:<br />

All changes will be discarded, including those made under different (hidden) tabs.<br />

Help Displays help for this tab.<br />

3.2.3.3.2 Date/Time Output Field − Properties: Colors<br />

Allows colors to be set for the field's display.<br />

3.2.3.3.2.1 Image<br />

Allows colors to be set in the editor.<br />

Use Global<br />

Foreground<br />

Colors<br />

If this option is selected the settings in the project options are adopted for this output field.<br />

Therefore, settings for foreground and background cannot be made.<br />

Allows the selection of color for the output field text. This setting can only be activated if the Use<br />

Global option is not selected.<br />

Possible Settings for<br />

Full Graphic Displays<br />

Possible Settings for<br />

Text and Semi−Graphic<br />

Displays<br />

Any desired color from a palette of 256 colors can be chosen. Standard<br />

palette colors are illustrated in the reference manual.<br />

Customer−specific operator panels can have their own color palettes.<br />

Correct colors are always indicated in the selection list.<br />

Text and semi−graphic displays, such as those which can be connected<br />

to the C130 CAN controller, support only black and white colors. This is<br />

also true for the PP21 and PP41 Power Panels and their<br />

customer−specific varieties.<br />

Background Allows the selection of the output field's background color. This setting can only be activated if the<br />

Use Global option is not selected.<br />

Possible Settings for Any desired color from a palette of 256 colors can be chosen. Standard<br />

3.2.3.3 Date/Time Output Field − Reference 85


Full Graphic Displays palette colors are illustrated in the reference manual.<br />

Customer−specific operator panels can have their own color palettes.<br />

Correct colors are always indicated in the selection list.<br />

Possible Settings for<br />

Text and Semi−Graphic<br />

Displays<br />

Text and semi−graphic displays, such as those which can be connected<br />

to the C130 CAN controller, support only black and white colors. This is<br />

also true for the PP21 and PP41 Power Panels and their<br />

customer−specific varieties.<br />

Colors variable<br />

Allows color to be manipulated with a process variable during runtime.<br />

Source<br />

Assign...<br />

Used to input or display the connected variable.<br />

Possible Settings Name of a UINT process variable<br />

Possible Values Bits 0−7 The low byte contains the output field background<br />

color.<br />

Bits 8−15 The high byte contains the output field text color.<br />

For both of these settings, the same colors which can be used for foreground and<br />

background in the editor are possible (see above).<br />

The Assign... button opens a dialog box to select a variable for the Source field. By default, only<br />

variables of suitable types are displayed.<br />

For the general operation of dialog boxes.<br />

OK<br />

Cancel<br />

Buttons<br />

Applies settings and closes the dialog box. If settings cannot be applied because of an error, it is<br />

indicated and the dialog box is not closed.<br />

Note:<br />

All changes are applied, including those made under different (hidden) tabs.<br />

Closes the dialog box and discards any changes made.<br />

Warning:<br />

All changes will be discarded, including those made under different (hidden) tabs.<br />

Help Displays help for this tab.<br />

3.2.3.3.3 Output Date/Time − Properties: Simulation<br />

Input of the displayed value in the editor simulation mode.<br />

3.2.3.3.3.1 Image<br />

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

86 3.2.3.3 Date/Time Output Field − Reference


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

Simulation Value<br />

Specifies the output field value that should be displayed in the simulation mode of the editor. The simulation<br />

mode can be used to create visualization pictures for product documentation. <strong>Visual</strong> <strong>Components</strong> does not use<br />

these settings in any other place.<br />

Simulation<br />

Value<br />

CharBox<br />

Desired display of the output field in simulation mode as a character string.<br />

Possible Settings Any character string which can be displayed in the output field using the the<br />

set length. <strong>Visual</strong> <strong>Components</strong> does not check the format or the value of the<br />

input.<br />

The entire character set of the selected font can be displayed using this button. Characters can<br />

therefore be input that are not available with the current keyboard settings. A character can be<br />

inserted into the Simulation Value field by double−clicking on it in the CharBox.<br />

It is displayed using the set font of the input field.<br />

For the general operation of dialog boxes.<br />

OK<br />

Cancel<br />

Buttons<br />

Applies settings and closes the dialog box. If settings cannot be accepted because of a mistake, this is<br />

shown and the dialog box is not closed.<br />

Note:<br />

All changes are accepted, including those made under different (hidden) tabs.<br />

Closes the dialog box and discards any changes made.<br />

Warning:<br />

All changes will be discarded, including those made under different (hidden) tabs.<br />

Help Displays help for this tab.<br />

3.2.3.4 Advanced Text Output Field − Reference<br />

This field allows text to be output based on a numeric index read from a process variable during visualization<br />

runtime. This provides a simple way to switch between a predefined number of texts.<br />

General<br />

Summary of the basic properties of these types of output fields.<br />

Function Display of text based on a numeric index from a process variable<br />

Data Types The following data types can be displayed for this field:<br />

3.2.3.4 Advanced Text Output Field − Reference 87


UINT<br />

Availability This field can be used by all systems supported by <strong>Visual</strong> <strong>Components</strong>.<br />

Special<br />

Features<br />

Appearance<br />

Individual<br />

Colors<br />

Special functions:<br />

• Almost any number of texts can be defined during creation in the <strong>Visual</strong> <strong>Components</strong><br />

editor and displayed during runtime (limited by the memory capacity of the target<br />

system).<br />

• Texts can be translated either conveniently in the editor or using external tools<br />

• Easy highlighting of text with the Attribute Data Point variable<br />

• Text groups can be used several times<br />

The value is output in the picture as text from a text group using the text number which<br />

corresponds to the connected process variable.<br />

Special functions:<br />

• Visible/Invisible switching using the Status process variable<br />

• Selectable foreground and background colors<br />

• Display of incorrect/missing variables (field filled in with hyphens '−')<br />

• Display of invalid values in the index variable (Field filled in with asterisks '*')<br />

• Fully selectable fonts<br />

The following can be individually set for each output field of this type:<br />

• Foreground color (text color)<br />

• Background color<br />

All colors can either be set in the editor or during runtime using a process variable.<br />

Properties<br />

Output field properties are set under the various tabs of the Properties dialog box. Field properties can be<br />

displayed by double−clicking on the output field in the editor and are automatically shown after a new field is<br />

inserted.<br />

Available settings are described respectively on their own pages. The following list provides an outline of the<br />

possible settings (tabs), as well as references to detailed information.<br />

Parameter<br />

Colors<br />

Simulation<br />

Description<br />

Basic parameters of the output field, such as position, size, connected variable, and status are<br />

defined under this tab. Settings under this tab have to be configured for all output fields created.<br />

Settings under this tab can be used to specify user−defined color settings and to connect process<br />

variables for controlling colors. This is very useful for color displays, but can also be used for<br />

black/white displays.<br />

Allows the input of a display value for the editor's Simulation mode. In this mode, pictures for<br />

documentation can be created with the value set here displayed in the field.<br />

Inputting this information is optional.<br />

Descriptive text about this output field can be entered under this tab. This text is saved in the <strong>Visual</strong><br />

<strong>Components</strong> project but is not transferred to or processed on the target system.<br />

This text is optional but useful for project documentation.<br />

3.2.3.4.1 Advanced Text Output Field − Properties: Parameter<br />

Provides general settings for advanced text output.<br />

3.2.3.4.1.1 Image<br />

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

88 3.2.3.4 Advanced Text Output Field − Reference


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

Format<br />

Contains various settings for formatting the field on the screen.<br />

Number of Characters<br />

Font<br />

Text Group<br />

Specifies the number of characters which should be displayed. If the connected text<br />

group contains longer texts, then they are limited to this number of characters when<br />

displayed.<br />

Possible Settings The field must be able to fit in the picture with its set size and<br />

font.<br />

Chooses the output field font.<br />

Possible Settings Any font in the project can be selected.<br />

Selects the text group and corresponding texts which should be displayed in the output<br />

field.<br />

Possible Settings Any existing text group in the project can be selected.<br />

Position<br />

Specifies the position of the output field in pixels on the screen.<br />

X<br />

Specifies the position of the upper left corner along the X axis (interval from the left display<br />

margin). Values for these parameters begin with 0 on the left margin and increase to the<br />

width of the display minus one pixel (on the right margin).<br />

Possible Settings for Full<br />

Graphic Displays<br />

Possible Settings for Text<br />

and Semi−Graphic<br />

Displays<br />

This field can be placed freely on the screen. Therefore, X can<br />

be set from 0 to the width of the display minus the width of the<br />

field in pixels.<br />

On text and semi−graphic displays, such as those which can be<br />

connected to the C130 CAN controller, fields can only be<br />

placed evenly on every sixth X−coordinate (X = 0, 6, 12, 18,<br />

etc.).<br />

Y Specifies the position of the upper left corner along the Y axis (interval from the upper display<br />

margin). Values for these parameters begin with 0 on the upper margin and increase to the<br />

3.2.3.4 Advanced Text Output Field − Reference 89


height of the display minus one pixel (on the lower margin).<br />

Possible Settings for Full<br />

Graphic Displays<br />

Possible Settings for Text<br />

and Semi−Graphic<br />

Displays<br />

The field can be placed freely in the display. Therefore, Y can<br />

be set from 0 to the height of the display minus the height of the<br />

field in pixels.<br />

On text and semi−graphic displays, such as those which can be<br />

connected to the C130 CAN controller, fields can only be placed<br />

evenly on every eighth Y−coordinate (Y = 0, 8, 16, 24, etc.).<br />

Text Number Data Point<br />

Allows the connection of a variable which should select the text displayed in the output field.<br />

Source<br />

Assign...<br />

Used to input or display the connected variable.<br />

Possible Settings Name of a UINT process variable.<br />

Possible Values Corresponding to the number of texts in the connected text group, values<br />

from 0 to one less than the "Number of Texts" are allowed as long as the<br />

used text group numbers have not been changed.<br />

If the used text group numbers were changed, then only values can be set<br />

which have a text in the text group assigned.<br />

If the variable has a different value, this will be treated as an overflow<br />

situation, and a series of asterisks will be displayed.<br />

The Assign... button opens a dialog box to select a variable for the Source field. By default, only<br />

variables of suitable types are displayed.<br />

Allows the connection of a variable for display control.<br />

Source<br />

Assign...<br />

Attribute Data Point<br />

Used to input or display the connected variable.<br />

Possible Settings Name of a UINT process variable.<br />

Possible Values Bit 0 If 1, the output field is highlighted. For pure text−displays (LCD and<br />

VFD Line Displays), text is displayed as blinking. On all other<br />

displays, text is inverted.<br />

Further options for color displays are available under the Colors tab<br />

under Properties.<br />

All other bits are reserved.<br />

The Assign... button opens a dialog box to select a variable for the Source field. By default, only<br />

variables of suitable types are displayed.<br />

Status<br />

Contains various settings for formatting the field on the screen.<br />

Source<br />

Assign...<br />

Preview<br />

Displays the field with the current settings.<br />

Used to input or display the connected variable.<br />

Possible Settings Name of a UINT process variable<br />

Possible Values Bit 0 If 1, the output field is invisible.<br />

All other bits are reserved.<br />

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

The Assign... button opens a dialog box to select a variable for the Source field. By<br />

default, only variables of suitable types are displayed.<br />

90 3.2.3.4 Advanced Text Output Field − Reference


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

For the general operation of dialog boxes.<br />

OK<br />

Cancel<br />

Buttons<br />

Applies settings and closes the dialog box. If settings cannot be applied because of an error, it is<br />

indicated and the dialog box is not closed.<br />

Note:<br />

All changes are applied, including those made under different (hidden) tabs.<br />

Closes the dialog box and discards any changes made.<br />

Warning:<br />

All changes will be discarded, including those made under different (hidden) tabs.<br />

Help Displays help for this tab.<br />

3.2.3.4.2 Advanced Text Output Field − Properties: Colors<br />

Allows colors to be set for the field's display.<br />

3.2.3.4.2.1 Image<br />

Allows colors to be set in the editor.<br />

Use Global<br />

Colors<br />

If this option is selected the settings in the project options are adopted for this output field.<br />

Therefore, settings for foreground and background cannot be made.<br />

Foreground Allows the selection of color for the output field text. This setting can only be activated if the Use<br />

Global option is not selected.<br />

Possible Settings for<br />

Full Graphic Displays<br />

Possible Settings for<br />

Text and Semi−Graphic<br />

Displays<br />

Any desired color from a palette of 256 colors can be chosen. Standard<br />

palette colors are illustrated in the reference manual.<br />

Customer−specific operator panels can have their own color palettes.<br />

Correct colors are always indicated in the selection list.<br />

Text and semi−graphic displays, such as those which can be connected<br />

to the C130 CAN controller, support only black and white colors. This is<br />

also true for the PP21 and PP41 Power Panels and their<br />

3.2.3.4 Advanced Text Output Field − Reference 91


Background<br />

customer−specific varieties.<br />

Allows the selection of the output field's background color. This setting can only be activated if the<br />

Use Global option is not selected.<br />

Possible Settings for<br />

Full Graphic Displays<br />

Possible Settings for<br />

Text and Semi−Graphic<br />

Displays<br />

Any desired color from a palette of 256 colors can be chosen. Standard<br />

palette colors are illustrated in the reference manual.<br />

Customer−specific operator panels can have their own color palettes.<br />

Correct colors are always indicated in the selection list.<br />

Text and semi−graphic displays, such as those which can be connected<br />

to the C130 CAN controller, support only black and white colors. This is<br />

also true for the PP21 and PP41 Power Panels and their<br />

customer−specific varieties.<br />

Colors variable<br />

Allows color to be manipulated with a process variable during runtime.<br />

Source<br />

Assign...<br />

Used to input or display the connected variable.<br />

Possible Settings Name of a UINT process variable<br />

Possible Values Bits 0−7 The low byte contains the output field background<br />

color.<br />

Bits 8−15 The high byte contains the output field text color.<br />

For both of these settings, the same colors which can be used for foreground and<br />

background in the editor are possible (see above).<br />

The Assign... button opens a dialog box to select a variable for the Source field. By default, only<br />

variables of suitable types are displayed.<br />

For the general operation of dialog boxes.<br />

OK<br />

Cancel<br />

Buttons<br />

Applies settings and closes the dialog box. If settings cannot be applied because of an error, it is<br />

indicated and the dialog box is not closed.<br />

Note:<br />

All changes are applied, including those made under different (hidden) tabs.<br />

Closes the dialog box and discards any changes made.<br />

Warning:<br />

All changes will be discarded, including those made under different (hidden) tabs.<br />

Help Displays help for this tab.<br />

3.2.3.4.3 Advanced Text Output Field − Properties: Simulation<br />

Input of the displayed value in the editor's Simulation mode.<br />

3.2.3.4.3.1 Image<br />

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

92 3.2.3.4 Advanced Text Output Field − Reference


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

Simulation Value<br />

Specifies the output field value that should be displayed in the editor's Simulation mode. Simulation mode can<br />

be used to create visualization pictures for product documentation. <strong>Visual</strong> <strong>Components</strong> does not use these<br />

settings in any other place.<br />

Simulation<br />

Value<br />

CharBox<br />

Desired display of the output field in simulation mode as a character string.<br />

Possible Settings Any character string which can be displayed in the output field using the the<br />

set length. <strong>Visual</strong> <strong>Components</strong> does not check the format or the value of the<br />

input.<br />

The entire character set of the selected font can be displayed using this button. Characters can<br />

therefore be input that are not available with the current keyboard settings. A character can be<br />

inserted into the Simulation Value field by double−clicking on it in the CharBox.<br />

It is displayed using the input field's set font.<br />

For the general operation of dialog boxes.<br />

OK<br />

Cancel<br />

Buttons<br />

Applies settings and closes the dialog box. If settings cannot be applied because of an error, it is<br />

indicated and the dialog box is not closed.<br />

Note:<br />

All changes are applied, including those made under different (hidden) tabs.<br />

Closes the dialog box and discards any changes made.<br />

Warning:<br />

All changes will be discarded, including those made under different (hidden) tabs.<br />

Help Displays help for this tab.<br />

3.2.3.5 Bar Graph Output Field − Reference<br />

This output field allows numeric data to be output in the form of a movable bar graph. By default, bar graphs do<br />

not have any borders or other embellishments. These can be added easily as needed in the <strong>Visual</strong> <strong>Components</strong><br />

3.2.3.5 Bar Graph Output Field − Reference 93


project.<br />

General<br />

Summary of the basic properties of these types of output fields.<br />

Function Displays numeric process variables as moving bars.<br />

Data Types<br />

Availability<br />

Special Features<br />

Appearance<br />

Individual Colors<br />

The following data types can be displayed for this field:<br />

USINT, UINT<br />

Graphic−capable operator panels<br />

• IPC2001 and IPC5000 families with 1/4 VGA, VGA, or larger display<br />

• Power Panel PP41<br />

• Semi−graphic displays on the C130 CAN controller (no pure text displays)<br />

Special functions:<br />

• Selectable value scaling for display<br />

• Choice of horizontal or vertical extension, each in both directions (left/right,<br />

upward/downward)<br />

The value is output as a moving bar graph in the picture.<br />

Special functions:<br />

• Visible/Invisible switching using the Status process variable<br />

• Selectable foreground and background colors<br />

• Horizontal or vertical extension possible in both directions<br />

The following can be individually set for each output field of this type:<br />

• Foreground color (bar graph color)<br />

• Background color<br />

All colors can either be set in the editor or during runtime using a process variable.<br />

Properties<br />

Output field properties are set under the various tabs of the Properties dialog box. Field properties can be<br />

displayed by double−clicking on the output field in the editor and are automatically shown after a new field is<br />

inserted.<br />

Available settings are described respectively on their own pages. The following list provides an outline of the<br />

possible settings (tabs), as well as references to detailed information.<br />

Parameter<br />

Colors<br />

Scaling<br />

Active<br />

Description<br />

Basic parameters of the output field, such as position, size, connected variable, and status are<br />

defined under this tab. Settings under this tab have to be configured for all output fields created.<br />

Settings under this tab can be used to specify user−defined color settings and to connect process<br />

variables for controlling colors. This is very useful for color displays, but can also be used for<br />

black/white displays.<br />

Scaling allows the value range on the PLC to be converted to another range of values on the<br />

visualization device. This allows any desired range of values on the PLC to be automatically<br />

adapted to the length of the bars.<br />

If the variable value is specified to the length of the bar in pixels, then no settings are necessary<br />

under this tab.<br />

Descriptive text about this output field can be entered under this tab. This text is saved in the<br />

<strong>Visual</strong> <strong>Components</strong> project but is not transferred to or processed on the target system.<br />

This text is optional but useful for project documentation.<br />

3.2.3.5.1 Bar Graph Output Field − Properties: Parameter<br />

Provides general settings for bar graph output.<br />

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

94 3.2.3.5 Bar Graph Output Field − Reference


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

3.2.3.5.1.1 Image<br />

Format<br />

Contains various settings for formatting the field on the screen.<br />

Width<br />

Length<br />

Determines the width of the displayed bar graph. The width of the bar corresponds to the extension<br />

direction set under Direction. For a horizontal bar (extension from left to right, or right to left), this<br />

parameter describes the height. For a vertical bar (extension from down to up, or up to down), this<br />

parameter describes the width.<br />

This setting is made with pixels.<br />

Possible Settings From 1 to the display size in the corresponding direction.<br />

The set size and position of the field must allow it to fit in the picture.<br />

Determines the length of the displayed bar graphic. The length of the bar corresponds to the<br />

extension direction set under Direction. For a horizontal bar (extension from left to right, or right to<br />

left), this parameter describes the width. For a vertical bar (extension from down to up, or up to down),<br />

this parameter describes the height.<br />

This setting is made with pixels.<br />

Possible Settings From 1 to the display size in the corresponding direction.<br />

The set size and position of the field must allow it to fit in the picture.<br />

Direction Determines the extension of the bar graph in one of the four main directions. The following settings<br />

can be chosen from the list.<br />

3.2.3.5 Bar Graph Output Field − Reference 95


Position<br />

Contains various settings for formatting the field on the screen.<br />

X<br />

Y<br />

Right Bar extends<br />

from left to<br />

right<br />

Upward Bar extends<br />

from down<br />

to up<br />

Links Bar extends<br />

from right to<br />

left<br />

Downward Bar extends<br />

from up to<br />

down<br />

Specifies the position of the upper left corner along the X axis (interval from the left display margin). Values<br />

for these parameters begin with 0 on the left margin and increase to the width of the display minus one pixel<br />

(on the right margin).<br />

Possible Settings for Full<br />

Graphic Displays<br />

Possible Settings for<br />

Semi−graphic Displays<br />

This field can be placed freely on the screen. Therefore, X can be set from<br />

0 to the width of the display minus the width of the field in pixels.<br />

On semi−graphic displays, such as those which can be connected to the<br />

C130 CAN Controller, fields can only be placed evenly on every sixth<br />

X−coordinate (X = 0, 6, 12, 18, etc.). On pure text displays the display of<br />

bar graphics is not possible.<br />

Specifies the position of the upper left corner along the Y axis (interval from the upper display margin).<br />

Values for these parameters begin with 0 on the upper margin and increase to the height of the display minus<br />

one pixel (on the lower margin).<br />

Possible Settings for<br />

Full Graphic Displays<br />

Possible Settings for<br />

Semi−graphic Displays<br />

The field can be placed freely in the display. Therefore, Y can be set from 0 to the<br />

height of the display minus the height of the field in pixels.<br />

On semi−graphic displays, such as those which can be connected to the CAN<br />

Controller C130, fields can only be placed evenly on every eighth Y−coordinate (Y<br />

= 0, 8, 16, 24, etc.). On pure text displays the display of bar graphics is not<br />

possible.<br />

Data Point<br />

Allows the connection of the variable which should be displayed with this output field.<br />

Source<br />

Assign...<br />

Used to input or display the connected variable.<br />

Possible Settings Name of a process variable of data type USINT or UINT.<br />

The Assign... button opens a dialog box to select a variable for the Source field. By<br />

default, only variables of suitable types are displayed.<br />

Status<br />

Contains various settings for formatting the field on the screen.<br />

Source Used to input or display the connected variable.<br />

Possible Settings Name of a UINT process variable<br />

Possible Values Bit 0 If 1, the output field is invisible.<br />

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

96 3.2.3.5 Bar Graph Output Field − Reference


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

Assign...<br />

Preview<br />

Displays the field with the current settings.<br />

For the general operation of dialog boxes.<br />

OK<br />

Cancel<br />

All other bits are reserved.<br />

The Assign... button opens a dialog box to select a variable for the Source field. By<br />

default, only variables of suitable types are displayed.<br />

Buttons<br />

Applies settings and closes the dialog box. If settings cannot be applied because of an error, it is<br />

indicated and the dialog box is not closed.<br />

Note:<br />

All changes are applied, including those made under different (hidden) tabs.<br />

Closes the dialog box and discards any changes made.<br />

Warning:<br />

All changes will be discarded, including those made under different (hidden) tabs.<br />

Help Displays help for this tab.<br />

3.2.3.5.2 Bar Graph Output Field − Properties: Colors<br />

Allows colors to be set for the field's display.<br />

3.2.3.5.2.1 Image<br />

Allows colors to be set in the editor.<br />

Use Global<br />

Colors<br />

If this option is selected the settings in the project options are adopted for this<br />

output field. Therefore, settings for foreground and background cannot be made.<br />

Foreground Allows the selection of the color which represents the bar graph. This setting can<br />

only be activated if the Use Global option is not selected.<br />

3.2.3.5 Bar Graph Output Field − Reference 97


Background<br />

Possible Settings<br />

for Full Graphic<br />

Displays<br />

Possible Settings<br />

for Semi−graphic<br />

Displays<br />

Any desired color from a palette of 256 colors can be<br />

chosen. Standard palette colors are illustrated in the<br />

reference manual. Customer−specific operator panels can<br />

have their own color palettes. Correct colors are always<br />

indicated in the selection list.<br />

Semi−graphic displays, such as those which can be<br />

connected to the C130 CAN controller, support only black<br />

and white colors. This is also true for the PP21 and PP41<br />

Power Panels and their customer−specific varieties.<br />

Allows the selection of the output field's background color. This setting can only<br />

be activated if the Use Global option is not selected.<br />

Possible Settings<br />

for Full Graphic<br />

Displays<br />

Possible Settings<br />

for Semi−graphic<br />

Displays<br />

Any desired color from a palette of 256 colors can be<br />

chosen. Standard palette colors are illustrated in the<br />

reference manual. Customer−specific operator panels can<br />

have their own color palettes. Correct colors are always<br />

indicated in the selection list.<br />

Semi−graphic displays, such as those which can be<br />

connected to the C130 CAN controller, support only black<br />

and white colors. This is also true for the PP21 and PP41<br />

Power Panels and their customer−specific varieties.<br />

Colors variable<br />

Allows color to be manipulated with a process variable during runtime.<br />

Source<br />

Assign...<br />

Used to input or display the connected variable.<br />

Possible Settings Name of a UINT process variable<br />

Possible Values Bits 0−7 The low byte contains the output field background<br />

color.<br />

Bits 8−15 The high byte contains the color of the bar.<br />

For both of these settings, the same colors which can be used for foreground and<br />

background in the editor are possible (see above).<br />

The Assign... button opens a dialog box to select a variable for the Source field. By default, only<br />

variables of suitable types are displayed.<br />

For the general operation of dialog boxes.<br />

OK<br />

Cancel<br />

Buttons<br />

Applies settings and closes the dialog box. If settings cannot be applied because of an error, it is<br />

indicated and the dialog box is not closed.<br />

Note:<br />

All changes are applied, including those made under different (hidden) tabs.<br />

Closes the dialog box and discards any changes made.<br />

Warning:<br />

All changes will be discarded, including those made under different (hidden) tabs.<br />

Help Displays help for this tab.<br />

3.2.3.5.3 Bar Graph Output Field − Properties: Scaling<br />

Allows the flexible scaling of the displayed value.<br />

3.2.3.5.3.1 Image<br />

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

98 3.2.3.5 Bar Graph Output Field − Reference


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

Enables scaling for this output field<br />

Scaling Active<br />

Scaling<br />

If this option is selected, the value in the output field is scaled; otherwise, the actual numeric<br />

value of the process variable is shown as the extension of the bar in pixels.<br />

The other fields under this tab are only enabled when this option is selected.<br />

PLC Value Range<br />

Specifies the allowed value range of the connected process variable on the PLC. The range set here is<br />

scaled to the length of the bar for the display of the value in the ouput field. If the connected variable<br />

has the value set under '0% Value,' then the bar will be displayed as empty. If the connected variable<br />

has the value set under '100% Value,' then the bar will appear filled−in.<br />

0% Value<br />

100% Value<br />

Specifies the lower limit of the permitted value range for the process variable on the PLC.<br />

Possible Settings Corresponds to the value range of the connected process variable.<br />

Specifies the upper limit of the permitted value range for the process variable on the<br />

PLC.<br />

Possible Settings Corresponds to the value range of the connected process variable.<br />

For the general operation of dialog boxes.<br />

OK<br />

Cancel<br />

Buttons<br />

Applies settings and closes the dialog box. If settings cannot be applied because of an error, it is<br />

indicated and the dialog box is not closed.<br />

Note:<br />

All changes are applied, including those made under different (hidden) tabs.<br />

Closes the dialog box and discards any changes made.<br />

Warning:<br />

All changes will be discarded, including those made under different (hidden) tabs.<br />

Help Displays help for this tab.<br />

3.2.3.5 Bar Graph Output Field − Reference 99


3.2.3.6 ListBox Output Field − Reference<br />

Using this output field, a list of texts can be shown on the screen underneath one another. They can be used<br />

either from a text group or a process variable. A text can be highlighted and selected using a process variable.<br />

If more texts are defined in the text group or the process variable than there is space set in the ListBox output<br />

field, then a corresponding excerpt is displayed. This ensures that the selected highlighted text is always visible.<br />

The ListBox output field doesn't allow user interaction, either from panel keys or touch screen keypads. Thus,<br />

any necessary operations need to be implemented in the application.<br />

General<br />

Summary of the basic properties of these types of output fields.<br />

Function<br />

Data Types<br />

Displays vertically−ordered lists of texts from a text group or from an array of string<br />

variables in a process variable. Highlighting is based on the number index from a<br />

process variable.<br />

The following data types can be displayed for this field:<br />

STRING[][] − optional as the source of the text to be displayed<br />

UINT − Chooses which text should be highlighted.<br />

Availability This field can be used by all systems supported by <strong>Visual</strong> <strong>Components</strong>.<br />

Special Features<br />

Appearance<br />

Individual Colors<br />

Special functions:<br />

• Almost any number of texts can be defined during creation in the <strong>Visual</strong><br />

<strong>Components</strong> editor and displayed during runtime (limited by the memory<br />

capacity of the target system).<br />

• Texts can be translated either conveniently in the editor or using external<br />

tools<br />

• Texts can also be provided using a process variable during runtime; in this<br />

case, language−switching must be prepared in the application.<br />

• Any desired operation can be implemented in the application using additional<br />

function keys or touch−operated fields.<br />

• Text groups can be used several times<br />

Texts are output as a vertical list and are either extended to the set length with blank<br />

spaces or shortened if necessary. Because of this, the entire field always appears as<br />

a rectangle.<br />

Special functions:<br />

• Automatic display of the correct text section so that the highlighted text is<br />

always visible in the picture.<br />

• Visible/Invisible switching using the Status process variable<br />

• Selectable foreground and background colors as well as a separate color for<br />

highlighted text.<br />

• Display of incorrect/missing variables (field filled in with hyphens '−')<br />

• Display of invalid values in the index variable (Field filled in with asterisks '*')<br />

• Fully selectable fonts<br />

The following can be individually set for each output field of this type:<br />

• Foreground color (text color)<br />

• Background color<br />

• Foreground color (text color) for highlighted text<br />

• Background color for highlighted text<br />

All colors can either be set in the editor or during runtime using a process variable.<br />

Properties<br />

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

Output field properties are set under the various tabs of the Properties dialog box. Field properties can be<br />

displayed by double−clicking on the output field in the editor and are automatically shown after a new field is<br />

100 3.2.3.6 ListBox Output Field − Reference


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

inserted.<br />

Available settings are described respectively on their own pages. The following list provides an outline of the<br />

possible settings (tabs), as well as references to detailed information.<br />

Parameter<br />

Colors<br />

Description<br />

Basic parameters of the output field, such as position, size, connected variable, and status are<br />

defined under this tab. Settings under this tab have to be configured for all output fields created.<br />

Settings under this tab can be used to specify user−defined color settings and to connect process<br />

variables for controlling colors. This is very useful for color displays, but can also be used for<br />

black/white displays.<br />

Descriptive text about this output field can be entered under this tab. This text is saved in the <strong>Visual</strong><br />

<strong>Components</strong> project but is not transferred to or processed on the target system.<br />

This text is optional but useful for project documentation.<br />

3.2.3.6.1 ListBox Output Field − Properties: Parameter<br />

Provides general settings for ListBox output.<br />

3.2.3.6.1.1 Image<br />

Appearance<br />

Contains various settings for formatting the field on the screen.<br />

X<br />

Specifies the position of the upper left corner along the X axis (interval from the left display<br />

margin). Values for these parameters begin with 0 on the left margin and increase to the<br />

width of the display minus one pixel (on the right margin).<br />

Possible Settings for Full<br />

Graphic Displays<br />

Possible Settings for Text and<br />

Semi−Graphic Displays<br />

This field can be placed freely on the screen. Therefore,<br />

X can be set from 0 to the width of the display minus the<br />

width of the field in pixels.<br />

On text and semi−graphic displays, such as those which<br />

can be connected to the C130 CAN controller, fields can<br />

only be placed evenly on every sixth X−coordinate (X =<br />

0, 6, 12, 18, etc.).<br />

Y Specifies the position of the upper left corner along the Y axis (interval from the upper display<br />

margin). Values for these parameters begin with 0 on the upper margin and increase to the<br />

height of the display minus one pixel (on the lower margin).<br />

3.2.3.6 ListBox Output Field − Reference 101


Max. Text Length<br />

Rows<br />

Font<br />

Possible Settings for Full<br />

Graphic Displays<br />

Possible Settings for Text<br />

and Semi−Graphic<br />

Displays<br />

The field can be placed freely in the display. Therefore, Y can<br />

be set from 0 to the height of the display minus the height of the<br />

field in pixels.<br />

On text and semi−graphic displays, such as those which can be<br />

connected to the C130 CAN controller, fields can only be placed<br />

evenly on every eighth Y−coordinate (Y = 0, 8, 16, 24, etc.).<br />

Specifies the maximum number of characters which can be displayed in a ListBox line. Texts<br />

longer than the allowed length will be truncated; blank spaces are used to "fill in" shorter<br />

texts.<br />

Possible Settings The field must be able to fit in the picture with its set size and<br />

font.<br />

Specifies the number of rows that will be displayed in the ListBox which also becomes the<br />

height of the output field.<br />

Possible Settings The field must be able to fit in the picture with its set size and<br />

font.<br />

Chooses the output field font.<br />

Possible Settings Any font in the project can be selected.<br />

Source of Texts<br />

Determines the source of the displayed texts. Only one of the two following options can be selected and used.<br />

Text Group<br />

String<br />

Array<br />

Assign...<br />

With this setting, a text group is used as the source for the text to be displayed. The text cannot be<br />

altered during runtime, but language switching can naturally be used.<br />

Possible Settings Text group with default text numbering (text groups with text numbering which<br />

has been changed by the user cannot be used).<br />

With this setting, an array of STRINGs is used as the source for the text. In this way, texts can be<br />

changed and expanded during runtime. However, language−switching must also be prepared in the<br />

application if it is to be used.<br />

Possible Settings Name of a process variable of data type STRING[][].<br />

Example:<br />

In ANSI C, the variable must be declared as follows to define and connect 4<br />

texts with a maximum length of 80 characters to the ListBox.<br />

_GLOBAL plcstring texts[4][80];<br />

Access is then possible with normal array indexing, with texts[0] designating<br />

the first string and texts[1][4] designating the fifth character in the second<br />

string.<br />

Possible Values The strings can contain any desired text, but only characters existing in the<br />

selected font will be displayed on the screen.<br />

The Assign... button opens a dialog box to select a variable for the String array input field. By<br />

default, only variables of suitable types are displayed.<br />

It should be noted that the entire array is connected, not just parts of it.<br />

Variables<br />

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

Allows the connection of the variable which should select the text highlighted in the output field. In this way,<br />

texts in the ListBox are automatically advanced and the marked text is visible. The ListBox is an output field,<br />

which means that the operator cannot change the variable using the ListBox itself. However, this can be solved<br />

with additional input elements in the application.<br />

102 3.2.3.6 ListBox Output Field − Reference


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

Source<br />

Assign...<br />

Status<br />

Used to input or display the connected variable.<br />

Possible Settings Name of a UINT process variable.<br />

Possible Values Depending on the number of texts in the connected text group (or<br />

number of STRINGs in the connected process variable), values<br />

can range from 0 to one less than the "Number of Texts". If the<br />

variable has a different value, this will be treated as an overflow<br />

situation, and a series of asterisks will be displayed.<br />

The Assign... button opens a dialog box to select a variable for the Source field. By<br />

default, only variables of suitable types are displayed.<br />

Contains various settings for formatting the field on the screen.<br />

Source<br />

Assign...<br />

Preview<br />

Displays the field with the current settings.<br />

For the general operation of dialog boxes.<br />

OK<br />

Cancel<br />

Used to input or display the connected variable.<br />

Possible Settings Name of a UINT process variable<br />

Possible Values Bit 0 If 1, the output field is invisible.<br />

All other bits are reserved.<br />

The Assign... button opens a dialog box to select a variable for the Source field. By<br />

default, only variables of suitable types are displayed.<br />

Buttons<br />

Applies settings and closes the dialog box. If settings cannot be applied because of an error, it is<br />

indicated and the dialog box is not closed.<br />

Note:<br />

All changes are applied, including those made under different (hidden) tabs.<br />

Closes the dialog box and discards any changes made.<br />

Warning:<br />

All changes will be discarded, including those made under different (hidden) tabs.<br />

Help Displays help for this tab.<br />

3.2.3.6.2 ListBox Output Field − Properties: Colors<br />

Allows colors to be set for the field's display.<br />

3.2.3.6.2.1 Image<br />

3.2.3.6 ListBox Output Field − Reference 103


Colors<br />

Allows colors to be set for unhighlighted elements in the editor. Settings can also be adjusted during runtime<br />

using a process variable.<br />

Use Global<br />

Foreground<br />

Background<br />

If this option is selected the settings in the project options are adopted for this output field.<br />

Therefore, settings for foreground and background cannot be made.<br />

Allows the selection of color for the output field text. This setting can only be activated if the Use<br />

Global option is not selected.<br />

Possible Settings for<br />

Full Graphic Displays<br />

Possible Settings for<br />

Text and Semi−Graphic<br />

Displays<br />

Any desired color from a palette of 256 colors can be chosen. Standard<br />

palette colors are illustrated in the reference manual.<br />

Customer−specific operator panels can have their own color palettes.<br />

Correct colors are always indicated in the selection list.<br />

Text and semi−graphic displays, such as those which can be connected<br />

to the C130 CAN controller, support only black and white colors. This is<br />

also true for the PP21 and PP41 Power Panels and their<br />

customer−specific varieties.<br />

Allows the selection of the output field's background color. This setting can only be activated if the<br />

Use Global option is not selected.<br />

Possible Settings for<br />

Full Graphic Displays<br />

Possible Settings for<br />

Text and Semi−Graphic<br />

Displays<br />

Source Used to input or display the connected variable.<br />

Any desired color from a palette of 256 colors can be chosen. Standard<br />

palette colors are illustrated in the reference manual.<br />

Customer−specific operator panels can have their own color palettes.<br />

Correct colors are always indicated in the selection list.<br />

Text and semi−graphic displays, such as those which can be connected<br />

to the C130 CAN controller, support only black and white colors. This is<br />

also true for the PP21 and PP41 Power Panels and their<br />

customer−specific varieties.<br />

Possible Settings Name of a UINT process variable<br />

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

Possible Values Bits 0−7 The low byte contains the output field background<br />

color.<br />

Bits 8−15 The high byte contains the output field text color.<br />

104 3.2.3.6 ListBox Output Field − Reference


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

Assign...<br />

For both of these settings, the same colors which can be used for foreground<br />

and background in the editor are possible (see above).<br />

The Assign... button opens a dialog box to select a variable for the Source field. By default, only<br />

variables of suitable types are displayed.<br />

Selected Item<br />

Allows colors to be set for highlighted elements (active lines) in the editor. Settings can also be adjusted during<br />

runtime using a process variable.<br />

Foreground<br />

Background<br />

Source<br />

Assign...<br />

Allows the selection of the color for the output field active line text.<br />

Possible Settings for<br />

Full Graphic Displays<br />

Possible Settings for<br />

Text and Semi−Graphic<br />

Displays<br />

Any desired color from a palette of 256 colors can be chosen. Standard<br />

palette colors are illustrated in the reference manual.<br />

Customer−specific operator panels can have their own color palettes.<br />

Correct colors are always indicated in the selection list.<br />

Text and semi−graphic displays, such as those which can be connected<br />

to the C130 CAN controller, support only black and white colors. This is<br />

also true for the PP21 and PP41 Power Panels and their<br />

customer−specific varieties.<br />

Allows the selection of the color for the output field active line background.<br />

Possible Settings for<br />

Full Graphic Displays<br />

Possible Settings for<br />

Text and Semi−Graphic<br />

Displays<br />

Used to input or display the connected variable.<br />

Any desired color from a palette of 256 colors can be chosen. Standard<br />

palette colors are illustrated in the reference manual.<br />

Customer−specific operator panels can have their own color palettes.<br />

Correct colors are always indicated in the selection list.<br />

Text and semi−graphic displays, such as those which can be connected<br />

to the C130 CAN controller, support only black and white colors. This is<br />

also true for the PP21 and PP41 Power Panels and their<br />

customer−specific varieties.<br />

Possible Settings Name of a UINT process variable<br />

Possible Values Bits 0−7 The low byte contains the output field background<br />

color.<br />

Bits 8−15 The high byte contains the output field text color.<br />

For both of these settings, the same colors which can be used for foreground<br />

and background in the editor are possible (see above).<br />

The Assign... button opens a dialog box to select a variable for the Source field. By default, only<br />

variables of suitable types are displayed.<br />

For the general operation of dialog boxes.<br />

OK<br />

Cancel<br />

Buttons<br />

Applies settings and closes the dialog box. If settings cannot be applied because of an error, it is<br />

indicated and the dialog box is not closed.<br />

Note:<br />

All changes are applied, including those made under different (hidden) tabs.<br />

Closes the dialog box and discards any changes made.<br />

Warning:<br />

All changes will be discarded, including those made under different (hidden) tabs.<br />

Help Displays help for this tab.<br />

3.2.3.7 Bitmap Graphic Output Field − Reference<br />

This field allows a bitmap graphic to be output depending on a numeric value read from a process variable<br />

during runtime. In this way, various predefined bitmaps can be output depending on the value of a process<br />

3.2.3.7 Bitmap Graphic Output Field − Reference 105


variable.<br />

General<br />

Summary of the basic properties of these types of output fields.<br />

Function Displays a bitmap based on a numeric index from a process variable<br />

Data Types<br />

Availability<br />

Special<br />

Features<br />

Appearance<br />

Individual<br />

Colors<br />

The following data types can be displayed for this field:<br />

UINT<br />

Full graphics−capable panels with bitmap support<br />

• IPC2001 and IPC5000 families with 1/4 VGA, VGA, or larger display<br />

• Power Panel PP41 (only monochrome bitmaps)<br />

Special functions:<br />

• Nearly any number of bitmaps can be set up in the <strong>Visual</strong> <strong>Components</strong> editor during the<br />

creation phase and represented during runtime (limited by the memory capacity of the<br />

target system).<br />

The value is selected as a bitmap from a list (corresponding to the connected process variable)<br />

which is defined during the creation phase. It is then output in the picture.<br />

Special functions:<br />

None<br />

• Visible/Invisible switching using the Status process variable<br />

• Display of color and monochrome bitmaps<br />

Properties<br />

Output field properties are set under the various tabs of the Properties dialog box. Field properties can be<br />

displayed by double−clicking on the output field in the editor and are automatically shown after a new field is<br />

inserted.<br />

Available settings are described respectively on their own pages. The following list provides an outline of the<br />

possible settings (tabs), as well as references to detailed information.<br />

Parameter<br />

Description<br />

Basic parameters of the output field, such as position, size, connected variable, and status are<br />

defined under this tab. Settings under this tab have to be configured for all output fields created.<br />

Descriptive text about this output field can be entered under this tab. This text is saved in the <strong>Visual</strong><br />

<strong>Components</strong> project but is not transferred to or processed on the target system.<br />

This text is optional but useful for project documentation.<br />

3.2.3.7.1 Bitmap Graphic Output Field − Properties: Parameter<br />

Provides the settings for the bitmap graphic output field.<br />

3.2.3.7.1.1 Image<br />

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

106 3.2.3.7 Bitmap Graphic Output Field − Reference


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

Position<br />

Specifies the position of the output field in pixels on the screen.<br />

X<br />

Y<br />

Specifies the position of the upper left corner along the X axis (interval from the left display margin). Values<br />

for these parameters begin with 0 on the left margin and increase to the width of the display minus one pixel<br />

(on the right margin).<br />

The output field must be placed so that the largest (widest) bitmap in the bitmap list can be completely<br />

displayed on the screen. Output field width is not explicitly set.<br />

Possible Settings This field can be placed freely on the screen. Therefore, X can be set from 0 to the<br />

width of the display minus the width of the field in pixels.<br />

Specifies the position of the upper left corner along the Y axis (interval from the upper display margin).<br />

Values for these parameters begin with 0 on the upper margin and increase to the height of the display minus<br />

one pixel (on the lower margin).<br />

The output field must be places so that the largest (highest) bitmap in the bitmap list can be completely<br />

displayed on the screen. Output field height is not explicitly set.<br />

Possible Settings The field can be placed freely in the display. Therefore, Y can be set from 0 to the height<br />

of the display minus the height of the field in pixels.<br />

Data Point<br />

Allows the connection of the variable which should select the bitmap displayed in the output field.<br />

Source Used to input or display the connected variable.<br />

Possible Settings Name of a UINT process variable.<br />

3.2.3.7 Bitmap Graphic Output Field − Reference 107


Assign...<br />

Possible Values Values from 0 to one less than the "Number of Bitmaps" are valid. If the variable<br />

has a different value, then the index is internally limited to this range. The value of<br />

the connected variable is not changed.<br />

The Assign... button opens a dialog box to select a variable for the Source field. By default, only<br />

variables of suitable types are displayed.<br />

Status<br />

Contains various settings for formatting the field on the screen.<br />

Source<br />

Assign...<br />

Used to input or display the connected variable.<br />

Possible Settings Name of a UINT process variable<br />

Possible Values Bit 0 If 1, the output field is invisible.<br />

All other bits are reserved.<br />

The Assign... button opens a dialog box to select a variable for the Source field. By<br />

default, only variables of suitable types are displayed.<br />

Bitmaps<br />

Provides a table to select bitmaps for this output field. Bitmaps can be added, removed, or sorted in this list.<br />

Number<br />

Bitmap<br />

This column shows the number of the bitmap shown on the right. The connected process variable<br />

under Data Point must be assigned this value to display this particular bitmap.<br />

Possible Settings This column is only used to show that numbering bitmaps can only be altered<br />

by sorting. Numbering always begins with 0 and increases by 1 for each<br />

additional bitmap.<br />

Shows the currently selected bitmap for the corresponding number in the index on the left. Clicking<br />

on a bitmap name opens a selection list where another bitmap can be selected.<br />

Possible Settings Any bitmap in the project can be selected.<br />

Add Adds a new bitmap to the end of the list.<br />

Insert<br />

Remove<br />

Upward<br />

Downward<br />

In doing so, however, equal sized bitmaps should be used to obtain an<br />

optimal display of the output field. The background is not deleted when<br />

switching bitmaps for performance reasons and to avoid flickering on the<br />

screen. Therefore, the rest of an old bitmap can remain on the display<br />

when different sized bitmaps are used.<br />

Bitmaps are displayed in their actual size which means the widest or<br />

tallest bitmap in the list determines the size of the output field. Scaling<br />

bitmaps to the same size does not take place and must be carried out in<br />

a graphics program if necessary.<br />

Inserts a new bitmap into the currently highlighted field of the bitmap list. The remaining bitmaps will<br />

be moved one space down in the list (the bitmap numbers will be increased/decreased by one).<br />

Removes the currently selected bitmap from the list. The remaining bitmaps underneath will be<br />

advanced upwards and will receive a lower index number (by 1 per removed bitmap).<br />

Exchanges the position of the currently selected bitmap in the list with the one directly over it (the<br />

bitmap will be moved up one position).<br />

Exchanges the position of the currently selected bitmap in the list with the one directly below it (the<br />

bitmap will be moved down one position).<br />

Preview<br />

Shows the currently selected bitmap in the list so it can be checked.<br />

For the general operation of dialog boxes.<br />

OK<br />

Buttons<br />

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

108 3.2.3.7 Bitmap Graphic Output Field − Reference


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

Cancel<br />

Applies settings and closes the dialog box. If settings cannot be applied because of an error, it is<br />

indicated and the dialog box is not closed.<br />

Note:<br />

All changes are applied, including those made under different (hidden) tabs.<br />

Closes the dialog box and discards any changes made.<br />

Warning:<br />

All changes will be discarded, including those made under different (hidden) tabs.<br />

Help Displays help for this tab.<br />

3.2.4 Touch−Operated Fields − Reference<br />

Touch−operated fields either partially or completely replace operator panel key functions on systems with<br />

graphic touch screens. These include all touch screens with QVGA, VGA, or larger displays which are<br />

connected to the IPC2001 and IPC5000 families.<br />

Touch−operated fields are operated exclusively through the touch of correspondingly configured surfaces on the<br />

touch screen. Simultaneous operation using panel keys can be achieved by having a function key configured at<br />

the same time for the same action.<br />

There are several touch−operated fields available; these will be described in their own sections.<br />

Touch−Operated Field Description<br />

Button Touch Field<br />

HotSpot Touch Field<br />

3.2.4.1 Button Touch−Operated Field − Reference<br />

This touch−operated field allows surfaces to be configured in button form in the<br />

visualization picture. After it is set, the button functions like a conventional panel<br />

key. The available actions are applied to the area of operation on touch screen<br />

systems.<br />

Pressed and released states can be displayed for this button to show when it is<br />

being activated.<br />

The HotSpot touch−operated field allows invisible surfaces to be configured in a<br />

visualization picture. After it is set, the button functions like a conventional panel<br />

key. The available actions are applied to the area of operation on touch screen<br />

systems.<br />

The HotSpot does not possess its own image either in its pressed or released<br />

states. Therefore, other elements such as bitmaps, rectangles, or circles can<br />

brighten and enhance its touch function.<br />

This touch−operated field allows surfaces to be configured in button form in the visualization picture. After it is<br />

set, the button functions like a conventional panel key. The available actions are applied to the area of operation<br />

on touch screen systems.<br />

Pressed and released states can be displayed for this button to show when it is being activated.<br />

This touch−operated field is exclusively operated using the touch screen.<br />

General<br />

Summary of the basic properties of these types of touch fields.<br />

Function Operates the visualization application using touch buttons displayed on the touch screen.<br />

3.2.4 Touch−Operated Fields − Reference 109


Actions<br />

Availability<br />

Special<br />

Features<br />

Appearance<br />

Individual<br />

Colors<br />

The following actions can be triggered by activating a touch button:<br />

Change Picture Changes to another picture in the project.<br />

Next Picture Changes to the next picture.<br />

Previous Picture Changes to the previous picture.<br />

Set USINT Sets a USINT process variable to a defined value.<br />

Set UINT Sets a UINT process variable to a defined value.<br />

Toggle USINT Switches a USINT process variable between two values.<br />

Toggle UINT Switches a UINT process variable between two values.<br />

Momentary USINT Sets a USINT process variable when activated.<br />

Increment/Decrement Increases or decreases a process variable incrementally.<br />

Operator panels with a graphic touch screen (touch screens on QVGA, VGA and larger displays<br />

with the IPC2001 and IPC5000 families)<br />

Special functions:<br />

• Keys can be evaluated in the control task using the key matrix. Jog key operation is<br />

possible by setting the priority of the key driver (touch driver).<br />

• Separate configurable appearance of pressed and released states.<br />

• Replaces function keys on operator panels with touch screens.<br />

• Input locking (using the touch−operated field) using the connected Status process<br />

variable for simple user management.<br />

• Notification during or after entry takes place using the Status and Completion Data Point<br />

process variables. This allows reactions to the input and synchronized data acquisition<br />

from external stations (depending on the configured action).<br />

This field is shown as a button on the visualization unit.<br />

Special functions:<br />

• Visible/Invisible switching using the Status process variable<br />

• Selectable foreground, background, and border colors<br />

• Optional 3D representation<br />

• Optional bitmap display on the button<br />

• Appearance for pressed and released states configured separately<br />

• Fully selectable fonts<br />

The following can be individually set for each touch field of this type:<br />

• Foreground color (text color) − separate for pressed and released states<br />

• Background color − separate for pressed and released states<br />

• Border color − upper and left−hand, as well as lower and right−hand sides configured<br />

separately (3D effect)<br />

All colors can either be set in the editor or during runtime using a process variable.<br />

Operation Touching buttons placed on the touch screen.<br />

Properties<br />

Touch−operated field properties are set under the various tabs of the Properties dialog box. Field properties<br />

can be displayed by double−clicking on the touch field in the editor and are automatically shown after a new<br />

field is inserted.<br />

Available settings are described respectively on their own pages. The following list provides an outline of the<br />

possible settings (tabs), as well as references to detailed information.<br />

Parameter<br />

Appearance<br />

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

Basic parameters of touch fields such as position, size, connected variable, and status are<br />

defined under this tab. Settings under this tab have to be adjusted for all touch fields<br />

created.<br />

Defines the button caption, border width, bitmaps to be displayed, and other display<br />

options. These must be configured for all touch−operated fields of this type.<br />

Colors Settings under this tab can be used to specify user−defined color settings and to connect<br />

110 3.2.4 Touch−Operated Fields − Reference


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

Action<br />

Description<br />

process variables for controlling colors. These possibilities are very useful for color<br />

displays, but can also be used for grayscale displays.<br />

Defines the action to be carried out with this button. This setting must be set for each<br />

touch−operated field of this type.<br />

Settings for the selected action are also defined under this tab.<br />

Descriptive text about this output field can be entered under this tab. This text is saved in<br />

the <strong>Visual</strong> <strong>Components</strong> project but is not transferred to or processed on the target system.<br />

This text is optional but useful for project documentation.<br />

3.2.4.1.1 Button Touch−Operated Field − Properties: Parameter<br />

Provides general settings for the touch button.<br />

3.2.4.1.1.1 Image<br />

Dimension<br />

Determines the touch field position and size on the screen. Different touch fields may not overlap in any place.<br />

Left<br />

Top<br />

Specifies the position of the upper−left corner along the X axis (interval from the left display margin).<br />

Values for these parameters begin with 0 on the left margin and increase to the width of the display<br />

minus one pixel (on the right margin).<br />

Possible Settings The field can be placed freely in the display, so that Left can be set from 0 to the<br />

width of the display minus the width of the field in pixels.<br />

Specifies the position of the upper−left corner along the Y axis (interval from the upper display margin).<br />

Values for these parameters begin with 0 on the upper margin and increase to the height of the display<br />

minus one pixel (on the lower margin).<br />

Possible Settings The field can be placed freely in the display, so that Top can be set from 0 to<br />

the height of the display minus the height of the field in pixels.<br />

Width Determines the touch field width in pixels.<br />

Possible Settings From 1 to the display width.<br />

3.2.4.1 Button Touch−Operated Field − Reference 111


Height<br />

The set size and position of the field must allow it to fit in the picture.<br />

Determines the touch field height in pixels.<br />

Possible Settings From 1 to the display height.<br />

The set size and position of the field must allow it to fit in the picture.<br />

Offset<br />

Determines the location of the touch−operated field in the key matrix. This setting is only required if the touch<br />

field should be queried using the key matrix. No setting is required here for the actions which can be configured<br />

for the touch field directly in the <strong>Visual</strong> <strong>Components</strong> editor.<br />

Key Matrix<br />

Offset<br />

Effective<br />

Index<br />

This option defines whether a user defined offset should be defined in the key matrix for this<br />

element.<br />

If this option is selected, the button offset must be defined in the input field. If applicable, the offset<br />

counts starting with the existing keys of the operator panel which is used.<br />

Example:<br />

Panel with 24 keys<br />

Offset set to 17<br />

The touch field is located at Index [41] of the key matrix.<br />

Possible Settings 0 to 255 minus the number of existing keys on the panel.<br />

(The resulting index may result in 255 at the most)<br />

Displays the resulting index in the key matrix for informational purposes. This information is only<br />

shown if Key Matrix Offset is selected.<br />

Status<br />

Contains various settings for formatting the field on the screen.<br />

Source<br />

Assign...<br />

For the general operation of dialog boxes.<br />

OK<br />

Cancel<br />

Used to input or display the connected variable.<br />

Possible Settings Name of a UINT process variable<br />

Possible Values Bit 0 If 1, the touch button is invisible.<br />

Bit 1 If 1, no operation of the touch field is permitted. (locked)<br />

All other bits are reserved.<br />

The Assign... button opens a dialog box to select a variable for the Source field. By<br />

default, only variables of suitable types are displayed.<br />

Buttons<br />

Applies settings and closes the dialog box. If settings cannot be applied because of an error, it is<br />

indicated and the dialog box is not closed.<br />

Note:<br />

All changes are applied, including those made under different (hidden) tabs.<br />

Closes the dialog box and discards any changes made.<br />

Warning:<br />

All changes will be discarded, including those made under different (hidden) tabs.<br />

Help Displays help for this tab.<br />

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

112 3.2.4.1 Button Touch−Operated Field − Reference


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

3.2.4.1.2 Button Touch−Operated Field − Properties: Appearance<br />

Defines the appearance of the touch button on the screen.<br />

3.2.4.1.2.1 Image<br />

Appearance<br />

Defines basic settings for both states of the touch button − pressed and released.<br />

Font<br />

Border Width<br />

Chooses the font which should be used for the touch button. If the button is only identified with a<br />

bitmap, then this setting has no effect.<br />

Possible Settings Any font in the project can be selected.<br />

Sets the width of the touch button border in pixels.<br />

Possible Settings From 0 to the available surface of the button<br />

(The text and the bitmap on the button must be able to fit within the border)<br />

Released Button<br />

Defines specific settings for button appearance in its released state.<br />

Text Group<br />

Text<br />

Selects the text group which contains the text for the button. Texts cannot be input<br />

directly. Instead, they must be included and accessed from a text group.<br />

Possible Settings Any text group in the project can be selected.<br />

In addition, the first empty entry in the list is available for<br />

buttons which do not use a caption.<br />

Chooses the text to be displayed from the selected text group.<br />

Possible Settings Any text contained in the text group can be selected.<br />

Bitmap Selects the bitmap to be displayed on the touch button: either alone (centered) or<br />

with text (left on the button).<br />

3.2.4.1 Button Touch−Operated Field − Reference 113


Possible Settings Any bitmaps existing in the project can be selected as long as<br />

they can fit within it.<br />

In addition, the first empty entry in the list is available for<br />

buttons which do not use bitmaps.<br />

Pressed Button<br />

Defines specific settings for the appearance of the button in its pressed state.<br />

Text Group<br />

Text<br />

Bitmap<br />

Selects the text group which contains the text for the button. Texts cannot be input<br />

directly. Instead, they must be included and accessed from a text group.<br />

Possible Settings Any text group in the project can be selected.<br />

In addition, the first empty entry in the list is available for<br />

buttons which do not use a caption.<br />

Chooses the text to be displayed from the selected text group.<br />

Possible Settings Any text contained in the text group can be selected.<br />

Selects the bitmap to be displayed on the touch button: either alone (centered) or<br />

with text (left on the button).<br />

Possible Settings Any bitmaps existing in the project can be selected as long as<br />

they can fit within it.<br />

In addition, the first empty entry in the list is available for<br />

buttons which do not use bitmaps.<br />

Preview<br />

Shows the field with the currently selected settings. Can be toggled between pressed and released states.<br />

For the general operation of dialog boxes.<br />

OK<br />

Cancel<br />

Buttons<br />

Applies settings and closes the dialog box. If settings cannot be applied because of an error, it is<br />

indicated and the dialog box is not closed.<br />

Note:<br />

All changes are applied, including those made under different (hidden) tabs.<br />

Closes the dialog box and discards any changes made.<br />

Warning:<br />

All changes will be discarded, including those made under different (hidden) tabs.<br />

Help Displays help for this tab.<br />

3.2.4.1.3 Button Touch−Operated Field − Properties: Colors<br />

Allows colors to be set for button display.<br />

3.2.4.1.3.1 Image<br />

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

114 3.2.4.1 Button Touch−Operated Field − Reference


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

Dimensions<br />

Determines the colors for the buttons borders. 3D effects can be simulated with separately defined colors for<br />

the left and upper borders as well as the right and lower borders. Settings can also be adjusted during runtime<br />

using a process variable.<br />

Raised<br />

Sunken<br />

Source<br />

Sets the color of the upper and left borders of the button in its released state. To<br />

create a distinct button, this setting should be set to a light color. In its pressed<br />

state, the right and bottom borders will be shown with this color.<br />

Possible Settings Any desired color from a palette of 256 colors can<br />

be chosen. Standard palette colors are illustrated in<br />

the reference manual. Customer−specific operator<br />

panels can have their own color palettes. Correct<br />

colors are always indicated in the selection list.<br />

Sets the color of the lower and right borders of the button in its released state. To<br />

create a distinct button, this setting should be set to a dark color. In its pressed<br />

state the left and top borders will be shown with this color.<br />

Possible Settings Any desired color from a palette of 256 colors can<br />

be chosen. Standard palette colors are illustrated in<br />

the reference manual. Customer−specific operator<br />

panels can have their own color palettes. Correct<br />

colors are always indicated in the selection list.<br />

Used to input or display the connected variable.<br />

Possible Settings Name of a UINT process variable<br />

Possible Values Bits 0−7 The low byte contains the sunken color of the<br />

button.<br />

Bits 8−15 The high byte contains the raised color of the<br />

button.<br />

For both settings, the same colors as for the settings Sunken<br />

and Raised are possible in the editor (see above).<br />

Assign... The Assign... button opens a dialog box to select a variable for the Source field.<br />

3.2.4.1 Button Touch−Operated Field − Reference 115


By default, only variables of suitable types are displayed.<br />

Released Button<br />

Allows colors to be set for the button surface and text in its released state. Settings can also be adjusted during<br />

runtime using a process variable.<br />

Foreground<br />

Background<br />

Source<br />

Assign...<br />

Allows the selection of the color of the button text. This setting can also be used for a possible<br />

monochrome bitmap placed on the button.<br />

Possible Settings Any desired color from a palette of 256 colors can be chosen. Standard palette<br />

colors are illustrated in the reference manual. Customer−specific operator<br />

panels can have their own color palettes. Correct colors are always indicated<br />

in the selection list.<br />

Allows the selection of the color for the button background.<br />

Possible Settings Any desired color from a palette of 256 colors can be chosen. Standard palette<br />

colors are illustrated in the reference manual. Customer−specific operator<br />

panels can have their own color palettes. Correct colors are always indicated<br />

in the selection list.<br />

Used to input or display the connected variable.<br />

Possible Settings Name of a UINT process variable<br />

Possible Values Bits 0−7 The low byte contains the output field background<br />

color.<br />

Bits 8−15 The high byte contains the output field text color.<br />

For both of these settings, the same colors which can be used for foreground<br />

and background in the editor are possible (see above).<br />

The Assign... button opens a dialog box to select a variable for the Source field. By default, only<br />

variables of suitable types are displayed.<br />

Pressed Button<br />

Allows colors to be set for the button surface and text in its pressed state. Settings can also be adjusted during<br />

runtime using a process variable.<br />

Foreground<br />

Background<br />

Source<br />

Allows the selection of the color of the button text. This setting can also be used for a possible<br />

monochrome bitmap placed on the button.<br />

Possible Settings Any desired color from a palette of 256 colors can be chosen. Standard palette<br />

colors are illustrated in the reference manual. Customer−specific operator<br />

panels can have their own color palettes. Correct colors are always indicated<br />

in the selection list.<br />

Allows the selection of the color for the button background.<br />

Possible Settings Any desired color from a palette of 256 colors can be chosen. Standard palette<br />

colors are illustrated in the reference manual. Customer−specific operator<br />

panels can have their own color palettes. Correct colors are always indicated<br />

in the selection list.<br />

Used to input or display the connected variable.<br />

Possible Settings Name of a UINT process variable<br />

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

Possible Values Bits 0−7 The low byte contains the output field background<br />

color.<br />

Bits 8−15 The high byte contains the output field text color.<br />

For both of these settings, the same colors which can be used for foreground<br />

and background in the editor are possible (see above).<br />

Assign... The Assign... button opens a dialog box to select a variable for the Source field. By default, only<br />

116 3.2.4.1 Button Touch−Operated Field − Reference


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

variables of suitable types are displayed.<br />

For the general operation of dialog boxes.<br />

OK<br />

Cancel<br />

Buttons<br />

Applies settings and closes the dialog box. If settings cannot be applied because of an error, it is<br />

indicated and the dialog box is not closed.<br />

Note:<br />

All changes are applied, including those made under different (hidden) tabs.<br />

Closes the dialog box and discards any changes made.<br />

Warning:<br />

All changes will be discarded, including those made under different (hidden) tabs.<br />

Help Displays help for this tab.<br />

3.2.4.1.4 Button Touch−Operated Field − Properties: Action<br />

Determines the action to occur when the touch button is pressed.<br />

3.2.4.1.4.1 Image<br />

Key Type<br />

Determines the action to occur when this touch button is activated. Depending on the selection in<br />

this list, the appropriate dialog fields are shown displaying possible settings for this action.<br />

In the following section, related actions are summarized into groups with references to the<br />

detailed descriptions of these group actions described further down the page.<br />

Change picture<br />

Next picture<br />

Previous picture<br />

Set USINT<br />

Set UINT<br />

Toggle USINT<br />

Toggle UINT<br />

Changes pictures when the touch field is activated.<br />

Detailed description See Change Picture<br />

Allows the simple, configurable control of an connected process variable<br />

with respect to its data type.<br />

Detailed description See Setting and Jogging Process Variables<br />

3.2.4.1 Button Touch−Operated Field − Reference 117


Momentary USINT<br />

Increment/Decrement<br />

Adjusts a connected process variable by increasing or decreasing the<br />

value by a preset amount. A process variable can conveniently be adjusted<br />

in both directions using two such touch fields.<br />

Detailed description See Increasing and Decreasing Process Variables<br />

Change Picture<br />

The actions in this group allow pictures to be changed by pressing the touch field. The following additional<br />

settings will appear in the dialog box:<br />

If the current picture is used at the target picture, then it switches to the previous picture during runtime.<br />

For example, if Pic3 has switched to Pic4 and a picture change to Pic4 is triggered in this same picture (Pic4),<br />

then it actually switches back to Pic3. This function is especially suitable for help pages since it always switches<br />

back to the picture where it started from.<br />

This picture history only stores one picture though. This means that a picture change from Pic3 to itself would<br />

switch back to Pic4 and not the picture which switched to Pic3 in the first place.<br />

Key Type<br />

Target<br />

Picture<br />

Defines the action to occur for the touch field. The following actions are described in this section:<br />

Change Picture Switches the picture to the one specified under Target Picture. Many<br />

independent touch fields can be configured with this action.<br />

Next Picture Changes to the next picture which can be set under Target Picture. This picture<br />

is understood as a global setting for the current picture. In other words, all touch<br />

fields and function keys of key type Next Picture will always change to the same<br />

'next picture'.<br />

Previous Picture Changes to the previous picture which can be set under Target Picture. This<br />

picture is understood as a global setting for the current picture. This means that<br />

all touch buttons and function keys of key type Previous Picture will always<br />

change to the same 'next picture'.<br />

Specifies the picture to be displayed when this touch field is activated. In the case of the Next Picture<br />

and Previous Picture settings under Key Type, the respective setting is made for this picture in the<br />

key list (see above).<br />

Possible Settings<br />

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

118 3.2.4.1 Button Touch−Operated Field − Reference


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

Any picture in the project can be chosen from the list with the exception of<br />

the current and global picture.<br />

Setting and Jogging Process Variables<br />

With the actions in this group, process variables can be set or jogged (only set while the touch field is being<br />

activated). The following additional settings are offered in the dialog box:<br />

Key Type Defines the action to occur for the touch field. The following actions are<br />

described in this section:<br />

Set USINT The USINT connected process variable is set to the value in field<br />

Value 1 when the touch field is activated.<br />

The field is set to the value in Value 1 each time the button is<br />

activated, but the process variable is not reset when the button<br />

is released.<br />

The Value 2 input field is not available for this key type.<br />

Set UINT The UINT connected process variable is set to the value in field<br />

Value 1 when the touch field is activated.<br />

Toggle<br />

USINT<br />

The field is set to the value in Value 1 each time the button is<br />

activated, but the process variable is not reset when the button<br />

is released.<br />

The Value 2 input field is not available for this key type.<br />

The USINT connected process variable is set to the value in the<br />

Value 2 field, but only if the process variable currently contains<br />

the value in the Value 1 field.<br />

The process variable is set to the value in the Value 1 field in<br />

every other case.<br />

If the value is not otherwise changed, then each activation of the<br />

touch field toggles the value.<br />

3.2.4.1 Button Touch−Operated Field − Reference 119


Data Point<br />

Value 1<br />

Value 2<br />

No action occurs during the touch button's released state.<br />

Toggle UINT The UINT connected process variable is set to the value in the<br />

Value 2 field, but only if the process variable currently contains<br />

the value in the Value 1 field.<br />

Momentary<br />

USINT<br />

The process variable is set to the value in the Value 1 field in<br />

every other case.<br />

If the value is not otherwise changed, then each activation of the<br />

touch field toggles the value.<br />

No action occurs during the touch button's released state.<br />

The USINT connected process variable is set to the value in the<br />

Value 1 field when the touch field is touched.<br />

When the touch−operated field is released, the process variable<br />

is set to the value 0 (predefined).<br />

The Value 2 input field is not available for this key type.<br />

The process variable which should be manipulated with this touch field is located<br />

in the Source field.<br />

The Assign... button opens a dialog box to select a variable with a suitable data<br />

type.<br />

Possible Settings for:<br />

Set USINT<br />

Toggle USINT<br />

Momentary USINT<br />

Set UINT<br />

Toggle UINT<br />

Name of a USINT process<br />

variable<br />

Name of a UINT process<br />

variable<br />

The value is written to the Data Point process variable using the requirements<br />

described under Key Type (see above).<br />

Possible Settings for:<br />

Set USINT<br />

Toggle USINT<br />

Momentary USINT<br />

Set UINT<br />

Toggle UINT<br />

0 − 255<br />

0 − 65535<br />

The value is written to the Data Point process variable using the requirements<br />

described under Key Type (see above).<br />

Possible Settings for:<br />

Toggle USINT 0 − 255<br />

Toggle UINT 0 − 65535<br />

Set USINT<br />

Set UINT<br />

Momentary USINT<br />

No settings possible or<br />

required.<br />

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

Completion Data Point After each operation of the touch field, a process variable of data type UINT can<br />

additionally be set to a predefined value. This makes requesting and evaluating<br />

input and operations easier to accomplish in the control application.<br />

The process variable which should be manipulated after this touch field is<br />

activated is located in the Source field.<br />

The Assign... button opens a dialog box to select a variable with a suitable data<br />

type.<br />

120 3.2.4.1 Button Touch−Operated Field − Reference


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

Completion Value<br />

Possible Settings Name of a UINT process variable.<br />

This value is written to the Completion Data Point process variable after each<br />

operation of the touch field.<br />

Possible Settings 0 − 65535<br />

Increasing and Decreasing the Process Variable<br />

A process variable can be increased or decreased by a predefined amount using the actions described in this<br />

section. Convenient up/down control of a value can be accomplished using a combination of two such touch<br />

buttons. Up/Down control is internally limited by the INT16 data type. This means a maximum value of 32,768<br />

and a minimum value of −32,767 are used for the limits.<br />

The following additional settings are offered for this key type:<br />

Key Type<br />

Data Point<br />

Completion<br />

Data Point<br />

Defines the action to occur for the touch field. The following actions are described in this<br />

section:<br />

Increment/Decrement Depending on the set increment (positive or negative), the process<br />

variable value will be increased or decreased by this amount each time<br />

the button is activated.<br />

An automatic iteration can optionally be chosen so that pressing and<br />

holding the touch field adjusts the value quickly.<br />

The process variable which should be manipulated with this touch field is located in the Source<br />

field.<br />

The Assign... button opens a dialog box to select a variable with a suitable data type.<br />

Possible Settings Name of a process variable with one of the following data types: USINT,<br />

SINT, UINT, INT, UDINT, or DINT.<br />

After each operation of the touch field, a process variable of data type UINT can additionally be<br />

set to a predefined value. This makes requesting and evaluating input and operations easier to<br />

accomplish in the control application.<br />

3.2.4.1 Button Touch−Operated Field − Reference 121


Completion<br />

Value<br />

Use Limits<br />

Limit Min.<br />

Limit Max.<br />

Increment<br />

Autorepeat<br />

The process variable which should be manipulated after this touch field is activated is located in<br />

the Source field.<br />

The Assign... button opens a dialog box to select a variable with a suitable data type.<br />

Possible Settings Name of a UINT process variable.<br />

This value is written to the Completion Data Point process variable after each operation of the<br />

touch field.<br />

Possible Settings 0 − 65535<br />

This setting defines whether the value range for the connected variable should be limited when<br />

this touch field is used for input. If this option is enabled, input cannot be adjusted if it were to<br />

violated the limits set under Limit Min. and Limit Max..<br />

However, adjustments can be made if the value is already outside the limits and is being<br />

adjusted in the direction of the valid value range. Regardless, adjustment takes places using the<br />

set increment.<br />

If this option is not selected, the process variable adjustment is limited by its data type. Thus it<br />

cannot be adjusted beyond the extreme values and jump over the minimum and maximum<br />

values (or vice versa).<br />

This setting is only activated if Use Limits is selected. The setting defines the lower limit of the<br />

allowed adjustment.<br />

This limit only has an effect when a negative Increment is used.<br />

Possible Settings Depends on the data type of the connected Data Point, but maximum<br />

from −32768 to 32767.<br />

This setting is only activated if Use Limits is selected. The setting defines the upper limit of the<br />

allowed adjustment.<br />

This limit only has an effect when a positive Increment is used.<br />

Possible Settings Depends on the data type of the connected Data Point, but maximum<br />

from −32768 to 32767.<br />

This setting defines the increment which occurs each time the touch field is activated. If the<br />

increment is positive, then the connected Data Point is increased; if the increment is negative,<br />

then the connected Data Point is decreased.<br />

Possible Settings Depends on the data type of the connected Data Point, but maximum<br />

from −32768 to 32767.<br />

If this option is selected, pressing and holding the touch field will continuously increase or<br />

reduce the value by the set increment.<br />

If this option is not selected, only one adjustment of the associated Data Point is caused<br />

regardless of the length of time the touch button is pressed.<br />

For the general operation of dialog boxes.<br />

OK<br />

Cancel<br />

Buttons<br />

Applies settings and closes the dialog box. If settings cannot be applied because of an error, it is<br />

indicated and the dialog box is not closed.<br />

Note:<br />

All changes are applied, including those made under different (hidden) tabs.<br />

Closes the dialog box and discards any changes made.<br />

Warning:<br />

All changes will be discarded, including those made under different (hidden) tabs.<br />

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

122 3.2.4.1 Button Touch−Operated Field − Reference


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

Help Displays help for this tab.<br />

3.2.4.1.5 Button Touch−Operated Field − Properties: Locking<br />

Allows the touch field to be locked depending on the current user or password entered. If the touch field is<br />

locked, then any activation of the field is ignored. Nothing changes in the appearance of the touch field.<br />

3.2.4.1.5.1 Image<br />

Activates touch field locking<br />

Locking<br />

Active<br />

Locking<br />

If selected, the touch field can be locked during runtime. A locked touch field is displayed on the<br />

touch screen but does not respond when touched.<br />

Locking concerns the affected touch field, not the connected variable or the linked action. A different<br />

field on the same page or a panel key can still change a connected process variable or trigger the<br />

action.<br />

The other options under this tab can only be enabled when this option is selected.<br />

Password for Locking<br />

Defines the variable holding the current password level. Password levels are managed as numeric values. They<br />

can be provided either via the password input field or the application.<br />

Source<br />

Assign...<br />

Used to input or display the connected variable.<br />

Possible Settings Name of a USINT process variable. The same variable can be and<br />

usually is used as a password level for several input fields and/or<br />

touch fields.<br />

Possible Values <strong>Visual</strong> <strong>Components</strong> supports up to 63 (0−63) password levels<br />

The Assign... button opens a dialog box to select a variable for the Source field. By<br />

default, only variables of suitable types are displayed.<br />

Input locked if...<br />

Determines which conditions must be met for input to be locked.<br />

3.2.4.1 Button Touch−Operated Field − Reference 123


Input locked if...<br />

Password Level<br />

Defines a logical condition under which the input is locked. Any of the following settings can be<br />

selected:<br />

Password level is 0 The field is locked when the connected Password process variable has<br />

the value 0. In every other case, the touch field is unlocked.<br />

Password value<br />

< Level<br />

Password value<br />

>= Level<br />

The field is locked when the process variable connected to the<br />

Password has a smaller value than is shown in the Password Level<br />

field. If the value of the variable is larger or equal to the contents of the<br />

Password Level field, then the touch field will be unlocked.<br />

The field is locked if the process variable connected to Password has a<br />

larger or equal value than the value shown in the Password Level field.<br />

If the contents of the variable are smaller than the value in the<br />

Password Level field, then the touch field will be unlocked.<br />

Defines the comparative value for the settings Password < Level and Password >= Level under<br />

Input Locked If....<br />

Possible Settings 0 to 63<br />

For the general operation of dialog boxes.<br />

OK<br />

Cancel<br />

Buttons<br />

Applies settings and closes the dialog box. If settings cannot be applied because of an error, it is<br />

indicated and the dialog box is not closed.<br />

Note:<br />

All changes are applied, including those made under different (hidden) tabs.<br />

Closes the dialog box and discards any changes made.<br />

Warning:<br />

All changes will be discarded, including those made under different (hidden) tabs.<br />

Help Displays help for this tab.<br />

3.2.4.2 HotSpot Touch−Operated Field − Reference<br />

The HotSpot touch−operated field allows invisible surfaces to be configured in a visualization picture. After it is<br />

set, the button functions like a conventional panel key. The available actions are applied to the area of operation<br />

on touch screen systems.<br />

The HotSpot does not possess its own image either in its pressed or released states. Therefore, other elements<br />

such as bitmaps, rectangles, or circles can brighten and enhance its touch function.<br />

This touch−operated field is exclusively operated using the touch screen.<br />

General<br />

Summary of the basic properties of these types of input fields.<br />

Function Operation of the visualization application using invisible surfaces on the touch screen.<br />

Actions<br />

The following actions can be triggered by a a HotSpot:<br />

Change Picture Changes to another picture in the project.<br />

Next Picture Changes to the next picture.<br />

Previous Picture Changes to the previous picture.<br />

Set USINT Sets a USINT process variable to a defined value.<br />

Set UINT Sets a UINT process variable to a defined value.<br />

Toggle USINT Switches a USINT process variable between two values.<br />

Toggle UINT Switches a UINT process variable between two values.<br />

Momentary USINT Sets a USINT process variable when activated.<br />

Increment/Decrement Increases or decreases a process variable incrementally.<br />

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

124 3.2.4.2 HotSpot Touch−Operated Field − Reference


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

Availability<br />

Special<br />

Features<br />

Operator panels with a graphic touch screen (touch screens on QVGA, VGA and larger displays<br />

with the IPC2001 and IPC5000 families)<br />

Special functions:<br />

• HotSpots can be analyzed using the key matrix. Jog key operation is possible by setting<br />

the priority of the key driver (touch driver).<br />

• Replaces function keys on operator panels with touch screens.<br />

• Input locking (using the touch−operated field) using the connected Status process<br />

variable for simple user management.<br />

• Notification during or after entry takes place using the Status and Completion Data Point<br />

process variables. This allows reactions to the input and synchronized data acquisition<br />

from external stations (depending on the configured action).<br />

Appearance Does not possess its own representation<br />

Individual<br />

Colors<br />

None<br />

Operation Touching the invisible configured buttons on the touch screen.<br />

Properties<br />

The properties of the touch−operated field are set under the various tabs of the properties dialog box. Field<br />

properties can be displayed by double−clicking on the touch field in the editor and are automatically shown after<br />

a new field is inserted.<br />

Available settings are described respectively on their own pages. The following list provides an outline of the<br />

possible settings (tabs), as well as references to detailed information.<br />

Parameter<br />

Action<br />

Description<br />

Basic parameters of touch fields such as position, size, connected variable, and status are defined<br />

under this tab. This page must be configured for all created touch fields.<br />

Defines the action to be carried out with this button. This setting must be set for each<br />

touch−operated field of this type.<br />

Settings for the selected action are also defined under this tab.<br />

The input of descriptive text for this touch field is possible under this tab. This text is saved in the<br />

<strong>Visual</strong> <strong>Components</strong> project but is not transferred to or processed on the target system.<br />

This text is optional but useful for project documentation.<br />

3.2.4.2.1 HotSpot Touch−Operated Field − Properties: Parameter<br />

Provides the general settings for the HotSpot touch field.<br />

3.2.4.2.1.1 Image<br />

3.2.4.2 HotSpot Touch−Operated Field − Reference 125


Dimension<br />

Determines the touch field position and size on the screen. Different touch fields may not overlap in any place.<br />

Left<br />

Top<br />

Width<br />

Height<br />

Specifies the position of the upper−left corner along the X axis (interval from the left display margin).<br />

Values for these parameters begin with 0 on the left margin and increase to the width of the display<br />

minus one pixel (on the right margin).<br />

Possible Settings The field can be placed freely in the display, so that Left can be set from 0 to the<br />

width of the display minus the width of the field in pixels.<br />

Specifies the position of the upper−left corner along the Y axis (interval from the upper display margin).<br />

Values for these parameters begin with 0 on the upper margin and increase to the height of the display<br />

minus one pixel (on the lower margin).<br />

Possible Settings The field can be placed freely in the display, so that Top can be set from 0 to<br />

the height of the display minus the height of the field in pixels.<br />

Determines the touch field width in pixels.<br />

Possible Settings From 1 to the display width.<br />

The set size and position of the field must allow it to fit in the picture.<br />

Determines the touch field height in pixels.<br />

Possible Settings From 1 to the display height.<br />

The set size and position of the field must allow it to fit in the picture.<br />

Key Matrix Offset<br />

Determines the location of the touch−operated field in the key matrix. This setting is only required if the touch<br />

field should be queried using the key matrix. No setting is required here for the actions which can be configured<br />

for the touch field directly in the <strong>Visual</strong> <strong>Components</strong> editor.<br />

Key Matrix<br />

Offset<br />

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

This option defines whether a user defined offset should be defined in the key matrix for this<br />

element.<br />

If this option is selected, the HotSpot offset must be defined in the input field. If applicable, the<br />

126 3.2.4.2 HotSpot Touch−Operated Field − Reference


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

Effective<br />

Index<br />

offset counts starting with the existing keys of the operator panel which is used.<br />

Example:<br />

Panel with 24 keys<br />

Offset set to 17<br />

The touch field is located at Index [41] of the key matrix.<br />

Possible Settings 0 to 255 minus the number of existing keys on the panel.<br />

(The resulting index may result in 255 at the most)<br />

Displays the resulting index in the key matrix for informational purposes. This information is only<br />

shown if Key Matrix Offset is selected.<br />

Status<br />

Contains various settings for formatting the field on the screen.<br />

Source<br />

Assign...<br />

For the general operation of dialog boxes.<br />

OK<br />

Cancel<br />

Used to input or display the connected variable.<br />

Possible Settings Name of a UINT process variable<br />

Possible Values Bit 1 If 1, no operation of the touch field is permitted. (locked)<br />

All other bits are reserved.<br />

The Assign... button opens a dialog box to select a variable for the Source field. By<br />

default, only variables of suitable types are displayed.<br />

Buttons<br />

Applies settings and closes the dialog box. If settings cannot be applied because of an error, it is<br />

indicated and the dialog box is not closed.<br />

Note:<br />

All changes are applied, including those made under different (hidden) tabs.<br />

Closes the dialog box and discards any changes made.<br />

Warning:<br />

All changes will be discarded, including those made under different (hidden) tabs.<br />

Help Displays help for this tab.<br />

3.2.4.2.2 HotSpot Touch−Operated Field − Properties: Action<br />

Determines the action which occurs when the HotSpot is pressed.<br />

3.2.4.2.2.1 Image<br />

3.2.4.2 HotSpot Touch−Operated Field − Reference 127


Key Type<br />

Determines the action to occur when this touch button is activated. Depending on the selection in<br />

this list, the appropriate dialog fields are shown displaying possible settings for this action.<br />

In the following section, related actions are summarized into groups with references to the<br />

detailed descriptions of these group actions described further down the page.<br />

Change picture<br />

Next picture<br />

Previous picture<br />

Set USINT<br />

Set UINT<br />

Toggle USINT<br />

Toggle UINT<br />

Momentary USINT<br />

Increment/Decrement<br />

Changes pictures when the touch field is activated.<br />

Detailed description See Change Picture<br />

Allows the simple, configurable control of an connected process variable<br />

with respect to its data type.<br />

Detailed description See Setting and Jogging Process Variables<br />

Adjusts a connected process variable by increasing or decreasing the<br />

value by a preset amount. A process variable can conveniently be adjusted<br />

in both directions using two such touch fields.<br />

Detailed description See Increasing and Decreasing Process Variables<br />

Change Picture<br />

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

The actions in this group allow pictures to be changed by pressing the touch field. The following additional<br />

settings will appear in the dialog box:<br />

128 3.2.4.2 HotSpot Touch−Operated Field − Reference


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

If the current picture is used at the target picture, then it switches to the previous picture during runtime.<br />

For example, if Pic3 has switched to Pic4 and a picture change to Pic4 is triggered in this same picture (Pic4),<br />

then it actually switches back to Pic3. This function is especially suitable for help pages since it always switches<br />

back to the picture where it started from.<br />

This picture history only stores one picture though. This means that a picture change from Pic3 to itself would<br />

switch back to Pic4 and not the picture which switched to Pic3 in the first place.<br />

Key Type<br />

Target<br />

Picture<br />

Defines the action to occur for the touch field. The following actions are described in this section:<br />

Change Picture Switches the picture to the one specified under Target Picture. Many<br />

independent touch fields can be configured with this action.<br />

Next Picture Changes to the next picture which can be set under Target Picture. This picture<br />

is understood as a global setting for the current picture. In other words, all touch<br />

fields and function keys of key type Next Picture will always change to the same<br />

'next picture'.<br />

Previous Picture Changes to the previous picture which can be set under Target Picture. This<br />

picture is understood as a global setting for the current picture. This means that<br />

all touch buttons and function keys of key type Previous Picture will always<br />

change to the same 'next picture'.<br />

Specifies the picture to be displayed when this touch field is activated. In the case of the Next Picture<br />

and Previous Picture settings under Key Type, the respective setting is made for this picture in the<br />

key list (see above).<br />

Possible Settings Any picture in the project can be chosen from the list with the exception of<br />

the current and global picture.<br />

Setting and Jogging Process Variables<br />

3.2.4.2 HotSpot Touch−Operated Field − Reference 129


With the actions in this group, process variables can be set or jogged (only set while the touch field is being<br />

activated). The following additional settings are offered in the dialog box:<br />

Key Type Defines the action to occur for the touch field. The following actions are<br />

described in this section:<br />

Set USINT The USINT connected process variable is set to the value in field<br />

Value 1 when the touch field is activated.<br />

The field is set to the value in Value 1 each time the button is<br />

activated, but the process variable is not reset when the button<br />

is released.<br />

The Value 2 input field is not available for this key type.<br />

Set UINT The UINT connected process variable is set to the value in field<br />

Value 1 when the touch field is activated.<br />

Toggle<br />

USINT<br />

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

The field is set to the value in Value 1 each time the button is<br />

activated, but the process variable is not reset when the button<br />

is released.<br />

The Value 2 input field is not available for this key type.<br />

The USINT connected process variable is set to the value in the<br />

Value 2 field, but only if the process variable currently contains<br />

the value in the Value 1 field.<br />

The process variable is set to the value in the Value 1 field in<br />

every other case.<br />

If the value is not otherwise changed, then each activation of the<br />

touch field toggles the value.<br />

No action occurs during the touch button's released state.<br />

Toggle UINT The UINT connected process variable is set to the value in the<br />

Value 2 field, but only if the process variable currently contains<br />

the value in the Value 1 field.<br />

130 3.2.4.2 HotSpot Touch−Operated Field − Reference


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

Data Point<br />

Value 1<br />

Value 2<br />

Completion Data Point<br />

Momentary<br />

USINT<br />

The process variable is set to the value in the Value 1 field in<br />

every other case.<br />

If the value is not otherwise changed, then each activation of the<br />

touch field toggles the value.<br />

No action occurs during the touch button's released state.<br />

The USINT connected process variable is set to the value in the<br />

Value 1 field when the touch field is touched.<br />

When the touch−operated field is released, the process variable<br />

is set to the value 0 (predefined).<br />

The Value 2 input field is not available for this key type.<br />

The process variable which should be manipulated with this touch field is located<br />

in the Source field.<br />

The Assign... button opens a dialog box to select a variable with a suitable data<br />

type.<br />

Possible Settings for:<br />

Set USINT<br />

Toggle USINT<br />

Momentary USINT<br />

Set UINT<br />

Toggle UINT<br />

Name of a USINT process<br />

variable<br />

Name of a UINT process<br />

variable<br />

The value is written to the Data Point process variable using the requirements<br />

described under Key Type (see above).<br />

Possible Settings for:<br />

Set USINT<br />

Toggle USINT<br />

Momentary USINT<br />

Set UINT<br />

Toggle UINT<br />

0 − 255<br />

0 − 65535<br />

The value is written to the Data Point process variable using the requirements<br />

described under Key Type (see above).<br />

Possible Settings for:<br />

Toggle USINT 0 − 255<br />

Toggle UINT 0 − 65535<br />

Set USINT<br />

Set UINT<br />

Momentary USINT<br />

No settings possible or<br />

required.<br />

After each operation of the touch field, a process variable of data type UINT can<br />

additionally be set to a predefined value. This makes requesting and evaluating<br />

input and operations easier to accomplish in the control application.<br />

The process variable which should be manipulated after this touch field is<br />

activated is located in the Source field.<br />

The Assign... button opens a dialog box to select a variable with a suitable data<br />

type.<br />

Possible Settings Name of a UINT process variable.<br />

Completion Value This value is written to the Completion Data Point process variable after each<br />

operation of the touch field.<br />

3.2.4.2 HotSpot Touch−Operated Field − Reference 131


Possible Settings 0 − 65535<br />

Increasing and Decreasing the Process Variable<br />

A process variable can be increased or decreased by a predefined amount using the actions described in this<br />

section. Convenient up/down control of a value can be accomplished using a combination of two such touch<br />

buttons. Up/Down control is internally limited by the INT16 data type. This means a maximum value of 32,768<br />

and a minimum value of −32,767 are used for the limits.<br />

The following additional settings are offered for this key type:<br />

Key Type<br />

Data Point<br />

Completion<br />

Data Point<br />

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

Defines the action to occur for the touch field. The following actions are described in this<br />

section:<br />

Increment/Decrement Depending on the set increment (positive or negative), the process<br />

variable value will be increased or decreased by this amount each time<br />

the button is activated.<br />

An automatic iteration can optionally be chosen so that pressing and<br />

holding the touch field adjusts the value quickly.<br />

The process variable which should be manipulated with this touch field is located in the Source<br />

field.<br />

The Assign... button opens a dialog box to select a variable with a suitable data type.<br />

Possible Settings Name of a process variable with one of the following data types: USINT,<br />

SINT, UINT, INT, UDINT, or DINT.<br />

After each operation of the touch field, a process variable of data type UINT can additionally be<br />

set to a predefined value. This makes requesting and evaluating input and operations easier to<br />

accomplish in the control application.<br />

The process variable which should be manipulated after this touch field is activated is located in<br />

the Source field.<br />

The Assign... button opens a dialog box to select a variable with a suitable data type.<br />

132 3.2.4.2 HotSpot Touch−Operated Field − Reference


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

Completion<br />

Value<br />

Use Limits<br />

Limit Min.<br />

Limit Max.<br />

Increment<br />

Autorepeat<br />

Possible Settings Name of a UINT process variable.<br />

This value is written to the Completion Data Point process variable after each operation of the<br />

touch field.<br />

Possible Settings 0 − 65535<br />

This setting defines whether the value range for the connected variable should be limited when<br />

this touch field is used for input. If this option is enabled, input cannot be adjusted if it were to<br />

violated the limits set under Limit Min. and Limit Max..<br />

However, adjustments can be made if the value is already outside the limits and is being<br />

adjusted in the direction of the valid value range. Regardless, adjustment takes places using the<br />

set increment.<br />

If this option is not selected, the process variable adjustment is limited by its data type. Thus it<br />

cannot be adjusted beyond the extreme values and jump over the minimum and maximum<br />

values (or vice versa).<br />

This setting is only activated if Use Limits is selected. The setting defines the lower limit of the<br />

allowed adjustment.<br />

This limit only has an effect when a negative Increment is used.<br />

Possible Settings Depends on the data type of the connected Data Point, but maximum<br />

from −32768 to 32767.<br />

This setting is only activated if Use Limits is selected. The setting defines the upper limit of the<br />

allowed adjustment.<br />

This limit only has an effect when a positive Increment is used.<br />

Possible Settings Depends on the data type of the connected Data Point, but maximum<br />

from −32768 to 32767.<br />

This setting defines the increment which occurs each time the touch field is activated. If the<br />

increment is positive, then the connected Data Point is increased; if the increment is negative,<br />

then the connected Data Point is decreased.<br />

Possible Settings Depends on the data type of the connected Data Point, but maximum<br />

from −32768 to 32767.<br />

If this option is selected, pressing and holding the touch field will continuously increase or<br />

reduce the value by the set increment.<br />

If this option is not selected, only one adjustment of the associated Data Point is caused<br />

regardless of the length of time the touch button is pressed.<br />

For the general operation of dialog boxes.<br />

OK<br />

Cancel<br />

Buttons<br />

Applies settings and closes the dialog box. If settings cannot be applied because of an error, it is<br />

indicated and the dialog box is not closed.<br />

Note:<br />

All changes are applied, including those made under different (hidden) tabs.<br />

Closes the dialog box and discards any changes made.<br />

Warning:<br />

All changes will be discarded, including those made under different (hidden) tabs.<br />

Help Displays help for this tab.<br />

3.2.4.2 HotSpot Touch−Operated Field − Reference 133


3.3 Programming Interface for Controller Tasks − VISAPI<br />

The programming interface provides the opportunity to build a bridge between the controller application and the<br />

<strong>Visual</strong> <strong>Components</strong> application. It enables control of the visualization application while it is operating as well as<br />

output of user−defined graphics from the control application.<br />

This section provides a brief VISAPI overview which discusses the most important functions used.<br />

For a more detailed description of each function, click on the respective link.<br />

The VISAPI − General tutorial should be read before reading descriptions of the individual functions.<br />

3.3.1 Requirements and Initializing<br />

VA_Setup<br />

VA_SetupX<br />

VA_Saccess, VA_Srelease<br />

Call Description<br />

Initializing the<br />

VISAPI<br />

Advanced<br />

Initialization<br />

General<br />

Functions<br />

The VISAPI is initialized with these functions. It is very important that these functions are used correctly.<br />

Therefore, we recommend reading VISAPI − General Instructions.<br />

3.3.2 Graphics and Text<br />

Call Description<br />

VA_Rect Rectangles<br />

VA_Line Lines<br />

VA_Ellipse Ellipses and Circles<br />

VA_Textout, VA_GetTextByTextGroup Texts<br />

VA_Redraw, VA_GetDisplayInfo General<br />

These routines can be used to output general text and graphics. Functions for drawing lines, rectangles, and<br />

ellipses are available.<br />

3.3.3 Setting Contrast and Brightness<br />

Call Description<br />

VA_SetContrast Contrast<br />

VA_SetBrightness Brightness<br />

These functions can be used to change contrast and brightness on the target.<br />

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

134 3.3 Programming Interface for Controller Tasks − VISAPI


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

3.3.4 Reading the Key Matrix<br />

Call Description<br />

VA_GetKeyMatrix Reading the Key Matrix<br />

The VA_GetKeyMatix function allows the current key status to be read.<br />

See also Key Matrix.<br />

3.3.5 Touch Screen<br />

Call Description<br />

VA_StartTouchCal,VA_GetCalStatus, Example Calibrating the Touch Screen<br />

VA_GetTouchAction User−Defined Touch Operation<br />

Everything applying to touch. Reads status and calibration.<br />

3.3.6 Manual Project Control<br />

Call Description<br />

VA_StartProject Starting Projects<br />

VA_StopProject Stopping Projects<br />

VA_SetUserParam User−Defined Project Settings<br />

In some cases, it is necessary to stop a running project or change the start parameter for individual drivers.<br />

These things can all be managed using these functions.<br />

3.3.7 Reading Alarm Lists<br />

Call Description<br />

VA_GetAlarmList Reading Historical Alarm Lists<br />

VA_GetExAlarmList Reading the Extended Historical Alarm List<br />

VA_GetActAlarmList Reading the Current Extended Alarm List<br />

VA_DelAlarmHistory Deleting the Alarm History<br />

These functions are used to access current alarm lists.<br />

3.3.8 Palettes<br />

Call Description<br />

VA_SetPaletteColor Setting Palette Color<br />

3.3.4 Reading the Key Matrix 135


VA_GetPaletteColor Retrieving Palette Color<br />

IPC Colors IPC Color Display Palette<br />

SG3 Colors SG3 Black and White Palette<br />

An overview of available colors can be found here.<br />

3.3.8.1 Copying a Rectangular Screen Area − VA_CopyScreenRect<br />

The VA_CopyScreenRect function copies a rectangular screen area (x1, y1, x2, y2) by dx pixels horizontally and<br />

dy pixels vertically.<br />

Note:<br />

This function is only available on VGA displays.<br />

3.3.8.1.1 Parameter<br />

I/O Parameter Type Meaning<br />

IN enable BOOL This function is only executed if enable is TRUE.<br />

IN VCHandle UDINT The handle returned by VA_Setup.<br />

IN x1/y1 UINT Coordinates of the upper left corner of the rectangle<br />

IN x2/y2 UINT The width and height of the rectangle to be copied<br />

IN dx/dy INT Number of pixels in the X and Y directions in which the rectangle should be copied.<br />

OUT Return Value UINT Not equal to 0 if error occurs<br />

3.3.8.1.2 Example for Automation Basic<br />

(* cyclic program *)<br />

x1 = 100<br />

y1 = 150<br />

x2 = 250<br />

y2 = 150<br />

dx = 10<br />

dy = 10<br />

if ready 1 then<br />

VC_HANDLE = VA_Setup(1 "vga") ,<br />

VC_HANDLE if 0 then<br />

ready = 1<br />

endif<br />

endif<br />

if ready = 1 then<br />

VA_Saccess(1,VC_HANDLE)= if<br />

0 then<br />

VA_CopyScreenRect (1,VC_HANDLE,x1,y1,<br />

width,height,dx,dy)<br />

VA_Srelease(1,VC_HANDLE)<br />

endif<br />

endif<br />

3.3.8.1.3 Example for C Programming<br />

#include <br />

#include <br />

#include <br />

UINT _GLOBAL ready;<br />

unsigned long VC_HANDLE;<br />

UINT _GLOBAL x1;<br />

UINT _GLOBAL width;<br />

UINT _GLOBAL y1;<br />

UINT _GLOBAL height;<br />

SINT _GLOBAL dx;<br />

SINT _GLOBAL dy;<br />

_CYCLIC void Cyclic (void)<br />

{<br />

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

136 3.3.8.1 Copying a Rectangular Screen Area − VA_CopyScreenRect


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

x1 = 150;<br />

y1 = 100;<br />

x2 = 100;<br />

y2 = 150;<br />

dx = 10;<br />

dy = 10;<br />

if (!ready)<br />

{<br />

VC_HANDLE = VA_Setup(1 "vga"); ,<br />

if (VC_HANDLE)<br />

ready = 1;<br />

}<br />

if (ready)<br />

{<br />

if (!VA_Saccess(1,VC_HANDLE))<br />

{<br />

VA_CopyScreenRect width,heighty2,dx,dy);<br />

(1,VC_HANDLE,x1,y1,<br />

VA_Srelease(1,VC_HANDLE);<br />

}<br />

}<br />

}<br />

3.3.8.2 Displaying a Bitmap − VA_DrawBitmap<br />

The VA_DrawBitmap function draws a bitmap at the specified coordinates on the screen. This bitmap must exist<br />

and be used in the project.<br />

Note:<br />

This function is only available on VGA displays.<br />

3.3.8.2.1 Parameter<br />

I/O Parameter Type Meaning<br />

IN enable BOOL This function is only executed if enable is TRUE.<br />

IN VCHandle UDINT The handle returned by VA_Setup.<br />

IN index UINT Bitmap index in the project (must be used in the project).<br />

IN x UINT X coordinate of the upper left corner of the bitmap.<br />

IN y UINT Y coordinate of the upper left corner of the bitmap.<br />

OUT Return Value UINT Not equal to 0 if error occurs<br />

3.3.8.2.2 Example for Automation Basic<br />

(* cyclic program *)<br />

x = 100<br />

y = 150<br />

index = 1<br />

if ready 1 then<br />

VC_HANDLE = VA_Setup(1 "vga") ,<br />

if VC_HANDLE 0 then<br />

ready = 1<br />

endif<br />

endif<br />

if ready = 1 then<br />

if VA_Saccess(1,VC_HANDLE)= 0 then<br />

VA_DrawBitmap (1,VC_HANDLE,index,x,y)<br />

VA_Srelease(1,VC_HANDLE)<br />

endif<br />

endif<br />

3.3.8.2.3 Example for C Programming<br />

#include <br />

#include <br />

#include <br />

3.3.8.2 Displaying a Bitmap − VA_DrawBitmap 137


UINT _GLOBAL ready;<br />

unsigned long VC_HANDLE;<br />

UINT _GLOBAL x;<br />

UINT _GLOBAL y;<br />

UINT _GLOBAL index;<br />

_CYCLIC void Cyclic (void)<br />

{<br />

x = 150;<br />

y = 100;<br />

index = 1;<br />

if (!ready)<br />

{<br />

VC_HANDLE = VA_Setup(1 "vga"); ,<br />

if (VC_HANDLE)<br />

ready = 1;<br />

}<br />

if (ready)<br />

{<br />

if (!VA_Saccess(1,VC_HANDLE))<br />

{<br />

VA_DrawBitmap (1,VC_HANDLE,index,x,y);<br />

VA_Srelease(1,VC_HANDLE);<br />

}<br />

}<br />

}<br />

3.3.8.3 Deleting the Alarm History − VA_DelAlarmHistory<br />

The VA_DelAlarmHistory function deletes both the data object alarm as<br />

well as all alarms in the runtime history.<br />

3.3.8.3.1 Parameter<br />

I/O Parameter Type Meaning<br />

IN enable BOOL This function is only executed if enable is TRUE.<br />

IN VCHandle UDINT The handle returned by VA_Setup.<br />

OUT Return Value UINT Not equal to 0 if error occurs<br />

3.3.8.3.2 Example for Automation Basic<br />

(* cyclic program *)<br />

if ready 1 then<br />

VC_HANDLE = VA_Setup(1 "visu") ,<br />

VC_HANDLE if 0 then<br />

ready = 1<br />

endif<br />

endif<br />

if ready = 1 then<br />

VA_Saccess(1,VC_HANDLE)= if<br />

0 then<br />

if del = 1 then<br />

status = VA_DelAlarmHistory(1,VC_HANDLE)<br />

del = 0;<br />

endif<br />

VA_Srelease(1,VC_HANDLE)<br />

endif<br />

endif<br />

3.3.8.3.3 Example for C Programming<br />

#include <br />

#include <br />

#include <br />

UINT _GLOBAL ready;<br />

UINT _GLOBAL status;<br />

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

138 3.3.8.3 Deleting the Alarm History − VA_DelAlarmHistory


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

BOOL _GLOBAL del;<br />

unsigned long VC_HANDLE;<br />

_CYCLIC void Cyclic(void)<br />

{<br />

if (!ready)<br />

{<br />

VC_HANDLE = VA_Setup(1 , "visu");<br />

if (VC_HANDLE)<br />

ready = 1;<br />

}<br />

if (ready)<br />

{<br />

if (!VA_Saccess(1,VC_HANDLE))<br />

{<br />

if (del)<br />

{<br />

status = VA_DelAlarmHistory(1,VC_HANDLE);<br />

del = 0;<br />

}<br />

VA_Srelease(1,VC_HANDLE);<br />

}<br />

}<br />

}<br />

3.3.8.4 Graphics and Text Output − VA_Ellipse<br />

Draws an ellipse or circle.<br />

Note:<br />

This function is not supported on the PP41.<br />

3.3.8.4.1 Parameter<br />

I/O Parameter Type Meaning<br />

IN enable BOOL This function is only executed if enable is TRUE.<br />

IN VCHandle UDINT The handle returned by VA_Setup.<br />

IN x/y UINT Coordinates for the center of the ellipse<br />

IN height UINT Height of the ellipse in pixels<br />

IN width UINT Width of the ellipse in pixels<br />

IN fill UINT Ellipse fill color<br />

IN color UINT Ellipse border color<br />

OUT Return Value UINT Not equal to 0 if error occurs<br />

3.3.8.4.2 Example for Automation Basic<br />

(* cyclic program *)<br />

x = 100<br />

y = 150<br />

height = 30<br />

width = 60<br />

fill = 255<br />

color = 0<br />

; Transparent<br />

; Black<br />

if ready 1 then<br />

VC_HANDLE = VA_Setup(1 "vga") ,<br />

if VC_HANDLE 0 then<br />

ready = 1<br />

endif<br />

endif<br />

if ready = 1 then<br />

VA_Saccess(1,VC_HANDLE)= if<br />

0 then<br />

VA_Ellipse (1,VC_HANDLE,x,y,heigth,width,fill,color)<br />

endif<br />

VA_Srelease(1,VC_HANDLE)<br />

3.3.8.4 Graphics and Text Output − VA_Ellipse 139


endif<br />

3.3.8.4.3 Example for C Programming<br />

#include <br />

#include <br />

#include <br />

unsigned long VC_HANDLE;<br />

UINT _GLOBAL ready;<br />

UINT _GLOBAL x;<br />

UINT _GLOBAL y;<br />

UINT _GLOBAL fill;<br />

UINT _GLOBAL color;<br />

UINT _GLOBAL width;<br />

UINT _GLOBAL height;<br />

_CYCLIC void Cyclic(void)<br />

{<br />

x = 150;<br />

y = 100;<br />

height = 30;<br />

width = 60;<br />

fill = /* 255; Transparent */<br />

color /* = 0; Black */<br />

if (!ready)<br />

{<br />

VC_HANDLE = VA_Setup(1 "vga"); ,<br />

if (VC_HANDLE)<br />

ready = 1;<br />

}<br />

if (ready)<br />

{<br />

if (!VA_Saccess(1,VC_HANDLE))<br />

{<br />

VA_Ellipse (1,VC_HANDLE,x,y,height,width,fill,color);<br />

VA_Srelease(1,VC_HANDLE);<br />

}<br />

}<br />

}<br />

3.3.8.5 VA_ExchangeFont<br />

The VA_ExchangeFont function is only used internally.<br />

3.3.8.6 Read Current Alarm List − VA_GetActAlarmList<br />

All queued alarms can be read with the the VA_GetActAlarmList function. This function returns all alarms as<br />

they are output in the alarm list. This is also dependent on the alarm configuration (acknowledgement<br />

necessary, acknowledgement possible, etc., see Creating and Configuring Alarms).<br />

The VA_Setup function must also be called once for alarm system functions, and VA_Saccess must be<br />

executed before each use of VISAPI alarm functions.<br />

Important:<br />

After receiving the status value 240 (end of list), VA_GetActAlarmList can no longer be called when the value of<br />

iFunction is 2 (read next alarm). Otherwise, values will be read which no longer concern the alarm list. If the<br />

value 240 is returned to the status variable, the value of iFunction has to be 1 the next time the function is<br />

called.<br />

3.3.8.6.1 Parameter<br />

I/O Parameter Type Meaning<br />

IN enable BOOL This function is only executed if enable is TRUE.<br />

IN VCHandle UDINT The handle returned by VA_Setup.<br />

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

140 3.3.8.4 Graphics and Text Output − VA_Ellipse


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

IN pcAlarmLine DINT Text array to be used as the alarm line<br />

IN plLen DINT<br />

IN iFunction UINT<br />

Address of a DINT variable which contains the length of the text field.<br />

After the function is called, this variable is set to the actual length.<br />

1 ..... Read first current alarm<br />

2 ..... Read next current alarm<br />

IN cSeperator USINT Separation character to be inserted into the alarm line<br />

IN cDateTimeFormat USINT<br />

Desired format for date and time output in the alarm list<br />

0 ... DD.MM.YY_HH:MM:SS<br />

1 ... DD.MM.YY_HH:MM:SSa<br />

2 ... HH_MM_SS<br />

3 ... HH_MM_SSa<br />

4 ... HH_MM<br />

5 ... HH_MMa<br />

6 ... NO_TIME_NO_DATE<br />

OUT Return Value UINT Not equal to 0 if error occurs<br />

3.3.8.6.2 Example for Automation Basic<br />

if ready = 0 then<br />

VC_HANDLE = VA_Setup(1, "Compact")<br />

VC_HANDLE if 0 then<br />

ready = 1<br />

endif<br />

else<br />

Access_Status = VA_Saccess (1,VC_HANDLE)<br />

if Access_Status = 0 then<br />

case step of<br />

action 1:<br />

Alarmlen = 80<br />

;Hyphen Seperator = 45<br />

;Read first Alarmtype alarm = 1<br />

;DD.MM.YY TimeDateForm HH.MM.SS = 0<br />

GetActAL_Status = VA_GetActAlarmList UDINT(ADR(Alarmstring)),UDINT(ADR(Alarmlen)),Alarmtype,Sepe<br />

(1,VC_HANDLE,<br />

if GetActAL_Status = 0 then<br />

step = 2<br />

endif<br />

endaction<br />

2: action<br />

Alarmlen = 80<br />

;Hyphen Seperator = 45<br />

;Read next Alarmtype alarm = 2<br />

;DD.MM.YY TimeDateForm HH.MM.SS = 0<br />

GetActAL_Status = VA_GetActAlarmList UDINT(ADR(Alarmstring)),UDINT(ADR(Alarmlen)),Alarmtype,Sepe<br />

(1,VC_HANDLE,<br />

if GetActAL_Status = 240 then<br />

step = 1<br />

endif<br />

endaction<br />

endcase<br />

VA_Srelease(1,VC_HANDLE)<br />

endif<br />

endif<br />

3.3.8.6.3 Example for C Programming<br />

#include <br />

#include <br />

#include <br />

_GLOBAL USINT ready;<br />

_GLOBAL UDINT VC_HANDLE;<br />

_LOCAL UINT Access_Status, GetActAlarmList_Status;<br />

_LOCAL char AlarmString[80];<br />

_LOCAL UINT Alarmlen;<br />

_LOCAL USINT Seperator,step;<br />

_LOCAL USINT TimeDateForm;<br />

_LOCAL USINT Alarmtype;<br />

3.3.8.6 Read Current Alarm List − VA_GetActAlarmList 141


void _CYCLIC test( void )<br />

{<br />

if (ready == 0)<br />

{<br />

VC_HANDLE = VA_Setup (1,"Compact");<br />

if (VC_HANDLE != 0)<br />

ready = 1;<br />

}<br />

else<br />

{<br />

Access_Status = VA_Saccess (1,VC_HANDLE);<br />

if (Access_Status == 0)<br />

{ switch (step)<br />

{<br />

case 1:<br />

{<br />

Alarmlen = 80;<br />

Seperator = 45; /*Hyphen*/<br />

Alarmtype /*First alarm*/ = 1;<br />

TimeDateForm /*DD.MM.YY = 1; HH.MM.SS*/<br />

GetActAlarmList_Status = VA_GetActAlarmList (1, unsigned VC_HANDLE, int)AlarmString,(unsigned (<br />

int) &Alarmlen<br />

,Alarmtype,Seperator,TimeDateForm);<br />

if (GetActAlarmList_Status == 0)<br />

step = 2;<br />

break;<br />

}<br />

case 2:<br />

{<br />

Alarmlen = 80;<br />

Seperator = /*Hyphen*/<br />

45;<br />

Alarmtype = /*First 2; alarm*/<br />

TimeDateForm /*DD.MM.YY = 1; HH.MM.SS*/<br />

GetActAlarmList_Status = VA_GetActAlarmList (1, unsigned VC_HANDLE, int)AlarmString,(unsigned (<br />

int) &Alarmlen<br />

if (GetActAlarmList_Status == 240)<br />

step = 1;<br />

break;<br />

}<br />

}/*step switch*/<br />

VA_Srelease (1,VC_HANDLE);<br />

}/*VA_Saccess == 0*/<br />

}/*Visapi initialized, ready != 0*/<br />

}/* end cyclic*/<br />

3.3.8.7 Reading Alarm Lists − VA_GetAlarmList<br />

,Alarmtype,Seperator,TimeDateForm);<br />

Two functions can be used to read the alarm history VA_GetAlarmList and VA_GetExAlarmList. Both<br />

functions return a result string which must then be evaluated.<br />

It is important to call VA_Setup once before alarm system functions are called and to execute VA_Saccess<br />

before each use of Visapi alarm functions.<br />

To format the alarm line, the function VA_GetExAlarmList can be used.<br />

3.3.8.7.1 Parameter<br />

I/O Parameter Type Meaning<br />

IN enable BOOL This function is only executed if enable is TRUE.<br />

IN VCHandle UDINT The handle returned by VA_Setup.<br />

IN pcAlarmLine DINT Text array to be used as the alarm line<br />

IN plLen DINT<br />

IN iFunction UINT<br />

Address of a DINT variable which contains the length of the text field.<br />

After the function is called, this variable is set to the actual length.<br />

1 ..... Read first alarm<br />

2 ..... Read next alarm<br />

4 ..... Read previous alarm<br />

8 ..... Read last alarm<br />

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

142 3.3.8.7 Reading Alarm Lists − VA_GetAlarmList


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

OUT Return Value UINT Not equal to 0 if error occurs<br />

3.3.8.7.2 Example for Automation Basic<br />

if ready = 0 then<br />

VC_HANDLE = VA_Setup(1, "vga")<br />

if VC_HANDLE 0 then<br />

ready = 1<br />

endif<br />

else<br />

Access_Status = VA_Saccess (1,VC_HANDLE)<br />

if Access_Status = 0 then<br />

;Alarm Alarmlen string = 80 length<br />

Alarmtype = 1 ;Read first alarm<br />

endif<br />

endif<br />

3.3.8.7.3 Example for C Programming<br />

#include <br />

#include <br />

#include <br />

GetAL_Status = VA_GetAlarmList UDINT(ADR(Alarmstring)),UDINT(ADR(Alarmlen)),Alarmtype)<br />

(1,VC_HANDLE,<br />

VA_Srelease (1,VC_HANDLE)<br />

UINT _GLOBAL ready;<br />

STRING _GLOBAL pcAlarmline[80];<br />

DINT _GLOBAL lLen;<br />

UINT _GLOBAL iFunction;<br />

unsigned long VC_HANDLE;<br />

_CYCLIC void Cyclic(void)<br />

{<br />

if (!ready)<br />

{<br />

VC_HANDLE = VA_Setup(1 "vga"); ,<br />

if (VC_HANDLE)<br />

ready = 1;<br />

}<br />

if (ready)<br />

{<br />

if (!VA_Saccess(1,VC_HANDLE))<br />

{<br />

lLen = 80;<br />

iFunction = 1;<br />

VA_GetAlarmList(<br />

1,VC_HANDLE, (DINT) pcAlarmline, (DINT) &lLen,iFunction);<br />

VA_Srelease(1,VC_HANDLE);<br />

}<br />

}<br />

}<br />

3.3.8.8 Alarm Information at the Cursor Position − VA_GetAlCurPos<br />

The VA_GetAlCurPos ascertains the group and alarm numbers of an alarm entry at the current cursor position<br />

in an alarm list.<br />

3.3.8.8.1 Parameter<br />

I/O Parameter Type Meaning<br />

IN enable BOOL This function is only executed if enable is TRUE.<br />

IN VCHandle UDINT The handle returned by VA_Setup.<br />

IN pGroupNumber USINT Group number of the alarm entry at the current cursor position.<br />

IN pAlarmNumber USINT Alarm number of the alarm entry at the current cursor position.<br />

OUT Return Value UINT Not equal to 0 if error occurs<br />

3.3.8.7 Reading Alarm Lists − VA_GetAlarmList 143


3.3.8.8.2 Example for Automation Basic<br />

(* cyclic program *)<br />

if ready 1 then<br />

VC_HANDLE = VA_Setup(1 "vga") ,<br />

VC_HANDLE if 0 then<br />

ready = 1<br />

endif<br />

endif<br />

if ready = 1 then<br />

VA_Saccess(1,VC_HANDLE)= if<br />

0 then<br />

VA_GetAlCurPos(1,VC_HANDLE,<br />

adr(Groupnumber),adr(Alarmnumber))<br />

VA_Srelease(1,VC_HANDLE)<br />

endif<br />

endif<br />

3.3.8.8.3 Example for C Programming<br />

#include <br />

#include <br />

#include <br />

UINT _GLOBAL ready;<br />

DINT _GLOBAL Groupnumber;<br />

DINT _GLOBAL Alarmnumber;<br />

unsigned long VC_HANDLE;<br />

_CYCLIC void Cyclic(void)<br />

{<br />

if (!ready)<br />

{<br />

VC_HANDLE = VA_Setup(1 "vga"); ,<br />

if (VC_HANDLE)<br />

ready = 1;<br />

}<br />

if (ready)<br />

{<br />

if (!VA_Saccess(1,VC_HANDLE))<br />

{<br />

1,VC_HANDLE, VA_GetAlCurPos(<br />

(DINT) &Groupnumber, (DINT) &Alarmnumber);<br />

VA_Srelease (1,VC_HANDLE);<br />

}<br />

}<br />

}<br />

3.3.8.9 Touch Screen Calibration − VA_GetCalStatus<br />

VA_GetCalStatus can be used to inquire whether calibration already took place with the VA_StartTouchCal<br />

function and whether it was completed successfully.<br />

3.3.8.9.1 Parameter<br />

I/O Parameter Type Meaning<br />

IN enable BOOL This function is only executed if enable is TRUE.<br />

IN VCHandle UDINT The handle returned by VA_Setup.<br />

OUT Return Value UINT<br />

3.3.8.9.2 Example for Automation Basic<br />

(* cyclic program *)<br />

if ready 1 then<br />

VC_HANDLE = VA_Setup(1 "vga") ,<br />

if VC_HANDLE 0 then<br />

ready = 1<br />

0 ................. Touch screen was successfully calibrated<br />

0xFFFF ......... A general error occurred<br />

All others ...... Calibration still active.<br />

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

144 3.3.8.8 Alarm Information at the Cursor Position − VA_GetAlCurPos


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

endif<br />

endif<br />

if ready = 1 then<br />

VA_Saccess(1,VC_HANDLE)= if<br />

0 then<br />

status = VA_GetCalStatus (1,VC_HANDLE)<br />

VA_Srelease(1,VC_HANDLE)<br />

endif<br />

endif<br />

3.3.8.9.3 Example for C Programming<br />

#include <br />

#include <br />

#include <br />

UINT _GLOBAL ready;<br />

unsigned long VC_HANDLE;<br />

UDINT _GLOBAL status;<br />

_CYCLIC void Initialization (void)<br />

{<br />

if (!ready)<br />

{<br />

VC_HANDLE = VA_Setup(1 "vga"); ,<br />

if (VC_HANDLE)<br />

ready = 1;<br />

}<br />

if (ready)<br />

{<br />

if (!VA_Saccess(1,VC_HANDLE))<br />

{<br />

status = VA_GetCalStatus (1,VC_HANDLE);<br />

VA_Srelease(1,VC_HANDLE);<br />

}<br />

}<br />

}<br />

3.3.8.9.4 Example of a complete touch calibration program<br />

#include <br />

#include <br />

#include <br />

_GLOBAL UINT stat,CalibStatus;<br />

_GLOBAL UINT calib;<br />

_GLOBAL UDINT VCHandle;<br />

_GLOBAL UINT MeinStatus;<br />

_INIT void init(void)<br />

{<br />

calib = 0;<br />

MeinStatus = 0;<br />

VCHandle=0;<br />

}<br />

_CYCLIC void Touchcalib(void)<br />

{<br />

if (!VCHandle)<br />

{<br />

}<br />

else<br />

{<br />

VCHandle = VA_Setup(1, "vis2");<br />

calib = 0;<br />

MeinStatus = 0;<br />

switch (calib)<br />

{<br />

case 0: /* Touch is calibrated */ break;<br />

case 1: calib = 2;break;<br />

case 2:<br />

if (!VA_Saccess(1,VCHandle))<br />

{<br />

CalibStatus=VA_StartTouchCal(1, VCHandle);<br />

3.3.8.9 Touch Screen Calibration − VA_GetCalStatus 145


eak;<br />

}<br />

case 3:<br />

(!VA_Saccess(1,VCHandle)) if<br />

{<br />

/*Touch Calib OK*/<br />

if (MeinStatus == 0)<br />

break;<br />

}<br />

/*VC HAndle } !=0*/<br />

}<br />

}<br />

VA_Srelease(1,VCHandle);<br />

calib = 3;<br />

MeinStatus = VA_GetCalStatus(1, VCHandle);<br />

VA_Srelease(1,VCHandle);<br />

calib = 0;<br />

3.3.8.10 Determining Contrast − VA_GetContrast<br />

The VA_GetContrast function returns the set contrast value of the display (0−100).<br />

Note:<br />

This function is only available on the PP41.<br />

3.3.8.10.1 Parameter<br />

I/O Parameter Type Meaning<br />

IN enable BOOL This function is only executed if enable is TRUE.<br />

IN VCHandle UDINT The handle returned by VA_Setup.<br />

OUT Return Value UINT Set contrast value of the display..<br />

3.3.8.10.2 Example for Automation Basic<br />

(* cyclic program *)<br />

if ready 1 then<br />

VC_HANDLE = VA_Setup(1 "vga") ,<br />

VC_HANDLE if 0 then<br />

ready = 1<br />

endif<br />

endif<br />

if ready = 1 then<br />

VA_Saccess(1,VC_HANDLE)= if<br />

0 then<br />

endif<br />

3.3.8.10.3 Example for C Programming<br />

#include <br />

#include <br />

#include <br />

UINT _GLOBAL ready;<br />

UINT _GLOBAL Contrast;<br />

unsigned long VC_HANDLE;<br />

Contrast = VA_GetContrast(1,VC_HANDLE)<br />

VA_Srelease(1,VC_HANDLE)<br />

endif<br />

_CYCLIC void Cyclic(void)<br />

{<br />

if (!ready)<br />

{<br />

VC_HANDLE = VA_Setup(1 "vga"); ,<br />

if (VC_HANDLE)<br />

ready = 1;<br />

}<br />

if (ready)<br />

{<br />

if (!VA_Saccess(1,VC_HANDLE))<br />

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

146 3.3.8.10 Determining Contrast − VA_GetContrast


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

}<br />

}<br />

{<br />

}<br />

Contrast 1,VC_HANDLE); = VA_GetContrast(<br />

VA_Srelease(1,VC_HANDLE);<br />

3.3.8.11 Reading Display Information − VA_GetDisplayInfo<br />

This function can be used to query information such as: max. X pixel, max. Y pixel, and the number of bits per<br />

pixel.<br />

Note:<br />

This function can only be used on IPCs and is not supported on SG3 targets.<br />

3.3.8.11.1 Parameter<br />

I/O Parameter Type Meaning<br />

IN enable BOOL This function is only executed if enable is TRUE.<br />

IN VCHandle UDINT The handle returned by VA_Setup.<br />

IN InfoType UDINT<br />

Index of the value to be queried<br />

1 − Number of pixels in the X direction<br />

2 − Number of pixels in the Y direction<br />

3 − Number of bits per pixel<br />

IN Value UDINT Return value of the queried info type<br />

3.3.8.11.2 Example for Automation Basic<br />

(* cyclic program *)<br />

if ready 1 then<br />

VC_HANDLE = VA_Setup(1 "vga") ,<br />

VC_HANDLE if 0 then<br />

ready = 1<br />

endif<br />

endif<br />

if ready = 1 then<br />

VA_Saccess(1,VC_HANDLE)= if<br />

0 then<br />

endif<br />

VA_GetDisplayInfo (1,VC_HANDLE,InfoType,<br />

UDINT(adr(Value)))<br />

VA_Srelease(1,VC_HANDLE)<br />

endif<br />

3.3.8.11.3 Example for C Programming<br />

#include <br />

#include <br />

#include <br />

UINT _GLOBAL ready;<br />

UDINT _GLOBAL InfoType;<br />

UDINT _GLOBAL Value<br />

unsigned long VC_HANDLE;<br />

_CYCLIC void Cyclic(void)<br />

{<br />

if (!ready)<br />

{<br />

VC_HANDLE = VA_Setup(1 "vga"); ,<br />

if (VC_HANDLE)<br />

ready = 1;<br />

}<br />

if (ready)<br />

{<br />

if (!VA_Saccess(1,VC_HANDLE))<br />

{<br />

VA_GetDisplayInfo(1,VC_HANDLE,InfoType,&Value<br />

);<br />

3.3.8.11 Reading Display Information − VA_GetDisplayInfo 147


VA_Srelease(1,VC_HANDLE);<br />

}<br />

}<br />

}<br />

3.3.8.12 Reading Alarm Lists − VA_GetExAlarmList<br />

Two functions can be used to read the alarm history VA_GetAlarmList and VA_GetExAlarmList. Both<br />

functions return a result string which then must be evaluated.<br />

It is important to call VA_Setup once before alarm system functions are called and to execute VA_Saccess<br />

before each use of Visapi alarm functions.<br />

3.3.8.12.1 Parameter<br />

I/O Parameter Type Meaning<br />

IN enable BOOL This function is only executed if enable is TRUE.<br />

IN VCHandle UDINT The handle returned by VA_Setup.<br />

IN pcAlarmLine DINT Text array to be used as the alarm line<br />

IN plLen DINT<br />

IN iFunction UINT<br />

Address of a DINT variable which contains the length of the text field.<br />

After the function is called, this variable is set to the actual length.<br />

1 ..... Read first alarm<br />

2 ..... Read next alarm<br />

4 ..... Read previous alarm<br />

8 ..... Read last alarm<br />

IN cSeperator USINT Separation character to be inserted into the alarm line<br />

IN cDateTimeFormat USINT<br />

Desired format for date and time output in the alarm list<br />

0 ... DD.MM.YY_HH:MM:SS<br />

1 ... DD.MM.YY_HH:MM:SSa<br />

2 ... HH_MM_SS<br />

3 ... HH_MM_SSa<br />

4 ... HH_MM<br />

5 ... HH_MMa<br />

6 ... NO_TIME_NO_DATE<br />

OUT Return Value UINT Not equal to 0 if error occurs<br />

3.3.8.12.2 Example for Automation Basic<br />

if ready = 0 then<br />

VC_HANDLE = VA_Setup(1 "vga") ,<br />

VC_HANDLE if 0 then<br />

ready = 1<br />

endif<br />

else<br />

Access_Status = VA_Saccess (1,VC_HANDLE)<br />

if Access_Status = 0 then<br />

endif<br />

endif<br />

Alarmlen = 80<br />

Seperator = ;Hyphen 45<br />

;Read Alarmtype first alarm = 1<br />

TimeDateForm ;DD.MM.YY = 0 HH.MM.SS<br />

3.3.8.12.3 Example for C Programming<br />

#include <br />

#include <br />

#include <br />

GetExAL_Status = VA_GetExAlarmList UDINT(ADR(Alarmstring)),UDINT(ADR(Alarmlen)),Alarmtype,Seperato<br />

(1,VC_HANDLE,<br />

VA_Srelease (1,VC_HANDLE)<br />

UINT _GLOBAL ready;<br />

STRING _GLOBAL pcAlarmline[80];<br />

DINT _GLOBAL lLen;<br />

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

148 3.3.8.12 Reading Alarm Lists − VA_GetExAlarmList


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

UINT _GLOBAL iFunction;<br />

USINT _GLOBAL cSeperator;<br />

USINT _GLOBAL cDateTimeFormat;<br />

unsigned long VC_HANDLE;<br />

_CYCLIC void Cyclic(void)<br />

{<br />

if (!ready)<br />

{<br />

VC_HANDLE = VA_Setup(1 "vga"); ,<br />

if (VC_HANDLE)<br />

ready = 1;<br />

}<br />

if (ready)<br />

{<br />

if (!VA_Saccess(1,VC_HANDLE))<br />

{<br />

lLen = 80;<br />

cSeperator = ' ';<br />

cDateTimeFormat = 0;<br />

iFunction = 1;<br />

}<br />

}<br />

}<br />

1,VC_HANDLE, VA_GetExAlarmList(<br />

(DINT) pcAlarmline, (DINT) &lLen, iFunction, cSeperator, cDateTimeFormat);<br />

VA_Srelease(1,VC_HANDLE);<br />

3.3.8.13 Reading the Key Matrix − VA_GetKeyMatrix<br />

The VA_GetKeyMatrix function returns information about whether and which keys on a target system are<br />

currently being pressed.<br />

3.3.8.13.1 Parameter<br />

I/O Parameter Type Meaning<br />

IN enable BOOL This function is only executed if enable is TRUE.<br />

IN VCHandle UDINT The handle returned by VA_Setup.<br />

IN KeyMatrix UDINT Start address of the key address array<br />

IN KeysToRead UDINT Number of keys to be read<br />

IN KeysRead UDINT Number of keys read<br />

OUT Return Value UINT Not equal to 0 if error occurs<br />

3.3.8.13.2 Example for C Programming<br />

See also Reading the Matrix<br />

3.3.8.14 Querying the Palette Color − VA_GetPaletteColor<br />

Using VA_GetPaletteColor, it is possible to dynamically query each individual color value. Naturally, this is only<br />

possible on an IPC (color or black/white display).<br />

3.3.8.14.1 Parameter<br />

I/O Parameter Type Meaning<br />

IN enable BOOL This function is only executed if enable is TRUE.<br />

IN VCHandle UDINT The handle returned by VA_Setup.<br />

IN index UINT Index of the color which should be retrieved (0−255).<br />

OUT Return Value UDINT<br />

Color. The color value is arranged as follows:<br />

Bits 0 .. 8 Red value (0−255)<br />

Bits 8 .. 16 Green value (0−255)<br />

Bits 16 .. 24 Blue value (0−255)<br />

Bits 24 .. 32 0<br />

3.3.8.13 Reading the Key Matrix − VA_GetKeyMatrix 149


3.3.8.14.2 Example for Automation Basic<br />

(* cyclic program *)<br />

color = 0 ; Black<br />

if ready 1 then<br />

VC_HANDLE = VA_Setup(1 "vga") ,<br />

VC_HANDLE if 0 then<br />

ready = 1<br />

endif<br />

endif<br />

if ready = 1 then<br />

if VA_Saccess(1,VC_HANDLE)= 0 then<br />

color = VA_GetPaletteColor(1,VC_HANDLE,0)<br />

VA_Srelease(1,VC_HANDLE)<br />

endif<br />

endif<br />

3.3.8.14.3 Example for C Programming<br />

#include <br />

#include <br />

#include <br />

UINT _GLOBAL ready;<br />

UINT _GLOBAL fill;<br />

UDINT _GLOBAL color;<br />

unsigned long VC_HANDLE;<br />

_CYCLIC void Cyclic(void)<br />

{<br />

color /* = Black 0; */<br />

if (!ready)<br />

{<br />

VC_HANDLE = VA_Setup(1 "vga"); ,<br />

if (VC_HANDLE)<br />

ready = 1;<br />

}<br />

if (ready)<br />

{<br />

if (!VA_Saccess(1,VC_HANDLE))<br />

{<br />

color = VA_GetPaletteColor(1,VC_HANDLE,0);<br />

VA_Srelease(1,VC_HANDLE);<br />

}<br />

}<br />

}<br />

3.3.8.15 Graphics and Text Output − VA_GetTextByTextGroup<br />

An individual line can be read from text groups with the VA_GetTextByTextGroup command.<br />

3.3.8.15.1 Parameter<br />

I/O Parameter Type Meaning<br />

IN enable BOOL This function is only executed if enable is TRUE.<br />

IN VCHandle UDINT The handle returned by VA_Setup.<br />

IN TG_id USINT ID number of the text group to be read.<br />

IN TGT_id USINT ID number of the line to be read in the text group.<br />

IN pcText UDINT Text which is read (STRING)<br />

IN pcTextlength UDINT Length of the STRING to be read<br />

OUT Return Value UINT Not equal to 0 if error occurs<br />

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

150 3.3.8.14 Querying the Palette Color − VA_GetPaletteColor


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

Important:<br />

Text groups must be on the target if they are to be read. The pcTextlength variable has to transfer a string<br />

length. If the read length is smaller than the value input, then the actual length of the string is displayed.<br />

3.3.8.15.2 Example for Automation Basic<br />

(* cyclic program *)<br />

if ready = 0 then<br />

VC_HANDLE = VA_Setup(1,"visu")<br />

if VC_HANDLE 0 then<br />

ready = 1<br />

endif<br />

else<br />

Access_Status = VA_Saccess (1,VC_HANDLE)<br />

if Access_Status = 0 then<br />

pcTextlength = 70<br />

if (ReadingText = 1) then<br />

ReadingText = 0<br />

status = VA_GetTextByTextGroup(1,VC_HANDLE,TG_id,TGT_id,<br />

UDINT(ADR(pcText)),UDINT(ADR(pcTextlength)))<br />

endif<br />

endif<br />

endif<br />

VA_Srelease (1,VC_HANDLE)<br />

3.3.8.15.3 Example for C Programming<br />

#include <br />

#include <br />

#include <br />

unsigned long VC_HANDLE;<br />

_GLOBAL USINT ready;<br />

_GLOBAL USINT TG_id;<br />

_GLOBAL USINT TGT_id;<br />

_GLOBAL STRING pcText[80];<br />

_GLOBAL UDINT pcTextlength;<br />

_GLOBAL UINT status;<br />

_CYCLIC void Cyclic (void)<br />

{<br />

if (!ready)<br />

{<br />

VC_HANDLE = VA_Setup(1 , "vga");<br />

if (VC_HANDLE)<br />

ready = 1;<br />

}<br />

if (ready)<br />

{<br />

if (!VA_Saccess(1,VC_HANDLE))<br />

{<br />

status = VA_GetTextByTextGroup(1,VC_HANDLE,TG_id,TGT_id,(UDINT)pcText,(UDINT)&pcTextlength);<br />

VA_Srelease(1,VC_HANDLE);<br />

}<br />

}<br />

}<br />

3.3.8.16 User−Defined Touch Operation − VA_GetTouchAction<br />

The VA_GetTouchAction function can be used to retrieve the location of the current touch position, as well as<br />

the touch status (pressed/released).<br />

3.3.8.16.1 Parameter<br />

I/O Parameter Type Meaning<br />

IN enable BOOL This function is only executed if enable is TRUE.<br />

IN VCHandle UDINT The handle returned by VA_Setup.<br />

IN type UDINT Retrieval type.<br />

0 ... Processed<br />

1 ... REALTIME<br />

3.3.8.15 Graphics and Text Output − VA_GetTextByTextGroup 151


REALTIME means that each touch action can be queried in real−time.<br />

Processed means that touch actions (i.e. with opened touch input) do not get<br />

through.<br />

IN status UDINT Address of a TouchAction structure. This will be described further down the page.<br />

OUT Return Value UINT Not equal to 0 if error occurs<br />

3.3.8.16.2 TouchAction structure<br />

Variable Meaning<br />

x The last pressed X position<br />

y The last pressed Y position<br />

status<br />

1 ... pressed<br />

2 ... released<br />

The TouchAction structure records the current touch status.<br />

3.3.8.16.3 Example for Automation Basic<br />

(* cyclic program *)<br />

if ready 1 then<br />

VC_HANDLE = VA_Setup(1 "vga") ,<br />

VC_HANDLE if 0 then<br />

ready = 1<br />

endif<br />

endif<br />

if ready = 1 then<br />

if VA_Saccess(1,VC_HANDLE)= 0 then<br />

endif<br />

VA_GetTouchAction (1,0, UDINT(adr(touch)))<br />

VC_HANDLE,<br />

x_position = touch.x<br />

y_position = touch.y<br />

touch_status = touch.status<br />

VA_Srelease(1,VC_HANDLE)<br />

endif<br />

3.3.8.16.4 Example for C Programming<br />

#include <br />

#include <br />

#include <br />

UINT _GLOBAL ready;<br />

TouchAction _GLOBAL touch;<br />

UDINT _GLOBAL x_position;<br />

UDINT _GLOBAL y_position;<br />

UDINT _GLOBAL touch_status;<br />

unsigned long VC_HANDLE;<br />

_CYCLIC void Cyclic(void)<br />

{<br />

if (!ready)<br />

{<br />

VC_HANDLE = VA_Setup(1 "vga"); ,<br />

if (VC_HANDLE)<br />

ready = 1;<br />

}<br />

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

152 3.3.8.16 User−Defined Touch Operation − VA_GetTouchAction


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

if (ready)<br />

{<br />

if (!VA_Saccess(1,VC_HANDLE))<br />

{<br />

x_position = touch.x;<br />

}<br />

}<br />

}<br />

3.3.8.17 VA_Invblnk<br />

VA_GetTouchAction (1,VC_HANDLE, 0, &touch);<br />

VA_Srelease(1,VC_HANDLE);<br />

y_position = touch.y;<br />

touch_status = touch.status;<br />

The VA_Invblnk function is only used internally.<br />

3.3.8.18 Graphics and Text Output − VA_Line<br />

Drawing a line takes place with the VA_Line command.<br />

3.3.8.18.1 Parameter<br />

I/O Parameter Type Meaning<br />

IN enable BOOL This function is only executed if enable is TRUE.<br />

IN VCHandle UDINT The handle returned by VA_Setup.<br />

IN x1/y1 UINT Coordinates of the upper left edge of the line<br />

IN x2/y2 UINT Coordinates of the lower right edge of the line<br />

IN color UINT Color of the line<br />

OUT Return Value UINT Not equal to 0 if error occurs<br />

3.3.8.18.2 Example for Automation Basic<br />

(* cyclic program *)<br />

x1 = 100<br />

y1 = 150<br />

x2 = 300<br />

y2 = 350<br />

color = 0 ; Black<br />

if ready 1 then<br />

VC_HANDLE = VA_Setup(1 "vga") ,<br />

VC_HANDLE if 0 then<br />

ready = 1<br />

endif<br />

endif<br />

if ready = 1 then<br />

VA_Saccess(1,VC_HANDLE)= if<br />

0 then<br />

VA_Line (1,VC_HANDLE,x1,y1,x2,y2,color)<br />

endif<br />

endif<br />

VA_Srelease(1,VC_HANDLE)<br />

3.3.8.18.3 Example for C Programming<br />

#include <br />

#include <br />

#include <br />

UINT _GLOBAL ready;<br />

UINT _GLOBAL x1;<br />

UINT _GLOBAL x2;<br />

UINT _GLOBAL y1;<br />

UINT _GLOBAL y2;<br />

3.3.8.17 VA_Invblnk 153


UINT _GLOBAL color;<br />

unsigned long VC_HANDLE;<br />

_CYCLIC void Cyclic(void)<br />

{<br />

x1 = 150;<br />

y1 = 100;<br />

x2 = 100;<br />

y2 = 150;<br />

color /* = Black 0; */<br />

if (!ready)<br />

{<br />

VC_HANDLE = VA_Setup(1 "vga"); ,<br />

if (VC_HANDLE)<br />

ready = 1;<br />

}<br />

if (ready)<br />

{<br />

if (!VA_Saccess(1,VC_HANDLE))<br />

{<br />

VA_Line (1,VC_HANDLE,x1,y1,x2,y2,color);<br />

VA_Srelease(1,VC_HANDLE);<br />

}<br />

}<br />

}<br />

3.3.8.19 Acknowledging Alarms from a Certain Group − VA_QuitAlarms<br />

Using the VA_QuitAlarms function, alarms can be acknowledged from a certain group which triggers the group<br />

alarms. All alarms are acknowledged if group number 65536 (0xffff) is specified.<br />

3.3.8.19.1 Parameter<br />

I/O Parameter Type Meaning<br />

IN enable BOOL This function is only executed if enable is TRUE.<br />

IN VCHandle UDINT The handle returned by VA_Setup<br />

IN GroupNumber UINT Group number which should be acknowledged<br />

OUT Return Value UINT Not equal to 0 if error occurs<br />

3.3.8.19.2 Example for Automation Basic<br />

(* cyclic program *)<br />

if ready 1 then<br />

VC_HANDLE = VA_Setup(1 "vga") ,<br />

VC_HANDLE if 0 then<br />

ready = 1<br />

endif<br />

endif<br />

if ready = 1 then<br />

VA_Saccess(1,VC_HANDLE)= if<br />

0 then<br />

endif<br />

3.3.8.19.3 Example for C Programming<br />

#include <br />

#include <br />

#include <br />

UINT _GLOBAL ready;<br />

UINT _GLOBAL Groupnumber;<br />

unsigned long VC_HANDLE;<br />

_CYCLIC void Cyclic(void)<br />

VA_QuitAlarms(1,VC_HANDLE, Groupnumber)<br />

VA_Srelease(1,VC_HANDLE)<br />

endif<br />

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

154 3.3.8.19 Acknowledging Alarms from a Certain Group − VA_QuitAlarms


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

{<br />

if (!ready)<br />

{<br />

VC_HANDLE = VA_Setup(1 "vga"); ,<br />

if (VC_HANDLE)<br />

ready = 1;<br />

}<br />

if (ready)<br />

{<br />

if (!VA_Saccess(1,VC_HANDLE))<br />

{<br />

1, VC_HANDLE, VA_QuitAlarms(<br />

Groupnumber);<br />

VA_Srelease (1,VC_HANDLE);<br />

}<br />

}<br />

}<br />

3.3.8.20 Graphics and Text Output − VA_Rect<br />

A rectangle is drawn with the VA_Rect command.<br />

3.3.8.20.1 Parameter<br />

I/O Parameter Type Meaning<br />

IN enable BOOL This function is only executed if enable is TRUE.<br />

IN VCHandle UDINT The handle returned by VA_Setup<br />

IN x1/y1 UINT Coordinates of the upper left corner of the rectangle<br />

IN width/height UINT Width and height of the rectangle<br />

IN fill UINT Filling color of the rectangle<br />

IN color UINT Border color of the rectangle<br />

OUT Return Value UINT Not equal to 0 if error occurs<br />

VGA:<br />

If fill == 255, then an empty rectangle is drawn. Otherwise, it is filled with the color in fill.<br />

PP41:<br />

If fill == 0, then an empty rectangle is drawn. Otherwise, it is filled with the color in fill.<br />

On the PP41, a rectangle can be deleted by setting color and fill to 0.<br />

3.3.8.20.2<br />

Example for Automation Basic<br />

(* cyclic program *)<br />

x1 = 100<br />

y1 = 150<br />

x2 = 250<br />

y2 = 150<br />

fill = 255 ; Transparent<br />

color = 0 ; Black<br />

if ready 1 then<br />

VC_HANDLE = VA_Setup(1 "vga") ,<br />

VC_HANDLE if 0 then<br />

ready = 1<br />

endif<br />

endif<br />

if ready = 1 then<br />

VA_Saccess(1,VC_HANDLE)= if<br />

0 then<br />

VA_Rect (1,VC_HANDLE,x1,y1,x2,y2,fill,color)<br />

VA_Srelease(1,VC_HANDLE)<br />

endif<br />

endif<br />

3.3.8.20 Graphics and Text Output − VA_Rect 155


3.3.8.20.3 Example for C Programming<br />

#include <br />

#include <br />

#include <br />

UINT _GLOBAL ready;<br />

unsigned long VC_HANDLE;<br />

UINT _GLOBAL x1;<br />

UINT _GLOBAL x2;<br />

UINT _GLOBAL y1;<br />

UINT _GLOBAL y2;<br />

UINT _GLOBAL fill;<br />

UINT _GLOBAL color;<br />

_CYCLIC void Cyclic(void)<br />

{<br />

x1 = 150;<br />

y1 = 100;<br />

x2 = 100;<br />

y2 = 150;<br />

fill = /* 255; Transparent */<br />

color /* = 0; Black */<br />

if (!ready)<br />

{<br />

VC_HANDLE = VA_Setup(1 "vga"); ,<br />

if (VC_HANDLE)<br />

ready = 1;<br />

}<br />

if (ready)<br />

{<br />

if (!VA_Saccess(1,VC_HANDLE))<br />

{<br />

VA_Rect (1,VC_HANDLE,x1,y1,x2,y2,fill,color);<br />

VA_Srelease(1,VC_HANDLE);<br />

}<br />

}<br />

}<br />

3.3.8.21 Graphics and Text Output − VA_Redraw<br />

The VA_Redraw function clears all VISAPI output and<br />

then redraws the picture.<br />

3.3.8.21.1 Parameter<br />

I/O Parameter Type Meaning<br />

IN enable BOOL This function is only executed if enable is TRUE.<br />

IN VCHandle UDINT The handle returned by VA_Setup<br />

OUT Return Value UINT Not equal to 0 if error occurs<br />

Warning:<br />

This function works asynchronously. This means that in some circumstances, subsequent Visapi functions (i.e.<br />

VA_Rect, etc.) are not drawn.<br />

In this case, the subsequent functions have already been executed before the VA_Redraw function is finished.<br />

If the VA_Redraw function now finishes (afterward), then all drawing functions which had been carried out after<br />

this function was called are erased.<br />

3.3.8.21.2 Example for Automation Basic<br />

(* cyclic program *)<br />

if ready 1 then<br />

VC_HANDLE = VA_Setup(1 "vga") ,<br />

VC_HANDLE if 0 then<br />

ready = 1<br />

endif<br />

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

156 3.3.8.20 Graphics and Text Output − VA_Rect


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

endif<br />

if ready = 1 then<br />

VA_Saccess(1,VC_HANDLE)= if<br />

0 then<br />

VA_Redraw (1,VC_HANDLE)<br />

VA_Srelease(1,VC_HANDLE)<br />

endif<br />

endif<br />

3.3.8.21.3 Example for C Programming<br />

#include <br />

#include <br />

#include <br />

UINT _GLOBAL ready;<br />

unsigned long VC_HANDLE;<br />

_CYCLIC void Cyclic(void)<br />

{<br />

if (!ready)<br />

{<br />

VC_HANDLE = VA_Setup(1 "vga"); ,<br />

if (VC_HANDLE)<br />

ready = 1;<br />

}<br />

if (ready)<br />

{<br />

if (!VA_Saccess(1,VC_HANDLE))<br />

{<br />

VA_Srelease(1,VC_HANDLE);<br />

}<br />

}<br />

}<br />

VA_Redraw (1,VC_HANDLE);<br />

3.3.8.22 Requirements and Initialization − VA_Saccess<br />

This is one of the most important functions in the VISAPI. VA_Saccess makes it possible to carry out drawing<br />

operations.<br />

Drawing is ONLY possible if this function returns ERR_OK. This means that this function has to be called before<br />

any drawing commands. If ERROR_BUSY is returned, the VA_Saccess function must be called again in the<br />

next cycle. This occurs until ERR_OK is returned.<br />

Important:<br />

No VISAPI function can be used until VA_Saccess(...) returns ERR_OK.<br />

After that, any number of VISAPI functions can be executed. After all of this, VA_Srelease must be called in<br />

each case.<br />

The following rules must absolutely be followed:<br />

• Drawing functions can only be written between a VA_Saccess and VA_Srelease block<br />

• VA_Srelease should only be called if VA_Saccess returned ERR_OK.<br />

3.3.8.22.1 Parameter<br />

I/O Parameter Type Meaning<br />

IN enable BOOL This function is only executed if enable is TRUE.<br />

IN VCHandle UDINT The handle returned by VA_Setup<br />

OUT Return Value UINT Not equal to 0 if error occurs<br />

3.3.8.22.2 Example for Automation Basic<br />

(* cyclic program *)<br />

if ready 1 then<br />

VC_HANDLE = VA_Setup(1 "vga") ,<br />

3.3.8.21 Graphics and Text Output − VA_Redraw 157


VC_HANDLE if 0 then<br />

ready = 1<br />

endif<br />

endif<br />

if ready = 1 then<br />

if VA_Saccess(1,VC_HANDLE)= 0 then<br />

....<br />

....<br />

endif<br />

endif<br />

3.3.8.22.3 Example for C Programming<br />

#include <br />

#include <br />

#include <br />

UINT _GLOBAL ready;<br />

unsigned long VC_HANDLE;<br />

_CYCLIC void Cyclic(void)<br />

{<br />

if (!ready)<br />

{<br />

VC_HANDLE = VA_Setup(1 "vga"); ,<br />

if (VC_HANDLE)<br />

ready = 1;<br />

}<br />

if (ready)<br />

{<br />

if (!VA_Saccess(1,VC_HANDLE))<br />

{<br />

....<br />

....<br />

}<br />

}<br />

}<br />

Here are some typical errors associated with VA_Saccess and VA_Srelease:<br />

• VA_Saccess(1, VC_HANDLE);<br />

VA_Line(1,VC_HANDLE, 10, 10, 100, 100, 1);<br />

VA_Srelease(1,VC_HANDLE);<br />

This is incorrect! VA_Srelease is called even if VA_Saccess fails.<br />

• ...<br />

...<br />

if (VA_Saccess(1,VC_HANDLE) == ERR_OK)<br />

{<br />

VA_Line(1,VC_HANDLE, 10, 10, 100, 100, 1);<br />

}<br />

...<br />

...<br />

This is incorrect! VA_Srelease has been left out.<br />

• CYCLIC void test(void)<br />

{<br />

VA_Line(1,VC_HANDLE, 10, 10, 100, 100, 1);<br />

}<br />

This is incorrect! VA_Saccess hasn't been called here.<br />

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

158 3.3.8.22 Requirements and Initialization − VA_Saccess


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

3.3.8.23 Saving Settings − VA_SaveSettings<br />

Used to store contrast and brightness settings on the PP100.<br />

3.3.8.23.1 Parameter<br />

I/O Parameter Type Meaning<br />

IN enable BOOL This function is only executed if enable is TRUE.<br />

IN VCHandle UDINT The handle returned by VA_Setup<br />

IN uiAction UINT 1...Store<br />

2...Check whether storing is active<br />

OUT Return Value UINT 1 = Storing is currently running, 0 = Store successful, >= 1 Error<br />

3.3.8.23.2 Example for Automation Basic<br />

(* cyclic program *)<br />

if ready 1 then<br />

VC_HANDLE = VA_Setup(1 "vga") ,<br />

VC_HANDLE if 0 then<br />

ready = 1<br />

endif<br />

endif<br />

if ready = 1 then<br />

if VA_Saccess(1,VC_HANDLE)= 0 then<br />

if StartSaving=1 then<br />

Status=VA_SaveSettings (1,VC_HANDLE,2)<br />

if Status=0 then<br />

Status=VA_SaveSettings(1,VC_HANDLE,1)<br />

StartSaving=0<br />

endif<br />

endif<br />

VA_Srelease(1,VC_HANDLE)<br />

endif<br />

endif<br />

3.3.8.23.3 Example for C Programming<br />

#include <br />

#include <br />

#include <br />

UINT _GLOBAL ready;<br />

unsigned long VC_HANDLE;<br />

UINT _GLOBAL Status;<br />

BOOL _GLOBAL StartSaving;<br />

_CYCLIC void Cyclic(void)<br />

{<br />

if (!ready)<br />

{<br />

VC_HANDLE = VA_Setup(1 "vga"); ,<br />

if (VC_HANDLE)<br />

ready = 1;<br />

}<br />

if (ready)<br />

{<br />

if (!VA_Saccess(1,VC_HANDLE))<br />

{<br />

if (StartSaving)<br />

{<br />

Status=VA_SaveSettings (1,VC_HANDLE,2);<br />

if(!Status)<br />

{<br />

Status=VA_SaveSettings (1,VC_HANDLE,1);<br />

StartSaving=0;<br />

}<br />

}<br />

VA_Srelease (1,VC_HANDLE);<br />

}<br />

}<br />

3.3.8.23 Saving Settings − VA_SaveSettings 159


}<br />

3.3.8.24 Disable − enable backlight − VA_SetBacklight<br />

The backlight can be enable and disable by the function VA_SetBacklight.<br />

3.3.8.24.1 Parameter<br />

I/O Parameter Type Bedeutung<br />

IN enable BOOL This function is only executed if enable is TRUE.<br />

IN VCHandle UDINT The handle returned by VA_Setup.<br />

IN blnState BOOL<br />

Disable − enable backlight<br />

000disable<br />

10 enabel<br />

OUT Rückgabewert UINT Not equal to 0 if error occursl<br />

3.3.8.24.2 Example for Automation Basic<br />

(* cyclic program *)<br />

if ready 1 then<br />

VC_HANDLE = VA_Setup(1,"visu")<br />

if VC_HANDLE 0 then<br />

ready = 1<br />

endif<br />

endif<br />

if ready = 1 then<br />

if VA_Saccess(1,VC_HANDLE)= 0 then<br />

VA_SetBacklight(1,VC_HANDLE,blnState)<br />

VA_Srelease(1,VC_HANDLE)<br />

endif<br />

endif<br />

3.3.8.24.3 Example for C Programming<br />

#include <br />

#include <br />

#include <br />

UINT _GLOBAL ready;<br />

BOOL _GLOBAL blnState;<br />

unsigned long VC_HANDLE;<br />

_CYCLIC void Zyklisch(void)<br />

{<br />

if (!ready)<br />

{<br />

VC_HANDLE = VA_Setup(1 "visu"); ,<br />

if (VC_HANDLE)<br />

ready = 1;<br />

}<br />

if (ready)<br />

{<br />

if (!VA_Saccess(1,VC_HANDLE))<br />

{<br />

Backlight(1,VC_HANDLE,blnState);<br />

VA_Set<br />

VA_Srelease(1,VC_HANDLE);<br />

}<br />

}<br />

}<br />

3.3.8.25 Setting Contrast and Brightness − VA_SetBrightness<br />

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

The brightness of a PP can be set with the VA_SetBrightness function. This function is available on TFT and<br />

LCD displays.<br />

160 3.3.8.24 Disable − enable backlight − VA_SetBacklight


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

3.3.8.25.1 Parameter<br />

I/O Parameter Type Meaning<br />

IN enable BOOL This function is only executed if enable is TRUE.<br />

IN VCHandle UDINT The handle returned by VA_Setup<br />

IN percent UDINT<br />

Brightness intensity<br />

000 dark<br />

500 standard<br />

100 light<br />

OUT Return Value UINT Not equal to 0 if error occurs<br />

3.3.8.25.2 Example for Automation Basic<br />

(* cyclic program *)<br />

if ready 1 then<br />

VC_HANDLE = VA_Setup(1 "vga") ,<br />

if VC_HANDLE 0 then<br />

ready = 1<br />

endif<br />

endif<br />

if ready = 1 then<br />

VA_Saccess(1,VC_HANDLE)= if<br />

0 then<br />

endif<br />

3.3.8.25.3 Example for C Programming<br />

#include <br />

#include <br />

#include <br />

UINT _GLOBAL ready;<br />

UDINT _GLOBAL percent;<br />

unsigned long VC_HANDLE;<br />

VA_SetBrightness(1,VC_HANDLE,percent)<br />

VA_Srelease(1,VC_HANDLE)<br />

endif<br />

_CYCLIC void Cyclic(void)<br />

{<br />

if (!ready)<br />

{<br />

VC_HANDLE = VA_Setup(1 "vga"); ,<br />

if (VC_HANDLE)<br />

ready = 1;<br />

}<br />

if (ready)<br />

{<br />

if (!VA_Saccess(1,VC_HANDLE))<br />

{<br />

VA_SetBrightness(1,VC_HANDLE,percent);<br />

VA_Srelease(1,VC_HANDLE);<br />

}<br />

}<br />

}<br />

3.3.8.26 Setting Contrast and Brightness − VA_SetContrast<br />

PP contrast can be set with the VA_SetContrast function.<br />

Note:<br />

This function is only available on LCD Displays.<br />

3.3.8.26.1 Parameter<br />

I/O Parameter Type Meaning<br />

IN enable BOOL This function is only executed if enable is TRUE.<br />

3.3.8.25 Setting Contrast and Brightness − VA_SetBrightness 161


IN VCHandle UDINT The handle returned by VA_Setup<br />

IN percent UDINT<br />

Contrast intensity<br />

000 dark<br />

500 standard<br />

100 light<br />

OUT Return Value UINT Not equal to 0 if error occurs<br />

3.3.8.26.2 Example for Automation Basic<br />

(* cyclic program *)<br />

if ready 1 then<br />

VC_HANDLE = VA_Setup(1 "vga") ,<br />

if VC_HANDLE 0 then<br />

ready = 1<br />

endif<br />

endif<br />

if ready = 1 then<br />

VA_Saccess(1,VC_HANDLE)= if<br />

0 then<br />

endif<br />

3.3.8.26.3 Example for C Programming<br />

#include <br />

#include <br />

#include <br />

UINT _GLOBAL ready;<br />

UDINT _GLOBAL percent;<br />

unsigned long VC_HANDLE;<br />

VA_SetContrast(1,VC_HANDLE,percent)<br />

VA_Srelease(1,VC_HANDLE)<br />

endif<br />

_CYCLIC void Cyclic(void)<br />

{<br />

if (!ready)<br />

{<br />

VC_HANDLE = VA_Setup(1 "vga"); ,<br />

if (VC_HANDLE)<br />

ready = 1;<br />

}<br />

if (ready)<br />

{<br />

if (!VA_Saccess(1,VC_HANDLE))<br />

{<br />

VA_SetContrast(1,VC_HANDLE,percent);<br />

VA_Srelease(1,VC_HANDLE);<br />

}<br />

}<br />

}<br />

3.3.8.26.4 Example: Setting Contrast/Brightness<br />

#include<br />

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

#include #include #define VC_SETUP 0 #define VC_WAIT 10<br />

#define VC_SETCONTRAST 30 #define VC_SETBRIGHTNESS 40 _GLOBAL UDINT VC_Handle; _LOCAL UINT Step,<br />

ContrastValue, OldContrastValue, BrightnessValue, OldBrightnessValue; _INIT void Init_Routine(void)<br />

{ VC_Handle=0; if (ContrastValue == 0) ContrastValue = 60; else if (BrightnessValue==0)<br />

BrightnessValue=60; Step = VC_SETUP; } _CYCLIC void Cyclic_Routine(void) { switch (Step) { case<br />

VC_SETUP: VC_Handle = VA_Setup(1, "visu"); if (VC_Handle != 0) Step = VC_WAIT; break; case VC_WAIT: if<br />

(ContrastValue != OldContrastValue) { OldContrastValue = ContrastValue; Step = VC_SETCONTRAST; } if<br />

(BrightnessValue != OldBrightnessValue) { OldBrightnessValue=BrightnessValue; Step=<br />

VC_SETBRIGHTNESS; } break; case VC_SETCONTRAST: if (!VA_Saccess(1,VC_Handle)) {<br />

VA_SetContrast(1,VC_Handle,ContrastValue); VA_Srelease(1,VC_Handle); } Step = VC_WAIT; break; case<br />

VC_SETBRIGHTNESS: if (!VA_Saccess(1,VC_Handle)) { VA_SetBrightness(1,VC_Handle,BrightnessValue);<br />

VA_Srelease(1,VC_Handle); } Step = VC_WAIT; break; } }<br />

162 3.3.8.26 Setting Contrast and Brightness − VA_SetContrast


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

3.3.8.27 Setting the Palette Color − VA_SetPaletteColor<br />

It is possible to dynamically change color values for each individual color using the VA_SetPaletteColor function.<br />

Naturally, this is only possible on an IPC (color or black/white display).<br />

If a palette color is changed, it will remain so until it is either changed again or a warm/cold restart is executed.<br />

3.3.8.27.1 Parameter<br />

I/O Parameter Type Meaning<br />

IN enable BOOL This function is only executed if enable is TRUE.<br />

IN VCHandle UDINT The handle returned by VA_Setup.<br />

IN index UINT Index of the color which should be changed (0−255).<br />

IN color UDINT<br />

New color. The color value is arranged as follows:<br />

Bits 00 − 80 Red value (0−255)<br />

Bits 08 − 16 Green value (0−255)<br />

Bits 16 − 24 Blue value (0−255)<br />

Bits 24 − 32 0<br />

OUT Return Value UINT Not equal to 0 if error occurs<br />

3.3.8.27.2 Example for Automation Basic<br />

(* cyclic program *)<br />

if ready 1 then<br />

VC_HANDLE = VA_Setup(1 "vga") ,<br />

if VC_HANDLE 0 then<br />

ready = 1<br />

endif<br />

endif<br />

if ready = 1 then<br />

if VA_Saccess(1,VC_HANDLE)= 0 then<br />

color = (255 OR SHL(255,8) OR SHL(255,16))<br />

VA_SetPaletteColor(1,VC_HANDLE,color_index, color)<br />

VA_Srelease(1,VC_HANDLE)<br />

endif<br />

endif<br />

3.3.8.27.3 Example for C Programming<br />

#include <br />

#include <br />

#include <br />

UINT _GLOBAL ready;<br />

UINT _GLOBAL color_index<br />

UDINT _GLOBAL color;<br />

unsigned long VC_HANDLE;<br />

_CYCLIC void Cyclic(void)<br />

{<br />

if (!ready)<br />

{<br />

VC_HANDLE = VA_Setup(1 "vga"); ,<br />

if (VC_HANDLE)<br />

ready = 1;<br />

}<br />

if (ready)<br />

{<br />

if (!VA_Saccess(1,VC_HANDLE))<br />

{<br />

color = (0xFF | (0xFF


}<br />

}<br />

}<br />

3.3.8.28 Requirements and Initialization − VA_Setup<br />

Sets up a connection to Runtime. Runtime, including all drivers, must be on the target system, and the panel<br />

project must have been started already.<br />

If the function is successful, then a handle is returned. This handle must be transferred when any other VISAPI<br />

functions are used.<br />

If VA_Setup fails (returns 0), then the function must be called cyclically until a valid handle is returned.<br />

3.3.8.28.1 Parameter<br />

I/O Parameter Type Meaning<br />

IN enable BOOL This function is only executed if enable is TRUE.<br />

IN interpreter STRING[80]<br />

OUT Return<br />

Value<br />

UDINT<br />

3.3.8.28.2 Example for Automation Basic<br />

(* cyclic program *)<br />

if ready 1 then<br />

VC_HANDLE = VA_Setup(1 "Visu") ,<br />

VC_HANDLE if 0 then<br />

ready = 1<br />

endif<br />

endif<br />

('Visu' is the name of the panel object)<br />

3.3.8.28.3 Example for C Programming<br />

#include <br />

#include <br />

#include <br />

UINT _GLOBAL ready;<br />

unsigned long VC_HANDLE;<br />

_CYCLIC void Cyclic(void)<br />

{<br />

if (!ready)<br />

{<br />

VC_HANDLE = VA_Setup(1 "Visu"); ,<br />

if (VC_HANDLE)<br />

ready = 1;<br />

}<br />

The name of the project runnning must be specified here.<br />

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

The handle which must be specified for all further VISAPI functions.<br />

0 is returned if an error occurs.<br />

164 3.3.8.28 Requirements and Initialization − VA_Setup


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

}<br />

('Visu' is the name of the panel object)<br />

3.3.8.29 Requirements and Initialization − VA_SetupX<br />

This function was adopted from AS version 2.0 for compatibility reasons.<br />

This call takes place similarly to VA_Setup.<br />

In addition, this function can retrieve an error code in case VA_Setup fails!<br />

Note:<br />

This function is only used with the C programming language.<br />

3.3.8.29.1 Parameter<br />

I/O Parameter Type Meaning<br />

IN enable BOOL This function is only executed if enable is TRUE.<br />

IN VCHandle UDINT The address of a VCHandle. This is necessary for all further VISAPI operations.<br />

IN interpreter STRING[80]<br />

OUT Return<br />

Value<br />

The name of the project runnning must be specified here.<br />

UINT A value other than 0 is returned if error occurs.<br />

3.3.8.29.2 Example for Automation Basic<br />

This function couldn't be uses with Automation Basic.<br />

('Visu' is the name of the panel object)<br />

3.3.8.29.3 Example for C Programming<br />

#include <br />

#include <br />

#include <br />

UINT _GLOBAL ready;<br />

unsigned long VC_HANDLE;<br />

_CYCLIC void Cyclic(void)<br />

{<br />

if (!ready)<br />

{<br />

VC_HANDLE = VA_SetupX(1 ,&VC_HANDLE "Visu");<br />

if (VC_HANDLE)<br />

ready = 1;<br />

}<br />

}<br />

3.3.8.30 Manual Project Control − VA_SetUserParam<br />

The VA_SetUserParam function can be used to change individual driver parameters during runtime for devices<br />

used by <strong>Visual</strong> <strong>Components</strong> (displays, panel keys, touch, etc.).<br />

3.3.8.29 Requirements and Initialization − VA_SetupX 165


This is not required for normal <strong>Visual</strong> <strong>Components</strong> operation and should only be done in conjunction with your<br />

relevant B&R support contact or application technician. The necessary parameters, along with their values, are<br />

listed here in case they are needed.<br />

3.3.8.30.1 Parameter<br />

I/O Parameter Type Meaning<br />

IN enable BOOL This function is only executed if enable is TRUE.<br />

IN VCHandle UDINT The handle returned by VA_Setup.<br />

IN Type USINT<br />

IN Parameter UDINT New parameter string<br />

Type of driver whose parameters should be changed<br />

1 Display driver<br />

2 Key driver<br />

4 Touch driver<br />

OUT Return Value UINT Not equal to 0 if error occurs<br />

The project may not be run while changing driver parameters. The correct sequence for changing driver<br />

parameters is as follows:<br />

• Stop the project with VA_StopProject<br />

• Change the driver parameter(s) with VA_SetUserParam<br />

• Start the project with VA_StartProject<br />

3.3.8.31 Shutdown − VA_Shutdown<br />

This function is no longer used in the current version of the Visapi library (V2.3), but wasn't removed from the<br />

library itself for compatibility reasons. We recommend not using this function anymore in new projects.<br />

The VA_Shutdown function should only be executed before a project is started.<br />

3.3.8.31.1 Parameter<br />

I/O Parameter Type Meaning<br />

IN enable BOOL This function is only executed if enable is TRUE.<br />

IN VCHandle UDINT The handle returned by VA_Setup<br />

OUT Return Value UINT Not equal to 0 if error occurs<br />

3.3.8.32 Requirements and Initialization − VA_Srelease<br />

The VA_Srelease function must always be called at the end of a VISAPI function in a cyclic task. Otherwise, no<br />

more VA_Saccess functions can be called.<br />

3.3.8.32.1 Parameter<br />

I/O Parameter Type Meaning<br />

IN enable BOOL This function is only executed if enable is TRUE.<br />

IN VCHandle UDINT The handle returned by VA_Setup<br />

OUT Return Value UINT Not equal to 0 if error occurs<br />

3.3.8.32.2 Example for Automation Basic<br />

(* cyclic program *)<br />

if ready 1 then<br />

VC_HANDLE = VA_Setup(1 "vga") ,<br />

VC_HANDLE if 0 then<br />

ready = 1<br />

endif<br />

endif<br />

if ready = 1 then<br />

if VA_Saccess(1,VC_HANDLE)= 0 then<br />

VA_Srelease(1,VC_HANDLE)<br />

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

166 3.3.8.30 Manual Project Control − VA_SetUserParam


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

endif<br />

endif<br />

3.3.8.32.3 Example for C Programming<br />

#include <br />

#include <br />

#include <br />

UINT _GLOBAL ready;<br />

unsigned long VC_HANDLE;<br />

_CYCLIC void Cyclic(void)<br />

{<br />

if (!ready)<br />

{<br />

VC_HANDLE = VA_Setup(1 "vga"); ,<br />

if (VC_HANDLE)<br />

ready = 1;<br />

}<br />

if (ready)<br />

{<br />

if (!VA_Saccess(1,VC_HANDLE))<br />

{<br />

VA_Srelease(1,VC_HANDLE);<br />

}<br />

}<br />

}<br />

3.3.8.33 Manual Project Control − VA_StartProject<br />

A stopped project can be started again with the VA_StartProject command.<br />

A project can be stopped from the PLC program by the VA_StopProject function, or the 'Manual Project Start'<br />

option could have been transferred. Starting a project manually allows driver parameters to be changed with<br />

VA_SetUserParam, as well as other preparatory measures like variable initialization.<br />

Using this, it is also possible to determine exactly when the visualization project is started. This can guarantee<br />

that the machine can be operated immediately. In other words, the PLC program is finished initializing as soon<br />

as the visualization application appears.<br />

3.3.8.33.1 Parameter<br />

I/O Parameter Type Meaning<br />

IN enable BOOL This function is only executed if enable is TRUE.<br />

IN VCHandle UDINT The handle returned by VA_Setup.<br />

OUT Return Value UINT Not equal to 0 if error occurs<br />

Warning:<br />

VA_Saccess cannot be called before the VA_StartProject function.<br />

3.3.8.33.2 Example for Automation Basic<br />

(* init program *)<br />

ready = 0<br />

(* cyclic program *)<br />

IF ready 1 THEN<br />

VC_HANDLE = VA_Setup(1 "vga") ,<br />

IF VC_HANDLE 0 THEN<br />

ready = 1<br />

ENDIF<br />

ENDIF<br />

IF ready = 1 THEN<br />

3.3.8.32 Requirements and Initialization − VA_Srelease 167


CASE selection OF<br />

ACTION 1:<br />

ENDACTION<br />

Status = VA_StopProject(1,VC_HANDLE)<br />

ACTION 2:<br />

AccessStatus = VA_Saccess(1,VC_HANDLE)<br />

IF AccessStatus = 0 THEN<br />

VA_Line(1,VC_HANDLE, 10,10,100,100,1)<br />

VA_Srelease(1,VC_HANDLE)<br />

ENDIF<br />

ENDACTION<br />

ACTION 3:<br />

ENDACTION<br />

ELSEACTION :<br />

ENDACTION<br />

ENDCASE<br />

ENDIF<br />

selection = 0<br />

3.3.8.33.3 Example for C Programming<br />

#include <br />

#include <br />

#include <br />

_GLOBAL UINT ready;<br />

_GLOBAL USINT Type;<br />

_GLOBAL UINT selection;<br />

_GLOBAL UDINT Status;<br />

_GLOBAL UDINT VC_HANDLE;<br />

_GLOBAL UDINT AccessStatus;<br />

_INIT void InitSp(void)<br />

{<br />

ready=0;<br />

selection=0;<br />

}<br />

_CYCLIC void Cyclic(void)<br />

{<br />

if (!ready)<br />

{<br />

VC_HANDLE = VA_Setup(1 , "vga");<br />

if (VC_HANDLE)<br />

ready = 1;<br />

}<br />

if (ready)<br />

{<br />

switch(selection)<br />

Status = VA_StartProject(1,VC_HANDLE)<br />

{<br />

case 1:Status=VA_StopProject(1,VC_HANDLE);break; /* Project is stopped */<br />

case 2: AccessStatus=VA_Saccess(1,VC_HANDLE);<br />

if (AccessStatus==0)<br />

{<br />

VA_Line(1,VC_HANDLE,10,10,100,100,1);<br />

VA_Srelease(1,VC_HANDLE);<br />

}<br />

break;<br />

case 3:Status=VA_StartProject(1,VC_HANDLE);break; /* Project is started */<br />

default: break;<br />

}<br />

selection = 0;<br />

}<br />

}<br />

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

168 3.3.8.33 Manual Project Control − VA_StartProject


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

3.3.8.34 Touch Screen Calibration − VA_StartTouchCal<br />

The VA_StartTouchCal function provides touch calibration since different tolerances arise when touch screens<br />

are manufactured.<br />

3.3.8.34.1 Operation<br />

Touch the crosses in the order that they appear on the screen.<br />

This function only needs to be called once.<br />

The status can also be queried with the VA_GetCalStatus function.<br />

3.3.8.34.2 Parameter<br />

I/O Parameter Type Meaning<br />

IN enable BOOL This function is only executed if enable is TRUE.<br />

IN VCHandle UDINT The handle returned by VA_Setup.<br />

OUT Return Value UINT Not equal to 0 if error occurs<br />

3.3.8.34.3 Example for Automation Basic<br />

(* cyclic program *)<br />

if ready 1 then<br />

VC_HANDLE = VA_Setup(1 "vga") ,<br />

if VC_HANDLE 0 then<br />

ready = 1<br />

endif<br />

endif<br />

if ready = 1 then<br />

if VA_Saccess(1,VC_HANDLE)= 0 then<br />

VA_StartTouchCal (1,VC_HANDLE)<br />

VA_Srelease(1,VC_HANDLE)<br />

endif<br />

endif<br />

3.3.8.34.4 Example for C Programming<br />

#include <br />

#include <br />

#include <br />

UINT _GLOBAL ready;<br />

unsigned long VC_HANDLE;<br />

_CYCLIC void Initialization (void)<br />

{<br />

if (!ready)<br />

{<br />

VC_HANDLE = VA_Setup(1 "vga"); ,<br />

if (VC_HANDLE)<br />

ready = 1;<br />

}<br />

if (ready)<br />

{<br />

if (!VA_Saccess(1,VC_HANDLE))<br />

{<br />

VA_StartTouchCal (1,VC_HANDLE);<br />

VA_Srelease(1,VC_HANDLE);<br />

}<br />

}<br />

}<br />

3.3.8.35 Manual Project Control − VA_StopProject<br />

A project can be halted with the VA_StopProject function. This seldom needs to be done unless parameters<br />

need to be changed for used drivers with the VA_SetUserParam function, for example.<br />

3.3.8.34 Touch Screen Calibration − VA_StartTouchCal 169


3.3.8.35.1 Parameter<br />

I/O Parameter Type Meaning<br />

IN enable BOOL This function is only executed if enable is TRUE.<br />

IN VCHandle UDINT The handle returned by VA_Setup.<br />

OUT Return Value UINT Not equal to 0 if error occurs<br />

Warning:<br />

VA_Saccess cannot be called before the VA_StopProject function.<br />

3.3.8.35.2 Example for Automation Basic<br />

(* init program *)<br />

ready = 0<br />

(* cyclic program *)<br />

IF ready 1 THEN<br />

VC_HANDLE = VA_Setup(1 "vga") ,<br />

IF VC_HANDLE 0 THEN<br />

ready = 1<br />

ENDIF<br />

ENDIF<br />

IF ready = 1 THEN<br />

CASE selection OF<br />

ACTION 1:<br />

ENDACTION<br />

Status = VA_StopProject(1,VC_HANDLE)<br />

ACTION 2:<br />

AccessStatus = VA_Saccess(1,VC_HANDLE)<br />

IF AccessStatus = 0 THEN<br />

VA_Line(1,VC_HANDLE, 10,10,100,100,1)<br />

VA_Srelease(1,VC_HANDLE)<br />

ENDIF<br />

ENDACTION<br />

ACTION 3:<br />

ENDACTION<br />

ELSEACTION :<br />

ENDACTION<br />

ENDCASE<br />

ENDIF<br />

selection = 0<br />

3.3.8.35.3 Example for C Programming<br />

#include <br />

#include <br />

#include <br />

_GLOBAL UINT ready;<br />

_GLOBAL USINT Type;<br />

_GLOBAL UINT selection;<br />

_GLOBAL UDINT Status;<br />

_GLOBAL UDINT VC_HANDLE;<br />

_GLOBAL UDINT AccessStatus;<br />

_INIT void InitSp(void)<br />

{<br />

ready=0;<br />

selection=0;<br />

}<br />

_CYCLIC void Cyclic(void)<br />

{<br />

Status = VA_StartProject(1,VC_HANDLE)<br />

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

170 3.3.8.35 Manual Project Control − VA_StopProject


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

if (!ready)<br />

{<br />

VC_HANDLE = VA_Setup(1 , "vga");<br />

if (VC_HANDLE)<br />

ready = 1;<br />

}<br />

if (ready)<br />

{<br />

switch(selection)<br />

{<br />

case 1:Status=VA_StopProject(1,VC_HANDLE);break; /* Project is stopped */<br />

case 2: AccessStatus=VA_Saccess(1,VC_HANDLE);<br />

if (AccessStatus==0)<br />

{<br />

VA_Line(1,VC_HANDLE,10,10,100,100,1);<br />

VA_Srelease(1,VC_HANDLE);<br />

}<br />

break;<br />

case 3:Status=VA_StartProject(1,VC_HANDLE);break; /* Project is started */<br />

default: break;<br />

}<br />

selection = 0;<br />

}<br />

}<br />

3.3.8.36 Graphics and Text Output − VA_Textout<br />

Writes a text on the screen.<br />

The text is placed at the x and y coordinates. (For graphic displays, these are in pixels. For text displays, the<br />

coordinates refer to the current character size). The background color can be changed with the bC variable, and<br />

the foreground color with the fC variable. If '......' appears on the display, then the font index is invalid.<br />

PP41: The foreground (fC) and background (bC) can only be 0, 1, or 255.<br />

3.3.8.36.1 Parameter<br />

I/O Parameter Type Meaning<br />

IN enable BOOL This function is only executed if enable is TRUE.<br />

IN VCHandle UDINT The handle returned by VA_Setup.<br />

IN font_index UINT<br />

Index of the font to be used<br />

IN x/y UINT Upper left corner of the text<br />

IN fC USINT Foreground color of the text<br />

IN bC USINT Background color of the text<br />

IN str STRING[80] Text to be output<br />

OUT Return<br />

Value<br />

The font index corresponds to the font number used in the VC editor (beginning<br />

with 0).<br />

UINT Not equal to 0 if error occurs<br />

3.3.8.36 Graphics and Text Output − VA_Textout 171


3.3.8.36.2 Example for Automation Basic<br />

(* cyclic program *)<br />

if ready 1 then<br />

VC_HANDLE = VA_Setup(1 "vga") ,<br />

VC_HANDLE if 0 then<br />

ready = 1<br />

endif<br />

endif<br />

if ready = 1 then<br />

VA_Saccess(1,VC_HANDLE)= if<br />

0 then<br />

endif<br />

VA_Textout (1,VC_HANDLE,1,100,100,0,1,<br />

"HELLO")<br />

VA_Srelease(1,VC_HANDLE)<br />

endif<br />

3.3.8.36.3 Example for C Programming<br />

#include <br />

#include <br />

#include <br />

UINT _GLOBAL ready;<br />

unsigned long VC_HANDLE;<br />

_CYCLIC void Cyclic(void)<br />

{<br />

if (!ready)<br />

{<br />

VC_HANDLE = VA_Setup(1 "vga"); ,<br />

if (VC_HANDLE)<br />

ready = 1;<br />

}<br />

if (ready)<br />

{<br />

if (!VA_Saccess(1,VC_HANDLE))<br />

{<br />

VA_Textout (1,VC_HANDLE,1,100,100,0,1,<br />

"HELLO");<br />

VA_Srelease(1,VC_HANDLE);<br />

}<br />

}<br />

}<br />

3.3.9 Color Table − VISAPI<br />

3.3.9.1 Color Palette for IPC Color Displays<br />

Reserved Colors: 255 − can be used for transparent effect<br />

Index Preview RGB Index Preview RGB Index Preview RGB Index Preview RGB<br />

0 000 000 000 60<br />

1 000 000 170 61<br />

2 000 170 000 62<br />

3 000 170 170 63<br />

4 170 000 000 64<br />

5 170 000 170 65<br />

6 150 120 015 66<br />

7 170 170 170 67<br />

8 127 127 127 68<br />

9 110 110 197 69<br />

CC99CC<br />

204 153 204<br />

CC66CC<br />

204 102 204<br />

CC33CC<br />

204 51 204<br />

CC00CC<br />

204 00 204<br />

CCFF99<br />

204 255 153<br />

CCCC99<br />

204 204 153<br />

CC9999<br />

204 153 153<br />

CC6699<br />

204 102 153<br />

CC3399<br />

204 51 153<br />

CC0099<br />

204 00 153<br />

120<br />

121<br />

122<br />

123<br />

124<br />

125<br />

126<br />

127<br />

128<br />

129<br />

999900<br />

153 153 00<br />

996600<br />

153 102 00<br />

993300<br />

153 51 00<br />

990000<br />

153 00 00<br />

66FFFF<br />

102 255 255<br />

66CCFF<br />

102 204 255<br />

6699FF<br />

102 153 255<br />

6666FF<br />

102 102 255<br />

6633FF<br />

102 51 255<br />

6600FF<br />

102 00 255<br />

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

180<br />

181<br />

182<br />

183<br />

184<br />

185<br />

186<br />

187<br />

188<br />

189<br />

339966<br />

51 153 102<br />

336666<br />

51 102 102<br />

333366<br />

51 51 102<br />

330066<br />

51 00 102<br />

33FF33<br />

51 255 51<br />

33CC33<br />

51 204 51<br />

339933<br />

51 153 51<br />

336633<br />

51 102 51<br />

333333<br />

51 51 51<br />

330033<br />

51 00 51<br />

172 3.3.8.36 Graphics and Text Output − VA_Textout


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

10 000 255 005 70<br />

11 000 170 255 71<br />

12 170 000 085 72<br />

13 17000 0 255 73<br />

14 240 240 095 74<br />

15 255 255 255 75<br />

16<br />

17<br />

18<br />

19<br />

20<br />

21<br />

22<br />

23<br />

24<br />

25<br />

26<br />

27<br />

28<br />

29<br />

30<br />

31<br />

32<br />

33<br />

34<br />

35<br />

36<br />

37<br />

38<br />

39<br />

40<br />

41<br />

42<br />

43<br />

44<br />

45<br />

46<br />

47<br />

FFFFFF<br />

255 255 255<br />

FFCCFF<br />

255 204 255<br />

FF99FF<br />

255 153 255<br />

FF66FF<br />

255 102 255<br />

FF33FF<br />

255 51 255<br />

FF00FF<br />

255 00 255<br />

FFFFCC<br />

255 255 204<br />

FFCCCC<br />

255 204 204<br />

FF99CC<br />

255 153 204<br />

FF66CC<br />

255 102 204<br />

FF33CC<br />

255 51 204<br />

FF00CC<br />

255 00 204<br />

FFFF99<br />

255 255 153<br />

FFCC99<br />

255 204 153<br />

FF9999<br />

255 153 153<br />

FF6699<br />

255 102 153<br />

FF3399<br />

255 51 153<br />

FF0099<br />

255 00 153<br />

FFFF66<br />

255 255 102<br />

FFCC66<br />

255 204 102<br />

FF9966<br />

255 153 102<br />

FF6666<br />

255 102 102<br />

FF3366<br />

255 51 102<br />

FF0066<br />

255 00 102<br />

FFFF33<br />

255 255 51<br />

FFCC33<br />

255 204 51<br />

FF9933<br />

255 153 51<br />

FF6633<br />

255 102 51<br />

FF3333<br />

255 51 51<br />

FF0033<br />

255 00 51<br />

FFFF00<br />

255 255 00<br />

FFCC00<br />

255 204 00<br />

76<br />

77<br />

78<br />

79<br />

80<br />

81<br />

82<br />

83<br />

84<br />

85<br />

86<br />

87<br />

88<br />

89<br />

90<br />

91<br />

92<br />

93<br />

94<br />

95<br />

96<br />

97<br />

98<br />

99<br />

100<br />

101<br />

102<br />

103<br />

104<br />

105<br />

106<br />

107<br />

CCFF66<br />

204 255 102<br />

CCCC66<br />

204 204 102<br />

CC9966<br />

204 153 102<br />

CC6666<br />

204 102 102<br />

CC3366<br />

204 51 102<br />

CC0066<br />

204 00 102<br />

CCFF33<br />

204 255 51<br />

CCCC33<br />

204 204 51<br />

CC9933<br />

204 153 51<br />

CC6633<br />

204 102 51<br />

CC3333<br />

204 51 51<br />

CC0033<br />

204 00 51<br />

CCFF00<br />

204 255 00<br />

CCCC00<br />

204 204 00<br />

CC9900<br />

204 153 00<br />

CC6600<br />

204 102 00<br />

CC3300<br />

204 51 00<br />

CC0000<br />

204 00 00<br />

99FFFF<br />

153 255 255<br />

99CCFF<br />

153 204 255<br />

9999FF<br />

153 153 255<br />

9966FF<br />

153 102 255<br />

9933FF<br />

153 51 255<br />

9900FF<br />

153 00 255<br />

99FFCC<br />

153 255 204<br />

99CCCC<br />

153 204 204<br />

9999CC<br />

153 153 204<br />

9966CC<br />

153 102 204<br />

9933CC<br />

153 51 204<br />

9900CC<br />

153 00 204<br />

99FF99<br />

153 255 153<br />

99CC99<br />

153 204 153<br />

999999<br />

153 153 153<br />

996699<br />

153 102 153<br />

9933999<br />

153 51 153<br />

990099<br />

153 00 153<br />

99FF66<br />

153 255 102<br />

99CC66<br />

153 204 102<br />

130<br />

131<br />

132<br />

133<br />

134<br />

135<br />

136<br />

137<br />

138<br />

139<br />

140<br />

141<br />

142<br />

143<br />

144<br />

145<br />

146<br />

147<br />

148<br />

149<br />

150<br />

151<br />

152<br />

153<br />

154<br />

155<br />

156<br />

157<br />

158<br />

159<br />

160<br />

161<br />

162<br />

163<br />

164<br />

165<br />

166<br />

167<br />

66FFCC<br />

102 255 204<br />

66CCCC<br />

102 204 204<br />

6699CC<br />

102 153 204<br />

6666CC<br />

102 102 204<br />

6633CC<br />

102 51 204<br />

6600CC<br />

102 00 204<br />

66FF99<br />

102 255 153<br />

66CC99<br />

102 204 153<br />

669999<br />

102 153 153<br />

666699<br />

102 102 153<br />

663399<br />

102 51 153<br />

660099<br />

102 00 153<br />

66FF66<br />

102 255 102<br />

66CC66<br />

102 204 102<br />

669966<br />

102 153 102<br />

666666<br />

102 102 102<br />

663366<br />

102 51 102<br />

660099<br />

102 00 153<br />

66FF33<br />

102 255 51<br />

66CC33<br />

102 204 51<br />

669933<br />

102 153 51<br />

666633<br />

102 102 51<br />

663333<br />

102 51 51<br />

660033<br />

102 00 51<br />

66FF00<br />

102 255 00<br />

66CC00<br />

102 204 00<br />

669900<br />

102 153 00<br />

666600<br />

102 102 00<br />

663300<br />

102 51 00<br />

660000<br />

102 00 00<br />

33FFFF<br />

51 255 255<br />

33CCFF<br />

51 204 255<br />

3399FF<br />

51 153 255<br />

3366FF<br />

51 102 255<br />

3333FF<br />

51 51 255<br />

3300FF<br />

51 00 255<br />

33FFCC<br />

51 255 204<br />

33CCCC<br />

51 204 204<br />

190<br />

191<br />

192<br />

193<br />

194<br />

195<br />

196<br />

197<br />

198<br />

199<br />

200<br />

201<br />

202<br />

203<br />

204<br />

205<br />

206<br />

207<br />

208<br />

209<br />

210<br />

211<br />

212<br />

213<br />

214<br />

215<br />

216<br />

217<br />

218<br />

219<br />

220<br />

221<br />

222<br />

223<br />

224<br />

225<br />

226<br />

227<br />

33FF00<br />

51 255 00<br />

33CC00<br />

51 204 00<br />

339900<br />

51 153 00<br />

336600<br />

51 102 00<br />

333300<br />

51 51 00<br />

330000<br />

51 00 00<br />

00FFFF<br />

00 255 255<br />

00CCFF<br />

00 204 255<br />

0099FF<br />

00 153 255<br />

0066FF<br />

00 102 255<br />

0033FF<br />

00 51 255<br />

0000FF<br />

00 00 255<br />

00FFCC<br />

00 255 204<br />

00CCFF<br />

00 204 255<br />

0099CC<br />

00 153 204<br />

0066CC<br />

00 102 204<br />

0033CC<br />

00 51 204<br />

0000CC<br />

00 00 204<br />

00FF99<br />

00 255 153<br />

00CC99<br />

00 204 153<br />

009999<br />

00 153 153<br />

006699<br />

00 102 153<br />

003399<br />

00 51 153<br />

000099<br />

00 00 153<br />

00FF66<br />

00 255 102<br />

00CC66<br />

00 204 102<br />

009966<br />

00 153 102<br />

006666<br />

00 102 102<br />

003366<br />

00 51 102<br />

000066<br />

00 00 102<br />

00FF33<br />

00 255 51<br />

00CC33<br />

00 255 51<br />

009933<br />

00 153 51<br />

006633<br />

00 102 51<br />

003333<br />

00 51 51<br />

000033<br />

00 00 51<br />

00FF00<br />

00 255 00<br />

00CC00<br />

00 204 00<br />

3.3.8.36 Graphics and Text Output − VA_Textout 173


48<br />

49<br />

50<br />

51<br />

52<br />

53<br />

54<br />

55<br />

56<br />

57<br />

58<br />

59<br />

60<br />

FF9900<br />

255 153 00<br />

FF6600<br />

255 102 00<br />

FF3300<br />

255 51 00<br />

FF0000<br />

255 00 00<br />

CCFFFF<br />

204 255 255<br />

CCCCFF<br />

204 204 255<br />

CC99FF<br />

204 153 255<br />

CC66FF<br />

204 102 255<br />

CC33FF<br />

204 51 255<br />

CC00FF<br />

204 00 255<br />

CCFFCC<br />

204 255 204<br />

CCCCCC<br />

204 204 204<br />

CC99CC<br />

204 153 204<br />

108<br />

109<br />

110<br />

111<br />

112<br />

113<br />

114<br />

115<br />

116<br />

117<br />

118<br />

119<br />

120<br />

999966<br />

153 153 102<br />

996666<br />

153 102 102<br />

993366<br />

153 51 102<br />

990066<br />

153 00 102<br />

99FF33<br />

153 255 51<br />

99CC33<br />

153 204 51<br />

999933<br />

153 153 51<br />

996633<br />

153 102 51<br />

993333<br />

153 51 51<br />

990033<br />

153 00 51<br />

99FF00<br />

153 255 00<br />

99CC00<br />

153 204 00<br />

999900<br />

153 153 00<br />

168<br />

169<br />

170<br />

171<br />

172<br />

173<br />

174<br />

175<br />

176<br />

177<br />

178<br />

179<br />

180<br />

3399CC<br />

51 153 204<br />

3366CC<br />

51 102 204<br />

3333CC<br />

51 51 204<br />

3300CC<br />

51 00 204<br />

33FF99<br />

51 255 153<br />

33CC99<br />

51 204 153<br />

339999<br />

51 153 153<br />

336699<br />

51 102 153<br />

333399<br />

51 51 153<br />

330099<br />

51 00 153<br />

33FF66<br />

51 255 102<br />

33CC66<br />

51 204 102<br />

339966<br />

51 153 102<br />

228<br />

229<br />

230<br />

231<br />

.....<br />

.....<br />

.....<br />

.....<br />

.....<br />

.....<br />

.....<br />

254<br />

255<br />

TRANS−<br />

PARENT<br />

Note:<br />

This is the standard color palette for VGA displays. If this palette is replaced by a user−defined palette, then<br />

naturally that one applies!<br />

3.3.9.2 Color Palette for SG3 Black/White Displays<br />

Reserved Colors: none<br />

Index Preview RGB<br />

1 000 000 000<br />

0 255 255 255<br />

3.3.10 Error Codes − VISAPI<br />

3.3.10.1 Error Codes<br />

Code Meaning Occurs when...<br />

100 VISAPI not initialized<br />

3004 VA_Textout font not present<br />

7000<br />

Drawing currently in progress<br />

(BUSY)<br />

7010 No project found<br />

7030 No project found<br />

7090 Invalid parameter<br />

Everything else<br />

Invalid parameters in individual<br />

functions (more exact error code)<br />

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

Occurs when a VISAPI function is called before<br />

VA_Setup(....) is called.<br />

Occurs when a font index which isn't used at<br />

runtime is specified.<br />

Occurs with the VA_Saccess function when no<br />

access to the display is currently possible.<br />

Attempted again in the next cycle.<br />

Project name specified with VA_Setup(...) is<br />

incorrect<br />

Project name specified with VA_Setup(...) is<br />

incorrect<br />

i.e. negative coordinates in drawing command,<br />

invalid pointer, etc.<br />

i.e. negative coordinates in drawing command,<br />

invalid pointer, etc.<br />

009900<br />

00 153 00<br />

006600<br />

00 102 00<br />

003300<br />

00 51 00<br />

000000<br />

00 00 00<br />

000000<br />

00 00 00<br />

000000<br />

00 00 00<br />

000000<br />

00 00 00<br />

000000<br />

00 00 00<br />

000000<br />

00 00 00<br />

000000<br />

00 00 00<br />

000000<br />

00 00 00<br />

000000<br />

00 00 00<br />

TRANS−<br />

PARENT<br />

174 3.3.9.2 Color Palette for SG3 Black/White DisplaysReserved Colors: none


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

3.4 Supported Hardware − Reference<br />

This section contains information about hardware supported by <strong>Visual</strong> <strong>Components</strong>.<br />

3.4.1 Key Matrix<br />

The following is a list of references to the respective key matrices classifications for all supported operator<br />

panels which are equipped with panel keys. For the sake of completeness, there is also an image for all other<br />

panels.<br />

3.4.1.1 Operator Panels for the CAN Controller C130<br />

Panel 4B1270.00−490<br />

Panel 4D1164.00−590<br />

Panel 4D1165.00−490<br />

Panel 4D1166.00−490<br />

Panel 4D1167.00−490<br />

3.4.1.2 PowerPanel Controllers<br />

Panel 4P0420.00−490<br />

Panel 4P3040.00−490<br />

3.4.1.3 Operator Panels for the IPC2001 Family<br />

Panel 5D2000.02<br />

Panel 5D2210.01<br />

Panel 5D2210.01C (Compact IPC2002)<br />

Panel 5D2219.01<br />

Panel 5D2219.02<br />

Panel 5D2510.01<br />

Panel 5D2510.10<br />

Panel 5D2510.22<br />

Panel 5D2519.01<br />

Panel 5D2519.02<br />

3.4.1.4 Operator Panels for the IPC5000 Family<br />

Panel 5D5210.01<br />

Panel 5D5211.02<br />

Panel 5D5211.03<br />

Panel 5D5212.02<br />

Panel 5D5212.04<br />

Panel 5D5500.10<br />

Panel 5D5501.01<br />

Panel 5D5510.10<br />

Panel 5D5600.01<br />

Panel 5D5600.02<br />

Panel 5D5600.03<br />

Panel 5D5601.01<br />

Panel 5D5601.02<br />

Panel 5D5601.03<br />

3.4.2 Key Matrix − Panel 4B1270.00−490<br />

The numbers in the picture specify the index of the corresponding key in the key matrix.<br />

For keys with LED, the number also specifies the index of the corresponding LED in the LED matrix.<br />

3.4 Supported Hardware − Reference 175


3.4.3 Key Matrix − Panel 4D1164.00−590<br />

The numbers in the picture specify the index of the corresponding key in the key matrix.<br />

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

For keys with LED, the number also specifies the index of the corresponding LED in the LED matrix.<br />

176 3.4.3 Key Matrix − Panel 4D1164.00−590


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

3.4.4 Key Matrix − Panel 4D1165.00−490<br />

The numbers in the picture specify the index of the corresponding key in the key matrix.<br />

For keys with LED, the number also specifies the index of the corresponding LED in the LED matrix.<br />

3.4.4 Key Matrix − Panel 4D1165.00−490 177


3.4.5 Key Matrix − Panel 4D1166.00−490<br />

The numbers in the picture specify the index of the corresponding key in the key matrix.<br />

For keys with LED, the number also specifies the index of the corresponding LED in the LED matrix.<br />

3.4.6 Key Matrix − Panel 4D1167.00−490<br />

The numbers in the picture specify the index of the corresponding key in the key matrix.<br />

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

For keys with LED, the number also specifies the index of the corresponding LED in the LED matrix.<br />

178 3.4.5 Key Matrix − Panel 4D1166.00−490


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

3.4.7 Key Matrix − Panel 4P0420.00−490<br />

The numbers in the picture specify the index of the corresponding key in the key matrix.<br />

For keys with LED, the number also specifies the index of the corresponding LED in the LED matrix.<br />

3.4.7 Key Matrix − Panel 4P0420.00−490 179


3.4.8 Key Matrix − Panel 4P3040.00−490<br />

The numbers in the picture specify the index of the corresponding key in the key matrix.<br />

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

For keys with LED, the number also specifies the index of the corresponding LED in the LED matrix.<br />

180 3.4.8 Key Matrix − Panel 4P3040.00−490


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

3.4.9 Key Matrix − Panel 5D2000.02<br />

The numbers in the picture specify the index of the corresponding key in the key matrix.<br />

For keys with LED, the number also specifies the index of the corresponding LED in the LED matrix.<br />

3.4.9 Key Matrix − Panel 5D2000.02 181


3.4.10 Key Matrix − Panel 5D2210.01<br />

The numbers in the picture specify the index of the corresponding key in the key matrix.<br />

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

For keys with LED, the number also specifies the index of the corresponding LED in the LED matrix.<br />

182 3.4.10 Key Matrix − Panel 5D2210.01


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

3.4.11 Key Matrix − Panel 5D2210.01C (Compact IPC2001)<br />

The numbers in the picture specify the index of the corresponding key in the key matrix.<br />

For keys with LED, the number also specifies the index of the corresponding LED in the LED matrix.<br />

3.4.11 Key Matrix − Panel 5D2210.01C (Compact IPC2001) 183


3.4.12 Key Matrix − Panel 5D2219.01<br />

The numbers in the picture specify the index of the corresponding key in the key matrix.<br />

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

For keys with LED, the number also specifies the index of the corresponding LED in the LED matrix.<br />

184 3.4.12 Key Matrix − Panel 5D2219.01


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

3.4.13 Key Matrix − Panel 5D2219.02<br />

The numbers in the picture specify the index of the corresponding key in the key matrix.<br />

For keys with LED, the number also specifies the index of the corresponding LED in the LED matrix.<br />

3.4.13 Key Matrix − Panel 5D2219.02 185


3.4.14 Key Matrix − Panel 5D2500.01<br />

The numbers in the picture specify the index of the corresponding key in the key matrix.<br />

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

For keys with LED, the number also specifies the index of the corresponding LED in the LED matrix.<br />

186 3.4.14 Key Matrix − Panel 5D2500.01


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

3.4.15 Key Matrix − Panel 5D2500.02<br />

The numbers in the picture specify the index of the corresponding key in the key matrix.<br />

For keys with LED, the number also specifies the index of the corresponding LED in the LED matrix.<br />

3.4.15 Key Matrix − Panel 5D2500.02 187


3.4.16 Key Matrix − Panel 5D2500.10<br />

The numbers in the picture specify the index of the corresponding key in the key matrix.<br />

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

For keys with LED, the number also specifies the index of the corresponding LED in the LED matrix.<br />

188 3.4.16 Key Matrix − Panel 5D2500.10


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

3.4.17 Key Matrix − Panel 5D2500.22<br />

The numbers in the picture specify the index of the corresponding key in the key matrix.<br />

For keys with LED, the number also specifies the index of the corresponding LED in the LED matrix.<br />

3.4.17 Key Matrix − Panel 5D2500.22 189


3.4.18 Key Matrix − Panel 5D2510.01<br />

The numbers in the picture specify the index of the corresponding key in the key matrix.<br />

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

For keys with LED, the number also specifies the index of the corresponding LED in the LED matrix.<br />

190 3.4.18 Key Matrix − Panel 5D2510.01


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

3.4.19 Key Matrix − Panel 5D2510.10<br />

The numbers in the picture specify the index of the corresponding key in the key matrix.<br />

For keys with LED, the number also specifies the index of the corresponding LED in the LED matrix.<br />

3.4.19 Key Matrix − Panel 5D2510.10 191


3.4.20 Key Matrix − Panel 5D2510.22<br />

The numbers in the picture specify the index of the corresponding key in the key matrix.<br />

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

For keys with LED, the number also specifies the index of the corresponding LED in the LED matrix.<br />

192 3.4.20 Key Matrix − Panel 5D2510.22


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

3.4.21 Key Matrix − Panel 5D2519.01<br />

The numbers in the picture specify the index of the corresponding key in the key matrix.<br />

For keys with LED, the number also specifies the index of the corresponding LED in the LED matrix.<br />

3.4.21 Key Matrix − Panel 5D2519.01 193


3.4.22 Key Matrix − Panel 5D2519.02<br />

The numbers in the picture specify the index of the corresponding key in the key matrix.<br />

For keys with LED, the number also specifies the index of the corresponding LED in the LED matrix.<br />

3.4.23 Key Matrix − Panel 5D5210.01<br />

The numbers in the picture specify the index of the corresponding key in the key matrix.<br />

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

For keys with LED, the number also specifies the index of the corresponding LED in the LED matrix.<br />

194 3.4.22 Key Matrix − Panel 5D2519.02


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

3.4.24 Key Matrix − Panel 5D5211.02<br />

The numbers in the picture specify the index of the corresponding key in the key matrix.<br />

For keys with LED, the number also specifies the index of the corresponding LED in the LED matrix.<br />

3.4.24 Key Matrix − Panel 5D5211.02 195


3.4.25 Key Matrix − Panel 5D5211.03<br />

The numbers in the picture specify the index of the corresponding key in the key matrix.<br />

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

For keys with LED, the number also specifies the index of the corresponding LED in the LED matrix.<br />

196 3.4.25 Key Matrix − Panel 5D5211.03


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

3.4.26 Key Matrix − Panel 5D5212.02<br />

The numbers in the picture specify the index of the corresponding key in the key matrix.<br />

For keys with LED, the number also specifies the index of the corresponding LED in the LED matrix.<br />

3.4.26 Key Matrix − Panel 5D5212.02 197


3.4.27 Key Matrix − Panel 5D5212.04<br />

The numbers in the picture specify the index of the corresponding key in the key matrix.<br />

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

For keys with LED, the number also specifies the index of the corresponding LED in the LED matrix.<br />

198 3.4.27 Key Matrix − Panel 5D5212.04


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

3.4.28 Key Matrix − Panel 5D5500.10<br />

The numbers in the picture specify the index of the corresponding key in the key matrix.<br />

For keys with LED, the number also specifies the index of the corresponding LED in the LED matrix.<br />

3.4.28 Key Matrix − Panel 5D5500.10 199


3.4.29 Key Matrix − Panel 5D5501.01<br />

The numbers in the picture specify the index of the corresponding key in the key matrix.<br />

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

For keys with LED, the number also specifies the index of the corresponding LED in the LED matrix.<br />

200 3.4.29 Key Matrix − Panel 5D5501.01


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

3.4.30 Key Matrix − Panel 5D5510.10<br />

The numbers in the picture specify the index of the corresponding key in the key matrix.<br />

For keys with LED, the number also specifies the index of the corresponding LED in the LED matrix.<br />

3.4.30 Key Matrix − Panel 5D5510.10 201


3.4.31 Key Matrix − Panel 5D5600.01<br />

The numbers in the picture specify the index of the corresponding key in the key matrix.<br />

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

For keys with LED, the number also specifies the index of the corresponding LED in the LED matrix.<br />

202 3.4.31 Key Matrix − Panel 5D5600.01


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

3.4.32 Key Matrix − Panel 5D5600.02<br />

The numbers in the picture specify the index of the corresponding key in the key matrix.<br />

For keys with LED, the number also specifies the index of the corresponding LED in the LED matrix.<br />

3.4.33 Key Matrix − Panel 5D5600.03<br />

The numbers in the picture specify the index of the corresponding key in the key matrix.<br />

3.4.32 Key Matrix − Panel 5D5600.02 203


For keys with LED, the number also specifies the index of the corresponding LED in the LED matrix.<br />

3.4.34 Key Matrix − Panel 5D5601.01<br />

The numbers in the picture specify the index of the corresponding key in the key matrix.<br />

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

For keys with LED, the number also specifies the index of the corresponding LED in the LED matrix.<br />

204 3.4.34 Key Matrix − Panel 5D5601.01


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

3.4.35 Key Matrix − Panel 5D5601.02<br />

The numbers in the picture specify the index of the corresponding key in the key matrix.<br />

For keys with LED, the number also specifies the index of the corresponding LED in the LED matrix.<br />

3.4.36 Key Matrix − Panel 5D5601.03<br />

The numbers in the picture specify the index of the corresponding key in the key matrix.<br />

For keys with LED, the number also specifies the index of the corresponding LED in the LED matrix.<br />

3.4.35 Key Matrix − Panel 5D5601.02 205


3.5 Software Modules on the Controller<br />

Runtime system resources consist of .BR modules. These modules contain executable code for the drivers and<br />

<strong>Visual</strong> <strong>Components</strong> Runtime (command interpreter). They also contain compiled byte code of the <strong>Visual</strong><br />

<strong>Components</strong> editor project, including the necessary resource files.<br />

All required modules are automatically inserted by the project manager. The following is a list of individual<br />

modules including some examples provided for better understanding.<br />

3.5.1 Executable <strong>Visual</strong> <strong>Components</strong> Modules<br />

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

The <strong>Visual</strong> <strong>Components</strong> runtime environment is divided into code and data objects. This section discusses<br />

executable modules in .BR format.<br />

There are many specialized modules due to the various platforms (CPU types), displays, and panel units.<br />

When a new project is created, the most recent versions of executable .BR modules are automatically<br />

transferred to the project. Different modules are used depending on the project and hardware.<br />

Modules are automatically transferred to the target system when the project is downloaded.<br />

All <strong>Visual</strong> <strong>Components</strong> runtime modules are tied to the system as non−cyclic tasks with lower priority than cyclic<br />

tasks. Cyclic user tasks (task classes) are therefore not influenced by runtime performance. <strong>Visual</strong> <strong>Components</strong><br />

runtime modules run in the system idle time with low priority.<br />

A simple and clear definition of timing performance is difficult because of the different ways that application<br />

software loads down the CPU. This is mainly due to the lower priority of <strong>Visual</strong> <strong>Components</strong> runtime modules.<br />

If a system does not have much idle time available, then display speed and key reaction are slower on the target<br />

system.<br />

Example:<br />

A cyclic task running every 10 ms requires 8ms from the CPU to complete the task. Thus, approx. 2 ms remain<br />

on the CPU for the remaining system operations (I/O updates, system routines, communication). In the<br />

remaining time (2 ms), <strong>Visual</strong> <strong>Components</strong> loses CPU time as well. In this example, this is less than 20%. If<br />

20% is sufficient, then problems do not occur. If this is not sufficient, then display speed and key reaction time to<br />

input are slow. This can cause problems for extensive pictures which have many input and output fields.<br />

Time bottlenecks can occur for INA2000 communication (Automation Studio online connection / PVI<br />

visualization) since it also runs during idle time, i.e. the connection to the PC (AS or PVI) can be interrupted or<br />

206 3.5 Software Modules on the Controller


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

the <strong>Visual</strong> <strong>Components</strong> visualization can become slower.<br />

To remedy this, a 1 or 2 ms idle time can be set in the TC#1 system configuration as long as the application<br />

allows it.<br />

3.5.1.1 Module Versions<br />

Starting with AS Version 2.1, only <strong>Visual</strong> <strong>Components</strong> .BR modules of version 01.10 are used. Older versions<br />

must be manually updated if this does not occur automatically.<br />

When a new project is created, the most recent versions of .BR modules are automatically transferred to the<br />

project.<br />

Here is a list of modules with brief descriptions:<br />

3.5.1.2 VC Project Management Module<br />

Module<br />

Name:<br />

ApLib.br<br />

Function: Base module for managing the project on the target system.<br />

CPU Ver.: m68k, i386<br />

Dependency: SysLib<br />

Remark:<br />

Initializes and de−initializes when downloading, synchronizes separate modules procedures<br />

when downloading projects, manages the modules if multiple projects are running on a target,<br />

provides <strong>Visual</strong> <strong>Components</strong> system services for the VISAPI library.<br />

3.5.1.3 VC Interpreter Module<br />

Module Name: vcinter.br<br />

Function: Interpreter for <strong>Visual</strong> <strong>Components</strong><br />

CPU Ver.: m68k, i386<br />

Dependency: SysLib, DataObj, ApLib<br />

Remark:<br />

3.5.1.4 VC VGA Display Driver<br />

Module<br />

Name:<br />

Ddpdcvga.br<br />

Interprets <strong>Visual</strong> <strong>Components</strong> data objects, executes the project, starts the drivers for<br />

the corresponding project, and coordinates all input and output in the project.<br />

Runs on i386 targets in 100 ms intervals (corresponding to idle time). On m68k<br />

systems, a 200 ms interval is used.<br />

This module is substantially larger on i386 systems than on m68k systems. This is due<br />

to advanced options (touch operation, color displays).<br />

Function: Driver for IPC200x and IPC5000 (1/4 VGA, VGA, SVGA and XGA) connections<br />

CPU Ver.: i386<br />

Dependency: ApLib<br />

Remark:<br />

3.5.1.5 VC IPC Key Driver<br />

Display controller for i386 panel systems based on the C&T chip sets. Functions are preset to<br />

the interpreter module for display control.<br />

Module Name: DdPkIpc.br<br />

Function: Driver for IPC keys (IPC2000 and IPC5000)<br />

CPU Ver.: i386<br />

Dependency: ApLib<br />

Remark:<br />

Key operation for IPC2000 and IPC5000 systems. Front keys are supplied to the<br />

interpreter module. Jog keys can be queried using a FBK. A high priority watchdog<br />

secures the jog keys.<br />

3.5.1.1 Module Versions 207


3.5.1.6 VC IPC Touch Driver<br />

Module<br />

Name:<br />

DdptIpc.br<br />

Function: Touch driver for the COM port (IPC2000 and IPC5000)<br />

CPU Ver.: i386<br />

Dependency: ApLib<br />

Remark:<br />

3.5.1.7 VC CAN Panel Driver<br />

Module<br />

Name:<br />

Touch operation for IPC2000 and IPC5000 systems. Touch support for the front panel is<br />

prepared for the interpreter module. Jog keys can be queried using a FBK. A high priority<br />

watchdog secures the touch buttons.<br />

DdpcCan.br<br />

Function: CAN panel driver<br />

CPU Ver.: m68k, i386<br />

Dependency: ApLib<br />

Remark:<br />

Driver for CAN panel output and input (4B1270 and C130 controller including displays). The<br />

driver uses the CAN_LIB library to show interpreter commands on the display.<br />

Secured jog keys can be read using a FBK.<br />

3.5.1.8 VC Power Panel Driver<br />

Module Name: Ddpcpp41.br<br />

Function: Display and key driver for Power Panel devices<br />

CPU Ver.: m68k<br />

Dependency: ApLib<br />

Remark:<br />

3.5.1.9 VC Printer Driver<br />

Module Name: Ddpapi.br<br />

Driver for output and input on PowerPanel devices (PP41 and PP21).<br />

Secured jog keys can be read using a FBK.<br />

Function: Controls the printer on the parallel port (alarm system)<br />

CPU Ver.: i386<br />

Dependency: ApLib<br />

Remark:<br />

The alarm system can be printed out using this driver on i386 devices. The driver only supports<br />

the printer text mode.<br />

3.5.1.10 VC AT Keyboard Driver<br />

Module<br />

Name:<br />

ddpkbipc.br<br />

Function: AT keyboard driver for IPC projects<br />

CPU Ver.: i386<br />

Dependency: ApLib<br />

Remark:<br />

This driver supports a defined set of AT keyboard keys. However, they can only be used for<br />

editing and controlling pictures. A key matrix cannot be generated.<br />

3.5.1.11 VC Graphics Driver for PPxx<br />

Module Name: ddpdcx55.br<br />

Function: Display driver for PPxx<br />

CPU Ver.: i386<br />

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

208 3.5.1.6 VC IPC Touch Driver


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

Dependency: ApLib<br />

Remark:<br />

3.5.1.12 VC Graphics Driver for PPxx<br />

Module<br />

Name:<br />

ddpkxx.br<br />

Function: Display driver for PPxx<br />

CPU Ver.: i386<br />

Dependency: ApLib, sys_lib<br />

Remark:<br />

Display controller for PPxx panel systems based on Geode chip sets. Functions are<br />

preset to the interpreter module for display control.<br />

Key operation for PPxx systems. Front keys are supplied to the interpreter module. Jog keys<br />

can be queried using a FBK.<br />

3.5.1.13 Compact IPC2001 Modules (Example)<br />

The following example contains an overview of the required modules for a project using the Compact IPC2001<br />

(VGA with touch operation).<br />

The APLIB, DDPCDCVGA, DDPTIPC, and VCINTER modules are described in the Executable <strong>Visual</strong><br />

<strong>Components</strong> Modules section.<br />

VGA data objects, as well as the VGA01 and VGA02 modules, are described in the <strong>Visual</strong> Component Data<br />

Modules section.<br />

The VISAPI module is the user interface of the <strong>Visual</strong>ization Library. Library functions are found in the<br />

Automation Studio Library Manager (see also VISAPI Functions Overview).<br />

3.5.1.14 CP360 Modules (Example)<br />

The following example shows a sample project based on a CP360 with a CAN panel.<br />

3.5.1.12 VC Graphics Driver for PPxx 209


The APLIB, DDPCCAN, and VCINTER modules are described in the Executable <strong>Visual</strong> <strong>Components</strong> Modules<br />

section.<br />

VIS data objects, as well as the VIS01 and VIS02 modules, are described in the <strong>Visual</strong> <strong>Components</strong> Data<br />

Modules section.<br />

The CAN_LIB module represents the CAN connection to the panel. CAN driver DDPCCAN is used by <strong>Visual</strong><br />

<strong>Components</strong>.<br />

DATAOBJ routines are called by the <strong>Visual</strong> <strong>Components</strong> alarm system.<br />

3.5.1.15 CP476 Modules (Example)<br />

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

In the following section, all modules are shown for a <strong>Visual</strong> <strong>Components</strong> project which uses a CP476 with a<br />

C130 controller and a 4D1167 panel.<br />

The APLIB, DDPCCAN, and VCINTER modules are described in the Executable <strong>Visual</strong> <strong>Components</strong> Modules<br />

section.<br />

4D1167 data objects, as well the as 4D116701 and 4D116702 modules, are described in the <strong>Visual</strong><br />

<strong>Components</strong> Data Modules section.<br />

The RTK68, SYS_LIB, and RUNTIME modules are partially required by <strong>Visual</strong> <strong>Components</strong> modules. The<br />

CAN_LIB module represents the CAN connection to the panel. CAN driver DDPCCAN is used by <strong>Visual</strong><br />

<strong>Components</strong>.<br />

210 3.5.1.15 CP476 Modules (Example)


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

DATAOBJ routines are called by the <strong>Visual</strong> <strong>Components</strong> alarm system.<br />

3.5.2 <strong>Visual</strong> <strong>Components</strong> Data Modules<br />

In addition to executable code modules and drivers, a <strong>Visual</strong> <strong>Components</strong> project also consists of data objects.<br />

These data objects are created when a project is compiled and are automatically transferred to the target<br />

system.<br />

A <strong>Visual</strong> <strong>Components</strong> project consists of 3 different data objects. 2 resource modules are always attached to a<br />

project global module. The 'xxx01' module contains picture description data. The 'xxx02' module contains project<br />

fonts and bitmaps.<br />

This division can be seen here in this simple project example.<br />

The main module in this project is the 'VISU' panel object. Global project data are contained in this module.<br />

Additional modules are always labeled with the project name plus a 2−digit number.<br />

Picture and field information for project pictures is contained in the 'VISU01' module, which belongs to the 'VISU'<br />

project.<br />

All necessary resource data for bitmaps and fonts are stored in the 'VISU02' module. This module can become<br />

very large (many different character fonts and bitmaps). If nothing has been changed in the texts and bitmaps,<br />

they will not be retransferred to the target system.<br />

3.5.3 Internal Details About Project Storage<br />

A list of required files is shown here to gain a better understanding of the proper <strong>Visual</strong> <strong>Components</strong> structure<br />

and to better analyze problems.<br />

To secure data, the project file is copied after each successful compilation.<br />

Warning:<br />

Please do not change, delete, or move any files or directories from the AS project. This can cause the project to<br />

crash!<br />

3.5.3.1 Project Storage Example<br />

3.5.2 <strong>Visual</strong> <strong>Components</strong> Data Modules 211


The image above shows an Automation Studio project which uses a System 2005 CP360 with a 4B1270 panel.<br />

The directory tree shown below displays the file system structure of the project. There is a '<strong>Visual</strong><strong>Components</strong>'<br />

directory in the 'CPU' subdirectory. The VC.INI file is located in this directory, as well as subdirectories for all<br />

other panel objects in a project. In this example, the 'VIS' directory is found here.<br />

These are the relevant files in the CPU directory of a project:<br />

The 'VIS.WAF' file is important here. This file represents the <strong>Visual</strong> <strong>Components</strong> editor object. Drivers and data<br />

objects are described in the following sections:<br />

• List of All Executable Modules<br />

• List of Project Data Modules<br />

<strong>Visual</strong><strong>Components</strong> Directory:<br />

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

212 3.5.2 <strong>Visual</strong> <strong>Components</strong> Data Modules


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

The VC.INI file contains information about the panel projects which exist in this Automation Studio project<br />

(CP360). Parameters connecting the panel object to the hardware are entered in this file and updated when the<br />

project is opened.<br />

This example uses an object with the name 'vis' (panel object name). There is also a subdirectory with the same<br />

name for this project.<br />

All files required by the panel editor for managing the project are found in the 'VIS' subdirectory.<br />

Files ending with '.BR' are project files which have already been compiled.<br />

Files ending with '.BRC' are checksum files for the .BR modules.<br />

The TFont1x1.BMP file is a font file in bitmap format.<br />

The VIS.PWC file is the actual project file containing all the information for the editor.<br />

Additional information for the editor is contained in the VIS.PWL file.<br />

Backup Copy:<br />

A copy of the project module is made after every successful compilation. The project module has the ending<br />

'.PWC'. The backup copy has the ending '.BAK'. In case a project crashes or can no longer be opened, try to<br />

replace the project file with the backup copy.<br />

Other bitmaps, text, and binary files can be included depending on the project and target hardware. In general,<br />

all project files are contained in this directory and subdirectories.<br />

Warning:<br />

Please do not change, delete, or move any files or directories from the AS project. This can cause the project to<br />

crash!<br />

3.5.2 <strong>Visual</strong> <strong>Components</strong> Data Modules 213


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

214 3.5.2 <strong>Visual</strong> <strong>Components</strong> Data Modules


4 <strong>Visual</strong> <strong>Components</strong> User's Manual<br />

4.1 Welcome to <strong>Visual</strong> <strong>Components</strong><br />

4.1.1 New Functions in <strong>Visual</strong> <strong>Components</strong> 2.4<br />

• 4.1.2 New Visapi Functions<br />

The Backlight could be enabled/(diabled with an API function<br />

(see VC_SetBacklight)<br />

• Screenshot Library<br />

(see VCScrSht)<br />

4.1.3 New Functions in <strong>Visual</strong> <strong>Components</strong> 2.3<br />

• ListBox Input<br />

The ListBox input field can be used by the user to select input from a ListBox.<br />

(see ListBox Input Field)<br />

• Touch Pad Selection<br />

Using touch pad selection allows the user to choose different touch pads for a project<br />

(see Touch Pad Selection)<br />

• Expanded Alarm System Configuration<br />

Data object configuration for the historical alarm list. The user can decide whether a data object should<br />

be created or not. If one is created, the size of the ring buffer can also be configured.<br />

(See Configuring the Alarm System)<br />

Additional parameters in the alarm settings allow the user to acknowledge active alarms.<br />

(See Creating and Configuring Alarms)<br />

• New Visapi Functions<br />

The historical alarm list can now also be deleted during runtime<br />

(See VA_DelAlarmHistory)<br />

An entire alarm group can also be acknowledged.<br />

(See VA_QuitAlarms)<br />

Information about the display panel can be read.<br />

(See VA_GetDisplayInfo)<br />

• Formatted Tags for Touch Buttons<br />

Touch button texts can also contain formatted texts.<br />

• VNC Server<br />

<strong>Visual</strong>ization applications can be displayed on a PC using the VNC server (see libvncserv).<br />

This can be used to implement a 'master office'.<br />

4 <strong>Visual</strong> <strong>Components</strong> User's Manual 215


4.1.4 New Functions in <strong>Visual</strong> <strong>Components</strong> 2.2<br />

• Touch Configuration<br />

As an update for using touch displays with IPC 2000 and 5000 systems, now any free serial<br />

interface can be used and configured for the touch screen. Interfaces which are used by other<br />

devices (i.e. C100) are automatically not available.<br />

(See Touch Configuration)<br />

• Variable Numbering of Text Groups<br />

Up to now, text numbers (indices) of texts could only be increased beginning with the number 0. Now<br />

the text numbers of each text can optionally be set individually. For example, error numbers can be<br />

more easily assigned an appropriate error text in this way.<br />

(See Advanced Text Group Options)<br />

• Variables in Text Group Texts<br />

Texts in a text group no longer have to contain only static texts. Dynamic texts can also be put together<br />

at runtime using the contents of PLC process variables. In this way, error messages can be extended to<br />

include additional information, for example, or high−performance status displays can be easily<br />

implemented.<br />

(See Advanced Text Group Options)<br />

• Saving Variables in the Alarm List<br />

In addition to information stored previously in the alarm list, four pieces of numeric information from PLC<br />

process variables can now also be stored with the alarm text. In this way, alarms can be written with<br />

additional information such as the error number of errors pertaining to intelligent I/O components, or the<br />

item which caused the error to occur. Configuration takes place in the same way as text group variables.<br />

(See Creating and Configuring Alarms)<br />

• Standardized Scaling<br />

Scaling of numeric data types was extremely simplified since all numeric data types (except UDINT and<br />

FLOAT) are able to be scaled to the entire DINT range in the future. This removes the previous<br />

restriction which only allowed process variables to be scaled within the value range of its own data type.<br />

(See reference manual − Scaling − Input Numeric and Scaling − Output Numeric)<br />

• Compressed Bitmaps<br />

Color bitmaps can be saved in compressed format with <strong>Visual</strong> <strong>Components</strong> 2.2 which allows them to be<br />

displayed very quickly. Compression is optimized for graphics with large, monochrome surfaces like<br />

those which are very frequently used for system images and schematic representations. Optimal<br />

compression is enabled in this way.<br />

Bitmaps are managed and used as previously; compression takes place automatically with all supported<br />

controllers the next time the project is Built.<br />

• New Controllers<br />

In addition to the previously supported CAN operator panels, now serial operator panels can be<br />

connected to the RS232 interface(s) of the CPU and configured with <strong>Visual</strong> <strong>Components</strong>. All display<br />

units which could be used previously with the C130 CAN controller can be connected to the C100<br />

controller.<br />

• PS/2 AT Keyboard Support for IPC Systems<br />

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

216 4.1.4 New Functions in <strong>Visual</strong> <strong>Components</strong> 2.2


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

With AT keyboard support, a lot of time can be saved by the simplified input of texts and numbers,<br />

especially during the startup phase. In this way, the operator panel can be laid out more to the operation<br />

specifications of the machine when an AT keyboard is used during initial operations. By default, <strong>Visual</strong><br />

<strong>Components</strong> supports German and English (US) keyboard formats. Other formats can be defined as<br />

needed.<br />

(See Keys, LED, and Touch Support)<br />

• Importing and Exporting Projects and Parts of Projects<br />

<strong>Visual</strong> <strong>Components</strong> now supports importing and exporting of projects and parts of projects; work<br />

invested can be more easily reused in new projects than previously. All components from the <strong>Visual</strong><br />

<strong>Components</strong> tree view can be individually or collectively exported and imported. Dependencies are<br />

taken into consideration automatically so that exporting can never be incomplete. Exporting and<br />

importing take place in XML format; naturally, exporting and importing text in ASCII format is available.<br />

(See Importing and Exporting)<br />

4.1.5 New Functions in <strong>Visual</strong> <strong>Components</strong> 2.1<br />

The following functions are available beginning with Version 2.1.<br />

• Project Creation with Color Display<br />

Process pictures shown using the color possibilities of the target system. Possibility to use a variable to<br />

control the colors (16 bit value − high byte foreground, low byte background color). This allows visibility<br />

to be controlled during runtime, and blink effects can be created.<br />

• Expanded Font Possibilities<br />

'True Type Fonts' are supported on the graphic target system. Any fonts and symbols from Windows<br />

can be integrated into a project. The fonts are always shown with fixed character widths on the<br />

visualization device − proportional fonts are converted respectively. It should be noted that some fonts<br />

are copyrighted.<br />

• Status Variables<br />

Object display can be switched on and off (bit 0) using status variables. Input can also be locked during<br />

runtime (bit 1). For INA Client communication, an 'Edit' bit was added (bit 15 − set or cleared by the<br />

interpreter while an entry field is being edited).<br />

• Screen Saver<br />

Any process picture can be defined as a screen saver and displayed automatically after a set delay.<br />

• Uniform Input and Output Fields<br />

Assigning explicit data types is no longer necessary when configuring input and output fields. There are<br />

only numeric and alphanumeric input and output fields. The scaling size is automatically set.<br />

• Variable Scaling<br />

Scaling and value limitation for fields can take place using variables.<br />

• SVGA / XGA<br />

In addition to existing VGA panels (640x480), SVGA (800x600) and XGA (1024x768) panels can also<br />

be configured with up to 256 colors.<br />

• Editor − Grid Functions<br />

4.1.5 New Functions in <strong>Visual</strong> <strong>Components</strong> 2.1 217


The editor can arrange static objects such as lines, rectangles, and ellipses into levels using the<br />

shortcut menu. Pressing the 'CTRL' key allows horizontal or vertical lines as well as squares and circles<br />

to be drawn. Settings for the grid can be defined directly using the grid icon menu in the toolbar. Objects<br />

can be positioned with pixel precision or using the defined grid.<br />

• Button and HotSpot<br />

These new elements are only for Touch displays. Buttons can be configured as desired (size, with or<br />

without bitmap and/or text, color, and function). Blink effects are possible using color variables.<br />

HotSpots are invisible switches (touch sensitive areas). In this way, invisible switching functions can be<br />

placed at certain locations. The representation can be configured with bitmaps or line graphics.<br />

• ListBoxes<br />

A list of texts can be shown on the display with this output field. Texts can be output from a text group or<br />

a process variable. For this, a text can be highlighted. Selecting the highlighted text takes place using a<br />

process variable.<br />

• Key Levels<br />

Using shift keys, panel keys can be used to enter up to 4 different characters per key. Other key<br />

functions can only be configured on the first level.<br />

• Split Download<br />

The project is divided over multiple modules. Bitmaps and fonts, which make up the majority of a<br />

project, are packed in a module. This module only has to be transferred again if bitmaps or fonts have<br />

been added or changed. This greatly reduces the download time during the development phase.<br />

• Multiple Projects<br />

Several CAN panels can be operated on a CPU. A CAN panel can also be operated at the same time as<br />

a VGA visualization device. For this, each panel is configured in a separate project.<br />

• API Expansions<br />

The API interface was changed because of the possibility to execute multiple projects on the target<br />

system. New functions include reading touch coordinates, setting contrast and brightness, and reading<br />

alarms.<br />

Necessary changes in existing projects can be found under Upgrading <strong>Visual</strong> <strong>Components</strong> 2.0 Projects.<br />

• Data Point List<br />

All variables used in the individual pictures can be saved in a text file. This list can be used to further<br />

process INA CLIENT FBKs.<br />

• Decimal Point Representation<br />

Fields with decimal representation can also be entered without the decimal point key.<br />

• Alarm System<br />

Saving the historical alarm list takes place in a data object. Printing the alarms on IPC based devices is<br />

possible using the parallel interface.<br />

• Increment/Decrement<br />

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

A variable can be increased or decreased incrementally using a button. Optionally, a repeat function<br />

and upper/lower limits can be configured.<br />

218 4.1.5 New Functions in <strong>Visual</strong> <strong>Components</strong> 2.1


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

• Jog Keys<br />

Using an API function, jog key functions (key matrix) can be programmed based on the task classes.<br />

This allows priorities to be set for reading keys.<br />

• Variable Color Palette<br />

The color palette of 256 colors can be adjusted in a project specific manner. If several shades of a color<br />

are required, then this palette adjustment can be made in the editor.<br />

Color palette settings can also be changed during runtime using API. This helps create fade−in and<br />

fade−out effects. (Only applies to i386 systems with VGA controllers)<br />

4.2 Getting Started with <strong>Visual</strong> <strong>Components</strong> 2.4<br />

The tutorial application examples serve as an introduction to each specific B&R <strong>Visual</strong> <strong>Components</strong> hardware<br />

environment.<br />

It will be possible to set up simple projects independently after configuring an application example using the<br />

specifications in the individual tutorials. Solutions to specific questions which are not fully covered in 'Getting<br />

Started' are explained in detail in the <strong>Visual</strong> <strong>Components</strong> Help system.<br />

4.2.1 CP476 with B127 CAN Display − Example<br />

The following steps describe how to create a simple application using <strong>Visual</strong> <strong>Components</strong>. This example shows<br />

the use of <strong>Visual</strong> <strong>Components</strong> in connection with a CP476 and a remote CAN display. The application contain<br />

inputs and outputs as well as keys. Using these will allow LED states to be changed on the keypad.<br />

Other CPUs from the 20xx family can also be used. Modifications are also possible for remote CAN operator<br />

panels. The LED functions described in step 7 are only possible with operator panels which also have LEDs built<br />

into their keys.<br />

The following is a list of the individual steps for this application example:<br />

1. Creating a New Automation Studio Project<br />

2. Inserting a Display<br />

3. Inserting PV Variables<br />

4. Applying Global Settings to <strong>Visual</strong> <strong>Components</strong><br />

5. Inserting an Input Field<br />

6. Inserting an Output Field<br />

7. Connecting an LED with a PV<br />

8. Defining INC/DEC Keys<br />

9. Compiling and Transferring the Project<br />

10. Testing Functions<br />

4.2.1.1 CAN − Step 1: Creating a New Automation Studio Project<br />

First, start a new project using Automation Studio. For this, select "New Project..." from the "File" menu. This will<br />

start the Project Wizard. Use "vc_can" as the project name (max. 8 characters). Proceed by clicking on the Next<br />

button in the Wizard.<br />

4.2 Getting Started with <strong>Visual</strong> <strong>Components</strong> 2.4 219


Next, the CPU to be used must be selected. You should select a "7CP476.60−1" CPU from the 2003 series.<br />

Again, click on Next to proceed. All selected settings are summarized one more time in the final view. The<br />

Wizard is ended once you click on Finish.<br />

The new project is now ready to go.<br />

4.2.1.2 CAN − Step 2: Inserting a Display<br />

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

The easiest way to begin a new visualization project is to insert the desired display. Since you are working with<br />

a remote CAN operator panel in this case, the panel is integrated into this existing project using a CAN I/O node.<br />

First, you should change from the Software tab to the CAN tab in the project view. Now right−click on the free<br />

line next to the slot symbol and select the Insert entry from the shortcut menu.<br />

220 4.2.1.2 CAN − Step 2: Inserting a Display


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

A list of all compatible displays for this slot is shown under 'Panel'. Select the entry "4B1270.00−490" for a B127<br />

panel controller from the list and acknowledge the selection with the Next button.<br />

In the next window, enter the CAN node number which is set on the B127 controller to enable communication<br />

between the CPU and the panel controller. 500 kBaud is automatically set as the baud rate by the system. Make<br />

sure that this transfer rate is also configured on the panel controller. After checking the controller settings and<br />

entering the correct node number, proceed by clicking Next once again.<br />

4.2.1.2 CAN − Step 2: Inserting a Display 221


In this window, you will connect the new display with the panel object. So that you don't have to create the new<br />

panel object manually, the next dialog box offers the opportunity to create it by simply entering a new object<br />

name in the input field. This new panel object is then automatically connected to the new display. In this<br />

example, enter the name 'canpanel' in the input field. Click on OK to acknowledge.<br />

Automation Studio now has all necessary information and creates the new panel object. It is already correctly<br />

connected with the display being used. Hardware assignment, as you are probably accustomed to when using<br />

I/O variables, no longer needs to be taken care of separately for the panel object.<br />

Depending on the type of CPU being used, a dialog box appears like the one shown here. It displays system<br />

settings that have changed for the <strong>Visual</strong> <strong>Components</strong> project. We don't really need this information in this<br />

example so simply close the dialog box with OK.<br />

The newly created panel object is immediately opened for editing:<br />

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

222 4.2.1.2 CAN − Step 2: Inserting a Display


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

Go back to the main Automation Studio project window for a moment to see which changes have been made to<br />

the project.<br />

As you can see, the Wizard has not only created your new panel object with the name "canpanel", it has also<br />

added all the necessary drivers and system modules to the project. For some target systems, system settings<br />

must also be changed. This is done automatically. All changes made to the configuration are shown for your<br />

information.<br />

You have now completed all necessary preparations and can continue to the next step where you will begin<br />

programming the controller and setting up pictures for the visualization.<br />

4.2.1.3 CAN − Step 3: Inserting PV Variables<br />

In this step, you will create a few variables for the example project. The following two possibilities exist for this:<br />

4.2.1.3 CAN − Step 3: Inserting PV Variables 223


• Inserting Using the Variable Declaration Dialog Box<br />

• Inserting a Cyclic Task<br />

4.2.1.3.1 Inserting Using the Variable Declaration Dialog Box<br />

In the Software view, right click on CPU. Choose Declaration from the shortcut menu. This opens the dialog box<br />

for declaring variables.<br />

Place the mouse pointer anywhere in the empty area of the variable list. Right mouse click and select New<br />

Variable from the shortcut menu. Enter the name of the variable to be used. In this case, it will be called<br />

"IOValue". Pressing "Enter" creates the variable.<br />

Now double−click in the "Type" column to specify the data type for the variable.<br />

Choose data type UDINT for an unsigned 32−bit integer value and confirm with OK.<br />

Now create a second variable with the name "LedCtrl" of data type USINT. Your variable declarations should<br />

now look like this.<br />

Now close the declaration dialog box.<br />

To save memory, variables are only sent to the controller if they are used in at least one control task. To meet<br />

this requirement, we will create a very small task in Automation Basic which uses these variables.<br />

Right click on CPU and choose Insert Object... from the shortcut menu.<br />

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

224 4.2.1.3 CAN − Step 3: Inserting PV Variables


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

This will open the Insert Object Wizard.<br />

Select "Cyclic Object" to add a user task to the project. Confirm your selection by clicking Next. The next window<br />

of the Insert Object Wizard is displayed.<br />

4.2.1.3 CAN − Step 3: Inserting PV Variables 225


Enter the name "dummy," set the type to "B&R Automation Basic", and select the resource "Cyclic #4 − [10<br />

ms]". Confirm your selection by clicking Finish.<br />

A new editor window for entering source code for the new task is displayed. Enter the source code seen below<br />

in the image:<br />

Save your input by clicking on the icon in the toolbar and then close the editor window.<br />

Both of these variables now suffice for this example. In an actual project, the variables would not just be<br />

assigned to themselves. Instead, they would normally be used as calculation elements for the control tasks.<br />

We have now created the necessary variables and can move on to the Next Step.<br />

4.2.1.3.2 Inserting a Cyclic Task<br />

Advanced users can use a programming language to insert a cyclic task in the system. The variables to be used<br />

are created according to the programming language which is used. For our example, we will use a simple ANSI<br />

C task. In this programming language, the variables are defined as a part of the source code.<br />

In the following, you can see the necessary C source code which defines the same variables used in the<br />

previous section. For information about integrating an ANSI C task, please refer to the Automation Studio Help.<br />

/* Begin C Source */<br />

#include <br />

#include <br />

_GLOBAL UDINT IOValue;<br />

_GLOBAL USINT LedCtrl;<br />

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

226 4.2.1.3 CAN − Step 3: Inserting PV Variables


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

_INIT void C_Prog_init(void) /* Init Procedure */<br />

{<br />

IOValue = 0;<br />

LedCtrl = 0;<br />

}<br />

_CYCLIC void C_Prog_cycle(void) /* Cyclic Procedure */<br />

{<br />

}<br />

/* End C Source */<br />

4.2.1.4 CAN − Step 4: Applying Global Settings to <strong>Visual</strong> <strong>Components</strong><br />

If you double−click on the "canpanel" panel object in the software view, the <strong>Visual</strong> <strong>Components</strong> editor opens<br />

with the global project options showing.<br />

For this simple example, no special settings are required. We can continue directly to the next step.<br />

4.2.1.5 CAN − Step 5: Inserting an Input Field<br />

In this step, you will insert a simple input field.<br />

The input field has to be inserted into a picture. <strong>Visual</strong> <strong>Components</strong> has already created the first picture for you<br />

which you only have to select as shown below. By doing so, the <strong>Visual</strong> <strong>Components</strong> editor display switches to<br />

the picture editor for the 'INIT_PIC' picture.<br />

4.2.1.4 CAN − Step 4: Applying Global Settings to <strong>Visual</strong> <strong>Components</strong> 227


As soon as the picture editor is shown, it can be arranged according to requirements. We would like to insert an<br />

input field. To do so, click on the icon in the toolbar.<br />

Select Input Numeric from the menu which appears. The cursor changes into a crosshair pointer. Now you only<br />

have to left click on the location in the image where you want to insert the input field.<br />

The following configuration dialog box is shown after the input field is placed:<br />

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

The variable dialog box appears after clicking on the Assign... button in the Data Point area. In this dialog box,<br />

select the "IOValue" variable by double−clicking on it.<br />

228 4.2.1.4 CAN − Step 4: Applying Global Settings to <strong>Visual</strong> <strong>Components</strong>


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

"IOValue" is now assigned as the data point in the "Input Numeric" dialog box. After confirming the dialog box<br />

with OK, the input field is displayed in the picture editor. The input field can be moved around in the picture at<br />

any time. In this example, move the field to the right side of the second line.<br />

In addition, write the static text "Input:" before the field. To do this, select the text icon in the toolbar and<br />

place the cursor in the desired position. A dialog box will then open for you to enter the desired text. After<br />

confirming the input with the 'Enter' key, the dialog box can then be closed by clicking on OK. Further details<br />

concerning static text can be found in its respective section.<br />

The picture should now look similar to the one shown above.<br />

4.2.1.6 CAN − Step 6: Inserting an Output Field<br />

In this step, you will insert a simple output field. To do so, select the icon in the toolbar.<br />

After selecting Output Numeric from the menu, click on the desired location in the picture editor where you want<br />

to place the output field.<br />

4.2.1.6 CAN − Step 6: Inserting an Output Field 229


The configuration dialog box for the output field is then opened. By clicking the Assign... button in the Data Point<br />

area, you can once again select the 'IOValue' variable from the list.<br />

Confirm with OK.<br />

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

Now place the text 'Output:' before the output field as described in Step 5. Your picture in the editor should now<br />

look something like this:<br />

230 4.2.1.6 CAN − Step 6: Inserting an Output Field


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

4.2.1.7 CAN − Step 7: Connecting an LED with a Process Variable<br />

In this step, you will add an LED to the project which can be operated from the control application. To achieve<br />

this, the LED is connected with a variable from the control application.<br />

Right click on the round area of the F1 key in the Key window and select LED Control from PLC from the menu.<br />

This opens the following dialog box:<br />

The LED Control from PLC mode is already preset. In the Data Point area, open the variable dialog box with the<br />

Assign... button and assign the 'LedCtrl' PV which will be responsible for the blink status of the LED.<br />

In the next step, you will define the function keys used to manipulate the 'LedCtrl' PV.<br />

4.2.1.7 CAN − Step 7: Connecting an LED with a Process Variable 231


4.2.1.8 CAN − Step 8: Defining INC/DEC Keys<br />

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

In order to manipulate the "LedCtrl" PV which has direct influence on the F1 LED blink status, we define F2 as<br />

an increment key which raises the "LedCtrl" variable by one value per keystroke (maximum 3). F3 will be set up<br />

as a decrement key. It will reduce the PV by one value per keystroke (minimum 0).<br />

First, the F2 function key must be set with the increment/decrement function. For this, right click on the F2 key in<br />

the Key window (but not within the LED). Select Increment/Decrement from the shortcut menu.<br />

A dialog box appears which provides a more exact definition of all necessary function parameters.<br />

The Data Point area under the Parameter tab determines which PV should be manipulated. Select the 'LedCtrl'<br />

PV from the variable dialog box which appears after you have clicked on the Assign... button.<br />

Under the Function tab, activate the Use Limits option to define the maximum as 3. This is because an LED can<br />

only have 4 different states (0−3). The Increment rate is defined as 1. We confirm our selections with OK, and<br />

232 4.2.1.8 CAN − Step 8: Defining INC/DEC Keys


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

now our F2 function key is completely configured.<br />

Configuring the F3 function key takes place in the same way except for the Increment rate setting under the<br />

Function tab. Select an Increment rate of −1 for the F3 function key.<br />

Now, the LED status can be manipulated in ascending order with the F2 key (off (0) −> on (1) −> blinking (2) −><br />

fast blinking (3)) and in reverse order using the F3 key.<br />

In the next step, you will compile the project and transfer it to the controller.<br />

4.2.1.9 CAN − Step 9: Compiling and Transferring the Project<br />

Save the changes to the project and close the panel object. Now you are ready to compile the project and<br />

transfer it to the controller.<br />

Click on the icon in the toolbar to compile the project. This doesn't just affect the panel object; all<br />

components in the project that have been changed or added are compiled. Compilation progress is displayed.<br />

4.2.1.9 CAN − Step 9: Compiling and Transferring the Project 233


If the compilation was successful, then the following dialog box prompts you to transfer the project. Just click on<br />

Transfer and Automation Studio transfers all necessary components to the controller.<br />

A progress indicator is displayed once again while the project is being transferred.<br />

The configuration of the controller is updated if it has changed or hasn't been set yet. Since the controller has to<br />

be restarted for this, the following dialog box is shown:<br />

Confirm with Yes to update the configuration and transfer the project to the controller.<br />

After compiling and transferring the project, you will see the start picture of the "INIT_PIC" panel object on the<br />

target system display. The input field blinks since it has the focus. In the next step, you will test the application<br />

that you have just created.<br />

4.2.1.10 CAN − Step 10: Test Operations<br />

After you have transferred the project to the controller, the picture you have configured should be displayed on<br />

the CAN operator panel screen. You have implemented the following functions in your first project:<br />

4.2.1.10.1 Input Field / Output Field<br />

The numeric keys on the display can be used to enter values in the input field. The values are accepted by<br />

pressing 'Enter'. Pressing a numeric key changes to input mode. The input value is displayed directly in the<br />

output field below for checking.<br />

4.2.1.10.2 Changing the LED Status<br />

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

The 'F1' LED key blinks depending on the "LedCtrl" variable value. This value can also be monitored and/or<br />

manipulated by the 'Watch' function in Automation Studio.<br />

234 4.2.1.10 CAN − Step 10: Test Operations


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

4.2.1.10.3 Increment/Decrement<br />

The 'LedCtrl' variable can be changed using the 'F2' (increment) and 'F3' (decrement) keys. This changes the<br />

'F1' LED status during runtime.<br />

You are now familiar with the essential steps involved in creating a <strong>Visual</strong> <strong>Components</strong> project. Other functions<br />

can be found in the online help.<br />

4.2.2 Compact IPC2002 − Example<br />

Creating a <strong>Visual</strong> <strong>Components</strong> application is described in the following steps with special emphasis given to<br />

graphic elements (button, bitmap, ListBox) as well as input using a touch display (HotSpot, button). In this<br />

example, the target platform is an IPC2000 Compact with a VGA touch display.<br />

Other touch displays than the one given in the example can also be used since the defined elements of<br />

individual pages can also fit on smaller displays (1/4 VGA). Larger displays can also be used problem−free. An<br />

IPC5000 with a suitable touch display can also be used in place of an IPC2000.<br />

Note:<br />

If you use different hardware than is suggested here, make sure that you select the correct hardware in the<br />

<strong>Visual</strong> <strong>Components</strong> project. This must always match the hardware which is actually used!<br />

This example application is divided into the following sections:<br />

1. Creating a New Automation Studio Project<br />

2. Inserting a Display<br />

3. Inserting PV Variables<br />

4. Applying Global Settings to <strong>Visual</strong> <strong>Components</strong><br />

5. Adding Pages<br />

6. Adding Bitmaps<br />

7. Creating a Text Group<br />

8. Creating HotSpots for Page Changing<br />

9. Page 1: Inserting a Dynamic Bitmap<br />

10. Page 2: Inserting an Ellipse whose Fill Color Can Be Dynamically Changed Using Input<br />

11. Page 3: Inserting a ListBox with Control Buttons<br />

12. Compiling and Transferring the Project<br />

13. Testing Functions<br />

4.2.2.1 IPC − Step 1: Creating a New Automation Studio Project<br />

First, start a new project using Automation Studio. For this, select "New Project..." from the "File" menu. This will<br />

start the Project Wizard. Use "vc_ipc" as the project name (max. 8 characters). Proceed by clicking on the Next<br />

button in the Wizard.<br />

4.2.1.10 CAN − Step 10: Test Operations 235


Next, the CPU to be used must be selected. For this, select a "1A4601.02" CPU from the IPC2000 series.<br />

Continue by pressing the Next button.<br />

All selected settings are summarized one more time in the final view. The Wizard is ended once you click on<br />

Finish.<br />

The new project is now ready to go.<br />

4.2.2.2 IPC − Step 2: Inserting a Display<br />

The easiest way to begin a new visualization project is to insert the desired display.<br />

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

To do so, right click in the empty space to the left of the 'Display' label in the hardware tree and select Insert...<br />

from the shortcut menu.<br />

236 4.2.2.2 IPC − Step 2: Inserting a Display


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

A list of all supported displays is displayed. Select the entry '5D2210.0C' from this list for a Compact IPC with a<br />

10.4 inch VGA color display with touch screen and confirm by clicking OK.<br />

In the 'Enter Panel Name' dialog box, the new display is connected with a panel object (<strong>Visual</strong> <strong>Components</strong><br />

project). So that you don't have to create the new panel object manually, the dialog box offers the opportunity to<br />

create this by simply entering a new object name in the input field. This new panel object is automatically<br />

connected to the display which is already inserted. In this example, enter the name 'ipcpanel' in the input field<br />

and confirm the input with OK.<br />

4.2.2.2 IPC − Step 2: Inserting a Display 237


Automation Studio now has all necessary information and will create the new panel object. It is already correctly<br />

connected with the display being used. Hardware assignment, as you are probably accustomed to when using<br />

I/O variables, no longer needs to be taken care of separately for the panel object.<br />

The configuration dialog box is displayed after the inserted panel and touch display are defined.<br />

Settings are accepted with 'OK'.<br />

The newly created panel object is immediately opened for editing:<br />

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

238 4.2.2.2 IPC − Step 2: Inserting a Display


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

Go back to the main Automation Studio project window for a moment to see which changes have been made to<br />

the project.<br />

As you can see, the Wizard not only created your new panel object with the name "ipcpanel", it has also added<br />

all the necessary drivers and system modules to the project. For some target systems, system settings must<br />

also be changed. This is done automatically. All changes made to the configuration are shown for your<br />

information.<br />

You have now completed all necessary preparations and can continue to the next step where you will begin<br />

programming the controller and setting up pictures for the visualization.<br />

4.2.2.3 IPC − Step 3: Inserting PV Variables<br />

In this step, you will create a few variables for our example project. The following two possibilities exist for this:<br />

• Inserting Using the Variable Declaration Dialog Box<br />

4.2.2.3 IPC − Step 3: Inserting PV Variables 239


• Inserting a Cyclic Task<br />

4.2.2.3.1 Inserting Using the Variable Declaration Dialog Box<br />

In the Software view, right click on CPU. Choose Declaration from the shortcut menu. The variable declaration<br />

dialog box is now open.<br />

Place the mouse pointer anywhere in the empty area of the variable list. Right mouse click and select New<br />

Variable from the shortcut menu. Enter the name of the variable, in this case "Bmpldx". Pressing "Enter" creates<br />

the variable.<br />

Now double−click in the "Type" column to specify the data type for the variable.<br />

Choose data type UINT for an unsigned 16 bit integer value and confirm with OK.<br />

Now define the rest of the variables as shown in the following image.<br />

To save memory, variables are only sent to the controller if they are used in at least one control task. To meet<br />

this requirement, we will create a very small task in Automation Basic which uses these variables.<br />

Right click on CPU and choose Insert Object... from the shortcut menu.<br />

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

240 4.2.2.3 IPC − Step 3: Inserting PV Variables


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

This will open the Insert Object Wizard.<br />

Select Cyclic Object to add a normal task to the project. Confirm your selection by clicking Next. The next<br />

window of the Insert Object Wizard is displayed.<br />

4.2.2.3 IPC − Step 3: Inserting PV Variables 241


Enter the name "dummy," set the type to "B&R Automation Basic", and select the resource "Cyclic #8 − [10<br />

ms]". Confirm your selection by clicking Finish.<br />

A new editor window for entering source code for the new task is displayed. Enter the source code seen below<br />

in the image:<br />

Save your input by clicking on the icon in the toolbar and then close the editor window.<br />

These variables now suffice for this example. In an actual project, the variables would not just be assigned to<br />

themselves. Instead, they would normally be used as calculation elements for the control tasks.<br />

We have now created the necessary variables and can move on to the Next Step.<br />

4.2.2.3.2 Inserting a Cyclic Task<br />

Advanced users can use a programming language to insert a cyclic task in the system. The variables to be used<br />

are created according to the programming language which is used. For our example, we will use a simple ANSI<br />

C task. In this programming language, the variables are defined as a part of the source code.<br />

In the following, you can see the necessary C source code which defines the same variables used in the<br />

previous section. For information about integrating an ANSI C task, please refer to the Automation Studio Help.<br />

/* Begin C Source */<br />

#include <br />

#include <br />

_GLOBAL UINT BmpIdx;<br />

_GLOBAL USINT LBCurIdx;<br />

_GLOBAL USINT LBSelIdx;<br />

_GLOBAL USINT LBButtonDown;<br />

_GLOBAL UINT ObjColor;<br />

_INIT void C_Prog_init(void) /* Init procedure */<br />

{<br />

BmpIdx = 0;<br />

LBCurIdx = 0;<br />

LBSelIdx = 0;<br />

LBButtonDown = 0;<br />

ObjColor = 0;<br />

}<br />

_CYCLIC void C_Prog_cycle(void) /* Cyclic procedure */<br />

{<br />

}<br />

/* End C Source */<br />

Once the C task has been inserted, we can proceed to the next step.<br />

4.2.2.4 IPC − Step 4: Applying Global Settings to <strong>Visual</strong> <strong>Components</strong><br />

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

If you double−click on the "ipcpanel" panel object in the software view, the <strong>Visual</strong> <strong>Components</strong> editor opens with<br />

the global project options showing.<br />

242 4.2.2.3 IPC − Step 3: Inserting PV Variables


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

For this simple example, no special settings are required. We can continue directly to the next step.<br />

4.2.2.5 IPC − Step 5: Adding Pictures<br />

This project should be composed of a total of 3 pictures. One of these pictures is automatically generated and<br />

defined as the start picture of the project when the project is created. This picture is called 'INIT_PC'. In this<br />

step, you will add two additional pictures so that three pictures are available overall.<br />

To do this, right click on Pictures in the <strong>Visual</strong> <strong>Components</strong> project tree. Select "New" from the shortcut menu<br />

which appears.<br />

A new item is then entered under the Pictures node. A picture name must now be entered. Give this picture the<br />

4.2.2.5 IPC − Step 5: Adding Pictures 243


name 'PAGE2'.<br />

Repeat this procedure to create "PAGE3".<br />

At the end, the project tree should look like the one shown above.<br />

Before you can configure the 3 pictures, a few preparations must be made in the next steps to guarantee their<br />

planned functionality.<br />

4.2.2.6 IPC − Step 6: Adding Bitmaps<br />

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

Since a dynamic bitmap is eventually created on Page 1 ("INIT_PIC"), the bitmaps which will make up that<br />

dynamic bitmap must be inserted first.<br />

In case you noticed the two bitmaps already present in the project tree, they offer interactive touch input, where<br />

touching an input field inserts the appropriate bitmap automatically. For this reason, these two bitmaps are<br />

added automatically when the project was created.<br />

But now to the bitmaps that you need. Basically, it is possible to add any bitmap. It should be noted however,<br />

that all bitmaps which are used together in a dynamic bitmap must have the same pixel size. In this example,<br />

simply use the monochrome bitmaps included.<br />

First, you must right click on the Bitmaps tree node. A shortcut menu with the New entry appears. Select this<br />

entry using a normal mouse click.<br />

244 4.2.2.6 IPC − Step 6: Adding Bitmaps


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

Since you want to use bitmaps which already exist, select Load Bitmaps from Files in the next dialog box and<br />

click on the Browse... button.<br />

The standard Windows File Open dialog box is displayed to select the bitmaps. Change to the<br />

AS\VCSamples\VC_Demo1.pgp\pgm\NEUERIPC\CPU\<strong>Visual</strong><strong>Components</strong>\vis2\ subdirectory which is within the<br />

directory where you installed Automation Studio. There you will find some bitmaps which can be used in the<br />

project. Highlight these and then click on the Open button (click on the first bitmap and then press and hold the<br />

Shift key while you click on the fifth bitmap. This selects all the bitmaps at one time).<br />

The program switches back to the Project view where you can see the inserted bitmaps.<br />

4.2.2.6 IPC − Step 6: Adding Bitmaps 245


Under the Bitmaps node, you now see your five inserted bitmaps in addition to the 2 default bitmaps. If you click<br />

on the Bitmaps node, a list of the bitmaps and some details (i.e. size in pixels and bytes) are shown in the right<br />

hand window.<br />

4.2.2.7 IPC − Step 7: Creating a Text Group<br />

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

Two text groups are needed to label buttons and act as a data source for the planned ListBox on Page 3 of the<br />

example project.<br />

To insert a new text group, right click on the TextGroups project tree node. Select New from the shortcut menu<br />

which appears.<br />

A new item should be inserted under TextGroups. A name must be given for this text group. In this case, enter<br />

the name 'TG1' for text group 1. Confirm the input with the Enter key.<br />

246 4.2.2.7 IPC − Step 7: Creating a Text Group


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

A table appears on the right side for entering texts into the selected text group. A text entry consists of the text<br />

number in the current group and the actual text.<br />

To insert a text, simply press the Ins key.<br />

This opens the 'Text Input' dialog box. Just enter 'Text1' in the input field and confirm by clicking on the OK<br />

button.<br />

The first entry now appears in the table. Repeat this procedure until the table appears as shown in the image<br />

below:<br />

For the button labels, create a second text group with the name 'TG2' and insert the following text: 'Up', 'Down'<br />

and 'Enter'. To do so, repeat the steps that were described for the 'TG1' text group.<br />

4.2.2.7 IPC − Step 7: Creating a Text Group 247


The entries 'TG1' and 'TG2' should now appear in the project tree under TextGroups. Clicking on either of the<br />

text groups displays its contents in the right−hand window. These texts can be modified at any time.<br />

4.2.2.8 IPC − Step 8: Creating HotSpots for Changing Pictures<br />

Before configuring the individual pictures, you should first set up navigation between them. In this example, a<br />

simple switch sequence is implemented in the order 'INIT_PIC' −−> 'PAGE2' −−> 'PAGE3' −−> 'INIT_PIC' −−><br />

etc.<br />

Since a touch display will be used, an area must be defined on each page for triggering the page change by<br />

touch. In <strong>Visual</strong> <strong>Components</strong>, these areas are known as 'HotSpots'. HotSpots are rectangular, invisible areas on<br />

a page, which can be assigned the same functions as 'real' function keys. It could therefore be said that<br />

HotSpots, as well as touch buttons, are virtual function keys.<br />

To insert a HotSpot on the 'INIT_PIC' page, click on the 'INIT_PIC' entry under Pictures in the project tree. The<br />

blank area of your first page appears in the right−hand window.<br />

Click on the icon in the toolbar and select HotSpot from the menu.<br />

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

248 4.2.2.8 IPC − Step 8: Creating HotSpots for Changing Pictures


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

The cursor changes to the positioning crosshair . Set your editor window in such a way that you have the<br />

bottom right corner in the picture (if necessary, use the scrollbars on the right−hand and bottom edges of the<br />

editor window). Click a little ways to the upper left of the lower right corner (in the editor area) and drag the<br />

corresponding rectangle to the lower right corner while holding the left mouse button down. Once there, release<br />

the mouse button.<br />

Now a rectangle is located in the lower right corner as shown in the following image.<br />

Other fields are also placed in the picture using the same method as the HotSpot: After selecting the desired<br />

field, the mouse marks the area in the picture which should be covered by this field.<br />

Now click on in the toolbar to change back to editor mode. The mouse pointer assumes its original form<br />

again. Clicking on the HotSpot now causes black squares to appear on the border which can be clicked and<br />

dragged to change the size of the HotSpot. The cursor also changes to 'move' mode if it is placed over the<br />

HotSpot while it is 'active'. When this is the case, you can move the HotSpot by holding down the left mouse<br />

button and 'dragging' it.<br />

Using these editor functions should allow you to position the HotSpot exactly in the lower right corner if it is not<br />

already there.<br />

Now right click on the HotSpot. Select Object Properties from the shortcut menu.<br />

The HotSpot object dialog box appears. Switch from the Parameter tab to the Action tab. The Key Type field<br />

contains supported functions which can be triggered when the HotSpot is touched. Select the entry 'Change<br />

Picture' from the list.<br />

4.2.2.8 IPC − Step 8: Creating HotSpots for Changing Pictures 249


Another field called Target Picture appears. It contains all of the pictures present in the current project. Select<br />

the picture from there which should be switched to when the HotSpot is triggered. In this case, select 'PAGE2'<br />

since INIT_PIC (the page containing this current HotSpot) should switch to 'PAGE2'.<br />

Click on OK to confirm this setting.<br />

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

To simplify the procedure for the other 2 pages, copy the HotSpot using the tool. Then switch to 'PAGE2' by<br />

clicking on it in the project tree. Paste the HotSpot using . It appears in the upper left corner of the page.<br />

250 4.2.2.8 IPC − Step 8: Creating HotSpots for Changing Pictures


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

Drag the HotSpot to the lower right corner, as explained above. Open the 'Object Properties' dialog box and<br />

change the target page to 'PAGE3' under the Action tab. Follow the same procedure for 'PAGE3'. Here, you will<br />

set 'INIT_PIC' as the target page.<br />

In order to make the picture−changing function recognizable in the picture, write 'Next−>' in the rectangle<br />

covered by the HotSpot. In this way, the picture can be changed by touching the text while the visualization<br />

application is running.<br />

To do this, select the text icon from the toolbar. The cursor changes to the positioning crosshair . Click<br />

in the left area of the rectangle. The Text Object dialog box appears and prompts you for text entry. Type<br />

'Next−>' and confirm with 'Enter'. Then close the dialog box by clicking 'OK'.<br />

Switch back to editor mode by selecting from the toolbar. You can now properly align the text as you did<br />

before with the HotSpot if it didn't look quite right when it was inserted.<br />

Copy the text (same method as copying HotSpots) with Copy −> Paste on each of the other pages so that the<br />

HotSpots there can also be made 'visible'.<br />

4.2.2.9 IPC − Step 9: Page 1 (INIT_PIC) − Inserting a Dynamic Bitmap<br />

After all the preparations in the previous steps, all requirements have now been met to allow us to begin<br />

arranging the first picture of the example visualization. Our goal is to insert a dynamic bitmap object into the<br />

picture and to select the currently displayed bitmap using 2 buttons.<br />

For this, switch to the first picture 'INIT_PIC' (click on it in the project tree). Nothing should be visible on this<br />

4.2.2.9 IPC − Step 9: Page 1 (INIT_PIC) − Inserting a Dynamic Bitmap 251


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

page except the HotSpot inserted earlier for the page change. Click on the icon for output objects in the<br />

toolbar. Select Output Bitmap Graphic from the menu.<br />

The cursor switches to the positioning crosshair . Click on the center of the page. This opens the Bitmap<br />

Graphic dialog box. Upon opening, the table in the Bitmaps area is blank. Using the Add button, you can insert<br />

bitmaps which are present in the project into the list (see Step 6). When you click on Add, a combo box appears<br />

which contains all available bitmaps. Select the first one. Repeat this process until all five bitmaps appear in the<br />

table.<br />

Now a variable still has to be specified which is responsible for determining which bitmap should be currently<br />

displayed. This can be done by clicking on Assign... in the Data Point area.<br />

This opens the Variable dialog box. Expanding the 'GLOBAL' node displays the variables inserted in Step 3.<br />

Click on 'Bmpldx' and confirm the selection by clicking OK.<br />

252 4.2.2.9 IPC − Step 9: Page 1 (INIT_PIC) − Inserting a Dynamic Bitmap


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

The Bitmap Graphic dialog box should now look like this:<br />

Confirm the input by clicking OK.<br />

4.2.2.9 IPC − Step 9: Page 1 (INIT_PIC) − Inserting a Dynamic Bitmap 253


In the editor window, you now see the first bitmap from the list of bitmaps defined earlier. Switch back to editor<br />

mode by clicking on in the toolbar. If you click on the bitmap now, then it becomes highlighted and can be<br />

moved.<br />

In order to see later which bitmap (index) in the list is current, insert a numeric output field underneath the<br />

dynamic bitmap object.<br />

For this, click on the Output symbol in the toolbar and select Output Numeric.<br />

Using the positioning crosshair, click underneath the bitmap object.<br />

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

In the Output Numeric 'Properties' dialog box which appears, the field must still be connected with the 'Bmpldx'<br />

variable. To do so, you can use the field in the Data Point area to select the variable instead of having to use the<br />

Variable Dialog Box. It contains variables which are already being used in the visualization project.<br />

254 4.2.2.9 IPC − Step 9: Page 1 (INIT_PIC) − Inserting a Dynamic Bitmap


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

Once the dialog box looks like the one shown here, confirm your input with OK. Adjust the position of the input<br />

field in the editor so that it is centered directly below the bitmap object.<br />

Since you have a dynamic bitmap object and an output field which contains the current index, you now need to<br />

insert two touch buttons (one to the right of the bitmap, and one to the left) so that the index can actually be<br />

changed.<br />

Touch buttons are handled the same way as HotSpots except for their visual appearance. Therefore, if<br />

something is unclear to you in the following paragraphs, read over Step 8 again.<br />

Touch buttons are inserted by selecting 'Touch Button' from the menu after clicking on the 'Touch Key' icon in<br />

the toolbar. Now draw a button (just like with a HotSpot) to the left of the bitmap object. Choose the size in such<br />

a way that the key can later be operated easily on the touch screen.<br />

Open the 'Object Properties' dialog box for the button and switch to the Appearance tab. You are able to set the<br />

visual appearance of the button here.<br />

The font and border width should not be changed in this example. The button label must naturally be adjusted.<br />

To do so, select the entry 'TG2' from the Text Group combo box in the Released Button area. All texts from text<br />

group 'TG2' are now contained in the Text combo box. Select 'Down'.<br />

Do the same thing for the Pressed Button area.<br />

4.2.2.9 IPC − Step 9: Page 1 (INIT_PIC) − Inserting a Dynamic Bitmap 255


Once the dialog box looks like the one shown above, switch to the Action tab. Once there, select the<br />

'Increment/Decrement' entry from the Key Type combo box.<br />

Further settings for this key type will then appear. In the Data Point area, select 'Bmpldx' from the Source combo<br />

box to use it as the variable to be manipulated. In addition, activate the Use Limits option. Restrict the value<br />

range using Limit Min 0 and Limit Max 4. Then set the Increment to −1 (the variable is therefore decreased by<br />

one with each activation of the button).<br />

Confirm the input by clicking OK.<br />

Now copy the 'Down' button and insert a copy of it to the right of the bitmap. Then edit the copy so that 'Up' is<br />

selected as the text under the Appearance tab, and the Increment under the Action tab is set to 1. In this way,<br />

the button increases the 'Bmpldx' variable by 1 when pressed.<br />

Now the center of the 'INIT_PIC' looks like the following image.<br />

4.2.2.10 IPC − Step 10: Page 2 − Ellipse with a Dynamic, Changeable Fill Color<br />

In the next picture, 'Page 2', you will draw an ellipse whose fill color can be changed during runtime using a<br />

variable.<br />

First, we will draw the ellipse. To do this, select the icon from the toolbar. With the positioning crosshair,<br />

'drag' the ellipse to any size somewhere near the center of the page.<br />

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

256 4.2.2.10 IPC − Step 10: Page 2 − Ellipse with a Dynamic, Changeable Fill Color


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

Then open the 'Object Properties' dialog box for the ellipse and switch to the Colors tab. Switch off the Use<br />

Global option, select the Fill property, and connect the 'ObjColor' variable with the ellipse using the Assign...<br />

button in the Colors Variable area. Confirm your input by clicking OK.<br />

Next, insert a numeric input field underneath the ellipse. To do this, select the input icon from the toolbar and<br />

choose the Input Numeric entry from the menu that appears.<br />

Click underneath the ellipse with the positioning crosshair to position the input field. The 'Input Numeric' dialog<br />

box appears. Connect the input field in the Data Point area to the 'ObjColor' variable using the Source combo<br />

field.<br />

4.2.2.10 IPC − Step 10: Page 2 − Ellipse with a Dynamic, Changeable Fill Color 257


After confirming the input with OK, 'PAGE2' should look like the following image:<br />

4.2.2.11 IPC − Step 11: Page 3 − Inserting a ListBox with Control Buttons<br />

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

A ListBox is created on 'PAGE3' (the third and final picture). In addition to highlighting the current item, this<br />

ListBox allows the currently selected item to be rewritten to another variable in the form of its index.<br />

First, insert the ListBox. To do this, select the output symbol in the toolbar and the ListBox entry from the menu.<br />

258 4.2.2.11 IPC − Step 11: Page 3 − Inserting a ListBox with Control Buttons


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

Using the positioning crosshair, 'drag' the ListBox a little bit to the left of the center of the picture. The size is not<br />

important right now since you will set it it the 'Object Properties' dialog box. When you have drawn the ListBox,<br />

open the 'Object Properties' dialog box.<br />

Select the Gfont2x2 font from the Font combo box in the Appearance area at the very top of the Parameter tab.<br />

Set Max. Text Length to 8 and Rows to 6. The ListBox now has a maximum width of 8 characters and is 6 lines<br />

high.<br />

Text group 1 ('TG1'), which was set a few steps earlier, will be the data source. For this, choose the entry 'TG1'<br />

from the Text Group combo box found in the Source of Texts area.<br />

Now the variable which is responsible for the currently selected entry has to be set. This is controlled by the<br />

index, i.e. the numeric value of the variable corresponds to the position of the text in the text group. To do this,<br />

select the 'LBCurldx' variable using the Assign... button in the Selected Item area.<br />

When you are finished with the settings, confirm with OK.<br />

Now create two buttons with the function 'Increment/Decrement' and label them 'Up' and 'Down'. Connect these,<br />

as well as a numeric output field with the 'LBCurldx' variable. These elements are created as described in Step<br />

9. For the output field, you should also use the 'Gfont2x2' font. The limits for the function 'Increment/Decrement'<br />

must correspond to the number of texts in the 'TG1' text group (10), so they should be set from 0 to 9.<br />

Tip:<br />

You can also copy the respective screen elements from 'INIT_PIC' and paste them in the picture. Corresponding<br />

changes can then be made to the settings. In this way, many similar fields in a project can later be created<br />

quickly and efficiently.<br />

You should then have an picture like the one shown here.<br />

4.2.2.11 IPC − Step 11: Page 3 − Inserting a ListBox with Control Buttons 259


Now you will add the function which copies the index of the current selection to an additional variable when a<br />

key is pressed.<br />

First you will need a touch button whose Key Type under the Action tab is set to "Momentary USINT". In the<br />

Data Point area, select the variable 'LBButtonDown' using the Assign... button and enter the number 1 as Value<br />

1. This button function means that the 'LBButtonDown' variable keeps the value 1 as long as the button is<br />

pressed down on the screen. If the button is released, then the variable is set back to the value 0.<br />

Under the Appearance tab, choose 'Enter' from the Text combo box.<br />

Confirm the input by clicking OK.<br />

Next to the new 'Enter' button, add a numeric input field which is connected to the 'LBSelldx' variable. The value<br />

of the currently selected entry is stored in this variable after the 'Enter' button is pressed.<br />

The finished picture is shown in the following image:<br />

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

260 4.2.2.11 IPC − Step 11: Page 3 − Inserting a ListBox with Control Buttons


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

The Automation Basic task 'dummy' has to be expanded a bit for the 'Enter' button to function properly. The<br />

variables are now executed in the Init−SP part of the task. The Init−SP part can be shown if you move the<br />

'splitter' on the upper border of the source code window to the middle (see image).<br />

The IF condition is true so long as the 'Enter' button is pressed. Then the contents of the LBCurldx variable<br />

(which contains the current index of the ListBox) are copied to the LBSelldx variable which is displayed in a<br />

separate output field in this example. In a real application, this type of function could be used for loading or<br />

saving a recipe.<br />

This ends the configuration process of the example project. The next step concerns compiling and transferring<br />

the project to Automation Runtime.<br />

4.2.2.12 IPC − Step 12: Compiling and Transferring the Project<br />

Save the changes to the project and close the panel object. Now you are ready to compile the project and<br />

transfer it to the controller.<br />

Click on the icon in the toolbar to compile the project. This doesn't just affect the panel object; all<br />

components in the project that have been changed or added are compiled. Compilation progress is displayed.<br />

4.2.2.12 IPC − Step 12: Compiling and Transferring the Project 261


If the compilation was successful, then the following dialog box prompts you to transfer the project. Just click on<br />

Transfer and Automation Studio transfers all necessary components to the controller.<br />

A progress indicator is displayed once again while the project is being transferred.<br />

The configuration of the controller is updated if it has changed or hasn't been set yet. Since the controller has to<br />

be restarted for this, the following dialog box is shown:<br />

Confirm with Yes to update the configuration and transfer the project to the controller.<br />

After compiling and transferring the project, you will see the start picture of the "INIT_PIC" panel object on the<br />

target system display. In the next step, you will test the application that you have just created.<br />

4.2.2.13 IPC − Step 13: Test Operations<br />

After you have transferred the project to the controller, the 'INIT_PIC' start page which you configured should be<br />

displayed on the IPC screen. You have now implemented the following functions in your project:<br />

4.2.2.13.1 Page 1: Dynamic Bitmap<br />

The first picture contains a dynamic bitmap which can be adjusted using the two touch buttons located on its left<br />

and right sides. The number of the currently displayed bitmap is shown in the output field underneath the bitmap<br />

object.<br />

Using the HotSpot in the lower right corner takes you to 'PAGE2'.<br />

4.2.2.13.2 Page 2: Ellipse with a Dynamic Fill Color<br />

This picture displays an ellipse which is filled in with the color which is numerically represented by the input field<br />

located directly underneath it. The input field must be pressed to change the value. A numeric keypad is then<br />

opened to enter the value. After confirming the entry, the ellipse is displayed with the selected color.<br />

Using the HotSpot in the lower right corner takes you to 'PAGE3'.<br />

4.2.2.13.3 Page 3: ListBox with Selection Confirmation<br />

This picture contains a ListBox with 10 items, 'Text1' to 'Text10'. 6 texts are displayed simultaneously. The<br />

selected item is changed using the "Up" and "Down" buttons (the selection bar moves up or down). The output<br />

field between the buttons shows the index of the currently selected item. Using the 'Enter' button, the currently<br />

selected item or index can be saved to another variable which is connected to the output field on the right side of<br />

the 'Enter' button.<br />

Pressing the HotSpot in the lower right corner takes you back to Page 1 − the 'INIT_PIC'.<br />

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

262 4.2.2.13 IPC − Step 13: Test Operations


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

4.2.3 Getting Started with the VISAPI Programming Interface<br />

This section contains an introduction to the <strong>Visual</strong> <strong>Components</strong> programming interface. Using this interface,<br />

many interesting additions can be created which cannot be configured using the <strong>Visual</strong> <strong>Components</strong> editor (i.e.<br />

trend).<br />

Interface functions are called using either functions or function blocks. Calling methods depend on which<br />

programming language is used. Our examples, which are written in C and Automation Basic, use functions.<br />

This section is for new users of the <strong>Visual</strong> <strong>Components</strong> programming interface and contains basic steps for<br />

interface "start−up", including simple function calls which execute character functions.<br />

Knowledge of Automation Basic or the C programming language is necessary in this section. If you do not<br />

possess this knowledge, please refer to the corresponding section of the Automation Studio documentation.<br />

These are the individual steps of the application example:<br />

1. Inserting a Visapi Library<br />

2. Inserting a Cyclic Task<br />

3a. C Example Part 1<br />

3a. C Example Part 2<br />

3b. Automation Basic Example<br />

4.2.3.1 Visapi − Tutorial − Inserting the Visapi Library<br />

The Visapi interface is integrated as a library in the Automation Software. The Library Manager must therefore<br />

be opened first to insert the Visapi library into your project.<br />

To do this, click on Open in the menu bar and select Library Manager from the menu.<br />

The Library Manager window appears on the screen. The 'runtime' library is already visible in the library tree.<br />

This is the standard library inserted in each Automation Studio project. Now the necessary Visapi library must be<br />

inserted into the existing library list.<br />

To do this, click on the Insert menu and select the Library entry.<br />

4.2.3 Getting Started with the VISAPI Programming Interface 263


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

The Insert Library dialog box is displayed. Select the Add Library option and search for the Visapi library in the<br />

library list. Select it with the mouse and then click OK.<br />

If this was done properly, you should see the Visapi library in the left−hand window of the Library Manager. If the<br />

Visapi tree is expanded, then all library functions are displayed. Now click on any function to display its<br />

parameters in the right−hand window. Pressing the F1 key takes you directly to the corresponding help for the<br />

selected function.<br />

264 4.2.3 Getting Started with the VISAPI Programming Interface


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

4.2.3.2 Visapi − Tutorial − Inserting a Cyclic Task<br />

In this step, you will insert a cyclic task which will execute your special character commands using Visapi<br />

functions.<br />

Switch to the software view of your Automation Studio project. Click on CPU and then select Insert Object....<br />

4.2.3.2 Visapi − Tutorial − Inserting a Cyclic Task 265


The "Insert Object" dialog box opens up.<br />

Select Cyclic Object and then click on Next.<br />

First, you will select a name for your task in the 'New Object' dialog box which appears. Use 'Visu' for this<br />

example. In addition, you can select the desired programming language for this task in the Type combo box. For<br />

this example, you can choose either 'B&R Automation Basic' or 'C Language' (ANSI C); therefore, choose<br />

whichever you prefer.<br />

Lastly, select the desired task class under Resource (for this example, preferably 'Cyclic #3 − [50 ms]') and<br />

confirm all of your selections with the Finish button.<br />

Choose your next step depending on whether you selected Automation Basic or C:<br />

Automation Basic Example<br />

C Example<br />

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

266 4.2.3.2 Visapi − Tutorial − Inserting a Cyclic Task


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

4.2.3.3 Visapi − Tutorial − Automation Basic Example<br />

After the Automation Basic task has been inserted, Automation Studio opens up the editor for input and is ready<br />

to create the new task.<br />

A rectangle, a line, and an ellipse should be drawn in this example. A text should also be output.<br />

To do this, input the following program code in the Initialization part of the task (Init−SP):<br />

(* init program *)<br />

x1 = 100<br />

y1 = 150<br />

x2 = 250<br />

y2 = 250<br />

height = 40<br />

width = 80<br />

fill = 255 ; Transparent<br />

color = 0 ; Black<br />

ready = 0<br />

Now input the following program code for the cyclic part of the task:<br />

(* cyclic program *)<br />

If ready 1 Then<br />

VC_HANDLE = VA_Setup(1 , "vga")<br />

If VC_HANDLE 0 Then<br />

ready = 1<br />

EndIf<br />

EndIf<br />

If ready = 1 Then<br />

If VA_Saccess(1,VC_HANDLE) = 0 Then<br />

VA_Rect(1,VC_HANDLE,x1,y1,x2,y2,fill,color) ;Draws a rectangle<br />

VA_Line(1,VC_HANDLE,x1,y1,x2,y2,color) ;Draws a line<br />

VA_Ellipse(1,VC_HANDLE,x2,y2,heigth,width,fill,color) ;Draws an ellipse<br />

;Outputs a text<br />

VA_Textout(1,VC_HANDLE,1,100,100,color,fill,"A rectangle, a line, and an ellipse")<br />

VA_Srelease(1,VC_HANDLE)<br />

EndIf<br />

EndIf<br />

You can naturally use the Windows Clipboard to copy this source code into Automation Studio.<br />

Declare the variables to be used as shown in the following image:<br />

4.2.3.3 Visapi − Tutorial − Automation Basic Example 267


The program is very short and constrained on purpose to encourage experimentation. It would be best to<br />

compile the program now and load it to Automation Runtime. But first change the 'vga' string variable in the<br />

VA_Setup function in the cyclic part and replace it with the name of the visualization project to which output<br />

should take place.<br />

Expand the program to include more output or change the parameters either in the program or using the Watch<br />

command in Automation Studio. If necessary, use the Visapi Documentation in the reference manual to refer to<br />

details.<br />

The following is a brief overview of the example code:<br />

• Some variables are defined in the Initialization part of the task which mostly serve as place holders for<br />

the position and color of the elements to be drawn. An exception is the ready variable. This variable<br />

makes a note of whether the Visapi library was completely and successfully initialized.<br />

• Using VA_Setup, the first part of the program establishes a connection to the <strong>Visual</strong> <strong>Components</strong><br />

interpreter or to its management routine (aplib.br), the runtime. This is necessary, since both the<br />

interpreter and the Visapi functions access the same resources, and accessing these resources must be<br />

managed.<br />

• If the function is successful, a unique VCHandle is returned. This is necessary since several <strong>Visual</strong><br />

<strong>Components</strong> projects can run at the same time. Therefore an exact differentiation must be made<br />

regarding the destination of the Visapi functions (to which project and also to which display).<br />

Subsequently, the handle must be transferred with every other Visapi function.<br />

• If VA_Setup fails (returns 0) , then the function in the example is called cyclically until a valid handle is<br />

returned. As soon as VA_Setup was successfully executed and a handle is available, the ready<br />

variable is set to 1 and the actual working part of the task is 'released'.<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.3.4 Visapi − Tutorial − Preparing the C Example<br />

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

If you decided to use an ANSI C implementation, then a dialog box opens with the title 'Add C Files'. First you<br />

create a new C file which contains the program. To do this, input 'visu.c' under File Name (without the single<br />

quotes) and confirm with Add.<br />

268 4.2.3.4 Visapi − Tutorial − Preparing the C Example


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

To program in C, the necessary libraries must be added manually. For this, right click on the 'visu' C task that<br />

you inserted previously and select Insert File... from the shortcut menu.<br />

The 'Add C Files' dialog box appears again. To use Visapi library functions in our C task, the file 'libvisapi.a' and<br />

the header file 'visapi.h' must be added to the task.<br />

To find these files, switch from the CPU directory − where the 'visu.c' file is located − to three directories higher<br />

(with the icon in the dialog box). From here, change to the 'Library' directory and then to the 'visapi' directory.<br />

Depending on the type of CPU you are using, select the 'i386' directory (for Automation Runtime systems −<br />

IPC2000, IPC5000, and CP3xx) or the 'm68k' directory (for older CPU models).<br />

Mark both of the files named above and confirm with Add.<br />

4.2.3.4 Visapi − Tutorial − Preparing the C Example 269


The C editor is opened by double−clicking on the 'visu.c' file in the Software view.<br />

You will create the actual program in the next step.<br />

4.2.3.5 Visapi − Tutorial − Finishing the C Example<br />

A rectangle, a line, and an ellipse should be drawn in this example. A text should also be output.<br />

To do this, input the following program code in the 'visu.c' file:<br />

#include<br />

#include #include _LOCAL UINT ready; _LOCAL UINT x1; _LOCAL<br />

UINT x2; _LOCAL UINT y1; _LOCAL UINT y2; _LOCAL USINT fill; _LOCAL USINT color; _LOCAL UINT heigth;<br />

_LOCAL UINT width; _LOCAL UDINT VC_HANDLE; _INIT void Initialization(void) { x1 = 150; y1 = 100; x2<br />

= 100; y2 = 150; fill = 255; /* Transparent */ color = 0; /* Black */ heigth = 40; width = 80; ready<br />

= 0; } _CYCLIC void Cyclic(void) { if (!ready) { VC_HANDLE = VA_Setup(1 , "vga"); if (VC_HANDLE) ready<br />

= 1; } if (ready) { if (!VA_Saccess(1,VC_HANDLE)) /* Reserves access to the visualization */ {<br />

VA_Rect (1,VC_HANDLE,x1,y1,x2,y2,fill,color); /* Draw rectangle */ VA_Line<br />

(1,VC_HANDLE,x1,y1,x2,y2,color); /* Draw line */ VA_Ellipse<br />

(1,VC_HANDLE,x2,y2,height,width,fill,color); /* Draw ellipse */ /* Text output */ VA_Textout<br />

(1,VC_HANDLE,1,50,50,color,fill,"A rectangle, a line, and an ellipse"); VA_Srelease(1,VC_HANDLE);<br />

/* Releases the visualization */ } } }<br />

You can naturally use the Windows Clipboard to copy this source code into Automation Studio.<br />

The program is very short and constrained on purpose to encourage experimentation. It would be best to<br />

compile the program now and load it to Automation Runtime. But first change the 'vga' string variable in the<br />

VA_Setup function in the cyclic part and replace it with the name of the visualization project to which output<br />

should take place.<br />

Expand the program to include more output or change the parameters either in the program or using the Watch<br />

command in Automation Studio. If necessary, use the Visapi Documentation in the reference manual to refer to<br />

details.<br />

The following is a brief overview of the example code:<br />

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

• Some variables are defined in the Initialization part of the task which mostly serve as place holders for<br />

the position and color of the elements to be drawn. An exception is the ready variable. This variable<br />

makes a note of whether the Visapi library was completely and successfully initialized.<br />

• Using VA_Setup, the first part of the program establishes a connection to the <strong>Visual</strong> <strong>Components</strong><br />

interpreter or to its management routine (aplib.br), the runtime. This is necessary, since both the<br />

interpreter and the Visapi functions access the same resources, and accessing these resources must be<br />

managed.<br />

• If the function is successful, a unique VCHandle is returned. This is necessary since several <strong>Visual</strong><br />

<strong>Components</strong> projects can run at the same time. Therefore an exact differentiation must be made<br />

regarding the destination of the Visapi functions (to which project and also to which display).<br />

Subsequently, the handle must be transferred with every other Visapi function.<br />

• If VA_Setup fails (returns 0) , then the function in the example is called cyclically until a valid handle is<br />

returned. As soon as VA_Setup was successfully executed and a handle is available, the ready<br />

variable is set to 1 and the actual working part of the task is 'released'.<br />

270 4.2.3.5 Visapi − Tutorial − Finishing the C Example


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


4.2.4.4 Example: Step 4<br />

Project<br />

Name:<br />

Target<br />

System:<br />

BrAutomation\Samples\<strong>Visual</strong><strong>Components</strong>\Step4.pgp<br />

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

Contents: Start page, page change, simple recipe management<br />

Remark:<br />

4.2.4.5 Example: Step 5<br />

Project<br />

Name:<br />

Target<br />

System:<br />

This example demonstrates simple recipe management using dynamic variables in an ANSI C<br />

task. Dynamic variables are used to change the input fields during runtime.<br />

In addition to the recipe system, other dynamic indications can be added.<br />

BrAutomation\Samples\<strong>Visual</strong><strong>Components</strong>\Step5.pgp<br />

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

Contents: Start page, page change, simple output fields, trend recorder demonstration<br />

Remark:<br />

4.2.4.6 Example: Step 6<br />

Project<br />

Name:<br />

Target<br />

System:<br />

Contents:<br />

The use of the VISAPI library is demonstrated with an ANSI C task which draws a trend curve on<br />

the display. The current picture number is ascertained using the PLC variable.<br />

BrAutomation\Samples\<strong>Visual</strong><strong>Components</strong>\Step6.pgp<br />

IPC2001 Compact (AR 2.04) with VGA touch display (640x480 pixels, color)<br />

Start page, page change, bar graph demonstration, alarm system demonstration (with alarm list,<br />

alarm overview, and alarm history), screen saver function.<br />

Remark: The bar graph demonstration shows dynamic changing of variables.<br />

4.2.4.7 Example: Step 7 − CAN<br />

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

Target<br />

System:<br />

7CP476.60−1 (V 2.27) with CAN panel controller 4B1270.00−490 (4 lines of 20 characters,<br />

keys)<br />

Contents: Start page, LED matrix, sting input, scaling<br />

Remark: The LED matrix is accessed and set using input fields<br />

4.2.4.8 Example: Step 8 − VGA / CAN<br />

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

Target<br />

System:<br />

IPC2001 Compact (AR 2.61) with CAN panel controller 4B1270.00−490 (4 lines of 20<br />

characters, keys)<br />

Contents: Screen saver, bar graphs, ListBoxes<br />

Remark: The selected ListBox element is output on the CAN panel.<br />

4.2.4.9 Example: VC_Demo<br />

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

Target System: IPC2002 Compact (AR 2.04) with VGA touch display (640x480 pixels, color)<br />

Contents: Demonstration Application<br />

Remark: Overview of <strong>Visual</strong> <strong>Components</strong> main elements<br />

− Input of numeric and alphanumeric characters using the touch display<br />

− Language switching<br />

− Setting date and time<br />

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

272 4.2.4.4 Example: Step 4


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

− Task visualization<br />

− Simple recipe management<br />

− Alarm system<br />

− Touch calibration<br />

− The VISAPI library functions are displayed using a character demonstration<br />

4.2.4.10 Example: VC_WebDemo<br />

Project<br />

Name:<br />

Target<br />

System:<br />

BrAutomation\Samples\<strong>Visual</strong><strong>Components</strong>\VC_WebDemo1<br />

IPC2002 Compact (AR 2.04) with VGA touch display (640x480 pixels, color)<br />

Contents: Demonstration Application<br />

Remark:<br />

− Task visualization<br />

− Alarm system<br />

After the Brwebsrv.ini file is transferred to the target system (AR 2.04), the ASP files can be<br />

transferred to the Runtime. The files must be transferred to the 'Web' directory for this.<br />

To start the web application, a browser has to load the gesamt.asp page.<br />

Tested with IE 6.0<br />

Note:<br />

− A dongle is required to operate the Web Server module<br />

− Pay attention to the TCP/IP configuration on the target and Windows computers<br />

− Web Server pages must be transferred with FTP (−> Configuration files)<br />

It is recommended to have some experience with internet tecnologies!<br />

4.2.4.11 Example: VC_Alarm<br />

Project<br />

Name:<br />

Target<br />

System:<br />

BrAutomation\Samples\<strong>Visual</strong><strong>Components</strong>\VC_Alarm.pgp<br />

IPC2002 Compact (AR 2.61) with VGA touch display (640*480 pixels, color)<br />

Contents: Demonstration Application<br />

Remark:<br />

The application shows the many capabilities of the alarm system.<br />

It is recommended to have previously read the Alarm System Documentation or to be familiar<br />

with it already.<br />

− Contents directory<br />

− Task simulation for creating alarms<br />

− Screen saver<br />

− Language switching − German/English<br />

− Alarm system<br />

* Alarm history with and without filters in various implementations<br />

* Alarm summary with and without filters<br />

* Alarm lists in 2 different designs with VISAPI function VA_GetAlCurPos<br />

* VISAPI function VA_GetAlarmlist<br />

* Complete overview of all alarms defined in the project and output field states<br />

* Alarm system text with variables − representation on individual pages<br />

4.3 Working with <strong>Visual</strong> <strong>Components</strong><br />

This section of the User's Manual describes the <strong>Visual</strong> <strong>Components</strong> user interface within Automation Studio.<br />

This includes the division of the <strong>Visual</strong> <strong>Components</strong> editor windows and the individual editor views for the<br />

various resources of a <strong>Visual</strong> <strong>Components</strong> project.<br />

In this sense, resources mean the individual components which make up an entire visualization project. These<br />

include pictures, fonts, text groups, etc. These resources, as well as their corresponding <strong>Visual</strong> <strong>Components</strong><br />

editors, are described in the following.<br />

4.2.4.10 Example: VC_WebDemo 273


4.3.1 Resource Types<br />

The resources in the editor are divided into the following elements which are grouped in the tree view on the left<br />

side.<br />

• Pictures<br />

• Variables<br />

• Text Groups<br />

• Bitmap<br />

• Fonts<br />

• Alarms<br />

• Languages<br />

All of the items listed above are managed in the <strong>Visual</strong> <strong>Components</strong> editor. These resources are located in file<br />

format in the directory structure of the project to be edited. All of these resources can be inserted, deleted, and<br />

edited using the editor. There is a specific editor for each resource type.<br />

4.3.2 Creating a <strong>Visual</strong> <strong>Components</strong> Project<br />

A <strong>Visual</strong> <strong>Components</strong> project is part of an Automation Studio project. <strong>Visual</strong> <strong>Components</strong> projects can be<br />

created by adding either hardware suitable for visualization or by adding a panel object and connecting it to the<br />

hardware.<br />

4.3.2.1 Creating a <strong>Visual</strong> <strong>Components</strong> Project<br />

There are two ways to create a project. The usual method begins by inserting visualization hardware. This<br />

automatically opens a Wizard which creates a visualization object and connects it to the hardware.<br />

This procedure is described in detail in the Getting Started section.<br />

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

The second possibility works by creating a software object. This can be assigned to a suitable hardware device.<br />

See Inserting a Panel Object on a PP21 Power Panel.<br />

A software object must be connected to a hardware object (display). This allows the hardware properties to be<br />

accepted by the <strong>Visual</strong> <strong>Components</strong> project.<br />

As shown above, the hardware object (panel '5D2210.0C') is assigned to the software object ('vis_al'). Any<br />

panel object in the AS project can be assigned in the 'Object Name' column. The first 6 characters of a panel<br />

object name must be unique in the project. Assignments should only be changed if there are several objects for<br />

this hardware in the project.<br />

Note:<br />

The software object (VC object) is automatically converted for the new hardware if the assignment is changed.<br />

Information may be lost when changing from VGA to 1/4 VGA! This data cannot be recovered.<br />

The <strong>Visual</strong> <strong>Components</strong> runtime module version is entered in the 'Version' column. All versions are displayed in<br />

this column. The highest version number indicates the most current state. Whenever a selection is made here,<br />

the required VC project drivers and system modules are updated.<br />

The 'Key Matrix Priority' column specifies the priority of the key driver in the system. In this way, the priority of<br />

jog key matrix updates can be determined by requesting them with the VISAPI interface. Therefore, the key<br />

driver can possibly interrupt cyclic tasks. Higher loads can negatively affect the runtime system (=cycle time<br />

274 4.3.1 Resource Types


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

violation).<br />

4.3.2.2 Inserting a Panel Object<br />

In addition to creating a panel object by adding hardware, the possibility also exists to create a software object<br />

and connect it to the hardware.<br />

The first step is to insert a new object in the right side of the project tree. 'Advanced Object' is then selected (see<br />

diagram).<br />

The name, object type ('Panel'), and resource ('Panel Objects') are defined in the next step.<br />

The <strong>Visual</strong> <strong>Components</strong> editor is then opened automatically. As you can see in the diagram, the software object<br />

is still not connected.<br />

4.3.2.2 Inserting a Panel Object 275


By assigning the panel object to a hardware object in the hardware tree, the <strong>Visual</strong> <strong>Components</strong> editor receives<br />

the necessary information for editing the visualization application.<br />

The <strong>Visual</strong> <strong>Components</strong> Editor then applies the properties of the connected hardware:<br />

Several software objects for a panel can be managed in one project using this method. This can be used to<br />

manage multiple visualization devices for one machine type.<br />

4.3.3 Creating Advanced <strong>Visual</strong> <strong>Components</strong> Projects<br />

Creating a complete application is described in the Introduction. Creating and managing a simple <strong>Visual</strong><br />

<strong>Components</strong> project is explained here. Basic project management consists of a panel object connected with a<br />

display object − software and hardware.<br />

Advanced options for <strong>Visual</strong> <strong>Components</strong> project management involve using several software and panel objects<br />

in an Automation Studio project. This section aims to clarify the potential complexity of visualization solutions. To<br />

do this, the concept of object management is illustrated using software and hardware objects. Advantages of<br />

this solution will be demonstrated.<br />

Applications can be implemented in one of the following ways:<br />

• Several Software Objects and One Panel<br />

• Several Software Objects and Several Panels<br />

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

276 4.3.3 Creating Advanced <strong>Visual</strong> <strong>Components</strong> Projects


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

Both of these possibilities can also be used together.<br />

4.3.3.1 Several Software Objects and One Panel<br />

Several software objects can exist for one panel in an AS project. These software objects can be created as<br />

described in Inserting a Panel Object.<br />

Only the software object which is assigned to a display is executed on the target system. The object which is not<br />

used should be disabled.<br />

As shown below, the 'vis_al' software object is assigned to the display panel. This object is executed on the<br />

target system after it is downloaded.<br />

Reassignment in the selection list could also cause the 'vis_al1' object to be executed for a certain machine<br />

type.<br />

The first 6 characters of a panel object name must be different from all other object names in the project. This<br />

applies when several panel objects are managed within a project.<br />

4.3.3.2 Several Software Objects and Several Panels<br />

An AS project can also consist of several objects which are executed on different hardware. Possible examples<br />

of this might include:<br />

• Automation Runtime CPU with a VGA display visualization device and remote CAN panels<br />

• Automation Runtime CPU with several CAN panels<br />

The following consists of a VGA display, a 2x20 character CAN display (4B1270), and a 16x40 character CAN<br />

display.<br />

This view illustrates the complexity of possible <strong>Visual</strong> <strong>Components</strong> solutions.<br />

It allows a wide range of applications. This is how CAN panels can be used for temporary service purposes. For<br />

example, accessing the same variable base allows options to be enabled with a CAN panel.<br />

4.3.3.1 Several Software Objects and One Panel 277


Note for SG3 Automation Runtime System:<br />

When using multiple panel objects on an m68k CPU, performance problems can occur involving memory<br />

capacity and system configuration.<br />

In contrast to i386 target systems, memory capacity is limited on these CPUs.<br />

In addition, operating system configuration is kept to a minimum. In certain situations, it is necessary to increase<br />

the number of semaphores, AVT entries, and cyclic/non−cyclic objects.<br />

After first build of panel object the project system resources are automatically adjusted. Under certain<br />

circumstances, however, this can be insufficient with extensive projects. Contact B&R Support if problems<br />

occur.<br />

4.3.4 Editor Views<br />

The <strong>Visual</strong> <strong>Components</strong> editor has several views for editing pictures. All project resources are displayed in the<br />

tree view on the left. The corresponding editor is shown on the right depending on the selected project option.<br />

Picture editing is active in this view. The process picture can be seen in the upper−right.<br />

4.3.5 Picture Management<br />

Pictures can be added, deleted, renamed, and repositioned in the project using the Picture Manager. A picture<br />

stored in the manager can be edited using the Picture Editor.<br />

4.3.5.1 General Picture Management<br />

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

278 4.3.4 Editor Views


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

The Picture Manager is found in the 'Pictures' section in the upper left of the project tree.<br />

All of the pictures in a project are shown under 'Pictures'. Each picture can be individually named. For controlling<br />

purposes, pictures can also be selected by their picture number. In the view on the right, the number is shown<br />

above the picture name.<br />

All editing actions can be selected in the Picture Manager using a shortcut menu. Each picture has a few global<br />

properties which can be configured in the shortcut menu for the picture. A project can contain a total of 65,535<br />

pictures as long as enough memory is available. The number of picture commands, as well as a 'branch list'<br />

(over the keys), are displayed for the pictures.<br />

The pictures can be viewed sequentially using the "PgUp" and "PgDwn" keys.<br />

Picture management options are explained in the following section. The following actions can be carried out in<br />

the Picture Manager:<br />

• Adding a New Picture<br />

• Deleting a Picture<br />

• Renaming a Picture<br />

• Changing Picture Sequence<br />

• Changing Special Picture Properties<br />

• Defining the Start Picture<br />

• Defining the Global Picture<br />

4.3.5.2 Adding a New Picture<br />

A new picture can be inserted by selecting 'New' from the 'Pictures'<br />

shortcut menu. The 'Blank Page' icon can also be selected from the<br />

toolbar.<br />

A new picture icon is inserted in the tree view. The new picture must<br />

now be named.<br />

The name must be different from all other names in the project or an<br />

error message will appear.<br />

Picture names can have up to 15 characters and may contain spaces<br />

and other special characters.<br />

4.3.5.2 Adding a New Picture 279


Newly created pictures are always added to the bottom of the picture tree. If a new picture is created with the<br />

'INS' key, it will be inserted below the picture selected with the cursor.<br />

The project may contain a maximum of 65,535 pictures.<br />

4.3.5.3 Deleting a Picture<br />

A picture is deleted by selecting 'Delete' from its shortcut menu or by<br />

pressing the 'DEL' key. Deleting can be confirmed with 'OK' as long as<br />

removing the picture is possible.<br />

Exceptions:<br />

Pictures which are referenced by keys in other pictures cannot be deleted.<br />

In this case, the picture changing action must be switched to another<br />

picture first. This picture can be deleted once there are no longer any<br />

references to this picture. Open 'Binding...' from the shortcut menu, to see<br />

which pictures reference the picture to be deleted.<br />

The start picture cannot be directly deleted either. A new picture must first<br />

be configured as the start picture. Once this takes place, the previous start<br />

picture can be deleted.<br />

4.3.5.4 Renaming a Picture<br />

A picture can be renamed by selecting 'Rename' from the shortcut menu. The same rules apply here as when<br />

naming a new picture. (Max. 15 characters, unique name).<br />

Picture views and assignments from other pictures are updated with the new picture name.<br />

4.3.5.5 Changing the Picture Sequence<br />

The picture sequence is only used to assign picture numbers for the runtime system. Every picture on the target<br />

system can be accessed using its position in the picture sequence. When the position is changed, the picture<br />

number is also changed on the target system. For large projects, individual pictures can be grouped according<br />

to their functions.<br />

The start picture is always first in the sequence. As long as the start picture is configured as the start picture, its<br />

position cannot be changed. The sequence of all other pictures can be changed at any time.<br />

The sequence is changed using the arrow symbols.<br />

4.3.5.6 Changing Special Picture Properties<br />

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

Specific settings can be made for each picture using its 'Properties' dialog box. The Up/Down keys for input<br />

fields are also configured in this 'Properties' window. This dialog box is opened using the shortcut menu for the<br />

picture in the Picture Manager.<br />

280 4.3.5.3 Deleting a Picture


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

Use Global Background Color:<br />

In addition to the global background color, each<br />

picture can be defined an individual background color.<br />

(see also Color Settings)<br />

Use Global Picture:<br />

Elements predefined in the global picture can be<br />

applied to the current picture. This is only possible if a<br />

global picture is present.<br />

Enable Picture Change by PLC:<br />

This option enables the picture to be changed from<br />

the control application.<br />

A picture index can also be used. This determines the<br />

picture number which is written to the picture change<br />

address and the current picture number variable.<br />

Up/Down Keys:<br />

The Up/Down keys for input fields are specified in this<br />

window. Using Up/Down keys only needs to be<br />

specified in input fields.<br />

The number of elements in a picture is displayed in the command counter field. Up to 65,535 elements are<br />

possible in a picture.<br />

Warning:<br />

The number of elements has an effect on performance (speed) when displaying pictures on the runtime system.<br />

4.3.5.7 Defining the Start Picture<br />

The start picture is the first picture displayed after the controller is started. When a new project is created, a<br />

default picture called 'INIT_PIC' is always created by the <strong>Visual</strong> <strong>Components</strong> editor. If there are several pictures<br />

in a project, any of these could be configured later as the start picture.<br />

The start picture can be selected using a combo box in the global settings.<br />

4.3.5.7 Defining the Start Picture 281


4.3.5.8 Defining the Global Picture<br />

The global picture is intended as a type of template. This picture can be optionally added into any other picture.<br />

Picture elements which are to be used in most of the pictures are added to the global picture to prevent having<br />

to insert them repeatedly (logos, time, key assignment, etc.). This template can be applied to all pictures by<br />

selecting 'Use Global Picture' (see Changing Special Picture Properties).<br />

A picture named 'GLOBAL' is added to the picture list, if "Use Global Picture" is selected. The name of the<br />

global picture cannot be changed.<br />

4.3.6 Picture Editor<br />

The picture editor can be used for editing pictures which are located in the Picture Manager. It allows individual<br />

process pictures to be edited. Its function depends essentially on the picture objects.<br />

In the picture editor, individual objects of a picture are added and configured, and control variables are<br />

connected. This section describes general editor functions such as the grid, snap to grid, zoom settings, object<br />

selection, and other possibilities.<br />

A picture can contain up to 65,535 commands (static and dynamic objects on a picture for input and output).<br />

• General Picture Editor Operation<br />

• Grid and Snap−to−Grid Functions<br />

• Zoom Functions<br />

• Picture Editor Views<br />

4.3.6.1 General Picture Editor Operation<br />

All objects can be drawn, moved, and modified using the mouse. Special features using the mouse and shortcut<br />

keys are described here.<br />

Edit Mode<br />

Edit mode is enabled in the display editor shortcut menu. This is enabled by selecting the mouse icon (arrow)<br />

from the toolbar.<br />

Object Selection<br />

Several objects can be selected in the editor by clicking and dragging a box over them. Objects can be selected<br />

or unselected from the group of objects by holding down the 'CTRL' key and clicking on the object with the<br />

mouse.<br />

Key Functions<br />

The following keys have useful functions in the editor.<br />

• The 'TAB' key switches from the selected object to the next object. 'SHIFT' + 'TAB' reverses the<br />

sequence.<br />

• The 'Object Properties' dialog box is opened by pressing 'ALT' + 'ENTER'.<br />

• 'DEL' deletes a selected object.<br />

• One or more selected objects can be moved with the cursor keys.<br />

4.3.6.2 Grid and Snap−to−Grid Functions<br />

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

The picture editor provides the optional grid function for positioning objects. Objects can be automatically<br />

aligned to this grid (snap to grid function).<br />

282 4.3.5.8 Defining the Global Picture


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

4.3.6.3 Zoom Function<br />

The grid is adjusted by clicking the icon (grid). If this function is<br />

selected, then grid lines are shown on the display. The lines are colored<br />

light gray.<br />

Grid intervals are adjustable. The grid is not displayed at all zoom levels. If<br />

necessary, objects can be positioned on the grid.<br />

The properties dialog box for the grid and zoom settings are accessed by<br />

clicking on the grid icon shortcut menu.<br />

Objects which are placed, moved, or whose size has changed can be aligned<br />

if the 'Snap Moving Objects to Grid' option is set. If the function is enabled,<br />

then a check mark appears next to the menu item.<br />

Grid Spacing:<br />

The distance between grid lines can be adjusted in pixels<br />

according to height and width.<br />

Start Showing Grid at Zoom:<br />

The grid can be activated starting at a certain zoom level<br />

here. Zoom levels less than the level set here will not display<br />

the grid.<br />

A picture can be viewed as desired using the zoom function. This function is helpful when using much smaller<br />

displays (2x20 lines CAN) or much larger displays (1024x768 XGA). The display can be optimized to meet your<br />

requirements.<br />

The zoom function is controlled using the magnifying glass icons (zoom out / zoom in).<br />

The grid is displayed according to current zoom settings, as described above.<br />

4.3.7 Variable Editor<br />

The variable editor and the variable view show all the variables used in a <strong>Visual</strong> <strong>Components</strong> project. Two<br />

different views are available. One view is used to make changes. The second is only used for viewing. The<br />

variable selection dialog box is used for selecting variables.<br />

• Variable Editor<br />

• Variable View by Picture<br />

• Variable Selection Dialog Box<br />

4.3.7.1 Variable Editor<br />

4.3.6.3 Zoom Function 283


In the editor view, all project variables can<br />

be seen and changed if necessary.<br />

Variables can also be inserted here.<br />

All variables from this view always appear<br />

in the variable selection dialog box list.<br />

If a variable is changed or deleted in this view, it is also changed or deleted in the corresponding application<br />

objects!<br />

4.3.7.1.1 Insert variable<br />

A variable is inserted by pressing the 'INS' key. The variable dialog box is opened and a variable can be<br />

selected from the existing application program resources. It should be noted that some PLC variables are only<br />

available after compilation. Variables from IEC languages are immediately available (also see Variable Selection<br />

Dialog Box).<br />

The inserted variable is displayed in the overview. From this point on, it is available in the 'Data Point' combo<br />

boxes for individual objects.<br />

4.3.7.1.2 Delete variable<br />

A variable is deleted by selecting it and by pressing the 'DEL' key. If the variable is still in use, then a warning<br />

message is displayed. Once deleted, a variable is also removed from corresponding objects. This can also<br />

cause errors during compilation.<br />

4.3.7.1.3 Modify variable<br />

If a variable is used several times in a project, it can be changed to another variable in the variable dialog box.<br />

This can replace editing individual objects on different pages.<br />

Double−clicking on the variable name opens the variable dialog box with the current variable. Another variable<br />

can be selected from this window.<br />

Warning:<br />

It should be noted that not every variable data type can be connected to every field. Incorrect data type<br />

assignment causes an error when the project is compiled.<br />

4.3.7.2 Variable View by Picture<br />

Arranging variables according to picture allows for quick orientation within a project. This list can also be saved<br />

in an ASCII file and further edited. This list can be used for coupling an INA2000 client FBK to other B&R<br />

systems.<br />

The list view can be displayed for all or individual pictures.<br />

In the example above, the view has only been selected for the INIT_PIC. Selection is made by name in the<br />

combo box.<br />

The following information is displayed in the columns from left to right:<br />

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

284 4.3.7.1 Variable Editor


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

Picture Number on the PLC − This can be transferred to the control application during runtime.<br />

Picture Name − Used for informational purposes.<br />

Variable Name − The variable name in plain text − possibly with the task name placed in front (local variable).<br />

Variable Type − Specifies the data type and format of the variable.<br />

Access Type − Specifies whether the variable will be read or written in the visualization application. It is<br />

possible to write to and read from input fields. Output fields are only used to read.<br />

4.3.7.3 Variable Selection Dialog Box<br />

The selection dialog box supports variable selection from an Automation Studio project. The selection can be<br />

made using the data type and/or a task and variable name.<br />

This dialog box shows all available AS variables. They are displayed according to scope (task names), variable<br />

name, and data type. Complex data types, user defined types, and arrays can also be selected. Selection takes<br />

place using either the mouse or keyboard.<br />

Selection can be accelerated by activating the data type filter or by typing the name.<br />

4.3.8 Text Group Editor<br />

The text group editor is used for creating and managing text groups. Texts are integrated into groups for various<br />

reasons.<br />

Depending on requirements, these texts can be used for a dynamic text output field (Advanced Text Output), a<br />

ListBox, or for button labels. Text groups support language−switching. They are stored and managed in several<br />

languages.<br />

• Text Group Editor (Overview)<br />

• Inserting a New Text Group<br />

• Inserting a Text into a Text Group<br />

• Changing Texts in a Text Group<br />

• Deleting Texts and Text Groups<br />

• Arranging Texts in a Group<br />

• Variable Numbering of Text Groups<br />

4.3.8.1 Text Group Editor (Overview)<br />

4.3.7.3 Variable Selection Dialog Box 285


Text groups are managed in the tree view on the left side of the text group editor. Text groups can be inserted,<br />

renamed, or deleted. These actions can be done using the shortcut menus for the text groups.<br />

All the texts in a text group are displayed on the right side. Individual texts can be inserted, deleted, and edited<br />

here. A second text layer, 'English', is defined at the top next to the 'Default' language. Texts are automatically<br />

applied to all other text layers after a text is inserted for the default language.<br />

4.3.8.2 Inserting a New Text Group<br />

A new text group is inserted using the shortcut menu. If the text group view is active, then a new text group can<br />

also be added using the 'INS' key.<br />

4.3.8.3 Inserting a Text into a Text Group<br />

Text group names cannot have more than 20 characters. Each text group name<br />

must be unique. The name can be changed at any time as long as the text group<br />

is not used (i.e. connected with an output field or button).<br />

A text can be added to a specific text group via its shortcut menu or by pressing the 'INS' key.<br />

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

After selecting the 'Insert Text' menu item, a box is opened where text can be<br />

entered. When you are finished entering the, confirm by pressing 'Enter'. The<br />

new text is immediately displayed in the text view.<br />

The text number specifies the number which is used to display the text during runtime. This value is also<br />

contained in variables when used for 'Dynamic Text Output'.<br />

To insert more texts, the 'INS' key must be pressed or the mouse must be moved to the next line and 'Insert'<br />

selected from the shortcut menu. Text length is limited to 255 characters. All texts are only output as lines<br />

(line−oriented). Line breaks are not supported.<br />

286 4.3.8.2 Inserting a New Text Group


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

4.3.8.4 Changing Texts in a Text Group<br />

In the above example, the text in the default language has been used for all other text layers as well. If this text<br />

should be changed for the 'English' language, then the text editing window can be opened by double−clicking on<br />

the corresponding text. After the text is edited, the window is closed by pressing 'Enter'. The 'Esc' key retains the<br />

original text.<br />

Warning:<br />

If texts are added to existing text groups, objects which are connected with this text group may be affected. In<br />

some cases, inserting texts is only possible at the end of a text group. The connection between an object and<br />

the text group must then be lifted in order to insert desired texts.<br />

4.3.8.5 Deleting Texts and Text Groups<br />

A text is deleted by marking it and using the shortcut menu or by pressing the 'DEL' key.<br />

Texts which are already connected with objects cannot be deleted. The same restrictions apply for deleting texts<br />

as for adding texts. The connection to an object must first be removed or the object must be deleted.<br />

Deleting a Text Group<br />

The procedure for deleting a text group is the same as that for deleting texts. The following also applies here:<br />

text groups which are already in use cannot be deleted.<br />

4.3.8.6 Arranging Texts in a Group<br />

Texts can be moved up or down in a text group by using the arrow icons in the toolbar. Changing in this way<br />

automatically changes the index value (text number).<br />

As seen in the example above, other operations such as inserting, deleting, and editing can be done using the<br />

toolbar.<br />

Arranging Text Groups<br />

Text groups arrangement is not supported since their sequence is irrelevant to the project.<br />

4.3.8.7 Variable Numbering of Text Groups<br />

Text numbers for texts in a group can be edited and numbered flexibly. In this way, gaps in text groups are<br />

possible, i.e. if error messages should begin with number 1000.<br />

4.3.8.4 Changing Texts in a Text Group 287


Simply double−clicking on the text number to be changed allows it to be edited. If this text group is already<br />

connected with a ListBox element, then its numbers can no longer be changed.<br />

This allows the text group to be subdivided once more.<br />

Text numbers are limited by the UNIT data type. Numbers from 0 to 65535 can be entered.<br />

4.3.9 Bitmap Management<br />

Bitmaps are an essential part of visualization applications. The <strong>Visual</strong> <strong>Components</strong> editor supports monochrome<br />

bitmaps as well as those with a color resolution of up to 256 predefined colors. Not all displays can support this.<br />

A bitmap must be added to the Bitmap Manager before it can be inserted into a process picture as a background<br />

or dynamic bitmap.<br />

Note:<br />

Please click on the following button to start a demo:<br />

New bitmaps can be created using an external bitmap editor. Existing bitmaps can be edited at any time.<br />

• Bitmap Manager Overview<br />

• Inserting Bitmaps<br />

• Creating Bitmaps<br />

• Editing Bitmaps<br />

• Deleting Bitmaps<br />

• Creating Transparent Effects<br />

• External Bitmap Editor<br />

4.3.9.1 Bitmap Manager Overview<br />

The Bitmap Manager lists all bitmaps available in the project.<br />

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

288 4.3.9 Bitmap Management


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

All bitmaps are displayed in the project tree. The bitmap overview is displayed with the following information by<br />

clicking on the 'Bitmap' entry in the project tree.<br />

Name<br />

Bitmap name. Can be up to 20 characters long. Can't have the same name as another bitmap in<br />

the project.<br />

Size Size of the bitmap in pixels (length * width)<br />

Compiled<br />

size<br />

Size / Memory required for the bitmap on the target system.<br />

Index Bitmap index on the target system for the API interface.<br />

Note Indicates how often this bitmap is used in the project.<br />

Bitmaps can be displayed as monochrome or using up to 256 colors. Monochrome bitmaps are displayed on the<br />

target system using the current foreground and background colors.<br />

Color bitmaps can be used with 256 colors. When a new bitmap is inserted, its colors are automatically<br />

converted to this color table.<br />

Up to 32,000 pictures can be managed in a project. However, the number of pictures and the size of the entire<br />

project mostly depends on the amount of memory available on the target system.<br />

Bitmaps are stored in a project as a copy of the original in the Automation Studio − <strong>Visual</strong> <strong>Components</strong> project<br />

directory.<br />

4.3.9.2 Inserting Bitmaps<br />

Bitmaps can be inserted in the manager using either 'New' from the shortcut menu or by pressing the 'INS' key.<br />

Two possibilities exist in the 'Insert' dialog box:<br />

• Inserting existing bitmaps<br />

• Creating a new bitmap (using the external editor)<br />

Inserting a bitmap:<br />

Clicking on the 'Browse Bitmaps" button<br />

opens the Windows dialog box to insert<br />

bitmap files.<br />

Clicking on a bitmap file adds it to the<br />

project. Multiple bitmaps can also be<br />

selected and added simultaneously.<br />

However, only monochrome and 256<br />

color bitmaps can be inserted.<br />

4.3.9.2 Inserting Bitmaps 289


After they are inserted, bitmaps are converted to the <strong>Visual</strong> <strong>Components</strong> internal color palette. However, this<br />

may cause color distortions if, for example, many shades of the same color are used.<br />

A red rose contains more the 100 shades of red. However, <strong>Visual</strong> <strong>Components</strong> has only a few tones of red<br />

available. This could cause a distorted display.<br />

The 256 color limit is used because of the size of True Color bitmaps.<br />

4.3.9.3 Creating Bitmaps<br />

Along with adding bitmaps, new bitmaps can also be created directly from <strong>Visual</strong> <strong>Components</strong>. If this option is<br />

chosen, an external bitmap editor (i.e. MS Paint, CorelDRAW, etc.) must be available and configured on the<br />

development system.<br />

The same limits for inserting bitmaps apply for creating bitmaps.<br />

4.3.9.4 Editing Bitmaps<br />

4.3.9.5 Deleting Bitmaps<br />

Creating a new bitmap:<br />

After entering the bitmap name, width,<br />

height, and color depth (monochrome or<br />

256 colors), a blank bitmap is inserted<br />

by clicking 'OK'.<br />

The external bitmap editor specified in<br />

the <strong>Visual</strong> <strong>Components</strong> settings is also<br />

automatically started.<br />

This bitmap is visible in the editor after it<br />

is edited and saved.<br />

The external bitmap editor is started by either double−clicking on<br />

the bitmap or selecting 'Edit' from its shortcut menu.<br />

The external bitmap editor should already be configured.<br />

The bitmap must be completed using 'Save' rather than 'Save<br />

As...'. Otherwise changes are not applied in the project.<br />

Bitmaps are stored in a project as a copy of the original in the Automation Studio − <strong>Visual</strong> <strong>Components</strong> project<br />

directory.<br />

Bitmaps that are not used in the project can be deleted. Bitmaps which are used in a picture or object cannot be<br />

deleted.<br />

Bitmaps can be deleted by selecting 'Delete' from their shortcut menu or by pressing the 'Del' key.<br />

Warning:<br />

Both the bitmap entry in the manager and the bitmap file in the project directory are deleted.<br />

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

290 4.3.9.3 Creating Bitmaps


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

4.3.9.6 External Bitmap Editor<br />

The external bitmap editor must first be configured before it can be used. Configuration takes place under the<br />

'Project' tab after the 'VC Settings...' entry is selected from the 'Tools' menu.<br />

This field determines the file path for the<br />

bitmap editor. The 'Browse' button can be<br />

used to select a desired file.<br />

In this example, the Windows drawing program 'MS Paint' is used. This should be available on all Windows<br />

systems.<br />

Note:<br />

The program name and path is not always the same on all Windows versions!<br />

4.3.9.7 Transparent Bitmaps<br />

Transparent effects can be applied to bitmaps using the <strong>Visual</strong> <strong>Components</strong> editor. In other words, a specified<br />

color can be 'disabled' during runtime, i.e. shown with the background color of the display.<br />

4.3.9.7.1 How do transparent bitmaps work?<br />

This function is explained in the following example.<br />

The icon shown here to the right is<br />

used for the example. This icon has a<br />

white background.<br />

The icon should have a blue<br />

background since it is surrounded by a<br />

blue border.<br />

After activating Transparent mode, the<br />

white color of the icon is no longer<br />

displayed. This is how the background<br />

color is displayed during runtime.<br />

4.3.9.7.2 Creating transparent effects<br />

Transparent effects are configured in the bitmap view.<br />

4.3.9.6 External Bitmap Editor 291


The function is activated by selecting 'Use User's Transparent Color'. The color pipette (toolbar symbol) is then<br />

selected.<br />

Selecting the color which should be displayed as transparent is done by moving the mouse cursor (pipette<br />

shape) and clicking on the desired color. The transparent color is displayed in the corresponding field.<br />

White is now set as the transparent color. White pixels will not be displayed whenever this bitmap is used.<br />

4.3.9.8 Color Table<br />

To create visualization applications as effectively as possible while using the least amount of resources, <strong>Visual</strong><br />

Component projects have a fixed color table for target systems with color displays. This color palette uses the<br />

standard used on the Internet/Web. The following is a list of all available colors. Bitmap editor colors can be<br />

adjusted using the RGB values.<br />

Colors are also displayed in the <strong>Visual</strong> <strong>Components</strong> Color Dialog Box.<br />

*) Index 255 is reserved for the display of transparent colors in a bitmap.<br />

4.3.9.8.1 <strong>Visual</strong> <strong>Components</strong> Color dialog box<br />

Color settings can be made in the editor<br />

using this dialog box.<br />

The tool tip (in yellow) displays the color<br />

index as well as the RGB value of the<br />

selected color.<br />

The dialog box completely corresponds to<br />

the target system color palette. The color<br />

index specification is also valid for<br />

character functions.<br />

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

292 4.3.9.8 Color Table


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

4.3.10 Font Management<br />

Using different fonts allows an individual arrangement of text information. Information can be better presented<br />

when different fonts are used. Important words can be displayed large and bold, for example.<br />

<strong>Visual</strong> <strong>Components</strong> allows the use of various fonts and supports familiar Windows True Type standard fonts.<br />

Therefore, the entire variety of Windows fonts can be used with <strong>Visual</strong> <strong>Components</strong>.<br />

Fonts are subject to copyright law and are the property of the authors. This is to be considered before they are<br />

used!<br />

Many freeware fonts can be found on the internet.<br />

Fonts cannot be loaded on all panels. Some panels only support one font size.<br />

Warning:<br />

Many fonts are copyrighted. Their use can be subject to certain license conditions. Using some fonts often<br />

requires payment. Legality should always be checked before using a font!<br />

• Fonts − General<br />

• Inserting Fonts<br />

• Changing Fonts<br />

• Deleting Fonts<br />

• B&R, Standard Fonts, and Windows...<br />

• More Information About Fonts<br />

4.3.10.1 General Font Management<br />

4.3.10 Font Management 293


A panel's default fonts are present in a new project. These fonts are displayed on the right side. Not all panels<br />

are the same. But at least one font is always supported by a panel. Different font sizes are supported in IPC<br />

projects, Power Panel projects, and projects using C130 graphic displays. Full graphic panels can also integrate<br />

other fonts created according to the True Type standard.<br />

Therefore, all Windows fonts can be used by <strong>Visual</strong> <strong>Components</strong>.<br />

Warning:<br />

Check copyrights!<br />

Certain editors (not included in <strong>Visual</strong> <strong>Components</strong>) can be used to create True Type fonts for use in <strong>Visual</strong><br />

<strong>Components</strong>.<br />

Currently, the following fonts are supplied by <strong>Visual</strong> <strong>Components</strong>:<br />

Graphic Displays<br />

• GFont1x1 Character size 6 x 8 pixels<br />

• GFont2x2 Character size 12 x 16 pixels<br />

• GFont4x4 Character size 24 x 32 pixels<br />

Text Displays<br />

• TFont1x1 Character size 6 x 8 pixels<br />

• TFont2x2 Character size 12 x 16 pixels<br />

• TFont4x4 Character size 24 x 32 pixels<br />

4.3.10.2 Inserting Fonts<br />

Generally, only True Type fonts which are installed on the Windows system can be imported and inserted.<br />

Fonts are added to the project by selecting 'Insert' from the shortcut menu or by pressing the 'INS' key.<br />

A logical name must be given for every<br />

font. The name must not already be used<br />

in the project.<br />

After entering the name, a dialog box appears which lists all available fonts.<br />

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

294 4.3.10.2 Inserting Fonts


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

All fonts available on the system are displayed in the listbox. A specific font size can be selected with 'Size'. The<br />

'Pixel Size' line specifies the font size in pixels. This pixel size is very important for the use of fonts in a <strong>Visual</strong><br />

<strong>Components</strong> application.<br />

The font can also be shown in bold or italic type. 'Char set' defines the character set for the font to be used.<br />

Text entered in the 'Sample String' box is also shown in the preview window. In this way, the appearance of the<br />

text can be checked.<br />

The 'Character Optimizing' option only transfers characters (from that font) which are used in the text. This<br />

saves memory on certain target systems. This option is not currently supported. The storage requirements of<br />

a character set can be improved when UNICODE character sets are used later.<br />

4.3.10.3 Changing Fonts<br />

Double−clicking on a font opens its selection and configuration dialog box. All settings can be changed as<br />

described in the Inserting Fonts section.<br />

Note:<br />

Your project is affected if fonts are changed which are already used in your pictures. The apperance changes.<br />

Texts can overlap or the length of a text can exceed the display size. In this case, an error message appears.<br />

The font will not be changed.<br />

The new size should not exceed the old. This prevents any potential display problems.<br />

4.3.10.4 Deleting Fonts<br />

Basic rule: All fonts which are not used can be deleted.<br />

Fonts which are used cannot be deleted. The respective text must first be set to another font. Then the font can<br />

be deleted.<br />

4.3.10.5 B&R, Standard Fonts, and Windows...<br />

B&R supplies separate fonts for individual panels. These fonts are adapted to the respective panel hardware.<br />

Some of these fonts are also stored in the panel hardware (Flash or ROM memory).<br />

The characters from 0 to 127 in these fonts correspond to the ASCII standard. Characters above 127 are not the<br />

same on all panels.<br />

Windows fonts also have different characters on the positions larger than 127. Only UNICODE character sets<br />

are subject to an exact world wide standard.<br />

The special characters of a certain font can be viewed and selected using the CharBox.<br />

The entire character set of a font is displayed in the CharBox. The number in the dialog box corresponds to the<br />

character offset in the character set.<br />

Due to the fact that characters over 127 do not correspond to a uniform standard, sometimes display problems<br />

occur in the editor when using particular fonts. On the target system, the correct character from the<br />

corresponding character set should always be seen.<br />

These display problems result from the fact that Windows controls are used in the editor. These are operated<br />

with the character font defined in the Windows system configuration.<br />

By changing the system font, the editor can be specialized to a certain character set.<br />

4.3.10.6 More Information About Fonts<br />

4.3.10.6.1 Freeware Fonts<br />

Many freeware fonts can be found on the Internet. Before using such fonts, check whether commercial use is<br />

really free of costs and obligations.<br />

Here are a few links to freeware font sites.<br />

4.3.10.3 Changing Fonts 295


http://www.flashkit.com/fonts/<br />

http://www.fontasy.de/<br />

http://freewarehome.com/Graphics/Fonts/Fonts_L−M_t.html<br />

http://www.rotodesign.com/fonts/fonts.html<br />

http://www.all−4−free.com/fonts/ ¬ Links to font sites (approx. 20 links)<br />

http://www.1001freefonts.com/<br />

http://www.freefever.com/graphics/<br />

http://www.hugemcgriffin.com/<br />

http://fonts.tom7.com/<br />

http://www.myfonts.com/<br />

The web sites listed above are not guaranteed to be valid. Sources for freeware fonts can always be found in<br />

various search engines (Lycos, Fireball, Altavista, and Yahoo).<br />

4.3.10.6.2 Creating Fonts<br />

In addition to using freeware fonts, there is also the possibility to create True Type fonts. There are special tools<br />

for doing this which can be found in freeware and shareware programs such as FontCreator or TrueTypeEditor.<br />

Professional manufacturers such as Adobe and CorelDRAW also offer solutions for creating and editing fonts.<br />

These tools can also be used to modify existing fonts.<br />

4.3.11 Language Management<br />

Projects using several languages can be created with <strong>Visual</strong> <strong>Components</strong>. A project can contain texts from 10 or<br />

more different languages.<br />

Languages can be enabled and disabled in the Language Manager. Languages which are disabled are not<br />

included when compiling to the target system. This optimized target system memory.<br />

Languages are added and deleted using the Language Manager or the 'Languages' shortcut menu.<br />

A detailed explanation of language switching can be found in the Multilingual Project Capabilities section.<br />

Languages are switched on the target system by redefining a language variable. All text resources are<br />

automatically updated and output correctly.<br />

4.3.12 Color Configuration<br />

4.3.12.1 Setting Standard Colors<br />

Settings project colors is described in the following section. There are 3 ways to set colors:<br />

• Globally in the project<br />

• Specifically for an object<br />

• Dynamically for an object<br />

This sequence also represents the priority. Dynamic color control has priority over object specific assignment.<br />

Object specific assignments are individually explained in their respective sections. The global configuration is<br />

intended as a template.<br />

The editor itself always transfers the static setting from the last object when drawing a new object. In this way,<br />

several similar objects can more conveniently be drawn one after another.<br />

In addition to static colors, variables can also be used for assigning dynamic colors.<br />

Not all displays support colors or the specific handling of colors.<br />

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

296 4.3.10.6 More Information About Fonts


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

The number of available colors in a project is limited to 256. Depending on the target system, this can also be<br />

only 2 colors (monochrome displays).<br />

Global Colors:<br />

This setting applies to foreground and background color settings. All objects like texts, rectangles, circles, etc.,<br />

are drawn using these settings.<br />

Global Colors Variable:<br />

Using this variable, color setting can be dynamically changed on the target system (see also Setting Dynamic<br />

Colors).<br />

Focus Colors:<br />

Colors are defined here for elements which currently hold the focus for input. This setting is valid for whichever<br />

input field is active.<br />

Focus Colors Variable:<br />

The color used for the input focus can also be dynamically modified.<br />

Color Objects:<br />

Specific color settings can be made for listed objects. For example, input and output fields, as well as alarm<br />

views, can be defined with fixed color values in a project. In this way, these fields are immediately recognizable<br />

to the end user as well as the project planner because of the color arrangement.<br />

Use Static Text's Transparent Color:<br />

With this option, a transparent effect can be applied to static texts. This means that text only uses its foreground<br />

color (text color) over the respective existing background. Text can be displayed on a bitmap using this method.<br />

Option Active: Option Inactive:<br />

4.3.10.6 More Information About Fonts 297


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


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

4.3.13.1 Exporting Pictures<br />

If complete pictures should be exported, then the picture has to be selected and the export function called in its<br />

shortcut menu.<br />

The name and directory where the export file should be saved is specified here.<br />

Other resources in the picture, such as bitmaps, fonts, and text groups, can also be exported using the export<br />

dialog box and the 'Export Dependency' field. In addition, each individually listed element can be selected or<br />

deselected for exporting.<br />

4.3.13.1 Exporting Pictures 299


The user receives a message when the export is successful.<br />

4.3.13.2 Importing Pictures<br />

Importing pictures can be selected using the shortcut menu for 'Pictures' in the pictures view. Pictures must be<br />

imported one at a time.<br />

First, the picture to be imported must be selected.<br />

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

If a picture already exists in the project with the same name, then the user is requested to enter a new name or<br />

the import is cancelled.<br />

300 4.3.13.2 Importing Pictures


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

A message is displayed when importing is successful. In addition, details about the import are displayed in the<br />

output window.<br />

Important:<br />

When importing/exporting fonts, it is important that the registered Windows font is installed on the computer<br />

doing the importing. This is necessary for it to be displayed in the editor. Only the properties of the font are<br />

imported or exported (size, Windows font name, bold, italics, etc.), not the font itself.<br />

File extensions for import/export files:<br />

Type Extension<br />

Pictures *.vcpXML<br />

Text Groups *.vctXML<br />

Bitmap *.vcbXML<br />

Fonts *.vcfXML<br />

Alarm Groups *.vcaXML<br />

4.3.14 Project Options<br />

Automation Studio includes separate global settings for <strong>Visual</strong> <strong>Components</strong> projects. These settings are only<br />

valid for the corresponding workstation (Automation Studio installation). They are not transported with the<br />

project.<br />

In addition to these global options, each project can be specifically configured. Each project−specific<br />

configuration is found on the start page of a <strong>Visual</strong> <strong>Components</strong> project.<br />

4.3.14.1 Project−Specific Configuration<br />

The configuration of project−specific properties (as opposed to individual picture configuration) is displayed on<br />

the global project configuration. To display this configuration, 'Panel' must be selected from the tree view.<br />

Configuration is divided between the following items:<br />

• Hardware<br />

• Picture Settings<br />

• Global Properties (+ Color Settings)<br />

• Alarm System<br />

• Touchpads<br />

4.3.14 Project Options 301


Details about individual configuration possibilities are described in the following sections. All of these options<br />

only apply to the current project. Not all options are available for all panels. Some options are only available<br />

when other options are enabled.<br />

Source:<br />

This field can be used to assign a process variable. This variable affects the chosen function. If an option is<br />

enabled, the corresponding combo box and button for selecting variables become available.<br />

4.3.14.1.1 Hardware<br />

The hardware description is shown in this field. This is only displayed for information purposes and cannot be<br />

changed.<br />

4.3.14.1.2 Picture Settings<br />

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

Init Picture:<br />

A start picture can be selected from a list of all the pictures in the project. The start picture is shown first after the<br />

system is switched on.<br />

The start picture always holds the first position in the picture list and always holds the number 0. It cannot be<br />

302 4.3.14.1 Project−Specific Configuration


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

deleted (see also Start Picture).<br />

ScreenSaver Pic:<br />

A picture can be selected as a screen saver from a list of all the pictures in the project. This picture is shown<br />

automatically after a specified amount of time has passed. Setting the time is explained in the following section.<br />

In contrast to conventional screen savers, this one does not automatically switch back to the picture displayed<br />

before it was activated. This must be set explicitly when configuring the application project.<br />

The time period before the screen saver activates is set in minutes. A variable from the controller can also be<br />

used to do this. Note that values have to be specified in seconds when enabling screen savers with RPS<br />

variables. Values < 60 are not allowed.<br />

This time begins after each time a key is pressed (phys. key or touch key).<br />

Activate Screen Saver:<br />

The screen saver mode is activated when this option is selected.<br />

Use Global Picture:<br />

A global picture can be selected for the project by selecting this option. A picture with the name "GLOBAL" is<br />

added to the picture list when this option is selected (see also Defining the Global Picture).<br />

Backlight Switch Off:<br />

The background light (or display) can be automatically shut off after a specified time by selecting this option. The<br />

time is set in minutes.<br />

Note:<br />

Not all panels support this option.<br />

Ignore First Key During Background Lighting:<br />

If this option is selected, only the background lighting is affected (turned on) when the first key is pressed.<br />

Otherwise, the first keystroke will carry out the task it was designed to do.<br />

Manual Project Start:<br />

If this option is selected, then a project cannot be automatically started on the target system. The project can be<br />

started after completing specific control application initializations.<br />

A special function block from the VISAPI interface is provided for this. This function block also supports specific<br />

CAN interface initializations for the project (see also VA_StartProject).<br />

4.3.14.1.3 Global Settings<br />

Transfer Key Matrix:<br />

This field enables the transfer of a key matrix to the control program. The status of all keys (0=not pressed,<br />

1=pressed) is transferred to a byte array in the PLC where it can be evaluated.<br />

The matrix also contains buttons for touch displays. Information is transferred asynchronous to the PLC program<br />

procedure.<br />

4.3.14.1 Project−Specific Configuration 303


Warning:<br />

This function is not suitable for jog key (momentary) operation. Jog keys have to be transferred using a VISAPI<br />

library function block (see also VA_GetKeyMatrix).<br />

Transfer LED Matrix:<br />

In addition to configuring LEDs individually, LED information can also be transferred using a byte array.<br />

However, only one method can be selected. Otherwise inconsistencies will occur. This information is read<br />

asynchronously.<br />

Change Picture From PLC:<br />

A certain picture can be selected from the control application using this variable. For example, this could allow<br />

certain pictures to be displayed or locked if an error occurs during runtime. If the picture change is successful,<br />

then the interpreter writes the value 65535 to this variable (handshake for picture change). This variable should<br />

only be defined once for a picture change (non−cyclic).<br />

The number of the next picture (to be changed to) can be read in the Picture Overview.<br />

Transmit Current Picture Number:<br />

The number of the currently displayed picture can be transferred to the control application. The picture number<br />

can be read in the Picture Overview.<br />

This number is changed when a picture is inserted or deleted.<br />

Enable Text Layer Switching:<br />

Text layers can be switched by the control application. Each text layer is assigned an index number in the<br />

Language Manager. This index number is the value for enabling a certain language.<br />

Transfer Current Key Level:<br />

Certain panels support up to 4 levels of key assignment. This active key assignment can be changed by other<br />

keys. The variable defined here gives information about which key assignment is active at the moment.<br />

Disable Cursor Movement On Enter:<br />

By default, the next input field is selected after pressing the Enter key. Using this option, the Enter key can be<br />

suppressed in the entire project. The cursor remains on the current input field after Enter has been pressed.<br />

This allows a new value to be given immediately. The next field is selected using appropriate Key Functions.<br />

Activate Alphanumeric Level:<br />

A keypad assignment level can be predefined for alphanumeric input. The runtime system recognizes<br />

alphanumeric entries and uses the defined key level. Alphanumeric characters must first be configured for this to<br />

function properly.<br />

Activate Automatic Comma Input:<br />

For input fields which contain decimal places, the entry is automatically advanced by the number of decimal<br />

places. If 2 decimal places are defined in a field, then an entry of 5−0−0 is converted to the value '5.00'.<br />

If this option is not selected, 5−0−0 is converted to a value of '500'. A decimal point key must then be defined (if<br />

not already).<br />

Colors:<br />

This button provides the default color settings of a project.<br />

Keyboard:<br />

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

A standard PC/AT keyboard can be defined as an input device when the 'AT Keyboard' option field is selected.<br />

The 'Layout' field defines which keyboard layout should be used.<br />

304 4.3.14.1 Project−Specific Configuration


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

4.3.14.1.4 Alarm System<br />

Use Alarm System:<br />

Enables the alarm system. This is explained in greater detail in the Alarm System section. By activating the<br />

alarm system, the alarm view immediately becomes available in the project tree. The icon for inserting alarm<br />

fields also becomes available in the picture editor.<br />

Use Alarm Printer:<br />

If this option is selected, then a printer can be defined for the alarm list.<br />

Printer Settings...:<br />

Specifies settings for printing alarms (see also Printing Alarms).<br />

4.3.15 Project Options<br />

Automation Studio includes separate global settings for <strong>Visual</strong> <strong>Components</strong> projects. These settings are only<br />

valid for the corresponding workstation (Automation Studio installation). They are not transported with the<br />

project.<br />

These settings are opened by selecting 'VC Options...' from the 'Tools' menu.<br />

In addition to these global options, each project can be specifically configured. Each project−specific<br />

configuration is found on the start page of a <strong>Visual</strong> <strong>Components</strong> project.<br />

4.3.15.1 Global Settings − General<br />

An external command (.EXE file) can be run on this page. This command is executed after a <strong>Visual</strong><br />

<strong>Components</strong> compilation is carried out.<br />

This option is reserved for internal B&R purposes.<br />

4.3.14.1 Project−Specific Configuration 305


4.3.15.2 Global Settings − Project<br />

Bitmap/Font Editor:<br />

A bitmap editor can be defined here. This editor is used to create or edit bitmaps. Any bitmap program can be<br />

selected by clicking on 'Browse'. MSPaint is set as the default editor. Unfortunately, the name and directory are<br />

not the same on all systems. Therefore, it may be necessary to adjust this setting after installation.<br />

Compilation:<br />

Generate Text File:<br />

The editor generates detailed information about the project in the Automation Studio output window during<br />

compilation. In addition, a text file is created with debug information. This option is intended for internal B&R<br />

debugging purposes.<br />

Compilation is substantially faster if this option is deactivated.<br />

Generate Variables by Picture to CSV File:<br />

If this option is selected, then a CSV text file is created during compilation. The contents include the entire<br />

variable list sorted by picture. This file can be processed later to acquire variables. A small project is illustrated<br />

below:<br />

File contents:<br />

65535;< Global Variables >;UintVar1;UINT;W;<br />

65535;< Global Variables >;UsintArray;USINT[100];W;<br />

1;PIC1;BoolVar1;BIT;W;<br />

1;PIC1;DintVar1;DINT;R/W;<br />

The project:<br />

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

306 4.3.15.2 Global Settings − Project


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

4.3.15.3 Global Settings − Picture<br />

Initial Zoom:<br />

The editor uses this zoom setting when opening a project. Desired zoom levels can be set here.<br />

Grid − Settings:<br />

Settings for Grid Display are set here.<br />

Show Locked Character Positions:<br />

If text layers are active, then the longest text of a language is displayed in gray. This option is no longer<br />

supported. All outputs have object properties. The number of characters is defined there.<br />

Automatically Open Character Box:<br />

A character box (CharBox) is displayed for editing the text.<br />

Copy coordinates:<br />

Options where copied object are inserted after copy /paste.<br />

4.3.15.4 Grid − Settings<br />

Grid settings can be changed using the Grid Dialog Box. Grid settings can also be opened by clicking on the grid<br />

icon in the toolbar.<br />

4.3.15.3 Global Settings − Picture 307


Width:<br />

Adjustable grid width in pixels.<br />

Height:<br />

Adjustable grid height in pixels.<br />

Start Showing Grid at Zoom:<br />

Specifies at which zoom level the grid should be displayed. Using this option, the grid will not be displayed at<br />

lower zoom levels when different zoom levels are used.<br />

Show Grid as Default:<br />

Specifies whether the grid is automatically displayed when a project is opened.<br />

Touch Grid:<br />

This option creates a 40x40 pixel grid. This option is frequently used when working with touch devices. The size<br />

corresponds to an average finger width.<br />

Snap Moving Objects to Grid:<br />

If this function is selected, then objects which are created, moved, or changed can be directly aligned on the<br />

grid. This function is often indicated in graphics programs as 'Snap−to−Grid'. The 'snap' refers to the grid itself.<br />

4.4 <strong>Visual</strong> <strong>Components</strong> User's Manual<br />

4.4.1 Touch Configuration<br />

This allows interface settings for the display which is used to be changed.<br />

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

When inserting a display with touch functionality, the configuration dialog box is displayed after inserting the<br />

display name.<br />

308 4.4 <strong>Visual</strong> <strong>Components</strong> User's Manual


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

All interfaces which do not have serial devices assigned to them are listed in the box. Selecting the desired<br />

interface can be done using either the keyboard or the mouse. The selection is confirmed and saved with<br />

clicking 'OK' or pressing 'Enter'.<br />

4.4.1.1 Change Settings<br />

Touch settings can be changed in the display properties or the properties of the serial object. This touch<br />

configuration is required with old projects (V2.1) in order to assign the touch panel to an interface.<br />

Possibility 1: Display properties<br />

4.4.1.1 Change Settings 309


Possibility 2: Serial object properties<br />

The dialog box at the top of this page is shown.<br />

4.5 Arranging Static Picture <strong>Components</strong><br />

Static picture elements are only drawn once during a picture change. In this way, system runtime behavior is<br />

only more heavily loaded during picture construction (picture change) than it would be with cyclic output of<br />

dynamic picture elements. There are exceptions such as when the status variable is used or active color<br />

assignment is made using a variable (see also Changing Colors Using Variables or Controlling Fields with<br />

Status Variables).<br />

Static picture elements can be placed at different layers using the editor. In the object shortcut menu, Bring<br />

Forward or Send Backward changes the display layer. (See Overlapping Objects). This overlap is then<br />

converted into a character sequence (picture structure) for the target system.<br />

Since certain elements such as circles, touch buttons, etc., cannot be used on all hardware, individual items<br />

may not be available depending on the display type (display disabled).<br />

Generally, every object (text, circle, etc.) has special object properties. Object properties are opened in the<br />

editor using the object's shortcut menu. Properties can also be opened using the keyboard by pressing 'Alt' +<br />

'Enter'. Pressing the 'Tab' key changes the focus to the next object.<br />

Static picture elements can be selected from the toolbar in the <strong>Visual</strong> <strong>Components</strong> editor.<br />

Symbol Function text<br />

4.5.1 Texts<br />

Selection tool<br />

Text mode<br />

Line mode<br />

Rectangle mode<br />

Ellipse mode<br />

Background bitmap mode<br />

Zoom in<br />

Zoom out<br />

Grid and snap−to−grid mode<br />

Static texts are available on all panels supported by <strong>Visual</strong> <strong>Components</strong>. However, the number of fonts and text<br />

sizes varies. At least one character set is always available for text. On some panels, additional fonts may<br />

integrated (see also Font Management).<br />

Language switching is possible for all static texts (see also Language Management).<br />

4.5.1.1 Inserting Text<br />

Select the icon on the toolbar to activate text mode. In this mode, the positioning tool can be placed<br />

anywhere on the display to insert a static text.<br />

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

310 4.5 Arranging Static Picture <strong>Components</strong>


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

Note:<br />

Static texts may not overlap.<br />

The text dialog box is automatically opened after adding a static text.<br />

4.5.1.2 Texts<br />

4.5.1.2.1 Editing Texts<br />

The static text is entered in this dialog box. Possible<br />

text length is already adjusted to the selected font.<br />

Input can be cancelled at any time by pressing the<br />

ESC key. A mouse click on another editor position<br />

also interrupts the editing process.<br />

Text is visible on the display after the 'Enter' key is<br />

pressed. Text can be changed at a later time by<br />

double−clicking on the text element.<br />

A different font can be selected after a successful<br />

entry has been made. If the font is changed, the<br />

length cannot exceed the display size.<br />

After the entry is completed, another text can be<br />

inserted by clicking somewhere else on the display.<br />

The last selected font is also used by default for new<br />

text entries.<br />

If several text layers are active, then they are shown<br />

by name in the first column. Text for this text layer is<br />

entered in the second column.<br />

A text object can only consist of one font.<br />

An existing text can be edited by activating the selection tool and double−clicking on the desired text. The<br />

corresponding editing window is opened. Double−clicking on the text layer name opens an additional text entry<br />

window.<br />

The CharBox is opened with this icon to input special characters. This allows special characters from<br />

the panel character set to be selected which cannot normally be input using the keyboard.<br />

The appearance of the character in the CharBox corresponds to its actual representation on the target system.<br />

The character also corresponds to its appearance on the target system in the picture editor. In the other dialog<br />

boxes and tables, different representations of some special characters can occur when using non−standard<br />

character sets.<br />

4.5.1.2 Texts 311


4.5.1.2.2 Text Position<br />

Text position is determined by the following factors.<br />

• Not every panel can position text with single pixel precision.<br />

• A 'Snap−to−Grid' mode can be set in the editor.<br />

The text can be moved using the mouse according to these possibilities. The mouse pointer position is<br />

displayed in the lower left corner of the editor. For better alignment, the snap−to−grid option can be selected or<br />

the grid can be displayed. The grid can be individually set.<br />

4.5.1.2.3 Selecting Texts<br />

Each text can be selected individually using the mouse. Multiple selection is possible by pressing the 'Ctrl' key<br />

and simultaneously clicking on the respective objects or dragging a box over them with the mouse. In this way,<br />

texts and other elements can be copied and inserted in another position or in another picture. Inserting always<br />

takes place with reference to the upper−left corner of the picture.<br />

Tip:<br />

If several texts are to be copied from a page and inserted in the same position on another page, a character can<br />

be inserted in the upper left corner of the source picture. If this character is also selected for copying, then all<br />

other texts will be inserted in the position they were in on the source picture. Then the character can be deleted<br />

from the top left of both pictures.<br />

4.5.1.3 Texts<br />

4.5.1.3.1 Text Color Settings<br />

Foreground and background colors can be defined during the design phase and runtime for static texts. The<br />

number of colors depends on the panel being used. The editor uses the limits of the corresponding panel type.<br />

There are 3 ways to assign color:<br />

• Global Color Setting<br />

• Individual Color Setting<br />

• Dynamic Color Setting Using a Variable<br />

The sequence listed above also determines the priority on the target system. Assigning a variable to an object<br />

has the highest priority. In this way, specific blink effects as well as displaying/not displaying text are possible.<br />

4.5.1.3.1.1 Global Color Setting for Text<br />

In the global color settings for the project, the global<br />

foreground and background colors are used by default<br />

for static text (in the Global Colors section).<br />

In this example, black text is placed on a white<br />

background. This global setting can be overwritten by a<br />

runtime system variable which can be conneted under<br />

Global Colors Variable.<br />

'Use static text's transparent color' only defines the<br />

foreground color for the editor. If the text is written on<br />

any background (i.e. bitmap), then only the characters<br />

are displayed.<br />

The background color can also be changed using this<br />

option.<br />

If this option is not selected, text is always output with<br />

foreground and background colors.<br />

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

312 4.5.1.2 Texts


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

4.5.1.3.1.2 Individual Text Colors<br />

Individual color settings can be made for each text<br />

object under Colors in the static text 'Properties'<br />

dialog box.<br />

By deactivating the Use Global option, individual<br />

Foreground and Background colors, as well as Use<br />

Transparent Color, become available.<br />

If transparent mode is selected, then only the<br />

foreground color is displayed.<br />

Settings made last are saved by the editor as a<br />

presetting for the next created static text field. In this<br />

way, several texts can conveniently be created using<br />

the same settings.<br />

4.5.1.3.1.3 Dynamic Text Colors<br />

Object colors can be changed during runtime by connecting a variable to the Colors Variable field. The variable<br />

has to be of data type 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. If both bytes are set to the same value, then<br />

the text is hidden. The interval and combinations are adjustable depending on the control application.<br />

4.5.1.3 Texts 313


Note:<br />

Corresponding color values can be found in in the Color Table.<br />

Specific colors can be read directly from the tool tips index value in the color dialog box.<br />

4.5.1.4 Texts<br />

4.5.1.4.1 Advanced Text Properties<br />

Changing the position of the text and modifying the connected status variable are both considered additional text<br />

properties.<br />

The position can be set exactly (in pixels) with the<br />

'Top' and 'Left' fields. On text panels, these<br />

specifications refer to rows and columns. These<br />

settings cannot be changed during runtime.<br />

The Status Variable is of data type UINT. For static<br />

text, bit 0 is responsible for determining whether the<br />

text is displayed or not.<br />

BIT 0 == 1 − Text not shown<br />

BIT 0 == 0 − Text shown<br />

Tip:<br />

Dynamic Text output provides additional possibilities for designing the visualization task.<br />

4.5.2 Lines<br />

Lines are used for arranging pictures in the <strong>Visual</strong> <strong>Components</strong> editor.<br />

Lines can be only be drawn with a width of 1 pixel. Not all panels support lines. Some panels only support<br />

horizontal and vertical lines. Slanted lines can only be drawn on graphic panels. This hardware limitation is<br />

taken into account by the editor.<br />

4.5.2.1 Drawing Lines<br />

The line mode is activated by selecting the line icon from the toolbar. The start point is determined by<br />

clicking the left mouse button in the display. The end point is set by holding down the left mouse button and<br />

dragging the positioning tool to the desired end position.<br />

Note:<br />

Some panels can only display horizontal and vertical lines.<br />

Line width is always 1 pixel. The line can later be moved or edited in the editor. If Ctrl is held down while drawing<br />

the line, then the editor will only allow a horizontal or vertical line to be drawn. If 'Snap Moving Objects to Grid' is<br />

activated, then the endpoint of the line can only be on an intersecting point of the set grid. A line can be deleted<br />

using the shortcut menu or the Del key.<br />

The 'Object Properties' dialog box is opened by double−clicking on the line.<br />

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

314 4.5.1.4 Texts


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

The position of the line can be set exactly (in pixels)<br />

under the Parameter tab. The Top, Left, Right and<br />

Bottom settings specify the position of the respective<br />

endpoint in pixels.<br />

The Status Variable is of data type UINT. For lines, bit<br />

0 is responsible for determining whether the line is<br />

drawn or not.<br />

BIT 0 == 1 − Line not shown<br />

BIT 0 == 0 − Line shown<br />

Basic colors for all lines can be set under the global<br />

color settings. These global settings apply to all lines<br />

which have this option selected.<br />

Lines may also have individual color settings.<br />

Individual colors can be selected by disabling the Use<br />

Global option.<br />

The optional variable in the Colors Variable field can<br />

change the line color during runtime. The variable has<br />

to be of data type UINT.<br />

The higher value byte sets the foreground line color<br />

(0−255). The lower value byte is not used.<br />

4.5.3 Rectangle and Square<br />

Rectangles can be drawn with any size and color using the editor. Not all panels support rectangles. Some<br />

panels cannot draw rectangles filled with color. This hardware limitation is taken into account by the editor.<br />

4.5.3.1 Drawing Rectangles<br />

Rectangle mode is enabled by selecting the rectangle icon from the toolbar. A rectangle can be drawn on<br />

the display in this mode by pressing the left mouse button. Drawing squares takes place while simultaneously<br />

holding down the Ctrl key while drawing. The line width for a rectangle is always 1 pixel. The position and size of<br />

the rectangle can be changed after it has been drawn.<br />

Double−clicking on the rectangle opens the Object Properties dialog box.<br />

A selected rectangle is displayed in the editor<br />

with a border. It can now be enlarged or<br />

reduced.<br />

As shown here, selection mode has to be<br />

active (mouse pointer icon).<br />

Right clicking on an empty area in the editor<br />

changes from selection mode to object editing<br />

mode.<br />

4.5.3 Rectangle and Square 315


4.5.3.2 Rectangle and Square<br />

4.5.3.2.1 Rectangle Properties<br />

Rectangles can be drawn in different colors with or without being filled. The 'Object Properties' dialog box is<br />

used for editing a rectangle.<br />

The 'Object Properties' dialog box is opened by double−clicking on a rectangle.<br />

The corner points of the rectangle can be set exactly<br />

(in pixels) by using the Top, Left, Right, and Bottom<br />

settings under the Parameter tab.<br />

Status variable<br />

The Status Variable is of data type UINT. For<br />

rectangles, bit 0 of the status variable is responsible<br />

for determining whether the rectangle is drawn or not.<br />

BIT 0 == 1 − Rectangle not shown<br />

BIT 0 == 0 − Rectangle shown<br />

Rectangle colors are globally defined using the<br />

foreground and background colors. The global setting<br />

applies to all rectangles which have the Use Global<br />

option selected.<br />

Rectangles may also have individual color settings.<br />

Specific colors can be selected by disabling the global<br />

settings.<br />

The rectangle is filled with the foreground color if the<br />

Fill option is selected. The background color is used<br />

for rectangle borders.<br />

The optional variable in the Colors Variable field can<br />

change rectangle colors during runtime. The variable<br />

has to be of data type UINT.<br />

The higher value byte represents the foreground color<br />

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

background color (0−255).<br />

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

316 4.5.3.2 Rectangle and Square


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

4.5.4 Ellipse and Circle<br />

Ellipses and circles are static picture elements. They can be created in any size with individually adapted colors<br />

in the picture editor. Drawing circles and ellipses is not supported on all displays. This hardware limitation is<br />

taken into account by the editor if necessary.<br />

4.5.4.1 Drawing Circles and Ellipses<br />

Ellipses and circles can be drawn on the display by selecting the ellipse icon from the toolbar and clicking<br />

on the screen. Pressing and holding the mouse button defines the starting point of the ellipse. Releasing the<br />

mouse button defines where the ellipse is finished.<br />

Drawing circles is simplified by holding down the Ctrl key while drawing. The editor ensures that the height and<br />

width is the same and a circle is formed. The line width for a circle is always 1 pixel. The position and size of the<br />

ellipse can be changed after it has been drawn.<br />

Double−clicking on the circle opens up the Object Properties dialog box.<br />

A circle can be drawn over other existing static<br />

pictures. The circle is selected if a dashed rectangle<br />

can be seen around it. It can now be made larger,<br />

smaller, or be moved. Pressing the Del key deletes it.<br />

Static picture elements can be drawn in any desired<br />

layer.<br />

If necessary, an exact ellipse or circle can be drawn<br />

using the Grid or Snap−to−Grid Function.<br />

4.5.4.2 Ellipse and Circle<br />

4.5.4.2.1 Circle and Ellipse Properties<br />

Circles can be drawn in different colors with or without being filled. The 'Object Properties' dialog box is used for<br />

editing the properties of the circle.<br />

Double−clicking on a circle opens the 'Object Properties' dialog box.<br />

Under the Parameter tab, the corner points can be set<br />

for a circle or ellipse. For this, the enveloping<br />

rectangle can be defined in pixels using the Top, Left,<br />

Right, and Bottom settings.<br />

The Status Variable is of data type UINT. For ellipses,<br />

bit 0 is responsible for determining whether the ellipse<br />

is drawn or not.<br />

BIT 0 == 1 − Circle not shown<br />

BIT 0 == 0 − Circle shown<br />

4.5.4 Ellipse and Circle 317


Circle colors are globally defined using the foreground<br />

and background colors. The global setting applies to<br />

all circles which have the Use Global option selected.<br />

Each circles may also have individual color settings.<br />

Specific colors can be selected for the Foreground<br />

and Background by disabling the global settings.<br />

The circle is filled with the background color if the Fill<br />

option is selected. The foreground color is used for<br />

the border of the circle.<br />

The optional variable in the Colors Variable field can<br />

change circle colors during runtime. The variable has<br />

to be of data type UINT.<br />

The higher value byte represents the foreground color<br />

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

color (0−255) − see also Changing Colors Using<br />

Variables.<br />

4.5.5 Arranging Static Picture <strong>Components</strong><br />

4.5.5.1 Overlapping Static Objects<br />

Using static pictures, <strong>Visual</strong> <strong>Components</strong> provides the possibility to draw objects on multiple layers. These<br />

layers only apply during the design phase. During runtime, a character sequence is created from them which<br />

can no longer be changed.<br />

Each static object contains a shortcut menu with which the object can be moved one layer forward or backward.<br />

Basically, the order in which the objects were created determines the output layer. Starting from this point, the<br />

display can influence overlapping objects using the 'Bring Forward' or 'Send Backward' menus.<br />

Tip:<br />

Complex graphics should be created with a graphic program and saved as a 256−color bitmap. RGB color<br />

values should be considered for optimal results (see Color Palette).<br />

Examples:<br />

This symbolic illustration of a wrist watch consists of 4<br />

rectangles and a circle.<br />

The objects are appropriately placed with each other<br />

using the layer function so that they are displayed<br />

correctly.<br />

All objects can be selected and copied.<br />

Individual objects cannot be grouped or combined into<br />

one object.<br />

The properties of individual objects can be changed<br />

later.<br />

Tip: If problems arise while selecting objects, then the<br />

Tab key can be used to move to the next object. The<br />

Shift + Tab combination switches to the previous<br />

object.<br />

The Alt + Enter combination opens up the<br />

corresponding properties dialog box.<br />

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

318 4.5.5 Arranging Static Picture <strong>Components</strong>


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

Procedure for changing the position of an object:<br />

Select the desired object.<br />

The selection frame becomes visible.<br />

An object can be set to a different layer by selecting<br />

'Bring Forward' or 'Send Backward' from the shortcut<br />

menu. In this example, the marked circle is being set in<br />

the foreground.<br />

4.5.5 Arranging Static Picture <strong>Components</strong> 319


4.5.6 Background Bitmaps<br />

In this view, the circle is now in the foreground.<br />

In certain cases, Bring Forward or Send Backward<br />

must be selected several times since the object is only<br />

moved one layer at a time. The order in which objects<br />

were created is relevant here.<br />

Graphic panels provide the possibility to display monochrome or 256−color bitmaps on the display.<br />

Before bitmaps can be used, they must first be imported into the <strong>Visual</strong> <strong>Components</strong> or have already been<br />

created (see Bitmap Management).<br />

Static bitmaps (background bitmaps) are only output once when a page is changed and cannot be modified<br />

during runtime. If a modification is necessary during runtime, the 'Output Bitmap' output field must be used.<br />

Bitmaps can be combined with other objects, i.e. text or Overlapping Objects.<br />

If the display supports bitmap display, then they can be inserted using the icon in the toolbar. After selecting<br />

a bitmap, it can be inserted on the display by clicking where the upper−left corner of the bitmaps should be.<br />

Once the bitmap has been positioned, the dialog box for inserting background bitmaps is opened.<br />

Bitmap<br />

A Bitmap from any bitmap existing in the project can be<br />

selected in the combo box. Bitmaps are sorted<br />

alphabetically.<br />

Size<br />

Specifies the pixel size of the selected bitmap. This is<br />

only for display; input is not possible. If the size of the<br />

bitmap should be changed, this must be taken care of<br />

in a suitable graphics program before being imported<br />

into the <strong>Visual</strong> <strong>Components</strong> editor.<br />

Position<br />

Shows the X and Y pixel coordinates where this bitmap<br />

is inserted on the display.<br />

Status<br />

The status variable is of data type UINT. For bitmaps,<br />

bit 0 is responsible for determining whether the bitmap<br />

is drawn or not.<br />

BIT 0 == 1 − Bitmap not shown<br />

BIT 0 == 0 − Bitmap shown<br />

Preview<br />

Shows a reduced image of the bitmap to simplify<br />

selection and insertion. The preview is detailed<br />

according to the output size.<br />

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

An appropriate error message is given if the position and size of the bitmap exceed the display size in pixels.<br />

320 4.5.6 Background Bitmaps


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

Tip:<br />

If your bitmap is not represented correctly, this may be because of conversion to 256 colors in the editor. If<br />

necessary, these bitmaps must be created with this color palette, or the individual colors of the bitmap must be<br />

converted into <strong>Visual</strong> <strong>Components</strong> Color Tones.<br />

The representation could also be incorrect due to the Windows color configuration. If possible, use a screen<br />

setting with at least 32,768 colors in Windows. Otherwise, display errors can occur when bitmaps are used.<br />

4.6 Configuring Output Fields for Data<br />

<strong>Visual</strong> <strong>Components</strong> offers many possibilities for displaying process variables. The following section explains<br />

these possibilities.<br />

All fields can be inserted in a desired location and then configured in the picture editor. All output fields are listed<br />

in a common toolbar menu.<br />

If this tool is selected, the following menu appears where the desired output field can be selected.<br />

The following sections describe how the different output fields can be used. Detailed descriptions about<br />

individual output fields and adjustable parameters can be found in the reference manual.<br />

Output fields can be edited using either the mouse or keyboard. Double−clicking or Alt+Enter opens the<br />

'Properties' dialog box for the respective output field. Output field size can be adjusted by clicking and dragging<br />

on its borders. An output field can be moved by clicking on it and then dragging the field itself.<br />

The following sections describe the different possibilities for outputting process variables using <strong>Visual</strong><br />

<strong>Components</strong>.<br />

4.6.1 Recommendations<br />

Output fields provided by <strong>Visual</strong> <strong>Components</strong> are described in this section. Similar output fields have been<br />

summarized together to allow a better overview.<br />

Basic functions for operating <strong>Visual</strong> <strong>Components</strong> editors and dialog boxes are not described here. Such<br />

information can be found in the following sections.<br />

• Getting Started with <strong>Visual</strong> <strong>Components</strong><br />

This section contains examples which give step−by−step instructions for simple <strong>Visual</strong> <strong>Components</strong><br />

tasks.<br />

• Working with <strong>Visual</strong> <strong>Components</strong><br />

This section describes <strong>Visual</strong> <strong>Components</strong> editors and their elements.<br />

The following sections are recommended for working with <strong>Visual</strong> <strong>Components</strong>:<br />

• Displaying Texts and Numbers<br />

Describes the possibilites to use process variables in text and numeric form in the visualization<br />

application.<br />

4.6 Configuring Output Fields for Data 321


• Displaying Analog Values<br />

Describes the representation of numeric process variables in analog, graphic form using bar graphs.<br />

• Text and Graphics Output Using an Index<br />

Describes text and bitmap output depending on the value of a numeric process variable.<br />

• Advanced Control of Screen Elements<br />

Describes details about connecting status variables and their possibilities, as well as controlling output<br />

field color during runtime.<br />

4.6.2 Displaying Texts and Numbers<br />

<strong>Visual</strong> <strong>Components</strong> offers a series of output fields for displaying text or numeric values. Depending on the<br />

output field, various display possibilities exist for representing process variables of different data types.<br />

The following value and text outputs are supported by <strong>Visual</strong> <strong>Components</strong>.<br />

• Numeric Output<br />

All numeric process variables, regardless if they are integer or floating point data types, are displayed<br />

using the universal Output Numeric field.<br />

• Text Output<br />

Character strings which are stored in process variables on the controller can be displayed in the<br />

visualization application as text. Any character from the font being used can be displayed. Text output is<br />

displayed using the Output String field.<br />

• Date and Time Output<br />

An Output Date/Time field is available which also allows appropriate display formatting. If the format for<br />

this output field does not suffice, then a string with date or time information can be entered in the control<br />

application and displayed as text output.<br />

Additional possibilites for displaying texts from a text group or a graphic bitmap − depending on a numeric<br />

process variable − are described in the Text and Graphics Output Using an Index section.<br />

4.6.2.1 General<br />

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

All output fields are placed in the picture in the picture editor by clicking the icon in the toolbar and selecting<br />

the appropriate output field. After placing the field, the 'Object Properties' dialog box is opened and the output<br />

field can be adjusted according to requirements.<br />

Size, format, output field position, and the connected process variable can all be configured under the<br />

'Parameter' tab.<br />

322 4.6.2 Displaying Texts and Numbers


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

4.6.2.1.1 Format<br />

The maximum number of digits to be displayed is set in the Number of Digits field. The number of decimal<br />

places to be displayed from this is set using Digits After Decimal Point. These decimal places are "real" decimal<br />

places only when a REAL variable is used. For integer variables, only one decimal point is displayed in the<br />

appropriate place. The value is still a whole number. For a two digit decimal setting, 1725 on the controller is<br />

displayed as 17.25 in the input field.<br />

Depending on whether decimal places are displayed, the field width corresponds to the Number of Digits. It can<br />

be displayed as one character wider if the decimal point is used.<br />

Leading places can be filled with zeroes if the option Display Leading Zeros is selected. By default, leading<br />

places are filled with spaces.<br />

4.6.2.1.2 Position<br />

Allows the precise placement (in pixels) of the output field by entering coordinates in the X and Y fields. When<br />

the 'Object Properties' dialog box is opened, the current coordinates of the output field are indicated.<br />

The output field can be more simply and conveniently positioned with the mouse by clicking and dragging it. The<br />

exact position can be adapted to a grid (see also The Picture Editor).<br />

4.6.2.1.3 Data Point<br />

The process variable whose value is to be represented in the output field is connected in the Source input field.<br />

The variable name can be directly entered or selected by clicking the Assign... button.<br />

4.6.2.1.4 Status<br />

Allows the connection of a process variable which influences the output field during runtime (see also Controlling<br />

Fields with Status Variables).<br />

4.6.2.1.5 Preview<br />

Shows how the field will be displayed during runtime with the current settings.<br />

4.6.2.1 General 323


4.6.2.1.6 Colors<br />

If the Use Global option is selected, the colors set in the global project options are used. Otherwise, individual<br />

colors can be set for this output field.<br />

If global colors are not used, text and background colors for the output field can be set with the Foreground and<br />

Background settings. Colors used for cursor operation, as well as other distinctions, always use the global<br />

settings.<br />

A variable which allows colors to be changed during runtime can be connected under Colors Variable (see also<br />

Changing Colors Using Variables).<br />

4.6.2.1.7 Simulation<br />

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

A text can be defined for each output field which is displayed when the editor is in Simulation mode. In this way,<br />

pictures containing practical values in the output fields can be created for documentation.<br />

324 4.6.2.1 General


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

The set value is not evaluated by <strong>Visual</strong> <strong>Components</strong> either in the editor or during runtime.<br />

4.6.2.1.8 Description<br />

Allows text to be stored for documentation purposes.<br />

4.6.2.2 Output Numeric<br />

The following process variable data types can be connected in this output field: USINT, SINT, UINT, INT,<br />

UDINT, DINT, REAL.<br />

Numeric values are usually justified to the right side of the output field.<br />

Some special settings are available for numeric output.<br />

4.6.2.1 General 325


4.6.2.2.1 Scaling<br />

Numeric output fields support scaling of the displayed value.<br />

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

This setting allows values on the controller to be converted to values suitable for display and editing. For this,<br />

the optimal value range can be selected for exact calculations in the control application while the display in the<br />

visualization project uses clearly understandable measurement units for operators.<br />

Scaling refers to the definition of two value ranges. The value in the first value range is properly converted<br />

relative to the (scaled) value in the second value range.<br />

The Scaling Active option must be selected for this output field to use scaling. Turning on scaling also enables<br />

the other scaling settings in the dialog box.<br />

326 4.6.2.2 Output Numeric


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

The permissible value range of the variable is determined in the control application using PLC Value Range. If<br />

the range exceeds the specified limits on the controller, asterisks (*) are displayed instead of the value to<br />

indicate an overflow.<br />

Scaled Value Range sets the appropriate value range for the display of the value. The 0% value corresponds to<br />

the 0% value in the PLC value range and the 100% value to the 100% value in the PLC value range. Scaling<br />

takes place using a straight line function.<br />

For both value ranges, settings for the 0% and 100% values can be made directly in the dialog box or using a<br />

process variable during runtime. The appropriate Parameters from PLC box has to be selected to define value<br />

ranges with PLC process variables (see picture − value range panels). In this way, the input fields change<br />

themselves into selection fields for limiting using variables. Variable names can be directly entered or selected<br />

from a list by clicking on the Assign... button.<br />

Using the Shift Decimal Point setting, a process variable can be connected which is able to move the decimal<br />

point around within the output field during runtime. For this, a postive variable value means more decimal places<br />

(decimal point moves to the left) according to the value. A negative value means less decimal places (decimal<br />

point moves to the right).<br />

Note:<br />

The Shift Decimal Point setting is only possible if at least one decimal place was set under the Parameter tab of<br />

the 'Object Properties' dialog box.<br />

4.6.2.3 Output String<br />

This output field allows STRING[] process variables (STRING array with any length) to be represented. Only<br />

characters up to the 'Number of Characters' setting are displayed even if a longer text is stored in the process<br />

variable.<br />

4.6.2.4 Output Date/Time<br />

The date and time on the controller can be displayed during runtime using this output field. Output format can be<br />

selected according to requirements. However, it cannot be changed during runtime or switched with the<br />

language. If more flexibility is needed, then an Output String field can be used instead. Formatting the output<br />

text takes place in the control application.<br />

4.6.2.4.1 Time Format<br />

This setting determines how the date and time are formatted for display. For this, only the formats in the list are<br />

available. Other formats can be implemented in the control application and displayed using a string output field.<br />

4.6.2.3 Output String 327


Specifying the field length in characters is not necessary since the format determines the length of the field.<br />

4.6.3 Displaying Analog Values<br />

This section describes ways of implementing graphic and analog output using <strong>Visual</strong> <strong>Components</strong>. Analog<br />

representations do not describe process variables with numbers. Instead, a graphic is used which changes with<br />

respect to the process variable. This works just like an analog measuring instrument or a progress indicator<br />

which is displayed when installing software.<br />

<strong>Visual</strong> <strong>Components</strong> uses bars graphs which can extend in all four directions to represent analog information for<br />

process variables.<br />

Note:<br />

Please click on the following button to start a demo:<br />

More analog outputs can be created by the user with the help of the <strong>Visual</strong> <strong>Components</strong> programming interface<br />

(see also VISAPI Functions Overview).<br />

4.6.3.1 Bar Graph Output<br />

A bar graph can be selected using the output field shortcut menu in the picture editor.<br />

After selecting Output Bar Graph and placing it in the picture, a half−filled bar graph with borders is shown in the<br />

editor. In this way, the source of the bar graph can be better checked during the design phase. Bar graph<br />

borders are drawn only during the design phase, not at runtime. If this is necessary, then a static rectangle can<br />

be used (see also Rectangles and Squares).<br />

The 'Object Properties' dialog box is opened by double−clicking on the bar graph.<br />

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

328 4.6.3 Displaying Analog Values


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

4.6.3.1.1 Format<br />

The size and direction of the bar graph is set here. Length determines the bar length and Width determines the<br />

bar width depending on which direction the bar graph extends. In this way, the bar can be rotated without having<br />

to reset the proportions.<br />

4.6.3.1.2 Position<br />

The direction of the bar graph is set<br />

with Direction. In the picture shown<br />

here, all four possible directions are<br />

shown as they are displayed in the<br />

editor. The bar graph is half full,<br />

representing a setting of 50%. The<br />

black area is the filled, active part<br />

of the bar while the white, empty<br />

section within the borders is the<br />

background and can be set to any<br />

available color.<br />

Exact bar location can be set by entering the position in the X and Y fields. When the 'Object Properties' dialog<br />

box is opened, the current coordinates of the output field are indicated.<br />

The bar graph can be more simply and conveniently positioned with the mouse by clicking and dragging it. The<br />

exact position can be adapted to a grid (see also The Picture Editor).<br />

4.6.3.1 Bar Graph Output 329


4.6.3.1.3 Data Point<br />

Variable whose value determines the size of the bar. As long as the bar does not use scaling, the variable value<br />

specifies the exact length of the bar in pixels. A variable of type USINT or UINT can be used. Negative values<br />

are not supported, but another bar graph can be used which has the output directior reversed.<br />

The variable can be directly entered under Source or selected by clicking the Assign... button.<br />

4.6.3.1.4 Status<br />

Allows a status variable to be connection which can influence the output field during runtime (see also<br />

Controlling Fields with Status Variables).<br />

4.6.3.1.5 Preview<br />

Shows how the output field is displayed with the current settings. By clicking OK, the dialog box is closed and<br />

the settings are applied to the output field.<br />

4.6.3.1.6 Color<br />

The colors set in the global options can be used for the bar when the Use Global option is selected.<br />

If this option is not selected, bar graph colors can be chosen from a color palette using the Foreground and<br />

Background settings. Background refers to the empty space shown in the bar graph if the bar is less than 100%<br />

full.<br />

A UINT process variable can be connected in the Colors Variable field to change colors during runtime (see also<br />

Changing Colors Using Variables).<br />

4.6.3.1.7 Scaling<br />

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

By default, the bar graph is controlled by the process variable using one pixel increments. In other words, if the<br />

variable has the value 17, the bar will have a length of 17 pixels.<br />

If this default does not suffice, then a different conversion can be defined (control variable to bar length) under<br />

the Scaling tab.<br />

330 4.6.3.1 Bar Graph Output


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

The Scaling Active option must be selected to apply user defined scaling.<br />

Values which determine when the bar is empty or full are set in the 0% Value and 100% Value fields,<br />

respectively. These specifications are automatically converted to the set length of the bar.<br />

4.6.3.1.8 Description<br />

Text can be entered here for documentation purposes. This text is not evaluated by <strong>Visual</strong> <strong>Components</strong>.<br />

4.6.4 Text and Graphics Output Using an Index<br />

This type of output field is used for displaying dynamic status information where the value of a numeric process<br />

variable corresponds to a text or bitmap from a predefined collection. The PLC application only needs to process<br />

the numeric status information. <strong>Visual</strong> <strong>Components</strong> automatically takes care of displaying the correct text or<br />

bitmap in the visualization application.<br />

In this way, the same status information can be represented several times in the visualization application, i.e.<br />

once as a text and again as a bitmap graphic.<br />

The following output fields are possible:<br />

• Advanced Text Output<br />

• ListBox<br />

• Bitmap Graphic<br />

The displayed text or bitmap can be changed at any time by changing the value in the control application.<br />

Language switching can also be used for these dynamically displayed texts.<br />

Text or bitmap lists can no longer be influenced during runtime (except for ListBoxes which can use a process<br />

variable for the preparation of texts. In this case, language switching has to be turned off in the PLC application).<br />

Tip:<br />

By combining output fields described in this section with HotSpots, active input elements can be created very<br />

easily with bitmaps and texts!<br />

4.6.3.1 Bar Graph Output 331


4.6.4.1 Advanced Text Output<br />

This output field shows a text from a text group depending on the value of the connected process variable. The<br />

appearance of the text can also be changed during runtime using attribute and status variables. Text groups<br />

have to be created in the Text Group Editor before this type of output field is configured.<br />

The 'Object Properties' dialog box is opened by double−clicking on the output field.<br />

4.6.4.1.1 Format<br />

Number of Digits specifies the width of the output field in characters. Texts which are longer than this width are<br />

truncated when output. However, the value of the process variable is not changed.<br />

Font determines the font for the output text. Any font available in the project can be selected from the list (see<br />

also Font Management).<br />

Text Group determines the text group which contains the text to be displayed (see also Text Group Editor). A<br />

text group can be used for as many output fields as necessary. The number of texts in a text group is limited by<br />

the amount of memory available on the target system.<br />

Texts from the text group are always output using the index of the connected process variable. Additional<br />

scaling is not possible but may be implemented in the control application if necessary. Text indices in the text<br />

group can also be adjusted beginning with <strong>Visual</strong> <strong>Components</strong> version 2.2.<br />

4.6.4.1.2 Position<br />

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

Allows the precise placement (in pixels) of the output field by entering coordinates in the X and Y fields. When<br />

the 'Object Properties' dialog box is opened, the current coordinates of the output field are indicated.<br />

The output field can be more simply and conveniently positioned with the mouse by clicking and dragging it. The<br />

exact position can be adapted to a grid (see also The Picture Editor).<br />

332 4.6.4.1 Advanced Text Output


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

4.6.4.1.3 Text Number Data Point<br />

Process variable which selects the text to be displayed at runtime. The current value of this process variable<br />

corresponds to the numbers of the texts in the text group. Whichever value the process variable holds will<br />

determine which text from the text group is displayed.<br />

If the process variable contains an invalid value, then this text field is displayed on the target system filled with<br />

asterisks (*). If the variable does not exist because the task has not yet been transferred to the controller, for<br />

example, then the error is indicated with dashes (−).<br />

4.6.4.1.4 Attribute Data Point<br />

A process variable which determines more details of the displayed text can be connected here. The variable<br />

must be of data type UINT and can indicate two states at this time.<br />

Process<br />

variable<br />

0 Text is displayed using the set colors.<br />

1<br />

4.6.4.1.5 Status<br />

Effects<br />

Depending on the display used, text is output inverted (with reversed foreground and<br />

background colors) or blinking.<br />

Blinking is used on all displays which cannot display graphics. Text is inverted on all other<br />

displays including graphic displays with C130 CAN controllers.<br />

Allows the connection of a process variable which can influence the output field (see also Controlling Fields with<br />

Status Variables).<br />

4.6.4.1.6 Preview<br />

Shows how the field will be displayed with the current settings. The settings are only applied when OK is clicked.<br />

4.6.4.1.7 Colors<br />

4.6.4.1 Advanced Text Output 333


If the Use Global option is selected, then colors defined in the global project settings are used. If this option is<br />

not selected, text and background output color can be specified using the Foreground and Background settings.<br />

A variable which allows colors to be changed during runtime can be connected under Colors Variable (see also<br />

Changing Colors Using Variables).<br />

4.6.4.1.8 Simulation<br />

A text can be entered here which is displayed in the editor in Simulation mode.<br />

4.6.4.2 ListBox<br />

This output field is very similar to the Advanced Text output field. However, several texts are shown<br />

simultaneously in a list with the currently selected text accentuated by a different color.<br />

The ListBox is conceived as an output field and therefore does not receive any user interaction. The selected<br />

text is determined by a process variable from the PLC program.<br />

In this way, touch−operated elements can very easily implement any desired operation in the application if a<br />

panel with a touch screen is used. Naturally, key operation can also be implemented easily.<br />

ListBox properties correspond in many ways to those of Advanced Text Output. Different settings for the ListBox<br />

will be described in the following.<br />

4.6.4.2.1 Format<br />

In addition to the format properties of Advanced Text, the number of ListBox lines can be determined using the<br />

Rows parameter.<br />

4.6.4.2.2 Source of Texts<br />

There are 2 possibilities to choose from when displaying text with the ListBox:<br />

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

An existing text group can be connected using the Text Group setting. All texts from this text group are<br />

displayed in the ListBox during runtime in the order they were entered. The sequence or number of texts cannot<br />

be changed dynamically at runtime. However, text numbering within the text group can be adjusted during the<br />

design phase in the text group editor to meet corresponding requirements.<br />

334 4.6.4.1 Advanced Text Output


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

Texts are output from an array of string variables if the second setting, String Array, is selected. These texts can<br />

be composed in the control application during runtime and then output dynamically. Each line corresponds to a<br />

string from the array of strings. It should be noted that a string is an array by default. Therefore, an array of<br />

arrays must be created for this process variable.<br />

In contrast to the Text Group setting, switching languages between the text layers defined in <strong>Visual</strong> <strong>Components</strong><br />

cannot be applied (since texts are only made available during runtime from the PLC program and are therefore<br />

not recognized by the <strong>Visual</strong> <strong>Components</strong> editor). Language switching must be disabled by the control<br />

application if necessary.<br />

4.6.4.2.3 Variables<br />

The Selected Item setting selects the highlighted line from the list. The list is always automatically advanced so<br />

that the element is visible.<br />

4.6.4.2.4 Colors<br />

In addition to color settings for Advanced Text, the color of the highlighted line in the ListBox also has to be set.<br />

4.6.4.3 Bitmap Graphic<br />

This output field uses bitmaps to represent a dynamically changing status. For this, a process variable from the<br />

PLC program can be used to switch between up to 255 different bitmaps. The upper−left corner of the bitmap is<br />

always located at the specified position of the bitmap output field.<br />

The background is not cleared when bitmaps are switched. Instead, only the new bitmap is output. Therefore, all<br />

bitmaps should be the same size so that the rest of the previous bitmap does not remain on the display when it<br />

is switched.<br />

At the moment, bitmap output is only possible on IPC target systems (in color or black/white depending on the<br />

display) or the PP41 PowerPanel. Displays used by the C130 CAN controller do not support bitmap output<br />

fields.<br />

The following settings can be defined for the bitmap field under the 'Parameter' tab:<br />

4.6.4.2 ListBox 335


4.6.4.3.1 Position<br />

Allows the precise placement (in pixels) of the output field by entering coordinates in the X and Y fields. When<br />

the 'Object Properties' dialog box is opened, the current coordinates of the output field are indicated.<br />

The output field can be more simply and conveniently positioned with the mouse by clicking and dragging it. The<br />

exact position can be adapted to a grid (see also The Picture Editor).<br />

4.6.4.3.2 Data Point<br />

A process variable is connected here whose value determines which bitmap should be selected. The variable<br />

must be of data type UINT and should only be set in a value range corresponding to how the bitmaps are<br />

defined. Selecting undefined bitmap numbers is not supported.<br />

4.6.4.3.3 Status<br />

Allows the connection of an additional process variable which enables further output field control (see also<br />

Controlling Fields with Status Variables).<br />

4.6.4.3.4 Bitmaps<br />

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

A list of bitmaps is managed in this panel. They are displayed depending on the value of the connected variable.<br />

The bitmap number is shown in the first column. This is the same value which the process variable must have in<br />

order to show this bitmap.<br />

The name of the bitmap appears in the second column. Clicking on the field opens a list where the desired<br />

bitmap can be selected.<br />

336 4.6.4.3 Bitmap Graphic


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

Entries can be added, inserted, removed, or the sequence changed using the buttons under the bitmap list. The<br />

list cannot have empty spaces since bitmaps are numbered in consecutive, ascending order.<br />

4.6.4.3.5 Preview<br />

The bitmap currently selected under Bitmaps is displayed in this area.<br />

Bitmaps should be as close to the same size as possible for consistent display. The field size in the editor is<br />

determined using the largest inserted bitmap in the X and Y directions.<br />

4.7 Configuring Input Fields for Data<br />

<strong>Visual</strong> <strong>Components</strong> supports the input of process information in both numeric and text form. These input fields<br />

can be placed and configured anywhere in a picture. This section describes these input fields and how they are<br />

used in a <strong>Visual</strong> <strong>Components</strong> project.<br />

Input can also be assigned to panel keys with <strong>Visual</strong> <strong>Components</strong>. When these keys are pressed, certain<br />

interactions take place with the connected process variable, i.e. the variable is set to a certain value or the<br />

variable value is increased by a predetermined increment. These same functions are also possible on a touch<br />

screen using the appropriate touch fields.<br />

Assigning keys to variable interactions is described in the Keys, LED, and Touch Support section.<br />

4.7.1 ListBox<br />

The ListBox input control looks the same and is configured just like the ListBox output control. However, this<br />

control allows the user to directly input selections using cursor control.<br />

4.7.1.1<br />

Text group<br />

A text group with consecutive index numbering beginning with 0. A text group<br />

with gaps in the index (i.e. 0 − 1 − 4 − 12) cannot be connected.<br />

4.6.4.3 Bitmap Graphic 337


4.7.1.2 Option bytes<br />

This field accepts a byte array. The length of this byte array has to correspond at least to the number of texts<br />

used in the text group. Using this byte array, texts can be locked runtime (value = 1) or made invisible (value =<br />

2). Each index in the array describes the state of its corresponding text element (OptionByte[10] = Text #10 in<br />

the text group). Value 0 sets the text back to visible and unlocked.<br />

4.7.1.3 Cursor Character<br />

The cursor character has been integrated into the ListBox input control for black/white displays.<br />

Since colors can't be configured to differentiate between selected elements<br />

and cursor elements, a character has been introduced for the cursor.<br />

This character is inserted before the text where the cursor is located.<br />

4.7.1.4 Selected Item<br />

Variable on which the index of the selected item is mapped.<br />

4.7.1.5 Status<br />

Status variable. This variable can be used to lock this control or make it invisible.<br />

(see also Controlling Fields with Status Variables).<br />

Up key: Key for upward movement in the ListBox<br />

Down key: Key for downward movement in the ListBox<br />

Select key: Key for selecting an element<br />

Note when configuring control keys:<br />

Keys for up/down control have to be configured. If an Enter key is already present on the operator panel (or<br />

display), then a selection key is not necessary. In this case, the Enter key itself is used as the selection key. The<br />

Enter key can even be used to switch to the next selection element. If a separate selection key has been<br />

configured, then a "Goto Input" control key is required to move to other input fields.<br />

Procedure:<br />

At runtime, the user receives a cursor for choosing text and a cursor for the selected element (text group<br />

variable). In contrast to the ListBox output control, scrolling up or down through the entries is possible without<br />

changing the value of the connected variable. The index of the element under the cursor is written to the text<br />

group variable with the Enter or selection key.<br />

4.7.1.6 Colors<br />

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

338 4.7.1.2 Option bytes


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

Foreground and background colors, as well color variables for the ListBox input control, can be<br />

specified for the selected item and the locked element in the Color dialog box.<br />

4.7.1.7 Completion Data Point<br />

This setting allows input to be monitored after it is completed or the Increment/Decrement keys are no longer<br />

pressed. To achieve this, a variable is entered under Completion Data Point. Every time the 'Enter' key is<br />

pressed or an Increment/Decrement key is released, the variable is set to the value entered in Completion Value<br />

regardless of the value which was input.<br />

The same completion data point can be defined for any number of input fields with various completion values. In<br />

doing so, monitoring changes and input in the control application becomes much more simplified.<br />

4.7.1.7 Completion Data Point 339


4.7.1.8 Locking Input<br />

In this window, configuration for locking the element can be made.<br />

See Securing Input with Password Levels<br />

4.7.1.9 Description<br />

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

Control descriptions can be added in this field. This is only to display information for the programmer and<br />

doesn't have any influence on the target system.<br />

340 4.7.1.8 Locking Input


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

4.7.2 Numeric Input<br />

Entries in a visualization application are usually made using numeric input fields. <strong>Visual</strong> <strong>Components</strong> provides a<br />

special input field which meets nearly all of the possibilities for numeric input. If user−defined input is necessary,<br />

this can be taken care of by using string input fields which are described in the next section (see also Text<br />

Input).<br />

A numeric input field is inserted in the <strong>Visual</strong> <strong>Components</strong> picture editor. After selecting the<br />

icon (shown here to the left) from the toolbar, this menu appears. Selecting Input Numeric<br />

switches the editor to insert mode for numeric input fields.<br />

Any number of input fields can be inserted. The 'Properties' dialog box appears to edit the<br />

newly inserted field once it has been placed. 'Properties' can also be opened by<br />

double−clicking on an existing input field.<br />

4.7.2.1 Formatting and Handling Input<br />

This input field supports many settings and options to meet the needs of the application.<br />

4.7.2.1.1 Format<br />

The maximum number of digits to be displayed is set using Number of Digits. The number of decimal places to<br />

be displayed is set using Digits After Decimal Point. These decimal places are "real" decimal places only when a<br />

REAL variable is used. For integer variables, only one decimal point is displayed in the appropriate place. The<br />

value is still a whole number. For a two digit decimal setting, 1725 on the controller is displayed as 17.25 in the<br />

input field. The input of 32.68 sets the value of the connected variable to 3268.<br />

Depending on whether decimal places are displayed, the field width corresponds to the Number of Digits. It can<br />

be displayed as one character wider if the decimal point is used.<br />

Leading places can be filled with zeroes if the option Display Leading Zeros is selected. By default, leading<br />

places are filled with spaces.<br />

4.7.2 Numeric Input 341


The Activate Automatic Comma Input option in the global properties of the project determines if the decimal<br />

point must be manually entered during input. If this option is selected and the input field is set for two decimal<br />

places, then '17.25' is displayed by typing '1 − 7 − 2 − 5 − Enter'. If this option is not selected, then '1725' will be<br />

displayed regardless of the decimal place setting.<br />

If Automatic Comma Input is not used, then a decimal must be defined when defining keys.<br />

If the Disable Cursor Movement On Enter option is selected, then the cursor will not automatically go to the next<br />

field when input is completed.<br />

4.7.2.1.2 Position<br />

A pixel perfect field location can be set by entering the position coordinates in the X and Y fields. The default<br />

value corresponds to where the field was placed with the mouse.<br />

4.7.2.1.3 Preview<br />

Displays the input field with the currently selected settings. These settings for the input field in the picture are<br />

applied when confirmed with the OK button.<br />

4.7.2.1.4 Colors<br />

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

342 4.7.2.1 Formatting and Handling Input


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

By selecting Use Global, the colors set in the global project options can be selected. Otherwise, individual colors<br />

can be set.<br />

If the global colors are not used, the text and background color for the input field can be set using the<br />

Foreground and Background settings. Colors used for the cursor during operation, as well as other distinctions,<br />

always use the global settings.<br />

A variable which allows colors to be used or changed during runtime can be entered under Colors Variable.<br />

4.7.2.1.5 Adjusting Input Up / Down<br />

Up/Down keys can be used instead of number keys to enter input into fields in the picture. In this way, an input<br />

value can be increased or decreased with the specified Up/Down keys once the field has the focus.<br />

The respective keys are set under the 'UpDown' tab in the 'Properties' dialog box of the picture, and there<br />

cannot be more than one of each for one picture.<br />

The keys which are used to increase and decrease input values are listed under Increment Key and Decrement<br />

Key.<br />

If the key is pressed briefly, then the value shifts one step. If the key is held down longer, then the value<br />

increases/decreases more quickly.<br />

4.7.2.1 Formatting and Handling Input 343


'Up/Down Input' must be activated for any input fields which should use these defined keys. Keys defined for<br />

'Increment Key' and 'Decrement Key' are displayed here.<br />

The input field must have the focus to use these keys for input there. If a variable is constantly being adjusted or<br />

if a user−defined increment should be used, then an Increment/Decrement function key can be used in place of<br />

this setting.<br />

The advantage of the setting described here for these keys lies in the several usage possibilities for different<br />

types of input. For example, completely functional input can be implemented using only three keys (a key which<br />

accepts input and advances to the next input field, and the 'Increment' and 'Decrement' keys).<br />

4.7.2.2 Connecting Variables<br />

The link with the control application is made by connecting corresponding variable(s). The following variables<br />

can be connected.<br />

4.7.2.2.1 Data Point<br />

Process variable whose value can be displayed and changed.<br />

4.7.2.2.2 Status<br />

A variable can be connected here to further monitor the input field during runtime (see also Controlling Fields<br />

with the Status Variable).<br />

4.7.2.2.3 Completion Data Point<br />

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

344 4.7.2.2 Connecting Variables


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

This setting allows input to be monitored after it is completed or the Increment/Decrement keys are no longer<br />

pressed. To achieve this, a variable is entered under Completion Data Point. Every time the 'Enter' key is<br />

pressed or an Increment/Decrement key is released, the variable is set to the value entered in Completion Value<br />

regardless of the value which was input.<br />

The same completion data point can be defined for any number of input fields with various completion values. In<br />

doing so, monitoring changes and input in the control application becomes much more simplified.<br />

4.7.2.2.4 Scaling<br />

This setting allows values on the controller to be converted to values suitable for display and editing. For this,<br />

the optimal value range can be selected for exact calculations in the control application while the display in the<br />

visualization project uses clearly understandable measurement units.<br />

Scaling refers to the definition of two value ranges. The value in the first value range is properly converted<br />

relative to the (scaled) value in the second value range.<br />

4.7.2.2 Connecting Variables 345


The Scaling Active option must be selected for this input field to use scaling. This activates the two following<br />

options.<br />

The permissible value range of the variable is determined in the control application using PLC Value Range. No<br />

values outside of this range can be input in the visualization application. If a variable is entered which falls<br />

outside of this range, then it is automatically corrected to the nearest permissible value. The user is notified and<br />

and can confirm the change.<br />

If the Parameters from PLC option is checked, then variables can be connected and used as upper and lower<br />

limits of the PLC value range. This allows the scaling range to be changed by the controller during runtime.<br />

Scaled Value Range sets the appropriate value range for value display and input. When this value is input,<br />

decimal places might possibly have to be entered as well. Automatic decimal input only has an effect on <strong>Visual</strong><br />

<strong>Components</strong> during runtime. It does not have an effect on the editor.<br />

Variables for the upper and lower limits of the value range can also be connected for this area by selecting the<br />

'Parameters from PLC' option.<br />

A variable can also be connected here which allows the decimal point to be shifted during runtime. However,<br />

this option is only active if decimal places are defined for the field.<br />

4.7.2.3 Additional Settings<br />

4.7.2.3.1 Simulation<br />

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

A text can be defined for each input field which is displayed when the editor is in Simulation mode. In this way,<br />

pictures containing practical values in the input fields can be created for documentation .<br />

346 4.7.2.3 Additional Settings


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

The set value is not evaluated by the <strong>Visual</strong> <strong>Components</strong> editor or during runtime.<br />

4.7.2.3.2 Description<br />

Allows text to be stored for documentation purposes.<br />

4.7.2.3.3 Locking<br />

See Securing Input with Password Levels.<br />

4.7.2.3.4 Touch Screen<br />

Additional settings are possible when touch screen displays are used. These settings are available for both<br />

numeric and textual input.<br />

See Using Input Fields on Touch Screens.<br />

4.7.3 Text Input<br />

Text input uses alphanumeric characters (0−9, A−Z, a−z, etc.) and is stored in the controller as a string or byte<br />

array.<br />

4.7.3.1 Formatting the Input<br />

A text input field is inserted in the <strong>Visual</strong> <strong>Components</strong> picture editor. This menu<br />

appears after selecting the icon (shown here to the left) from the toolbar. Selecting<br />

Input String from this menu allows the string input field to be inserted.<br />

Any number of input fields can be placed. The 'Properties' dialog box appears after<br />

a new field is inserted. 'Properties' can also be opened by double−clicking on an<br />

existing input field.<br />

Properties are automatically displayed after a new input field is inserted.<br />

4.7.2.3 Additional Settings 347


4.7.3.1.1 Format<br />

The width of the input field is set in characters using the Number of Characters field. Input fields only support the<br />

entry of single line texts. Input fields composed of several lines or automatic lines breaks are not supported.<br />

The font is selected from the Font selection list. Any font configured in the project can be selected.<br />

4.7.3.1.2 Position<br />

The exact location of the field in pixels can be set by entering the position in the X and Y fields. The default<br />

value corresponds to where the field was placed with the mouse.<br />

4.7.3.1.3 Preview<br />

Displays the input field with the currently selected settings. These settings are applied to the input field in the<br />

picture editor by clicking the OK button.<br />

4.7.3.1.4 Colors<br />

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

348 4.7.3.1 Formatting the Input


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

The Use Global setting determines whether global project or separate individual color settings should be used<br />

for this input field.<br />

If global colors are not used, then text and background colors for the input field can be set using the Foreground<br />

and Background settings. Colors used for the cursor during operation, as well as other distinctions, always use<br />

the global settings.<br />

A variable which allows colors to be used or changed during runtime can be entered under Colors Variable.<br />

4.7.3.2 Input Field Operation<br />

A series of options are provided under the Keys tab which support many different possibilities for inputting text.<br />

Each possibility described in this section applies exclusively to panel keys. The Edit Mode setting is an<br />

exception since it can also apply to touch operation.<br />

4.7.3.2 Input Field Operation 349


4.7.3.2.1 Keys<br />

These settings allow additional keys to be configured which handle input functions. The following functions can<br />

be assigned:<br />

Function Description<br />

Cursor Left key<br />

Cursor Right key<br />

Delete key<br />

Backspace key<br />

4.7.3.2.2 Tabulator<br />

Moves the cursor one character to the left without altering input. This allows the cursor to<br />

be moved back a few places to correct a mistake or add a forgotten letter.<br />

Moves the cursor one character to the right without altering input. The cursor can be<br />

moved to a maximum of one place beyond the last character entered.<br />

Deletes the character to the right of the cursor and advances the remaining characters (to<br />

the right) one step forward. No gap is left when this key is pressed.<br />

This key should be used even if the cursor keys were configured.<br />

Deletes the character to the left of the cursor and moves all remaining characters one<br />

place to the left.<br />

Using the tabulator key (tab), the cursor can move more than one character to the right. The number of<br />

characters that the cursor moves when pressing the tab key can be set using Tab distance.<br />

AutoTab Mode can also be selected as an alternative so that the cursor moves to the next word. In this case,<br />

words consist of entities using the letters a−z in upper or lower case. All other characters are considered<br />

separators.<br />

4.7.3.2.3 Mode<br />

Different modes can be more practical than others for data input depending on the type of input. The number<br />

and type of available keys can also affect how information is entered.<br />

The Edit Mode list offers the following possibilities:<br />

Edit<br />

Clear<br />

Mode Meaning<br />

Key−Dependent<br />

Password<br />

4.7.3.3 Connecting Variables<br />

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

In this mode, an input field is edited normally. If the content should be changed, then the<br />

previous contents must first be deleted using the Delete and/or Backspace keys.<br />

In this mode, the previously existing text is basically overwritten. Editing the old text is not<br />

possible since it is deleted when the first key is pressed to enter new input in the active field.<br />

This mode combines the two previous modes depending on the first key used when editing the<br />

field.<br />

If the first key pressed is a cursor key, then the appropriate cursor movement occurs and the<br />

text is preserved. This behavior corresponds to Edit mode.<br />

Otherwise, the text is completely replaced. This behavior corresponds to Clear mode.<br />

Operation is the same as Clear mode except that characters entered (as well as the existing)<br />

are not displayed on the screen.<br />

In this way, the input of hidden passwords and similar data is possible without having to be<br />

displayed on the screen.<br />

Symbols to be displayed in place of actual entered characters can be set in Password char. An<br />

asterisk (*) is used by default.<br />

Connecting with the control application takes place by connecting the appropriate variables. The following<br />

variables can be connected.<br />

350 4.7.3.2 Input Field Operation


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

4.7.3.3.1 Destination Data Point<br />

Process variable whose value can be displayed and changed.<br />

4.7.3.3.2 Status<br />

A variable can be connected here to further monitor the input field during runtime (see also Controlling Fields<br />

with the Status Variable).<br />

4.7.3.3.3 Completion Data Point<br />

This setting allows input to be monitored after it is completed by pressing the 'Enter' key. To achieve this, a<br />

variable is entered under Completion Data Point. Every time the 'Enter' key is pressed, the variable is set to the<br />

value entered in Completion value regardless of the given value.<br />

4.7.3.3 Connecting Variables 351


The same completion data point can be used for any number of input fields with various completion values. In<br />

doing so, monitoring changes and input in the control application becomes much more simplified.<br />

4.7.3.4 Additional Settings<br />

4.7.3.4.1 Simulation<br />

A text can be defined for each input field which is displayed when the editor is in Simulation mode. In this way,<br />

pictures containing practical values in the input fields can be created for documentation.<br />

The set value is not evaluated by the <strong>Visual</strong> <strong>Components</strong> editor or during runtime.<br />

4.7.3.4.2 Description<br />

Allows text to be stored for documentation purposes.<br />

4.7.3.4.3 Locking<br />

This setting is discussed separately.<br />

See Securing Input with Password Levels.<br />

4.7.3.4.4 Touch Screen<br />

Additional settings are possible when touch screen displays are used. These settings are available for both<br />

numeric and textual input.<br />

See Using Input Fields on Touch Screens.<br />

4.7.4 Securing Input with Password Levels<br />

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

Securing input is frequently a requirement of visualization applications. <strong>Visual</strong> <strong>Components</strong> basically supports<br />

any type of security which can define a process variable using the currently set security level in numeric form as<br />

a result.<br />

<strong>Visual</strong> <strong>Components</strong> provides special password input fields for locking entries using passwords. Other<br />

mechanisms for this can be produced on the controller using application tasks. For example, a key switch could<br />

be requested using I/O variables, or a serial device which reads cards with electronic chips could be addressed<br />

using the FRAME library. However, these possibilities are application specific and so will not be expanded upon<br />

352 4.7.3.4 Additional Settings


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

here.<br />

4.7.4.1 Configuring Locking for Input Fields<br />

The first step in securing input is configuring each individual input field. Individual input field settings can be<br />

made at any time. In the following, an Input Numeric dialog box is shown. However, settings are applied the<br />

same for all other input fields.<br />

Configuring input locking takes place under the 'Locking' tab of the Properties dialog box for the input field. The<br />

following settings are available there:<br />

The Locking Active option determines if this input field should be locked. If this option is not selected, then the<br />

corresponding input can be handled at any time.<br />

A variable which specifies the current security level has to be connected in the Password Value Data Point field.<br />

The application can determine how these security levels are laid out.<br />

'Input Locked If' determines when input is not possible. The following settings are possible.<br />

Setting Description<br />

Password value is zero<br />

Password value < Level<br />

Password value >= Level<br />

The input field is locked if the variable has the value 0. Any other value unlocks the<br />

field.<br />

If input fields are grouped together, a separate variable can be used for each of<br />

these groups to unlock input.<br />

This setting is used if a single variable is used to manage rights and numerically<br />

'smaller' password levels possess more rights than 'large' password levels.<br />

It should be noted that the password must be 'less than' the set password level to<br />

unlock the input field. If they are equal, then the input field is still locked.<br />

With this setting, input is unlocked if the connected variable is greater than or equal<br />

to the set password level.<br />

4.7.4.1 Configuring Locking for Input Fields 353


The comparative value is determined according to the setting in the 'Password level' field. This must be set in<br />

the editor during the creation phase.<br />

4.7.4.2 Entering Passwords<br />

<strong>Visual</strong> <strong>Components</strong> provides two methods for entering passwords. The first method allows password operation<br />

to be configured in <strong>Visual</strong> <strong>Components</strong> during the creation phase. The second possibility entails evaluating the<br />

actual input using the controller application.<br />

Both fields are inserted in the <strong>Visual</strong> <strong>Components</strong> picture editor. After selecting the icon<br />

(shown here to the left) from the toolbar, this menu appears.<br />

Evaluating passwords can be applied by selecting Input String. A variable is connected<br />

which writes the password to a string variable or byte array using echo characters (i.e.<br />

*****). The input string is evaluated in the application program.<br />

Password logic is managed in <strong>Visual</strong> <strong>Components</strong> with the Input Password option. In<br />

contrast to string input, however, this method is limited to the number of password levels.<br />

After inserting the desired input field, the 'Properties' dialog box appears to edit it. 'Properties' can also be<br />

opened by double−clicking on an existing input field.<br />

4.7.4.2.1 Formatting the Input<br />

Password input essentially supports the same positioning, formatting, and colors as string input fields (see also<br />

Text Input). The maximum length of a password field is 6 characters. This is also the maximum length for<br />

adjustable passwords.<br />

Additionally, the Echo character field determines which characters should be used to display on the screen in<br />

place of the entered password characters (for security reasons, actual character input is not directly visible).<br />

4.7.4.2.2 Connecting Variables<br />

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

A numeric variable has to be connected in the 'Destination (Password) Data Point' field. The input field<br />

recognizes the possible passwords and converts them to the appropriate authorization level. The variables<br />

connected here can be used directly as password variables for input fields, as described above. For this, the<br />

Password value >= Level mode is used and the desired password level entered.<br />

354 4.7.4.2 Entering Passwords


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

A status variable or completion data point can also be defined if necessary.<br />

4.7.4.2.3 Defining Passwords<br />

Passwords for this field are determined during the creation phase and can no longer be changed while the<br />

program is running. If changing passwords during runtime is necessary, string input in Password mode and<br />

controller application logic need to be used.<br />

Up to 4 password levels can be defined which are numbered from 0 to 3. The number of the corresponding<br />

password level is transferred to the password variable. If a valid password is not entered, then 0 is written to this<br />

variable. This level must therefore be used for inputs which are always available. Password levels 1 to 3 can be<br />

set under the Passwords tab.<br />

The number of password levels can be set under Number of Password Levels. 2 to 4 levels are possible. The<br />

first level (level 0) is used if an incorrect password was entered.<br />

Corresponding passwords are entered in the input fields Password #1 to Password #3. The password variable is<br />

set to the appropriate value (the number before the # character) after a password is successfully entered. If an<br />

incorrect password is entered, then the password variable receives the value 0.<br />

4.7.5 Using Input Fields on Touch Screens<br />

Guiding users through the input of numeric and alphanumeric characters is different on display units with touch<br />

screens than it is on displays with keys.<br />

<strong>Visual</strong> <strong>Components</strong> provides the possibility to display a virtual keypad on these touch displays. It opens<br />

automatically when an input field is touched and allows characters to be input to the field which is to be edited.<br />

Support is limited to graphic touch displays (display units for the IPC2001 and IPC5000 series). Matrix touch<br />

displays, which can be operated with the C130 CAN controller, are not supported in this way. Operations are<br />

carried out as with normal keys.<br />

4.7.5.1 Using Touch Keypads<br />

4.7.4.2 Entering Passwords 355


4.7.5.1.1 Numeric Input<br />

A standardized touch keypad for numeric input exists for all supported display units. All characters necessary for<br />

numeric input fields are supported.<br />

4.7.5.1.2 Alphanumeric Input<br />

The active input field is displayed in the upper part of the keypad during<br />

runtime. Its operation is very similar to a numeric keypad.<br />

Numeric values are input using the number keys 0 to 9.<br />

Input is cancelled by pressing the 'Cancel' key. All input made in the<br />

field to this point is discarded.<br />

Characters to the left of the cursor are deleted using the 'Backspace'<br />

key.<br />

The input value is confirmed and accepted by the input field when<br />

the this 'Enter' key is pressed. As long as input is between the limits,<br />

the touch keypad closes and the value is written to the connected<br />

control variable.<br />

If the upper limit is exceeded or the lower limit not reached, then the<br />

value is corrected to the nearest limit value and is only accepted<br />

once 'Enter' is pressed again.<br />

The sign (pos/neg) for the input can be changed with this key.<br />

A decimal point can be added to the input by pressing this key. This<br />

is only for input fields using decimal places or floating points.<br />

Alphanumeric entries have even more input possibilities. By default, a 640x240 (pixel) keypad based on a<br />

standard AT keyboard appears to allow input to string and password fields.<br />

The string to be entered into the input field is displayed in the upper left area.<br />

Most keys function the same as they would on a normal PC AT keyboard. Some exceptions are summarized in<br />

the following table.<br />

Image Description<br />

The cursor can be moved left or right using these keys. They do not cause changes in the<br />

input.<br />

Pressing this 'Cancel' key cancels the input and closes the touch keypad.<br />

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

356 4.7.5.1 Using Touch Keypads


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

The backspace key deletes the character to the left of the cursor and moves the entire<br />

remaining text (to the right of the cursor) one place to the left.<br />

Pressing the 'Enter' key confirms the input and the input field accepts the entered string.<br />

This 'Caps Lock' key allows several capitalized letters to be entered in succession. Capitalized<br />

letters (or lowercase letters, as the case may be) are input until the 'Caps Lock' key is pressed<br />

again.<br />

A single letter can be capitalized or a special character can be entered using the 'Shift' key. To<br />

do this, the 'Shift' key must be pressed before the desired letter key.<br />

Warning: Pressing several keys simultaneously on the touch keypad is not possible<br />

due to the construction of the analog touch display! Therefore, characters<br />

must be entered one after another. The 'Caps Lock' key can be used if<br />

several capitalized letters are entered in a row.<br />

To save space, the spacebar is located in the Right Shift key position.<br />

A split keypad with the same input possibilities is available during runtime for alphanumeric input on a 1/4 VGA<br />

display (QVGA).<br />

This keypad consists of three tabs which are arranged like the inside of a dialog box. Two of the three keypad<br />

tabs are displayed here.<br />

The first tab, marked by 0−9, contains digits and special characters. The two other tabs contain the letters A−P<br />

and Q−Z. The Q−Z page also contains some punctuation marks and special characters which are not included<br />

on the first tab due to lack of space.<br />

The value being edited is displayed in the upper, blank part of the keypad. The entire QVGA display surface<br />

(320x240 pixels) is required when this input dialog box is open.<br />

Some special keypad assignments are described in the following table.<br />

Image Description<br />

The desired tab is selected using the register tabs on the left side of the keypad. It is<br />

displayed and the desired characters can then be entered. The selected tab remains<br />

displayed until another tab is selected or the input is closed by pressing the 'Enter' key.<br />

4.7.5.1 Using Touch Keypads 357


A single letter can be capitalized or a special character can be entered using the 'Shift' key.<br />

To do this, the 'Shift' key must be pressed before the desired letter key.<br />

Warning:<br />

Pressing several keys simultaneously on the touch keypad is not possible due to the<br />

construction of the analog touch display! Therefore, characters must be entered one after<br />

another. The 'Caps Lock' key can be used if several capitalized letters are entered in a row.<br />

Pressing this 'Cancel' key cancels the input and closes the touch keypad.<br />

Pressing the 'Enter' key confirms the input and the input field accepts the entered string.<br />

The spacebar is located on the lower right of the touch keypad.<br />

4.8 Advanced Control of Screen Elements<br />

Beginning with version 2.1, <strong>Visual</strong> <strong>Components</strong> input and output fields have some new, common control<br />

possibilities available for the controller application. Because of this, the visualization project can be adapted to<br />

the controller application's processes and states.<br />

4.8.1 Recommendations for New Users<br />

The topics in this section require knowledge about configuring fields and operating the <strong>Visual</strong> <strong>Components</strong><br />

editor.<br />

This information can be found in the following sections:<br />

• Getting Started with <strong>Visual</strong> <strong>Components</strong> 2.1<br />

Creating a <strong>Visual</strong> <strong>Components</strong> project is described step−by−step in this section.<br />

• Working with the <strong>Visual</strong> <strong>Components</strong> Editor<br />

This section contains an introduction and explanation of the individual <strong>Visual</strong> <strong>Components</strong> editors and<br />

their dialog boxes.<br />

• Arranging Static Picture <strong>Components</strong><br />

This section describes how static picture elements are used for picture layout. They include static texts,<br />

lines, circles, rectangles, and bitmaps.<br />

• Configuring Output Fields for Data<br />

Outputting data is described in this section (output fields). Numeric, text, and graphic output are all<br />

described in this section.<br />

• Configuring Input Fields for Data<br />

This section describes how to configure and use input fields. It also describes the differences between<br />

touch system input and conventional systems which use operator panel keys.<br />

4.8.2 Changing Colors Using Variables<br />

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

Normally, color for visualization picture elements is set in the editor during the design phase. Global color<br />

settings for frequently used colors are also set in the editor, but can be adjusted for each individual picture<br />

element.<br />

If it is necessary to change the color of a picture element during runtime, it can be done using a color variable.<br />

358 4.8 Advanced Control of Screen Elements


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

4.8.2.1 Connection<br />

One or more color variables can be connected in the Properties dialog box of each field, depending on which<br />

type of field is used. Fixed color settings are also entered here during the design phase.<br />

The following image describes the color settings for a numeric input field. Other fields are connected similarly.<br />

A variable can be connected in the Source input field located under Colors Variable. If the control variable name<br />

is known, then it can be entered directly or chosen from a list by clicking the Assign... button.<br />

The connected variable must be of data type UINT.<br />

If the variable is not present during runtime, then the colors set in the configuration dialog box are used.<br />

4.8.2.2 Color Variable Structure<br />

Two pieces of color information are stored in a color variable simultaneously: The foreground color and<br />

background color for the affected field (or part of it). Colors can be assigned to the corresponding setting in the<br />

dialog box.<br />

4.8.2.1 Connection 359


In this dialog box (color settings for a touch button), the color variable refers to the two adjustable colors of the<br />

same group. The left−hand color defines the foreground color. The right−hand color defines the background<br />

color. This color information is read into the high byte and low byte of the color variable.<br />

The color variable must be a 16−bit UINT data type. From these 16 bits, 8 bits are used for the foreground color<br />

and 8 bits for the background color. In this way, 256 color shades are possible for both the foreground and<br />

background color.<br />

Bit<br />

No.<br />

Dec.<br />

Value<br />

Hex<br />

Value<br />

0−7 255 0x00FF Background<br />

8−15 65280 0xFF00 Foreground<br />

4.8.2.3 Application Possibilities<br />

Name Description<br />

The background color of the element is set with the lower 8 bits of the<br />

color variable. All 256 colors from the color palette of the current project<br />

can be used.<br />

Setting 255 is transparent, i.e. the corresponding area is not colored. This<br />

setting does not work with all fields and can only be used if the picture<br />

does not change after it is constructed.<br />

The foreground color of the element is set with the upper 8 bits of the<br />

color variable.<br />

It is not possible to cover all of the details of such an implementation in this section. Applications and concrete<br />

examples in C and Automation Basic can be found in the Tips and Tricks section.<br />

• 4.8.2.3.1 Using Static Texts as Status Indicators<br />

Status indicators can be easily displayed using the color variable and static texts.<br />

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

The application sets the color value for static text depending on the state of the option to be indicated. If<br />

the foreground and background are set to the same value, the surface will be displayed as one color.<br />

Otherwise, the text is displayed with the respective color.<br />

In this way, indicators such as 'Motor Off', 'Motor On', and 'Motor Error' can be implemented using<br />

simple color switching.<br />

360 4.8.2.3 Application Possibilities


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

Tip:<br />

Dynamic texts can be used if the text should be appropriately modified for output.<br />

• 4.8.2.3.2 Blinking Element on the Screen<br />

Foreground and background colors are changed to a desired blink frequency in order to output a<br />

blinking element on the screen.<br />

A field connected with this variable then blinks automatically with the selected colors.<br />

If the element should only blink because of a special state (i.e. in the event of error), a separate color<br />

variable is used and, depending on the status, set to the blink variable value or the "resting state" value.<br />

• 4.8.2.3.3 Bar Graphs with Color Changes<br />

Bars graphs with changing colors can also be used in the application. According to the limits, changing<br />

colors can be implemented at runtime by modifying the color variable.<br />

4.8.3 Controlling Fields with Status Variables<br />

Status variables can be connected to all fields in <strong>Visual</strong> <strong>Components</strong> which enables visibility control, input<br />

release, and synchronization with external variables.<br />

4.8.3.1 Connection<br />

The status variable is entered under the Parameter tab of the Properties dialog box. The following image shows<br />

the Parameter tab for a numeric input field.<br />

The connected status variable must be of data type UINT. The same variable can also be used for several fields<br />

as long as the synchronize function is not used. If the synchronize function is used, then it makes sense to use<br />

separate variables for each field, so that the processed (active) field can be more accurately determined.<br />

4.8.3.2 Assignment<br />

The status variable uses individual bits to control different field tasks. Depending on requirements, these bits<br />

can be set and/or evaluated by the application. If the status variable is 0, or if no status variable is connected,<br />

4.8.2.3 Application Possibilities 361


then the field operates as before.<br />

Bit No.<br />

Dec.<br />

Value<br />

0 1 0x0001 Invisible<br />

1 2 0x0002 Locked<br />

2−13 16380 0x7FFC Reserved<br />

14 16384 0x4000 HasFocus<br />

15 32768 0x8000 EditActive<br />

Hex Value Name Description<br />

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

This bit is set by the user (or control application) in order to<br />

make the field invisible. If the bit is 0, the field will be displayed<br />

normally.<br />

The bit can be switched at any time. The picture is then<br />

redrawn accordingly and the corresponding field is displayed<br />

as either visible or invisible. The update occurs at a maximum<br />

of once per second.<br />

Input can be locked by setting this bit to 1. This function can be<br />

used in place of or in addition to the normal password levels.<br />

This setting is checked when the field is selected. In other<br />

words, when the cursor moves over the field or it is touched<br />

(touch screen).<br />

This bit is only evaluated for input and touch−operated fields.<br />

Other fields do not normally react to user input.<br />

These bits are reserved for future updates and should be<br />

initialized to 0 before starting the application. This ensures that<br />

future updates will not have unwanted effects on the<br />

application.<br />

These bits cannot be changed or evaluated during runtime.<br />

This bit is set to 1 by the editor when the input field is marked<br />

as active (i.e. has the input focus). If another input field is<br />

selected, then this bit is set back to 0.<br />

Using this bit, the control application can determine which<br />

input field has just been chosen by the user and can respond<br />

accordingly. This could be useful for displaying appropriate<br />

help text in a status bar, for example.<br />

This bit is only set for input fields and is reserved for all other<br />

fields.<br />

This bit is set to 1 by the editor if the input field has been<br />

opened for editing. It is reset to 0 when the input has been<br />

completed. This allows a more exact determination of the<br />

editing status of a field than would normally be possible using<br />

only the completion address.<br />

This bit can be evaluated in the control application, so that<br />

variables which are acquired over a network (i.e. INA client<br />

FBKs) can be synchronized accordingly.<br />

If the bit changes from 0 to 1, the variable must be excluded<br />

from being read so that it is not overwritten by the network<br />

copy routine after editing.<br />

When the bit is changed from 1 to 0, the variable must be<br />

transferred (written) once to the remote station. The variable<br />

can then be enabled again for reading.<br />

This bit is only set for input fields and is reserved for all other<br />

fields.<br />

362 4.8.2.3 Application Possibilities


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

4.8.3.3 Application Possibilities<br />

This section contains a few examples concerning the use of status bits. It is not possible to completely cover all<br />

of the details of such an implementation in this section. Applications and concrete examples in C and<br />

Automation Basic can be found in the Tips and Tricks section.<br />

• Synchronized Data Acquisition Over a Network<br />

Transporting variables from remote stations can be coordinated using the EditAction bit (15). By default,<br />

active variables are read cyclically and then displayed.<br />

If the variable's EditActive bit changes from 0 to 1, then this field was opened to be edited on the<br />

visualization unit. Cyclic reading for the respective variable must be disabled until the input is complete.<br />

This is indicated when the bit switches back to 0. This means that this variable can be written back to<br />

the remote station. As an option, the value can be checked to make sure it is within permitted<br />

boundaries.<br />

When completed, the variable is activated again for cyclic reading.<br />

• Configurable <strong>Visual</strong>ization<br />

By default, <strong>Visual</strong> <strong>Components</strong> does not support a dynamic visualization arrangement on the runtime<br />

system. Such behavior can be partially reproduced using the Invisible bit. In this way, options on the<br />

machine which either are either not available or not paid for are hidden from the visualization user.<br />

Although the layout cannot be changed in this way, certain option controls can be taken from the screen<br />

as well as appropriate pages from the page switching system.<br />

This allows extensive configurations to be implemented by integrating the <strong>Visual</strong> <strong>Components</strong><br />

visualization into the control application.<br />

• User−Defined Input Locking<br />

If input field password levels are not sufficient, or if status variables for visibility control are already being<br />

used in the application, then it is easier to control input locking in the application.<br />

If these conditions are not met, then using password levels is usually easier and less complicated when<br />

handled and maintained in the visualization.<br />

• User−Dependent Information Display<br />

With its password management system for input fields, <strong>Visual</strong> <strong>Components</strong> supports the simple<br />

administration of Write abilities (rights) in the visualization, depending on the current user level.<br />

In some visualization applications, certain information should only be displayed to privileged users. By<br />

default, this is not directly supported by <strong>Visual</strong> <strong>Components</strong>.<br />

However, this behavior may now be implemented in the application with the Invisible bit which can<br />

switch fields visible or invisible.<br />

• Context−Sensitive Help<br />

Using the HasFocus bit (14), the control application can determine which input field is activated (has the<br />

input focus). This may allow an appropriate help text to be very easily displayed in a status bar or other<br />

suitable field.<br />

4.8.4 Advanced Text Group Options − Formatted Texts<br />

Alarm texts and texts from text groups can be linked with so−called tags (formatted variables) and can output<br />

strings and numeric values which are generated during runtime. Using these tags, flexible texts and texts<br />

adjustable at runtime can be defined. However, alarm texts are limited to 4 numeric variables.<br />

4.8.3.3 Application Possibilities 363


4.8.4.1 Connection<br />

Tag variables are inserted using the Tag button in the Text Input dialog box. The length, format, and the variable<br />

to be connected are all inserted in the Format Wizard using variable dialog boxes. The following image shows<br />

the Format Wizard dialog box for a numeric variable.<br />

Supported data types:<br />

BOOL<br />

USINT<br />

SINT<br />

UINT<br />

INT<br />

UDINT<br />

DINT<br />

STRING (the alarm system does not support strings)<br />

4.8.4.2 Format<br />

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

The maximum number of digits to be displayed is set in the Number of Digits field. The number of decimal<br />

places to be displayed from this is set using Digits After Decimal Point. For variables, only one decimal point is<br />

displayed in the appropriate place. The value still remains a whole number. For a two−digit decimal setting,<br />

1725 on the controller is displayed as 17.25 in the input field. The input of 32.68 sets the value of the connected<br />

variable to 3268.<br />

Depending on whether decimal places are displayed, the field width corresponds to the Number of Digits. It can<br />

be displayed as one character wider if the decimal point is used.<br />

Using Fill Space With Character determines whether leading places should be filled with blank spaces (i.e.<br />

zeroes). These empty character spaces can be defined by the user. By default, leading spaces are filled with<br />

zeroes.<br />

364 4.8.4.1 Connection


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

4.8.4.3 Data Point<br />

The process variable to be displayed is selected under Source. A process variable which is not in the Source list<br />

can be selected from the variable dialog box using the Assign... button.<br />

The inserted tag consists of the formatting and the process variable in brackets. Text and tags can be inserted<br />

individually. The number of tags in Text Groups is limited to a maximum of 4 per text and language.<br />

The same procedure is used with alarm texts. However, texts are limited to a maximum of 4 numeric<br />

variables regardless of how many languages are configured.<br />

4.9 VC Project Multilingual Capabilities<br />

<strong>Visual</strong> <strong>Components</strong> provides the opportunity to create projects in several languages. These languages are<br />

configured during project creation. Picture contents can also be viewed in several languages in the picture<br />

editor. In this way, screen page changes can be checked using different texts.<br />

The editor also allows language texts to be exported in either a .CSV format (Excel) or plain text. Texts can be<br />

translated there and then imported back into the <strong>Visual</strong> <strong>Components</strong> editor.<br />

The language can then be switched to a different language layer during runtime. The picture on the display is<br />

redrawn after the language variable is changed.<br />

It is also possible to activate and deactivate configured languages. If the project is recompiled, then only the<br />

active text layers are compiled which changes the project size on the target system.<br />

The necessary steps for creating a multilingual project are explained in the following sections. The sections<br />

contain a step−by−step example and should be read in order.<br />

4.9.1 Project Multilingual Capabilities<br />

4.9.1.1 Adding and Activating Text Layers<br />

A text layer indicates all the texts which belong to a language and can be compiled. Static texts, dynamic texts,<br />

and alarm system texts are all parts of text layers.<br />

By default, a new project is created with only one text layer. This text layer is called 'Default'. All configured text<br />

layers can be seen in the project tree under 'Languages'.<br />

4.8.4.3 Data Point 365


A new text layer is inserted from the 'Languages' shortcut menu or by pressing the 'INS' key in the language<br />

view (right side).<br />

New text layers must be named in this dialog box.<br />

The 'Compile Text Layer' option specifies whether the text layer should be compiled for the target system.<br />

If there is not a lot of memory on the target system, then it doesn't make sense to compile languages which are<br />

not necessary. In addition, languages can optionally be supplied to end customers.<br />

A new text layer is inserted after entering the the language name 'English' and selecting the 'Compile Text<br />

Layer' option.<br />

Text layers can later be renamed or removed.<br />

After a new text layer has been created, all texts in the project are transferred from the 'Default' text layer to the<br />

new text layer. This makes certain that all texts will always be seen.<br />

4.9.2 Project Multilingual Capabilities<br />

4.9.2.1 Configuring Texts in Several Languages<br />

After one or more text layers have been added to a <strong>Visual</strong> <strong>Components</strong> project, the input dialog box for static<br />

texts looks different when opened. All additional languages are displayed beneath the "default" column with the<br />

texts in the default language. These can be translated accordingly.<br />

The existing text of the 'Default' language is transferred to the new layers.<br />

Double−clicking the text for the appropriate language allows translation to take place.<br />

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

366 4.9.2 Project Multilingual Capabilities


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

If there are several text layers, then they are inserted in the following lines. Each language can be translated<br />

separately. Since the translated texts are sometimes a different length then the default language texts, the<br />

picture is partially changed.<br />

Translation results can immediately be checked in the Language Switching Design View.<br />

4.9.3 Project Multilingual Capabilities<br />

4.9.3.1 Switching Languages During the Design Phase<br />

The possibility exists to switch text layers in all editors. In this way, project translation can be checked and<br />

translations can be input directly.<br />

This preview allows texts with different lengths to be rearranged if necessary.<br />

There are two text layers in this example − 'Default' and 'English'. Any defined language can be selected from a<br />

combo box in the picture editor toolbar.<br />

Selecting 'English' automatically switches to the English text layer. As long as a translation is available, texts in<br />

the picture are displayed in their respective language.<br />

4.9.3 Project Multilingual Capabilities 367


When there is a difference in text length, the longest text of a text layer is indicated. It is identified by a dashed<br />

border.<br />

4.9.4 Project Multilingual Capabilities<br />

4.9.4.1 Text Groups in Several Languages<br />

Text groups are also displayed in the editor in several languages. They appear in columns under the text layer<br />

names.<br />

After inserting a new text layer, default texts are automatically transferred to it and can be directly translated in<br />

the appropriate editor.<br />

Warning:<br />

Since a text group is assigned to a dynamic text field with a fixed length (see also Text and Graphics Output<br />

Using an Index), texts which are too long will be truncated automatically at runtime. Text length and assignment<br />

to the corresponding text field must be considered during the design phase.<br />

4.9.5 Multilingual Project Capabilities<br />

4.9.5.1 Switching Languages During Runtime<br />

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

Switching languages during runtime is done from the application program (i.e. writing to the language variable<br />

from the visualization application). The variable value must correspond to the text layer index.<br />

Language variable changes are checked cyclically during runtime. When the value is changed to a valid text<br />

index, the current picture is redrawn with the new language.<br />

Language switching is activated by selecting 'Enable Text Layer Switching' from the 'Panel' global project<br />

settings. Languages are changed during runtime by modifying the value of the connected variable.<br />

368 4.9.4 Project Multilingual Capabilities


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

If the project is started on the target system, the value of the 'Language_Index' variable is used as the text layer<br />

index.<br />

If the 'Language_Index' variable has a value of 0, the project is displayed with the 'Default' text layer.<br />

If the 'Language_Index' variable has a value of 1, all texts are displayed in English.<br />

4.9.6 Multilingual Project Capabilities<br />

4.9.6.1 Importing and Exporting Texts<br />

<strong>Visual</strong> <strong>Components</strong> provides the opportunity to export all project texts. Translation can then be done in another<br />

program. Translated texts can then be imported back into the project.<br />

Texts can be exported in either a *.TXT or *.CSV file. In this way, texts can be edited using any text editor or MS<br />

Excel.<br />

Texts are exported and imported by selecting 'Text Export...' or 'Text Import...' from the 'Tools' menu. These<br />

menu items become available when at least one additional text layer has been inserted.<br />

4.9.6.1.1 Text Export<br />

One or more text layers can be exported at the same time.<br />

4.9.6 Multilingual Project Capabilities 369


The export file format is determined by how many languages are selected. Each language is stored in a<br />

separate column in the export file and separated by some sort of character (i.e. ';').<br />

The sequence of the languages, as well as their accompanying ID (internal text identification), is set in 'Format'.<br />

Warning:<br />

The IDText must not be changed. This is used for text assignment when importing.<br />

Export File Structure:<br />

In the export file, one text layer is stored per column. This text file contains keywords beginning with the #<br />

character. These keywords must not be changed.<br />

Default;English;IDText; /* Heading*/<br />

#PANEL<br />

#PICTURE<br />

#TEXT_GROUP<br />

#ALARM_GROUP<br />

#ALARM_GROUP<br />

#ALARM_GROUP<br />

#ALARM_SETTINGS<br />

After a keyword (i.e. #PICTURE), all texts in the corresponding group follow.<br />

#PICTURE<br />

11;TextDefault;Text;Text;1;<br />

2;F1;F1;F1;2;<br />

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

The length of the longest text within a text layer is specified in the first column. All texts from the corresponding<br />

text layer (according to the export configuration) are given in the following columns. The internal text ID is<br />

specified in last column (according to the export configuration) and must not be changed.<br />

'0' is specified for alarm text length. In this way, alarms with any length are output since these texts can be<br />

output to a display and an alarm printer with various lengths.<br />

370 4.9.6 Multilingual Project Capabilities


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

4.9.6.1.2 Text Import<br />

Translated texts can be imported back into a project. Texts from any text layer (including 'Default') can be<br />

changed. When importing, the ID text is used to assign texts to the project and its text layers.<br />

4.10 Keys, LED, and Touch Support<br />

Keys are a central component of a visualization application. They are used for numeric/alphanumeric input,<br />

changing pictures, navigation, as well as direct manipulation of control variables.<br />

<strong>Visual</strong> <strong>Components</strong> recognizes four types of keys, each of which has various application ranges and usage<br />

possibilities.<br />

• Operator Panel Keys<br />

<strong>Visual</strong> <strong>Components</strong> supports numerous operator panels, a majority of which are equipped with<br />

integrated keys. By default, these keys are imprinted (i.e with number pads and other frequently used<br />

keys) and can also be arranged appropriately by using legend sheets.<br />

Fixed key functions are already preconfigured for all <strong>Visual</strong> <strong>Components</strong> panels. All other keys can be<br />

set according to the needs of the application.<br />

Some of these keys are also equipped with LEDs. These can also be configured with <strong>Visual</strong><br />

<strong>Components</strong>.<br />

4.9.6.1 Importing and Exporting Texts 371


• Graphic Keypad on Touch Systems<br />

A graphic keypad is used on touch systems to input numeric and alphanumeric information.<br />

Adjusting this keypad is not possible. It is automatically displayed by the <strong>Visual</strong> <strong>Components</strong> runtime<br />

system.<br />

• 'Button' and 'HotSpot' Touch Fields<br />

'Button' and 'HotSpot' touch fields can be used to configure virtual keys on panels equipped with a touch<br />

screen. These keys are updated frequently (high priority) and allow a jog key function (see also Using<br />

the Key Matrix).<br />

• Standard AT PS/2 Keyboard<br />

The possibility exists on IPC systems to configure input using a standard PS/2 AT keyboard (see Project<br />

Options). Essentially, this allows a lot of input to be entered during the commissioning phase. By default,<br />

German and English (US) keyboard formats are supported.<br />

4.10.1 Configuring Panel Keys<br />

A key in a project must first be appropriately configured before it can be assigned a function in the picture editor.<br />

At the same time, imprinted keys have preconfigured functions so the user only has to define application specific<br />

keys.<br />

Keys are configured in the picture overview. This is opened by selecting the<br />

'Pictures' node in the <strong>Visual</strong> <strong>Components</strong> editor tree view.<br />

Keys which have already been assigned can also be deleted in this global<br />

picture area!<br />

Panel key configuration is found in the lower right−hand part of the view.<br />

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

372 4.10.1 Configuring Panel Keys


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

The keys can be individually configured in this view. Double−click on a key to configure it. Configuration takes<br />

place in the following dialog box:<br />

Basic key functions are defined under the first tab − 'Key Type'. The following settings are possible:<br />

• None<br />

Selecting 'None' means that this key has no special function. It is either not used or only used for<br />

entering numbers. To assign an alphanumeric character to the key, the desired character must be<br />

4.10.1 Configuring Panel Keys 373


entered in '0. Level' under the 'Key Levels' tab.<br />

See also Configuring Several Key Levels.<br />

• Function Key<br />

A function key is required to carry out special functions in the individual pictures. (see also Using<br />

Function Keys). A function key can be assigned a name composed of 1 to 4 characters which is valid in<br />

the entire project (i.e. F1, QUIT, etc.).<br />

• Control Key<br />

Control keys provide a uniform predefined function which is valid in the entire project, i.e. these<br />

functions apply in every picture. The following control keys are available, some of which are assigned to<br />

the fixed printed keys.<br />

Next Picture<br />

Previous Picture<br />

Enter<br />

Next Input<br />

Label Function<br />

Assigning the 'Next Picture' takes place from the corresponding source<br />

picture.<br />

The same function can also be achieved using a function key.<br />

Assigning the 'Previous Picture' takes place from the corresponding source<br />

picture.<br />

The same function can also be achieved using a function key.<br />

This control key corresponds to the input completion key and finalizes entered<br />

data in numeric and/or alphanumeric input fields.<br />

This key is required in all projects which do not use a touch screen for<br />

entering numeric and alphanumeric data.<br />

Moves the cursor to the next input field. The cursor control sequence is<br />

defined in the picture editor with Next Input / Previous Input.<br />

Clear Deletes the current input field entry.<br />

Backspace<br />

Deletes the character to the left of the cursor and moves the remainder (right<br />

of the cursor) to the left.<br />

Sign Change Changes the sign (+/−) of numeric input fields.<br />

Previous Input<br />

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

Moves the cursor to the previous input field. The cursor control sequence is<br />

defined in the picture editor with Next Input / Previous Input.<br />

Acknowledge All acknowledgeable queued alarms are acknowledged with this key.<br />

374 4.10.1 Configuring Panel Keys


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

Additional settings can be made for some control keys using picture dependent key configurations (see<br />

also Configuring Keys to Picture Levels).<br />

• Switch Levels Key<br />

This key is used to switch between multiple key levels (see also Configuring Several Key Levels).<br />

4.10.2 Configuring Keys to Picture Levels<br />

After global keys have been configured, key functions can be assigned in each picture corresponding to the key<br />

configuration.<br />

A key function can be assigned to a function key. The 'Next Picture' and 'Previous Picture' control keys require a<br />

picture−dependent configuration (picture assignment) to function.<br />

4.10.2.1 Key Editor<br />

The picture−dependent key is configured for the respective picture in the picture editor. The picture to be edited<br />

is selected from the <strong>Visual</strong> <strong>Components</strong> project tree.<br />

Once the the picture editor opens, displays which have keys can be configured in the lower area.<br />

Assigning a key function to a key takes place using a symbol illustrated on the respective key. There are two<br />

types of key assignments:<br />

4.10.2 Configuring Keys to Picture Levels 375


Symbol Meaning<br />

This symbol indicates that the key has been assigned to a picture element (input field +/−<br />

shift, alarm system paging / acknowledgement, etc.).<br />

A key must be either redefined in the accompanying field or deleted to make it available for<br />

another function.<br />

This symbol indicates that this key has been configured for an action in this picture. This key<br />

can be edited or freed in this editor.<br />

All other key symbols indicate control keys. In the above example, the control keys 'Next Picture', 'Previous<br />

Picture', 'Backspace', and 'Enter'.<br />

4.10.2.2 Key List<br />

A list of all existing and assigned keys is displayed to the right of the key editor.<br />

This list displays which functions have been assigned in the editor or fields to the keys in the current picture. The<br />

F1, F2, and F3 keys in the picture above are assigned to an alarm line. F1 is assigned for alarm<br />

acknowledgement. F2 and F3 are assigned for paging through the current alarms. These keys can only be<br />

edited in their respective fields.<br />

The F7 and F8 keys have been configured here in the editor. F7 is assigned to change to the next input field to<br />

the right. F8 is assigned to change to the 'SECOND' picture. Double−clicking on a key displays the settings for<br />

the selected action. For example, the direction for changing to the next input field can be redefined. (see also<br />

Using Function Keys).<br />

4.10.2.3 Assigning Keys<br />

This section describes assigning a function and its properties to a function key (see also Using Function Keys).<br />

Possible functions apply to both keys and touch−operated fields.<br />

Control keys settings are also described since only a panel key can be configured as a control key.<br />

4.10.2.3.1 Assigning Functions to Function Keys<br />

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

A function is assigned to a function key in the shortcut menu of the key. The desired key function has to be<br />

selected from the function list.<br />

Warning:<br />

If the shortcut menu for the circle is opened, then possible LED functions are displayed (see also Configuring<br />

and Controlling LEDs).<br />

376 4.10.2.2 Key List


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

After a function is selected, its dialog box is displayed and configuration can take place.<br />

4.10.2.3.2 Setting Function Parameters<br />

Dialog boxes containing settings for functions which are already assigned can be opened by double−clicking on<br />

the key in the key editor or in the key assignment list.<br />

Warning:<br />

Double−clicking on the circular LED symbol opens its configuration dialog box.<br />

4.10.2.3.3 'Next Picture' and 'Previous Picture' Control Keys<br />

The 'Next Picture' and 'Previous Picture' control keys switch through the application pictures based on a<br />

user−defined sequence.<br />

Target pictures are displayed in the bottom two lines of the key list with their respective control keys icons.<br />

Picture assignment can be changed by double−clicking one of the two lines.<br />

4.10.2.3 Assigning Keys 377


4.10.3 Creating Keys on the Touch Display<br />

Displays which do not have panel keys are operated using a touch screen. This allows input of numeric and<br />

alphanumeric values, the operation of the application, as well as visualization process operation.<br />

Tools for entering numeric or alphanumeric values are automatically provided by <strong>Visual</strong> <strong>Components</strong> if the panel<br />

comes with a touch display.<br />

This section describes options for implementing key functions using the touch display.<br />

4.10.3.1 Inserting Touch−Operated Fields<br />

Two types of fields are available for touch displays:<br />

A touch field is inserted using the icon from the picture editor toolbar.<br />

After selecting the desired touch field, insert mode is activated and as many touch fields as desired can be<br />

placed on the current page.<br />

Both touch fields allow their pressed states to be edited along with the action which is triggered when they are<br />

activated.<br />

The difference between the two fields is their graphic appearance. The touch button allows a visible,<br />

configurable surface.<br />

Using the HotSpot, the user can create an invisible touch field whose appearance is configured later by the user.<br />

<strong>Visual</strong> <strong>Components</strong> only provides the surface.<br />

4.10.3.2 HotSpot<br />

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

The HotSpot is invisible during runtime and can be used to define areas and actions in bitmaps. The HotSpot is<br />

displayed in the editor as a dashed rectangle.<br />

378 4.10.3 Creating Keys on the Touch Display


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

Settings and options for the HotSpot are as unlimited as those for the touch button. Therefore, common<br />

properties will only be described once.<br />

4.10.3.2.1 Dimension<br />

These settings determine the exact position and size of the touch field on the screen. The 'Left' and 'Top' default<br />

values correspond to where the field was placed with the mouse.<br />

4.10.3.2.2 Key Matrix Offset<br />

If it is also necessary to map a touch field in the key matrix, its offset can be defined here.<br />

If this setting is selected, the position in the matrix can be assigned in the input field after any possibly existing<br />

panel keys. The panel keys are stored in a defined sequence at the beginning of the key matrix.<br />

The display field shows the effective index resulting from the setting in the matrix for this touch field. This<br />

corresponds to the sum of the panel keys and the adjusted offset.<br />

4.10.3.2.3 Status<br />

See also Controlling Fields with Status Variables.<br />

4.10.3.2 HotSpot 379


4.10.3.2.4 Action<br />

Under the 'Action' tab, the function which is triggered by pressing the touch field can be selected from a list. The<br />

same settings are available as for panel keys configured as function keys (see also Using Function Keys).<br />

4.10.3.3 Touch Button<br />

Functionally, a touch button is the same as a HotSpot but happens to possess additional display options. Touch<br />

button appearance corresponds to that of a visible button. There are additional settings with regard to<br />

appearance.<br />

In the above example, the button on the left is the <strong>Visual</strong> <strong>Components</strong> standard button (except for the large<br />

font). The button on the right has a wider border, customized colors, and is provided with an additional bitmap.<br />

4.10.3.3.1 Parameter<br />

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

380 4.10.3.2 HotSpot


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

4.10.3.3.2 Dimension<br />

These settings determine the exact position and size of the touch field on the screen. The 'Left' and 'Top' default<br />

values correspond to where the field was placed with the mouse.<br />

4.10.3.3.3 Key Matrix Offset<br />

If it is also necessary to map a touch field in the key matrix, its offset can be defined here.<br />

If this setting is selected, the position in the matrix can be assigned in the input field after any possibly existing<br />

panel keys. The panel keys are stored in a defined sequence at the beginning of the key matrix.<br />

The display field shows the effective index resulting from the setting in the matrix for this touch field. This<br />

corresponds to the sum of the panel keys and the adjusted offset.<br />

4.10.3.3.4 Status<br />

See also Controlling Fields with Status Variables.<br />

4.10.3.3.5 Appearance<br />

4.10.3.3 Touch Button 381


4.10.3.3.6 Logical Font<br />

Defines the font to be used for the button label. Any font in the project can be used for this. The font applies for<br />

both the pressed and released button states.<br />

4.10.3.3.7 Border Width<br />

Determines the button border width. The button is accentuated with suitable colors (see picture above). Border<br />

width is set here depending on the type of hardware used (different for each button).<br />

4.10.3.3.8 Released Button and Pressed Button<br />

The respective appearance of the button is determined for both the released and pressed states in these two<br />

groups. Settings can be made individually for each state. By default, the setting for the released button is also<br />

used for the pressed button.<br />

Button text can be chosen using 'Text Group' and 'Text'. The text must be defined in a text group (see also Text<br />

Group Editor). After assigning a text group, the appropriate text must be selected from it. Direct entry of text is<br />

not supported.<br />

A bitmap can also be entered for each state. It will appear on the left side of the button. If a bitmap is entered,<br />

then text is centered on the right side of the button. Otherwise, text is placed directly in the middle. If only a<br />

bitmap is connected, then it is also placed in the middle of the button.<br />

Any bitmaps in the project can be used in color, black/white, or using transparent effects.<br />

The result is shown in the 'Preview' area. Using the 'Released' and 'Pressed' option fields, the button can be<br />

viewed in their different states.<br />

4.10.3.3.9 Colors<br />

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

Button colors can be individually set and optionally controlled during application runtime by connecting variables<br />

to them (see also Changing Colors Using Variables).<br />

382 4.10.3.3 Touch Button


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

4.10.3.3.10 Border<br />

Sets the border colors for the key. The 'raised' setting is used for the left and top borders when the button is<br />

released and the right and bottom borders when pressed. The 'sunken' setting is used for the other borders.<br />

To make the button look like it is being selected, 'raised' should be set with a bright color and 'sunken' with a<br />

darker color. To display a flat button without 3D effects, the same colors can be used for both its 'raised' and<br />

'sunken' states.<br />

4.10.3.3.11 Released Button and Pressed Button<br />

Determines the colors for the surface of the button as well as the inscription. Pressed button settings are<br />

especially important for buttons with a toggle function since the pressed state is visible for a longer time.<br />

4.10.3.3.12 Action<br />

4.10.3.3 Touch Button 383


Under the 'Action' tab, the function which is triggered by pressing the touch field can be selected from a list. The<br />

same settings are available as for panel keys configured as function keys (see also Using Function Keys).<br />

4.10.3.3.13 Additional Settings<br />

Settings under the 'Locking' and 'Description' tabs are explained in the general input field documentation (see<br />

also Securing Input with Password Levels).<br />

4.10.4 Using Function Keys<br />

Function keys can be configured for both panel keys and touch operated elements.<br />

When function keys are used, several interactions are possible between the visualization and the control<br />

application. Most of the functions described below can be configured for both panel keys and touch−operated<br />

elements.<br />

The settings illustrated in the following are mainly for panel keys. With an appropriate layout, however, these<br />

settings can be also adapted for touch operated elements.<br />

4.10.4.1 Interaction with Control Variables<br />

4.10.4.1.1 General<br />

4.10.4.1.1.1 Input Field Description<br />

All dialog boxes have essentially the same structure.<br />

The individual elements have the following meanings.<br />

Element Meaning<br />

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

384 4.10.3.3 Touch Button


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

Source<br />

'Assign...' Button<br />

Value1, Value2<br />

4.10.4.1.1.2 Completion Data Point<br />

A variable from the control application is connected here. This variable must already exist in<br />

the control application in order to be assigned or input directly, i.e. already entered in the<br />

variable declaration section.<br />

Pressing this button opens the variable selection dialog box where an existing variable from<br />

the control application can be assigned. By default, only variables with suitable data types<br />

are displayed in the dialog box.<br />

Depending on the function, one or more values can be defined which are assigned to the<br />

key according to function and key status.<br />

A variable can optionally be connected which allows a user−defined value to be set when then key action has<br />

been completed.<br />

The completion data point can be used to centrally record and query changes in the control application. In this<br />

way, application code is created easier and is better maintained.<br />

4.10.4.1.2 Set USINT and Set UINT<br />

If a key is defined with the 'Set ...' function, then the connected variable is set to the defined value when the key<br />

is pressed. The value has to be reset in the control application.<br />

The same settings apply to both variations. Only the data types are different.<br />

4.10.4.1.3 Toggle USINT and Toggle UINT<br />

This function switches the status of the connected variable between 2 predefined values. This allows application<br />

software functions to be switched on or off.<br />

4.10.4.1 Interaction with Control Variables 385


The same settings apply to both variations. Only the data types are different.<br />

If the connected variable has the value set under 'Value 1' when the function is triggered, then it will be set to<br />

'Value 2'. Otherwise, the connected variable is set to 'Value 1'.<br />

4.10.4.1.4 Momentary USINT<br />

Using this function, a variable is set to a certain value as long as the key is pressed. When the key is released,<br />

the value resets to 0.<br />

This jogging operating cannot be carried out if the variable is updated with lower priority. In this case, the<br />

real−time capable key matrix is used (see also Using the Key Matrix).<br />

4.10.4.1.5 Increment/Decrement<br />

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

Using this function, a variable can be increased or decreased by using an adjustable increment (+/− keys).<br />

386 4.10.4.1 Interaction with Control Variables


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

The appropriate variable from the control application is entered under the Parameter tab. Limits as well as the<br />

increment are set in the Function dialog box for this key.<br />

The individual elements of this dialog box are described in the following.<br />

Element Meaning<br />

Use Limits<br />

Limit Min<br />

Limit Max<br />

Autorepeat<br />

Increment<br />

If this option is selected, maximum and minimum limits can be specified in the input fields. If no limit<br />

is specified, then the limits of whichever data type is used apply.<br />

Specifies the minimum allowable value of the variable. If the variable is already at or below this<br />

value, then it cannot be further decreased with this function. Automatic corrections do not occur.<br />

Specifies the maximum allowable value of the variable. If the variable is already at or above this<br />

value, then it cannot be further increased with this function. Automatic corrections do not occur.<br />

If this option is selected, then this function automatically repeats when a key is pressed and held.<br />

Otherwise, the variable only changes with each new key stroke.<br />

This setting determines the increment of the value when it changes.<br />

The variable is increased with positive values and decreased with negative values.<br />

4.10.4.2 Controlling Picture Changes<br />

4.10.4.2.1 Change Picture<br />

Using this function, a picture can be changed to any other picture created in the project. The target picture can<br />

be selected from a list of all the pictures available in the project.<br />

4.10.4.2 Controlling Picture Changes 387


4.10.4.2.2 Next Picture and Previous Picture<br />

These functions are only available for touch input fields. For panel keys, these functions can be achieved using<br />

control keys of this type. This function is essentially identical to the Change Picture function. These key<br />

functions are displayed in the picture editor key list.<br />

4.10.4.3 Navigating Input Fields<br />

4.10.4.3.1 Goto Input<br />

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

With this key function, input fields can be navigated when they are arranged geometrically. In this way, it does<br />

not matter in which order the fields are normally edited.<br />

This function is only available for panel keys. On touch screen panels, input fields can be selected and edited by<br />

directly touching them. Therefore, navigation keys are not necessary on these systems.<br />

388 4.10.4.2 Controlling Picture Changes


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

Positioning the cursor is configurable using the four main directions.<br />

It should be noted that the input fields should be arranged geometrically. If an input field within the size (width /<br />

height) of the original field is not found in the direction specified, then searching continues over the screen<br />

edges in the same direction.<br />

4.10.5 Configuring Several Key Levels<br />

Only a few keys are available on smaller panels. The possibility exists to enter up to four different characters per<br />

key so that alphanumeric input can also be input alongside numeric input. A function key can also be assigned<br />

up to three additional characters. Control keys apply to all key levels and cannot be set with additional<br />

characters.<br />

To implement multiple key levels, some additional settings have to be made.<br />

4.10.5.1 Setting the 'Switch Levels' Key<br />

In order to set characters in additional key levels, one (or more) switch level key(s) must be defined.<br />

Configuration for this takes place in the global key configuration in the picture overview.<br />

The 'Properties' dialog box is opened by double−clicking the key which should be configured as the switch key.<br />

4.10.5 Configuring Several Key Levels 389


This key becomes a switch key when 'Switch Levels Key' is selected. The 'Mode' selection list opens which<br />

allows exact settings for the switch key to be made.<br />

Increment<br />

Mode Function<br />

Increment Single<br />

Decrement<br />

Decrement Single<br />

Set<br />

Set Single<br />

In this mode, this key increases the key level by one. After reaching the highest possible<br />

key level (3), the key level returns again to 0. This allows each key level to be reached<br />

using a single switch key.<br />

In this mode, the key level for inputting one character is increased by 1. After the character<br />

is entered, the mode is reset to the original value (before the switch key was pressed).<br />

In this mode, the key decreases the current key level by 1. After reaching the lowest key<br />

level (0), the key level is set to the highest key level (3). This allows each key level to be<br />

reached using a single switch key.<br />

In this mode, the key level for inputting one character is decreased by 1. After the<br />

character is entered, the mode is reset to the original value (before the switch key was<br />

pressed).<br />

In this mode, the key changes to the key level defined in the 'Level' selection list. If this<br />

mode is set, then a separate switch key must be defined for each key level used.<br />

Switch keys in this mode should not be combined with switch keys from the 'Increment'<br />

and 'Decrement' modes. This can complicate key level selection.<br />

This functions like the 'Set' mode, but the level is only changed for the next character<br />

entered. After the character is entered, the mode is reset to the original value (before the<br />

switch key was pressed).<br />

When a key is selected as a switch key, it basically applies to all key levels. This kind of key cannot be assigned<br />

additional characters in other key levels.<br />

4.10.5.2 Configuring Additional Key Levels<br />

In addition to general panel key configuration, each panel key can be assigned an alphanumeric character for<br />

each available key level. Settings are made in the global key editor by double−clicking on the corresponding<br />

key.<br />

The character to be displayed can be directly entered in the fields in this dialog box. Upper and lower case<br />

letters are distinguished here.<br />

Many different key levels can be assigned depending on how the keys were configured.<br />

Key Type Available levels for alphanumeric input<br />

None<br />

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

If the key has not been assigned any special function, then alphanumeric characters can be<br />

entered on all 4 levels.<br />

390 4.10.5.2 Configuring Additional Key Levels


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

Function<br />

Key<br />

Control<br />

Key<br />

A key configured as a function key can be assigned an alphanumeric character for key levels 1−3.<br />

The key function is deactivated for all key levels except for 0 if at least one alphanumeric character<br />

has been assigned. If a function key is available in several (all) key levels, then no alphanumeric<br />

characters can be assigned to it.<br />

A control key cannot be assigned any alphanumeric characters and is therefore always available in<br />

all key levels. Instead of the 'Previous Picture' and 'Next Picture' control keys, alternative function<br />

keys can be used with the picture change function. This allows additional alphanumeric characters<br />

to be assigned to the keys.<br />

Switch<br />

This key cannot be assigned any alphanumeric characters.<br />

Levels Key<br />

4.10.5.3 Additional Settings<br />

Additional options can be set for editing key levels in the global project settings.<br />

4.10.5.3.1 Transmit Current Key Level<br />

Using this setting, the key level currently set in <strong>Visual</strong> <strong>Components</strong> runtime can be evaluated in the control<br />

application. In this way, the user is provided a way to display the current key level via the LED or the screen.<br />

The variable can also be defined. This may be used to implement a "Numlock" key, for example.<br />

The connected variable must be of type USINT. The variable name can be directly entered or selected by<br />

clicking the 'Assign...' button.<br />

4.10.5.3.2 Activate Alphanumeric Level<br />

If this setting is selected, an automatic switch to the specified key level takes place when changing to an<br />

alphanumeric input field (string or password). In this way, behavior from <strong>Visual</strong> <strong>Components</strong> 2.0 is copied in<br />

which a special key level was available only for alphanumeric input. Key levels 1−3 can be controlled with this<br />

property. As soon as switching to a string input field occurs, switching also takes place to this level.<br />

4.10.6 Configuring and Controlling LEDs<br />

For some display units, <strong>Visual</strong> <strong>Components</strong> or the control application can be used to control key LEDs. There<br />

are two possibilities available for controlling LEDs.<br />

One possibility for configuring LEDs uses <strong>Visual</strong> <strong>Components</strong> to configure the appropriate key LED in the<br />

appropriate pictures. If this possibility does not suffice, then LEDs can also be controlled from the control<br />

application using the LED Matrix.<br />

Warning:<br />

Both control possibilities cannot be combined in the current <strong>Visual</strong> <strong>Components</strong> version. If this occurs, there is<br />

no way of predicting which output will actually be displayed on the LED!<br />

4.10.5.3 Additional Settings 391


4.10.6.1 Configuration in the Editor<br />

LED parameters are set in the key editor for picture dependent configuration. Configuring LEDs globally is not<br />

necessary.<br />

Options for LED control (LED functions) are displayed in the shortcut menu of the LED icon (circle located on<br />

the keys).<br />

If a function is assigned to an LED, then the circle is colored yellow.<br />

The following settings are available:<br />

Setting Meaning<br />

LED None<br />

No action is executed with the LED. The LED is switched off since all LEDs are basically reset<br />

when the picture changes.<br />

LED On The LED is always turned on.<br />

LED Off The LED is always turned off.<br />

LED<br />

Blinking<br />

LED Fast<br />

Blinking<br />

LED Control<br />

From PLC<br />

The LED blinks slowly (depending on the hardware, approx. 1 Hz)<br />

The LED blinks quickly (depending on the hardware, approx. 4 Hz)<br />

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

The LED is controlled by a PLC variable. Using this setting, a part of the LED can also be actively<br />

influenced by the control application when LED operation is configured. This setting should<br />

preferably be used in place of the LED matrix if only some LEDs are controlled by the control<br />

application at runtime and the majority are set to fixed values depending on the picture.<br />

When 'LED Control From PLC' is selected, the following dialog box appears to connect the appropriate variable.<br />

392 4.10.6.1 Configuration in the Editor


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

A USINT variable must be connected which can control LED states as follows.<br />

Variable Value LED Status<br />

0 The LED is turned off<br />

1 The LED is turned on<br />

2<br />

3<br />

The LED blinks slowly (depending on the hardware, approx. 1<br />

Hz)<br />

The LED blinks quickly (depending on the hardware, approx. 4<br />

Hz)<br />

Any other value in the connected variable is invalid.<br />

Depending on the control application workload, the LED status update can take some time. Updating takes<br />

place in the context of the interpreter.<br />

4.10.6.2 Direct Operation from the Control Application<br />

If configuration in the <strong>Visual</strong> <strong>Components</strong> picture editor is not sufficient, then LEDs can be handled completely<br />

by the control application. In this case, all LEDs must be configured as 'LED None' (default). Otherwise, the<br />

outcome is not defined.<br />

LEDs are operated using an array of USINT variables which is connected to <strong>Visual</strong> <strong>Components</strong> and and which<br />

possesses an entry for each LED on the panel. The LED sequence is thus dependent on the panel and is<br />

described in its technical documentation or with the update for the respective customer specific panel. This<br />

sequence cannot be changed.<br />

Tip:<br />

If the appropriate documentation is not available, then the LED sequence can be determined by connecting an<br />

appropriate variable and testing the individual array indices in the Watch window in Automation Studio.<br />

The array is connected on the global properties page of the <strong>Visual</strong> <strong>Components</strong> editor after its corresponding<br />

size has been specified in the control application.<br />

4.10.6.2 Direct Operation from the Control Application 393


After the 'Transmit LED Matrix' option has been selected, the variable can be connected in the 'Source' field. To<br />

do so, the variable name can be entered directly or selected by clicking the 'Assign...' button.<br />

To control LEDs, the array elements must be defined with the following values:<br />

Element Value Associated LED Status<br />

0 The LED is turned off<br />

1 The LED is turned on<br />

2 The LED blinks slowly (depending on the hardware, approx. 1 Hz)<br />

3 The LED blinks quickly (depending on the hardware, approx. 4 Hz)<br />

4.10.7 Using the Key Matrix<br />

Function keys provide a series of possibilities to influence variables within the control application from the<br />

current visualization project. These variables are defined in the context of the visualization idle time.<br />

Function keys are not suitable for implementing true jog key operations or other similar time−critical functions.<br />

The same constraint also applies to the key matrix parameters configured in the <strong>Visual</strong> <strong>Components</strong> project.<br />

The key matrix can be connected to a variable. This is also only implemented in idle time and is not suitable for<br />

time critical operations.<br />

To solve this problem, a new implementation of the key matrix is available beginning with <strong>Visual</strong> <strong>Components</strong><br />

Version 2.1 in which the user can actively trigger the acquisition of key information using a function.<br />

4.10.7.1 Using the Key Matrix<br />

Key matrix operation is possible using the <strong>Visual</strong> <strong>Components</strong> programming interface (VISAPI Functions<br />

Overview). Using this interface, optimal timing can be actively predefined in the control application.<br />

4.10.7.1.1 1. Integrating the Library<br />

The <strong>Visual</strong> <strong>Components</strong> programming interface is contained in the 'Visapi' library. It must be imported to the<br />

current project using the Library Manager. Details about importing libraries can be found in the general<br />

Automation Studio documentation.<br />

4.10.7.1.2 2. Selecting a Programming Language<br />

The functions in the programming interface can be used in all text−based languages which can use library<br />

functions (this is not possible in the Ladder Diagram).<br />

Examples of implementation in Automation Basic and ANSI C are described in the following.<br />

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

394 4.10.7 Using the Key Matrix


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

4.10.7.1.3 3. Creating the User Task for Key Matrix Operation<br />

The task must be created in the task class where key matrix handling also takes place. It is easiest to have key<br />

matrix acquisition retrieval and evaluation in the same task. In this way, the logic in the application always works<br />

with the most current key data and the highest possible performance can be achieved. 50 milliseconds is a<br />

recommendable task cycle time for key matrix operation.<br />

The following examples illustrate how such a task could look in the Automation Basic and ANSI C programming<br />

languages. These examples can be adapted to specific application needs.<br />

4.10.7.1.3.1 3.1 Automation Basic<br />

4.10.7.1.3.1.1 Init subprogram<br />

(* init program *)<br />

step = 0<br />

erase = 1<br />

4.10.7.1.3.1.2 Cyclic program<br />

(* cyclic program *)<br />

(* get handle for project "vga1" *)<br />

IF step = 0 THEN<br />

VC_HANDLE := VA_Setup(1, "vga1")<br />

IF VC_HANDLE 0 THEN<br />

step := 1<br />

ENDIF<br />

ENDIF<br />

(* try to read the current key matrix *)<br />

IF step = 1 THEN<br />

status := VA_GetKeyMatrix(1, VC_HANDLE, ADR(mtxKeys), 48, ADR(mtxSize))<br />

IF status 0 THEN<br />

(* could not read matrix *)<br />

erase = 1<br />

(* handle project overload, handle becomes invalid *)<br />

IF status = 100 THEN<br />

step := 0<br />

ENDIF<br />

ENDIF<br />

ENDIF<br />

(* erase the key matrix in case of error *)<br />

IF erase = 1 THEN<br />

LOOP i := 0 TO 47 DO<br />

mtxKeys[i] = 0<br />

ENDLOOP<br />

erase := 0<br />

ENDIF<br />

(* your key handling code goes here *)<br />

4.10.7.1.3.1.3 Declaration<br />

An array of USINT variables must be created using an appropriate length for the key matrix stored in the<br />

'mtxKeys' variable. If another length should be used, the VA_GetKeyMatrix function call must be adjusted<br />

4.10.7.1 Using the Key Matrix 395


accordingly in the cyclic program.<br />

4.10.7.1.3.2 3.2 ANSI C<br />

4.10.7.1.3.2.1 Source code<br />

#include<br />

#include #include "visapi.h" _LOCAL UDINT VC_HANDLE; _LOCAL UINT<br />

status; _LOCAL USINT step; _LOCAL USINT erase; _LOCAL USINT mtxKeys[48]; _LOCAL UDINT mtxSize;<br />

_INIT void SetupKeyMatrix(void) { step = 0; erase = 1; } _CYCLIC void RunKeyMatrix(void) { int i; /*<br />

get handle for project "vga1" */ if (step == 0) { VC_HANDLE = VA_Setup(1, "vga1"); if (VC_HANDLE)<br />

step = 1; } /* try to get the key matrix */ if (step == 1) { status = VA_GetKeyMatrix(1, VC_HANDLE,<br />

(UDINT) &mtxKeys[0], sizeof(mtxKeys) / sizeof(mtxKeys[0]), (UDINT) &mtxSize); if (status) { /* cannot<br />

read the matrix */ erase = 1; /* handle project overload, handle becomes invalid */ if (status ==<br />

100) step = 0; } } if (erase == 1) { /* reset all key information to unpressed on error */ for (i =<br />

0; i < (sizeof(mtxKeys) /sizeof(mtxKeys[0])); i++) { mtxKeys[i] = 0; } erase = 0; } /* your key<br />

handling code goes here */ }<br />

4.10.7.1.3.3 3.3 Example Description<br />

In the Init subprogram, the 'init' and 'erase' variables are both preset so that a connection is established first with<br />

the respective project and the key matrix is started at 0. In this way, no key strokes can remain in the matrix if<br />

the visualization project has not yet been started.<br />

In the cyclic program, a connection is established with the current <strong>Visual</strong> <strong>Components</strong> project using the<br />

VA_Setup function. This is valid until a hardware is restarted or the visualization is overloaded.<br />

If successful, the key matrix is read with VA_GetKeyMatrix in the next code section. The size of the connected<br />

key matrix is specified here. The actual number of keys which were copied is returned in the mtxSize parameter.<br />

More keys than actually exist on the panel can also be requested. When touch keys are used, the number of<br />

keys changes depending on the currently displayed picture. The user should ignore keys which do not exist in<br />

the matrix or delete them. This is not included in the examples.<br />

If the error code determines that the handle has become invalid in the project, a new handle is requested and<br />

the matrix is deleted.<br />

The last part of the cyclic program deletes the key matrix at the beginning and if an error occurs.<br />

4.10.7.1.4 4. Adding the Application Logic<br />

The key matrix is ready to be used by the application when the application logic is added. The corresponding<br />

links can be placed in the the cyclic program right after the example code.<br />

4.10.7.2 Key Matrix from <strong>Visual</strong> <strong>Components</strong> Version 2.0<br />

For compatibility reasons, the key matrix from <strong>Visual</strong> <strong>Components</strong> Version 2.0 is still supported. However, using<br />

the new key matrix function is recommended. Future versions of <strong>Visual</strong> <strong>Components</strong> may not support the old<br />

key matrix.<br />

In order to replace the old key matrix with the new one, the old one must first be deactivated using the <strong>Visual</strong><br />

<strong>Components</strong> global options. The new function is then used to acquire the new key matrix.<br />

4.11 Alarm System<br />

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

Alarms are used to record certain conditions and occurrences in a machine. These can include passing a<br />

threshold limit, an absence of a resource, unauthorized use of a component, or any other machine specific<br />

situation.<br />

<strong>Visual</strong> <strong>Components</strong> provides an integrated alarm system for managing and visualizing these alarms. The alarm<br />

396 4.10.7.1 Using the Key Matrix


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

system controls the monitoring/recording and display of these alarms (appearance and format). Writing to an<br />

alarm history list is also an option.<br />

4.11.1 Notes for <strong>Visual</strong> <strong>Components</strong> Version 2.0 Users<br />

Beginning with Automation Studio 2.2, tags (variables) can now be inserted in alarm texts. See Advanced Text<br />

Group Formatting.<br />

Advancements in the alarm system were made in Automation Software version 2.1. The following sections<br />

provide information about all alarm system innovations.<br />

Support for an alarm printer on the parallel interface is new in <strong>Visual</strong> <strong>Components</strong> 2.1. See Printing Alarms.<br />

In addition, <strong>Visual</strong> <strong>Components</strong> 2.1 supports an alarm history log. The number of stored alarms can be set. See<br />

Configuring the Alarm System.<br />

4.11.2 Preparations<br />

In order to use the <strong>Visual</strong> <strong>Components</strong> alarm system, a few things have to be prepared in the project.<br />

The following steps must be carried out:<br />

• Defining the Alarm Bit Field<br />

• Enabling the Alarm System<br />

These steps are explained in the following.<br />

4.11.2.1 Defining the Alarm Bit Field<br />

Information about which alarms are currently active must first be present for the alarm system (i.e. which states<br />

are occuring at the moment).<br />

The <strong>Visual</strong> <strong>Components</strong> alarm system uses one bit for each individual alarm to indicate if it is active or not. This<br />

bit is defined as a variable of type BOOL in the application task.<br />

All alarms that belong to a group must be arranged one after another in an array. The first alarm must be set<br />

with Index 0 of the array. The rest of the alarms follow directly in order.<br />

Division into groups takes place by the user according to logical groupings within the machine or equipment.<br />

Grouped alarms are constantly checked within <strong>Visual</strong> <strong>Components</strong> using the same attention to modification.<br />

Alarms which should be scanned frequently should be arranged into a single group.<br />

Depending on the programming language used in the project, the array for the alarm information is created as<br />

follows:<br />

4.11.2.1.1 ANSI C<br />

In the ANSI C programming language, the alarm bit array can be defined like every other PV in the C source file.<br />

The corresponding entry in the Automation Studio variable declaration dialog box is made automatically.<br />

The following source code can be used to create an alarm bit array for 50 alarms:<br />

#include <br />

#include <br />

_GLOBAL BOOL alarmbit[50];<br />

The alarm bit array, like every other variable entered in <strong>Visual</strong> <strong>Components</strong>, must be defined as either locally<br />

(_LOCAL) for the application task or globally (_GLOBAL) for the controller project, as shown above. Pure ANSI<br />

C variables cannot be used.<br />

4.11.1 Notes for <strong>Visual</strong> <strong>Components</strong> Version 2.0 Users 397


4.11.2.1.2 IEC Programming Languages<br />

For the remaining Automation Studio programming languages, declaring the alarm bit array takes place<br />

uniformly using the variable declaration dialog box. The variable declaration dialog box can be opened by<br />

highlighting the application task in the software view of Automation Studio and selecting the 'Open −><br />

Declaration' menu option. Other ways to open the declarations box can be found in the documentation of the<br />

project window or in the editors of the individual programming languages.<br />

The free row under the entries that already exist should be marked in the opened dialog box. The [INS] key<br />

enters a new variable. The new alarm bit array variable has to be entered in the Name column.<br />

The data type must be set to an array of BOOL variables. BOOL[50] must be entered into the Type column to<br />

create an alarm bit array for 50 alarms.<br />

The Scope column determines whether the variable should only be used locally in this task (i.e. only this task<br />

should enter alarms in this group), or globally in the entire project − LOCAL or GLOBAL.<br />

4.11.2.2 Enabling the Alarm System<br />

Since the alarm system is an optional component of <strong>Visual</strong> <strong>Components</strong>, it must first be switched on in the<br />

Project Options before it can be used (Panel). This setting is unique to each project and is stored as such.<br />

Therefore, it can be individually determined for each project whether the alarm system should be used or not.<br />

The alarm system is activated on the Panel page under the Alarm System group.<br />

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

398 4.11.2.1 Defining the Alarm Bit Field


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

When enabled, the alarm group is immediately added to the tree view on the left side of the panel.<br />

4.11.3 Configuring the Alarm System<br />

Some settings are made globally for the entire <strong>Visual</strong> <strong>Components</strong> alarm system.<br />

4.11.3.1 Global Configuration<br />

The appropriate dialog box is opened using the 'Configuration' option from the shortcut menu found in the tree<br />

view:<br />

Global settings are made under the 'Alarm Configuration' tab. Settings for printing out alarms are made under<br />

the 'Alarm Printer' tab.<br />

4.11.3.1.1 Language<br />

This setting determines which language the texts currently displayed in the dialog box are valid for. Texts can be<br />

customized for each language depending on requirements.<br />

4.11.3 Configuring the Alarm System 399


4.11.3.1.2 Texts<br />

All texts in this dialog box are used to display specified states in the alarm printout as long as they are used in<br />

the appropriate format. These texts must be adapted accordingly for each language in the project.<br />

The texts used in "Alarm System Printer Text Configuration" are used for printouts. These texts can also be<br />

displayed on large screens (at least 40 characters screen width).<br />

4.11.3.1.3 Alarm History List Length<br />

Triggered alarms are saved permanently on the controller. This setting defines how many alarms are stored in<br />

the alarm history log (ring buffer). Up to 1,000 alarm lines can be configured. In addition, they can be stored in a<br />

data object. Alarm data is lost howerver after the system is restarted.<br />

4.11.3.1.4 Status Abbreviations<br />

Pressing the "Edit" button opens the following dialog box:<br />

Letters and numbers can be defined here as abbreviations for different alarm states. They are used on small<br />

displays to represent as much information as possible about alarm conditions and changes.<br />

4.11.4 Using Alarm Groups<br />

Alarms which are in user tasks in a common alarm bit array are combined into group alarms. Each alarm group<br />

provides common settings which apply to all alarms in that group. Scan time is an important alarm group setting<br />

which specifies the time which is used for monitoring the individual alarm bits for changes.<br />

Each alarm in the <strong>Visual</strong> <strong>Components</strong> alarm system must be assigned to an alarm group. An alarm bit array<br />

must be assigned to this alarm group. Variables for bypassing alarms and acknowledgement status inquiries<br />

can also be connected.<br />

Each alarm group can contain a maximum of 128 alarms.<br />

4.11.4.1 Preset Alarms<br />

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

The 'System Alarms' group is always a part of the <strong>Visual</strong> <strong>Components</strong> alarm system. This group cannot be<br />

edited or removed.<br />

400 4.11.3.1 Global Configuration


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

In this group, alarms are defined which are triggered within <strong>Visual</strong> <strong>Components</strong> or Automation Runtime. These<br />

include a printer buffer overflow when printing alarms or an empty buffer battery in the controller, for example.<br />

Although system alarm group numbers and parameters cannot be edited, the individual alarm texts can be<br />

modified and adapted to requirements. If more than one language is used in the project, a separate column for<br />

each language is displayed in the alarm list. Alarm texts may be edited for each language.<br />

4.11.4.2 Adding, Removing, and Editing Groups<br />

A new alarm group can be added by selecting 'New' in the 'Alarm Groups' shortcut menu. A name has to be<br />

entered for this alarm group.<br />

After entering the name, a dialog box opens automatically to edit the alarm group settings.<br />

An alarm group can also be edited or removed using the shortcut menu options.<br />

4.11.4.2 Adding, Removing, and Editing Groups 401


4.11.4.3 Alarm Group Parameters<br />

After creating an alarm group, a parameter dialog box opens automatically. The parameter dialog box can also<br />

be opened by selecting the 'Properties' option from the shortcut menu of the group itself. Settings in this dialog<br />

box apply to all alarms in this group.<br />

4.11.4.3.1 Alarm Bit Field<br />

At least one BOOL array variable must be connected to the 'Alarm Bit Field' in the alarm group settings. If this<br />

variable is not connected, then an error will be displayed when closing the dialog box with the OK button. If the<br />

variable is not present while compiling the project, an error message will also be output. This alarm variable is<br />

checked for status changes and the assigned alarm texts are displayed accordingly.<br />

The first alarm in the group corresponds to the bit at array position 0, the second alarm at position 1, etc.<br />

4.11.4.3.2 Group Alarm<br />

During alarm configuration, there is an option to specify whether this alarm can trigger a group alarm. If a<br />

change in the alarm variable status causes this alarm to be displayed, this variable remains set to "1" until all<br />

alarms in that group which can trigger a group alarm have been reset and/or acknowledged. The variable is then<br />

reset to 0.<br />

Specifying this variable is optional.<br />

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

402 4.11.4.3 Alarm Group Parameters


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

4.11.4.3.3 Bypass Image<br />

A triggered alarm can be ignored when it is bypassed, i.e. it is not indicated in the alarm array. The size of the<br />

bypass image must be identical to that of the alarm bit field (BOOL array). The image position in the bypass<br />

image is that of the triggered alarm.<br />

Specifying this variable is optional.<br />

4.11.4.3.4 Acknowledgement Image<br />

The acknowledgment image is written to the connected variable when an unacknowledged alarm is<br />

acknowledged or when a group acknowledgment takes place for the connected variable. The size of the<br />

acknowledgement image must be identical to the alarm bit field. In other words, both have to be of data type<br />

BOOL, and the array length must be the same. The position of the image in the acknowledgment image is that<br />

of the occurring alarm.<br />

Specifying this variable is optional.<br />

4.11.4.3.5 Alarm Scan Rate<br />

The alarm scan rate defines how often the alarm image is cyclically read by the alarm system for each group.<br />

The respective bit in the alarm bit field has to maintain its status for at least this amount of time so that the alarm<br />

is recognized as safe.<br />

4.11.4.3.6 Priority<br />

This entry sets the priority of all alarms in an alarm group. Priority can optionally be displayed in alarm arrays, or<br />

it can be evaluated in the alarm history log using filter functions. The display of alarms according to priority is<br />

only evaluated in the Last Alarm alarm line. The last unacknowledged alarm with the highest priority is output in<br />

this field.<br />

Priority Scale:<br />

Lowest priority<br />

0<br />

Highest priority<br />

9<br />

4.11.5 Creating and Configuring Alarms<br />

In <strong>Visual</strong> <strong>Components</strong>, alarms are managed in alarm groups. Alarms can only be created if alarm groups are<br />

present and have already been configured. See Using Alarm Groups.<br />

4.11.5.1 Setting Up and Editing Alarms<br />

A new alarm can be inserted into the list by selecting the menu option "Insert Alarm" in the shortcut menu of the<br />

appropriate alarm group. An alarm can also be created with the [INS] key. A maximum of 128 alarms can be<br />

defined per alarm group.<br />

4.11.4.3 Alarm Group Parameters 403


A dialog field is displayed in which the alarm text for the default language can be entered. The default language<br />

is always the furthest to the left in the table. The text for the other languages can be entered once the dialog box<br />

is closed. By default, texts entered for the default language are also set to the other languages.<br />

In addition, tags (formatted variables) can be inserted in alarm texts. Formatting is limited to 4 numeric variables<br />

per text when alarm texts are used. The exact procedure is explained in Advanced Text Formatting.<br />

With the help of the icons in the toolbar, the sequence of texts can be adjusted to the position of the<br />

alarms in the alarm bit array. For an alarm which needs to be moved, it should be selected and moved to the<br />

correct position using these buttons. The keys [CTRL]+[up arrow] or [CTRL]+[down arrow] can also be used to<br />

to move alarms.<br />

An alarm can be deleted with the toolbar icon. The [DEL] key can also be used.<br />

4.11.5.2 Alarm Properties<br />

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

Selecting the "Properties..." menu option from the shortcut menu of an alarm entry allows the properties of the<br />

selected alarm to be edited.<br />

404 4.11.5.2 Alarm Properties


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

This opens the following dialog box:<br />

4.11.5.2.1 Acknowledgement Possible<br />

This entry determines whether acknowledgement of an occurring alarm is possible and is further evaluated by<br />

the "Acknowledgement Necessary" option.<br />

4.11.5.2.2 Acknowledgement Necessary<br />

This entry determines whether acknowledging a triggered alarm is absolutely necessary.<br />

4.11.5.2.3 Allow Acknowledge While Active<br />

This entry determines whether an active alarm can be acknowledged or not.<br />

Acknowledgement possible = yes<br />

Acknowledgement necessary = yes<br />

Allow acknowledge while active = no<br />

If an alarm is displayed, then it is only taken off the alarm display if it is also acknowledged,<br />

regardless of whether the alarm bit is reset.<br />

Acknowledgement possible = yes<br />

Acknowledgement necessary = no<br />

Allow acknowledge while active = no<br />

If an alarm is displayed, then it can be acknowledged until the alarm bit is reset. If the alarm bit<br />

is reset before it is acknowledged, it is removed from the display.<br />

Acknowledgement possible = no<br />

Acknowledgement necessary = no<br />

Allow acknowledge while active = no<br />

4.11.5.2 Alarm Properties 405


The alarm text is displayed as long as the alarm bit is set. Acknowledgement is not possible.<br />

Acknowledgement possible = yes<br />

Acknowledgement necessary = no<br />

Allow acknowledge while active = yes<br />

The alarm text is displayed as long as the alarm bit is set. Acknowledgement is then allowed<br />

while the alarm is active. The alarm is taken out of the list.<br />

Acknowledgement possible = yes<br />

Acknowledgement necessary = yes<br />

Allow acknowledge while active = yes<br />

If an alarm is displayed, then it is only removed from the list if it is acknowledged − regardless of<br />

whether the alarm bit is reset or not.<br />

Acknowledgement is also allowed while the alarm is active. The alarm is taken out of the list.<br />

4.11.5.2.4 Bypass Allowed<br />

This entry determines whether bypassing this alarm is possible. An alarm can be bypassed or have a bypass<br />

cleared in the alarm overview. If an alarm is bypassed, it is removed from the alarm list regardless of the alarm<br />

status. If a bypass is cleared, the alarm is displayed again corresponding to the alarm status.<br />

4.11.5.2.5 Trigger Group Alarm<br />

If this entry is selected, this alarm is included in the evaluation of the group alarm. The group alarm is a sum<br />

alarm for the group and indicates whether one of the groups, having an alarm with this option marked, is to be<br />

flagged (see also Group Alarms).<br />

4.11.5.2.6 Latched Alarm<br />

This entry determines whether the time for the first occurrence of the alarm should be displayed. If the alarm<br />

status changes repeatedly, then the time of the first occurrence is displayed in the alarm list, depending on the<br />

acknowledgement configuration.<br />

4.11.5.2.7 Disable Printing When...<br />

This entry determines that an alarm of a corresponding type does not appear in the historical alarm list or in a<br />

printout. Other output formats for the alarms are not affected by it.<br />

4.11.6 Alarm <strong>Visual</strong>ization<br />

A sequence of special fields exists which can be used according to user needs and existing hardware (screen<br />

size, etc) to display triggered alarms on the visualization device.<br />

To insert these types of fields, an additional button is enabled in the toolbar when the alarm system is activated.<br />

Clicking on the button opens a selection list showing the following available alarm fields:<br />

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

Each of these fields has special properties and application possibilities. The following sections describe the<br />

properties and possibilities for each of these fields.<br />

Note:<br />

Only one alarm field can be used per picture. For example, it is not possible at present to use both an alarm line<br />

406 4.11.5.2 Alarm Properties


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

and an alarm summary on the same page.<br />

Alarm fields cannot be defined in the global picture.<br />

A detailed breakdown of all features can be found in the reference manual. Corresponding references are<br />

provided at the end of this document.<br />

General knowledge of <strong>Visual</strong> <strong>Components</strong> picture editor operation is assumed in this section. Corresponding<br />

references are found at the end of this document.<br />

4.11.6.1 Alarm Line<br />

Only one alarm from the list of pending alarms is displayed in an alarm line. The following settings are possible<br />

for an alarm line:<br />

4.11.6.1.1 Type of Alarm Line<br />

There are three types of alarm lines to choose from:<br />

First Alarm<br />

Last Alarm<br />

Active Alarm<br />

This field displays the oldest unacknowledged alarm. If all alarms are acknowledged, then the<br />

oldest acknowledged alarm is displayed. If no alarms are active, the default text configured in<br />

the global settings is displayed. The displayed alarm can be acknowledged.<br />

This field displays the newest unacknowledged alarm with the highest priority. If all alarms are<br />

acknowledged, the newest acknowledged alarm with the highest priority is displayed. If no<br />

alarms are active in the entire system, the default text configured in the global settings is<br />

displayed. The displayed alarm can be acknowledged.<br />

4.11.6.1 Alarm Line 407


4.11.6.1.2 Format<br />

This field shows the last queued alarm. Cursor keys can be used to scroll through alarm entries<br />

in this list. The displayed alarm can be acknowledged.<br />

Defines the length of the alarm line in characters and the font to be used.<br />

4.11.6.1.3 Key Assignment<br />

Determines the keys which are to be used for the corresponding action. These could be either keys from the<br />

operator panel being used (configured as function keys) or buttons/hot spots in the case of panels with touch<br />

screens.<br />

A corresponding function key has to be assigned to each key. Otherwise, otherwise an error message appears<br />

and the dialog box cannot be closed with OK.<br />

The 'Previous Alarm' and 'Next Alarm' keys are only provided for 'Active Alarm' lines. The other alarm line types<br />

only have an 'Acknowledgement' key.<br />

4.11.6.1.4 Additional Settings<br />

Under the 'Colors' tab of the dialog box, colors used for alarm line display can be set or a color control variable<br />

can be connected.<br />

The information displayed in the alarm line and the separators to be used are set under the 'Field Format' tab. A<br />

detailed listing of all settings can be found in the reference manual (see references at the end of this page).<br />

4.11.6.2 Alarm List<br />

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

An alarm list displays the same information as an 'Active Alarm' line but displays several lines. Field size can be<br />

selected as desired, but the number of alarms which can be displayed simultaneously depends on the available<br />

display surface and the selected font.<br />

Two keys can be used to scroll thorough the previous (newer) or next (older) alarms in the alarm list. The alarm<br />

with the current cursor focus can be acknowledged with the acknowledgement key. The function keys to be<br />

used must be configured (see below).<br />

408 4.11.6.1 Alarm Line


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

4.11.6.2.1 Format<br />

In contrast to the alarm line, the number of lines displayed in the field can be defined for alarm lists. All other<br />

settings are identical to the alarm line.<br />

4.11.6.2.2 Additional Settings<br />

Essentially, the same settings as for an alarm line are provided.<br />

See above<br />

4.11.6.3 Alarm Summary<br />

All alarms are displayed in the alarm summary regardless of their status. Two keys can be used to scroll through<br />

the previous (older) or next (newer) entries in this alarm summary. Using the 'Bypass' key, an alarm can be<br />

bypassed or not bypassed as long as this is allowed for the respective alarm.<br />

Alarm summary output can be influenced using Alarm Number Filters and Group Number Filters.<br />

4.11.6.2 Alarm List 409


Alarm summary settings correspond to the pattern already described for the alarm list.<br />

4.11.6.3.1 Format and Position<br />

Specifies the position, size, and font to be used.<br />

4.11.6.3.2 Key Assignment<br />

A function key has to be connected to the 'Bypass,' 'Previous Alarm' and 'Next Alarm' keys. Of course,<br />

appropriate touch−operated fields can also be connected here.<br />

4.11.6.3.3 Additional Settings<br />

The alarm field display format is configured under the 'Field Format' tab. Optional variables for filtering alarms<br />

are defined under the 'Filter' tab.<br />

4.11.6.4 Alarm History<br />

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

Depending on the configuration of the alarms under the 'Disable Printing When...' setting, each alarm event is<br />

entered in an alarm history list and can be displayed using this field. In this alarm summary, alarms can be<br />

scrolled through using two keys for the previous (older) or next (later) entry.<br />

410 4.11.6.3 Alarm Summary


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

4.11.6.4.1 Format and Position<br />

Specifies the position, size, and font of the field.<br />

4.11.6.4.2 Key Assignment<br />

For key assignment, a function key has to be connected to the 'Previous Alarm' and 'Next Alarm' keys.<br />

Appropriate touch−operated fields can also be connected.<br />

4.11.6.4.3 Additional Settings<br />

The alarm field display format is configured under the 'Field Format' tab. Optional variables for all historical<br />

alarm list filtering possibilities are defined under the 'Filter' tab (Alarm Number Filter and Group Number Filter ).<br />

4.11.7 Optimizing the Alarm Display<br />

This section describes additional options for customizing alarm displays to user wishes and hardware<br />

requirements (i.e. display size).<br />

These options are provided for all alarm fields to a varying extent. This depends on the constraints of various<br />

fields and differences in settings.<br />

This section contains descriptions for options which concern alarm appearance:<br />

• Adjusting the Display Format<br />

• Adjusting Status Abbreviations<br />

• Filtering the Displayed Alarm<br />

These measures can be combined as desired, depending on application requirements.<br />

4.11.7.1 Adjusting the Display Format<br />

The display format of a single alarm line can be customized to user needs. Depending on the tasks of various<br />

alarm fields, useful combinations are displayed for selecting the different information and display options for<br />

alarm fields.<br />

4.11.6.4 Alarm History 411


Settings for all alarm fields can be found individually under the 'Field Format' tab.<br />

'Field Format' for the alarm list is displayed here as an example. The other alarm fields have different dialog tabs<br />

but the function is identical for all alarm fields.<br />

Depending on the settings, it can be determined whether the corresponding information is displayed or not (and<br />

in which format).<br />

4.11.7.1.1 Cursor Character (all alarm fields except the alarm line)<br />

For alarm fields with several lines, the alarm list can be browsed through using two cursor keys. The selected<br />

line can be either displayed as inverted, or a cursor character appears before the alarm line (*, −, , # or ! can<br />

be used).<br />

4.11.7.1.2 Time Format (all alarm fields except the alarm summary)<br />

Time and date of alarm occurrences can be displayed for all alarm fields except for the alarm summary. This<br />

time format applies for all alarms in this alarm field.<br />

4.11.7.1.3 Group Number / Alarm Number (all alarm fields)<br />

If the alarm system consists of several alarm groups, the group and alarm numbers for this group can also be<br />

displayed (1−3 places). Displaying corresponding numbers can also be disabled.<br />

4.11.7.1.4 Alarm Text (all alarm fields)<br />

If an alarm is detected during runtime, it can be displayed as text. This is set as default but can also be changed<br />

as needed. If changed, the alarm number (and if necessary the group number) should be displayed at the very<br />

least.<br />

4.11.7.1.5 Info (active alarm line, alarm list)<br />

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

In addition to the alarm text, acknowledgement information can be displayed in the alarm line and alarm list. The<br />

corresponding status abbreviation can be changed in the global options of the alarm system and set separately<br />

for each language.<br />

412 4.11.7.1 Adjusting the Display Format


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

4.11.7.1.6 Priority (active alarm line, alarm list, alarm summary)<br />

Outputs the priority of the alarm which was configured in the alarm group.<br />

4.11.7.1.7 Alarm Status (alarm summary)<br />

The alarm status (active/inactive) is displayed with the appropriate abbreviation. This abbreviation can be<br />

individually set for each language in the global options menu of the alarm system.<br />

4.11.7.1.8 Acknowledgement Status (alarm line for the first/last alarm, alarm summary, alarm history)<br />

The alarm acknowledgement status (acknowledged / unacknowledged) is displayed with the appropriate<br />

abbreviation. This abbreviation can be individually set for each language in the global options menu of the alarm<br />

system.<br />

4.11.7.1.9 Bypass Status (alarm summary)<br />

In the alarm summary, the alarm selected from the list can be either bypassed or not bypassed using a function<br />

key. The status (bypassed / not bypassed) can be displayed with an appropriate abbreviation. This abbreviation<br />

can be individually set for each language in the global options menu of the alarm system.<br />

4.11.7.1.10 Event (alarm history)<br />

Each event is entered into the alarm history (triggered, reset, acknowledged, etc.). The revised status can be<br />

entered in the list as text, a status abbreviation, or nothing at all.<br />

4.11.7.1.11 Separator (all alarm fields)<br />

Individual items of an alarm line can be divided using a separator (none − the fields follow directly after one<br />

another, space, period, hyphen).<br />

4.11.7.1.12 Preview<br />

The selected alarm text format is displayed here. The length of the alarm text is shortened and displayed<br />

according to the size of the alarm field.<br />

4.11.7.2 Adjusting Status Abbreviations<br />

This setting is accessed through the global alarm system settings. Thus, the settings apply uniformly to the<br />

entire project. However, settings can be made separately for each language present in the project.<br />

4.11.7.1 Adjusting the Display Format 413


4.11.7.2.1 Triggered / Reset (event)<br />

Abbreviations to be displayed indicating alarm triggering or resetting in the control application. These<br />

abbreviations are used to display status changes.<br />

4.11.7.2.2 Acknowledged / Unacknowledged<br />

Abbreviations indicating whether the corresponding alarm has been acknowledged or not.<br />

4.11.7.2.3 Alarm is on / off 0 (status)<br />

Abbreviations indicating whether the alarm was (still) active at the time of entry. These abbreviations are used to<br />

display the current status.<br />

4.11.7.2.4 Alarm bypassed / not bypassed (status)<br />

Abbreviations indicating whether the corresponding alarm is currently bypassed or not.<br />

4.11.7.2.5 Alarm bypassed / not bypassed (event)<br />

Abbreviations indicating if the alarm was bypassed or not. Thus, these abbreviations display changes in the<br />

alarm bypass status.<br />

4.11.7.3 Filtering the Displayed Alarm<br />

The alarm fields 'Alarm Summary' and 'Alarm History' have filter functions. Using these functions, alarm list<br />

output can be controlled during runtime, i.e. certain outputs in these lists can be suppressed.<br />

Both alarm fields support various filter possibilities depending on their task definition. Therefore, settings for the<br />

two fields are discussed separately.<br />

4.11.7.3.1 Alarm Summary<br />

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

414 4.11.7.2 Adjusting Status Abbreviations


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

4.11.7.3.1.1 Alarm Number Filter / Group Number Filter<br />

A variable can be connected for the Alarm Number Filter and/or Group Number Filter fields. If a variable is<br />

connected to the group filter, then only alarms of this group are displayed if the group number is valid. If a<br />

variable is not connected to Alarm Number Filter or an invalid alarm number is read, then all alarms are<br />

displayed starting with offset = 0. If the alarm number is valid, all alarms starting with this alarm number are<br />

displayed.<br />

If a variable is only connected to the Alarm Number Filter, then alarms from all groups can be displayed<br />

beginning with the valid alarm number.<br />

4.11.7.3.2 Alarm History<br />

4.11.7.3.2.1 Filter Control Byte<br />

If a variable is connected, the filter control byte is simultaneously evaluated with all alarm filters (if used). If no<br />

variable is connected, then no filter is active.<br />

Filter byte Meaning<br />

0 No filter active, all entries are displayed.<br />

1 "Newer than" filter<br />

2 "Older than" filter<br />

3 Group filter<br />

4 Priority filter<br />

5 "Newer than" and group filter<br />

6 "Older than" and group filter<br />

7 "Newer than" and priority filter<br />

8 "Older than" and priority filter<br />

9 "Newer than", group, and priority filter<br />

10 "Older than" , group, and priority filter<br />

11 Group and priority filter<br />

4.11.7.3 Filtering the Displayed Alarm 415


4.11.7.3.2.2 Group Number Filter<br />

The Group Number Filter uses the variables 'Filter Control Byte', 'Group Number Filter', and 'Alarm Number<br />

Filter'. Only group entries which are read from the 'Group Number Filter' variable are displayed. If a value of 0 or<br />

an invalid value is read, all alarms are displayed regardless of the group filter or alarm filter.<br />

If one of the valid alarm numbers for this group is in the 'Alarm Number Filter' variable, then alarms are<br />

displayed starting with this alarm. The latest event is displayed if the alarm number is valid but not evaluated by<br />

another Filter Control Byte condition, or if the alarm number is invalid or 0.<br />

4.11.7.3.2.3 Priority Filter<br />

The priority filter uses the 'Filter Control Byte' and 'Priority Filter' variables. Entries are only displayed if they<br />

have the same or higher priority as the variable value in 'Priority Filter'.<br />

4.11.7.3.2.4 Time Filter<br />

The time filter corresponds to the filter entries 'Newer Than' or 'Older Than'. It uses the 'Filter Time' and 'Filter<br />

Control Byte' variables. Entries are only displayed if the time is larger or smaller than the "Filter Time" variable.<br />

A variable with data type USINT array with the length of 6 bytes is to be connected to the time filter. The time<br />

format is entered in this USINT array as follows:<br />

Offset Contents<br />

0 Seconds<br />

1 Minutes<br />

2 Hours<br />

3 Day<br />

4 Month<br />

5 Year<br />

4.11.8 Printing Alarms<br />

<strong>Visual</strong> <strong>Components</strong> provides the possibility to connect an alarm printer to target systems which have parallel<br />

printer interfaces. Alarms are printed if their status is changed and this particular change has been selected to<br />

trigger printing in the configuration.<br />

The following steps should be followed to use an alarm printer:<br />

• Activating the Alarm Printer<br />

• Configuring the Printer<br />

• Configuring Status Texts<br />

• Configuring the Print Format<br />

4.11.8.1 Activating the Alarm Printer<br />

The alarm printer is activated in the global settings of the project (Panel) under the Alarm System group.<br />

4.11.8.2 Configuring the Printer<br />

After 'Use Alarm Printer' has been selected, the 'Printer Settings...' button is used to configure the settings for<br />

the printer.<br />

Clicking on 'Printer Settings...' opens the following dialog box:<br />

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

416 4.11.7.3 Filtering the Displayed Alarm


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

The settings here are explained in further detail.<br />

4.11.8.2.1 Printer Page Layout<br />

The number of lines on a page, as well as the number of characters per line, can be set here. <strong>Visual</strong><br />

<strong>Components</strong> supports formatted printing on all line printers which can receive and print ASCII characters and<br />

which use character fonts with a fixed character width.<br />

The 'Form Feed' setting determines how a new page is started (or the previous ejected). The LF setting (line<br />

feed) is used for continuous paper feed. The FF setting (form feed) is used for sheet fed or page printers (i.e.<br />

LED or laser printers).<br />

Some printers require special settings in this field and/or on the printer itself. These features are not part of this<br />

documentation. Details about printers can be found in their user manuals.<br />

4.11.8.2.2 Printer Interface Configuration<br />

Currently, only parallel printers on the first parallel printer interface of IPCs are supported. Therefore, the 'Port'<br />

setting has to be set to LPT1. Remaining parameters are reserved for future updates and serial alarm printers.<br />

4.11.8.2.3 Printout Header Text<br />

Header text can be individually configured for every language in the project. The language currently set on the<br />

target system is used when printing. In this way, the printout matches the screen display.<br />

4.11.8.2.4 Printer Init Sequences<br />

These two adjustments enable the connected printer to be configured with [ESC] sequences. These are special<br />

character strings which allow the connected printer to recognize a command and execute appropriate actions.<br />

These character strings frequently begin with the [ESC] character − ASCII code 27.<br />

The first sequence is sent to the printer before printing begins; the second one is sent before each new page.<br />

This allows the printer to be configured to suit specific user needs.<br />

The [ESC] key can be used for inputting sequences directly just as the [CTRL] key can be used for shortcut<br />

combinations or the [ALT] and number pad keys for input. Details regarding possible sequences for the selected<br />

printer can be found in its documentation.<br />

4.11.8.2 Configuring the Printer 417


4.11.8.3 Configuring Status Texts<br />

As already described in the general configuration section of the alarm system, texts used for printing different<br />

alarm states can be adapted to print requirements.<br />

The appropriate dialog box is opened by selecting 'Configuration' from the Alarm Groups shortcut menu in the<br />

<strong>Visual</strong> <strong>Components</strong> project tree.<br />

Text can be customized for the events or states such as 'Triggered', 'Reset', 'Acknowledged', 'Unacknowledged',<br />

'Bypassed' and 'Not bypassed'.<br />

These settings can be made accordingly for each language in the project. For this, languages can be switched<br />

using the 'Language' selection list.<br />

4.11.8.4 Configuring the Print Format<br />

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

The second tab of the dialog field shown above is exclusively used for the alarm printer. The settings are<br />

entered as follows.<br />

418 4.11.8.3 Configuring Status Texts


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

4.11.8.4.1 Panel Printer Sequences<br />

[ESC] sequences can be defined here for alarm lines of different types. Thus bold print can be selected for<br />

certain events to set them apart from other alarms.<br />

Structures for necessary sequences are documented in the printer manual of the corresponding alarm printer.<br />

The [ESC] key can be used for inputting sequences directly just as the [CTRL] key can be used for shortcut<br />

combinations or the [ALT] and number pad keys for input.<br />

4.11.8.4.2 Panel Printer Configuration<br />

Determines the format for printer output. It can be chosen for each entry whether and how printing the<br />

corresponding information should take place. The currently set format is displayed in the Preview line.<br />

4.11.9 Group Alarms<br />

Group alarms make it possible to form a sum alarm from groups of alarms. Exactly one group alarm can be<br />

formed for each alarm group which has been configured in the alarm system. It can be determined for each<br />

alarm in this group whether it should be included in the formation of the group alarm.<br />

4.11.9.1 Operation<br />

<strong>Visual</strong> <strong>Components</strong> has a special group within the alarm system in which group alarms are defined. As with<br />

system alarms, the user cannot add or remove any alarms here.<br />

4.11.8.4 Configuring the Print Format 419


As shown in the dialog box, each alarm group created by the user (not the system and group alarms) is<br />

automatically assigned an alarm in this group. The sequence of the alarms in this list corresponds to the<br />

sequence of the alarm groups in the project tree.<br />

The alarm text of each individual group alarm can be edited for all languages in the project.<br />

The number of each alarm group (and thus of the accompanying group alarm) is displayed in the outline of the<br />

alarm system (select 'Alarm Groups' in the project tree).<br />

4.11.9.2 Settings<br />

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

Group alarms have the same properties as every other alarm in the system (however, the setting 'Trigger Group<br />

Alarm' has no effect). The settings can be accessed from the group alarm shortcut menu.<br />

420 4.11.9.2 Settings


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

Alarm properties are identical to those of a 'normal' alarm.<br />

Individual properties are described in the alarm properties (Creating and Configuring Alarms).<br />

4.11.9.3 Choosing Alarms for the Group<br />

Whether or not the corresponding group alarm should be triggered for a specific alarm is set under that alarm<br />

(shortcut menu of the respective alarm).<br />

The option 'Trigger Group Alarm' is selected in order to integrate an alarm to the group alarm formation.<br />

4.11.9.3 Choosing Alarms for the Group 421


As a result, the appropriate group alarm is active and is used together with the individual alarms for all areas of<br />

the alarm system.<br />

If a group alarm is acknowledged, then the triggering alarm is also acknowledged as long as it is valid. This also<br />

applies to bypassing alarms.<br />

4.11.10 Bypass and Acknowledgement Images<br />

In addition to the alarm bit field, two more connections of individual alarms can be made between the <strong>Visual</strong><br />

<strong>Components</strong> alarm system and the control application. The user then has the option to acknowledge or bypass<br />

the alarms.<br />

4.11.10.1 Usage<br />

The alarm bit fields for bypass and acknowledgement use the same indexing (item numbering). In other words,<br />

the alarm in item [2] of the alarm bit field is connected with the acknowledgement information in item [2] of the<br />

acknowledgement bit field and the bypass information in item [2] of the bypass bit field.<br />

4.11.10.1.1 Bypass Bit Field<br />

In the bypass bit field, the alarm system records whether the appropriate alarm was bypassed. In this way, a<br />

block caused by the alarm can be bypassed using the controller.<br />

A data element in the bypass bit field is 0 if the alarm is bypassed, and 1 if the alarm is not bypassed.<br />

Evaluation of the bypass must take place in the control application. The alarm system only provides the<br />

necessary control elements and the bypass bit field for the application.<br />

4.11.10.1.2 Acknowledgement Bit Field<br />

This bit field contains information concerning whether the appropriate alarm has been acknowledged. This<br />

information can be evaluated in the control application.<br />

A data element in the acknowledgement bit field is 1 if the alarm is acknowledged, and 0 if unacknowledged.<br />

Alarm latch implementation, which requires acknowledgement, is provided in the <strong>Visual</strong> <strong>Components</strong> alarm<br />

system display.<br />

Advanced alarm acknowledgement processes are very application specific and must be programmed in the<br />

control application.<br />

4.11.10.2 Setting Parameters<br />

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

Variables for the bypass and acknowledgement bit fields, if used, must have the same data type and length as<br />

the alarm bit field. This also applies if only alarms with a lower index are considered for bypass or<br />

acknowledgement in the application.<br />

422 4.11.10 Bypass and Acknowledgement Images


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

Variables for the bypass bit field are connected in the Alarm Group settings dialog box. Settings for a group of<br />

alarms can be accessed in the shortcut menu of <strong>Visual</strong> <strong>Components</strong> editor tree view.<br />

Group properties can be displayed where the bypass bit field and/or the acknowledgement bit field can be<br />

connected.<br />

In this dialog box, the appropriate bit fields can be entered under 'Bypass Image' and 'Acknowledgement Image'.<br />

Configuring whether an alarm can be bypassed (allowable by the alarm system) or whether an alarm can/must<br />

be acknowledged affects each alarm individually and is described in the appropriate section.<br />

4.11.11 General − VISAPI<br />

4.11.11.1 General Information<br />

A connection to a project must be established before a VISAPI function can be used. This is accomplished with<br />

the functions VA_Setup or VA_SetupX. These functions return a handle which must be transferred to all<br />

following VISAPI function calls. This handle identifies the project specified with VA_Setup or VA_SetupX and is<br />

4.11.11 General − VISAPI 423


esponsible for managing access.<br />

4.11.11.2 Requirements<br />

There are a few rules concerning the VISAPI that must absolutely be observed.<br />

4.11.11.2.1 1. Screen Access<br />

Each VISAPI function which draws something on the screen must be called between the VA_Saccess and<br />

VA_Srelease functions. Several VISAPI drawing functions may be called in one block.<br />

VA_Saccess attempts to reserve access to the screen for the task. If successful, the function returns 0.<br />

Otherwise, it returns a corresponding error code. Drawing functions can only be used if VA_Saccess was called<br />

successfully.<br />

VA_Srelease gives up access to the screen again so it can be used by other tasks or the <strong>Visual</strong> <strong>Components</strong><br />

interpreter.<br />

Warning:<br />

If VA_Srelease is not called after VA_Saccess was successfully called, then other tasks (or the <strong>Visual</strong><br />

<strong>Components</strong> interpreter) cannot access the screen.<br />

If your visualization project uses VISAPI and suddenly 'freezes', then make sure that you have correctly called<br />

VA_Srelease!<br />

Example in the C Programming Language:<br />

if (!VA_Saccess(TRUE, handle))<br />

{<br />

VA_Line(......);<br />

VA_Rect(......);<br />

VA_Srelease(TRUE, handle);<br />

}<br />

4.11.11.2.2<br />

Cyclic Operation<br />

The VISAPI library is designed to operate in cyclic tasks. In particular, this should be considered when using the<br />

VA_Saccess function. If this function returns an error stating that access to the screen is not possible at the<br />

moment, then a new attempt is made in the next cycle.<br />

It usually doesn't make sense to try reserving the screen in the same cycle. An exception might be if VISAPI<br />

drawing functions are carried out in a higher priority task class.<br />

Example in the C Programming Language:<br />

_CYCLIC void main(void)<br />

{<br />

if (!VA_Saccess(TRUE, handle))<br />

{<br />

VA_Line(......);<br />

VA_Rect(......);<br />

VA_Srelease(TRUE, handle);<br />

}<br />

}<br />

4.11.11.2.3 Cycle Times<br />

Like every other control task, a VISAPI task runs during a fixed cycle time. This should be considered when<br />

programming with the VISAPI. Functions which require longer times to carry out drawing functions (i.e. ellipse)<br />

can cause cycle time violations under certain circumstances if they are placed in faster task classes.<br />

If necessary, place the task in a slower task class of use fewer functions in one cycle.<br />

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

424 4.11.11.2 Requirements


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

4.11.12 General/Drawing − VISAPI<br />

This is an example of a small VISAPI program in the B&R Automation Basic programming language, followed by<br />

an explanation:<br />

1:<br />

2:<br />

3:<br />

4:<br />

5:<br />

6:<br />

7:<br />

8:<br />

9:<br />

10:<br />

11:<br />

12:<br />

13:<br />

14:<br />

15:<br />

16:<br />

17:<br />

18:<br />

19:<br />

20:<br />

21:<br />

22:<br />

23:<br />

24:<br />

25:<br />

26:<br />

27:<br />

28:<br />

29:<br />

30:<br />

31:<br />

(* cyclic program *)<br />

x1 = 100<br />

y1 = 150<br />

x2 = 250<br />

y2 = 250<br />

height = 40<br />

width = 80<br />

fill = 255 ; Transparent<br />

color = 0 ; Black<br />

If ready 1 Then<br />

VC_HANDLE = VA_Setup(1 , "vga")<br />

If VC_HANDLE 0 Then<br />

ready = 1<br />

EndIf<br />

EndIf<br />

If ready = 1 Then<br />

If VA_Saccess(1,VC_HANDLE)= 0 Then<br />

VA_Rect (1,VC_HANDLE,x1,y1,x2,y2,fill,color)<br />

VA_Line (1,VC_HANDLE,x1,y1,x2,y2,color)<br />

;Draws a rectangle<br />

;Draws a line<br />

VA_Ellipse(1,VC_HANDLE,x2,y2,heigth,width,fill,color) ;Draws an ellipse<br />

VA_Textout (1,VC_HANDLE,1,100,100,color,fill,"a rectangle, a line and an ellipse");Outputs a te<br />

VA_Srelease(1,VC_HANDLE)<br />

EndIf<br />

EndIf<br />

This program draws a rectangle, a line, an ellipse, and outputs text. The following steps are required to do this:<br />

Line(s) Description<br />

3 − 10 Initializes variables<br />

12 This flag stores whether the VISAPI has already been successfully initialized.<br />

13<br />

16<br />

Initializes the VISAPI and establishes the connection to the specifed project ('vga' in this example). If<br />

the project name is valid and the VISAPI library is initialized, then a handle is returned which is stored<br />

in the VC_HANDLE variable.<br />

VC_HANDLE is valid, since it is 0. Therefore, the initialization flag can be set to 1 to prevent<br />

repeated initializations and let the rest of the task continue.<br />

19 Checks whether the VISAPI is initialized.<br />

20 Calls VA_Saccess since drawing should now begin.<br />

21 − 27 VA_Saccess did not return any errors, therefore drawing can take place.<br />

29 After a successful VA_Saccess(...) call, VA_Srelease absolutely has to be called.<br />

4.12 Tips and Tricks<br />

Many functions are tightly integrated in <strong>Visual</strong> <strong>Components</strong> and can be used right away. This section gives more<br />

information about additional <strong>Visual</strong> <strong>Components</strong> options.<br />

Usually, only a few lines of code are necessary to implement striking effects and completely new functions.<br />

4.12.1 A Few Tips<br />

• Configuring a Help Picture<br />

• Input Field Cursor Navigation<br />

• Blinking Text (or Button)<br />

4.11.12 General/Drawing − VISAPI 425


• Logging User Actions<br />

• Creating Recipe Management<br />

• Adjusting the Touch Pad<br />

• VC System Tuning<br />

• Importing / Exporting Panel Projects<br />

• Creating a Separate Number or Alpha Pad<br />

4.12.2 Configuring a Help Picture<br />

4.12.2.1 Problem<br />

A picture with help text has been configured in the project. Several pictures can branch to this picture. This help<br />

picture should lead back to the source picture using a 'Back' button or key.<br />

How can this be achieved without additional programming and knowledge about the source picture?<br />

4.12.2.2 Solution<br />

By configuring a picture change on the current picture, the runtime system saves the previous picture internally<br />

(the caller of the new picture). If there has been a picture change configured in the 'Help' picture which leads to<br />

the same (help) picture, then it changes to the previous picture (caller of the picture) during runtime.<br />

4.12.3 Input Field Cursor Navigation<br />

4.12.3.1 Problem<br />

A configured picture looks like the one below. The 'Up,' 'Down,' 'Left', or 'Right' keys should be used to navigate<br />

between the input fields or change their order.<br />

4.12.3.2 Solution<br />

The input change order becomes visible by pressing 'CTRL + D' in the picture editor. Using a number, the order<br />

of the input fields which are called after pressing the 'Enter' key is shown. Clicking through the input fields in the<br />

desired order can change this.<br />

Pressing 'CTRL + D' again deactivates this view.<br />

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

Navigation can also take place using cursor keys. To do this, 4 function keys need to be defined. In the key<br />

shortcut menu, the desired direction is defined under 'Goto Input'.<br />

426 4.12.2 Configuring a Help Picture


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

During runtime, the next input field within the width of the current output field is looked for in the defined cursor<br />

direction. If there is no input field available in this direction, or if the next input field is outside the width of the<br />

output field, then searching continues on the other side of the screen (i.e. with 'search direction up', it will search<br />

again from the bottom of the screen). If there is still no available input field, then focus switching does not occur.<br />

4.12.4 Blinking Text (or Button)<br />

4.12.4.1 Problem<br />

A text or button should blink to make the user aware of a certain situation.<br />

4.12.4.2 Solution<br />

A color variable can be connected to the text or the button.<br />

The 'text blink effect' variable must switch the foreground and background colors using a particular timing (see<br />

also Dynamic Color Control).<br />

The same applies to blinking buttons or other elements.<br />

4.12.4 Blinking Text (or Button) 427


4.12.5 Adjusting the Touch Keypad<br />

<strong>Visual</strong> <strong>Components</strong> touch keypads have a very simple design and can be used directly in most applications. If<br />

desired, the keypad can be modified to suit the look and feel of the application.<br />

<strong>Visual</strong> <strong>Components</strong> keypads were designed as bitmaps and can be modified as needed. However, only the<br />

design of the keys can be modified, not the function or the layout.<br />

Any graphics program which supports the Windows Bitmap format (.BMP) can be used to edit the keypad<br />

bitmaps.<br />

<strong>Visual</strong> <strong>Components</strong> runtime handles and displays the touch keypads just like any other bitmap. 256 colors are<br />

available just like for all other bitmaps in the project (see also Color Table).<br />

Various keypad bitmaps are added to the project depending on whether a 1/4 VGA display or a VGA (or larger)<br />

display is used. If a 1/4 VGA display is used, a bitmap for the numeric keypad and three bitmaps for the<br />

alphanumeric keypads are integrated (each 'page' uses a separate bitmap). For VGA (and larger), two bitmaps<br />

are integrated: One for the numeric keypad and one for the alphanumeric keypad.<br />

4.12.6 Tips and Tricks<br />

4.12.6.1 Logging User Actions<br />

Logging user actions for security reasons is an important topic. <strong>Visual</strong> <strong>Components</strong> does not offer a complete<br />

solution here.<br />

By using a few existing components and some programming code, a relatively easy solution for this problem can<br />

be found.<br />

The following lines do not contain a complete example. Instead, they only show ideas and concepts which can<br />

be used to record when a user logs on and logs off. Of course, this approach can be expanded later to record<br />

picture changes or the altering of values in variables.<br />

The Alarm System from <strong>Visual</strong> <strong>Components</strong> is used for this plan.<br />

Times when a user logs on and logs off are recorded in a separate alarm groups.<br />

A string input field allows the entry of the user name. String fields also provide the possibility to hide input<br />

(Mode: Password) which is used for password input.<br />

The password and user name are checked in the application program. If input is valid, then the user login time is<br />

recorded by having the alarm system set the corresponding alarm bit.<br />

Texts for user login and logout data are defined in the alarm group.<br />

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

The alarm system logs this entry with the system time and permanently saves the entry in the alarm history.<br />

On the alarm page, the actions of a certain 'user' alarm group can be output using group and alarm filters. Only<br />

alarms from a certain alarm group can be shown if a group filter is used.<br />

Note:<br />

Changes in machine data can also be recorded using this method. Multilingual output of alarm texts is also<br />

possible.<br />

428 4.12.5 Adjusting the Touch Keypad


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

4.12.7 Tips and Tricks<br />

4.12.7.1 Creating Recipe Management<br />

The following section describes simple recipe management using <strong>Visual</strong> <strong>Components</strong> and dynamic variables.<br />

Data is stored in a user−defined structure and displayed with the help of dynamic variables.<br />

Notes for dynamic variables:<br />

• What is a dynamic PV?<br />

• How does it differ from 'normal' PVs?<br />

• Why are dynamic PVs necessary?<br />

• How is a dynamic PV stored?<br />

Notes for recipe management:<br />

• Executing the Recipe Page<br />

• Coding Example in Automatic Basic<br />

• Coding Example in ANSI C<br />

4.12.7.1.1 What is a Dynamic PV?<br />

A dynamic PV (process variable) is a reference or pointer to a 'normal' PV. Due to this property, it is possible for<br />

a dynamic PC to reference several static variables of the same type during its lifespan. Dynamic PVs can only<br />

be used in the Automation Basic and ANSI C languages.<br />

4.12.7.1.2 How Does it Differ from 'Normal' PVs?<br />

4.12.7.1.2.1 Memory Allocation<br />

The biggest difference is in its memory usage. While a static variable occupies its actual physical size in the<br />

memory (i.e. ULONG = 4 bytes), a dynamic PV is only a reference to a static variable, i.e. in reality it only<br />

contains the address of the static PV it refers to. However, since addresses also occupy 4 bytes in the memory,<br />

this difference only has an effect when using arrays and structures with several elements.<br />

4.12.7.1.2.2 Dynamic Response of Contents<br />

Dynamic PVs have the ability to switch between several static PVs using their referencing property. However, a<br />

reference is more than simply 'pointing'. When a dynamic PV points to a static PV, it also provides access to the<br />

data contained in the static PV.<br />

4.12.7.1.3 Why are dynamic PVs necessary?<br />

4.12.7.1.3.1 Example:<br />

Only one element should be displayed in the visualization unit from an array which contains various data (i.e.<br />

recipe data). Whichever data an index variable refers to is displayed.<br />

In the variable output field on the display, an output field of the same data type as the array element is used and<br />

linked to a dynamic variable. Depending on the value of the index variable, the corresponding static array value<br />

which is referenced by the dynamic variable is displayed.<br />

Advantages of dynamic variables:<br />

If a recipe (structure array) is stored in an application task, then not all recipes also have to be configured in the<br />

visualization application and connected to individual components. A recipe (controller, parameter sets) and its<br />

elements only have to be configured using dynamic variables. They can then switch between the individual<br />

recipes in the application task using a recipe index.<br />

4.12.7.1.4 How is a dynamic PV stored?<br />

There are differences between Automation Basic and ANSI C when creating dynamic PVs.<br />

4.12.7 Tips and Tricks 429


4.12.7.1.4.1 In an Automation Basic task<br />

1. Uses the PV in the code:<br />

The dynamic variable name is defined in the variable declaration dialog box after the variable name is<br />

declared in the source code and ENTER is pressed. However, the dynamic PV has to reference a static<br />

PV in the source code (i.e. rec_array access adr(stat_array)).<br />

2. Properties Change:<br />

The scope of the dynamic variable changes from 'remanent' to 'dynamic'.<br />

Automation Basic Example<br />

4.12.7.1.4.2 In a C task<br />

A dynamic PV is declared in C using the following syntax:<br />

_LOCAL *;<br />

The PV must be declared as _LOCAL.<br />

C Example<br />

4.12.7.2 Executing the Recipe Page<br />

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

The following example shows the recipe page execution (including Automation Basic and ANSI C code) on the<br />

basis of the dynamic PVs decribed above.<br />

430 4.12.7.1 Creating Recipe Management


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

The input field for the recipe no. is connected to the static PV (see code). Input fields for<br />

elements 1 − 5 are connected to the dynamic PVs to (see code).<br />

The contents of the fields for elements 1 − 5 can now be controlled using the recipe number. A change in the<br />

recipe number in the code causes the dynamic PV to 'transfer' to the array element with the index<br />

. Both the array (with 5 elements) and the dynamic PV are of type which<br />

contains 5 UDINT (unsigned long) elements (elem1 − elem5).<br />

4.12.7.3 Code in Automation Basic<br />

4.12.7.3.1 Initialization Section<br />

In the initialization section, 5 array elements of type are initialized with values, the current recipe<br />

number is set to recipe 1, and the old recipe number is set to 0. The control<br />

variable is set to 1 if the new recipe number differs from the old number; it is set to 0 at the<br />

beginning.<br />

(* init program *)<br />

loop i = 0 to 5 do<br />

rec_arr[i].elem1 = 100 * i + 1;<br />

rec_arr[i].elem2 = 100 * i + 2;<br />

rec_arr[i].elem3 = 100 * i + 3;<br />

rec_arr[i].elem4 = 100 * i + 4;<br />

rec_arr[i].elem5 = 100 * i + 5;<br />

endloop<br />

recipeNrAct = 1;<br />

recipeNrOld = 0;<br />

recipeChanged = 0;<br />

4.12.7.3.2 Cyclic Section<br />

The cyclic part checks whether the current recipe number is different from the old recipe number<br />

if the user selects a new recipe number using an input field. In this case, the new recipe number<br />

4.12.7.3 Code in Automation Basic 431


eplaces the old recipe number and the control variable is set to 1.<br />

In order to avoid invalid memory accesses, recipe number input is checked for the max. available recipes.<br />

The second IF−statement is fulfilled if the control variable 0. In other words, the dynamic variable references<br />

the current recipe number.<br />

(* cyclic program *)<br />

if (recipeNrAct recipeNrOld) then<br />

if (recipeNrAct > 5) then<br />

recipeNrAct = 5;<br />

endif<br />

recipeChanged = 1;<br />

recipeNrOld = recipeNrAct;<br />

endif<br />

if (recipeChanged > 0) then<br />

pRec access adr(rec_arr[recipeNrAct−1]);<br />

recipeChanged = 0;<br />

endif<br />

Read the Notes at the end of the chapter.<br />

4.12.7.4 Code in ANSI C<br />

The code described above in C:<br />

#include<br />

#include struct recipe { unsigned long elem1; unsigned long elem2;<br />

unsigned long elem3; unsigned long elem4; unsigned long elem5; }; struct recipe rec_arr[5]; _GLOBAL<br />

unsigned char recipeNrAct; _GLOBAL unsigned char recipeNrOld; _GLOBAL unsigned char recipeChanged;<br />

_LOCAL struct recipe *pRec; _INIT init_func(void) { int i; for(i = 0; i < 5; i++) { rec_arr[i].elem1<br />

= 100 * i + 1; rec_arr[i].elem2 = 100 * i + 2; rec_arr[i].elem3 = 100 * i + 3; rec_arr[i].elem4 =<br />

100 * i + 4; rec_arr[i].elem5 = 100 * i + 5; } recipeNrAct = 1; recipeNrOld = 0; recipeChanged = 0;<br />

} _CYCLIC cyc_func(void) { if(recipeNrAct != recipeNrOld) { if(recipeNrAct > 5) { recipeNrAct = 5; }<br />

recipeChanged = 1; recipeNrOld = recipeNrAct; } if(recipeChanged > 0) { pRec =<br />

&rec_arr[recipeNrAct−1]; recipeChanged = 0; } }<br />

4.12.7.4.1 Important notes<br />

A dynamic variable does not limit itself to referencing static variables of the same data type; rather, it can<br />

reference any memory address. However, this can lead to big problems. When using dynamic variables, it<br />

should be noted that they should already be initialized when first accessed (null pointer error) and not pointed to<br />

an invalid memory range during runtime.<br />

If limits were not set for the max. recipe number in the above example, a value of another variable or even<br />

program code could have possibly been overwritten. This can crash a program or cause invalid data to be<br />

displayed.<br />

4.12.8 VC System Tuning<br />

All <strong>Visual</strong> <strong>Components</strong> runtime modules are tied to the system as non−cyclic tasks with lower priority than cyclic<br />

tasks. Cyclic user tasks (task classes) are therefore not influenced by runtime performance. <strong>Visual</strong> <strong>Components</strong><br />

runtime modules run in the system idle time with low priority.<br />

A simple and clear definition of timing performance is difficult because of the different ways that application<br />

software loads down the CPU. This is mainly due to the lower priority of <strong>Visual</strong> <strong>Components</strong> runtime modules.<br />

If a system does not have much idle time available, then display speed and key reaction are slower on the target<br />

system. Therefore, attention should be paid to how much idle time is available on the system. An 'unfavorable'<br />

configuration example will show how this works in practice.<br />

We will use the following configuration:<br />

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

432 4.12.7.4 Code in ANSI C


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

Task class 4 is an 'idle time class' from the point of view of the cyclic<br />

Automation Studio program. Idle time would be important here in a project<br />

which contains visualization componenets.<br />

TC#4 is set to 10 ms in our example. Here, the tolerance time is very often set<br />

to 1000 ms or more. If TC#4 executes longer than 10 ms, then it will be<br />

restarted after another 10 ms at the latest.<br />

For example, if TC#4 executes 19 ms (10 ms grid and 1000 ms tolerance), then only 1 ms idle time remains in a<br />

20 ms period.<br />

TC#4 is then immediately restarted in the 20th ms by the set 10 ms grid.<br />

If the cycle time for TC#4 is increased to 30 ms and 19 ms is still the execution time, then 11 ms idle time can be<br />

used for the visualization application.<br />

A further increase to 50 ms gives 31 ms within the 50 ms cycle.<br />

1 ms from 20 ms = 5% for idle time<br />

11 ms from 30 ms = approx. 30 % for idle time<br />

31 ms from 50 ms = approx. 60% for idle time<br />

(Of course, these figures only apply if all other tasks use 0% of the CPU or something similar)<br />

As made evident by the example, idle time can be very much improved by using a careful approach. It is<br />

especially recommended to critically examine all components according to their time requirements when the<br />

CPU load is very high.<br />

In addition to cyclic programming, B&R Automation Studio provides non−cyclic programming. With this special<br />

variant, additional optimized results can be achieved with regard to the runtime behavior of the system.<br />

Non−cyclic taks can be activated with any priority and are not dependent on runtime monitoring.<br />

4.12.9 Tips and Tricks − Touch Pad<br />

It is possible in <strong>Visual</strong> <strong>Components</strong> 2.3 to create separate touch pads.<br />

The following files are necessary to do so:<br />

− a *.tpi file<br />

− a *.bmp file<br />

Note the following when creating .tpi files:<br />

File extension of an original .tpi file (numpad):<br />

<br />

<br />

<br />

<br />


− RasterCountX" Value="10" − Bitmap size divided by the grid point size<br />

− RasterCountY" Value="12" − Bitmap size divided by the grid point size<br />

− RasterSizeX" Value="20" − always half of the actual key size<br />

− RasterSizeY" Value="20" − always half of the actual key size<br />

(example above)<br />

Important:<br />

The same settings in the .tpi file are also valid for alpha pads.<br />

Creating a Bitmap File:<br />

Any current graphics program can be used to create a graphic touc pad.<br />

You only need to pay attention to the bitmap size and the grid point size. In addition, the bitmap<br />

has to be saved in 256 colors for <strong>Visual</strong> <strong>Components</strong>.<br />

Inserting Both Files in Automation Studio:<br />

Both files (*.tpi und *.bmp) have to be copied to the AS\<strong>Visual</strong><strong>Components</strong>\Bitmaps\Touch Pad<br />

directory.<br />

Automation Studio must then be restarted before the new pad will be available for selection.<br />

Please note:<br />

The resolution of the touch pad may not exceed the resolution of the screen.<br />

4.12.10 Importing / Exporting Panel Projects<br />

A complete panel object can be exported and then imported into a different project with the Import/Export<br />

functions in Automation Studio. It is important that the hardware for the panel object matches or is compatible<br />

with that of the new project. Otherwise, data will be lost.<br />

The procedure for exporting and importing complete projects is described in the following:<br />

4.12.10.1 Exporting Panel Objects<br />

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

434 4.12.10 Importing / Exporting Panel Projects


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

First, the panel object to be exported should be selected. Then 'Export' should be selected from the 'File' menu.<br />

Now a name can be input for the export file. By default, the name of the respective panel is suggested.<br />

4.12.10 Importing / Exporting Panel Projects 435


Exporting begins by clicking on the 'Export' button. In the directory, you will then see a header file (here visu.txt)<br />

and a new directory (here visu.export) where the complete panel project is saved.<br />

4.12.10.2 Importing Panel Objects<br />

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

Importing complete panel object pictures starts by selecting 'Import' from the 'File' menu in Automation Studio.<br />

The ?????.export directory and the ?????.txt file must be present to import the panel object. Now, the .txt file<br />

can be selected for importing.<br />

The panel object in inserted into the project with 'Import'. Next, the appropriate display still has to be inserted.<br />

436 4.12.10.2 Importing Panel Objects


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

4.12.10.2 Importing Panel Objects 437


Now, the application can use the complete panel project.<br />

You must be careful when importing complete panel objects when different display hardware is used for both<br />

projects. Only the properties of the target hardware (project) should be supported which are then adapted to the<br />

imported project.<br />

4.13 Frequently Asked Questions (FAQ)<br />

4.13.1 Frequently Asked Questions (FAQ) − Input Fields<br />

How can passwords longer than those provided with password input fields (6 characters) be entered?<br />

A maximum of 6 characters can be entered for passwords when password input fields are used. If this length is<br />

not sufficient, then a string input field can be used with the "Password" edit mode.<br />

4.13.2 Frequently Asked Questions (FAQ) − Scaling<br />

4.13.2.1 General<br />

Scaling in <strong>Visual</strong> <strong>Components</strong> 2.2 fulfills two tasks. On one hand, input can be limited to a value range different<br />

than that of the connected data type. On the other hand, values can actually be scaled linearly.<br />

The following description gives an overview of how scaling functions internally, which features are included, and<br />

how internal performance is affected with different configurations.<br />

This document should be considered as a reference for developers and as a helpful aid to configuration for<br />

users. We have tried to describe all types of configurations and to supply the background necessary to<br />

understand VC 2.2 Runtime.<br />

Scaling can be illustrated with Step 9 in the demo project.<br />

4.13.2.2 Mathematics Reference<br />

Scaling in VC 2.2 basically functions the same as a linear function with the equation<br />

Linear Equation:<br />

y = k * x + d<br />

Straight Line Slope:<br />

k=dy/dx<br />

Shifting to the Y axis is calculated as follows:<br />

d=Yp −(xp*dy/dx)<br />

y ... Function value à scaled value<br />

x ... Output value à value to be scaled<br />

k ... Slope<br />

d ... Shift to the Y axis<br />

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

438 4.13 Frequently Asked Questions (FAQ)


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

Since VC 2.2 Runtime supports m68k targets in addition to i386 targets, the imprecise floating decimal data type<br />

"double" should be avoided when calculating scaling internally. Calculation takes place with int32 data types<br />

instead.<br />

To prevent problems with value overflows, actual calculations are processed with the aid of Assembler routines<br />

which allow 64−bit operations.<br />

When scaling in VC 2.2, the slope 'k' from the linear function is made up of the PLC−Min, PLC−Max,<br />

Display−Min, and Display−Max parameters. These configurable values (fixed or dynamic using PVs) result in<br />

the slope 'k' whereby either x or y is represented depending on the scaling direction.<br />

k = (ymax ymin) / (xmax xmin)<br />

d=ymin−(xmin *k)<br />

This results in the following scaling formula, whose scope is general:<br />

y = (ymax ymin) / (xmax xmin) * x + (ymin −(xmin*(ymax ymin) / (xmax xmin)))<br />

Example:<br />

Following configuration:<br />

PLCmin=2<br />

PLCmax=4<br />

SCALmin=−10<br />

SCALmax=100<br />

Needed: Displayed value when PLCValue=3<br />

k=(100−(−10)/4−2))<br />

k=55<br />

d=−10−(2*55)<br />

d=−120<br />

Y=55*3 −120<br />

Y=45<br />

The parameters defined above in detail:<br />

Parameter Description<br />

PLC Min Permitted lower limit of the values of a PV on the target<br />

PLC Max Permitted upper limit of the values of a PV on the target<br />

Display Min Permitted lower limit of the displayed values of a PV on the display<br />

Display Max Permitted upper limit of the displayed values of a PV on the display<br />

4.13.2.3 Restrictions<br />

Using scaling, even unsigned PVs (on the target) can accept a signed value range on the display. PVs of data<br />

type float are normally excluded from scaling because their special properties and non−linear cardinality would<br />

cause unforeseen side effects for the user. The following table shows all data types which can be scaled:<br />

PV Data Type Display Value Range<br />

BOOL DINT<br />

USINT DINT<br />

SINT DINT<br />

UINT DINT<br />

INT DINT<br />

UDINT UDINT<br />

DINT DINT<br />

4.13.2.3 Restrictions 439


The following describes how VC 2.2 Runtime performs with scaling and the possibilities available to the user. In<br />

addition, how user settings are processed internally is shown to give the user and developer a better idea of this.<br />

4.13.2.4 Internal Performance<br />

Without having to go too much into detail, two principle VC 2.2 Runtime procedures are described:<br />

− Scaling Output<br />

− Scaling Input<br />

For the most part, code excerpts have been avoided when describing internal processes. Instead, we will try to<br />

explain things using graphics and text alone.<br />

4.13.2.5 Decimal Places<br />

A potentially configured decimal place exerts an exceptional influence on the display value range limits. There is<br />

basically one rule to keep in mind:<br />

The decimal place does not have any effect on the actual calculation. It only has an effect on the format<br />

of the output string which is formed as display output after the values are calculated.<br />

When decimal positions are referred to in the following, it always means the sum from fixed and dynamic<br />

decimal places using PVs.<br />

The decimal place only exerts this aforementioned influence when fixed limit values are scaled. This influence<br />

works in such a way that the maximum display value is greater internally by the number of "zeroes", as decimal<br />

places are present. An example shows this more clearly:<br />

Ex. a)<br />

Field length: 5 Decimal places: 2 Configured maximum display value: 100.33<br />

Internal maximum display value: 10033<br />

Ex. b)<br />

Field length: 5 Decimal places: 2 Configured maximum display value: 100<br />

Internal maximum display value: 10000<br />

Ex. c)<br />

Field length: 5 Decimal places: 2 Configured maximum display value: 1000<br />

When this configuration is attempted, the editor changes this value to 999.99.<br />

This is because it is necessary that the entire maximum value plus the decimal places may not exceed the<br />

maximum field length. From 1000 comes 1000.00 which corresponds to a field length of 6 places à can't be<br />

displayed.<br />

This problem should be taken into account when using dynamic decimal point shifts. Each increase in the<br />

decimal position increases the maximum display value limit by a factor of 10. In turn, this leads to an increase of<br />

places in the display string when entering the configured maximum value.<br />

Ex. a)<br />

Field length: 5 Decimal places: 1 Configured maximum display value: 100<br />

Dynamic decimal point shift: 0<br />

Internal maximum display value: 1000<br />

Input: 100 à 100.0 (4 numeric places) à OK<br />

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

440 4.13.2.4 Internal Performance


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

Dynamic decimal point shift: 1<br />

Internal maximum display value: 10000<br />

Input: 100 à 100.00 (5 numeric places) à OK<br />

Dynamic decimal point shift: 2<br />

Internal maximum display value: 100000<br />

Input: 100 à 100,000 (6 numeric places) à cannot be displayed<br />

Since only PVs with non−floating decimal data types can be used when scaling with dynamic limit values, the<br />

decimal position does not take the same position value with this type of scaling. This means that the decimal<br />

position doesn't increase the maximum display limit value since otherwise it would never be possible to display<br />

values other than 0 behind the decimal point. The decimal is thus "just" inserted at the appropriate decimal<br />

position in the string.<br />

Ex. a)<br />

Field length: 5 Decimal places: 1<br />

Value of the maximum display value PV: 133 à Output: 13.3<br />

Value of the maximum display value PV: 1333 à Output: 133.3<br />

Field length: 5 Decimal places: 2<br />

Value of the maximum display value PV: 133 à Output: 1.33<br />

Value of the maximum display value PV: 1333 à Output: 13.33<br />

General Rule:<br />

The input value * 10 number of decimal places is written to the PLC when scaling dynamically.<br />

The input value is written to the PLC when scaling statically.<br />

4.13.2.6 Scaling Output<br />

Basically the formula described above,<br />

y = (ymax ymin) / (xmax xmin) * x<br />

where the values are put together as follows:<br />

y ... + d = value which is shown on the display<br />

ymax ... DisplayMax<br />

ymin ... DisplayMin<br />

xmax ... PLCMax<br />

xmin … PLCMin<br />

x … value that the PV on the target holds<br />

Output scaling is used in 2 cases:<br />

a) Numerically scaled output fields<br />

b) Numerically scaled input fields<br />

In both cases, output scaling is used, as the name suggests, before the value is output on the display. The<br />

following sequence chain is carried out:<br />

4.13.2.6 Scaling Output 441


4.13.2.7 Scaling Input<br />

Basically the formula described above,<br />

y = (ymax ymin) / (xmax xmin) * x<br />

where the values are put together as follows:<br />

y ... + d = value that is written to the target PV<br />

ymax ... PLCMax<br />

ymin ... PLCMin<br />

xmax ... DisplayMax<br />

xmin … DisplayMin<br />

x … value that was read via display input<br />

Input scaling is used in one case in combination with output scaling:<br />

− Numerically scaled input field<br />

The following sequence chain is carried out:<br />

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

442 4.13.2.7 Scaling Input


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

4.13.3 Frequently Asked Questions (FAQ) − Keys<br />

Where do I clear function keys?<br />

Function keys on a display which has hardware keys can only be cleared in the 'Pictures' overview image.<br />

4.13.4 Frequently Asked Questions (FAQ) − VISAPI<br />

VA_Setup returns 0 and all other VISAPI functions return 7090.<br />

This means that the VISAPI could not be initialized because either the target was not running a project or the<br />

project name for the VA_Setup or VA_SetupX function was specified incorrectly.<br />

A task which uses the VISAPI causes cycle time violations.<br />

Pay attention that some drawing functions require a relatively long execution time, i.e. drawing an ellipse with<br />

the VA_Ellipse function. If the task is executed in a very fast task class or there is very little idle time available to<br />

the system, then cycle time violations can occur.<br />

Try to move the task with the VISAPI functions into a slower task class. If that doesn't work, try to use fewer<br />

drawing commands for each cycle of the task. Lastly, there is the possibility that a task in a high priority task<br />

class demands so much time that task classes with lower priority do not have sufficient idle time available.<br />

Nothing else can be drawn once a cycle is complete.<br />

Perhaps VA_Srelease was not called even though VA_Saccess was successfully called. If this is the case, the<br />

screen was reserved for output but was no longer released.<br />

4.13.3 Frequently Asked Questions (FAQ) − Keys 443


Check the program logic of the task so that VA_Srelease is always called after VA_Saccess has been<br />

successfully executed.<br />

Can the VA_Setup function also be executed in the INIT−SP?<br />

The VA_Setup function should always be called in the cyclic part of the task. It cannot be ensured that the<br />

interpreter has completely finished booting when INIT−SPs are called. This can cause a function error when<br />

VA_Setup is called (Status0). For this reason, it is recommended to execute this function in the cyclic part<br />

since this guarantees that the interpreter has booted.<br />

When I execute certain functions cyclically, my application is noticeably delayed.<br />

Functions such as VA_SetContrast and VA_SetBrightness for setting contrast and brightness require a relatively<br />

long time to execute (depending on the hardware used). If these functions are executed cyclically, then a<br />

bottleneck can occur with regards to the idle time. Therefore, these functions should only be called when a value<br />

has changed.<br />

When is touch calibration necessary?<br />

Deviations can occur regarding touch operation due to outside influences and manufacturing tolerances. The<br />

touch area can be recalibrated using touch calibration (VA_StartTouchCal). This function should be executed on<br />

a blank screen and called only once.<br />

4.14 Upgrading <strong>Visual</strong> <strong>Components</strong> 2.0 Projects<br />

4.14.1 Modification Notes<br />

Because of the many changes from Version 2.0, it is essential to read the upgrade notes for Version 2.1.<br />

Functions that may have been more difficult to implement in Version 2.0 are now substantially easier (see also<br />

New Functions in 2.1).<br />

It was also necessary to make a few changes. We hope for your understanding for these modifications.<br />

The following pages describe these changes and provide tips for modifying existing projects. We recommend<br />

that these notes be considered. In case there are problems with existing projects, refer to the appropriate notes.<br />

• Color Representation for IPC Projects<br />

• Changing Pictures<br />

• API Functions from the VISAPI Library<br />

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

• VCInfo Data Structure<br />

• Character Set Representation<br />

• Customer Specific Panels<br />

Note:<br />

Because of numerous functions and the possibility to integrate auxiliary programs, not all projects can be<br />

guaranteed an error−free conversion. Partial changes have to be made manually both in the individual editors<br />

and in the control application source code after opening the project with <strong>Visual</strong> <strong>Components</strong> V2.1. If there is a<br />

problem with converting, B&R Support can be contacted to further analyze the problem.<br />

4.14.1.1 Color Representation for IPC Projects<br />

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

The editor now offers the ability to directly configure colors. Projects adopted from Version 2.0 will be displayed<br />

using default colors. Colors which were changed during runtime with the 'VCInfo' structure are no longer shown.<br />

All colors must now be configured in the editor. To do so, global color settings offer suitable dialog boxes for<br />

setting static and dynamic colors. Additional possibilities like transparent effects and individual color<br />

444 4.14 Upgrading <strong>Visual</strong> <strong>Components</strong> 2.0 Projects


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


• HotSpot Controls for the Key Matrix<br />

• Calculating the Key Matrix<br />

These solutions should only be used for existing projects and not for creating new projects in V2.1. In future<br />

versions, button and HotSpot functionality will be expanded even more. Projects will be more concise and<br />

require less executable code.<br />

4.14.1.5 VCInfo Data Structure<br />

The 'VCInfo[0]' data structure was deleted and not replaced.<br />

• Controlling Colors now takes place directly by the editor or by variables on the target system.<br />

• The API Interface provides functions for adjusting settings for brightness and contrast, etc.<br />

• The Touch Calibration function is also available using the API interface.<br />

This change corresponds to the Automation Studio concept.<br />

4.14.1.6 Character Set Representation<br />

Bitmap font technology and their editing possibilities are being replaced by the new True Type font standard.<br />

The new version allows the integration of True Type fonts. Symbol fonts are also supported. The possibility to<br />

use UNICODE character sets (IPC target systems) is planned for the next version.<br />

Existing projects with modified bitmap fonts are correctly transferred. Display errors may occur when there are<br />

more than 127 characters in a particular set. The CharBox can be used for these instances.<br />

These representation problems can occur particularly on CAN systems. Standardized character sets were not<br />

used on them in the past. They are now not always displayed correctly in the editor partly because of reserved<br />

character ranges in Windows.<br />

Workaround: CharBox.<br />

4.14.1.7 Customer−Specific Panels<br />

When using customer−specific panels, don't forget to reinstall the hardware description files after installing<br />

version 2.1 (in case the directory is deleted or another directory is used).<br />

Only B&R standard panels are included in Automation Studio 2.1 delivery.<br />

4.14.2 Upgrading <strong>Visual</strong> <strong>Components</strong> 2.0 Projects<br />

4.14.2.1 HotSpot Controls for the Key Matrix<br />

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

HotSpots can be defined next to one another in the global picture with a size of 40x40 pixels. These HotSpots<br />

can then be assigned to a fixed grid position in the key matrix. In this way, 192 rectangles can be drawn in the<br />

global picture when a VGA display is used. Also in this way, the familiar key matrix from V2.0 can be<br />

implemented.<br />

446 4.14.1.5 VCInfo Data Structure


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

The fixed position of the HotSpot in the key grid is assigned in the dialog box. This allows the old key matrix to<br />

be reestablished.<br />

This method is somewhat elaborate and is only meant as a transition.<br />

In the long term, the project should be changed to use button and HotSpot technology.<br />

4.14.2.2 Calculating the Key Matrix<br />

Another possibility exists to convert old matrix information by reading the matrix position using the VISAPI. The<br />

VA_GetTouchAction() function from the VISAPI Library<br />

The following is an excerpt of code for converting the key matrix for a VGA display. This only applies for a VGA<br />

display. For 1/4 VGA, calculation takes place using lines and columns.<br />

#include<br />

#include #include "visapi.h" #define T_SIZE 192 /* VGA 40x40 pixel array<br />

from 640x480*/ UINT _LOCAL ready; TouchAction _GLOBAL touch; UDINT _GLOBAL x_position; UDINT<br />

_GLOBAL y_position; USINT _GLOBAL touch_status; _GLOBAL unsigned char KeyMatrix[T_SIZE]; _GLOBAL<br />

unsigned long VC_HANDLE; _CYCLIC void Cyclic(void) { int lines; int columns; int offset; if (!ready) {<br />

VC_HANDLE = VA_Setup(1 , "display"); /* VC project name */ if (VC_HANDLE) ready = 1; } if (ready) {<br />

if (!VA_Saccess(1,VC_HANDLE)) { VA_GetTouchAction (1,VC_HANDLE,&touch); VA_Srelease(1,VC_HANDLE);<br />

x_position = touch.x + 1; y_position = touch.y + 1; touch_status = touch.status; if(touch_status ==<br />

2) /* Nothing pressed */ memset(KeyMatrix,0,T_SIZE); else { /* Columns */ columns = (x_position /<br />

40); /* Lines */ lines = (y_position / 40); offset = (columns + (lines*16)); /* Since 16 columns per<br />

line (640/40)*/ if(offset < T_SIZE) KeyMatrix[offset] = 1; /* Current touch field */ else<br />

memset(KeyMatrix,0,T_SIZE); /* Error */ } } } }<br />

Tip:<br />

This new VISAPI function permits an exact pixel evaluation of the pressed coordinates.<br />

4.14.2.2 Calculating the Key Matrix 447


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

448 4.14.2.2 Calculating the Key Matrix

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

Saved successfully!

Ooh no, something went wrong!