getting started with scade display

Upload: micams

Post on 03-Nov-2015

26 views

Category:

Documents


0 download

DESCRIPTION

scade display

TRANSCRIPT

  • Getting Startedwith SCADE Display

  • Contacts

    Legal ICopyrighSCADE STechnoloGetting

    Terms Importaas the soor copiedSCADE Dstored, opermissibe proteEsterel Tstarting Prop

    distrown

    Warguarperfo

    DocumThe contto changprecautithat may

    Other LAll other Adob Java Flex Ope

    The follo Adob Flex

    Legal Contact Technical Support

    Esterel Technologies SASParc Euclide - 8, rue Blaise Pascal

    Esterel Technologies SASParc Avenue, 9 rue Michel Labroussenformationts 2002-2012 Esterel Technologies.ystem, SCADE LifeCycle, SCADE Suite, SCADE Display, and SCADE are registered trademarks of Esterel gies. All rights reserved.Started with SCADE Display Copyright Esterel Technologies - Published November 2013.

    of Usent! Read carefully before starting this software and referring to its user documentation. This publication, as well ftware it describes, is distributed as part of the SCADE Display user documentation under license and may be used only in accordance with the terms and conditions of the Software License Agreement (SLA) accepted during isplay products installation. Except as permitted by the SLA, the content of this publication cannot be reproduced, r transmitted in any form or by any means, electronic, mechanical, recording, or otherwise, without the prior on of Esterel Technologies SAS. Any existing artwork or images that you may want to reuse in your projects may cted under copyright law. The unauthorized use of such material into your own work may constitute a violation of echnologies copyrights. If needed, make sure your obtain the written permission from Esterel Technologies. By the software you expressly agree to the following conditions:erty: This software is and remains the exclusive property of Esterel Technologies SAS. It cannot be copied or

    ibuted without written authorization from Esterel Technologies SAS. Esterel Technologies SAS retains title and ership of the software.ranty: The software is provided, as is, without warranty of any kind. Esterel Technologies SAS does not antee the use, or the results from the use, of this software. All risk associated with usage results and rmance is assumed by you the user.

    entation Disclaimerent of the SCADE Solutions for ARINC 661 user documentation is distributed for informational use only, is subject e without notice, and should not be construed as a commitment by Esterel Technologies SAS. Although every on has been taken to prepare this manual, Esterel Technologies assumes no responsibility or liability for any errors be contained in this book or any damages resulting from the use of the information contained herein.

    egal Info trademarks and tradenames contained herein are the property of their respective owners:e Reader is a registered trademark of Adobe Systems Incorporated. and all Java-based trademarks and logos are trademarks or registered trademarks of Oracle and/or its affiliates.Net Publisher is a registered trademark of FLEXERA Software. nGL is a registered trademark of Silicon Graphics Incorporated.

    wing are copyrights of their respective companies:e Reader Adobe Systems Incorporated, licensed by Adobe Systems Incorporated.

    Net Publisher Flexera Software, licensed by Esterel Technologies.

    78996 Elancourt FRANCEPhone: +33 1 30 68 61 60Fax: +33 1 30 68 61 61

    31100 Toulouse FRANCEPhone: +33 5 34 60 90 50Fax: +33 5 34 60 90 41

    Submit questions to Technical Support at [email protected].

    Contact one of our Sales representatives at [email protected].

    Direct general questions about Esterel Technologies to [email protected].

    Discover latest news on our products and technology at www.esterel-technologies.com.

  • Copyright 2012, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates.

    Portions of this software are copyright 2007 The FreeType Project (www.freetype.org). All rights reserved. Caml 1996-2006 INRIA, licensed by Esterel Technologies. SCADE Solutions for ARINC 661 integrate all or parts of

    run-time Caml developed by INRIA and its partners.DISCLAIMER: THIS SOFTWARE IS PROVIDED BY INRIA AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARFORANYLIMIINTEOR TEVEN

    ShiRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INRIA OR ITS CONTRIBUTORS BE LIABLE FOR DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT TED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS RRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, ORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

    pping date: 15/11/13 Revision: SDY-GS-65 - DOC/rev/0100-11

  • Getting Started OverviewOVERVIEW

    This manual walks you through the basics of specificdocume ChapThis chDisplay ChapThis chthat teaspecific ChapThis chthat tea ChapThis chthat teacreated ChapThis chobject tcreatingand off the fina

    RELATED DOCUMENTS SCADE Display User Manual Related documents are available in PDF format from the Start menu program of your SCADE Display installation or in the installation CD-ROM.Getting Started with SCADE Display

    ation creation with SCADE Display. The nt is divided into the following chapters:ter 1: Introduction

    apter guides your first steps into the SCADE environment and workflow.ter 2: Creating Counter

    apter walks you through a set of exercises ches you how to create a basic display ation.ter 3: Creating Reusable Object

    apter walks you through a set of exercises ches how to create a reusable object.

    ter 4: Reusing Counter Object

    apter walks you through a set of exercises ches how to reuse an object previously .ter 5: Adding Interaction to Counter

    apter teaches you how to add an interactive o the existing counter object. It consists of a button with On/Off positions to turn on the counter. It also shows how to simulate l counter with SCADE Suite Simulator.

    DOCUMENTATION AVAILABILITY

    The content of this document is also available from the SCADE Display online Help menu. Printed manuals are available only upon request to Esterel Technologies.

    TYPOGRAPHICAL CONVENTIONS

    The following conventions are used in this document:

    Bold GUI buttons, options, tabs, radio buttons, drop-down lists, window titles, panel names.

    Italics Path for selection from main menu bar or in contextual menus, new technical concepts or words, references to product documentation.

    Courier New

    Computer text, code extracts, constant or variable names, file names or directory path, typed text.

    Title Case Names of application components, menus.

    UPPERCASE File formats

  • Table of Contents

    Getting Started Overview

    List of Figures v

    1. Introduction 1 - 1

    P

    P

    DDAA

    2. C

    SE

    E

    DE

    E

    E

    E

    E

    E

    E

    DE

    E

    DE

    EGetting Started with SCADE Displayi

    urpose and Organization of this Manual 1 - 1

    resenting SCADE Display User Interface 1 - 3

    ocumentation and Online Help 1 - 5ocumentation Set 1 - 5ccessing SCADE Display PDF Manuals 1 - 5ccessing SCADE Display Online Help 1 - 6

    reating Counter 2 - 7

    tarting to Specify 2 - 7xercise 2.1: Launching SCADE Display 2 - 8xercise 2.2: Creating New Specification 2 - 11

    rawing the Background of the Counter 2 - 13xercise 2.3: Setting Object Attributes 2 - 14xercise 2.4: Drawing the First Arc 2 - 15xercise 2.5: Setting Objects Properties 2 - 18xercise 2.6: Setting the Grid Options 2 - 20xercise 2.7: Replicating Objects 2 - 20xercise 2.8: Grouping Objects 2 - 23xercise 2.9: Naming Objects 2 - 25

    rawing Needle Areas 2 - 26xercise 2.10: Duplicating Objects 2 - 27xercise 2.11: Arranging Objects 2 - 30

    rawing the Needle 2 - 31xercise 2.12: Drawing the Needle 2 - 32xercise 2.13: Plugging Needle 2 - 35

  • Esterii

    Table of Contents

    Drawing the Label 2 - 38Exercise 2.14: Drawing the Label 2 - 39Exercise 2.15: Aligning Objects 2 - 42E

    AE

    E

    3. C

    CE

    CE

    E

    E

    E

    CE

    SE

    E

    4. R

    CE

    CE

    E

    Cel Technologies

    xercise 2.16: Plugging Label Value 2 - 43

    nimating Display Specification 2 - 44xercise 2.17: Defining the Animation Scenario 2 - 44xercise 2.18: Launching Specification Animation 2 - 46

    reating Reusable Object 3 - 49

    reating Unit Parameter 3 - 49xercise 3.19: Plugging the Unit Label 3 - 49

    reating Danger and Nominal Parameters 3 - 50xercise 3.20: Modifying Danger and Nominal Areas 3 - 51xercise 3.21: Clipping Areas 3 - 52xercise 3.22: Rotating and Plugging the Danger Area 3 - 54xercise 3.23: Rotating and Plugging the Nominal Area 3 - 55

    hecking Specification Design 3 - 58xercise 3.24: Launching Design Checker 3 - 58

    aving the Specification as Object 3 - 60xercise 3.25: Creating a Top-Level Container 3 - 60xercise 3.26: Saving the Specification as Object 3 - 61

    eusing Counter Object 4 - 63

    reating Blank Specification 4 - 63xercise 4.27: Creating New Specification 4 - 63

    reating Volt Counter 4 - 64xercise 4.28: Instantiating Volt Counter 4 - 64xercise 4.29: Plugging the Volt Counter 4 - 66

    reating Hertz Counter 4 - 67

  • Table of Contents

    Exercise 4.30: Instantiating the Hertz Counter 4 - 67Exercise 4.31: Plugging the Hertz Counter 4 - 68

    Animating the Volt and Hertz Counters 4 - 69E

    GE

    E

    5. A

    CE

    E

    RE

    CE

    E

    E

    EGetting Started with SCADE Displayiii

    xercise 4.32: Defining Scenarios and Launching Animation 4 - 69

    enerating Specification Code 4 - 71xercise 4.33: Launching Specification Code Generation 4 - 71xercise 4.34: Launching Resource Tables Code Generation 4 - 72

    dding Interaction to Counter 5 - 73

    reating Interactive InOutButton Object 5 - 73xercise 5.35: Drawing Button Graphics with In/Out Positions 5 - 74xercise 5.36: Defining InOutButton Active Area 5 - 80

    eusing InOutButton Reference Object 5 - 83xercise 5.37: Creating Graphical Specification with Button 5 - 83

    o-Simulating your Display with SCADE Suite 5 - 85xercise 5.38: Opening SCADE Suite Model 5 - 85xercise 5.39: Inserting Specification in SCADE Suite Project 5 - 87xercise 5.40: Connecting Object and Model Inputs/Outputs 5 - 87xercise 5.41: Co-Simulating your Display with Example Model 5 - 91

  • List of Figures

    Figure 1.1: The final display specification 1 - 1

    Figure 1.2: SCADE Display GUI 1 - 3

    Figure 2.1: SCADE Display splash screen 2 - 8

    Figure 2.2: SCADE Display Startup page 2 - 9

    Figure

    Figure

    Figure

    Figure

    Figure

    Figure

    Figure

    Figure

    Figure

    Figure

    Figure

    Figure

    Figure

    Figure

    Figure

    Figure

    Figure

    Figure

    Figure

    Figure

    Figure

    Figure

    Figure

    Figure

    Figure

    Figure

    Figure

    Figure

    Figure

    Figure

    FigureGetting Started with SCADE Displayv

    2.3: SCADE Display Welcome page 2 - 10

    2.4: Creating new specification through predefined template 2 - 11

    2.5: New empty specification in SCADE Display Editor 2 - 12

    2.6: Selecting an outline color in the Object Attributes area 2 - 14

    2.7: Selecting a line width 2 - 15

    2.8: Selecting an arc primitive 2 - 16

    2.9: Drawing the arc in the Visualization area 2 - 17

    2.10: Drawn arc 2 - 17

    2.11: Arc control points 2 - 18

    2.12: Properties tab 2 - 18

    2.13: Dimensioned arc 2 - 19

    2.14: Drawing the first graduation 2 - 21

    2.15: Replication parameter definition window 2 - 21

    2.16: Replicating the graduations 2 - 22

    2.17: Graduated arc 2 - 22

    2.18: Selecting objects 2 - 23

    2.19: Objects grouping 2 - 24

    2.20: Graduations selection 2 - 25

    2.21: Grouping the graduations 2 - 25

    2.22: Group naming 2 - 26

    2.23: Drawing the first needle area 2 - 27

    2.24: Duplicating the first crown 2 - 28

    2.25: Drawing the second needle area 2 - 29

    2.26: Drawing the third area 2 - 30

    2.27: Bringing the counter contour to front 2 - 30

    2.28: Bringing the counter outline over the needle areas 2 - 31

    2.29: Needle shape 2 - 32

    2.30: Resulting drawing of the needle 2 - 33

    2.31: Selecting a rotation group from the Containers tab 2 - 34

    2.32: Drawing a rotation container 2 - 34

    2.33: Invalid plug in the Plugs tab 2 - 36

  • Estervi

    List of Figures

    Figure 2.34: Creating value variable in the Variable Dictionary 2 - 36

    Figure 2.35: Valid plug in the Plugs tab 2 - 37

    Figure 2.36: Name changing 2 - 38

    Figure 2.37: Drawing the label contour 2 - 39

    Figure

    Figure

    Figure

    Figure

    Figure

    Figure

    Figure

    Figure

    Figure

    Figure

    Figure

    Figure

    Figure

    Figure

    Figure

    Figure

    Figure

    Figure

    Figure

    Figure

    Figure

    Figure

    Figure

    Figure

    Figure

    Figure

    Figure

    Figure

    Figure

    Figure

    Figureel Technologies

    2.38: Resulting label contour 2 - 40

    2.39: Drawing the label 2 - 41

    2.40: Drawing the unit label 2 - 42

    2.41: Selecting several objects 2 - 42

    2.42: Reusing existing variable to plug the label value 2 - 43

    2.43: Animation panel 2 - 45

    2.44: Animating the counter 2 - 46

    3.45: Plugging the Unit label 3 - 50

    3.46: Grouping the two needle areas 3 - 52

    3.47: Masks tab from the Object Palette 3 - 53

    3.48: Resulting clip plane 3 - 53

    3.49: Resulting rotation container 1 3 - 55

    3.50: Resulting rotation container 2 3 - 56

    3.51: Structure tree 3 - 57

    3.52: Errors found by Design Checker 3 - 59

    3.53: Top-level container 3 - 61

    4.54: Inserting a reference object 4 - 65

    4.55: Instantiating the Counter object 4 - 65

    4.56: Resulting Volt counter 4 - 66

    4.57: Resulting Hertz counter 4 - 68

    4.58: Animation panel 4 - 69

    4.59: Volt and Hertz counters 4 - 70

    4.60: Specification code generation console 4 - 71

    4.61: Resource tables code generation console 4 - 72

    5.62: Object specification containing a group by default 5 - 74

    5.63: Drawing the shape of the buttons Out position 5 - 75

    5.64: Graphics of the OutPosition case 5 - 75

    5.65: Grouping the graphical elements of the buttons Out position 5 - 76

    5.66: Graphics of the InPosition case 5 - 77

    5.67: Grouping button OutPosition and InPosition in conditional group 5 - 78

    5.68: Creating MouseIn variable in the Variable Dictionary 5 - 79

  • List of Figures

    Figure 5.69: Plugging the Index property of the Graphics conditional Group 5 - 79

    Figure 5.70: Defining the Rectangle Area geometry 5 - 81

    Figure 5.71: Plugging the Rectangle Area 5 - 82

    Figure 5.72: Plugging the InOutButton within the counters 5 - 84

    Figure

    Figure

    Figure

    Figure

    Figure

    Figure

    FigureGetting Started with SCADE Displayvii

    5.73: SCADE Suite model using the counter interactively 5 - 86

    5.74: Inserting a SCADE Display SFGX file in a SCADE Suite project 5 - 87

    5.75: Contextual menu command to connect model I/O to graphical panel I/O 5 - 88

    5.76: SCADE Suite/Graphical Panels Connections 5 - 89

    5.77: Connecting model and specification inputs/outputs 5 - 90

    5.78: Configuring simulation code for graphical panel integration 5 - 91

    5.79: Using the SCADE Suite/SCADE Display panel 5 - 92

  • 1 Introduction This chapter is intended as an overview of SCADE Displays features and

    PurGetting Started with SCADE Display1 - 1

    workflow.

    Before starting any exercise, please read through the following sections:

    Purpose and Organization of this Manual Presenting SCADE Display User Interface Documentation and Online Help

    pose and Organization of this ManualThis manual walks you through the basics about specification creation with SCADE Display. Through this manual, you will learn how to create a simple specification without detailing the concepts of SCADE Display. It is a set of steps that you shall follow to build the small interactive display described on Figure 1.1:

    Figure 1.1: The final display specification

  • Introduction: 1Purpose and Organization of this Manual

    Ester1 - 2

    This manual is divided into the following chapters:

    Chapter 2 about Creating Counter Chapter 3 about Creating Reusable Objectel Technologies

    Chapter 4 about Reusing Counter Object Chapter 5 about Adding Interaction to Counter

  • Introduction: 1Presenting SCADE Display User Interface

    Presenting SCADE Display User InterfaceThe SCADE Display Graphical User Interface (GUI) contains various components for editing, animating and managing layers and specifications. The Figure 1.2 below describes Getting Started with SCADE Display1 - 3

    the SCADE Display GUI:

    Figure 1.2: SCADE Display GUI

    The SCADE Display GUI contains the following areas and toolbars:

    1 The Visualization area is a large area in which you draw the specification.

    2 The toolbars above the Visualization area give access to various features like loading or saving files, editing, getting contextual help, and to features allowing to transform the objects of the specification (aligning, rotating, managing control points, etc.).

  • Introduction: 1Presenting SCADE Display User Interface

    Ester1 - 4

    3 Left of the Visualization area, the Object Palette provides objects that can be drawn in the Visualization area (primitives, clipping masks, containers, and interactors).

    4 Right to the Visualization area, an information area allows changing the attributes of el Technologies

    the objects and accessing basic information related to the specification:

    The Object Attributes area allows changing the attributes of the objects. The General Information area allows accessing to the structure of the

    specification, managing zooming, navigation and layers, managing multiple undo/redo and animating the resulting display.

    The Object Information area gives access to a complete description of the object currently selected.

    5 The Variable Dictionary allows creating and managing all the variables used to plug objects.

    6 The Status bar displays information depending on the current SCADE Display use context.

    For more information about SCADE Display GUI, see Chapter 2 about Discovering SCADE Display User Interface from SCADE Display User Manual.

    You may now continue with the features and exercises related to Creating Counter.

    NoteMost of these features are also available from the Menu bar.

  • Introduction: 1Documentation and Online Help

    Documentation and Online HelpSCADE Display is delivered with a comprehensive source of documentation available in various formats. All documents are distributed in PDF format at installation. The online Getting Started with SCADE Display1 - 5

    help is integrated into the SCADE Display User Interface.

    Documentation Set Accessing SCADE Display PDF Manuals Accessing SCADE Display Online Help

    Documentation SetThe product documentation set is composed of the following documents:

    Release Notes Manuals and Guidelines about SCADE Display tool Online Help integrated in the SCADE Display applicationRelease Notes, Manuals and Guidelines can be opened as explained in Accessing SCADE Display PDF Manuals.

    Manuals and Guidelines are available in HTML format through the SCADE Display on-line help as explained in Accessing SCADE Display Online Help.

    Accessing SCADE Display PDF ManualsYou can access all manuals and documents distributed in PDF format with this version by the following procedure:

    To access documentation

    1 Click Start on your Windows desktop.

    2 Go to SCADE products installation folder under All Programs.

    3 Select SCADE Documentation > SCADE Display > Manuals.

    4 Once the PDF has opened, click on the required document title.

    TipSelect SCADE Display > Release Notes to open the Release Notes of the current SCADE Display version.

  • Introduction: 1Documentation and Online Help

    Ester1 - 6

    Accessing SCADE Display Online HelpThe online help distributed with this version integrates the documentation of all SCADE products family you installed. It is based on the content of all manuals, guidelines, and cards from the documentation set that covers all functional aspects of each product.el Technologies

    The SCADE Products Help interface provides several features:

    To access SCADE Display Online Help

    1 Open your SCADE Display application.

    2 Select Help > Help Topics or press F1 to open the SCADE Products Help window.

    3 On the welcoming page, click on the SCADE Display logo to access the list of help resources available. Alternatively, look into the Contents tab on the left and double click the SCADE Display Help Resources book to expand the list of help resources.

    4 Navigate in the HTML pages with the following navigation elements:

    Bookmarks in the Contents tab List of indexes from the Index tab Search topics from the Search tab Hyperlinks in pages

    Features Button

    Hiding/showing the left panel, which provides access to contents bookmarks, index, search, and favorite management Hide/Show

    Navigating backward and forward between opened pages Back/Forward

    Navigating back to online help welcoming page Home

    Increasing/decreasing font size on displayed page Font

    Printing selected topics and subtopics Print

    Turning on/off search highlight Options > Search Highlight On/Off

    TipPressing F1 while the cursor focuses on menu, toolbar icon, or docking window launches contextual help. On each contextual help topic you can find basic help or further navigate to related tasks, concepts, or references. If no topic is available, the complete help system opens on the welcoming page.

  • 2 Creating CounterThis chapter teaches you how to create a counter. You will create the

    StarGetting Started with SCADE Display2 - 7

    graduations, the counter areas, the needle, and a label indicating a value of the needle.

    Learn the basics of graphical specification with SCADE Display in:

    Starting to Specify Drawing the Background of the Counter Drawing Needle Areas Drawing the Needle Drawing the Label Animating Display Specification

    ting to SpecifyThis section shows you how to launch a SCADE Display session and create a new blank specification from a SCADE Display predefined template.

    CONCEPTS

    This lesson covers the following topics:

    SCADE Display specification templates

    AIM OF EXERCISES

    Launch SCADE Display application Create a new SCADE Display specificationYou will learn the basics about creating a display specification in these exercises:

    Exercise 2.1: Launching SCADE Display Exercise 2.2: Creating New Specification

  • Creating Counter: 2Starting to Specify

    Ester2 - 8

    Exercise 2.1: Launching SCADE DisplayThis exercise explains how you can launch the SCADE Display application.

    To run SCADE Displayel Technologies

    Do one of the following: double-click the SCADE Display icon located on the desktop, open the Windows Start menu and select the SCADE Display application.

    The SCADE Display splash screen appears until the end of the initialization stage.

    Figure 2.1: SCADE Display splash screen

    At the end of the initialization stage, the SCADE Display window opens up.

    By default, the SCADE Display window displays a startup page providing access to the Welcome pages of all SCADE products.

  • Creating Counter: 2Starting to SpecifyGetting Started with SCADE Display2 - 9

    Figure 2.2: SCADE Display Startup page

    To display SCADE Display Welcome page

    Click the SCADE Display diamond.

  • Creating Counter: 2Starting to Specify

    Ester2 - 10el Technologies

    Figure 2.3: SCADE Display Welcome page

    The SCADE Display Welcome page contains get started information and useful links to project management, documentation, distributed models, or customer support contacts.

    You can now continue with Exercise 2.2: Creating New Specification.

  • Creating Counter: 2Starting to Specify

    Exercise 2.2: Creating New SpecificationThis exercise shows you how to create a new specification from a predefined template.

    To create a blank specificationGetting Started with SCADE Display2 - 11

    1 Click New from the File toolbar or select the File > New menu.

    Figure 2.4: Creating new specification through predefined template

    2 Make sure OpenGL is selected in the Environment Definition drop-down list.3 Select the 768x768 template.

    4 Click OK to create the specification.

    TipYou can also double-click the template to create the specification.

  • Creating Counter: 2Starting to Specify

    Ester2 - 12el Technologies

    Figure 2.5: New empty specification in SCADE Display Editor

    5 Set the main window into full screen by clicking the Windows Maximize button.

    To save the specification

    1 Click Save from the File toolbar or select File > Save.

    2 In the pop-up window, type Counter.sgfx in the File name field and browse for folder location.

    3 Click Save to save the specification.

    For more information about specifications, see Chapter 3 about Working with Specifications and Layers from SCADE Display User Manual.

    NoteThe specification is created with one layer and its default ratio is 1x1 (i.e. 1 user unit = 1 pixel). Thus, all the dimensions in this tutorial are expressed in pixel. If you create a specification with different ratio, then the dimensions given in the manual must be adapted accordingly. Consult the SCADE Display User Manual for more explanations.

  • Creating Counter: 2Drawing the Background of the Counter

    For more information about the SCADE Display General User Interface, see Chapter 2 about Discovering SCADE Display User Interface.

    Dra

    TipGetting Started with SCADE Display2 - 13

    Now, you can continue with Drawing the Background of the Counter on page 13.

    wing the Background of the CounterThis section shows you the basics of drawing in SCADE Display. You will learn how to create simple objects, define their attributes and set their properties. You will also learn how to replicate, group, and rename objects.

    CONCEPTS

    This lesson covers the following topics:

    Symbology basic primitives Object attributes and Object properties Objects grouping

    AIM OF EXERCISES

    Draw simple objects Set objects attributes and properties Replicate, group, and rename objectsYou will learn the basics of drawing in SCADE Display in the following exercises:

    Exercise 2.3: Setting Object Attributes Exercise 2.4: Drawing the First Arc Exercise 2.5: Setting Objects Properties Exercise 2.6: Setting the Grid Options Exercise 2.7: Replicating Objects Exercise 2.8: Grouping Objects

    If you need help to understand the graphics terms used in this manual, consult the SCADE Products Glossary from the Help menu by opening Manuals in PDF Documentation.

  • Creating Counter: 2Drawing the Background of the Counter

    Ester2 - 14

    Exercise 2.9: Naming Objects

    Exercise 2.3: Setting Object AttributesThis exercise shows you how you can define the graphical attributes of an object before or el Technologies

    after drawing it.

    To select the attributes of the first object

    1 In the Object Attributes area (see Figure 2.6), click Outline color to open an outline color chooser.

    Figure 2.6: Selecting an outline color in the Object Attributes area

    2 Select a white color.

    3 Click Filling Color and select No Fill from the filling color chooser.

    4 Click Line Width drop-down list.

    TipA contextual help is supplied with a tooltip. Click on the Contextual Help button in the Help toolbar. The mouse pointer transforms to . Click then on an area or an element of the GUI to get information in the online help.

  • Creating Counter: 2Drawing the Background of the Counter

    ExerciGetting Started with SCADE Display2 - 15

    Figure 2.7: Selecting a line width

    5 Select the line width 3.For more information about the Object Attributes area, see Object Attributes Area on page 54 from SCADE Display User Manual.

    For more information about object attributes, see Editing Objects Graphical Attributes on page 117.

    Now, you can continue with Drawing the First Arc.

    se 2.4: Drawing the First ArcThe Object Palette contains several tabs that allow you to select the type of object you want to draw. The Primitives tab contains the basic primitives available in SCADE Display.

    To draw the first arc

    1 In the Primitives tab of the Object Palette, select an Arc .

  • Creating Counter: 2Drawing the Background of the Counter

    Ester2 - 16el Technologies

    Figure 2.8: Selecting an arc primitive

    2 Click once on the center of the Visualization area (where the two red dashed lines intersect) to set the center of the arc.

    TipYou can extend the Object Palette by dragging the handles.

  • Creating Counter: 2Drawing the Background of the CounterGetting Started with SCADE Display2 - 17

    Figure 2.9: Drawing the arc in the Visualization area

    3 Click then on the middle of the upper-right quarter of the Visualization area to set the radius of the arc and its start point, as show on Figure 2.10.

    4 Click on the middle of the lower-left quarter to set the arc end point.

    Figure 2.10: Drawn arc

    In SCADE Display, you will handle all the objects the same way.

    For more information about the Visualization area, see Visualization Area on page 18 from SCADE Display User Manual.

    For more information about primitives, see section Drawing Primitives on page 156.

  • Creating Counter: 2Drawing the Background of the Counter

    Ester2 - 18

    Exercise 2.5: Setting Objects PropertiesYou have created an arc but its parameters have been roughly set through mouse positioning. In the Visualization area, you can notice that the control points of the arc are displayed. It indicates that the object is selected. You can now set more precisely its el Technologies

    properties.

    Figure 2.11: Arc control points

    To give accurate coordinates

    1 Select the Properties tab in the Object Information area.

    Figure 2.12: Properties tab

    NoteYou can set an objects properties only once it is drawn, not before.

  • Creating Counter: 2Drawing the Background of the Counter

    2 In the View property, click the drop-down list and select the From center value.

    3 Next to the Center property, do the following to set its value:

    set its horizontal coordinate by entering 0 in the first numerical field and press Getting Started with SCADE Display2 - 19

    Enter to validate, set its vertical coordinate by entering 0 in the second numerical field and press Enter to validate.

    4 Set the value of the other properties in the same way:

    Radius to 100, Start angle to 45, End angle to 225.

    Figure 2.13: Dimensioned arc

    For more information about the Properties tab, see Properties Panel on page 72 from SCADE Display User Manual.

    For more information about object properties, see About Properties Types on page 134.

    Now, you can continue with Exercise 2.6: Setting the Grid Options.

    TipWhen setting control points from the objects properties, it is highlighted with a red square in the visualization area, allowing to quickly identify which point is being edited.

  • Creating Counter: 2Drawing the Background of the Counter

    Ester2 - 20

    Exercise 2.6: Setting the Grid OptionsYou can access the grid options from the Grid toolbar. The grid allows positioning primitives precisely through mouse positioning thanks to the grid attraction. This feature is based on a virtual grid that attracts the mouse so that points handled through the mouse

    Exerciel Technologies

    are positioned exactly on the nearest grid nodes.

    To set the Snap to Grid feature

    1 In the Grid toolbar, click Show/Hide Grid to display the grid.

    2 Click Snap to Grid to switch the feature on.

    3 Set the grid dimension to 20.0 in the Grid Dimension text-field.The grid-related buttons now look like:

    For more information about the Snap to Grid feature, see Setting Grid options on page 288 from SCADE Display User Manual.

    For more information about SCADE Display toolbars, see Toolbars on page 39.

    Now, you can continue with Exercise 2.7: Replicating Objects.

    se 2.7: Replicating ObjectsNow, you have to draw the graduations of the counter. But rather than drawing each graduation along the arc, you can draw only one graduation and then replicate it.

    To draw the first graduation

    1 Select Broken Line from the Primitives tab in the Object Palette.

    2 In the Visualization area, click once on the upper point of the arc.

    3 Click on the first grid point below the previous point.

    4 Right-click to finish the broken line.

  • Creating Counter: 2Drawing the Background of the CounterGetting Started with SCADE Display2 - 21

    Figure 2.14: Drawing the first graduation

    For more information about the Broken Line primitive, see section Drawing Line on page 161 from SCADE Display User Manual.

    Now, you can replicate the graduation you have just drawn. Its control points should be displayed. If not, click on the graduation to select it.

    To replicate the graduation

    1 Select the broken line in the Visualization area to select it.

    2 Select Edit > Replicate (shortcut Ctrl+R).

    The Replication Parameter Definition window appears:

    Figure 2.15: Replication parameter definition window

    3 Set the Number of copies to 3.

  • Creating Counter: 2Drawing the Background of the Counter

    Ester2 - 22

    4 Select the Rotate radio-box to indicate that the replication is rotation-based.

    5 Set the Angle value to -15 to indicate that the copies are rotated by -15.6 Click OK.el Technologies

    Figure 2.16: Replicating the graduations

    To replicate the last graduations

    1 Click on the first graduation again to select it.

    2 Select Edit > Replicate.

    3 Set the Number of copies to 9 in the Replication Parameter Definition window.4 Set the Angle value to 15 to indicate that the copies are rotated by 15 and click OK.

    Figure 2.17: Graduated arc

    For more information about replication, see Replicating Operations on page 295 from SCADE Display User Manual.

  • Creating Counter: 2Drawing the Background of the Counter

    Exercise 2.8: Grouping ObjectsGrouping objects consists of setting objects as children of a basic container. You will create a first group containing the objects forming the counter contour and a second group containing the graduations.Getting Started with SCADE Display2 - 23

    To group the counter contour

    1 Select the arc in the Visualization area.

    2 Hold the Shift key down and click on the first line.3 Hold the Shift key down and click on the last line. The three items are now selected. Figure 2.18 describes the selected objects in the Visualization area and in the Structure tree:

    Figure 2.18: Selecting objects

    4 Click Group in the Group toolbar (shortcut Ctrl+G).

    The objects are now grouped:

    TipWhen selecting an object in the Structure tree, its controls points are displayed in the Visualization area.

  • Creating Counter: 2Drawing the Background of the Counter

    Ester2 - 24el Technologies

    Figure 2.19: Objects grouping

    For more information about the Group toolbar, see Group Toolbar on page 47 from SCADE Display User Manual.

    For more information about the Structure tree, see Structure Panel on page 55.

    For more information about grouping, see Grouping Objects on page 270.

    Now, you can group the graduations.

    To group the graduations

    1 Select the first line item from the Structure tree.

    2 Hold the Shift key down and select the last line item. All the other graduations are selected:

  • Creating Counter: 2Drawing the Background of the Counter

    ExerciGetting Started with SCADE Display2 - 25

    Figure 2.20: Graduations selection

    3 Click Group in the Group toolbar to group all the selected objects.

    Figure 2.21: Grouping the graduations

    Now, you can continue with Exercise 2.9: Naming Objects.

    se 2.9: Naming ObjectsIn this exercise, you will rename the objects through the Structure tree.

    To name the groups

    1 Select the first group item of the Structure tree and press F2 to enable an editable text-field.

    2 Type Counter contour.3 Press Enter to validate the new name.

  • Creating Counter: 2Drawing Needle Areas

    Ester2 - 26

    4 Repeat steps 1-3 with the other group item and name it Graduations.

    Drael Technologies

    Figure 2.22: Group naming

    For more information about the naming objects, see Grouping Objects on page 270 from SCADE Display User Manual.

    Now, you can continue with Drawing Needle Areas.

    wing Needle AreasThis section shows you how to realize advanced operations on objects like duplicating and bringing to front an object that is dissimulated under others.

    CONCEPTS

    This lesson covers the following topics: Duplicating objects Arranging objects

    AIM OF EXERCISES

    Duplicate objects Bring objects to frontYou will learn how to draw the needle areas in these exercises:

    Exercise 2.10: Duplicating Objects Exercise 2.11: Arranging Objects

  • Creating Counter: 2Drawing Needle Areas

    Exercise 2.10: Duplicating ObjectsNow, you will draw the needle areas of the counter. As for the graduations, you can draw a first needle area and then duplicate it as many times as you need.Getting Started with SCADE Display2 - 27

    To set the first needle area attributes

    1 Click on the background of the Visualization area (i.e. on an area where no object is drawn) to deselect any item.

    2 Click Outline Color and click No Line.

    3 Click Filling Color and select an amber color.

    4 Click Crown in the Primitives tab.

    You can now draw the needle area.

    To draw the first needle area

    1 Click once in the center of the Visualization area to set the crown center.

    2 Click near the upper end of the arc to set the crown start point.

    3 Click near this point, but closer to the center to define the crown thickness.

    4 Click on the lower end of the arc to define the crown end point.

    Figure 2.23: Drawing the first needle area

    TipWhile creating the crown object, clicking right enables to undo previous point setting.

  • Creating Counter: 2Drawing Needle Areas

    Ester2 - 28

    Finally, set more precisely the properties of the crown in the Properties tab.

    To set the first needle area properties

    1 Select From center in the View property.el Technologies

    2 Set the Center (x,y) to 0, 0.3 Set the Radius to 100.4 Set the Start angle to 45.5 Set the End angle to 225.6 Set the Thickness to 12.For more information about the crown primitive, see Drawing Crown on page 176 from SCADE Display User Manual.

    You can now duplicate the crown in order to draw the other needle areas. Select the crown if it is not already selected.

    To duplicate the first needle area

    1 Select the crown object in the Visualization area.

    2 Select Edit > Duplicate (shortcut Ctrl+D).

    3 This action creates a new crown, next and identical to the first one.

    Figure 2.24: Duplicating the first crown

    4 Select a red filling color .

    5 In the Properties tab, select From center in the View property.

  • Creating Counter: 2Drawing Needle Areas

    6 Set the Center (x,y) to 0, 0.7 Set the Radius to 100.8 Set the Start angle to 45.Getting Started with SCADE Display2 - 29

    9 Set the End angle to 90.The resulting crown is shown in Figure 2.25.

    Figure 2.25: Drawing the second needle area

    You can duplicate the second crown to create the third needle area.

    To draw the third needle area

    1 Select the red crown object in the Visualization area.

    2 Select Edit > Duplicate (shortcut Ctrl+D).

    3 Select a green filling color .

    4 In the Properties tab, set the View property to From center.

    5 Set the Center (x,y) to 0, 0.6 Set the Radius property to 100.7 Set the Start angle to 135.8 Set the End angle to 225.The resulting crown is:

  • Creating Counter: 2Drawing Needle Areas

    Ester2 - 30

    Exerciel Technologies

    Figure 2.26: Drawing the third area

    For more information about duplicating primitives, see Basic Editing Features on page 292 from SCADE Display User Manual.

    Now, you can continue with Exercise 2.11: Arranging Objects.

    se 2.11: Arranging ObjectsArranging objects consists of changing their drawing order. Currently, the needle areas hide the counter outline. This exercise shows you how to bring the counter outline to front to make it visible.

    To bring the counter outline over the three needle areas

    1 Select the Counter contour in the Structure tree.

    2 Select Transform > Arrange > Bring to Front to bring the Counter contour group at the bottom/end of the tree (i.e., the last drawn object).

    Figure 2.27: Bringing the counter contour to front

    In the Visualization area, the counter contour is now visible as shown in the figure below.

  • Creating Counter: 2Drawing the Needle

    DraGetting Started with SCADE Display2 - 31

    Figure 2.28: Bringing the counter outline over the needle areas

    Now, you can continue with Drawing the Needle.

    wing the NeedleThis section teaches you how to create a rotation container and how to define and plug a variable to an object.

    CONCEPTS

    This lesson covers the following topics:

    Surface graphical attributes Rotation container Plugs

    AIM OF EXERCISES

    Draw a shape and set its properties Set rotation container parameters Create a plug variable Plug an objectYou will learn how to draw and plug the needle in these exercises:

    Exercise 2.12: Drawing the Needle Exercise 2.13: Plugging Needle

  • Creating Counter: 2Drawing the Needle

    Ester2 - 32

    Exercise 2.12: Drawing the NeedleThis exercise shows you how to draw a shape and define its rotation.

    To set the needle shape attributesel Technologies

    1 Click on an empty space in the Visualization area to deselect all items.

    2 Click Snap to Grid to set it off.

    3 Select a white filling color .

    4 In the Object Attributes area, click Polygon Smooth to switch it on:

    5 In the Primitives tab, click Shape .

    You can now draw the needle.

    To draw the needle shape

    1 Click in lower left side of the center of the Visualization area to draw the lower left point of the needle.

    2 Click to draw the upper left point.

    3 Click to draw the center point.

    4 Click to draw the upper right point.

    5 Click to draw the lower right point.

    6 Right-click to finish the shape.

    Figure 2.29: Needle shape

  • Creating Counter: 2Drawing the Needle

    Finally, set more precisely the needle properties in the Properties tab.

    To set the needle properties

    1 Set (x1, y1) to -6, -12.Getting Started with SCADE Display2 - 33

    2 Set (x2, y2) to -6, 64.

    3 Set (x3, y3) to 0, 76.

    4 Set (x4, y4) to 6, 64.

    5 Set (x5, y5) to 6, -12.

    The resulting drawing is the following:

    Figure 2.30: Resulting drawing of the needle

    For more information about the Polygon Smooth feature, see Defining polygon smooth on objects on page 122 from SCADE Display User Manual.

    For more information about the Shape primitive, see Drawing Shape on page 183.

    To define the needle rotation

    1 Select the needle shape if it is not already selected.

    2 Click Snap to Grid to switch the feature on.

    3 Click the Containers tab in the Object Palette, and select Rotation Group .

  • Creating Counter: 2Drawing the Needle

    Ester2 - 34el Technologies

    Figure 2.31: Selecting a rotation group from the Containers tab

    4 Click once in the center of the Visualization area to set the container origin.

    5 Click on the middle of the upper right quarter of the Visualization area to position the rotation start axis so that its angle is 45.

    6 Click on the middle of the lower left quarter of the screen to position the rotation end axis so that its angle is 225.

    7 Click on the upper part of the vertical axis to position the rotation reference so that its angle is 90. The rotation container created contains now the needle.

    Figure 2.32: Drawing a rotation container

    Finally set more precisely the properties of the rotation container in the Properties tab.

  • Creating Counter: 2Drawing the Needle

    To set the rotation container properties

    1 Set the rotation container Origin to 0 and 0 and the Reference angle to 90.

    Exerci

    NoteGetting Started with SCADE Display2 - 35

    2 In the Start property sub-tree:

    Set the Angle to 45. Set the Functional value to 100. Set the Locked to True.

    3 In the End property sub-tree:

    Set the Angle to 225. Set the Functional value to 0. Set the Locked to True.

    For more information about Transformation containers, see Transformation Containers on page 213 from SCADE Display User Manual.

    For more information about the rotation group, see Drawing Rotation Group on page 224.

    Now, you can continue with Exercise 2.13: Plugging Needle.

    se 2.13: Plugging NeedleThis exercise teaches you how to associate the Needle with a variable so that the representation of the Needle changes according to the value of this variable.

    To plug the needle angle

    1 If the rotation container is not already selected, select the rotate group item in the Structure tree.

    2 Select the Plugs tab in the Object Information area.

    3 Click in the Functional value text-field and type value.

    The reference angle defines the reference axis with respect to the container origin. The reference axis is associated with the needle shape current position and is rotated: on the start axis (defined by the start angle) when the computed functional value is

    equal to its associated value, on the end axis (defined by the end angle) when the computed functional value is

    equal to its associated value.

  • Creating Counter: 2Drawing the Needle

    Ester2 - 36

    4 Press Enter to validate.At this time, the plug is displayed in red meaning that the type variable is not valid. Indeed, the value variable must be declared in the Variable Dictionary for the plug el Technologies

    (i.e., the association of the rotation container with the value variable) to be valid.

    Figure 2.33: Invalid plug in the Plugs tab

    5 Create a new variable in the Variable Dictionary:

    Click Add variable to create a new line in the dictionary. in the Name column and type value, in the Type column, select real (0.0 is default value),

    Figure 2.34: Creating value variable in the Variable Dictionary

  • Creating Counter: 2Drawing the Needle

    The line is now displayed in blue meaning that the plug is valid.Getting Started with SCADE Display2 - 37

    Figure 2.35: Valid plug in the Plugs tab

    6 Click onto the Properties tab to display the object properties again.

    The needle is thus configured to rotate according to the value of the value variable.For more information about plugging, see Plugging Objects Properties to Variables on page 147 from SCADE Display User Manual.

    For more information about rotation container plugging, see Drawing Rotation Group on page 224.

    To change the name of the needle rotation container

    1 In the Structure tree, double-click on the rotate group item to open an editable text-field.

    2 Type Needle and press Enter to validate.

    TipYou can also click Create variables in the Plugs tab to automatically create the value variable in the Variable Dictionary.

  • Creating Counter: 2Drawing the Label

    Ester2 - 38

    Drael Technologies

    Figure 2.36: Name changing

    3 Click Save to save the specification.

    Now, you can continue with Drawing the Label.

    wing the LabelThis section shows you how to create the label, to reuse an existing plug.

    CONCEPTS

    This lesson covers the following topics:

    Bi-font primitive Text-based graphical attributes Alignment

    AIM OF EXERCISES

    Draw text Align objects Reuse an existing plug variableYou will learn how to draw the label in these exercises:

    Exercise 2.14: Drawing the Label Exercise 2.15: Aligning Objects Exercise 2.16: Plugging Label Value

  • Creating Counter: 2Drawing the Label

    Exercise 2.14: Drawing the LabelThis exercise shows you how to draw a label with a value and a unit. Then you will learn how to reuse an existing variable and plug the label and the needle to the same variable.Getting Started with SCADE Display2 - 39

    To draw the label contour

    1 Deselect all the objects by clicking in an empty space in the Visualization area.

    2 Switch the Snap to Grid feature off.

    3 Select a white outline color:

    4 Select a grey filling color:

    5 Set the line width to 3: 6 In the Primitives tab, select Rectangle .

    7 Click on the lower-right quarter of the Visualization area to draw the upper-left point of the rectangle.

    8 Move the mouse cursor and click to draw its lower-right point.

    Figure 2.37: Drawing the label contour

    Finally, set the label contour properties in the Properties tab.

    To set the label contour properties

    1 Select Width and height in the View property.

    2 Set Origin (x,y) to 20, -20.3 Set Width to 60.4 Set Height to -36.

  • Creating Counter: 2Drawing the Label

    Ester2 - 40

    The resulting image is:el Technologies

    Figure 2.38: Resulting label contour

    For more information about the rectangle primitive, see Drawing Rectangle on page 180 from SCADE Display User Manual.

    To draw the value label

    1 Deselect all.

    2 Select Font T4 through the font chooser.

    3 Set the Text width drop-list to 3 4 Click Right Alignment to set the text horizontal alignment.

    5 Click Middle Alignment to set the text vertical alignment.

    6 In the Primitives tab, click Bi-font .

    7 Click on the middle of the right side of the rectangle contour in the Visualization area to define the origin of the bi-font.

    Finally, set the value label properties in the Properties tab:

    To set the value label properties

    1 Set Origin to 72 and -38.2 Type FFF in the Format property text-field.3 Set the Value to 100.4 Set the Leading zeros to False.

  • Creating Counter: 2Drawing the Label

    The resulting image is:Getting Started with SCADE Display2 - 41

    Figure 2.39: Drawing the label

    For more information about text-related attributes, see Defining Text-Based Attributes on page 132 from SCADE Display User Manual.

    For more information about the bi-font primitive, see Drawing Bi-font on page 197.

    To draw the unit label

    1 Deselect all.

    2 Select a blue outline color in the Object Attributes area.

    3 Select through the font chooser from the Object Attributes area.

    4 Set Text width to 3 .5 Click Left Alignment .

    6 Click Text in the Primitives tab.

    7 Click on the middle of the right side of the rectangle contour in the Visualization area to define the origin of the text.

    8 Type UNIT (in capitals).

    9 Press Enter to validate.

    TipPress Suppr to delete a character.

  • Creating Counter: 2Drawing the Label

    Ester2 - 42

    10 In the Properties tab, set the Origin (x,y) to 92, -38.The resulting text is:

    Exerciel Technologies

    Figure 2.40: Drawing the unit label

    For more information about the Text primitive, see Drawing Text on page 191 from SCADE Display User Manual.

    se 2.15: Aligning ObjectsThis exercise shows you how to align the value, the unit and the contour.

    To align the value, the unit and the contour

    1 Click (and maintain the mouse button clicked) on the upper left side of the label contour in the Visualization area.

    2 Release the mouse button on the lower right side of the label counter as shown on Figure 2.41.

    Figure 2.41: Selecting several objects

  • Creating Counter: 2Drawing the Label

    3 Click Middle Alignment or select Transform > Align > Middle to align the three objects horizontally.

    The objects are now perfectly aligned.

    ExerciGetting Started with SCADE Display2 - 43

    For more information about aligning objects, see Aligning on page 279 from SCADE Display User Manual.

    Now, you can plug the label. It must be plugged to the same variable as the needle. Since the plug value already exists, you can simply reuse it to plug the label value.

    se 2.16: Plugging Label ValueThis exercise teaches you how to reuse the existing value variable to plug the Label value.

    To plug the label value

    1 Select the bi-font and click the Plugs tab.

    2 Type value in the Value property text-field and press Enter to validate.

    Figure 2.42: Reusing existing variable to plug the label value

    TipYou can also press Ctrl+Space to complete the field automatically.

  • Creating Counter: 2Animating Display Specification

    Ester2 - 44

    The plug is valid as the value variable is already declared with the correct parameters in the Variable Dictionary.

    3 Click Save to save your work.

    Anim

    Exerciel Technologies

    As the needle, the counter value is now configured to change according to the value variable.

    Now, you can continue with Animating Display Specification.

    ating Display SpecificationYou can define a scenario and animate the display specification.

    CONCEPTS

    This lesson covers the following topics:

    Animation Animation scenario

    AIM OF EXERCISES

    Define a scenario for the animation Animate the specificationYou will learn how to draw the label in the following exercises:

    Exercise 2.17: Defining the Animation Scenario Exercise 2.18: Launching Specification Animation

    se 2.17: Defining the Animation ScenarioBefore launching the animation, you have to define the scenario through the Animation panel.

    To define the animation scenario

    1 Click Animate Layer from the Project toolbar to shift to animation mode.

    TipYou can also click the Animation tab in the General Information area to shift to animation mode.

  • Creating Counter: 2Animating Display Specification

    2 Set the value property to 100.3 Set the step property to 0.5.4 Set the bounds initial value to 0 and its final value to 100.Getting Started with SCADE Display2 - 45

    5 Set evolution to triangular.

    Figure 2.43: Animation panel

    Now, you can continue with Exercise 2.18: Launching Specification Animation.

  • Creating Counter: 2Animating Display Specification

    Ester2 - 46

    Exercise 2.18: Launching Specification AnimationNow that the scenario is defined, you can launch the animation of the specification.

    To launch the animation of the specificationel Technologies

    1 Click Play to start animating the specification.

    As the animation runs, you can see that the needle and the counter are animated according to the values of the value variable.

    Figure 2.44: Animating the counter

    2 Click Stop to stop the animation.

  • Creating Counter: 2Animating Display Specification

    To quit the animation mode

    Click on Stop from the Project toolbar or click the Structure tab.When you quit the animation mode, you shift back to the editing mode.Getting Started with SCADE Display2 - 47

    You have designed a complete functional counter that may be used to display information.

    For more information about the animation graphical interface, see Animation Panel on page 67 from SCADE Display User Manual.

    For more information about the animation itself, see Animating Model Design on page 366.

  • 3 Creating Reusable ObjectThis chapter teaches you how to create a reusable counter object from the counter

    Cre

    ExerciGetting Started with SCADE Display3 - 49

    specification you created in the previous chapter. The counter may be reused for various purposes. You will define its parameters:

    its value so that the counter may be plugged its unit so that the counter may be used for any kind of measure the limit of the Nominal (green), Warning (orange) and Danger (red) areasLearn the basics about creating a reusable object in:

    Creating Unit Parameter Creating Danger and Nominal Parameters Checking Specification Design Saving the Specification as Object

    ating Unit ParameterTo transform the unit label so that it may be instantiated with any kind of unit, you have to plug its text and connect it to a unit variable.

    AIM OF EXERCISES

    Create a new variable Plug this variable to text

    se 3.19: Plugging the Unit LabelTo plug the unit label

    1 Display the Structure tree.

    2 Select the UNIT item in the Visualization area.

    3 Select the Plugs tab and click in the Text text-field.

    4 Type unit and press Enter to validate.5 Click Create variables to create the unit variable in the Variable Dictionary.

  • Creating Reusable Object: 3Creating Danger and Nominal Parameters

    Ester3 - 50

    Creel Technologies

    Figure 3.45: Plugging the Unit label

    Now, you can continue with Creating Danger and Nominal Parameters.

    ating Danger and Nominal ParametersYou can use clip planes to create the Danger and Nominal parameters. Clip planes are masks that enable to hide parts of specifications. Creating those parameters using clip planes will allow us to make the counter areas appearance change according to a variable, without having to change the counter design.

    CONCEPTS

    This lesson covers the following topics:

    Context Masks

    AIM OF EXERCISES

    Display the content of a container Use clip-planes to mask objectsLearn how to create these parameters in the following exercises:

    Exercise 3.20: Modifying Danger and Nominal Areas Exercise 3.21: Clipping Areas Exercise 3.22: Rotating and Plugging the Danger Area Exercise 3.23: Rotating and Plugging the Nominal Area

  • Creating Reusable Object: 3Creating Danger and Nominal Parameters

    Exercise 3.20: Modifying Danger and Nominal AreasTo create the Danger parameter and the Nominal parameter, you have to modify the representation of their areas and group these two areas in the same container.Getting Started with SCADE Display3 - 51

    To modify the representation of the Danger area

    1 Click the red crown in Visualization area or in the Structure tree.

    2 Set the View property to From center in the Properties tab.

    3 Set the Start angle property to 45.4 Set the End angle property to 225.5 Double-click the red crown item in the Structure tree to rename it.

    6 Type Danger and press Enter to validate. You have defined the Danger area.

    To modify the representation of the Nominal area

    1 Click the green crown on the Visualization area.

    2 In the Properties tab, set the View property to From center.

    3 Set the Start angle property to 45.4 Set the End angle property to 225.5 Double-click the green crown item in the Structure tree to rename it.

    6 Type Nominal and press Enter to validate. You have defined the Nominal area.

    To group the two areas

    1 In the Structure tree, click the Danger item.

    2 Hold the shift or Control key down and click the Nominal item.3 Select Group .

    The objects are now grouped as shown on Figure 3.46:

  • Creating Reusable Object: 3Creating Danger and Nominal Parameters

    Ester3 - 52

    Exerciel Technologies

    Figure 3.46: Grouping the two needle areas

    Now, you can continue with Exercise 3.21: Clipping Areas.

    se 3.21: Clipping AreasYou can use clipping masks to hide a part of the display object.

    To clip the areas

    1 Select the Danger item in the Structure tree to set the created group as the current context.

    As you can notice, only the Danger area and the Nominal area are now visible in the Visualization area (however, the Danger area is invisible since hidden, or actually drawn behind the Nominal area). This is because you are in the created group context (highlighted in green).

    When you select an object (highlighted in light blue in the Structure tree), you automatically set the container that contains that object as the current context (highlighted in green) and only the objects contained in that container are visible in the Visualization area.

    2 Select the Masks tab in the Object Palette.

    Tips To show/hide the content of a container in the structure tree, click / in

    front of that container. Use the left, right, up, and down arrow keys to navigate through the tree: up /

    down to select the object located over / below the currently selected object in a given context, and right / left to enter and leave a container.

  • Creating Reusable Object: 3Creating Danger and Nominal ParametersGetting Started with SCADE Display3 - 53

    Figure 3.47: Masks tab from the Object Palette

    3 Click Clip plane to create the clip plane.

    4 Click on the middle of the upper right quarter of the Visualization area to position the clip plane start point.

    5 Click on the middle of the lower left quarter of the Visualization area to position the clip plane end point.

    6 In the Properties tab, set the Start point (x, y) to 40, 40.7 Set the Angle to 225.The resulting clip plane is:

    Figure 3.48: Resulting clip plane

    For more information about clip-planes, see Drawing Clip Plane on page 205 from SCADE Display User Manual.

    Now, you can continue with Exercise 3.22: Rotating and Plugging the Danger Area.

  • Creating Reusable Object: 3Creating Danger and Nominal Parameters

    Ester3 - 54

    Exercise 3.22: Rotating and Plugging the Danger AreaConfigure and plug the Danger area so that it rotates according to the value of the variable it is connected to.el Technologies

    To rotate the danger area

    1 Click the Danger item in the Structure tree.

    2 Click the Containers tab in the Object Palette to display its content.

    3 Click Rotation group to create a rotation container that contains the Danger area.

    4 Click on the middle of the upper right quarter of the Visualization area to position the rotation start axis so that its angle is 45 (use the grid to do so).

    5 Click twice on the middle of the lower left quarter of the Visualization area to position the rotation end axis and the rotation reference axis so that their angles are 225 (use the grid to do so).

    6 In the Properties tab, set:

    Reference angle to 225 Angle to 45 in the Start sub-tree Functional value to 100 Locked to True Angle to 225 in the End property sub-tree Functional value to 0 Locked to True Orientation to Counterclockwise

    The resulting rotation container is depicted on the right picture.

  • Creating Reusable Object: 3Creating Danger and Nominal Parameters

    ExerciGetting Started with SCADE Display3 - 55

    Figure 3.49: Resulting rotation container 1

    To plug the danger area rotation

    1 Select the created rotate group item in the Structure tree.

    2 Select the Plugs tab.

    3 Click in the Functional value text-field.

    4 Type danger in the text-field and press Enter to validate.5 Click Create variables to create the danger variable in the Variable Dictionary

    automatically.

    6 Select the Properties tab to display the properties again.

    The Danger area is thus configured to rotate according to the value of the danger variable.

    Now, you can continue with Exercise 3.23: Rotating and Plugging the Nominal Area.

    se 3.23: Rotating and Plugging the Nominal AreaAs in the previous exercise, configure and plug the Nominal area so that it rotates according to the value of the variable it is connected to.

    To rotate the nominal area

    1 Select the Nominal item in the Structure tree.

  • Creating Reusable Object: 3Creating Danger and Nominal Parameters

    Ester3 - 56

    2 Click Rotation group in the Containers tab to create a rotation container containing the Nominal area.

    3 Click in the upper right part of the Visualization area to position the rotation start axis el Technologies

    so that its angle is 45 (use the grid to do so).

    4 Click twice in the lower left part of the Visualization area to position the rotation end axis and the rotation reference axis so that their angles are 225 (use the grid to do so).

    5 In the Properties tab, set:

    Reference angle to 45 Angle to 45 in the Start sub-tree Functional value to 100 Locked to True Angle to 225 in the End sub-tree Functional value to 0 Locked to True Orientation to Counterclockwise

    The resulting rotation container is:

    Figure 3.50: Resulting rotation container 2

    To plug the nominal area rotation

    1 Select the second rotate group item and select the Plugs tab.

  • Creating Reusable Object: 3Creating Danger and Nominal Parameters

    2 Click in the Functional value text-field.

    3 Type nominal in the text-field and press Enter to validate.4 Select the Properties tab to display the properties again.Getting Started with SCADE Display3 - 57

    The Nominal area is now configured to rotate according to the value of the nominal variable.

    To name the containers

    1 Double-click the group item of the Structure tree.

    2 Type Areas and press Enter to validate the new name.

    3 Repeat steps 1-2 with:

    the orange crown item and name it Static area the first rotate group and name it Danger area the second rotate group and name it Nominal area

    The resulting structure is described on the following picture:

    Figure 3.51: Structure tree

    Now, you can continue with Saving the Specification as Object.

  • Creating Reusable Object: 3Checking Specification Design

    Ester3 - 58

    Checking Specification DesignYou can check the design of the specification and correct any error encountered by the Design Checker.

    Exerciel Technologies

    CONCEPTS

    This lesson covers the following topics:

    Design Checker

    AIM OF EXERCISE

    Checking automatically the specification design through Design CheckerThe following exercises show you how to save the specification as an object:

    Exercise 3.24: Launching Design Checker

    se 3.24: Launching Design Checker Check the layer design to verify that the specification contains no error.

    To check the specification design

    1 In the Structure tree, select symbology_layer, the root node of the specification to set it as the current context.

    2 Click Check Layer from the Project toolbar or select Project > Checker > Check Layer to launch the Design Checker on the whole layer.

  • Creating Reusable Object: 3Checking Specification DesignGetting Started with SCADE Display3 - 59

    Figure 3.52: Errors found by Design Checker

    3 Click the object Static in the bottom-right part of the window to show the related object in the specification.

    4 In the Object Attributes area of the SCADE Display window, click Polygon Smooth to switch this feature off:

    5 Click Next to display the second error encountered by the Design Checker.

    6 Repeat steps 4 - 5 to fix the error in the object rectangle.

    7 Click Close to finish the automatic design checking.

  • Creating Reusable Object: 3Saving the Specification as Object

    Ester3 - 60

    Saving the Specification as ObjectYou can save a specification or a part of a specification as an object. This is then called a Reference Object and you can reuse it in other specifications.

    Exerciel Technologies

    CONCEPTS

    This lesson covers the following topics:

    Reference object

    AIM OF EXERCISES

    Create a top-level container Save the specification as an objectThe following exercises show you how to save the specification as an object:

    Exercise 3.25: Creating a Top-Level Container Exercise 3.26: Saving the Specification as Object

    se 3.25: Creating a Top-Level ContainerCreate a top-level container containing all the objects that compose the counter before saving it as an object.

    To create a top-level container

    1 Click on the Graduations item of the Structure tree to select it.

    2 The root node of the specification is now the current container.

    3 Select Edit > Select All to select all the item of the current container. and click Group .

    The objects are now grouped as shown on the picture below.

  • Creating Reusable Object: 3Saving the Specification as Object

    ExerciGetting Started with SCADE Display3 - 61

    Figure 3.53: Top-level container

    Now, you can continue with Exercise 3.26: Saving the Specification as Object.

    se 3.26: Saving the Specification as ObjectNow you can save the specification as a reference object.

    To save the specification as an object

    1 Select the created group container.

    2 Select File > Save As Reference Object.

    3 Create a sub-folder in the specification current directory and name it Reference Objects.

    4 Type counter_ref.ogfx in the File Name field and save the file in a sub-directory named Reference Objects.

    For more information about saving as object, see Chapter 7 about Working with Reference Objects from SCADE Display User Manual.

    NoteThe file extension is not .sgfx, the standard SCADE Display file extension but .ogfx that is the format dedicated to objects.

  • 4 Reusing Counter ObjectThis chapter teaches you how to reuse the counter object you created in the

    Cre

    ExerciGetting Started with SCADE Display4 - 63

    previous chapter, and how to animate it. From the existing counter object, you will specify two new counters in a new specification.

    Learn the basics about reusing an object and about animation in:

    Creating Blank Specification Creating Volt Counter Creating Hertz Counter Animating the Volt and Hertz Counters Generating Specification Code

    ating Blank SpecificationYou can reuse the counter in a new blank specification.

    se 4.27: Creating New SpecificationTo create a new specification

    1 Select File > Close All to close all opened specifications.

    2 Select File > New to create a new specification.

    3 Double-click the 768x768 specification template in the Create New Specification window.

    4 Save the new specification as TwoCounters.sgfx.

  • Reusing Counter Object: 4Creating Volt Counter

    Ester4 - 64

    Creating Volt CounterYou can modify the counter parameters and associate a variable to its value in order to instantiate a Volt counter.

    Exerciel Technologies

    CONCEPTS

    This lesson covers the following topics:

    Reference container

    AIM OF EXERCISES

    Instantiate a reference object Plug a reference objectYou will learn how to reuse the counter in these exercises:

    Exercise 4.28: Instantiating Volt Counter Exercise 4.29: Plugging the Volt Counter

    se 4.28: Instantiating Volt CounterYou can insert or instantiate a saved reference object through a specific type of containers called reference containers.

    To instantiate the counter

    1 Click Reference from the References tab in the Object Palette.

  • Reusing Counter Object: 4Creating Volt CounterGetting Started with SCADE Display4 - 65

    Figure 4.54: Inserting a reference object

    2 In the file chooser that opens, browse and select the counter_ref.ogfx file that you created in the previous section.

    3 Click Open to import the object as a reference object.

    4 Click on the upper left quarter of the Visualization area to instantiate the counter.

    Figure 4.55: Instantiating the Counter object

    To set the Volt counter parameters

    1 Select the Counter item in the Structure tree or in the Visualization area if it is not already selected.

    2 In the Properties tab, set counter properties as follows:

    set the Origin to -140, 80.

  • Reusing Counter Object: 4Creating Volt Counter

    Ester4 - 66

    set the danger parameter to 90. set the nominal parameter to 75. type V in the unit parameter text-field.

    Exerciel Technologies

    set the value parameter to 0.The resulting counter is shown in the following figure:

    Figure 4.56: Resulting Volt counter

    For more information about reference containers, see Drawing Containers on page 210 from SCADE Display User Manual.

    Now, you can continue with Exercise 4.29: Plugging the Volt Counter.

    se 4.29: Plugging the Volt CounterPlug the reference container so that it rotates according to the value of the variable it is connected to.

    To plug the Volt counter

    1 Select the Counter_ref item in the Structure tree, press F2, and rename it Volt counter.

    2 Display the content of the Plugs tab, type volt in the value text-field, and press Enter to validate.

    3 Click Create variables to create the volt variable in the Variable Dictionary.4 Select the Properties tab to display the properties again.

  • Reusing Counter Object: 4Creating Hertz Counter

    The Volt counter is thus configured to change according to the value of the volt variable.

    Now, you can continue with Creating Hertz Counter.

    Cre

    ExerciGetting Started with SCADE Display4 - 67

    ating Hertz CounterProceed as in the previous exercise to instantiate a Hertz counter to display the frequency.

    Learn how to instantiate the Hertz counter in these exercises:

    Exercise 4.30: Instantiating the Hertz Counter Exercise 4.31: Plugging the Hertz Counter

    se 4.30: Instantiating the Hertz CounterTo instantiate the Hertz counter

    1 Click Reference container to create a new reference container.

    2 In the file chooser that opens, select the counter_ref.ogfx file that you created in the previous section.

    3 Click Open to import the object as a reference object.

    4 Click on the upper right quarter of the Visualization area to instantiate the counter.

    To set the Hertz counter parameters

    1 Select the Counter_ref item in the Structure tree or in the Visualization area if it is not already selected.

    2 In the Properties tab, set counter properties as follows:

    set the Origin to 120, 80. set the danger parameter to 75. set the nominal parameter to 50. type HZ in the unit parameter text-field. set the value parameter to 0.

    The resulting counter is:

  • Reusing Counter Object: 4Creating Hertz Counter

    Ester4 - 68

    Exerciel Technologies

    Figure 4.57: Resulting Hertz counter

    Now, you can continue with Exercise 4.31: Plugging the Hertz Counter.

    se 4.31: Plugging the Hertz CounterTo plug the Hertz counter

    1 Select the Counter item in the Structure tree.

    2 Click it once again to enter edit mode (or press F2) and rename it Hertz.3 In the Plugs tab, click in the value text-field and type hertz and press Enter to

    validate.

    4 Click Create variables to create the hertz variable in the Variable Dictionary.5 Select the Properties tab to display the properties again.

    6 Click Save to save the specification.

    The Hertz counter will thus change according to the value of the hertz variable. Now, you can continue with Animating the Volt and Hertz Counters.

  • Reusing Counter Object: 4Animating the Volt and Hertz Counters

    Animating the Volt and Hertz CountersFinally, once the image is completely specified, you can animate it. You can define the scenarios for the Volt and Hertz counters and launch the animation.

    ExerciGetting Started with SCADE Display4 - 69

    se 4.32: Defining Scenarios and Launching AnimationTo define the Hertz counter animation scenario

    1 Select the Animation tab to display its content.

    The Hertz variable is already selected in the Variable Selection area.

    Figure 4.58: Animation panel

    2 Set the value property to 0 in the Scenario Definition area.3 Set the step property to 0.5.4 Set the bounds property to 0 and 100.5 Set the evolution property to triangular.

  • Reusing Counter Object: 4Animating the Volt and Hertz Counters

    Ester4 - 70

    To define the Volt counter animation scenario

    1 Select the volt variable from the Variable Selection area.

    2 Set the value property to 0 in the Scenario Definition area.el Technologies

    3 Set the step property to 1.4 Set the bounds property to 0 and 75.5 Set the evolution property to triangular.

    6 Click Play in the Animation Control area to run the animation.

    In the Visualization area, both needles are animated according to the values of the volt and hertz variables.

    7 Click Stop the Animation Control area to stop the animation.

    Figure 4.59: Volt and Hertz counters

  • Reusing Counter Object: 4Generating Specification Code

    Generating Specification CodeFinally, once the specification is complete, you can produce source C code of the specification using SCADE Display KCG Code Generator.

    ExerciGetting Started with SCADE Display4 - 71

    CONCEPTS

    This lesson covers the following topics:

    Code generation

    AIM OF EXERCISES

    Generate specification code Generate resource tables codeYou will learn how to generate the specification code in this exercise:

    Exercise 4.33: Launching Specification Code Generation Exercise 4.34: Launching Resource Tables Code Generation

    se 4.33: Launching Specification Code GenerationTo launch specification code generation

    1 Click Generate Specification Code from the Project toolbar or select Project > Code Generator > Generate Specification Code.

    The Console panel displays automatically, showing information messages and the results of the code generation process.

    Figure 4.60: Specification code generation console

    2 Click Close to close the Console window.

  • Reusing Counter Object: 4Generating Specification Code

    Ester4 - 72

    SCADE Display KCG generates the C files in a directory named TwoCountersCode, i.e., after the name of the current specification. This output directory is automatically created in the directory of the current specification.

    Exerciel Technologies

    se 4.34: Launching Resource Tables Code GenerationTo launch resource tables code generation

    1 Select Project > Code Generator > Generate Resource Tables Code.

    The Console panel displays automatically, showing information messages and the results of the code generation process.

    Figure 4.61: Resource tables code generation console

    2 Click Close to close the Console window.

    SCADE Display KCG generates the resources files in the same directory as the specification code.

    You have designed a display specification based on the reusable component previously specified and completed the Getting Started with SCADE Display. You have seen how to create, design, check, animate, and generate a display specification. You have also seen how to create and reuse reference objects. You are now ready to design your own display specification.

    If you need to learn more about SCADE Display design environment and tools, please refer to the complete SCADE Display documentation set available in PDF format, or browse in the contents of the SCADE Display Help interface.

  • 5 Adding Interaction to CounterThis chapter teaches you how you can add interaction into the counters display

    CreGetting Started with SCADE Display5 - 73

    your created previously. First, you will create an interactive InOutButton button and add it to the counters display. Then, you will use SCADE Suite to co-simulate a model with the counters display interactively.

    Learn the basics about interaction in:

    Creating Interactive InOutButton Object Reusing InOutButton Reference Object Co-Simulating your Display with SCADE Suite

    ating Interactive InOutButton ObjectThis section explains how to create an Object specification containing the graphical specification of a simple interactive button with In/Out positions.

    CONCEPTS

    This lesson covers the following topics:

    Conditional group Variable expressions Interactivity in the display

    AIM OF EXERCISES

    Design the graphics for both InPosition and OutPosition cases Define a conditional group that allows selecting between both cases Define interaction with the mouse using an active area

    NoteIf you do not have a license for using SCADE Suite, you cannot generate and build the simulation executable. However, if you wish to see an example of what the display in this tutorial would look like as an executable file, you will find a copy of this file, named RootOperator.exe, in the examples/GettingStarted/Display/Standalone Exe folder of your SCADE installation.

  • Adding Interaction to Counter: 5Creating Interactive InOutButton Object

    Ester5 - 74

    Learn the basics of creating interactive objects in SCADE Display in the following exercises:

    Exercise 5.35: Drawing Button Graphics with In/Out Positions

    Exerciel Technologies

    Exercise 5.36: Defining InOutButton Active Area

    se 5.35: Drawing Button Graphics with In/Out PositionsThe purpose of this exercise is to create a new specification containing the graphics for a button with In and Out positions.

    To draw the graphics for the OutPosition case

    1 Click New from the File toolbar or select the File > New menu.

    2 In the Create New Specification window that opens, double-click the 768x768 Object template.

    The object specification is an OGFX file. Object specifications are always created with a group in the layer as shown in Figure 5.62:

    Figure 5.62: Object specification containing a group by default

    3 In the Structure tree, rename the group item as InOutButton.4 Set the InOutButton group as the context by right-clicking it and selecting Set

    Context > Object from the contextual menu.

    5 In the object attributes area, select GREY3 (dark grey) as fill and line colors, set the Line Width to 8.

    6 In the Object Palette, click Rectangle and draw a rectangle in the center of the Visualization area,

  • Adding Interaction to Counter: 5Creating Interactive InOutButton Object

    7 Set the rectangle properties from the Properties tab:

    select Width and height in the View property, set the Origin to -60.0 and -30.0, Getting Started with SCADE Display5 - 75

    set the Width to 120.0 and the Height to 60.0.

    Figure 5.63: Drawing the shape of the buttons Out position

    8 In the Object Palette, select a Text primitive, click in the center of the rectangle, and type OUT.

    9 Set the label attributes as follows

    set the line color to WHITE3. set the Font to Font T2, the Text width to 5, the Text Horizontal Alignment to Center, and the Text Vertical Alignment to Middle.

    Figure 5.64: Graphics of the OutPosition case

  • Adding Interaction to Counter: 5Creating Interactive InOutButton Object

    Ester5 - 76

    10 Align the text and rectangles objects in the center and in the middle ,

    11 Group them in a new group named OutPosition.el Technologies

    Figure 5.65: Grouping the graphical elements of the buttons Out position

    To draw the graphics for the InPosition case

    1 Duplicate the OutPosition group by selecting it in the Structure area and press Ctrl+D or select the Edit > Duplicate menu.

    2 Invert the rectangle color by selecting a GREY1 fill color in the object attributes area.3 Change the label by typing IN in the Text property of the text object.4 In the Structure tree, rename the group as InPosition and set its origin to 0 and 0

    in the Properties tab.

  • Adding Interaction to Counter: 5Creating Interactive InOutButton ObjectGetting Started with SCADE Display5 - 77

    Figure 5.66: Graphics of the InPosition case

    To define the OutPosition and InPosition groups in a conditional group

    1 Select the OutPosition group in the Structure tree, press CTRL, and click the InPosition group to have both groups selected.

    2 Click Conditional Group in the Containers tab of the Object Palette.

    3 Name the new conditional group Graphics 4 In the Properties tab, under the Indexes property, set the Default to 2:InPosition.

  • Adding Interaction to Counter: 5Creating Interactive InOutButton Object

    Ester5 - 78el Technologies

    Figure 5.67: Grouping button OutPosition and InPosition in conditional group

    You have created the graphics of the InOutButton involving a conditional group with two states 1 and 2:

    State 1 selects the OutPosition object State 2 selects the InPosition object

    To define the index for the two cases

    1 Create a new variable in the Variable Dictionary named MouseIn, of type bool (false as default value), and of Output scope.

  • Adding Interaction to Counter: 5Creating Interactive InOutButton ObjectGetting Started with SCADE Display5 - 79

    Figure 5.68: Creating MouseIn variable in the Variable Dictionary

    2 Select the Graphics group in the Structure area and display the Plugs tab.

    3 Click the Index pluggable property text-field and type the conditional if-then-else expression MouseIn ? 2 : 1.

    Figure 5.69: Plugging the Index property of the Graphics conditional Group

    The index property allows selecting between the two cases (OutPosition and InPosition groups) of the Graphics conditional group.

  • Adding Interaction to Counter: 5Creating Interactive InOutButton Object

    Ester5 - 80

    The following exercises show you how to add interaction to the InOutButton. The buttons interactivity relies on an active area around the rectangle that detects when the mouse is inside the button.

    Exerciel Technologies

    For more information about variable expressions, see Plugging Objects to Expressions on page 150 from SCADE Display User Manual.

    You can continue Exercise 5.36: Defining InOutButton Active Area.

    se 5.36: Defining InOutButton Active AreaThe purpose of this exercise is to define the active area of the InOutButton object that detects the mouse pointer. It involves two steps:

    Defining the Rectangle Active Area geometry and associating the mouse to it Plugging the Inside, Width percent, and Height percent properties

    To define the Rectangle Area geometry and associate the mouse to it

    1 In the Object Palette, click Interactive Rectangle Area in the Interactors tab, and draw a rectangle around the InOutButtons rectangle in the Visualization area.

    2 In the rectangle area properties:

    select Width and height in the View property, set the Origin to -60.0 and -30.0, set the Width to 120.0 and the Height to 60.0.

    3 Group the rectangle area object in a