Anda di halaman 1dari 106



Getting Started
with SCADE Display

Contacts
Legal Contact

Technical Support

Esterel Technologies SAS


Parc Euclide - 8, rue Blaise Pascal
78996 Elancourt FRANCE
Phone: +33 1 30 68 61 60
Fax: +33 1 30 68 61 61

Esterel Technologies SAS


Parc Avenue, 9 rue Michel Labrousse
31100 Toulouse FRANCE
Phone: +33 5 34 60 90 50
Fax: +33 5 34 60 90 41

Submit questions to Technical Support at scade-support@esterel-technologies.com.


Contact one of our Sales representatives at scade-sales@esterel-technologies.com.
Direct general questions about Esterel Technologies to scade-info@esterel-technologies.com.
Discover latest news on our products and technology at www.esterel-technologies.com.

Legal Information
Copyrights 2002-2012 Esterel Technologies.
SCADE System, SCADE LifeCycle, SCADE Suite, SCADE Display, and SCADE are registered trademarks of Esterel
Technologies. All rights reserved.
Getting Started with SCADE Display Copyright Esterel Technologies - Published November 2013.

Terms of Use
Important! Read carefully before starting this software and referring to its user documentation. This publication, as well
as the software it describes, is distributed as part of the SCADE Display user documentation under license and may be used
or copied only in accordance with the terms and conditions of the Software License Agreement (SLA) accepted during
SCADE Display products installation. Except as permitted by the SLA, the content of this publication cannot be reproduced,
stored, or transmitted in any form or by any means, electronic, mechanical, recording, or otherwise, without the prior
permission of Esterel Technologies SAS. Any existing artwork or images that you may want to reuse in your projects may
be protected under copyright law. The unauthorized use of such material into your own work may constitute a violation of
Esterel Technologies copyrights. If needed, make sure your obtain the written permission from Esterel Technologies. By
starting the software you expressly agree to the following conditions:
Property: This software is and remains the exclusive property of Esterel Technologies SAS. It cannot be copied or
distributed without written authorization from Esterel Technologies SAS. Esterel Technologies SAS retains title and
ownership of the software.
Warranty: The software is provided, as is, without warranty of any kind. Esterel Technologies SAS does not
guarantee the use, or the results from the use, of this software. All risk associated with usage results and
performance is assumed by you the user.

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

Other Legal Info


All other trademarks and tradenames contained herein are the property of their respective owners:
Adobe Reader is a registered trademark of Adobe Systems Incorporated.
Java and all Java-based trademarks and logos are trademarks or registered trademarks of Oracle and/or its affiliates.
FlexNet Publisher is a registered trademark of FLEXERA Software.
OpenGL is a registered trademark of Silicon Graphics Incorporated.
The following are copyrights of their respective companies:
Adobe Reader Adobe Systems Incorporated, licensed by Adobe Systems Incorporated.
FlexNet Publisher Flexera Software, licensed by Esterel Technologies.

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
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INRIA OR ITS CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Shipping date: 15/11/13

Revision: SDY-GS-65 - DOC/rev/0100-11

Getting Started Overview

RELATED DOCUMENTS

OVERVIEW
This manual walks you through the basics of
specification creation with SCADE Display. The
document is divided into the following chapters:
Chapter 1: Introduction
This chapter guides your first steps into the SCADE
Display environment and workflow.
Chapter 2: Creating Counter
This chapter walks you through a set of exercises
that teaches you how to create a basic display
specification.
Chapter 3: Creating Reusable Object
This chapter walks you through a set of exercises
that teaches how to create a reusable object.
Chapter 4: Reusing Counter Object
This chapter walks you through a set of exercises
that teaches how to reuse an object previously
created.
Chapter 5: Adding Interaction to Counter
This chapter teaches you how to add an interactive
object to the existing counter object. It consists of
creating a button with On/Off positions to turn on
and off the counter. It also shows how to simulate
the final counter with SCADE Suite Simulator.

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

Getting Started with SCADE Display

Table of Contents
Getting Started Overview
List of Figures

1. Introduction

1-1

Purpose and Organization of this Manual

1-1

Presenting SCADE Display User Interface

1-3

Documentation and Online Help

1-5

Documentation Set

1-5

Accessing SCADE Display PDF Manuals

1-5

Accessing SCADE Display Online Help

1-6

2. Creating Counter

2-7

Starting to Specify

2-7

Exercise 2.1:

Launching SCADE Display

Exercise 2.2:

Creating New Specification

2-8

Drawing the Background of the Counter

2 - 11
2 - 13

Exercise 2.3:

Setting Object Attributes

2 - 14

Exercise 2.4:

Drawing the First Arc

2 - 15

Exercise 2.5:

Setting Objects Properties

2 - 18

Exercise 2.6:

Setting the Grid Options

2 - 20

Exercise 2.7:

Replicating Objects

2 - 20

Exercise 2.8:

Grouping Objects

2 - 23

Exercise 2.9:

Naming Objects

2 - 25

Drawing Needle Areas

2 - 26

Exercise 2.10: Duplicating Objects

2 - 27

Exercise 2.11: Arranging Objects

2 - 30

Drawing the Needle

2 - 31

Exercise 2.12: Drawing the Needle

2 - 32

Exercise 2.13: Plugging Needle

2 - 35

Getting Started with SCADE Display


i

Table of Contents
Drawing the Label

2 - 38

Exercise 2.14: Drawing the Label

2 - 39

Exercise 2.15: Aligning Objects

2 - 42

Exercise 2.16: Plugging Label Value

2 - 43

Animating Display Specification

2 - 44

Exercise 2.17: Defining the Animation Scenario

2 - 44

Exercise 2.18: Launching Specification Animation

2 - 46

3. Creating Reusable Object

3 - 49

Creating Unit Parameter

3 - 49

Exercise 3.19: Plugging the Unit Label

Creating Danger and Nominal Parameters

3 - 50

Exercise 3.20: Modifying Danger and Nominal Areas

3 - 51

Exercise 3.21: Clipping Areas

3 - 52

Exercise 3.22: Rotating and Plugging the Danger Area

3 - 54

Exercise 3.23: Rotating and Plugging the Nominal Area

3 - 55

Checking Specification Design


Exercise 3.24: Launching Design Checker

Saving the Specification as Object

3 - 58
3 - 58
3 - 60

Exercise 3.25: Creating a Top-Level Container

3 - 60

Exercise 3.26: Saving the Specification as Object

3 - 61

4. Reusing Counter Object


Creating Blank Specification
Exercise 4.27: Creating New Specification

Creating Volt Counter

4 - 63
4 - 63
4 - 63
4 - 64

Exercise 4.28: Instantiating Volt Counter

4 - 64

Exercise 4.29: Plugging the Volt Counter

4 - 66

Creating Hertz Counter

Esterel Technologies
ii

3 - 49

4 - 67

Table of Contents
Exercise 4.30: Instantiating the Hertz Counter

4 - 67

Exercise 4.31: Plugging the Hertz Counter

4 - 68

Animating the Volt and Hertz Counters

4 - 69

Exercise 4.32: Defining Scenarios and Launching Animation

Generating Specification Code

4 - 69
4 - 71

Exercise 4.33: Launching Specification Code Generation

4 - 71

Exercise 4.34: Launching Resource Tables Code Generation

4 - 72

5. Adding Interaction to Counter

5 - 73

Creating Interactive InOutButton Object

5 - 73

Exercise 5.35: Drawing Button Graphics with In/Out Positions

5 - 74

Exercise 5.36: Defining InOutButton Active Area

5 - 80

Reusing InOutButton Reference Object


Exercise 5.37: Creating Graphical Specification with Button

Co-Simulating your Display with SCADE Suite

5 - 83
5 - 83
5 - 85

Exercise 5.38: Opening SCADE Suite Model

5 - 85

Exercise 5.39: Inserting Specification in SCADE Suite Project

5 - 87

Exercise 5.40: Connecting Object and Model Inputs/Outputs

5 - 87

Exercise 5.41: Co-Simulating your Display with Example Model

5 - 91

Getting Started with SCADE Display


iii

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

Figure 2.3:

SCADE Display Welcome page

2-9
2 - 10

Figure 2.4:

Creating new specification through predefined template

2 - 11

Figure 2.5:

New empty specification in SCADE Display Editor

2 - 12

Figure 2.6:

Selecting an outline color in the Object Attributes area

2 - 14

Figure 2.7:

Selecting a line width

2 - 15

Figure 2.8:

Selecting an arc primitive

2 - 16

Figure 2.9:

Drawing the arc in the Visualization area

2 - 17

Figure 2.10:

Drawn arc

2 - 17

Figure 2.11:

Arc control points

2 - 18

Figure 2.12:

Properties tab

2 - 18

Figure 2.13:

Dimensioned arc

2 - 19

Figure 2.14:

Drawing the first graduation

2 - 21

Figure 2.15:

Replication parameter definition window

2 - 21

Figure 2.16:

Replicating the graduations

2 - 22

Figure 2.17:

Graduated arc

2 - 22

Figure 2.18:

Selecting objects

2 - 23

Figure 2.19:

Objects grouping

2 - 24

Figure 2.20:

Graduations selection

2 - 25

Figure 2.21:

Grouping the graduations

2 - 25

Figure 2.22:

Group naming

2 - 26

Figure 2.23:

Drawing the first needle area

2 - 27

Figure 2.24:

Duplicating the first crown

2 - 28

Figure 2.25:

Drawing the second needle area

2 - 29

Figure 2.26:

Drawing the third area

2 - 30

Figure 2.27:

Bringing the counter contour to front

2 - 30

Figure 2.28:

Bringing the counter outline over the needle areas

2 - 31

Figure 2.29:

Needle shape

2 - 32

Figure 2.30:

Resulting drawing of the needle

2 - 33

Figure 2.31:

Selecting a rotation group from the Containers tab

2 - 34

Figure 2.32:

Drawing a rotation container

2 - 34

Figure 2.33:

Invalid plug in the Plugs tab

2 - 36

Getting Started with SCADE Display


v

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 2.38:

Resulting label contour

2 - 40

Figure 2.39:

Drawing the label

2 - 41

Figure 2.40:

Drawing the unit label

2 - 42

Figure 2.41:

Selecting several objects

2 - 42

Figure 2.42:

Reusing existing variable to plug the label value

2 - 43

Figure 2.43:

Animation panel

2 - 45

Figure 2.44:

Animating the counter

2 - 46

Figure 3.45:

Plugging the Unit label

3 - 50

Figure 3.46:

Grouping the two needle areas

3 - 52

Figure 3.47:

Masks tab from the Object Palette

3 - 53

Figure 3.48:

Resulting clip plane

3 - 53

Figure 3.49:

Resulting rotation container 1

3 - 55

Figure 3.50:

Resulting rotation container 2

3 - 56

Figure 3.51:

Structure tree

3 - 57

Figure 3.52:

Errors found by Design Checker

3 - 59

Figure 3.53:

Top-level container

3 - 61

Figure 4.54:

Inserting a reference object

4 - 65

Figure 4.55:

Instantiating the Counter object

4 - 65

Figure 4.56:

Resulting Volt counter

4 - 66

Figure 4.57:

Resulting Hertz counter

4 - 68

Figure 4.58:

Animation panel

4 - 69

Figure 4.59:

Volt and Hertz counters

4 - 70

Figure 4.60:

Specification code generation console

4 - 71

Figure 4.61:

Resource tables code generation console

4 - 72

Figure 5.62:

Object specification containing a group by default

5 - 74

Figure 5.63:

Drawing the shape of the buttons Out position

5 - 75

Figure 5.64:

Graphics of the OutPosition case

5 - 75

Figure 5.65:

Grouping the graphical elements of the buttons Out position

5 - 76

Figure 5.66:

Graphics of the InPosition case

5 - 77

Figure 5.67:

Grouping button OutPosition and InPosition in conditional group

5 - 78

Figure 5.68:

Creating MouseIn variable in the Variable Dictionary

5 - 79

Esterel Technologies
vi

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 5.73:

SCADE Suite model using the counter interactively

5 - 86

Figure 5.74:

Inserting a SCADE Display SFGX file in a SCADE Suite project

5 - 87

Figure 5.75:

Contextual menu command to connect model I/O to graphical panel I/O

5 - 88

Figure 5.76:

SCADE Suite/Graphical Panels Connections

5 - 89

Figure 5.77:

Connecting model and specification inputs/outputs

5 - 90

Figure 5.78:

Configuring simulation code for graphical panel integration

5 - 91

Figure 5.79:

Using the SCADE Suite/SCADE Display panel

5 - 92

Getting Started with SCADE Display


vii

Introduction
This chapter is intended as an overview of SCADE Displays features and
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

Purpose and Organization of this Manual


This 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

Getting Started with SCADE Display


1-1

Introduction: 1
Purpose and Organization of this Manual

This manual is divided into the following chapters:


Chapter 2 about Creating Counter
Chapter 3 about Creating Reusable Object
Chapter 4 about Reusing Counter Object
Chapter 5 about Adding Interaction to Counter

Esterel Technologies
1-2

Introduction: 1
Presenting SCADE Display User Interface

Presenting SCADE Display User Interface


The SCADE Display Graphical User Interface (GUI) contains various components for
editing, animating and managing layers and specifications. The Figure 1.2 below describes
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.).

Getting Started with SCADE Display


1-3

Introduction: 1
Presenting SCADE Display User Interface

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

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.
Note
Most of these features are also available from the Menu bar.

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.

Esterel Technologies
1-4

Introduction: 1
Documentation and Online Help

Documentation and Online Help


SCADE Display is delivered with a comprehensive source of documentation available in
various formats. All documents are distributed in PDF format at installation. The online
help is integrated into the SCADE Display User Interface.
Documentation Set
Accessing SCADE Display PDF Manuals
Accessing SCADE Display Online Help

Documentation Set
The 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 application
Release 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 online help as explained in Accessing SCADE Display Online Help.

Accessing SCADE Display PDF Manuals


You 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.
Tip
Select SCADE Display > Release Notes to open the Release Notes of the current
SCADE Display version.

Getting Started with SCADE Display


1-5

Introduction: 1
Documentation and Online Help

Accessing SCADE Display Online Help


The 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.
The SCADE Products Help interface provides several features:
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

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.
Tip
Pressing 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.

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

Esterel Technologies
1-6

Creating Counter
This chapter teaches you how to create a counter. You will create the
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

Starting to Specify
This 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 specification
You will learn the basics about creating a display specification in these exercises:
Exercise 2.1: Launching SCADE Display
Exercise 2.2: Creating New Specification

Getting Started with SCADE Display


2-7

Creating Counter: 2
Starting to Specify

Exercise 2.1:

Launching SCADE Display

This exercise explains how you can launch the SCADE Display application.
To run SCADE Display

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.

Esterel Technologies
2-8

Creating Counter: 2
Starting to Specify

Figure 2.2: SCADE Display Startup page

To display SCADE Display Welcome page

Click the SCADE Display diamond.

Getting Started with SCADE Display


2-9

Creating Counter: 2
Starting to Specify

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.

Esterel Technologies
2 - 10

Creating Counter: 2
Starting to Specify

Exercise 2.2:

Creating New Specification

This exercise shows you how to create a new specification from a predefined template.
To create a blank specification

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.
Tip
You can also double-click the template to create the specification.

Getting Started with SCADE Display


2 - 11

Creating Counter: 2
Starting to Specify

Figure 2.5: New empty specification in SCADE Display Editor


Note
The 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.

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.

Esterel Technologies
2 - 12

Creating Counter: 2
Drawing the Background of the Counter

For more information about the SCADE Display General User Interface, see Chapter 2
about Discovering SCADE Display User Interface.
Tip
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.

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

Drawing the Background of the Counter


This 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 objects
You 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

Getting Started with SCADE Display


2 - 13

Creating Counter: 2
Drawing the Background of the Counter

Exercise 2.9: Naming Objects


Exercise 2.3:

Setting Object Attributes

This exercise shows you how you can define the graphical attributes of an object before or
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


Tip
A 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.

2 Select a white
3 Click Filling Color
4 Click Line Width

Esterel Technologies
2 - 14

color.
and select No Fill from the filling color chooser.
drop-down list.

Creating Counter: 2
Drawing the Background of the Counter

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.
Exercise 2.4:

Drawing the First Arc

The 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

Getting Started with SCADE Display


2 - 15

Creating Counter: 2
Drawing the Background of the Counter

Figure 2.8: Selecting an arc primitive


Tip
You can extend the Object Palette by dragging the handles.

2 Click once on the center of the Visualization area (where the two red dashed lines

intersect) to set the center of the arc.

Esterel Technologies
2 - 16

Creating Counter: 2
Drawing the Background of the Counter

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.
Getting Started with SCADE Display
2 - 17

Creating Counter: 2
Drawing the Background of the Counter

Exercise 2.5:

Setting Objects Properties

You 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
properties.
Note
You can set an objects properties only once it is drawn, not before.

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

Esterel Technologies
2 - 18

Creating Counter: 2
Drawing 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
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.
Tip
When 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.

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.

Getting Started with SCADE Display


2 - 19

Creating Counter: 2
Drawing the Background of the Counter

Exercise 2.6:

Setting the Grid Options

You 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
are positioned exactly on the nearest grid nodes.
To set the Snap to Grid feature

1 In the Grid toolbar, click Show/Hide Grid


2 Click Snap to Grid

to display the 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.
Exercise 2.7:

Replicating Objects

Now, 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.

Esterel Technologies
2 - 20

Creating Counter: 2
Drawing the Background of the Counter

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.

Getting Started with SCADE Display


2 - 21

Creating Counter: 2
Drawing the Background of the Counter

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.

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.

Esterel Technologies
2 - 22

Creating Counter: 2
Drawing the Background of the Counter

Exercise 2.8:

Grouping Objects

Grouping 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.
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


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

4 Click Group

in the Group toolbar (shortcut Ctrl+G).

The objects are now grouped:

Getting Started with SCADE Display


2 - 23

Creating Counter: 2
Drawing the Background of the Counter

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:

Esterel Technologies
2 - 24

Creating Counter: 2
Drawing the Background of the Counter

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.


Exercise 2.9:

Naming Objects

In 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.

Getting Started with SCADE Display


2 - 25

Creating Counter: 2
Drawing Needle Areas

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

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.

Drawing Needle Areas


This 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 front
You will learn how to draw the needle areas in these exercises:
Exercise 2.10: Duplicating Objects
Exercise 2.11: Arranging Objects

Esterel Technologies
2 - 26

Creating Counter: 2
Drawing Needle Areas

Exercise 2.10:

Duplicating Objects

Now, 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.
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


4 Click Crown

color.

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


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

Getting Started with SCADE Display


2 - 27

Creating Counter: 2
Drawing Needle Areas

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.


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.

Esterel Technologies
2 - 28

Creating Counter: 2
Drawing Needle Areas

6 Set the Center (x,y) to 0, 0.


7 Set the Radius to 100.
8 Set the Start angle to 45.
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:

Getting Started with SCADE Display


2 - 29

Creating Counter: 2
Drawing Needle Areas

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.
Exercise 2.11:

Arranging Objects

Arranging 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.

Esterel Technologies
2 - 30

Creating Counter: 2
Drawing the Needle

Figure 2.28: Bringing the counter outline over the needle areas

Now, you can continue with Drawing the Needle.

Drawing the Needle


This 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 object
You will learn how to draw and plug the needle in these exercises:
Exercise 2.12: Drawing the Needle
Exercise 2.13: Plugging Needle

Getting Started with SCADE Display


2 - 31

Creating Counter: 2
Drawing the Needle

Exercise 2.12:

Drawing the Needle

This exercise shows you how to draw a shape and define its rotation.
To set the needle shape attributes

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


5 In the Primitives tab, click Shape

to switch it on:

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

Esterel Technologies
2 - 32

Creating Counter: 2
Drawing 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.


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

Getting Started with SCADE Display


2 - 33

Creating Counter: 2
Drawing the Needle

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.
Esterel Technologies
2 - 34

Creating Counter: 2
Drawing the Needle

To set the rotation container properties

1 Set the rotation container Origin to 0 and 0 and the Reference angle to 90.
Note
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.

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.
Exercise 2.13:

Plugging Needle

This 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.

Getting Started with SCADE Display


2 - 35

Creating Counter: 2
Drawing the Needle

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

Esterel Technologies
2 - 36

Creating Counter: 2
Drawing the Needle

The line is now displayed in blue meaning that the plug is valid.

Figure 2.35: Valid plug in the Plugs tab


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

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.

Getting Started with SCADE Display


2 - 37

Creating Counter: 2
Drawing the Label

Figure 2.36: Name changing

3 Click Save

to save the specification.

Now, you can continue with Drawing the Label.

Drawing the Label


This 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 variable
You 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

Esterel Technologies
2 - 38

Creating Counter: 2
Drawing the Label

Exercise 2.14:

Drawing the Label

This 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.
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.

Getting Started with SCADE Display


2 - 39

Creating Counter: 2
Drawing the Label

The resulting image is:

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
5 Click Middle Alignment

to set the text horizontal 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.

Esterel Technologies
2 - 40

Creating Counter: 2
Drawing the Label

The resulting image is:

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
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 Object Attributes area.

.
.

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).
Tip
Press Suppr to delete a character.

9 Press Enter to validate.

Getting Started with SCADE Display


2 - 41

Creating Counter: 2
Drawing the Label

10 In the Properties tab, set the Origin (x,y) to 92, -38.

The resulting text is:

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.
Exercise 2.15:

Aligning Objects

This 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

Esterel Technologies
2 - 42

Creating Counter: 2
Drawing the Label

3 Click Middle Alignment

or select Transform > Align >

Middle to align the

three objects horizontally.


The objects are now perfectly aligned.
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.
Exercise 2.16:

Plugging Label Value

This 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.
Tip
You can also press Ctrl+Space to complete the field automatically.

Figure 2.42: Reusing existing variable to plug the label value

Getting Started with SCADE Display


2 - 43

Creating Counter: 2
Animating Display Specification

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.

As the needle, the counter value is now configured to change according to the value
variable.
Now, you can continue with Animating Display Specification.

Animating Display Specification


You 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 specification
You will learn how to draw the label in the following exercises:
Exercise 2.17: Defining the Animation Scenario
Exercise 2.18: Launching Specification Animation
Exercise 2.17:

Defining the Animation Scenario

Before 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.

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

Esterel Technologies
2 - 44

Creating Counter: 2
Animating 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.
5 Set evolution to triangular.

Figure 2.43: Animation panel

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

Getting Started with SCADE Display


2 - 45

Creating Counter: 2
Animating Display Specification

Exercise 2.18:

Launching Specification Animation

Now that the scenario is defined, you can launch the animation of the specification.
To launch the animation of the specification

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.

Esterel Technologies
2 - 46

Creating Counter: 2
Animating 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.
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.

Getting Started with SCADE Display


2 - 47

Creating Reusable Object


This chapter teaches you how to create a reusable counter object from the counter
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) areas
Learn the basics about creating a reusable object in:
Creating Unit Parameter
Creating Danger and Nominal Parameters
Checking Specification Design
Saving the Specification as Object

Creating Unit Parameter


To 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
Exercise 3.19:

Plugging the Unit Label

To 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.
Getting Started with SCADE Display
3 - 49

Creating Reusable Object: 3


Creating Danger and Nominal Parameters

Figure 3.45: Plugging the Unit label

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

Creating Danger and Nominal Parameters


You 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 objects
Learn 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

Esterel Technologies
3 - 50

Creating Reusable Object: 3


Creating Danger and Nominal Parameters

Exercise 3.20:

Modifying Danger and Nominal Areas

To 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.
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:

Getting Started with SCADE Display


3 - 51

Creating Reusable Object: 3


Creating Danger and Nominal Parameters

Figure 3.46: Grouping the two needle areas


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.

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


Exercise 3.21:

Clipping Areas

You 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.
Esterel Technologies
3 - 52

Creating Reusable Object: 3


Creating Danger and Nominal Parameters

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.

Getting Started with SCADE Display


3 - 53

Creating Reusable Object: 3


Creating Danger and Nominal Parameters

Exercise 3.22:

Rotating and Plugging the Danger Area

Configure and plug the Danger area so that it rotates according to the value of the variable
it is connected to.
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.

Esterel Technologies
3 - 54

Creating Reusable Object: 3


Creating Danger and Nominal Parameters

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.
Exercise 3.23:

Rotating and Plugging the Nominal Area

As 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.

Getting Started with SCADE Display


3 - 55

Creating Reusable Object: 3


Creating Danger and Nominal Parameters

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

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.

Esterel Technologies
3 - 56

Creating Reusable Object: 3


Creating 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.

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.

Getting Started with SCADE Display


3 - 57

Creating Reusable Object: 3


Checking Specification Design

Checking Specification Design


You can check the design of the specification and correct any error encountered by the
Design Checker.
CONCEPTS

This lesson covers the following topics:


Design Checker
AIM OF EXERCISE

Checking automatically the specification design through Design Checker


The following exercises show you how to save the specification as an object:
Exercise 3.24: Launching Design Checker
Exercise 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.

Esterel Technologies
3 - 58

Creating Reusable Object: 3


Checking Specification Design

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.

Getting Started with SCADE Display


3 - 59

Creating Reusable Object: 3


Saving the Specification as Object

Saving the Specification as Object


You 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.
CONCEPTS

This lesson covers the following topics:


Reference object
AIM OF EXERCISES

Create a top-level container


Save the specification as an object
The 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
Exercise 3.25:

Creating a Top-Level Container

Create 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.

Esterel Technologies
3 - 60

Creating Reusable Object: 3


Saving the Specification as Object

Figure 3.53: Top-level container

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

Saving the Specification as Object

Now 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.


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

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

Getting Started with SCADE Display


3 - 61

Reusing Counter Object


This chapter teaches you how to reuse the counter object you created in the
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

Creating Blank Specification


You can reuse the counter in a new blank specification.
Exercise 4.27:

Creating New Specification

To 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.

Getting Started with SCADE Display


4 - 63

Reusing Counter Object: 4


Creating Volt Counter

Creating Volt Counter


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

This lesson covers the following topics:


Reference container
AIM OF EXERCISES

Instantiate a reference object


Plug a reference object
You will learn how to reuse the counter in these exercises:
Exercise 4.28: Instantiating Volt Counter
Exercise 4.29: Plugging the Volt Counter
Exercise 4.28:

Instantiating Volt Counter

You can insert or instantiate a saved reference object through a specific type of containers
called reference containers.
To instantiate the counter

1 Click Reference

Esterel Technologies
4 - 64

from the References tab in the Object Palette.

Reusing Counter Object: 4


Creating Volt Counter

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.


Getting Started with SCADE Display
4 - 65

Reusing Counter Object: 4


Creating Volt Counter

set the danger parameter to 90.


set the nominal parameter to 75.
type V in the unit parameter text-field.
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.
Exercise 4.29:

Plugging the Volt Counter

Plug 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.

Esterel Technologies
4 - 66

Reusing Counter Object: 4


Creating 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.

Creating Hertz Counter


Proceed 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
Exercise 4.30:

Instantiating the Hertz Counter

To 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:

Getting Started with SCADE Display


4 - 67

Reusing Counter Object: 4


Creating Hertz Counter

Figure 4.57: Resulting Hertz counter

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

Plugging the Hertz Counter

To 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.

Esterel Technologies
4 - 68

Reusing Counter Object: 4


Animating the Volt and Hertz Counters

Animating the Volt and Hertz Counters


Finally, 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.
Exercise 4.32:

Defining Scenarios and Launching Animation

To 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.

Getting Started with SCADE Display


4 - 69

Reusing Counter Object: 4


Animating the Volt and Hertz Counters

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

Esterel Technologies
4 - 70

Reusing Counter Object: 4


Generating Specification Code

Generating Specification Code


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

This lesson covers the following topics:


Code generation
AIM OF EXERCISES

Generate specification code


Generate resource tables code
You 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
Exercise 4.33:

Launching Specification Code Generation

To 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.

Getting Started with SCADE Display


4 - 71

Reusing Counter Object: 4


Generating Specification Code

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.
Exercise 4.34:

Launching Resource Tables Code Generation

To 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.

Esterel Technologies
4 - 72

Adding Interaction to Counter


This chapter teaches you how you can add interaction into the counters display
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 cosimulate 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
Note
If 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.

Creating Interactive InOutButton Object


This 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

Getting Started with SCADE Display


5 - 73

Adding Interaction to Counter: 5


Creating Interactive InOutButton Object

Learn the basics of creating interactive objects in SCADE Display in the following
exercises:
Exercise 5.35: Drawing Button Graphics with In/Out Positions
Exercise 5.36: Defining InOutButton Active Area
Exercise 5.35:

Drawing Button Graphics with In/Out Positions

The 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

Visualization area,
Esterel Technologies
5 - 74

and draw a rectangle in the center of the

Adding Interaction to Counter: 5


Creating 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,
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

Getting Started with SCADE Display


5 - 75

Adding Interaction to Counter: 5


Creating Interactive InOutButton Object

10 Align the text and rectangles objects in the center

and in the middle

11 Group them in a new group named OutPosition.

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.

Esterel Technologies
5 - 76

Adding Interaction to Counter: 5


Creating Interactive InOutButton Object

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.

Getting Started with SCADE Display


5 - 77

Adding Interaction to Counter: 5


Creating Interactive InOutButton Object

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.

Esterel Technologies
5 - 78

Adding Interaction to Counter: 5


Creating Interactive InOutButton Object

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.
Getting Started with SCADE Display
5 - 79

Adding Interaction to Counter: 5


Creating Interactive InOutButton Object

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.
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.
Exercise 5.36:

Defining InOutButton Active Area

The 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.
Note
Drawing a rectangle active area is similar as drawing a rectangle primitive, as
described in Drawing the Label on page 39.

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 group named Interactivity.

Esterel Technologies
5 - 80

Adding Interaction to Counter: 5


Creating Interactive InOutButton Object

Figure 5.70: Defining the Rectangle Area geometry

To plug the rectangle area

1 Select the rectangle area and click the Plugs tab.


2 Plug the Rectangle Active Area properties as follows:

type MouseIn in the Inside property text-field.


type InAreaWidth in the Width percent property text-field.
type InAreaHeight in the Height percent property text-field.
3 Click Create variables to automatically create the new variables in the Variable

Dictionary.

Getting Started with SCADE Display


5 - 81

Adding Interaction to Counter: 5


Creating Interactive InOutButton Object

Figure 5.71: Plugging the Rectangle Area

Associating the MouseIn variable to the Inside property means that:


the MouseIn variable is true if the mouse is inside the Rectangle Active Area
the value of the InAreaWidth variable changes according to the value of the Width
percent property
the value of the InAreaHeight variable changes according to the value of the
Height percent property
To save the InOutButton Reference Object

1 Click Save to save the current Object specification as a SCADE Display Object file

(.ogfx).

Esterel Technologies
5 - 82

Adding Interaction to Counter: 5


Reusing InOutButton Reference Object

2 In the Save window, type InOutButton_ref in the File name field, select the

Reference Objects sub-directory, and click Save.


3 Close the specification.

You have defined the input/output plugs of the specification. Later, you will be able to
connect these inputs/outputs plugs to the inputs/outputs of a SCADE Suite model.
You can continue Reusing InOutButton Reference Object.

Reusing InOutButton Reference Object


This section shows how to use the InOutButton Reference Object in the TwoCounters
model you created previously.
CONCEPTS

This lesson covers the following topics:


Using an interactive graphical object stored as a Reference Object
AIM OF EXERCISES

Create a SCADE Display interactive Counter graphical specification


Learn the basics of creating interactive objects in SCADE Display in these exercises:
Exercise 5.37: Creating Graphical Specification with Button
Exercise 5.37:

Creating Graphical Specification with Button

The purpose of this exercise is to insert a InOutButton into the counter specification
created in Chapter 4 about Reusing Counter Object.
To insert the InOutButton within the Counter specification

1 Open the TwoCounters.sgfx model that you created in previous chapter.


2 Click Reference

from the References tab in the Object Palette.

3 In the file chooser that opens, browse and select the InOutButton_ref.ogfx file

that you created in the previous section.


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

Getting Started with SCADE Display


5 - 83

Adding Interaction to Counter: 5


Reusing InOutButton Reference Object

5 Click in the Visualization area to instantiate the InOutButton as illustrated in Figure

5.72.
To plug the InOutButton button

1 Select the InOutButton object and display the Plugs tab content.
2 Click in the Plug All button to automatically plug each output property of the

InOutButton with a variable having the same name as the property.


3 Click in the Create variables button to automatically create the variables in the

Variable Dictionary.
4 Click Save to save the TwoCounter.sgfx specification.

Figure 5.72: Plugging the InOutButton within the counters

Esterel Technologies
5 - 84

Adding Interaction to Counter: 5


Co-Simulating your Display with SCADE Suite

Co-Simulating your Display with SCADE Suite


This section shows how to link the display with a SCADE Suite model and launch an
interactive co-simulation session using SCADE Suite Simulator. The SCADE Suite model
allows using the counters display interactively during the simulation session.
CONCEPTS

This lesson covers the following topics:


Linking the provided SCADE Suite model with your display
Co-simulating the SCADE Suite model with your display
AIM OF EXERCISES

Insert a graphical specification in the SCADE Suite project


Connect SCADE Suite model and graphical specification inputs/outputs
Co-simulate the SCADE Suite model with your display
Learn the basics of co-simulating graphical specifications with SCADE Suite in these
exercises:
Exercise 5.38: Opening SCADE Suite Model
Exercise 5.39: Inserting Specification in SCADE Suite Project
Exercise 5.40: Connecting Object and Model Inputs/Outputs
Exercise 5.41: Co-Simulating your Display with Example Model
Exercise 5.38:

Opening SCADE Suite Model

The purpose of this exercise is to open the SCADE Suite model provided with your
SCADE installation.
To open the SCADE Suite model

1 In Windows Explorer, browse your SCADE installation for the examples/

GettingStarted/Display folder.
2 Double-click the Example.etp file to start the SCADE Suite application and load

the project in the SCADE Suite Editor.

Getting Started with SCADE Display


5 - 85

Adding Interaction to Counter: 5


Co-Simulating your Display with SCADE Suite

The Example.etp project contains one operator named RootOperator with the
following interface:
Kind

Name

Type

Input

MouseIn

Boolean

Input

InAreaWidth

real

Input
Outputs

InAreaHeight

real

hertz

real

volt

real

As illustrated in Figure 5.73, the RootOperator operator uses the defined inputs and
outputs and the If Then Else operator so that:
the value of the Hertz counter equals InAreaWidth * 100. when MouseIn is
true (0. otherwise)
the value of the Volt counter equals InAreaHeight * 100. when MouseIn is
true (0. otherwise)
MouseIn

bool

InAreaWidth * 100.

0.

real

real

real

Hertz

real

InAreaHeight * 100.

real

Volt

Figure 5.73: SCADE Suite model using the counter interactively

You can connect the models inputs and outputs to the SCADE Display specifications
plugs. However, you need to insert the graphical specification in the project first.

Esterel Technologies
5 - 86

Adding Interaction to Counter: 5


Co-Simulating your Display with SCADE Suite

Exercise 5.39:

Inserting Specification in SCADE Suite Project

The purpose of this exercise is to insert the SCADE Display specification into the SCADE
Suite project so that they reference each other.
To insert the counters display specification in the SCADE Suite project

1 Select Insert > Files from the menu bar to open a file chooser.
2 Browse for the TwoCounter.sgfx specification file created in the previous

exercise, and click Open.


SCADE Suite inserts the selected specification in the File View tree:

Figure 5.74: Inserting a SCADE Display SFGX file in a SCADE Suite project

Now you have linked your model and your specification, you can connect their inputs/
outputs.
Exercise 5.40:

Connecting Object and Model Inputs/Outputs

The purpose of this exercise is to connect the SCADE Display specification inputs/outputs
to the SCADE Suite model inputs/outputs.
To connect model and specification inputs/outputs

1 In SCADE Suite Framework View, right-click the RootOperator operator of the

model, and select Connect to Graphical Panels from the contextual menu (see Figure
5.75).

Getting Started with SCADE Display


5 - 87

Adding Interaction to Counter: 5


Co-Simulating your Display with SCADE Suite

Figure 5.75: Contextual menu command to connect model I/O to graphical panel I/O

The SCADE Suite/Graphical Panels Connections window that opens displays the list
of all the SCADE Suite model inputs and outputs on one hand, and the list of all the
SCADE Display inputs and outputs on the other hand, and allows connecting them (see
Figure 5.76).

Esterel Technologies
5 - 88

Adding Interaction to Counter: 5


Co-Simulating your Display with SCADE Suite

Figure 5.76: SCADE Suite/Graphical Panels Connections

2 Connect the inputs/outputs (I/Os) as follows:

in the left part of the window, select all the SCADE Suite I/Os by pressing the
Shift key and clicking each I/O,
in the right part of the window, select all the SCADE Display I/O by pressing the
Shift key and clicking each I/O,
click Connect by Name to connect all variables according to their name.
The connections are added to the list of existing connections in the Connections frame.

Getting Started with SCADE Display


5 - 89

Adding Interaction to Counter: 5


Co-Simulating your Display with SCADE Suite

Figure 5.77: Connecting model and specification inputs/outputs

3 Click OK to validate and close the window.


4 Save the Example.etp project.

You have created a SCADE Suite model of a counter that can be used interactively
through an interactive button.
You can now launch the simulation of the model to test the behavior of the counter.

Esterel Technologies
5 - 90

Adding Interaction to Counter: 5


Co-Simulating your Display with SCADE Suite

Exercise 5.41:

Co-Simulating your Display with Example Model

The purpose of this exercise is to set and launch the co-simulation of the Example.etp
model with the TwoCounter.sgfx specification.
To set code simulation of the Example model

1 Select the Simulation configuration from the Code Generator toolbar.


2 Click Settings

in the Code Generator toolbar and display the Graphical Panels


tab content. This tab shows the existing specification in the project and its integration
mode in the simulation code.

Figure 5.78: Configuring simulation code for graphical panel integration

3 Select the Synchronous integration mode and click OK to validate.


To launch co-simulation between SCADE Suite and SCADE Display

1 Select the RootOperator of the Example SCADE Suite model.


2 Make sure the Simulation configuration is selected from the Code Generator

toolbar.
3 Click Run

to generate a simulation executable and launch an interactive cosimulation session.

Getting Started with SCADE Display


5 - 91

Adding Interaction to Counter: 5


Co-Simulating your Display with SCADE Suite

4 Click Yes. in the pop-up window asking you whether you want to build a simulation

binary file.
The SCADE Suite Simulator interface and SCADE Display Viewer open up:

Figure 5.79: Using the SCADE Suite/SCADE Display panel

5 In SCADE Suite Simulator interface, press Go to start the co-simulation session.


6 Drag the mouse pointer over the InOutButton of the graphical panel and observe:

that the counters react when the mouse pointer is inside the button
how the counters react depending on the position of the mouse pointer in the button:
You have now completed the Getting Started with SCADE Display and have seen how to
create a basic display specification, how to create and reuse an interactive object. You are
ready to create your own specification.

Esterel Technologies
5 - 92

Anda mungkin juga menyukai