P288(En)_SYS600_92_Visual_SCIL_27032014

October 6, 2017 | Author: Thirumal | Category: Parameter (Computer Programming), Scada, System Software, Computer Engineering, Computing
Share Embed Donate


Short Description

manual for sas...

Description

MicroSCADA

P288 Visual SCIL

ABB Oy Substation Automation Products NAME

RESP.DEPT.

PREPARED

Visual SCIL

FISUB/RAE

27.08.2007 H.H.

COURSE ID

LANGUAGE

CHECKED

P288

En

05.09.2007 R.K.

REVISION

APPROVED

A

05.09.2007 M.M.

 ABB Oy P288 EN 1MRS751495-MTR

 

Table of Contents 1

General Information

2

Introduction

3

Designing Dialog Systems

4

Programming Dialog Systems

5

Dialog Editor

6

Container Group Objetcs

7

Other Dialog Items

8

Using Dialogs in MicroSCADA

8

Exercises

9

Appendix – Image Editor

 

Contents of Chapter 1 1 General Information 1.1 Course Schedule 1.2 Notice 1.3 Definitions and Abbreviations 1.4 Course Presentation 1.5 Feedback Form

Course Schedule Day 1 9:00

Introduction Designing Dialog Systems Programming Dialog Systems Dialog Editor Exercise 1

11:45

Lunch

13:00

Container Group Items Exercise 2 Other Dialog Items Exercise 3 and 4

16:00

Day ends

Day 2 9:00

Exercises 5 – 7

11:45

Lunch

13:00

Using Dialogs in MicroSCADA Exercise 8 and 9

16:00

Course ends

Notice

These documents have been assembled and produced for educational purposes. The contents of your course binder will not be updated to include future amendments. We appreciate your comments on our course documents. On the basis of practical experience and your feedback we can improve our courses in the future. The information in this document is subject to change without notice and should not be construed as a commitment by ABB. ABB assumes no responsibility for any errors that may appear in this document. This document and parts thereof must not be reproduced or copied without ABB’s written permission, and the contents thereof must not be imparted to a third party nor be used for any unauthorized purpose. Participation in a course is not only passive receiving of information but it requires activity on your part. Our courses contain several practical exercises. Make use of these opportunities to test and acquire familiarity with the equipment and aids used. As a user of our training equipment, you must follow carefully the instructions given during the course. In no event shall ABB be liable for direct, indirect, special, incidental or consequential damages of any nature arising from the use of this document, nor shall ABB be liable for incidental or consequential damages arising from the use of any software or hardware described in this document. With best wishes for a rewarding course. ABB Oy Substation Automation Products Training Team

Copyright © ABB Oy Substation Automation Products

Definitions and Abbrevations The following concepts and abbreviations appear in the course material. CAP 501

Relay Setting Tool Package

CAP 505

Relay Configuration and Setting Tools Package

COM 500

COM 500 communication server (gateway)

DCP-NET

Communication card with own processor, memory and communicaton software

DDE

Dynamic Data Exchange

DMS

Distribution Management System

DTU

Disconnector Terminal Unit for remotely controllable disconnector substations

EDM

Energy Data Management System

FA

Feeder Automation

HMI

Human-machine interface. The front panel of the relay

IT

Information Technology

LAN

Local Area Network

LIB 500

Standard Application Library, platform supporting the process-specific LIB 5xx packages

LIB 510

Standard Application Library for medium voltage level

LMS

Load Management System

LNT 505

LON Network Tool for installing and configuring devices to the LonWorks network

LON

Local Operating Network

MicroSCADA

The name of the technology used in most of the System and Engineering products by ABB Oy Distribution Automation, “common denominator” in the software kernel

MMC

Man-machine communication

MV

Medium voltage

NCS

Network Control System

NET

Communication unit which can be either software running on the operating system or software running on a separate communication card

ODBC

Open Database Connectivity

OLE

Object Linking and Embedding

OPC

OLE for Process Control is an industry standard based on the OLE/COM/DCOM technology of Microsoft Inc. The standard creates a common interface for communication between various devices controlling technological processes

PCLTA

PC LonTalk Adapter card which functions as a LonWorks network interface card for a PC

PC-NET

Communication software running on the Windows operating system

PLC

Programmable Logic Controller

RAS

Remote Access Service

RED

A relay product family provided by ABB Oy, Distribution Automation

REF 543

Feeder terminal for the protection, control, measurement and supervision of medium voltage networks

RTU

Remote Terminal Unit

SA

Substation Automation System

SCADA

Supervisory control and data acquisition system

SCIL

Supervisory Control Implementation Language

SM

On-Line Substation Monitoring

SMS

Substation Monitoring System

SPA

Strömberg Protection Acquisition. Communication protocol developed for SPACOM relays

SPACOM

A relay product family provided by ABB Oy, Distribution Automation

SRIO

SRIO 500M/1000M is a data communication and reporting unit for the SPACOM system. The task of the SRIO unit is to form the master unit of the SPA bus and connect the SPACOM system to a host computer

SYS 500

SYS 500 System Server is a system product based on the MicroSCADA technology. The system server contains data acquisition, supervising and controlling functions

TCP/IP

Transmission Control Protocol/Internet Protocol

Visual SCIL

The method for designing and programming user interface dialogs with Visual SCIL objects and commands is named “Visual SCIL”

Course Presentation The aim of the course is to familiarize the participants with the SCIL syntax and basic programming techniques. Objectives

Prerequisites

After this course the participant will be able to:

Basic knowledge of MicroSCADA and programming techniques.

 

use SCIL in object handling and calculations write simple programs in SCIL

Topics  

Participant profile System engineers, maintenance engineers and persons who edit, build or maintain MicroSCADA systems.

  

SCIL programming environment SCIL commands and functions Data types and objects Variables and expressions Programming exercises

Contents of Chapter 2 2 Introduction 2.1 What is Visual SCIL? 2.2 What can you do with Visual SCIL 2.3 Visual SCIL Objects 2.4 Dialog Systems 2.5 Handling Visual SCIL Objects 2.6 Visual SCIL Related Manuals

Introduction 2.1 What is Visual SCIL? 

Visual SCIL Dialogs provide powerful means of creating various dialogs and applications composed of for example menus, buttons, lists, check boxes, graphs and tables.

ABB Oy, P288(En), 1 1MR751 495-MTR

Visual SCIL

Introduction 2.2 What can you do with Visual SCIL?

ABB Oy, P288(En), 2 1MR751 495-MTR



Generally Visual SCIL dialogs are used for: 

different types of tools



operator dialogs



lists and textual reports



tables



Process displays and pictures are more suitable for process illustrations that require dynamic graphical behavior.



Visual SCIL Dialogs can be used together with both process displays and pictures.

Introduction 2.3 Visual SCIL Objects 

In SCIL, the dialogs and dialog items are handled as what is called Visual SCIL objects.



There are approximately 40 types of Visual SCIL object types grouped into the following main types: 

Container group objects (dialogs, containers, picture containers, menus, notebooks and notebook pages)



Other dialog items (buttons, texts, labels, lists, etc)

Images

ABB Oy, P288(En), 3 1MR751 495-MTR



Introduction 2.4 Dialog Systems 

A dialog system starts with a main dialog or a picture container.



The main dialog and all dialogs opened from it, or from items included, belong to the same dialog system.



Each dialog system has its own SCIL context.

MAIN DIALOG DIALOG

DIALOG

DIALOG

ABB Oy, P288(En), 4 1MR751 495-MTR

DIALOG

DIALOG

DIALOG

DIALOG

DIALOG

Introduction 2.5 Handling Visual SCIL Objects Each Visual SCIL object (dialog, dialog item, image) has an object name used for referencing the object in SCIL.



The features of the dialog and the dialog items are accessed as attributes and predefined methods.



The attributes can be changed dynamically with the SCIL command .SET.



Object features can also be affected by executing predefined methods.

ABB Oy, P288(En), 5 1MR751 495-MTR



Introduction

ABB Oy, P288(En), 6 1MR751 495-MTR

2.6 Visual SCIL Related Manuals 

There are also manuals dealing with Visual SCIL programming, Visual SCIL Application Design and Visual SCIL Objects



The SYS 600 Programming Language SCIL manual is also useful when dealing with Visual SCIL

Contents of Chapter 3 3 Designing Dialog Systems 3.1 Storing Objects 3.2 Designing Dialogs 3.3 Composing Dialog Systems 3.4 Object Hierarchy 3.5 Coordinate System

Designing Dialog Systems 3.1 Storing Objects All types of objects can be stored in files (.VSO) and one file can contain several object definitions.



Normally a dialog is created, with contained dialog items, and stored in a file.



Objects in the Dialog Editor and in files are identified with Visual SCIL object names.

ABB Oy, P288(En), 1 1MR751 495-MTR



Designing Dialog Systems 3.1 Storing Objects Creating a Visual SCIL object in the Dialog Editor Dialog Editor Creating a new object

Open existing file or create new

Choose object type

Editing a object Choose object

Define the object and contained objects

Save file

Dialogs, Images, Containers, Menus, Notebooks, etc.

ABB Oy, P288(En), 2 1MR751 495-MTR

LOAD DIALOG SYSTEM

Visual SCIL object file – Visual SCIL object definitions

Designing Dialog Systems 3.2 Designing Dialogs 

A dialog may contain several dialog items, which in turn may contain dialog items. 

Main Dialogs, Dialogs, Containers and Notebook Pages can contain any types of dialog items.



Menu Bars can contain Menus, which in turn can contain Menu Items.

By setting attributes of Visual SCIL objects , the dialog items can be hidden and shown as well as disabled and enabled during run-time.



Dialog items can also be loaded into a dialog and deleted from a dialog during operation using SCIL commands.

ABB Oy, P288(En), 3 1MR751 495-MTR



Designing Dialog Systems 3.2 Designing Dialogs Dialog Main Dialog

Possibilities to arrange dialog items within a dialog

ABB Oy, P288(En), 4 1MR751 495-MTR

Menu bar Menu Menu Item

Note book Note book pages

Container

Other dialog items

Picture container Picture

Designing Dialog Systems 3.3 Composing Dialog Systems 

A dialog systems begins with a Main Dialog or a Picture Container. 

The difference between main dialogs and dialogs is that when a dialog is used its attributes can be read from its parent object.



All objects within the same dialog system have their variables in common.



Visual SCIL objects and attributes are accessed by all objects within the same dialog system.

Dialog

ABB Oy, P288(En), 5 1MR751 495-MTR

Main Dialog Dialog

Designing Dialog Systems 3.4 Object Hierarchy 

A dialog and the dialog items contained in it form a hierarchical structure.

ROOT VS_CONTAINER

VS_BUTTON

VS_MAIN_DIALOG

VS_CHECKBOX

CHILD ROOT / PARENT

CHILD PARENT

VS_CONTAINER

ABB Oy, P288(En), 6 1MR751 495-MTR

CHILD ROOT / PARENT

Designing Dialog Systems 3.5 Coordinate System MicroSCADA dialog coordinate system Y Dialogs, Containers, Notebook Pages

._geometry A list containing the following attributes: X Y W(idth) H(eight)

(0,0) (0,0)

ABB Oy, P288(En), 7 1MR751 495-MTR

(0,0)

(0,0)

X

 

Contents of Chapter 4 4 Programming Dialog Systems 4.1 Methods 4.2 Cyclic Methods 4.3 Event Methods 4.4 Action Methods 4.5 Help Methods 4.6 Create Method 4.7 Init Method 4.8 Delete Method 4.9 Error Handling Method 4.10

Arbitrary User Defined Methods

4.11

Attributes

4.12

Commonly Used Attributes

4.13

Handling Attributes in SCIL

4.14

Referencing Objects in SCIL

4.15

Attribute Access and Data Types

4.16

Handling Methods in SCIL

4.17

Language Dependent Text

Programming Dialog Systems 4.1 Methods The dialogs are programmed using a number of SCIL programs, which are called Methods.



Each dialog and dialog item has its own set of methods.



Methods can contain all SCIL elements, except the picture handling commands (commands starting with !).



The methods are, except for some predefined and preprogrammed methods, SCIL programs.

ABB Oy, P288(En), 1 1MR751 495-MTR



Programming Dialog Systems

ABB Oy, P288(En), 2 1MR751 495-MTR

4.2 Cyclic Method 

Each dialog and dialog item may have a number of methods executed cyclically at a user-specific interval (cycle time).



The cycle time is defined in seconds.



One object can have several cyclic methods with different cycle times.



The cyclic methods are executed the first time the object is loaded, after a possible create method and then cyclically until the object is deleted.

Programming Dialog Systems 4.3 Event Method 

Each object can have a number of event methods started at the activation of given event objects.



The activating object is specified by entering the event object notation in the method defined.

Event Method is executed

ABB Oy, P288(En), 3 1MR751 495-MTR

TUTBAY_B1:P10

Programming Dialog Systems

ABB Oy, P288(En), 4 1MR751 495-MTR

4.4 Action Method 

Action Methods are activated by certain user actions, such as clicking a button, dragging a scroll bar, entering data, etc.



The action methods have predefined names and activating operator actions, which are object type specific.

#if PARENT\btn_Ok._enabled==TRUE #then.set PARENT\btn_Ok._enabled=FALSE #else.set PARENT\btn_Ok._enabled=TRUE NOTIFY method

Programming Dialog Systems 4.5 Help Method 

The help method is executed when help is requested on the object containing the method.



Help can be requested on a specific object in one of the following ways: 

By pressing F1 while the object has focus



From SCIL by calling the predefined method ._get_help of the object

ROOT

._get_help

PARENT

Execute Help Method for Check Box

F1

ABB Oy, P288(En), 5 1MR751 495-MTR

THIS ARGUMENT

Help Method search order

> Object Name

Programming Dialog Systems 4.6 Create Method 

The create method is executed during the creation of the object after the .LOAD command has been issued.



The create method for the child objects are executed before the parent objects.



If there are several branches of dialogs and dialog items, it is impossible to know which branch is executed first.

ABB Oy, P288(En), 6 1MR751 495-MTR

Object references should generally be avoided in create methods.

7. DIALOG

6. Group 5.

Rows

4.

Columns

3. Container 2.

Ok

1.

Cancel

Programming Dialog Systems 4.7 Init Method 

The init method is started automatically after an object and all its parent objects have been created.



The init method of the parent object is executed before the init methods of the child objects.



Since all objects have been loaded before the init methods are executed, all objects in the loaded structure can be accessed from the init method.

3.

ABB Oy, P288(En), 7 1MR751 495-MTR



1. DIALOG

2. Group Rows

4.

Columns

5. Container 6.

Ok

7.

Cancel

The create method of all loaded objects has already been executed when the init method is executed.

Programming Dialog Systems

ABB Oy, P288(En), 8 1MR751 495-MTR

4.8 Delete Method 

The delete method is executed when the object is deleted.



When several objects are deleted by deleting a common parent, the delete methods are executed in the same order as for the init method.



An object cannot be referenced after its delete method has been executed.



Delete methods parent objects can reference child objects, but the delete methods of child objects cannot contain references to parent objects.

Programming Dialog Systems 4.9 Error Handling Method 

When a SCIL error occurs in a object, and the error handling policy is CONTINUE or STOP, the error handling method is executed.



If no such method is found in the object, it is searched for in the parent object (all the way to the ROOT).



If no error handling method is found , a standard error dialog is shown.



When the error handling method is executed, it is automatically given the following six arguments:

ABB Oy, P288(En), 9 1MR751 495-MTR

STATUS SCIL status code (integer) METHOD The method where the error occurred LINE SCIL line (text) POSITION Position on the line (text) ERROR POLICY The error handling policy used when the error occurred LINE NUMBER The number of the erroneous line within METHOD

Programming Dialog Systems 4.10 Arbitrary User Defined Methods 

User defined methods may be private or public.



The public methods are accessible by all objects within the dialog system.



The private methods are accessible only within the same object and its child objects.

DIALOG Group

ABB Oy, P288(En), 10 1MR751 495-MTR

Rows

Columns

Container Ok

Cancel

Programming Dialog Systems 4.11 Attributes Each Visual SCIL object can have a number of attributes, which specify the appearance and behavior of the object.



The basic features given in the Dialog Editor serve as default when a dialog or dialog item is loaded.



Most attributes are also accessible from SCIL and can be changed dynamically.



Each object has a number of predefined, object type specific attributes.



Objects may also be given a number of user defined, object specific attributes.

ABB Oy, P288(En), 11 1MR751 495-MTR



Programming Dialog Systems 4.12 Commonly Used Attributes 

Visibility attribute 



._ENABLED

TRUE, FALSE

Position and size 

ABB Oy, P288(En), 12 1MR751 495-MTR

TRUE, FALSE

Enabled / Disabled (action methods are disabled) 



._OPEN

._GEOMETRY

(X, Y, W(idth), H(eight))

Programming Dialog Systems 4.13 Handling Attributes in SCIL 

Using attribute references, the attribute values can be read and written from SCIL.



The user-defined attributes can be given freely chosen names of up to 63 alphanumeric characters.



When an object is created, its predefined attributes are given default values.



Attributes can be assigned values with:

Attribute Reference: [object].attribute

the create command (.CREATE or .LOAD)



with .MODIFY in create and init methods



with .SET in other methods

ABB Oy, P288(En), 13 1MR751 495-MTR



Programming Dialog Systems 4.14 Referencing Objects in SCIL 

Object references are used when loading, creating and deleting objects and when referencing attributes and methods. 2. .set

MAIN cnt_Cont1

chk_Box1

PARENT

ROOT

cnt_Cont2

chk_Box2

btn_Btn1

ROOT\cnt_Cont1\chk_Box1._enabled=TRUE or .set ROOT\\chk_Box1._enabled=TRUE

btn_Btn2

1. .set

PARENT\chk_Box1._enabled=TRUE

Object Path

Attribute Attribute Value

ABB Oy, P288(En), 14 1MR751 495-MTR

THIS 1.

2.

Object Name

Programming Dialog Systems 4.15 Attribute Access and Data Types The predefined attributes are read-only, write-only or read and write access allowed.



The user defined attributes always have both read and write access.



The attributes can have any of the SCIL data types.



The data types of user-defined attributes are not fixed but they get the data type of the value assigned to them.



The data type of predefined attributes cannot be changed.

ABB Oy, P288(En), 15 1MR751 495-MTR



Programming Dialog Systems 4.16 Handling Methods in SCIL 

A method call may be used as a SCIL statement or, providing that it returns a value, as an operand in SCIL expressions.



A method is always executed in the context of the object in which it is defined.

Method Call: [object].method [(argument list)] Object

ROOT\pcn_Container._new_pic(“tutor”) THIS._move_text(1,10)

ABB Oy, P288(En), 16 1MR751 495-MTR

._set_cell_text(1,1,”text”)

an object reference. Not needed when referencing methods in the same object or one level below. Method the method name. Argument List arguments, which may be any SCIL expression.

Programming Dialog Systems 4.17 Language Dependent Text The Dialog Editor provides tools for entering text identifications and translations to one or more languages.



Text identifiers can be used in the Dialog Editor (for the ._TITLE attribute) and in SCIL.



The text references and the corresponding texts for different languages are specified in object specific text databases.



The text reference is a SCIL identifier with a maximum length of 63 characters.



The used language is defined by base system attributes and can be changed by a SCIL command and by a SCIL function.

ABB Oy, P288(En), 17 1MR751 495-MTR



Programming Dialog Systems 4.17 Language Dependent Text

Languages accordind to The ISO 639-1 standard

ABB Oy, P288(En), 18 1MR751 495-MTR

#set MON:BLA = ”EN”

#set MON:BLA = ”SV”

.set THIS._title = translate(@btn_show)

Contents of Chapter 5 5 Dialog Editor 5.1 General 5.2 Working Procedure 5.3 Geometry Management

Dialog Editor 5.1 General

ABB Oy, P288(En), 1 1MR751 495-MTR



The Dialog Editor is used to define VS (Visual SCIL) objects, such as dialogs, dialog items and images.

Test Object

Stop Test

Dialog Editor 5.2 Working Procedure 1. 2.

ABB Oy, P288(En), 2 1MR751 495-MTR

3.

4.

Dialog Editor 5.2 Working Procedure

5.

ABB Oy, P288(En), 3 1MR751 495-MTR

6.

8. 7.

Dialog Editor 5.3 Geometry Management 

The distance between different objects in various situations and the size of some dialog items are defined using connections.



Dialog items have inside and outside connections.

ABB Oy, P288(En), 4 1MR751 495-MTR



Outside connections determine the relative location of a dialog item with the border of the dialog or another dialog item.



The size and place of objects may be changed after they have been added.



The connections for dialog items are defined in the object editor of the parent object.

Dialog Editor 5.3 Geometry Management Connection Types Between Objects:

Default color Natural length connection Selected connection Error in connection

ABB Oy, P288(En), 5 1MR751 495-MTR

BLUE GREEN YELLOW RED

Natural Length The distance is always 5 points. Natural Base + Spring The distance will always be at least 5 points. Fixed Length The distance will be the same as it was at the moment of choosing a fixed connection. Fixed Base + Spring The base distance wil be at least as long as it was at the moment of choosing this connection. Locked Fixed Length The distance will always be the same as it was at the moment of choosing a fixed connection. Zero Length No distance between objects. Spring The distance will change freely when the objects are moved.

Dialog Editor 5.3 Geometry Management Connection Types Inside Objects: Natural Base Natural Base + Stretch

Natural Base + Drag Lock

Fixed Base

Fixed Base + Stretch

ABB Oy, P288(En), 6 1MR751 495-MTR

Fixed Base + Drag Lock

The distance is object dependent. The object can be enlarged freely. The minimum distance is object dependent. The connection cannot be changed without removing the lock. The minimum distance is object dependent. The distance will be the same as it was at the moment of choosing the fixed connection. Specifies the minimum length of the distance. The distance can only be changed from the value text box.

Dialog Editor

ABB Oy, P288(En), 7 1MR751 495-MTR

5.3 Geometry Management

 

Contents of Chapter 6 6 Container Group Objects 6.1 General 6.2 Order Items Page 6.3 Dialogs 6.4 Notebooks 6.5 Containers 6.6 Menus 6.7 Picture Containers 6.8 Icon View

Container Group Objects 6.1 General 

Notebooks, containers, menus and picture containers are dialog items, so they can be inserted in other objects.



Dialogs, notebooks and containers can contain all types of dialog items. There is no limit to how many levels of objects can be placed inside each other.



Notebooks, containers, menus and picture containers are added either in the Object List or in an object editor.



Dialogs can only be added in the Object List.

ABB Oy, P288(En), 1 1MR751 495-MTR



Dialogs Notebooks Containers Menus Picture Containers Icon View

Container Group Objects

ABB Oy, P288(En), 2 1MR751 495-MTR

6.2 Order Items Page 

The order items page is common to dialogs, notebooks and containers.



Items on the order items page are in the same order in which items are selected when the operator presses the TAB key.



The order of the items can be changed by selecting the row and holding both the left and the right mouse button down while dragging the row to a new position.



The list includes the dialog item type, its name and title.

Container Group Objects 6.3 Dialogs 

Dialogs are used when dialog boxes, which are windows appearing independently on the screen, are needed.



There are two types of dialogs, main dialogs and dialogs. 

Dialogs are edited in the Dialog Object Editor.

ABB Oy, P288(En), 3 1MR751 495-MTR



The types differ in the way variables can be read from other dialogs.

Container Group Objects 6.3 Dialogs Border

ABB Oy, P288(En), 4 1MR751 495-MTR

is selected by default. The dialog is outlined with a border. Maximizable is selected by default. The dialog can be enlarged to fill the whole screen. Iconifiable is selected by default. The dialog can be minimized to an icon. Modal is not selected by default. When it is selected, the dialog box is the only active window in the application. A user must respond or perform some actions in the dialog to change the focus. Resizable is selected by default. The user can resize the dialog. Movable is selected by default. When it is selected, the user can move the dialog on screen. Unclosable is not selected by default. The user cannot close the dialog by clicking the Close button (X button) in the title bar of the dialog.

Container Group Objects 6.4 Notebooks 

Notebooks are often used to group dialog items that are in some way related to each other. 

There might be that many dialog items in a notebook, that there would not be enough space for them in a container.

A notebook usually contains several pages, which all have a tab to enter the page.



The only page in the notebook object editor that differs from other object editors is the Notebook page where notebook pages are added.

ABB Oy, P288(En), 5 1MR751 495-MTR



Container Group Objects

ABB Oy, P288(En), 6 1MR751 495-MTR

6.4 Notebooks

Container Group Objects 6.4 Notebooks Specifies if the notebook pages should have tabs. Specifies the side of the notebook where the tab set should appear. Folio Specifies whether or not to show the folio. The folio shows the page number at the bottom of the notebook pages. Folio Justification Specifies the justification of the page number at the bottom of the notebook pages. Page Buttons Specifies whether or not to show the page buttons. Pages Wrap Specifies should the first page of the notebook be selected after the last one while moving to the right. Tab Style Specifies the default border style of a tab. Vertical Tabs Specifies whether or not to show vertical tabs. Tab Buttons Centred Determines if the buttons to scroll the tabs are to be centred in the tab set rectangle or aligned with the inside border. Tab Buttons Placement Determines where the buttons to scroll the tabs are displayed. Allow Partial Tabs Specifies whether or not to show the tabs that are partially visible in a tab set.

ABB Oy, P288(En), 7 1MR751 495-MTR

Tabs Tab Side

Container Group Objects

ABB Oy, P288(En), 8 1MR751 495-MTR

6.5 Containers 

Containers are mainly used to group dialog items that are in some way related to each other.



The containers can contain all types of dialog items.



To insert scroll bars for the container, select the Horizontal Scroll Bar or Vertical Scroll Bar options.



If the Flat Keyboard Traversal option is selected, the user can use the TAB key to move between items in the container and other dialog items.

Container Group Objects 6.6 Menus 

The menus provide a fast way for the user to issue commands.



There are three object types for menus: Menu bar (VS_MENUBAR)



Menus (VS_MENU)



Menu items (VS_MENU_ITEM, VS_SEPARATOR_MENU_ITEM, VS_SUB_MENU_ITEM, VS_TOGGLE_MENU_ITEM)

A menu bar usually contains several menus, which in turn may contain several menu items.

ABB Oy, P288(En), 9 1MR751 495-MTR





Container Group Objects

ABB Oy, P288(En), 10 1MR751 495-MTR

6.6 Menus

Container Group Objects 6.7 Picture Containers A picture container is a container used for conventional MicroSCADA pictures built with the Picture Editor (classic monitor).



The upper left corner of the picture will be placed in the upper left corner of the container.



If the picture is bigger than the picture container, the user can use scroll bars to move around the picture.



A picture is inserted in the picture container using the picture handling methods.

ABB Oy, P288(En), 11 1MR751 495-MTR



Container Group Objects

ABB Oy, P288(En), 12 1MR751 495-MTR

6.8 Icon View 

Icon view object is used for displaying icons.



Icons are created with the SCIL Image Editor.



The predefined method ._APPEND is used for appending icons to the icon view.

 

Contents of Chapter 7 7 Other Dialog Items 7.1 Label 7.2 List 7.3 Text 7.4 Buttons 7.5 Check Box 7.6 Option Button 7.7 Combo and Combo Popdown 7.8 Numeric Spinner 7.9 Text Spinner 7.10

Scroll Bar and Slider

7.11

Box and Line

7.12

Tree

7.13

Graph

Other Dialog Items 7.1 Label 

A label is a static field, where the user cannot make changes. 

Changes can however be made during run-time by setting the ._title attribute.

It is usually used to name another dialog item.



The text to be shown to the user is written in the Title text box.

ABB Oy, P288(En), 1 1MR751 495-MTR



Other Dialog Items

ABB Oy, P288(En), 2 1MR751 495-MTR

7.2 List 

A list displays items organized into rows and columns.



The list object editor is used to define the appearance of the list.



The String List page of the list object editor can be used to insert and remove rows and columns into a list.



Usually rows, columns, texts or other characters are set with SCIL.

Other Dialog Items 7.2 List 

The Natural Number of Rows and AutoCalculate Column Widths options can be used to determine the size of a naturally sized list.



The default column width is the same as the width of the list.



There are four selection method choices: None – No cell from the list can be selected.



Only One – No more than one cell can be selected form the list.



Free – Any cell or combination of cells can be selected.



Rectangular – The selection is always a rectangle of cells.

ABB Oy, P288(En), 3 1MR751 495-MTR



Other Dialog Items

ABB Oy, P288(En), 4 1MR751 495-MTR

7.3 Text 

In a Text Box the user can insert and edit text.



The Auto-Scroll function is selected by default and should normally not be changed.



The Text Object Editor contains a simple text editor with a text box and various features to specify the text properties.

Other Dialog Items 7.4 Buttons When a button is clicked an action according to the NOTIFY method is performed.



If a button is naturally sized, it automatically adjusts its size to the title text.



A collection of buttons is called a palette (VS_PALETTE).



A palette consists of palette items on which icons can be placed to represent the object action.



Icons can be added with the Image Editor or by using SCIL.

ABB Oy, P288(En), 5 1MR751 495-MTR



Other Dialog Items

ABB Oy, P288(En), 6 1MR751 495-MTR

7.4 Buttons 

The palette items are inserted from New Item in the Palette menu.



The names in the list are only used in the palette object editor.



When double clicking on an item the Image Editor for the item in question will be opened.



The ._selected_button_index attribute is used to determine which button was clicked in the palette.

Other Dialog Items 7.5 Check Box The user can select or unselect a check box.



A check box can have the value on and off (check / un-check).



The default value for the check box can be defined in the Value field on the Check Box page in the Check Box object editor.



The check box has a NOTIFY method which can be used to perform an action when the value changes.

ABB Oy, P288(En), 7 1MR751 495-MTR



Other Dialog Items 7.6 Option Button 

Option buttons (radio buttons) can be used for selecting one of several options.



The option buttons are not grouped automatically, the grouping is done using SCIL programs.



The ._value attribute defines the state of the option button (1=on, 0=off).

ABB Oy, P288(En), 8 1MR751 495-MTR

;NOTIFY method .set ROOT\opt_Red._value=0 .set ROOT\opt_Green._value=0 .set ROOT\opt_Blue._value=1

Other Dialog Items 7.7 Combo and Combo Popdown 

A combo box is a list of texts that the user can choose from.



The difference between combo and combo popdown is a drop-down list box.



The user can either type the selection (if modifiable) in the box or select an option from the list.



The contents of the combo boxes can be inserted with the combo box object editor or with SCIL.

ABB Oy, P288(En), 9 1MR751 495-MTR

;Append string to Combo Box .set THIS._append_text=”Command Procedure”

._get_text_at(4)

Other Dialog Items 7.7 Combo and Combo Popdown

ABB Oy, P288(En), 10 1MR751 495-MTR

._text



The behavior of the Combo Box is determined at the bottom of the Combobox page.



Modifiable means that the user can enter text in the combo box.



When Auto-sort is used the entries are automatically sorted in alphabetical order.

Other Dialog Items 7.8 Numeric Spinner 

A numeric spinner allows a user to enter values to define a range.



The user enters the value selecting the number from the list or by typing it in the box.

-10

max

ABB Oy, P288(En), 11 1MR751 495-MTR

Wrap

Other Dialog Items 7.9 Text Spinner 

A text spinner allows a user to enter text from a defined range.



The user can enter a string by selecting it from the list or by typing it in the text box.

ABB Oy, P288(En), 12 1MR751 495-MTR

Sort text entries in alphabetical order. Same as with the Numeric Spinner.

Other Dialog Items 7.10 Scroll Bar and Slider Value

Value

Max

Max

Min

ABB Oy, P288(En), 13 1MR751 495-MTR

Min

Other Dialog Items

ABB Oy, P288(En), 14 1MR751 495-MTR

7.11 Box and Line 

A box can be used to group functionally related items (not a container group item though) or to improve the appearance of the dialog.



A box can also be used to accommodate an image.



The line dialog item is used to place horizontal or vertical lines into a dialog.

Other Dialog Items 7.12 Tree 

The tree is used to display hierarchical data.



From the tree the user can select and open different new objects, which are called nodes and leaves.



The box where the tree is drawn is added with the tree object editor, but the tree itself is created with SCIL.



Action methods are needed to define the behavior of the tree.

ABB Oy, P288(En), 15 1MR751 495-MTR

Root node Node

_add_root_node _add_node _add_leaf

Leafs

Other Dialog Items 7.13 Graph

ABB Oy, P288(En), 16 1MR751 495-MTR



The Visual SCIL graph is capable of visually displaying numerical data in different types of diagrams: 

Plotted graph (line)



Area graph



Bar graph



Stacked bar graph



Pie graph



The data that is displayed in the graph is called a dataset.



One graph can display several datasets.



Vertical hairlines for determining the intersection points with the datasets can be added to the graph.

 

Contents of Chapter 8 8 Using Dialogs in MicroSCADA 8.1 General 8.2 Opening Dialogs from Displays 8.3 Creating an Icon in the Tool Manager 8.4 Opening Dialogs from Pictures

Using Dialogs in MicroSCADA 8.1 General There are basically four different ways in which dialogs can be used in MicroSCADA: 

from the Dialog Editor



from a Display



from the Tool Manager



from a Picture (classic monitor)

ABB Oy, P288(En), 1 1MR751 495-MTR



Using Dialogs in MicroSCADA 8.2 Opening Dialogs from Displays 1)

Open the Palette in the Display Builder (Window → Show Palette...)

2)

Insert any symbol from the palette (eg. Rectangle.sd)

ABB Oy, P288(En), 2 1MR751 495-MTR

3)

Right click on the symbol and select Tool Launcher... From the menu

Using Dialogs in MicroSCADA 8.2 Opening Dialogs from Displays 4)

In the Tool Launcher Settings select Open Visual SCIL dialog (1), set the name of the VSO file (2) and give the VS object name (3) of the starting object (usually MAIN)

5)

Save the display and test it (click on the symbol)

2. 1.

ABB Oy, P288(En), 3 1MR751 495-MTR

3.

Using Dialogs in MicroSCADA

ABB Oy, P288(En), 4 1MR751 495-MTR

8.3 Creating an Icon in the Tool Manager 1)

Select a page in the Tool Manager and press the Add Tool button

2)

From the Add Tool dialog select User Defined...

Using Dialogs in MicroSCADA 8.3 Creating an Icon in the Tool Manager 3)

Select a VSO file by pressing the Browse VSO... Button and enter a description for the icon

ABB Oy, P288(En), 5 1MR751 495-MTR

Default settings can be used if the main dialog is named MAIN and the icon named PRODUCT_ICON_M

The _open attribute for the main dialog must be set to TRUE

Using Dialogs in MicroSCADA 8.4 Opening Dialogs from Pictures 

Visual SCIL Dialogs (and other objects) can be opened from pictures (classic monitor) using the SCIL command .LOAD

ABB Oy, P288(En), 6 1MR751 495-MTR

.LOAD object = type( file , name [, attribute = value]*)

Contents of Chapter 9 9 Exercises 9.1 Exercise 1 9.2 Exercise 2 9.3 Exercise 3 9.4 Exercise 4 9.5 Exercise 5 9.6 Exercise 6 9.7 Exercise 7 9.8 Exercise 8 – Extra 9.9 Exercise 9 – Extra

Exercises

1

Exercise 1 Create a main dialog with the following features.

A button which terminates the dialog when pressed.

ABB Oy, P288(En), 1 1MR751 495-MTR

The title text on the button is language dependent.

Exercises Exercise 1

1)

ABB Oy, P288(En), 2 1MR751 495-MTR

2)

Open the Visual SCIL Dialog Editor and select Empty File from the File > New menu. Add a VS_MAIN_DIALOG to the Object List from the Object > New menu.

Exercises Exercise 1

3. 4. ABB Oy, P288(En), 3 1MR751 495-MTR

5.

Highlight the object in the Object List and select the Edit function from the Object menu. Add a VS_BUTTON object to the main dialog by selecting VS_BUTTON from the Dialog > New Item menu. Highlight the button and select Edit Item from the Dialog menu.

Exercises Exercise 1 The name of the Visual SCIL object: See Programming Language SCIL for object and variable naming conventions. The @-sign in front of the title indicates that the title will be retrieved from the text translation data base.

ABB Oy, P288(En), 4 1MR751 495-MTR

The Notify method in the button is executed each time the buttons is pressed. By deleting the root object (in this case the main dialog) the dialog will be terminated.

.delete ROOT

Exercises Exercise 1

6) 7) 8)

Select New Text ID from the Texts menu on the Texts page of the button. Write the name of the button title variable in the text properties dialog (without the @-sign). Write the titles for the different languages in the language fields for the text id in question.

The language used is determined by the value of the following object attributes: APLn:BLA MONn:BLA (overrides the APLn:BLA value)

ABB Oy, P288(En), 5 1MR751 495-MTR

The languages are expressed with a two letter notification (ISO 639-1).

Exercises Exercise 1 The dialogs are tested according to the following procedure:

10)

ABB Oy, P288(En), 6 1MR751 495-MTR

11)

Save the Object List by selecting Save from the File menu. Press the Test Button (marked with an exclamation mark) in the Visual SCIL Dialog Editor.

Exercises Exercise 1

EXTRA

ABB Oy, P288(En), 7 1MR751 495-MTR

Add a second language to the Text Translation Database for the button.

Exercises

2

Exercise 2 Add the following features to the main dialog edited in the previous exercise.

ABB Oy, P288(En), 8 1MR751 495-MTR

A menu bar with two menus: File and Help

Product Icon

An About dialog which contains information about the program.

Exercises Exercise 2 1) 2) 3)

1. 2. 1. ABB Oy, P288(En), 9 1MR751 495-MTR

3.

3.

1.

1. 2. 3.

Contiunue on the main dialog from the previous exercise. Insert a VS_MENUBAR on the main dialog from the Dialog > New Item menu. Highlight the menubar and open the geometry management from the Windows > Connection menu (set the geometry according to the values below).

Natural Base: No Fixed Base: Yes Value: 0 Stretch: No Natural Base: Yes Fixed Base: No Value: Stretch: No Natural Base: No Fixed Base: Yes Value: 0 Stretch: Yes

Exercises Exercise 2 4) 5) 6) 7) 8) 9)

2x

Activate the menubar editor. Name the menubar mnb_Main. Select the Menu Bar page Add two new menus to the menubar (Menubar > New Menu). Double-click the first menu to edit it. Name the menu mnu_File and enter the title variable (@mnu_File)

10)

ABB Oy, P288(En), 10 1MR751 495-MTR

11)

Close the menu editor and edit the second menu in the menu bar editor. Name the menu mnu_Help and enter the title variable (@mnu_Help)

Exercises Exercise 2 12) 13) 14) 15)

Activate the mnu_File editor. Add a new menu item to the file menu (Menu > New). Name the menu item mni_Close and enter the title variable (@mni_Close). Click the Methods button and add the line below to the Notify method.

ABB Oy, P288(En), 11 1MR751 495-MTR

ROOT.On_Exit

Exercises Exercise 2 16) 17) 18) 19)

Activate the mnu_Help editor. Add a new menu item to the file menu (Menu > New). Name the menu item mni_About and enter the title variable (@mni_About). Click the Methods button and add the line below to the Notify method using the Insert SCIL Commands, Functions & Objects dialog (Visual SCIL samples > Loading About Dialog).

.load dlg_About = vs_dialog(ROOT.t_About_File, "MAIN")

ABB Oy, P288(En), 12 1MR751 495-MTR

LBL_PRODUCT_DESCRIPTION

20)

Add the Text IDs for the menus and menu items in the VS_MENUBAR and in the VS_MAIN_DIALOG.

Exercises Exercise 2 21)

Add the following programs in the methods described below (the programs can be found in the Insert SCIL Commands, Functions & Objects).

VS_MAIN_DIALOG Init method .modify THIS = list(product_id product_description product_version product_vendor t_About_File

= = = = =

"O217 Visual SCIL",translate("@LBL_PRODUCT_DESCRIPTION"),"1.0","ABB Oy Substation Automation","Sys_Tool/About.vso")

.set ._title = .Return_Dialog_Title .load product_icon_m = vs_image(._source_file_name, "product_icon_m")

Create a public method in the VS_MAIN_DIALOG with the name Return_Dialog_Title ABB Oy, P288(En), 13 1MR751 495-MTR

#if MON:BEX == "SYS" #then #return APL:BNA + " [" + dec(MON:BAN, 0) + "] - " + ROOT.product_description #else #return APL:BNA + " - " + ROOT.product_description

Exercises Exercise 2 22)

Close the main dialog editor, insert a new VS_IMAGE to the object list and name it Product_Icon_M.

23)

ABB Oy, P288(En), 14 1MR751 495-MTR

24)

Set the image size (Image > Set Size ...) to 32 x 32 and draw (write) an icon in the The white area in the transparency Image Editor. windows will be transparent Copy the entire image and paste it in when the image is displayed. the transparency area which is opened from the Options > Create Transparency menu.

Exercises Exercise 2 25) .delete ROOT

26) ROOT.On_Exit

27) 28)

Change the NOTIFY method for the btn_Close button. Create a private method (On_Exit) in the main dialog editor. Write the SCIL program shown below in the SCIL editor for the On_Exit method. Write the SCIL line below in the CLOSE_ NOTIFY method for the main dialog.

ROOT.On_Exit .set ROOT._open=FALSE .delete ROOT ABB Oy, P288(En), 15 1MR751 495-MTR

The CLOSE_NOTIFY method is executed before the dialog is terminated.

Exercises

3

Exercise 3 Add the following features to the main dialog and create a new VS_DIALOG (dlg_Setup) in the object list.

A check box that disables the Dialog button. A check box that hides the Dialog button.

ABB Oy, P288(En), 16 1MR751 495-MTR

A button that opens a dialog. A modal dialog which is closed from the OK button.

Exercises Exercise 3

Create a new VS_DIALOG to the object list and name it dlg_Setup. Set these three attributes. Modal means that the parent object of the dialog cannot be accessed until the dialog is closed.

ABB Oy, P288(En), 17 1MR751 495-MTR

The dialog is the parent object of the button. The main dialog is the root object. PARENT.On_Exit

Name: btn_OK Title: @btn_OK (OK)

Exercises Exercise 3 Create a private method (On_Exit) in the VS_DIALOG (dlg_Setup) .set THIS._open=FALSE .delete THIS

ABB Oy, P288(En), 18 1MR751 495-MTR

THIS.On_Exit

Write these two lines in the private method.

Write this line in the CLOSE_NOTIFY method for the VS_DIALOG (dlg_Setup).

Exercises Exercise 3 Close the dialog editor and Activate the main dialog editor (Main).

Name: chk_Disable Title: @chk_Disable (Disable Dialog) Name: chk_Hide Title: @chk_Hide (Hide Setup)

Notify methods

#if THIS._value==1 #then .set ROOT\btn_Dialog._enabled=FALSE #else .set ROOT\btn_Dialog._enabled=TRUE #if THIS._value==1 #then .set ROOT\btn_Dialog._visible=FALSE #else .set ROOT\btn_Dialog._visible=TRUE

ABB Oy, P288(En), 19 1MR751 495-MTR

Name: btn_Dialog Title: @btn_Dialog (Dialog)

ROOT.On_Open_Dialog

Main Dialog Private method: On_Open_Dialog #error ignore .load dlg_Setup = VS_DIALOG(._source_file_name,"dlg_Setup",_open=TRUE) #error stop

Exercises EXTRA

Exercise 3

Add a menu item to the File menu that opens the Setup dialog. Also add a separator menu item between the two menu items in the File menu.

ABB Oy, P288(En), 20 1MR751 495-MTR

The Dialog menu item is disabled when the Disable Dialog check box is checked.

Exercises

4

Exercise 4 Add the following features to the main dialog edited in the previous exercise.

ABB Oy, P288(En), 21 1MR751 495-MTR

The dialog geometry is saved when the main dialog is deleted. When the dialog is opened again it will have the same geometry settings that it had when it was closed.

Exercises Exercise 4

Add the private method Read_Parameter to the main dialog (Main).

; Function: Get_Parameter(t_Keyword, t_Default), t ; Parameters: t_Keyword, the parameter ; t_Default, the default value, if parameter not found ; Description: Reads a parameter from the parameter file ; --------------------------------------------------------------------------------#error ignore @i_S = status @l_Return = read_parameter(.t_Parameter_File, .t_Parameter_Section, argument(1)) @i_S = status #error stop

ABB Oy, P288(En), 22 1MR751 495-MTR

#if %i_S == 0 #then @i_Status = l_Return:VSTATUS #else @i_Status = %i_S #if %i_Status == 0 #then #return l_Return:VVALUE #else #return argument(2)

Exercises Exercise 4

Add the private method Save_Parameter to the main dialog (Main).

; Function: Set_Parameter(t_Keyword, t_Value), i ; Parameters: t_Keyword, the parameter ; t_Value, the value ; Description: Writes a parameter into the parameter file ; ------------------------------------------------------------------------#error continue @i_S = status @l_Return = write_parameter(.t_Parameter_File, .t_Parameter_Section, argument(1), argument(2)) @i_S = status #error stop

ABB Oy, P288(En), 23 1MR751 495-MTR

#if %i_S == 0 #then @i_Status = l_Return:VSTATUS #else @i_Status = %i_S #return %i_Status

Exercises Exercise 4 Add the following three sections to the main dialog (Main) Init program.

1. Sections 1 – 3 listed on the next page.

ABB Oy, P288(En), 24 1MR751 495-MTR

2. 3.

Exercises Exercise 4

1. 2. 3.

@l_File_Name=fm_split_name(fm_represent(fm_extract(fm_file(._source_file_name),"LAST"))) @t_File_Id=l_File_Name:vName t_Parameter_File = "'t_file_id'.ini",t_Parameter_Section = "General",t_Default_Geometry = "list(X=100,Y=010,W=200,H=170)",.set THIS._geometry=evaluate(.Read_Parameter("Geometry",.t_Default_Geometry))

Add the following lines to the main dialog (Main) Delete program.

The geometry settings are stored in a file named .INI

ABB Oy, P288(En), 25 1MR751 495-MTR

@v_Geo = dump(THIS._geometry) .Save_Parameter("Geometry",%v_Geo(1))

Exercises

ABB Oy, P288(En), 26 1MR751 495-MTR

5

Exercise 5 Add the following features to the dialog (dlg_Setup) created in the exercise 3.

A VS_TEXT_EDITOR is added to the dialog. Also two buttons are added for opening and saving the contents in the text editor. Predefined dialogs (File Choosers) for defining the open and save names are used.

Exercises Exercise 5 1. Insert a VS_TEXT_EDITOR to the dialog. 2. Add the following two program sections to the dialog Init method.

.modify THIS = list(t_File_Chooser_File = "Sys_Tool/FileSel.vso",b_File_Chooser_Loaded = FALSE) #if not .b_File_Chooser_Loaded #then #block

ABB Oy, P288(En), 27 1MR751 495-MTR

Name: txe_Editor Title:

.load mdl_File_Chooser = vs_main_dialog(.t_File_Chooser_File, "MAIN") mdl_File_Chooser.Set_Path_Selection(("SC", "APL", "PATH")) mdl_File_Chooser.Create_Filter("*.txt", translate("@LBL_TEXT_FILES")) mdl_File_Chooser.Create_Filter("*.txt", translate("@LBL_TEXT_FILES")) mdl_File_Chooser.Select_Filter("*.txt") .set .b_File_Chooser_Loaded = TRUE #block_end

Exercises Exercise 5 3. Add the public method Notify_File_Chooser to the dialog (dlg_Setup). @l_File_Attr=argument(1) #if (l_File_Attr:Vt_event=="APPLY") and (%t_Action=="OPEN") #then.set THIS\txe_Editor._text_vector=read_text(l_File_Attr:Vt_absolute_full_path) #if (l_File_Attr:Vt_event=="APPLY") and (%t_Action=="SAVE") #then@i_Status=write_text(l_File_Attr:Vt_absolute_full_path,THIS\txe_Editor._text_vector,0) .set mdl_File_Chooser._open=FALSE

If the file chooser is used for opening a file the file contents will be opened to the text editor. If the file chooser is used for saving a file the text editor contents will be saved to a file. The file chooser is closed by setting the _open attribute value to FALSE.

This is the method that the File Chooser activates when a selection has been made.

ABB Oy, P288(En), 28 1MR751 495-MTR

4. Add the Text ID for the LBL_TEXT_FILES in the dialog text translation data base.

A list containing these attributes is passed on to the Notify_File_Chooser method as an argument.

Exercises Exercise 5 5. Add the programs for opening the file chooser for the Open and Save Buttons.

@t_Action="OPEN"

.set PARENT\mdl_File_Chooser._open = TRUE PARENT\mdl_File_Chooser.Set_Path("USER_PAR")

Name: btn_Open Title: @btn_Open (Open)

ABB Oy, P288(En), 29 1MR751 495-MTR

Name: btn_Save Title: @btn_Save (Save)

@t_Action="SAVE" PARENT\mdl_File_Chooser.Set_Mode("SAVE") PARENT\mdl_File_Chooser.Set_Caller_Action("ROOT.File_Save")

Notify methods

PARENT\mdl_File_Chooser.Set_Mode("OPEN") PARENT\mdl_File_Chooser.Set_Caller_Action("ROOT.File_Open") PARENT\mdl_File_Chooser.Select_Path_Selection("PATH")

.set PARENT\mdl_File_Chooser._open = TRUE PARENT\mdl_File_Chooser.Set_File_Name("USER_PAR/TEST.TXT")

Exercises Exercise 5

EXTRA Set the properties for the text editor so, that when a text is opened the upper left corner of the text will be visible.

Change the value for the attribute that sets the scroll position in the text editor when a new text is opened. Set the values so, that the upper left corner of the text is visible.

ABB Oy, P288(En), 30 1MR751 495-MTR

The attributes for the VS_TEXT_ EDITOR can be found from the Visual SCIL Objects manual.

Exercises

6

Exercise 6 Add the following features to the dialog (dlg_Setup) created in the exercise 3.

ABB Oy, P288(En), 31 1MR751 495-MTR

If the text in the text editor is changed a confirmation dialog will appear when trying to close the Setup dialog or when trying to open another text. The user can select weather to continue (OK) or abort (Cancel).

Exercises Exercise 6 Create the private method Show_Message in the dialog (dlg_Setup).

ABB Oy, P288(En), 32 1MR751 495-MTR

#if argument(1)=="CLOSE" #then @v_Apply=(".set ._open=FALSE","PARENT._queue_for_execution("".On_Exit"")",".delete THIS") #if argument(1)=="OPEN" #then @v_Apply=(".set ._open=FALSE","PARENT._queue_for_execution("".On_Open"")",".delete THIS") .create THIS\ndg_Notice = vs_notice_dialog(_notice_icon = "ICON_CAUTION",_title = "Confirmation",_text = "Continue without saving?",_has_ok = TRUE,_has_cancel = TRUE,_geometry = list(x=-500, y=-500, w=100, h=100),_apply = %v_Apply,_cancel = (".set ._open=FALSE",".delete THIS")) .set THIS\ndg_Notice._open = TRUE THIS\ndg_Notice._place("ROOT", "PLACE_CENTER", "PLACE_CENTER")

These are the attributes for the VS_NOTICE_DIALOG object. For more information see Visual SCIL Objects manual.

Exercises Exercise 6 Create two private methods (On_Open, On_Exit) in the dialog (dlg_Setup).

On_Exit .set THIS._open=FALSE .delete THIS On_Open @t_Action="OPEN"

ABB Oy, P288(En), 33 1MR751 495-MTR

mdl_File_Chooser.Set_Mode("OPEN") mdl_File_Chooser.Set_Caller_Action("ROOT.File_Open") mdl_File_Chooser.Select_Path_Selection("PATH") .set mdl_File_Chooser._open = TRUE mdl_File_Chooser.Set_Path("USER_PAR")

Exercises Exercise 6 Change the NOTIFY methods for the Open and Save buttons.

@t_Action="SAVE" PARENT\mdl_File_Chooser.Set_Mode("SAVE") PARENT\mdl_File_Chooser.Set_Caller_Action("ROOT.File_Save")

ABB Oy, P288(En), 34 1MR751 495-MTR

.set PARENT\mdl_File_Chooser._open = TRUE PARENT\mdl_File_Chooser.Set_File_Name("USER_PAR/TEST.TXT")

#if PARENT\txe_Editor._text_is_modified==TRUE #thenPARENT.Show_Message("OPEN") #else PARENT.On_OPEN

Exercises Exercise 6 Do the changes listed below in the following two methods.

CLOSE_NOTIFY method for the dialog (dlg_Setup) #if THIS\txe_Editor._text_is_modified==TRUE #thenTHIS.Show_Message(“CLOSE”) #else THIS.On_Exit

THIS.On_Exit

NOTIFY method for the OK button (btn_OK)

ABB Oy, P288(En), 35 1MR751 495-MTR

#if PARENT\txe_Editor._text_is_modified==TRUE #thenPARENT.Show_Message(“CLOSE”) #else PARENT.On_Exit

PARENT.On_Exit

Exercises Exercise 6 Make the following changes in the public method Notify_File_Chooser.

@l_File_Attr=argument(1) #if (l_File_Attr:Vt_event=="APPLY") and (%t_Action=="OPEN") #then #block .set THIS\txe_Editor._text_vector=read_text(l_File_Attr:Vt_absolute_full_path) .set txe_Editor._text_is_modified=FALSE txe_Editor._scroll_position_into_view(1,1) #block_end #if (l_File_Attr:Vt_event=="APPLY") and (%t_Action=="SAVE") #then #block @i_Status=write_text(l_File_Attr:Vt_absolute_full_path,THIS\txe_Editor._text_vector,0) .set txe_Editor._text_is_modified=FALSE #block_end

ABB Oy, P288(En), 36 1MR751 495-MTR

.set mdl_File_Chooser._open=FALSE Some of these changes have been made in exercise 5 EXTRA.

Exercises

7

Exercise 7 Create a VS_DIALOG (dlg_P_Object) in the object list and add the following features to the dialog.

ABB Oy, P288(En), 37 1MR751 495-MTR

The dialog contains a VS_NOTEBOOK with two pages. On the Setup page conditions for searching process objects can be set. On the Process Objects pages the search result is displayed.

Exercises Exercise 7

ABB Oy, P288(En), 38 1MR751 495-MTR

Create a new dialog in the Object List and name it dlg_P_Object..

Enter the dialog title in the Text Translation Database.

Set these attributes on the Window page for the dlg_P_Object dialog.

Exercises Exercise 7 Insert the following objects to the dialog. Name: btn_Close Title: @btn_Close (Close) PARENT.On_Exit

Name: nbk_Notebook Title:

ABB Oy, P288(En), 39 1MR751 495-MTR

Create the private method On_Exit in the dialog . .set THIS._open=FALSE .delete THIS Write the following line in the CLOSE_NOTIFY method for the dialog. THIS.On_Exit

Exercises Exercise 7 Edit the VS_NOTEBOOK and add two VS_NOTEBOOK_PAGEs to it.

ABB Oy, P288(En), 40 1MR751 495-MTR

2x

Exercises Exercise 7 Edit the first page and do the following: Insert these objects on the nbp_Objects notebook page.

ABB Oy, P288(En), 41 1MR751 495-MTR

Name: nbp_Objects Title: @nbp_Objects (Process Objects)

Name: lst_Objects Title Name: hdr_Header Title:

Exercises Exercise 7 Edit the second page and do the following: Name: box_Attr Title: @box_Attr (Attributes) Name: btn_Search Title: @btn_Search (Search) Name: lbl_Count Title: @lbl_Count (Objects Found:)

ABB Oy, P288(En), 42 1MR751 495-MTR

Name: nbp_Setup Title: @nbp_Setup (Setup) Name: lbl_Condition Title: @lbl_Condition (Search Condition)

Name: txt_Condition Title:

Name: chk_IU Title: @chk_IU (In Use (IU)) Name: chk_SS Title: @chk_SS (Switch State (SS)) Name: chk_PT Title: @chk_PT (Process Object Type (PT)) Name: chk_ZT Title: @chk_ZT (Modification Time (ZT))

Name: lbl_Found Title:

Exercises Exercise 7 Open the nbp_Setup page and create the following three private methods:

Name: Get_Objects #error ignore @v_Attributes=vector() #if THIS\chk_IU._value==1 #if THIS\chk_SS._value==1 #if THIS\chk_PT._value==1 #if THIS\chk_ZT._value==1

#then #then #then #then

@v_Attributes=append(%v_Attributes,"IU") @v_Attributes=append(%v_Attributes,"SS") @v_Attributes=append(%v_Attributes,"PT") @v_Attributes=append(%v_Attributes,"ZT")

@i_Status=status @l_Objects=application_object_list(0,"IX","A","F","",THIS\txt_Condition._text,%v_Attributes) @i_Status=status

This method searches for process objects with the conditions given on the Setup page.

#if %i_Status0 #then @i_Count=0 #else @i_Count=l_Objects:Vcount #error stop

ABB Oy, P288(En), 43 1MR751 495-MTR

#if %i_Count>0 #then#loop_with i=1.. %i_Count @v_LN(%i)=l_Objects:VLN(%i) #if THIS\chk_IU._value==1 #then #if THIS\chk_SS._value==1 #then #if THIS\chk_PT._value==1 #then #if THIS\chk_ZT._value==1 #then #loop_end

@v_IU(%i)=dec(l_Objects:VIU(%i)) @v_SS(%i)=dec(l_Objects:VSS(%i)) @v_PT(%i)=dec(l_Objects:VPT(%i)) @v_ZT(%i)=times(l_Objects:VZT(%i))

Exercises Exercise 7 Name: On_Search THIS.Reset_Search THIS.Get_Objects @v_Attr=("IU","SS","PT","ZT") .set THIS\lbl_Found._title=dec(%i_Count)

#if %i_Count>0 #then #block @i_Headers=THIS\chk_IU._value+THIS\chk_SS._value+THIS\chk_PT._value+THIS\chk_ZT._value+1 @i_Width=263 div %i_Headers PARENT\\lst_Objects._set_cell_text_range(1,1,"VERTICAL",%v_LN) .create PARENT\\hdr_Header\hdi_LN = VS_HEADER_ITEM(_width=%i_Width, _title="LN")

This method starts the search and is called when the search button is pressed.

ABB Oy, P288(En), 44 1MR751 495-MTR

@i_Col=2 #loop_with i=1..4 @t_Tmp=%v_Attr(%i) #if THIS\chk_'t_Tmp'._value==1 #then #block PARENT\\lst_Objects._set_cell_text_range(1,%i_Col,"VERTICAL",%v_'t_Tmp') .create PARENT\\hdr_Header\hdi_'t_Tmp' =VS_HEADER_ITEM(_width=%i_Width, _title=%t_Tmp) @i_Col=%i_Col+1 #block_end #loop_end #block_end

This loop creates the header items to the header on the objects page.

Exercises Exercise 7 Name: Reset_Search .set PARENT\\lst_Objects._row_count=0

Write the following line in the NOTIFY method for the search button on the setup page.

@v_LN=vector() @v_IU=vector() @v_SS=vector() @v_PT=vector() @v_ZT=vector() #error ignore .delete PARENT\\hdr_Header\hdi_LN .delete PARENT\\hdr_Header\hdi_IU .delete PARENT\\hdr_Header\hdi_SS .delete PARENT\\hdr_Header\hdi_PT .delete PARENT\\hdr_Header\hdi_ZT #error stop

PARENT.On_Search

This method resets the previous search before starting a new one. Write the following lines in the ITEM_RESIZED method for the header on the objects page.

ABB Oy, P288(En), 45 1MR751 495-MTR

@v_Items=THIS._child_objects #loop_with i=1.. length(%v_Items) @t_Tmp=%v_Items(%i) PARENT\lst_Objects._set_column_width(%i,THIS\'t_Tmp'._width) #loop_end

This method resizes the list columns according to the size of the header items.

Exercises EXTRA

ABB Oy, P288(En), 46 1MR751 495-MTR

Create a menu item in the main dialog that opens the dialog created in exercise 7.

Exercise 7

Exercises

8

Exercise 8 Create a main dialog with the following features. A tree from where process objects or command procedures can be selected.

ABB Oy, P288(En), 47 1MR751 495-MTR

A list showing the logical names of available objects from the selected category.

2x

When double clicking on a row in the list the IU and CM (OX for process objects) attributes for the object in question will be displayed in the check box and the text field. A button that terminates the dialog.

Exercises Exercise 8 Create a VS_MAIN_DIALOG and insert the following nine objects. VS_TREE Name: tre_Objects Title: VS_LIST Name: lst_Objects Title:

VS_BUTTON Name: btn_Close Title: Close

ABB Oy, P288(En), 48 1MR751 495-MTR

VS_CHECK_BOX Name: chk_IU Title: In Use VS_TEXT Name: txt_CM Title: The objects marked with a green circle are static objects and they can be named freely in this exercise.

Exercises Exercise 8

Change the following three attributes for the text box.

Write the following program in the action method for the check box. #if THIS._value==1 #then .set THIS._value=0 #else .set THIS._value=1

ABB Oy, P288(En), 49 1MR751 495-MTR

Also create an icon and a title to the dialog and arrange the components using the geometry management.

Exercises Exercise 8 Create a private method (On_Exit) in the VS_MAIN_DIALOG (main) .set ROOT._open=FALSE .delete ROOT

ABB Oy, P288(En), 50 1MR751 495-MTR

ROOT.On_Exit

ROOT.On_Exit

Write these two lines in the private method.

Write this line in the CLOSE_NOTIFY method for the VS_MAIN_DIALOG (Main).

Write this line in the NOTIFY method for the VS_BUTTON (btn_Close).

Exercises Exercise 8 Write the following program in the Init method of the main dialog. .load .load .load .load .load

APL PO PO_AI PO_BI CP

= = = = =

Vs_Image("Sys_Tool/Images16.vso", Vs_Image("Sys_Tool/Images16.vso", Vs_Image("Sys_Tool/Images16.vso", Vs_Image("Sys_Tool/Images16.vso", Vs_Image("Sys_Tool/Images16.vso",

"Apl_Local_Hot") "Obj_Process_Object") "Obj_Process_Object") "Obj_Process_Object") "Obj_Command_Procedure")

tre_Objects._add_root_node tre_Objects._set_row_text(1,"Objects") tre_Objects._set_row_image(1,"ROOT\APL") tre_Objects._set_row_id(1,"ROOT_NODE")

ABB Oy, P288(En), 51 1MR751 495-MTR

tre_Objects._expand_node(1)

Load the images for the tree nodes and leaves. The file image16.vso contains predefined images.

Expand the root node.

Create the root node for the tree.

Exercises Exercise 8 Create these two private methods in the main dialog. Create_Nodes Create two nodes under the root node.

Create_Leafs

ABB Oy, P288(En), 52 1MR751 495-MTR

Create two leafs under the process object node.

tre_Objects._add_node(1,1) tre_Objects._set_row_text(2,"Process Objects") tre_Objects._set_row_image(2,"ROOT\PO") tre_Objects._set_row_id(2,"PO") tre_Objects._add_node(1,2) tre_Objects._set_row_text(3,"Command Procedures") tre_Objects._set_row_image(3,"ROOT\CP") tre_Objects._set_row_id(3,"CP") tre_Objects._add_leaf(2,1) tre_Objects._set_row_text(3,"Binary Input (10)") tre_Objects._set_row_image(3,"ROOT\PO") tre_Objects._set_row_id(3,"BI") tre_Objects._add_leaf(2,2) tre_Objects._set_row_text(4,"Analog Input (10)") tre_Objects._set_row_image(4,"ROOT\PO") tre_Objects._set_row_id(4,"AI")

Exercises Exercise 8 Create the following private methods in the main dialog. List_AI Lists the logical names of all process objects of analog input type in the list.

List_BI Lists the logical names of all process objects of binary input type in the list.

ABB Oy, P288(En), 53 1MR751 495-MTR

List_CP Lists the logical names of all commandprocedures in the list.

#local l_Tmp l_Tmp=application_object_list(0,"ix","A","","","PT==9 and IX==10") .set ROOT\lst_Objects._row_count=0 ROOT\lst_Objects._set_cell_text_range(1,1,"VERTICAL",l_Tmp.ln) ROOT\lst_Objects._scroll_position_into_view(1,1) #local l_Tmp l_Tmp=application_object_list(0,"ix","A","","","PT==3 and IX==10") .set ROOT\lst_Objects._row_count=0 ROOT\lst_Objects._set_cell_text_range(1,1,"VERTICAL",l_Tmp.ln) ROOT\lst_Objects._scroll_position_into_view(1,1) #local l_Tmp l_Tmp=application_object_list(0,"c") .set ROOT\lst_Objects._row_count=0 ROOT\lst_Objects._set_cell_text_range(1,1,"VERTICAL",l_Tmp.ln) ROOT\lst_Objects._scroll_position_into_view(1,1)

Exercises Exercise 8 Modify the following action methods in the tree object. Handle_Expand_Node This method is activated when a node is expanded.

Leaf_Selected This method is activated when a leaf is selected.

#if argument(1)==1 #then ROOT.Create_Nodes #if argument(1)==2 #then ROOT.Create_Leafs #return TRUE

Uncheck check box and empty the text box.

.set ROOT\chk_IU._value=0 .set ROOT\txt_CM._text="" #if THIS._get_row_id(argument(1))=="BI" #then ROOT.List_BI #else_if THIS._get_row_id(argument(1))=="AI" #then ROOT.List_AI #else .set ROOT\lst_Objects._row_count=0

Node_Selected

ABB Oy, P288(En), 54 1MR751 495-MTR

This method is activated when a node is selected.

.set ROOT\chk_IU._value=0 .set ROOT\txt_CM._text="" #if THIS._get_row_id(argument(1))=="CP" #then ROOT.List_CP #else .set ROOT\lst_Objects._row_count=0 The list is emptied by setting the _row_count attribute to 0.

Exercises Exercise 8 Write the following program in the double_click method in the list. #local t_Tmp, l_Tmp t_Tmp=THIS._get_cell_text(THIS._selected_row,1) #if (ROOT\tre_Objects._get_row_id(ROOT\tre_Objects._selected_row))=="CP"#then #block l_Tmp=fetch(0,"C",t_Tmp) .set ROOT\txt_CM._text=l_Tmp.cm #if l_Tmp.iu==1 #then .set ROOT\chk_IU._value=1 #else .set ROOT\chk_IU._value=0 #block_end

Set the check box and text properties depending on the process object (index 10) IU and OX attribute values.

#if (ROOT\tre_Objects._get_row_id(ROOT\tre_Objects._selected_row))=="BI"or (ROOT\tre_Objects._get_row_id(ROOT\tre_Objects._selected_row))=="AI"#then #block l_Tmp=fetch(0,"P",t_Tmp,10) .set ROOT\txt_CM._text=l_Tmp.ox #if l_Tmp.iu==1 #then .set ROOT\chk_IU._value=1 #else .set ROOT\chk_IU._value=0 #block_end

ABB Oy, P288(En), 55 1MR751 495-MTR

Set the check box and text properties depending on the command procedure IU and CM attribute values.

Exercises EXTRA

ABB Oy, P288(En), 56 1MR751 495-MTR

Add a node for data objects to the tree. When the node is selected the data object logical names are shown in the list.

Hints: • The data object image name in the images16.vso file is obj_data_object.

Exercise 8

Exercises

9

Exercise 9 Create a main dialog with the following features.

A graph where two data sets are shown.

Two labels that show the hairline intersection points with the two data sets if the hairline is enabled.

ABB Oy, P288(En), 57 1MR751 495-MTR

Enable / disable hairline

Exercises Exercise 9 Create a VS_MAIN_DIALOG and insert the following nine objects. VS_GRAPH Name: gra_Graph Title: VS_LABEL Name: lbl_Y1 Title: Y1:

ABB Oy, P288(En), 58 1MR751 495-MTR

VS_LABEL Name: lbl_Y1 Title: Y1: VS_CHECK_BOX Name: chk_Hairline Title: Y2: Hairline Enabled The objects marked with a green circle are static objects and they can be named freely in this exercise.

Exercises Exercise 9 .set gra_Graph._background_color="BLACK"

Create the following private method in the main dialog. Graph_Setup Create and set the properties for the graph x- and y-axis.

ABB Oy, P288(En), 59 1MR751 495-MTR

Add the x-axis to the graph. Set the x-axis properties. Note that all the attributes for the x-axis have to be included even if they are not needed since there are no default values.

;Add x-axis gra_Graph._add_x_axis(1,"INTEGER","bottom",2,0) ;Set x-axis properties @l_x_axis_prop = list(min = 0,max = 60,time_unit = "SECONDS",time_format = "",annotation_increment = 10,annotation_font = ("M",3),annotation_color = "RED",tick_increment = 5,axis_color = "GREEN",axis_title = "Seconds",axis_title_font = ("M",2),axis_title_color = "YELLOW",display_axis_title_enabled=TRUE,grid_mode = "NONE",grid_line_width = 1,grid_color = "BLACK",grid_line_style = "SOLID") gra_Graph._set_x_axis_properties(1, %l_x_axis_prop)

Method continues on the following page

Exercises Exercise 9 … Graph_Setup Create and set the properties for the graph x- and y-axis.

Method continued from the previous page

;Add y-axis gra_Graph._add_y_axis(2,"INTEGER", "bottom", 1,0) ;Set y-axis properties

Add the y-axis to the graph.

ABB Oy, P288(En), 60 1MR751 495-MTR

Set the y-axis properties.

@l_y_axis_prop=list(min = max = annotation_increment = annotation_font = annotation_color = tick_increment = axis_color = axis_title = axis_title_font = axis_title_color = display_axis_title_enabled grid_mode = grid_line_width = grid_color = grid_line_style =

0,100,50,("M",3),"RED",10,"GREEN","",("M",1),"BLACK",= FALSE,"NONE",1,"BLACK","SOLID")

gra_Graph._set_y_axis_properties(2, %l_y_axis_prop)

Exercises Exercise 9 Create the following private method in the main dialog. Data_Setup Create and set the properties for the graph x- and y-axis.

ABB Oy, P288(En), 61 1MR751 495-MTR

Add the two data sets to the graph. Set the properties for the two data sets. As with the x- and y-axis, all attributes have to be included even if they are not used.

;Add data set gra_Graph._add_data_set(1,1,2) gra_Graph._add_data_set(2,1,2) ;Data set properties @l_data_set_prop = list(title default_color show_line marker_shape marker_color status_0_color status_9_color

= = = = = = =

"Random 1","RED",TRUE,"DOT","YELLOW","RED","WHITE")

gra_Graph._set_data_set_properties(1,%l_data_set_prop) @l_data_set_prop2 = list(title default_color show_line marker_shape marker_color status_0_color status_9_color

= = = = = = =

"Random 2","YELLOW",TRUE,"DOT","YELLOW","YELLOW","WHITE")

gra_Graph._set_data_set_properties(2,%l_data_set_prop2)

Exercises Exercise 9 Create the following private methods in the main dialog. Hairline_Setup Set the properties for the graph hairline.

#if chk_Hairline._value==1 #then @b_Enabled=TRUE #else @b_Enabled=FALSE @l_hairline_prop = list(color enabled line_style line_width position

= = = = =

"GREEN",%b_Enabled,"ONOFFDASH",1,50)

gra_Graph._set_hairline_properties(1,%l_hairline_prop)

#if chk_Hairline._value==1 #then #block

Hairline_Value

ABB Oy, P288(En), 62 1MR751 495-MTR

Get the intersection points for the hairline and the data set values.

@l_Data1=gra_Graph._get_hairline_intersection_point(1,1,FALSE) @l_Data2=gra_Graph._get_hairline_intersection_point(1,2,FALSE) .set lbl_Y1._title="Y1: .set lbl_Y2._title="Y2: #block_end #else #block .set lbl_Y1._title="Y1: .set lbl_Y2._title="Y2: #block_end

"+dec(l_Data1:vy_value,6,2) "+dec(l_Data2:vy_value,6,2)

" "

Exercises Exercise 9 Create and edit the following methods in the main dialog. Cyclic Method (2.00)

Init

Update the data set in the graph and the hairline intersection points every two seconds.

Initialize the x- and y-axis data set values.

#loop_with i=1..30 @v_y_axis(%i)=%v_y_axis(%i+1) #loop_end @v_y_axis(31)=random(0,100)

#loop_with i=1..31 @v_x_axis(%i)=(%i-1)*2 #loop_end @v_y_axis(1..31)=(0)

gra_Graph._set_data_set_values(1,%v_x_axis,%v_y_axis,FALSE)

#loop_with i=1..31 @v_x_axis2(%i)=(%i-1)*2 #loop_end @v_y_axis2(1..31)=(0)

ABB Oy, P288(En), 63 1MR751 495-MTR

#loop_with i=1..30 @v_y_axis2(%i)=%v_y_axis2(%i+1) #loop_end @v_y_axis2(31)=random(0,100) gra_Graph._set_data_set_values(2,%v_x_axis2,%v_y_axis2,FALSE) ROOT.Hairline_Value

Exercises Exercise 9 Notify Change the hairline properties when the check box value is changed. chk_Hairline

ROOT.Hairline_Setup

Init Initialize the graph, data set and the hairline in the graph init method. ROOT.Graph_Setup ROOT.Data_Setup gra_Graph

ABB Oy, P288(En), 64 1MR751 495-MTR

THIS._add_hairline(1) ROOT.Hairline_Setup

Exercises EXTRA When the hairline is enabled two buttons for moving the hairline will appear. Add a check box for freezing the graph.

ABB Oy, P288(En), 65 1MR751 495-MTR

Add a button that terminates the dialog.

Hints: • Set the position attribute in the hairline properties list to move the hairline.

Exercise 9

Contents of Chapter 9 10 Appendix – Image Editor 10.1

General

10.2

Drawing

10.3

Color Settings and Transparency

Appendix – Image Editor A.1 General 

With the Image Editor images can be drawn as image objects and stored in files.



Images can also be drawn directly on an object (boxes, containers and buttons).



It is also possible to export and import images (GIF, PGM, PPM, PBM, ICO, DIB and BMP) with the Image Editor.

ABB Oy, P288(En), 1 1MR751 495-MTR

Tool Box

Drawing Area Color Palette

Line Width

Background Color Foreground Color

Appendix – Image Editor

ABB Oy, P288(En), 2 1MR751 495-MTR

A.2 Drawing Hand

Moves the visible part of the image when an oversize image is in the drawing area. Select and drag the oversize image with the Hand Tool to its new position.

Dropper

Replaces the foreground color with a color that is selected from the image. Click any color in the drawing area to pick up that color. To pick up a background color, press the Control key while clicking the Dropper.

Selection

Selects a rectangular area. Select the area by clicking the Selection tool and holding the mouse button down while dragging the pointer from one corner of the area to the opposite corner. To select the whole drawing area, double-click the tool.

Lasso

Selects an area, which does not have to be rectangular. Choose the area by clicking the Lasso tool and then holding the mouse button down while dragging the pointer from the beginning point of the area to the end point.

Fill

Fills an area with the Foreground color.

Spray

Can Draws with the Foreground color using a spray pattern.

Eraser

Erases the image. Drag the eraser over the area you want to erase. Press the shift key before erasing to constrain the tool horizontally or vertically. To erase the whole drawing area, click the drawing area and then double-click the eraser.

Setting the image size

Appendix – Image Editor A.2 Drawing

Text

Allows you to type text and place it in the image. Click the Text tool and then the drawing area. A dialog box will appear. Type the text and click OK. Once you click OK, the text can not be edited. If you want to change the text, you must delete the old text and type the new text from scratch. The text just entered can be removed using Edit/Undo menu command. The font style can be changed by choosing Set Font from the Tool menu.

Pencil

Draws one pixel at the time, using the Foreground color by default.

Line

Draws straight lines. Hold the Shift key down during the dragging to constrain the line horizontally, vertically or to a 45-degree angle.

Ellipse

Draws an ellipse. Hold the Shift key down during dragging if you want to form a circle.

Filled Ellipse

Draws an ellipse filled with foreground color. Hold the Shift key down during dragging if you want to form a circle.

Rectangle

Draws a rectangle. Hold shift down during dragging if you want to form a filled square.

ABB Oy, P288(En), 3 1MR751 495-MTR

Filled Rectangle Draws a rectangle filled with the Foreground color. Hold the Shift key down during dragging if you want to form a square.

Appendix – Image Editor

ABB Oy, P288(En), 4 1MR751 495-MTR

A.3 Importing Images and Transparency

 

View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF